wangn %!s(int64=5) %!d(string=hai) anos
pai
achega
bde86160e6

+ 1 - 1
hdApp/src/admin/home/apply.vue

@@ -30,7 +30,7 @@
       </view>
       </view>
     </view>
     </view>
     <kd-entrance></kd-entrance>
     <kd-entrance></kd-entrance>
-    <none-hd :show="AUTHORITY_SHOW" title="您还没有网店哦" btnText="免费申请" @bthClick="toFreeApply_HOME" :authShow="true"></none-hd>
+    <none-hd :show="AUTHORITY_SHOW" :title="MODEL_TITLE" :btnText="MODEL_BTN_TEXT" @bthClick="toFreeApply_HOME" :authShow="true" experienceFun></none-hd>
   </view>
   </view>
 </template>
 </template>
 
 

+ 3 - 0
hdApp/src/admin/home/me.vue

@@ -133,6 +133,7 @@
       @selectSussess="selectSussess"
       @selectSussess="selectSussess"
     ></DorpdownSelect>
     ></DorpdownSelect>
     <kd-entrance></kd-entrance>
     <kd-entrance></kd-entrance>
+    <none-hd :show="AUTHORITY_SHOW" :title="MODEL_TITLE" :btnText="MODEL_BTN_TEXT" @bthClick="toFreeApply_HOME" :authShow="true" experienceFun></none-hd>
   </view>
   </view>
 </template>
 </template>
 
 
@@ -146,6 +147,7 @@ import { selectShop } from "@/mixins";
 import { getUser } from "@/utils/auth";
 import { getUser } from "@/utils/auth";
 import { list } from "@/mixins";
 import { list } from "@/mixins";
 import { mapGetters } from "vuex";
 import { mapGetters } from "vuex";
+import noneHd from "@/components/none-hd";
 export default {
 export default {
   // 我的
   // 我的
   name: "Me",
   name: "Me",
@@ -153,6 +155,7 @@ export default {
     AppAvatarModule,
     AppAvatarModule,
     TuiListCell,
     TuiListCell,
     DorpdownSelect,
     DorpdownSelect,
+    noneHd
   },
   },
   mixins: [selectShop, list],
   mixins: [selectShop, list],
   computed: {
   computed: {

+ 1 - 1
hdApp/src/admin/home/member.vue

@@ -54,7 +54,7 @@
       <app-wrapper-empty :is-empty="$util.isEmpty(list.data)" />
       <app-wrapper-empty :is-empty="$util.isEmpty(list.data)" />
     </block>
     </block>
     <kd-entrance></kd-entrance>
     <kd-entrance></kd-entrance>
-    <none-hd :show="AUTHORITY_SHOW" title="您还没有网店哦" btnText="免费申请" @bthClick="toFreeApply_HOME" :authShow="true"></none-hd>
+    <none-hd :show="AUTHORITY_SHOW" :title="MODEL_TITLE" :btnText="MODEL_BTN_TEXT" @bthClick="toFreeApply_HOME" :authShow="true" experienceFun></none-hd>
   </div>
   </div>
 </template>
 </template>
 
 

+ 1 - 1
hdApp/src/admin/home/order.vue

@@ -154,7 +154,7 @@
       </template>
       </template>
     </modal-module>
     </modal-module>
     <kd-entrance></kd-entrance>
     <kd-entrance></kd-entrance>
-    <none-hd :show="AUTHORITY_SHOW" title="您还没有网店哦" btnText="免费申请" @bthClick="toFreeApply_HOME" :authShow="true"></none-hd>
+    <none-hd :show="AUTHORITY_SHOW" :title="MODEL_TITLE" :btnText="MODEL_BTN_TEXT" @bthClick="toFreeApply_HOME" :authShow="true" experienceFun></none-hd>
   </div>
   </div>
 </template>
 </template>
 
 

+ 41 - 0
hdApp/src/admin/home/result.vue

@@ -0,0 +1,41 @@
+<template>
+<!-- icondaizhifu -->
+	<appResult :title="status == '2' ? '审核中' : '审核通过'" :icon="status == '2' ? 'icondaizhifu' : 'iconchenggong'">
+		<button class="admin-button-com blue big" v-if="status != '2'" @click="loginSys">登录后台</button>
+		<button class="admin-button-com big">开启通知</button>
+	</appResult>
+</template>
+
+<script>
+import appResult from "@/components/app-result";
+export default {
+	name: "BillingResult", // 开单结果
+  data(){
+    return {
+      status: '1'
+    }
+    
+  },
+	components: {
+		appResult
+	},
+  onLoad(option){
+    this.status = option.status
+  },
+	methods: {
+    loginSys(){
+      this.$util.pageTo({
+        url: '/admin/home/workbench',
+        type: 4
+      })
+    }
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.admin-button-com {
+	margin-bottom: 20px;
+	width: 100%;
+}
+</style>

+ 3 - 0
hdApp/src/admin/home/workbench.vue

@@ -129,6 +129,7 @@
         </div>
         </div>
       </template>
       </template>
     </modal-module>
     </modal-module>
+    <none-hd :show="AUTHORITY_SHOW" :title="MODEL_TITLE" :btnText="MODEL_BTN_TEXT" @bthClick="toFreeApply_HOME" :authShow="true" @experienceClick="experienceFun"></none-hd>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -141,12 +142,14 @@ import { getDataTimestamp } from "@/utils/common";
 import { getWeixinId } from "@/api/invite/index";
 import { getWeixinId } from "@/api/invite/index";
 import { getUser } from "@/utils/auth";
 import { getUser } from "@/utils/auth";
 import { consoleIndex } from "@/api/workbench";
 import { consoleIndex } from "@/api/workbench";
+import noneHd from "@/components/none-hd";
 export default {
 export default {
   name: "admin-workbench",
   name: "admin-workbench",
   components: {
   components: {
     ModalModule,
     ModalModule,
     FabModule,
     FabModule,
     AppAvatarModule,
     AppAvatarModule,
+    noneHd
   },
   },
   // mixins:[share],
   // mixins:[share],
   data () {
   data () {

+ 4 - 1
hdApp/src/components/app-result.vue

@@ -63,11 +63,14 @@ export default {
 			font-size: 170px;
 			font-size: 170px;
 			color: $mainColor1;
 			color: $mainColor1;
 		}
 		}
+    .icondaizhifu {
+			font-size: 170px;
+			color: #ffa92e;
+		}
 		.result-title {
 		.result-title {
 			margin: 50px 0 70px;
 			margin: 50px 0 70px;
 			font-size: 32px;
 			font-size: 32px;
 		}
 		}
 	}
 	}
-	
 }
 }
 </style>
 </style>

+ 4 - 1
hdApp/src/components/none-hd.vue

@@ -6,7 +6,7 @@
     ></image>
     ></image>
     <view class="no_data_text">{{title}}</view>
     <view class="no_data_text">{{title}}</view>
     <view class="freeApply" @click="apply">{{btnText}}</view>
     <view class="freeApply" @click="apply">{{btnText}}</view>
-    <view class="experience" v-if="authShow">体验</view>
+    <view class="experience" v-if="authShow" @click="experienceClick">体验</view>
   </view>
   </view>
 </template>
 </template>
 
 
@@ -39,6 +39,9 @@ export default {
     apply() {
     apply() {
       this.$emit('bthClick')
       this.$emit('bthClick')
     },
     },
+    experienceClick(){
+      this.$emit('experienceClick')
+    }
   },
   },
 };
 };
 </script>
 </script>

+ 107 - 17
hdApp/src/mixins/globalMixins.js

@@ -1,6 +1,8 @@
 import { mapGetters,mapActions } from 'vuex'
 import { mapGetters,mapActions } from 'vuex'
 import { pageTo, getCheckLogin, isLogin } from '@/utils/util.js'
 import { pageTo, getCheckLogin, isLogin } from '@/utils/util.js'
 import { getUser, wxLoginFn } from '@/utils/auth'
 import { getUser, wxLoginFn } from '@/utils/auth'
+import { postWxCode, getDictionaries } from '@/api/mini'
+import { getStaffApi } from '@/api/common'
 import constant from '@/constant'
 import constant from '@/constant'
 export default {
 export default {
 	data() {
 	data() {
@@ -14,12 +16,14 @@ export default {
 			// 全局混入,插入全局跳转函数
 			// 全局混入,插入全局跳转函数
       pageTo: pageTo,
       pageTo: pageTo,
       AUTHORITY_SHOW: false,
       AUTHORITY_SHOW: false,
-      shopAdminId: null
+      shopAdminId: null,
+      MODEL_TITLE: '您还没有网店哦',
+      MODEL_BTN_TEXT: '免费申请'
 		}
 		}
 	},
 	},
 	computed: {
 	computed: {
 		...mapGetters({ loginInfo: "getLoginInfo" }),
 		...mapGetters({ loginInfo: "getLoginInfo" }),
-		...mapGetters(["getLoginInfo"])
+    ...mapGetters(["getLoginInfo", 'userInfo'])
 	},
 	},
 	// 页面生命周期才触发
 	// 页面生命周期才触发
   onLoad: function (option) {
   onLoad: function (option) {
@@ -32,8 +36,8 @@ export default {
 			uni.setStorageSync('account', option.account)
 			uni.setStorageSync('account', option.account)
 		}
 		}
     uni.setStorageSync('currentQuery', JSON.stringify(option))
     uni.setStorageSync('currentQuery', JSON.stringify(option))
-    console.log(uni.getStorageSync('SHOPADMINID'),'this.shopAdminId')
-    if (uni.getStorageSync('SHOPADMINID') == '0') {
+    console.log(uni.getStorageSync('SHOP_ADMIN_STROAGE_SHOW'),'this.shopAdminId', this.getLoginInfo)
+    if (uni.getStorageSync('SHOP_ADMIN_STROAGE_SHOW') == '0' || uni.setStorageSync('OPEN_SHOP_ID') == '2') {
       this.AUTHORITY_SHOW = true
       this.AUTHORITY_SHOW = true
     }
     }
     if (this.$util.isEmpty(this.getLoginInfo)) {
     if (this.$util.isEmpty(this.getLoginInfo)) {
@@ -49,12 +53,16 @@ export default {
         })
         })
         if (needRedirect === true) {
         if (needRedirect === true) {
           //客户访问不能查看的页面跳转去官网
           //客户访问不能查看的页面跳转去官网
-          if (res.data.shopAdminId == '0') {
+          console.log('res.data.damin', res.data.admin.openShop)
+          if (res.data.shopAdminId == '0' && res.data.admin.openShop == '1') {
             this.AUTHORITY_SHOW = true;
             this.AUTHORITY_SHOW = true;
-            uni.setStorageSync('SHOPADMINID', res.data.shopAdminId)
-            this.shopAdminId = true;
-          } else {
-            uni.removeStorageSync('SHOPADMINID')
+            uni.setStorageSync('SHOP_ADMIN_STROAGE_SHOW', res.data.shopAdminId)
+          } else if (res.data.admin.openShop == '2' && res.data.shopAdminId == '0') {
+            this.MODEL_TITLE = '已申请'
+            this.MODEL_BTN_TEXT = '查看申请进度'
+            this.AUTHORITY_SHOW = true
+            uni.removeStorageSync('SHOP_ADMIN_STROAGE_SHOW')
+            uni.setStorageSync('OPEN_SHOP_ID', res.data.admin.openShop)
           }
           }
         }
         }
         getUser(true)
         getUser(true)
@@ -77,14 +85,96 @@ export default {
 	methods: {
 	methods: {
     ...mapActions(['setUserShopAll']),
     ...mapActions(['setUserShopAll']),
     toFreeApply_HOME () {
     toFreeApply_HOME () {
-      	this.$util.pageTo({
-      		url: "/pagesClient/official/index",
-      		type: 2,
-      		query: {
-      			...this.option
-      		}
-      	});
-    }
+      let status = ''
+        if (uni.getStorageSync('SHOP_ADMIN_STROAGE_SHOW') == '0') {
+          this.$util.pageTo({
+            url: "/pagesClient/official/index",
+            type: 2,
+            query: {
+              ...this.option
+            }
+          });
+        } else {
+          getStaffApi().then(res => {
+            console.log(res)
+            if (res.data.openShop == '2') {
+              status = '2'
+            } else if (res.data.openShop == '3') {
+              status = '3'
+            }
+            this.$util.pageTo({
+              url: '/admin/home/result',
+              type: 2,
+              query: {
+                status
+              }
+            })
+          }).catch(err => {})
+          // this.$util.pageTo({
+          //   url: '/admin/home/result',
+          //   type: 2,
+          //   query: {
+          //     status: '2'
+          //   }
+          // })
+      }
+    },
+    experienceFun(){
+      /**姜枫 2021.04.30  小程序审核体验账号**/
+      postWxCode().then(subRes => {
+        if (this.$util.isEmpty(subRes)) {
+          return false
+        }
+        uni.setStorageSync('token', subRes.data.token)
+        uni.setStorageSync('shopId', subRes.data.admin.currentShopId)
+        getDictionaries({ token: subRes.data.token }).then(res => {
+          if (this.$util.isEmpty(res)) {
+            return false
+          }
+          this.$store.commit('setDictionariesInfo', {
+            ...res.data.dict,
+            ...res.data
+          })
+          this.$store.commit('setMyShopInfo', {
+            ...res.data.shop,
+            ...res.data
+          })
+        })
+        this.$store.commit('setLoginInfo', {
+          ...subRes.data.admin,
+          ...subRes.data
+        })
+        uni.removeStorageSync('SHOP_ADMIN_STROAGE_SHOW')
+        uni.removeStorageSync('OPEN_SHOP_ID')
+        this.AUTHORITY_SHOW = false
+        //启动更新逻辑 shish 2020.5.18
+        if (subRes.data.update == 1) {
+          const updateManager = wx.getUpdateManager()
+          updateManager.onCheckForUpdate(function (res) {
+            // 请求完新版本信息的回调
+            console.log(res.hasUpdate)
+          })
+          updateManager.onUpdateReady(function () {
+            wx.showModal({
+              title: '更新提示',
+              content: '新版本已经准备好,是否重启应用?',
+              success(res) {
+                if (res.confirm) {
+                  // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+                  updateManager.applyUpdate()
+                }
+              }
+            })
+          })
+          updateManager.onUpdateFailed(function () {})// 新版本下载失败
+          return true;
+        }
+        getUser(true)
+        //获取门店信息
+        this.setUserShopAll();
+        uni.switchTab({url:'/admin/home/workbench'})
+      })
+    },
 	},
 	},
 	mounted() {
 	mounted() {
 		if (this.mInit) {
 		if (this.mInit) {

+ 7 - 0
hdApp/src/pages.json

@@ -7,6 +7,13 @@
 				"enablePullDownRefresh": true
 				"enablePullDownRefresh": true
 			}
 			}
 		},
 		},
+    {
+			"path": "admin/home/result",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": true
+			}
+		},
     {
     {
 			"path": "admin/home/newStudent",
 			"path": "admin/home/newStudent",
 			"style": {
 			"style": {

+ 1 - 1
hdApp/src/pagesClient/official/apply.vue

@@ -237,7 +237,7 @@ export default {
             pagestatus: 3,
             pagestatus: 3,
           },
           },
         });
         });
-      });
+      }).catch(err => {});
     },
     },
     // 选择地址
     // 选择地址
     selRegionFn() {
     selRegionFn() {