Browse Source

fx:拼团修改

qianxinyu 3 months ago
parent
commit
0fa16352d6
2 changed files with 21 additions and 16 deletions
  1. 9 13
      components/FollowPopup/FollowPopup.vue
  2. 12 3
      pages/services/index.vue

+ 9 - 13
components/FollowPopup/FollowPopup.vue

@@ -2,11 +2,16 @@
   <view class="add_follow">
     <view class="close_area"><button class="close_btn" @click="closePopup">关闭</button></view>
     <view class="info_alter">
-      <text v-show="userInfo.follow_linkurl">{{ clickTitle }}</text>
-      <text v-show="!userInfo.follow_linkurl">{{ longTapTitle }}</text>
+      <text v-show="follow_linkurl">{{ clickTitle }}</text>
+      <text v-show="!follow_linkurl">{{ longTapTitle }}</text>
     </view>
-    <view class="qr_code_area" @click="followLinkurl">
-      <image :src="userInfo.followQrcode" class="qr_code" mode="" show-menu-by-longpress> </image>
+    <view v-if="!picUrl" class="qr_code_area" @click="followLinkurl">
+      <image :src="followQrcode" class="qr_code" mode="" show-menu-by-longpress> </image>
+    </view>
+    <view v-if="picUrl">
+      <view class="qr_code_area" @click="followLinkurl">
+        <image :src="picUrl" class="qr_code" mode="" show-menu-by-longpress> </image>
+      </view>
     </view>
   </view>
 </template>
@@ -36,15 +41,6 @@ export default {
       default: "",
     },
   },
-  onLoad() {
-    // 判断数据
-    this.$http.request("api/custom/get_info").then((callback) => {
-      if (callback.code == "success") {
-        // 赋值
-        this.userInfo = callback.data;
-      }
-    });
-  },
   data() {
     return {
       follow_linkurl: this.$checkAccess.getFollowLinkUrl(),

+ 12 - 3
pages/services/index.vue

@@ -1,11 +1,11 @@
 <template>
   <view class="add_follow" catchtouchmove="true">
     <view class="info_alter">
-      <text v-show="follow_linkurl">点击二维码添加客服</text>
-      <text v-show="!follow_linkurl">长按二维码添加客服</text>
+      <text v-show="userInfo.follow_linkurl">点击二维码添加客服</text>
+      <text v-show="!userInfo.follow_linkurl">长按二维码添加客服</text>
     </view>
     <view class="qr_code_area">
-      <image :src="followQrcode" class="qr_code" mode="" show-menu-by-longpress> </image>
+      <image :src="userInfo.followQrcode" class="qr_code" mode="" show-menu-by-longpress> </image>
     </view>
     <!-- <view class="rule_info">
       <view class="">报单规则:</view>
@@ -18,6 +18,15 @@
 
 <script>
 export default {
+  onLoad() {
+    // 判断数据
+    this.$http.request("api/custom/get_info").then((callback) => {
+      if (callback.code == "success") {
+        // 赋值
+        this.userInfo = callback.data;
+      }
+    });
+  },
   data() {
     return {
       follow_linkurl: this.$checkAccess.getFollowLinkUrl(),