Browse Source

优化样式

xiaohaizhao 1 year ago
parent
commit
659d781f3c
5 changed files with 16 additions and 5 deletions
  1. 1 1
      pages/teams/addOrder.js
  2. 5 0
      pages/teams/addOrder.scss
  3. 3 1
      pages/teams/addOrder.wxml
  4. 2 3
      pages/teams/index.js
  5. 5 0
      pages/teams/order.js

+ 1 - 1
pages/teams/addOrder.js

@@ -159,7 +159,7 @@ Page({
             })
             pageNumber = res.pageNumber + 1;
             this.setUsers(this.data.opUsers.filter(id => this.data.userList.some(v => id == v.userid)));
-            this.changeOrder();
+            // this.changeOrder();
         })
     },
     setUsers(users = []) {

+ 5 - 0
pages/teams/addOrder.scss

@@ -76,6 +76,11 @@
             font-weight: bold;
             color: #333333;
             margin-top: 0;
+
+            .tag1{
+                font-weight: normal !important;
+                margin-right: 10rpx;
+            }
         }
 
         view {

+ 3 - 1
pages/teams/addOrder.wxml

@@ -19,7 +19,9 @@
     <view class="user-item" wx:for="{{userList}}" wx:key="userid" data-id="{{item.userid}}" bindtap="{{(item.isleader && per.query(users,item.userid) && !item.enddate[sys_site_systempartitionid])?'':'onChange'}}">
         <van-checkbox shape='square' icon-size='14' disabled="{{item.isleader && per.query(users,item.userid) && !item.enddate[sys_site_systempartitionid]}}" name="{{item.userid}}" />
         <view class="content">
-            <view class="label">{{item.name}}</view>
+            <view class="label">
+                {{item.name}} <van-tag custom-class='tag1' wx:if="{{item.isleader==1}}" text-color='#fff' round type="danger">主账号</van-tag>
+            </view>
             <view>
                 账号ID:{{item.accountno}}
             </view>

+ 2 - 3
pages/teams/index.js

@@ -19,7 +19,6 @@ Page({
         }
     },
     onLoad(options) {
-        console.log(options)
         let auth = options.auth ? JSON.parse(options.auth) : getApp().globalData.queryPer.query(wx.getStorageSync('userauth'), ['通用'], ['个人中心'])[0].apps[0].meta.auth,
             tabList = [],
             authList = auth.map(v => {
@@ -50,9 +49,10 @@ Page({
                 }
                 return v.option
             });
+        tabList = tabList.filter(v => v);
         this.setData({
             authList,
-            tabList: tabList.filter(v => v),
+            tabList,
             active: tabList[options.title ? tabList.findIndex(v => v.title == options.title) || 0 : 0]
         })
         /*   if (options.title) setTimeout(() => {
@@ -84,7 +84,6 @@ Page({
             id: active.id || '',
             content: this.data.content
         }).then(res => {
-            console.log(active.title, res)
             this.selectComponent('#ListBox').RefreshToComplete();
             if (res.msg != '成功') return wx.showToast({
                 title: res.msg,

+ 5 - 0
pages/teams/order.js

@@ -156,6 +156,11 @@ Page({
                     }
                 }).then(res => {
                     console.log("获取支付信息", res)
+                    if (res.msg != '成功') return wx.showToast({
+                        title: res.msg,
+                        icon: "none",
+                        mask: true
+                    });
                     wx.requestPayment({
                         timeStamp: res.data.timeStamp,
                         nonceStr: res.data.nonceStr,