zhanghui пре 1 година
родитељ
комит
acb84b5245
1 измењених фајлова са 43 додато и 18 уклоњено
  1. 43 18
      orderPages/activityDetail/activityDetail.vue

+ 43 - 18
orderPages/activityDetail/activityDetail.vue

@@ -264,8 +264,13 @@ export default {
     this.userInfo = uni.getStorageSync('userInfo')
     this.userInfo = uni.getStorageSync('userInfo')
     this.activityDetail()
     this.activityDetail()
     this.activityCheck()
     this.activityCheck()
+  },
+
+  onShow(){
+    this.userInfo = uni.getStorageSync('userInfo')
     this.listServiceObject()
     this.listServiceObject()
   },
   },
+
   methods: {
   methods: {
     showRemark(item) {
     showRemark(item) {
       if (this.showRemarkId == item.id) {
       if (this.showRemarkId == item.id) {
@@ -280,29 +285,33 @@ export default {
     listServiceObject() {
     listServiceObject() {
       let serviceObjectList = []
       let serviceObjectList = []
       this.$api.listServiceObject(this.reqParm).then((res) => {
       this.$api.listServiceObject(this.reqParm).then((res) => {
-        if (this.isShare) {
-          if (res.data.data.length === 0) {
-            uni.showToast({
-              duration: 2500,
-              title: '当前账号没有服务对象,即将跳转服务对象绑定',
-              icon: 'none',
-            });
-            setTimeout(() => {
-              uni.hideToast();
-              //关闭提示后跳转
-              uni.navigateTo({
-                url: '/myPages/serviceObjectFaceAuth/index'
-              })
-            }, 1500)
-          }
-        }
-
         res.data.data.forEach(i => {
         res.data.data.forEach(i => {
           if (i.isSelf != 1) {
           if (i.isSelf != 1) {
             serviceObjectList.push(i)
             serviceObjectList.push(i)
           }
           }
         })
         })
-        this.serviceObjectList[0] = serviceObjectList
+        // this.serviceObjectList[0] = serviceObjectList
+
+        this.$set(this.serviceObjectList,0,serviceObjectList)
+
+        console.log('执行了+++++++++++++++++++',this.serviceObjectList)
+
+        // if (this.isShare) {
+        if (serviceObjectList.length === 0) {
+          uni.showToast({
+            duration: 2500,
+            title: '当前账号没有服务对象,即将跳转服务对象绑定',
+            icon: 'none',
+          });
+          setTimeout(() => {
+            uni.hideToast();
+            //关闭提示后跳转
+            uni.navigateTo({
+              url: '/myPages/serviceObjectFaceAuth/index'
+            })
+          }, 1500)
+        }
+        // }
 
 
       })
       })
     },
     },
@@ -332,6 +341,22 @@ export default {
     },
     },
 
 
     beforeCommitOrder() {
     beforeCommitOrder() {
+
+      if (!this.userInfo.phone){
+        uni.showModal({
+          title:'温馨提示',
+          content:'请先绑定手机号',
+          success:res=>{
+            if (res.confirm){
+              uni.navigateTo({
+                url: '/myPages/setting/setting-telphone',
+              })
+            }
+          }
+        })
+        return
+      }
+
       if (this.activity.isAddServiceObject == 1) {
       if (this.activity.isAddServiceObject == 1) {
         this.show = true
         this.show = true
       } else {
       } else {