diff --git a/components/shopList/index.vue b/components/shopList/index.vue
index f067220..99807e0 100644
--- a/components/shopList/index.vue
+++ b/components/shopList/index.vue
@@ -1,6 +1,6 @@
-
+
-
+
-
-
+
+
-
+
@@ -114,7 +112,7 @@
padding-bottom: 60rpx;
transform: translate3d(0, 100%, 0);
transition: all .3s cubic-bezier(.25, .5, .5, .9);
- }
+ }
.store_content.on {
transform: translate3d(0, 0, 0);
}
@@ -138,7 +136,7 @@
}
.store_content .store-list .mer_logo{
width: 60rpx;
- height: 60rpx;
+ height: 60rpx;
margin-right: 20rpx;
}
form {
diff --git a/pages.json b/pages.json
index 732621d..9530e27 100644
--- a/pages.json
+++ b/pages.json
@@ -685,6 +685,12 @@
"navigationBarTitleText": "申请退款"
}
},
+ {
+ "path": "business/login",
+ "style": {
+ "navigationBarTitleText": "登录"
+ }
+ },
{
"path": "business/index",
"style": {
@@ -1326,6 +1332,7 @@
}
]
},
+
{
"root": "pages/agent",
"name": "agent",
@@ -1393,9 +1400,6 @@
"navigationBarTitleText": "立即进货"
}
}
-
-
-
]
},
{
diff --git a/pages/admin/business/index.vue b/pages/admin/business/index.vue
index 248662f..62533a8 100644
--- a/pages/admin/business/index.vue
+++ b/pages/admin/business/index.vue
@@ -1,42 +1,24 @@
-
-
-
-
-
- 账号密码
-
-
-
-
-
-
-
-
- 登录
-
-
-
+
+
+
@@ -53,7 +35,6 @@ import shopList from '@/components/shopList';
import {promoteQrCodes,onlinePaymentQrCodes} from "@/api/service";
import { getSiteQrCode } from '@/api/exchange.js';
import {mapGetters} from "vuex";
-import {storeLogin} from "@/api/store";
export default {
name: 'business',
@@ -173,6 +154,13 @@ export default {
},
onLoad: function(options) {
this.is_sys = options.is_sys;
+ // 商户或者酒道馆是否登录 未登录进入登录页面
+ if(this.is_sys != 1 && !this.shopIsLogin){
+ uni.navigateTo({
+ url: '/pages/admin/business/login?is_sys=' + this.is_sys
+ })
+ return false;
+ }
// 设置页面标题
uni.setNavigationBarTitle({
title: this.is_sys == 1 ? '平台管理' : (this.is_sys == 2 ? '酒道馆管理' : '商家管理')
@@ -218,9 +206,22 @@ export default {
});
}
},
- getService: function(data) {
+ getService(data) {
+ // 判断:是否存在有效 员工列表
+ if(Object.values(data).length <= 0){
+ uni.showModal({
+ title: '禁止访问',
+ content: '无有效管理员信息!',
+ success: function success(res) {
+ uni.switchTab({
+ url: '/pages/user/index',
+ });
+ }
+ });
+ return false;
+ }
+ // 处理信息
this.storeList = this.$refs.shopList.storeList || {};
-
this.service = data;
if(data && data.merchant){
uni.setNavigationBarTitle({
@@ -300,33 +301,6 @@ export default {
closeQrCode(){
this.$refs.qrCodePopup.close();
},
- // 商户登录 - 提交登录信息
- clickLogin(){
- let _this = this;
- let params = _this.loginInfo || {};
- uni.showLoading({title: '登录中...', mask: true})
- storeLogin(params).then(res => {
- if (res.status == 200) {
- let data = res.data || {};
- // console.log("商户登录成功")
- // console.log(data)
- _this.$store.commit("SHOP_LOGIN", {
- 'token': data.token,
- 'time': data.exp,
- 'shop_mer_id': data.mer_id,
- });
- this.getStoreList({is_sys: this.is_sys, appoint_mer_id: data.mer_id || ''});
- }
- uni.hideLoading();
- }).catch(err => {
- uni.hideLoading();
- this.$util.Tips({ title: err });
- });
- }
-
-
-
-
}
}
@@ -336,7 +310,6 @@ export default {
width: 100vw !important;
min-height: 100vh !important;
background: linear-gradient(180deg, #2291F8 0%, rgba(34, 145, 248, 0) 100%);
-
}
.businessIcon {
color: #2291F8;
@@ -440,50 +413,4 @@ export default {
border-radius: 50rpx;
}
}
-// 登录
-.login-content{
- .login-form{
- background: #F6f6f6;
- padding: 40% 30rpx 0 30rpx;
- min-height: 100vh;
- width: 100vw;
- .title{
- font-size: 36rpx;
- height: 80rpx;
- line-height: 60rpx;
- font-weight: bold;
- }
- .login-item{
- width: 100%;
- display: inline-flex;
- flex-direction: row;
- flex-wrap: nowrap;
- justify-content: flex-start;
- align-items: center;
- height: 80rpx;
- border-top: 2rpx solid #f3f3f3;
- border-bottom: 2rpx solid #f3f3f3;
- .item-icon{
- font-size: 40rpx;
- width: 70rpx;
- }
- .item-input{
- width: calc(100% - 80rpx);
- padding-left: 15rpx;
- }
- }
- .login-btn{
- width: 90%;
- background: #8e1318;
- color: #f4dede;
- height: 80rpx;
- font-size: 35rpx;
- line-height: 80rpx;
- text-align: center;
- border-radius: 100rpx;
- margin: 130rpx auto 0 auto;
- }
- }
-}
-
diff --git a/pages/admin/business/login.vue b/pages/admin/business/login.vue
new file mode 100644
index 0000000..87e052a
--- /dev/null
+++ b/pages/admin/business/login.vue
@@ -0,0 +1,360 @@
+
+
+
+
+
+
+
+ 请选择管理的{{ is_sys == 2 ? '酒道馆' : '商家' }}
+
+
+
+
+
+
+
+
+ {{ item.mer_name || '' }}
+
+
+ 登录
+
+
+
+
+ 新账号登录
+
+
+
+
+
+
+
+
+
+ 立即登录!
+
+
+
+
+
+
+
+
+
+ 登录
+ 取消
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/user/index.vue b/pages/user/index.vue
index d73e724..5e1ba22 100644
--- a/pages/user/index.vue
+++ b/pages/user/index.vue
@@ -520,15 +520,22 @@
toService(is_sys){
// 判断:如果为0 || 2 清除商户登录状态
if(is_sys == 0 || is_sys == 2){
+ // 商户 || 酒道馆 直接进入登录页面
this.$store.commit("SHOP_LOGIN", {
'token': null,
'time': null,
'shop_mer_id': null,
});
+ uni.navigateTo({
+ url: '/pages/admin/business/login?is_sys=' + is_sys
+ })
+ }else{
+ // 系统管理 直接进入管理 无需登录
+ uni.navigateTo({
+ url: '/pages/admin/business/index?is_sys=' + is_sys
+ })
}
- uni.navigateTo({
- url: '/pages/admin/business/index?is_sys=' + is_sys
- })
+
},
getVersion() {
getVersion().then(data => {
@@ -775,7 +782,7 @@
let len = Object.keys(this.identityCurrent).length || 0;
// 根据数据进行对应的操作
if(len <= 0 && (type != 'county' || (type == 'county' && !this.userInfo.service && !this.userInfo.shopMerService))) return false;
- else if(len == 1 || type == 'headquarters') this.goToAgentCenter(this.identityCurrent[0]);
+ else if((len == 1 || type == 'headquarters') && type != 'county') this.goToAgentCenter(this.identityCurrent[0]);
else this.$refs.agentIdentitySelect.open('bottom');
},
// 运营中心 - 关闭弹框