Selaa lähdekoodia

供货商接口

fuwei 5 vuotta sitten
vanhempi
commit
65e427dc6e
3 muutettua tiedostoa jossa 43 lisäystä ja 15 poistoa
  1. 9 7
      ghs/src/App.vue
  2. 5 1
      ghs/src/api/official/index.js
  3. 29 7
      ghs/src/pagesClient/official/latest-shop.vue

+ 9 - 7
ghs/src/App.vue

@@ -37,13 +37,15 @@
 							// });
 						//花店员工
 						} else if(res.data.admin.identity == '1'){
-							this.$util.pageTo({
-								url: "/pagesClient/official/latest-shop",
-								type: 2,
-								query:{
-									...this.option	
-								}
-							});
+							if(redirectPage !== 'admin/billing/customerPlace') {
+								this.$util.pageTo({
+									url: "/pagesClient/official/latest-shop",
+									type: 2,
+									query:{
+										...this.option	
+									}
+								});
+							}
 						//未知身份
 						}else{
 							if(this.option.style != 1){

+ 5 - 1
ghs/src/api/official/index.js

@@ -60,4 +60,8 @@ export const getAuthUrl = data => {
  */
 export const getIntroduce = data => {
 	return https.get('/merchant/introduce-shop', data)
-}
+}
+
+export const recentShop = data => {
+	return https.get('/admin/recent-shop', data)
+}

+ 29 - 7
ghs/src/pagesClient/official/latest-shop.vue

@@ -4,12 +4,25 @@
           您访问过的供货商
       </view>
       <view class="shop-list_box">
-          <view>
+          <template v-if="!$util.isEmpty(list)">
+          <view 
+            :key="item.shopId"
+            @click="pageTo({
+              url: '/admin/billing/customerPlace',
+              query: {
+                shopId: item.shopId,
+              }
+            })"
+            v-for="item in list">
             <app-avatar-module src="https://goss.cfp.cn/creative/vcg/800/new/VCG41N1210205351.jpg" :width="120" />
             <view class="tit">
-              宣言花行
+              {{item.shopName}}
             </view>
           </view>
+          </template>
+          <div v-else>
+            暂无数据
+          </div>
       </view>
       <view class="app-footer">
           <view class="des">
@@ -20,9 +33,7 @@
 </template>
 
 <script>
-// import AppSwiper from "@/components/app-swiper";
-// import AppImg from "@/components/app-img";
-// import { applyStatus } from "@/api/official";
+import { recentShop } from "@/api/official";
 import { share } from "@/mixins";
 import AppAvatarModule from "@/components/module/app-avatar";
 export default {
@@ -31,14 +42,25 @@ export default {
   mixins: [share],
   data() {
     return {
-      
+      list:[]
     };
   },
   onLoad() {
     
   },
   methods: {
-    
+     async init(){
+        try {
+          const { data } = await recentShop({})
+          this.list = data
+        } catch(e){
+
+        }
+          
+      },
+      getGhsList(){
+
+      }
   }
 };
 </script>