|
|
@@ -1,4 +1,26 @@
|
|
|
<template>
|
|
|
+<view>
|
|
|
+ <block v-if="loginStyle == 0">
|
|
|
+
|
|
|
+ <view style="width:100vw;height:400upx;display:flex;align-items:center;justify-content:center;position:relative;">
|
|
|
+ <view style="position:absolute;top:60upx;font-size:35upx;">
|
|
|
+ <text style="color:#333333;margin-left:8upx;font-weight:bold;">花店买花点这里</text>
|
|
|
+ </view>
|
|
|
+ <button class="admin-button-com big blue" style="width:260upx;" @click="buyItem()">去买花</button>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view style="width:100vw;height:400upx;display:flex;align-items:center;justify-content:center;position:relative;">
|
|
|
+ <view style="position:absolute;top:60upx;font-size:35upx;">
|
|
|
+ <text style="color:#333333;margin-left:8upx;font-weight:bold;">批发店点这里</text>
|
|
|
+ </view>
|
|
|
+ <button class="admin-button-com big blue" style="width:260upx;" @click="pageTo({url:'/admin/home/login'})">去登录</button>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ </block>
|
|
|
+
|
|
|
+ <block v-else>
|
|
|
+
|
|
|
+
|
|
|
<view class="app-main app-content">
|
|
|
|
|
|
<template v-if="(loginInfo.staff && loginInfo.staff.super && loginInfo.staff.super == 1) || (loginInfo.staff && loginInfo.staff.lookStat && loginInfo.staff.lookStat ==1)">
|
|
|
@@ -115,14 +137,15 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
- <NotLogin></NotLogin>
|
|
|
-
|
|
|
</view>
|
|
|
+ </block>
|
|
|
+
|
|
|
+
|
|
|
+</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { mapGetters,mapActions } from "vuex";
|
|
|
-import NotLogin from "@/components/not-login";
|
|
|
import { getShopInfo } from "@/utils/auth";
|
|
|
import { consoleIndex } from "@/api/workbench";
|
|
|
import { closeBook } from "@/api/book";
|
|
|
@@ -130,9 +153,10 @@ import productMins from "@/mixins/product";
|
|
|
import { allProduct } from '@/api/product'
|
|
|
import { getStat,getStrokeCount } from '@/api/console'
|
|
|
import autoUpdateMixins from "@/mixins/autoUpdate";
|
|
|
+import { getWeixinId } from "@/api/invite/index";
|
|
|
export default {
|
|
|
name: "admin-workbench",
|
|
|
- components: { NotLogin },
|
|
|
+ components: { },
|
|
|
mixins: [productMins,autoUpdateMixins],
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -167,7 +191,9 @@ export default {
|
|
|
todayDebt:0,
|
|
|
totalDebt:0,
|
|
|
countStat:{systemIncome:0,systemCount:0,debtCount:0,debtIncome:0,kfWxCount:0,kfWxIncome:0},
|
|
|
- overview:[]
|
|
|
+ overview:[],
|
|
|
+ //登录状态 0未登录 1登录
|
|
|
+ loginStyle :0
|
|
|
};
|
|
|
},
|
|
|
onShareAppMessage(res) {
|
|
|
@@ -181,6 +207,13 @@ export default {
|
|
|
...mapGetters({ loginInfo: "getLoginInfo" }),
|
|
|
...mapGetters({ myShopInfo: "getMyShopInfo" }),
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ loginInfo(newVal) {
|
|
|
+ if(!this.$util.isEmpty(newVal.admin) && newVal.admin.currentGhsShopId > 0){
|
|
|
+ this.loginStyle = 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
onLoad(option) {
|
|
|
if(this.$util.isScanEnv()){
|
|
|
this.isScanEnv = true
|
|
|
@@ -192,9 +225,32 @@ export default {
|
|
|
},
|
|
|
onShow() {
|
|
|
this.getShopInfo()
|
|
|
+
|
|
|
+ if(!this.$util.isEmpty(this.loginInfo.admin) && this.loginInfo.admin.currentGhsShopId > 0){
|
|
|
+ this.loginStyle = 1
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['setUserShopAll']),
|
|
|
+ buyItem() {
|
|
|
+ let that = this
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
+ uni.navigateToMiniProgram({
|
|
|
+ //姜枫-2021.04.13
|
|
|
+ appId: that.getappIdList.hd.miniAppId,
|
|
|
+ path: 'admin/home/workbench',
|
|
|
+ //develop 开发版 trial 体验版 release 正式版
|
|
|
+ envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
|
|
|
+ extraData: {},
|
|
|
+ success (res) {
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // #endif
|
|
|
+ // #ifdef APP-PLUS
|
|
|
+ that.$msg("请用微信打开")
|
|
|
+ // #endif
|
|
|
+ },
|
|
|
getShopInfo(){
|
|
|
getShopInfo().then(res => {
|
|
|
if(res.name){
|
|
|
@@ -265,6 +321,10 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+ getWeixinId().then(res => {
|
|
|
+ this.getappIdList = res.data
|
|
|
+ })
|
|
|
+
|
|
|
},
|
|
|
setIndex(){
|
|
|
// #ifdef MP-WEIXIN
|
|
|
@@ -284,25 +344,7 @@ export default {
|
|
|
},
|
|
|
pageToNewOrderList(item) {
|
|
|
this.$util.pageTo({url: "newOrderList?type="+item,type:1})
|
|
|
- },
|
|
|
- getMyMall(){
|
|
|
- console.log('pagesPurchase/ghsProduct?shopId='+ this.loginInfo.shopId+'&id=0&ghsShopAdminId='+this.loginInfo.shopAdminId)
|
|
|
- uni.navigateToMiniProgram({
|
|
|
- //姜枫-2021.04.13
|
|
|
- appId: this.getappIdList.hd.miniAppId,
|
|
|
- path: 'pagesPurchase/ghsProduct?shopId='+ this.loginInfo.shopId+'&id=0&ghsShopAdminId='+this.loginInfo.shopAdminId,
|
|
|
- //develop 开发版 trial 体验版 release 正式版
|
|
|
- envVersion: process.env.NODE_ENV === 'development' ? 'develop' : 'release',
|
|
|
- extraData: {
|
|
|
- 'shopId': this.loginInfo.shopId,
|
|
|
- 'id': 0,
|
|
|
- 'name': '假数据',
|
|
|
- },
|
|
|
- success(res) {
|
|
|
- // 打开成功
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|