xuxueyang
2024-07-29 11f7661538f75c2d4eefd32408eba6dc0d77052b
pages/user/supplier-user.vue
@@ -265,25 +265,25 @@
            // StatusBar:0,
            tel: '15974805814',
            tj: {},
            cacheUserId: '',
         };
      },
      // watch: {
      //    currentInfo(nv, ov) {
      //       if (!cacheUserId) {
      //       }
      //    }
      // },
      onShow(){
         this.getTj()
      },
      onLoad(options) {
         // const url = options.q ? decodeURIComponent(options.q) : '';
         // const urlcode = options.url && decodeURIComponent(options.url) || ''
         // #ifdef PUB_CUSTOMER
         if (this.currentInfo.id) {
            let that = this
            setTimeout(() => {
               this.$http.request('get', '/api/customer/center/tj', {}).then(res => {
                  if (res.code === 0) {
                     that.tj = res.data || {}
                  }
               })
            }, 200)
         }
         // #endif
      },
      created() {
@@ -294,6 +294,24 @@
         uni.stopPullDownRefresh()
      },
      methods: {
         getTj() {
            // /api/supplier/delivery
            if (this.currentInfo.id && this.currentInfo.id !== this.cacheUserId) {
               this.cacheUserId = this.currentInfo.id
               let that = this
               setTimeout(() => {
                  // #ifdef PUB_CUSTOMER
                  this.$http.request('get', '/api/customer/center/tj', {}).then(res => {
                     if (res.code === 0) {
                        that.tj = res.data || {}
                     }
                  })
                  // #endif
               }, 200)
            }
         },
         async clearlogout() {
            await this.$message.confirm('是否退出登录?')