shish 4 anni fa
parent
commit
00a3cdc0f4
2 ha cambiato i file con 25 aggiunte e 4 eliminazioni
  1. 5 0
      mallApp/src/api/shop/index.js
  2. 20 4
      mallApp/src/pages/login/result.vue

+ 5 - 0
mallApp/src/api/shop/index.js

@@ -1,4 +1,9 @@
 import https from '@/plugins/luch-request_0.0.7/request'
+
+export const getInfo = data => {
+	return https.get('/shop/info', data)
+}
+
 /** *
  * 门店列表 b
  */

+ 20 - 4
mallApp/src/pages/login/result.vue

@@ -4,10 +4,10 @@
       <view class="callback-blo">
         <view style="margin-bottom:50upx;">点击按钮打开二维码,识别添加店长微信</view>
         
-        <button class="button-com red" style="width:220upx;" @click="nextFn">打开二维码</button>
+        <button class="button-com red" style="width:220upx;" @click="openSuperWx">打开二维码</button>
 
-        <view style="margin-top:50upx;">
-          <button class="button-com default" style="width:220upx;" @click="nextFn">返回</button>
+        <view style="margin-top:50upx;" v-if="Number(account)>0">
+          <button class="button-com default" style="width:220upx;" @click="lookMall">逛逛商城</button>
         </view>
 
       </view>
@@ -15,17 +15,33 @@
   </view>
 </template>
 <script>
+import { getInfo } from "@/api/shop"
 export default {
   name: "result",
   components: {},
   data() {
     return {
       constant: this.$constant,
+      superWx:'',
+      account:0
     }
   },
   methods: {
+    openSuperWx(){
+			uni.previewImage({ urls: [this.superWx] })
+    },
+    lookMall(){
+      this.$util.pageTo({ url: "/pages/home/index?account="+this.account, type: 2})
+    },
     init() {
-
+        getInfo().then(res=>{
+          if(res.code == 1){
+            if(res.data.info.superWx && !this.$util.isEmpty(res.data.info.superWx)){
+              this.superWx = res.data.info.superWx
+              this.account = res.data.info.id
+            }
+          }
+        })
     }
   }
 };