浏览代码

修改标签

潘超林 4 月之前
父节点
当前提交
287c9c5a3b
共有 1 个文件被更改,包括 59 次插入18 次删除
  1. 59 18
      pages/group/add.vue

+ 59 - 18
pages/group/add.vue

@@ -39,33 +39,59 @@
               <view style="width: 80%">
                 <view class="title"
                   >{{ userInfo.nick }}
+
+                  <view
+                    v-if="userInfo.userTypes.includes(4)"
+                    class="tag"
+                    style="
+                      background: url('https://bucket.sxdirectpurchase.com/wx/static/images/my/tags/driver.png')
+                        no-repeat;
+                      background-size: 55% 100%;
+                    "
+                  ></view>
+
+                  <view
+                    v-if="userInfo.userTypes.includes(2)"
+                    class="tag"
+                    style="
+                      background: url('https://bucket.sxdirectpurchase.com/wx/static/images/my/tags/supplier.png')
+                        no-repeat;
+                      background-size: 55% 100%;
+                    "
+                  ></view>
+
                   <view
+                    v-if="userInfo.userTypes.includes(5)"
+                    class="tag"
                     style="
-                      padding: 0px 20rpx;
-                      height: 40rpx;
-                      background: linear-gradient(270deg, #f0ff00 0%, #00cf07 100%);
-                      border-radius: 4rpx;
-                      display: flex;
-                      flex-direction: row;
-                      justify-content: center;
-                      align-items: center;
-                      font-size: 24rpx;
-                      color: #ffffff;
-                      margin-left: 5px;
+                      background: url('https://bucket.sxdirectpurchase.com/wx/static/images/my/tags/agent.png')
+                        no-repeat;
+                      background-size: 55% 100%;
                     "
-                  >
+                  ></view>
+
+                  <view
+                    v-if="userInfo.userTypes.includes(6)"
+                    class="tag"
+                    style="
+                      background: url('https://bucket.sxdirectpurchase.com/wx/static/images/my/tags/partner.png')
+                        no-repeat;
+                      background-size: 55% 100%;
+                    "
+                  ></view>
+                  <!-- <view>
                     {{
                       userInfo.userTypes.includes(2)
-                        ? "供应商认证"
+                        ? "供应商"
                         : userInfo.userTypes.includes(4)
-                        ? "司机认证"
+                        ? "司机"
                         : userInfo.userTypes.includes(7)
-                        ? "同城供应商认证"
+                        ? "同城供应商"
                         : userInfo.userTypes.includes(8)
-                        ? "同城司机认证"
-                        : "采购商认证"
+                        ? "同城司机"
+                        : "采购商"
                     }}
-                  </view>
+                  </view> -->
                 </view>
                 <view class="phone">{{ userInfo.phone }}</view>
               </view>
@@ -150,6 +176,21 @@ export default {
   border: 1px solid #00d36e;
   border-radius: 20px;
 }
+.tag {
+  padding: 0px 20rpx;
+  height: 45rpx;
+  background: linear-gradient(270deg, #f0ff00 0%, #00cf07 100%);
+  background-size: 100% 100%;
+  border-radius: 4rpx;
+  display: flex;
+  flex-direction: row;
+  justify-content: center;
+  align-items: center;
+  font-size: 24rpx;
+  color: #ffffff;
+  width: 100px;
+  margin-left: 5px;
+}
 .main {
   .item {
     display: flex;