diff --git a/config/app.js b/config/app.js index 6a45260..e76d97b 100644 --- a/config/app.js +++ b/config/app.js @@ -6,13 +6,13 @@ let VUE_APP_WS_URL = `ws://${location.hostname}?type=user` let openPlantGrass = '-openPlantGrass-' // 网络接口修改此字符 小程序域名要求https -// let httpApi = 'https://bt.test.cdlfjy.com/' // 开发 -let httpApi = 'https://mp.scwmbh.cn/' // 生产 +let httpApi = 'https://bt.test.cdlfjy.com/' // 开发 +// let httpApi = 'https://mp.scwmbh.cn/' // 生产 // 聊天接口修改此字符 小程序聊天要求wss 例如: -// let wsApi = 'wss://bt.test.cdlfjy.com' -let wsApi = 'wss://mp.scwmbh.cn' +let wsApi = 'wss://bt.test.cdlfjy.com' +// let wsApi = 'wss://mp.scwmbh.cn' module.exports = { diff --git a/pages/admin/business/index.vue b/pages/admin/business/index.vue index 960b000..c05f951 100644 --- a/pages/admin/business/index.vue +++ b/pages/admin/business/index.vue @@ -44,6 +44,7 @@ export default { }, data() { return { + pageTitle: '', is_sys: '', downStatus: false, service: null, @@ -72,7 +73,7 @@ export default { }); } if(this.service.is_verify){ - if(merchantInfo.merchant_type == 1){ + if(merchantInfo.merchant_type == 1 || merchantInfo.merchant_type == 3){ // 酒道馆核销用户优惠券 list.push({ title: '提货券核销', @@ -133,14 +134,14 @@ export default { }); } if(this.service.product_exchange){ - if(merchantInfo.merchant_type == 1){ + if(merchantInfo.merchant_type == 1 || merchantInfo.merchant_type == 3){ // 酒道馆核销用户优惠券 - list.push({ - type: 'exchange_qr_code', - title: '特色酒兑换', - url: '', - icon: 'iconfont icon-erweima1' - }); + // list.push({ + // type: 'exchange_qr_code', + // title: '特色酒兑换', + // url: '', + // icon: 'iconfont icon-erweima1' + // }); }else{ // 普通商户核销用户订单 list.push({ @@ -173,8 +174,15 @@ export default { return false; } // 设置页面标题 + this.pageTitle = '门店商家管理'; + if(this.is_sys == 1) this.pageTitle = '平台管理'; + if(this.is_sys == 2) this.pageTitle = '酒道馆管理'; + else if(this.is_sys == 3) this.pageTitle = '烟酒店管理'; + + + uni.setNavigationBarTitle({ - title: this.is_sys == 1 ? '平台管理' : (this.is_sys == 2 ? '酒道馆管理' : '联盟商家管理') + title: this.pageTitle }) // 登录后操作 if(this.is_sys == 1 || this.shopIsLogin){ @@ -286,12 +294,13 @@ export default { cancelText: '取消', // 取消按钮文字 confirmText: '确定', // 确认按钮文字 success: (res) => { + // 商户类别(merchant_type):0=普通商户,1=酒道馆,2=供应商,3=烟酒店 if (res.confirm && Number(res.content) > 0) { let inputValue = Number(res.content); let params = { mer_id: this.service.mer_id, total_money: inputValue, - quota_type: merchantInfo.merchant_type == 1 ? 1 : 2, + quota_type: (merchantInfo.merchant_type == 1 || merchantInfo.merchant_type == 3) ? 1 : 2, }; getSiteQrCode(params).then(res => { if (res.status == 200) { diff --git a/pages/admin/business/login.vue b/pages/admin/business/login.vue index 32adbe7..6a3cca9 100644 --- a/pages/admin/business/login.vue +++ b/pages/admin/business/login.vue @@ -5,7 +5,7 @@ - 请选择管理的{{ is_sys == 2 ? '酒道馆' : '商家' }} + 请选择管理的{{ pageTitle }} @@ -65,6 +65,7 @@ export default { data() { return { is_sys: '', + pageTitle: '', // 已登录列表 list_bg: '', loginHistory: {}, @@ -92,8 +93,12 @@ export default { // }) // } // 设置页面标题 + this.pageTitle = '商家'; + if(this.is_sys == 2) this.pageTitle = '酒道馆'; + else if(this.is_sys == 3) this.pageTitle = '烟酒店'; + uni.setNavigationBarTitle({ - title: this.is_sys == 2 ? '酒道馆登录' : '商家登录' + title: this.pageTitle + '登录' }) // 未登录 初始化 this.init(); @@ -116,9 +121,12 @@ export default { methods: { // 初始化 init(){ - // 商户类别:0=普通商户,1=酒道馆,2=供应商 - // is_sys:0=商户管理,1=平台管理,2=酒道馆管理 - let merchantType = this.is_sys == 0 ? '0' : '1'; + // 商户类别:0=普通商户,1=酒道馆,2=供应商,3=烟酒店 + // is_sys:0=商户管理,1=平台管理,2=酒道馆管理,3=烟酒店管理 + let merchantType = '0'; + if(this.is_sys == 2) merchantType = '1'; + else if(this.is_sys == 3) merchantType = '3'; + let loginHistory = this.$Cache.get('MER_LOGIN_HISTORY_' + merchantType) || {}; if(typeof loginHistory === 'string') loginHistory = JSON.parse(loginHistory) || {}; this.loginHistory = Object.assign({}, loginHistory); diff --git a/pages/user/index.vue b/pages/user/index.vue index 9e96e62..0e0b812 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -267,9 +267,9 @@ @@ -519,7 +525,7 @@ }, toService(is_sys){ // 判断:如果为0 || 2 清除商户登录状态 - if(is_sys == 0 || is_sys == 2){ + if(is_sys == 0 || is_sys == 2 || is_sys == 3){ // 商户 || 酒道馆 直接进入登录页面 this.$store.commit("SHOP_LOGIN", { 'token': null,