Forráskód Böngészése

提交分享页面问题

wangming 2 hónapja
szülő
commit
d31731378b

+ 1 - 4
src/pages/home/home.vue

@@ -65,10 +65,7 @@
                     <image src="../../static/smalLn.png" mode="" />
                 </view>
             </view>
-            <view
-                class="card"
-                @click="gotoPath('/pagesA/homeManage/homeManage')"
-            >
+            <view class="card" @click="gotoPath('/pagesA/devices/devices')">
                 <view class="contentTitle">
                     <text>我的家庭</text>
                     <image src="../../static/rightArrow.png" />

+ 8 - 0
src/pagesA/adDevice/adDevice.vue

@@ -381,6 +381,14 @@ export default {
                 return;
             }
 
+            if (200 > this.height || this.height > 270) {
+                uni.showModal({
+                    content: "安装高度在200~270之间",
+                    showCancel: false,
+                });
+                return;
+            }
+
             let deviceBandingParams = {
                 clientId: this.clientId,
                 userId: uni.getStorageSync("userId"),

+ 1 - 1
src/pagesA/homeDetail/homeDetail.vue

@@ -54,7 +54,7 @@ export default {
                 },
                 {
                     devId: 11,
-                    clientId: "111111",
+                    clientId: "222222",
                     tenantId: 1111,
                     tenantName: "设备租户",
                     userId: 1111,

+ 15 - 3
src/pagesA/linkShare/linkShare.vue

@@ -72,7 +72,7 @@
         <button class="btn1" open-type="share" v-if="shareFlag">
             确认分享
         </button>
-        <button class="btn1" v-else>暂不可分享</button>
+        <button class="btn1" v-else @click="unShare()">暂不可分享</button>
     </view>
 </template>
 <script>
@@ -85,6 +85,7 @@ export default {
             serviceNumberFlag: true,
             voipFlag: true,
             shareFlag: false,
+            shareId: "",
         };
     },
     methods: {
@@ -108,7 +109,9 @@ export default {
                     "/pagesA/sharePages/sharePages?phone=" +
                     this.phone +
                     "&devInfo=" +
-                    JSON.stringify(this.devInfo),
+                    JSON.stringify(this.devInfo) +
+                    "&shareId=" +
+                    shareId,
             };
         },
         shareUserLink(itemTitle) {
@@ -129,14 +132,16 @@ export default {
                     },
                 })
                 .then((res) => {
-                    if (res.statusCode == 200) {
+                    if (res.data.code == 200) {
                         uni.showToast({
                             title: itemTitle,
                             icon: "none",
                             duration: 1500,
                         });
                         this.shareFlag = true;
+                        this.shareId = res.data.data.shareId;
                     } else {
+                        this.shareFlag = false;
                         uni.showToast({
                             title: res.data.message,
                             icon: "none",
@@ -145,6 +150,13 @@ export default {
                     }
                 });
         },
+        unShare() {
+            uni.showToast({
+                title: "当前用户暂不可分享",
+                icon: "none",
+                duration: 1500,
+            });
+        },
     },
     onLoad(options) {
         this.devInfo = JSON.parse(options.devInfo);

+ 2 - 0
src/pagesA/loginNew/loginNew.vue

@@ -115,6 +115,8 @@ export default {
                         });
                     }
                 });
+
+            this.checked = false;
         },
     },
     onLoad() {},

+ 4 - 0
src/pagesA/sharePages/sharePages.vue

@@ -66,6 +66,7 @@ export default {
             serviceNumberFlag: true,
             voipFlag: true,
             userId: uni.getStorageSync("userId"),
+            shareId: "",
         };
     },
     methods: {
@@ -93,6 +94,7 @@ export default {
                 sharedUserId: uni.getStorageSync("userId"),
                 state: 1,
                 sharedPhone: this.sharePhone,
+                shareId: this.shareId,
             };
             console.log(shareConfirmParam, "shareConfirmParam");
             this.$http
@@ -126,6 +128,7 @@ export default {
                 sharedUserId: uni.getStorageSync("userId"),
                 state: 2,
                 sharedPhone: this.sharePhone,
+                shareId: this.shareId,
             };
             this.$http
                 .post("wap/share/Confirm", shareConfirmParam, {
@@ -156,6 +159,7 @@ export default {
     onLoad(options) {
         this.devInfo = JSON.parse(options.devInfo);
         this.sharePhone = options.phone;
+        this.shareId = options.shareId;
     },
     onShow() {
         let userId = uni.getStorageSync("userId");