#
whycq
2023-10-20 6e1e2b85e0926175053746cfe19f82afc452c24a
pages/business/cstmr/csmtr.vue
@@ -4,7 +4,7 @@
         <block slot="right">
            <view class="city">
               <view>
                  <text class="uni-nav-bar-text">角色</text>
                  <text class="uni-nav-bar-text">{{username}}</text>
               </view>
               <uni-icons type="arrowdown" color="#333333" size="20" />
            </view>
@@ -38,11 +38,14 @@
</template>
<script>
   import user from '@/pages/api/user/user.js'
   export default { 
      data() {
         return {
            csmtrList: [],
            last_id: '',
            username: '',
            userid: 0,
            reload: false,
            status: 'more',
            curr:2,
@@ -60,23 +63,25 @@
         })
         
      },
      onLoad() {
      },
      onShow() {
         setTimeout(()=> {
            this.getCsmtr1()
         },500)
         this.getDetail()
      },
      onReachBottom() {
         this.status = 'more';
         this.getCsmtr()
      },
      mounted() {
         // this.getUserTree()
         // this.columns = [['aa','bb']]
      },
      methods: {
         async getDetail() {
            let res = await user.getDetail()
            if (res.code === 200) {
               this.username = res.data.username
            } else if (res.code === 403) {
               this.backLogin(res)
            }
         },
         open() {
            this.show = true 
            console.log(this.columns);
@@ -90,20 +95,6 @@
            }).then((res)=>{
               console.log(res);
            })
            // success(res) {
            //    res = res.data
            //    res.data[0].childern
            //    let sel1 = []
            //    for (let k of res.data[0].children) {
            //       res.data[0].children
            //       sel1.push(k.title)
            //    }
            //    // _this.columns[0] = sel1
            // }
         },
         back() {
            uni.navigateBack({
@@ -204,6 +195,14 @@
         // ---
         search() {
            
         },
         backLogin(res) {
            uni.showToast({title: res.msg, icon: "none", position: 'top'})
            setTimeout(() => {
               uni.reLaunch({
                  url: '../login/login'
               });
            }, 1000);
         }
      }
   }
@@ -213,7 +212,6 @@
   .city {
      display: flex;
      align-items: center;
      margin-right: 4px;
   }
   .uni-nav-bar-text {
      font-size: 12px;