diff --git a/src/App.vue b/src/App.vue index 5335f6f..541ee89 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,9 +3,8 @@ import util from './utils/util'; export default { onLaunch: function() { - // #ifndef H5 + // this.$store.commit('setLoginState', { loginState: false }); this.updateManager(); - // #endif }, methods: { isLogin(){ diff --git a/src/js/api.js b/src/js/api.js index 550179d..7762a45 100644 --- a/src/js/api.js +++ b/src/js/api.js @@ -167,5 +167,10 @@ API['party'] = { bindingOpenId: `${ORIGIN}/assistant/bindingOpenId`, //改为小程序端绑定openid } +API['mine'] = { + userCurrent:`${ORIGIN}/user/current`, //获取账户信息, (不要传品牌id) + unbindAssistant:`${ORIGIN}/admin/user/unbindAssistant`, // 解绑退出 +} + export default { ORIGIN, API }; diff --git a/src/js/server.js b/src/js/server.js index c671b75..dc191c7 100644 --- a/src/js/server.js +++ b/src/js/server.js @@ -1,5 +1,6 @@ import util from '../utils/util'; // import { app as vm } from '../main'; +import { app as vm } from '../main'; const islog = true; @@ -27,6 +28,9 @@ export class Server { method: method, data: res, }) + + handleUserExceptions({ res }); + if(isDefaultGet){ if(failMsg == '')throw Error('默认回调,失败提示不能为空 key -> failMsg'); defaultGet({ @@ -70,6 +74,14 @@ export class Server { reject({url,res,data}); } } + // 用户信息异常 + function handleUserExceptions({ res }){ + if(res?.data?.code === 401&&res?.data?.message?.indexOf('用户') !== -1){ + console.log('用户信息异常,请重新登录'); + const _store = vm.$store; + _store.commit('setLoginState', { loginState: false }); + } + } } get({url,data={},header={},isDefaultGet=true,failMsg=''}){ return this.request(url,data,'GET',header,isDefaultGet,failMsg); diff --git a/src/main.js b/src/main.js index 38f2407..049f478 100644 --- a/src/main.js +++ b/src/main.js @@ -6,8 +6,9 @@ Vue.config.productionTip = false App.mpType = 'app' -const app = new Vue({ +export const app = new Vue({ ...App, store }) app.$mount() + diff --git a/src/manifest.json b/src/manifest.json index d409cc9..7ac6737 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -76,7 +76,9 @@ "appid" : "wx7106e84614cf0060", "setting" : { "urlCheck" : false, - "minified" : true + "minified" : true, + "ignoreDevUnusedFiles": false, + "ignoreUploadUnusedFiles": false }, "usingComponents" : true, "optimization": { diff --git a/src/pages.json b/src/pages.json index 005c6e3..123a016 100644 --- a/src/pages.json +++ b/src/pages.json @@ -1,12 +1,47 @@ { "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages - { "path": "pages/index/index", "style": { + "componentPlaceholder": { + "bottom-logo": "view", + "authorization-login": "view" + } } }, { + "path": "pages/menu/second", + "style": { + "navigationBarTitleText": "推广营销", + "componentPlaceholder": { + "bottom-logo": "view" + } + } + }, + { + "path": "pages/menu/third", + "style": { + "navigationBarTitleText": "商家服务", + "componentPlaceholder": { + "bottom-logo": "view" + } + } + }, + { + "path": "pages/menu/forth", + "style": { + "navigationBarTitleText": "个人中心", + "componentPlaceholder": { + "mine-header": "view", + "bottom-logo": "view", + "line-tab": "view", + "authorization-login": "view", + "authorization-user": "view" + } + } + }, + + { "path": "pages/login/login", "style": { "navigationBarTitleText": "登录" @@ -896,6 +931,72 @@ } ] }, + + { + "root": "subpackage/message", + "pages": [ + { + "path": "pages/complaint/edit", + "style" : { + "navigationBarTitleText": "投诉建议" + } + }, + { + "path": "pages/complaint/list", + "style" : { + "enablePullDownRefresh" : true, + "navigationBarTitleText": "投诉建议" + } + }, + { + "path": "pages/complaint/detail", + "style" : { + "navigationBarTitleText": "投诉详情" + } + }, + { + "path": "pages/work_order/list", + "style" : { + "enablePullDownRefresh" : true, + "navigationBarTitleText": "工单列表" + } + }, + { + "path": "pages/work_order/detail", + "style" : { + "navigationBarTitleText": "工单详情" + } + }, + { + "path": "pages/work_order/edit", + "style" : { + "navigationBarTitleText": "提交工单" + } + } + ] + }, + { + "root": "subpackage/menu", + "pages": [ + { + "path": "pages/index", + "style" : { + "navigationBarTitleText": "" + } + } + ] + }, + { + "root": "subpackage/authorization", + "pages": [ + { + "path": "pages/index", + "style" : { + "navigationBarTitleText": "" + } + } + ] + }, { "root": "subpackage/mall", "pages": [ @@ -919,5 +1020,36 @@ "navigationBarTitleText": "欧轩智能商家助手", "navigationBarBackgroundColor": "#009874", "backgroundColor": "#f2f2f7" + }, + "tabBar": { + "color": "#B2B2B2", + "selectedColor": "#009874", + "backgroundColor": "#FFFFFF", + "list": [ + { + "pagePath": "pages/index/index", + "text": "工作台", + "iconPath": "static/images/tab/tab_1.png", + "selectedIconPath": "static/images/tab/ta_1.png" + }, + { + "pagePath": "pages/menu/second", + "text": "推广营销", + "iconPath": "static/images/tab/tab_2.png", + "selectedIconPath": "static/images/tab/ta_2.png" + }, + { + "pagePath": "pages/menu/third", + "text": "商家服务", + "iconPath": "static/images/tab/tab_3.png", + "selectedIconPath": "static/images/tab/ta_3.png" + }, + { + "pagePath": "pages/menu/forth", + "text": "我的", + "iconPath": "static/images/tab/tab_4.png", + "selectedIconPath": "static/images/tab/ta_4.png" + } + ] } } diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index f2cdedc..5cb8a2f 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -2,22 +2,22 @@ - + {{indexData.brand_name || '-'}}(共{{indexData.stadium_num || '0'}}家) 点击登陆 今日总收入 - {{loginStatus?'¥':''}}{{loginStatus?(indexData.amount || '0'):'***'}} + {{loginState?'¥':''}}{{loginState?(indexData.amount || '0'):'***'}} 收款笔数 - {{loginStatus?(indexData.in_count || '0'):'**'}} + {{loginState?(indexData.in_count || '0'):'**'}} 退款笔数 - {{loginStatus?(indexData.out_count || '0'):'**'}} + {{loginState?(indexData.out_count || '0'):'**'}} @@ -37,7 +37,8 @@ - + + {{e.name}} @@ -49,33 +50,12 @@ party/pages/login/login --> - - - 微信授权 - 您的信息和数据将受到保护 - - - + + - - - - - + - + 核销 @@ -88,6 +68,19 @@ import util from '../../utils/util'; import { servers } from '../../js/server'; import { API } from '../../js/api'; + import { mapGetters } from 'vuex'; + import bottomLogo from "@/subpackage/menu/components/bottom_logo.vue"; + import authorizationLogin from "@/subpackage/authorization/components/login.vue"; + /** + * tid1807 + * 1、去掉"核销查询“菜单(已有悬浮按钮) * + * 2、去掉“收款记录”(在收入统计页面已有入口进入收款记录) * + * 3、去掉“进场人数异常”(该入口计划放入新改版的“核销查询”页面) * + * 4、原“系统工具”文案改为“小程序管理”;原“钱包提现”文案改为“钱包&提现”: 原“设备管理”文案改为“智能设备”; * + * 5、增加底部 (工作台、推广营销、商家服务、我的) * + * 6、增加“工单”功能 + * + * */ const tabList = [ { id: 0, @@ -96,16 +89,10 @@ serverKey: 1001 // 后端对应权限编号 }, { - id: 1, - name: '收款记录', - path: '/subpackage/income/pages/details_record/details_record', - serverKey: 1002 // 后端对应权限编号 - }, - { - id: 2, - name: '订单管理', - path: '/subpackage/order/pages/order_manage/order_manage', - serverKey: 1012 // 后端对应权限编号 + id: 11, + name: '钱包&提现', + path: '/subpackage/wallet/pages/index/index', + serverKey: 1017 // 后端对应权限编号 1017 }, { id: 3, @@ -114,10 +101,10 @@ serverKey: 1007 // 后端对应权限编号 }, { - id: 4, - name: '核销查询', - path: '/subpackage/verification/pages/index', - serverKey: 1008 // 后端对应权限编号 + id: 2, + name: '订单管理', + path: '/subpackage/order/pages/order_manage/order_manage', + serverKey: 1012 // 后端对应权限编号 }, { id: 5, @@ -127,23 +114,11 @@ serverKey: 1009 // 后端对应权限编号 }, { - id: 6, - name: '设备管理', - path: '/subpackage/device/pages/index/index', - serverKey: 1010 // 后端对应权限编号 - }, - { id: 7, name: '商品零售', path: '/subpackage/retail/pages/index/index', serverKey: 1011 // 后端对应权限编号 }, - // { - // id: 8, - // name: '课程管理', - // path: '/subpackage/course/pages/index/index', - // serverKey: 1013 // 后端对应权限编号 1013 - // }, { id: 9, name: '储值卡管理', @@ -151,79 +126,85 @@ serverKey: 1014 // 后端对应权限编号 1014 }, { - id: 10, - name: '进场人数异常', - path: '/subpackage/blacklist/pages/abnormal_list/abnormal_list', - serverKey: 1015 // 后端对应权限编号 1015 - }, - { - id: 11, - name: '钱包提现', - path: '/subpackage/wallet/pages/index/index', - serverKey: 1017 // 后端对应权限编号 1017 + id: 6, + name: '智能设备', + path: '/subpackage/device/pages/index/index', + serverKey: 1010 // 后端对应权限编号 }, - {//需求要求更改ICON位置 id: 12, - name: '系统工具', + name: '小程序管理', path: '/subpackage/party/pages/index/index', serverKey: 1016 // 后端对应权限编号 1016 }, + { + id: 13, + name: '工单', + path: '/subpackage/message/pages/work_order/list', + serverKey: 1022 // 后端对应权限编号 1022 + }, + // { + // id: 1, + // name: '收款记录', + // path: '/subpackage/income/pages/details_record/details_record', + // serverKey: 1002 // 后端对应权限编号 + // }, + { + id: 4, + name: '核销查询', + path: '/subpackage/verification/pages/index', + serverKey: 1008 // 后端对应权限编号 + }, + // { + // id: 8, + // name: '课程管理', + // path: '/subpackage/course/pages/index/index', + // serverKey: 1013 // 后端对应权限编号 1013 + // }, + + // { + // id: 10, + // name: '进场人数异常', + // path: '/subpackage/blacklist/pages/abnormal_list/abnormal_list', + // serverKey: 1015 // 后端对应权限编号 1015 + // }, + ]; const app = getApp(); - - // #ifndef H5 - - const uniGetSetting = util.promisify(uni.getSetting); - const uniLogin = util.promisify(uni.login); - const uniGetUserInfo= util.promisify(uni.getUserInfo); const APPID = uni.getAccountInfoSync().miniProgram.appId; - - // #endif - - // #ifdef H5 - const APPID = "wx7106e84614cf0060" //TODO - // #endif export default { + components: { bottomLogo, authorizationLogin }, computed: { - isProfile: _=>util.isProfile(), - // loginStatus(){ - // return app.isLogin(); - // } + ...mapGetters([ 'loginState' ]), }, data() { return { tabList, - isShowAuthorModal: false, indexData: {}, - loginStatus: false, } }, async onLoad(options) { - try{ - util.showLoad(); + let _loginRes = {}; // 20230829 新增平台账户不绑定,不检验,每次进来走重新登陆绑定流程 - if(options.role !== 'ADMIN-PLATFORM')await this.checkUserAuthor(); - - util.hideLoad(); - this.loginStatus = app.isLogin(); - if(!!app.isLogin())this.getIndexInfo(); + if(options.role !== 'ADMIN-PLATFORM')_loginRes = await this.$store.dispatch('checkUserAuthor'); + // 20240325 新增openid绑定账号检测 + if(_loginRes?.data === '')this.webBrandUserCheck(); + if(_loginRes?.data)this.getIndexInfo(); }catch(err){ - util.hideLoad(); - uni.removeStorageSync('token'); - // util.showNone(err.message || '身份校验失败!'); - console.log('onLoad err',err); - this.loginStatus = app.isLogin(); + console.warn('pages index onLoad err--->', err); } }, onShow(){ - let { indexData } = this; - if(JSON.stringify(indexData)!='{}'&&!!app.isLogin())this.getIndexInfo(); + let { indexData, loginState, getIndexInfo } = this; + if(JSON.stringify(indexData)!='{}'&&loginState)getIndexInfo(); }, methods: { + getTabForID(id){ + return tabList.find(e=>e.id === id) || {} + }, // 账号有开启了权限的才显示菜单,否则不显示【ID1000840】 isPermissionShowTab(e){ let { indexData } = this; @@ -233,13 +214,13 @@ return false; }, toNoticeList(){ - if(!app.isLogin())return this.showAuthor(); + if(!this.loginState)return this.showAuthor(); util.routeTo(`/pages/message/list/list`,'nT'); }, toPageInfo(tabInfo){ - let { indexData } = this; + let { indexData, loginState } = this; let _permission = indexData.permission || {}; - if(!app.isLogin())return this.showAuthor(); + if(!loginState)return this.showAuthor(); if(!tabInfo.path)return util.showNone('暂未开放!'); //if(tabInfo.id == 2)return util.routeTo(tabInfo.path,'nT'); //测试 if(!_permission[tabInfo.serverKey])return util.showNone('暂无权限,请联系管理员开启!') @@ -251,10 +232,9 @@ }); } - if([ 10, 11, 4 ].includes(tabInfo.id))return util.routeTo(tabInfo.path + `?brand_id=${indexData.brand.id}`,'nT'); + if([ 10, 11, 4, 13 ].includes(tabInfo.id))return util.routeTo(tabInfo.path + `?brand_id=${indexData.brand.id}`,'nT'); if(tabInfo.id === 12){ - // if(!indexData.brand.mini_wechat_appid)return util.showNone('暂无appid!') let url = tabInfo.path + `?appid=${indexData.brand.mini_wechat_appid}` console.log(222,url) return util.routeTo(url,'nT'); @@ -275,137 +255,15 @@ this.$store.commit('setBrandInfo',res); }) }, - // 看是否授权,清除token - async checkUserAuthor(){ - try{ - let loginRes ="" - // #ifndef H5 - loginRes = await uniLogin(); - // #endif - // #ifdef H5 - loginRes = {errMsg: "login:ok", code: "0c3xEi0w3kr1t23zcU3w3ZQR3w3xEi0h"} //TODO 设置H5测试数据 - // #endif - console.log(loginRes) - return servers.get({ - url: API.wechatMiniAppLoginAndSync, - data: { - code: loginRes.code, - appid: APPID, - // #ifdef H5 - token:"3d2b0092-e761-11ee-8a66-5254005df464", //TODO - // #endif - }, - isDefaultGet: false, - }) - .then(res=>{ - util.hideLoad(); - let _data = res.data; - if(_data.code == 0){ - // let _data = res.data.data; - - if(_data.data == ''){ - uni.removeStorageSync('token'); - this.loginStatus = app.isLogin(); - // 20240325 新增openid绑定账号检测 - this.webBrandUserCheck(); - - // return util.routeTo(`/pages/login/login`,'rL'); - } - uni.setStorageSync('token',_data.data); - return _data; - }else{ - util.showNone(_data.message || '校验身份失败!'); - throw res.data || {}; - } - - }) - .catch(err=>{ - throw err; - }) - }catch(err){ - throw err; - } - }, showAuthor(){ - this.isShowAuthorModal = true - }, - closeAuthor(){ - this.isShowAuthorModal = false - }, - cancelAuthor(){ - this.closeAuthor(); - }, - getLoginQuery({ - userInfo, - loginRes - }){ - return { - appid: APPID, - code: loginRes.code, - encryptedData: userInfo.encryptedData, - // is_details: 1, - // 后端解密错误,直接传用户信息 - user_info: userInfo.userInfo, - user_raw_data: userInfo.rawData, - ...userInfo.userInfo, - } - }, - // 新获取用户信息 - profileConfirm(){ - uni.getUserProfile({ - lang: 'zh_CN', desc: '授权登陆', - success: res => { - this.confirmAuthor({detail: {...res}}); + this.$refs?.authorizationLogin?.alert?.({ + success: ()=>{ + setTimeout(this.getIndexInfo, 1000); }, - fail: function(err) { - util.showNone('获取用户信息失败!请重试'); - console.warn('getUserProfile Err', err) + fail: err =>{ + // console.warn('pages index showAuthor authorizationLogin Err ->', err) } }) - }, - - async confirmAuthor(userRes){ - if(!userRes.detail.userInfo){ - this.closeAuthor(); - return util.showNone('获取用户信息失败!请稍后重试'); - } - let loginRes = await uniLogin(); - - if(!loginRes.code){ - this.closeAuthor(); - return util.showNone('获取登陆凭证失败!稍后重试'); - } - - servers.post({ - url: API.wechatMiniAppLoginAndSync, - data: this.getLoginQuery({ - userInfo: userRes.detail, - loginRes - }), - isDefaultGet: false, - }) - .then(res=>{ - util.hideLoad(); - let _data = res.data || {}; - if(_data.code == 0){ - if(_data.data == '')return util.routeTo(`/pages/login/login`,'rL'); - util.showNone(_data.message || '登陆成功!'); - // let _data = res.data.data; - // if(_data.user.role == '')return util.routeTo(`/pages/merchant_login/merchant_login`,'rL'); - - uni.setStorageSync('token',_data.data); - setTimeout(_=>{ - this.getIndexInfo(); - this.closeAuthor(); - this.loginStatus = app.isLogin(); - }, 1200); - }else{ - util.showNone(_data.message || '后台登陆失败!'); - setTimeout(_=>this.closeAuthor(), 1200); - } - - }).catch(util.hideLoad) - }, webBrandUserCheck(){ @@ -451,8 +309,8 @@ }) }, toStoreList(){ - if(!app.isLogin())return this.showAuthor(); - let { indexData } = this; + let { indexData, loginState } = this; + if(!loginState)return this.showAuthor(); util.routeTo(`/pages/store_list/store_list?brand_id=${indexData.brand.id}`,'nT'); }, bindUserOpenid(){ @@ -682,57 +540,6 @@ } } - .ic-author-modal{ - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - padding-top: 60upx; - width: 662upx; - height: 884upx; - border-radius: 10upx; - background-color: #fff; - .iam-title{ - margin-bottom: 22upx; - text-align: center; - line-height: 60upx; - font-size: 44upx; - font-weight: 500; - color: #1a1a1a; - } - .iam-tip{ - margin-bottom: 52upx; - line-height: 40upx; - text-align: center; - font-size: 28upx; - color: #9c9c9f; - } - .iam-pic{ - margin: 0 auto 62upx; - display: block; - width: 488upx; - height: 416upx; - } - .iam-btns{ - @include centerFlex(center); - >button{ - margin: 0 20upx; - width: 240upx; - height: 92upx; - line-height: 88upx; - text-align: center; - border-radius: 46upx; - border: 2upx solid $themeColor; - font-size: 32upx; - color: $themeColor; - &+button{ - background-color: $themeColor; - color: #fff; - } - } - } - - } // fly_btn .fly_btn{ diff --git a/src/pages/login/login.vue b/src/pages/login/login.vue index c7b5177..df342e7 100644 --- a/src/pages/login/login.vue +++ b/src/pages/login/login.vue @@ -43,7 +43,7 @@ + + \ No newline at end of file diff --git a/src/pages/menu/second.vue b/src/pages/menu/second.vue new file mode 100644 index 0000000..0e40ef5 --- /dev/null +++ b/src/pages/menu/second.vue @@ -0,0 +1,32 @@ + + + + + \ No newline at end of file diff --git a/src/pages/menu/third.vue b/src/pages/menu/third.vue new file mode 100644 index 0000000..92636e0 --- /dev/null +++ b/src/pages/menu/third.vue @@ -0,0 +1,117 @@ + + + + + \ No newline at end of file diff --git a/src/pages/merchant_login/merchant_login.vue b/src/pages/merchant_login/merchant_login.vue index c8f7a1c..8327f6b 100644 --- a/src/pages/merchant_login/merchant_login.vue +++ b/src/pages/merchant_login/merchant_login.vue @@ -8,11 +8,11 @@ \ No newline at end of file diff --git a/src/static/images/icon/arrow_b2.png b/src/static/images/icon/arrow_b2.png index 54df2b3..e4e1580 100644 Binary files a/src/static/images/icon/arrow_b2.png and b/src/static/images/icon/arrow_b2.png differ diff --git a/src/static/images/icon/index/green_bg_circle.png b/src/static/images/icon/index/green_bg_circle.png index 0117de2..3f1a34e 100644 Binary files a/src/static/images/icon/index/green_bg_circle.png and b/src/static/images/icon/index/green_bg_circle.png differ diff --git a/src/static/images/icon/index/tab_12.png b/src/static/images/icon/index/tab_12.png index 1860a67..8e0eec8 100644 Binary files a/src/static/images/icon/index/tab_12.png and b/src/static/images/icon/index/tab_12.png differ diff --git a/src/static/images/icon/index/tab_13.png b/src/static/images/icon/index/tab_13.png new file mode 100644 index 0000000..f499c7c Binary files /dev/null and b/src/static/images/icon/index/tab_13.png differ diff --git a/src/static/images/icon/index/tab_8.png b/src/static/images/icon/index/tab_8.png index 4b19fe3..d126d71 100644 Binary files a/src/static/images/icon/index/tab_8.png and b/src/static/images/icon/index/tab_8.png differ diff --git a/src/static/images/icon/scan_code_btn.png b/src/static/images/icon/scan_code_btn.png deleted file mode 100644 index 5dfbb52..0000000 Binary files a/src/static/images/icon/scan_code_btn.png and /dev/null differ diff --git a/src/static/images/icon/selected_ring.png b/src/static/images/icon/selected_ring.png deleted file mode 100644 index 0f01616..0000000 Binary files a/src/static/images/icon/selected_ring.png and /dev/null differ diff --git a/src/static/images/icon/write_off_fail.png b/src/static/images/icon/write_off_fail.png deleted file mode 100644 index 47ee4fa..0000000 Binary files a/src/static/images/icon/write_off_fail.png and /dev/null differ diff --git a/src/static/images/tab/ta_1.png b/src/static/images/tab/ta_1.png new file mode 100644 index 0000000..21bd06c Binary files /dev/null and b/src/static/images/tab/ta_1.png differ diff --git a/src/static/images/tab/ta_2.png b/src/static/images/tab/ta_2.png new file mode 100644 index 0000000..b6d3942 Binary files /dev/null and b/src/static/images/tab/ta_2.png differ diff --git a/src/static/images/tab/ta_3.png b/src/static/images/tab/ta_3.png new file mode 100644 index 0000000..0b7764d Binary files /dev/null and b/src/static/images/tab/ta_3.png differ diff --git a/src/static/images/tab/ta_4.png b/src/static/images/tab/ta_4.png new file mode 100644 index 0000000..360d429 Binary files /dev/null and b/src/static/images/tab/ta_4.png differ diff --git a/src/static/images/tab/tab_1.png b/src/static/images/tab/tab_1.png new file mode 100644 index 0000000..2a2de1d Binary files /dev/null and b/src/static/images/tab/tab_1.png differ diff --git a/src/static/images/tab/tab_2.png b/src/static/images/tab/tab_2.png new file mode 100644 index 0000000..e5dd78d Binary files /dev/null and b/src/static/images/tab/tab_2.png differ diff --git a/src/static/images/tab/tab_3.png b/src/static/images/tab/tab_3.png new file mode 100644 index 0000000..cc1f30d Binary files /dev/null and b/src/static/images/tab/tab_3.png differ diff --git a/src/static/images/tab/tab_4.png b/src/static/images/tab/tab_4.png new file mode 100644 index 0000000..d5e9890 Binary files /dev/null and b/src/static/images/tab/tab_4.png differ diff --git a/src/static/images/third_pages/banner.png b/src/static/images/third_pages/banner.png new file mode 100644 index 0000000..1732315 Binary files /dev/null and b/src/static/images/third_pages/banner.png differ diff --git a/src/static/images/third_pages/bg.png b/src/static/images/third_pages/bg.png new file mode 100644 index 0000000..e52e905 Binary files /dev/null and b/src/static/images/third_pages/bg.png differ diff --git a/src/static/images/third_pages/tab_a.png b/src/static/images/third_pages/tab_a.png new file mode 100644 index 0000000..afc8d31 Binary files /dev/null and b/src/static/images/third_pages/tab_a.png differ diff --git a/src/static/images/third_pages/tab_b.png b/src/static/images/third_pages/tab_b.png new file mode 100644 index 0000000..545b00b Binary files /dev/null and b/src/static/images/third_pages/tab_b.png differ diff --git a/src/store/actions.js b/src/store/actions.js index d0cf110..c5ebddc 100644 --- a/src/store/actions.js +++ b/src/store/actions.js @@ -1,6 +1,8 @@ // 异步方法 import { servers } from '../js/server'; import { API } from '../js/api'; +import { showLoad, hideLoad, showModal, promisify } from '../utils/util'; + export default { getBrandInfo({commit, state}){ if(state?.brandInfo?.brand?.id)return Promise.resolve(state.brandInfo); @@ -24,5 +26,75 @@ export default { .catch(err=>{ console.warn('actions getOrderRefundList err -->', err); }) - } + }, + + // 获取门店列表 + getStadiumLs({ commit, state }, brand_id){ + showLoad(); + return servers.post({ + url: API.stadiumList, + data: { page_size: 9999, page: 1, brand_id }, + isDefaultGet: false, + }) + .then(res => { + hideLoad(); + let _data = res?.data || {}; + if(_data.code === 0){ + let _ls = _data?.data?.list || []; + return _ls; + }else{ + return Promise.reject(_data); + } + }) + .catch(err => { + hideLoad(); + showModal({ + title: '提示', + content: err.message || '加载店铺失败!' + }) + console.warn('store actions getStadiumLs err --->', err); + // return Promise.reject(err); + }) + }, + // 看是否授权,清除token 也可以理解自动登陆 + async checkUserAuthor({ commit, state }){ + let loginRes = {}; + try{ + const uniLogin = promisify(uni.login); + loginRes = await uniLogin(); + }catch(err){ + console.warn('store actions checkUserAuthor login err', err); + showModal({ content: '获取登陆凭证失败!请稍后重新登录!' }); + return Promise.reject(err); + } + showLoad(); + return servers.post({ + url: API.wechatMiniAppLoginAndSync, + data: { + code: loginRes.code, + appid: state.APPID, + }, + isDefaultGet: false, + }) + .then(res => { + hideLoad(); + let _data = res?.data || {}; + if(_data.code === 0){ + if(_data.data === ''){ + commit('setLoginState', { loginState: false, token: '' }); + return _data; + } + commit('setLoginState', { loginState: true, token: _data.data }); + return _data; + }else{ + return Promise.reject(_data); + } + }) + .catch(err=>{ + console.warn('store actions checkUserAuthor wechatMiniAppLoginAndSync err --->', err); + hideLoad(); + showModal({ content: err?.message || '静默登录失败!请稍后重试!' }); + return Promise.reject(err); + }) + }, } \ No newline at end of file diff --git a/src/store/index.js b/src/store/index.js index 38ef2f5..f4a60d0 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -33,19 +33,20 @@ export default new Vuex.Store({ // }, permissionObj: { // 权限代号对应 '1001': '营业额', - '1002': '收款记录', + // '1002': '收款记录', '1012': '订单管理', '1007': '员工管理', '1008': '核销查询', - '1009': '场地管理', - '1010': '设备管理', + '1009': '场地看板', + '1010': '智能设备', '1011': '商品零售', // '1013': '课程管理', '1014': '储值卡管理', - '1015': '进场人数异常', - '1016': '系统工具', - '1017': '钱包提现', - '1018': '退款权限' + // '1015': '进场人数异常', + '1016': '小程序管理', + '1017': '钱包&提现', + '1018': '退款权限', + '1022': '工单' }, // 场地占用提交页面信息 occupyInfo: { @@ -54,7 +55,8 @@ export default new Vuex.Store({ typeInfo: {}, // 球场类型 venueList: [], // 选择场地列表 orderInfo: {}, // 订单信息 // 20230620 新增挂账需求,用于回显确认订单 - } + }, + isLogin: false, // 登陆状态 }, mutations, actions, @@ -69,6 +71,12 @@ export default new Vuex.Store({ } console.warn(_arr.length) return _arr; + }, + loginState: state =>{ + let _isLogin = state.isLogin; + let _token = uni.getStorageSync('token'); + // 只是想获得一个响应的token状态 + if(_isLogin || !_isLogin)return !!_token; } } }); diff --git a/src/store/mutations.js b/src/store/mutations.js index 0918706..4d9a91d 100644 --- a/src/store/mutations.js +++ b/src/store/mutations.js @@ -10,5 +10,18 @@ export default { // 场地占用信息 setOccupyInfo(state, _occupyInfo){ state.occupyInfo = _occupyInfo; + }, + + // + setLoginState(state, { loginState = false, token = '' }){ + console.log(loginState, token); + if(loginState&&token){ + uni.setStorageSync('token', token); + state.isLogin = loginState; + }else{ + uni.removeStorageSync('token', token); + state.isLogin = false; + } + } } \ No newline at end of file diff --git a/src/subpackage/authorization/components/login.vue b/src/subpackage/authorization/components/login.vue new file mode 100644 index 0000000..4ec018b --- /dev/null +++ b/src/subpackage/authorization/components/login.vue @@ -0,0 +1,188 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/authorization/components/user_info/iconfont.css b/src/subpackage/authorization/components/user_info/iconfont.css new file mode 100644 index 0000000..217a692 --- /dev/null +++ b/src/subpackage/authorization/components/user_info/iconfont.css @@ -0,0 +1,25 @@ +@charset "UTF-8"; + +@font-face { + font-family: "tuniaoFont"; /* Project id 3784643 */ + src: + url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAN8AAsAAAAAB4gAAAMvAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDBgqCQIIdATYCJAMMCwgABCAFhH8HPRuYBiMRpmvPIfurAzsYPj7DCVbrRAmElfXCs4V6xacO8aHO69VXu54tTy8h0hcJ7ufgieY+3+xscrn9B8wKQQFBywplLZCw9SwcOyZ5pKsoAQAbcICJTr7AjPPqr06NRkeIAemFpXv8cje1+/LkuLvD789WJZUANjOe9F76qptDOSMUui/Ua0WQKpZGXaqf5hHZdAD6x8tRJtRKtQd7j5UKkk6lWywYkGADCZBnGLugJd6CAI4GOjH956Ep4k7imdNkYTGFAkm2nJyPrBNwA7YhWwgQ/K4bLXITD8wl8xxuBN+XwyYJwOAp5jFjOwNbPNwd3l3WiyFAv3sCBLjcAB6gQM3GjLLSbJpDo1ANiqsiFiX7WAQzqTcMA06j/pb/eAbEx8yMAaAChg3sDjs6COwub8IAoAD4PEZkA7iAZClPKdicmJLc2OiZcQC3cV613sc3Ab9W7YItQtio9YgdKGjgr+ANlbg5gPvXFacv8IyvKTH4pcjV7VIcfnuIAUd3VCbxcCIKj++rvr/hpx/iwxd4/5mxDXeILbBp2+ByMIlGMuQEU3gjiVaMcXk8Dn2gWo5wuRwuIldLRqRwWogvmCRXE9/kSvrVQP4iFDVWRSbRakMk/AtcBYVpO6rpah1V9J/m/Wt+q8WfsOV+S5KFTGD5dwW9KFstZUs5smuYK3V495zwUG+r/Izf0PWtbWj/HUQsAL9u+cGK8NCiAgRnaRJ49fqljrxWc4PaKs4pQwBlMLUeAzgcEGLakvg5nCZ3zgTBkZzAEEUuFEeJyMrq4BGhGT6OPjiqGd4eIZkLKGKjgTKuAAgpPIAhjmdQUngnsrJdeKTxBz4pkgjHjJQeFqFMXv8PQqg0QP+F2cbAdoHqFmaM52jYlcbNoeTq4CtPkjzHAE1Zl0QvFEjGmp9fY6vKwBI9kOvIuQhJ4kJWy0k1dVXFVXcpbfTmIIRKA/RfmG0M7G1T3cKM8VwMXGlEnR1KY0uU+CTJnM1ODk1ZdxJdSOjYdGOp+TW2k6szsNg8qIvIuQipetFCVstpQCB1lcXHXUl5ZOpfdBvgMI9QMaJi8TZdzLS36K8/ueDZOWMAAA==') format('woff2'), + url('//at.alicdn.com/t/c/font_3784643_5jru9pe5fad.woff?t=1669045092678') format('woff'), + url('//at.alicdn.com/t/c/font_3784643_5jru9pe5fad.ttf?t=1669045092678') format('truetype'); +} + +[class*='tn-icon-'] { + font-family: 'tuniaoFont' !important; + font-style: normal; + -webkit-font-smoothing: antialiased; + text-align: center; + text-decoration: none; +} + +.tn-icon-close:before { + content: "\e74d"; +} + +.tn-icon-camera-fill:before { + content: "\e75d"; +} diff --git a/src/subpackage/authorization/components/user_info/impower.vue b/src/subpackage/authorization/components/user_info/impower.vue new file mode 100644 index 0000000..e3f4571 --- /dev/null +++ b/src/subpackage/authorization/components/user_info/impower.vue @@ -0,0 +1,133 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/authorization/components/user_info/tuniaoui-wx-user-info.vue b/src/subpackage/authorization/components/user_info/tuniaoui-wx-user-info.vue new file mode 100644 index 0000000..0d9d7bc --- /dev/null +++ b/src/subpackage/authorization/components/user_info/tuniaoui-wx-user-info.vue @@ -0,0 +1,357 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/authorization/js/api.js b/src/subpackage/authorization/js/api.js new file mode 100644 index 0000000..19ed53b --- /dev/null +++ b/src/subpackage/authorization/js/api.js @@ -0,0 +1,9 @@ +import { ORIGIN } from '@/js/api'; + +export const AUTHOR_API = { + wechatMiniAppLoginAndSync: `${ORIGIN}/assistant/WechatMiniAppGetToken`, // 小程序授权获取token,为空就登录 + zs_user_avatar:`${ORIGIN}/upload/file/zs_user_avatar`, // 头像图片上传 + changeAvatar: `${ORIGIN}/admin/assistant/changeAvatar`, // 修改用户头像、昵称 +} + +export default AUTHOR_API; \ No newline at end of file diff --git a/src/subpackage/authorization/js/server.js b/src/subpackage/authorization/js/server.js new file mode 100644 index 0000000..ac1b071 --- /dev/null +++ b/src/subpackage/authorization/js/server.js @@ -0,0 +1,10 @@ +import { Server } from '@/js/server'; + +class _Server extends Server { + constructor(props){ + super(props) + } +} + + +export default new _Server(); \ No newline at end of file diff --git a/src/subpackage/authorization/pages/index.vue b/src/subpackage/authorization/pages/index.vue new file mode 100644 index 0000000..b3f8694 --- /dev/null +++ b/src/subpackage/authorization/pages/index.vue @@ -0,0 +1,16 @@ + + + + + \ No newline at end of file diff --git a/src/static/images/icon/author_modal.png b/src/subpackage/authorization/static/images/author_modal.png similarity index 100% rename from src/static/images/icon/author_modal.png rename to src/subpackage/authorization/static/images/author_modal.png diff --git a/src/subpackage/menu/components/bottom_logo.vue b/src/subpackage/menu/components/bottom_logo.vue new file mode 100644 index 0000000..56a1a45 --- /dev/null +++ b/src/subpackage/menu/components/bottom_logo.vue @@ -0,0 +1,41 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/menu/components/mine/header.vue b/src/subpackage/menu/components/mine/header.vue new file mode 100644 index 0000000..712f6af --- /dev/null +++ b/src/subpackage/menu/components/mine/header.vue @@ -0,0 +1,87 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/menu/components/mine/line_tab.vue b/src/subpackage/menu/components/mine/line_tab.vue new file mode 100644 index 0000000..1fdd4fe --- /dev/null +++ b/src/subpackage/menu/components/mine/line_tab.vue @@ -0,0 +1,63 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/menu/pages/index.vue b/src/subpackage/menu/pages/index.vue new file mode 100644 index 0000000..914b254 --- /dev/null +++ b/src/subpackage/menu/pages/index.vue @@ -0,0 +1,16 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/menu/static/images/arrow_b2.png b/src/subpackage/menu/static/images/arrow_b2.png new file mode 100644 index 0000000..e4e1580 Binary files /dev/null and b/src/subpackage/menu/static/images/arrow_b2.png differ diff --git a/src/subpackage/menu/static/images/bot_logo.png b/src/subpackage/menu/static/images/bot_logo.png new file mode 100644 index 0000000..5ef008a Binary files /dev/null and b/src/subpackage/menu/static/images/bot_logo.png differ diff --git a/src/subpackage/menu/static/images/mine_tab/0.png b/src/subpackage/menu/static/images/mine_tab/0.png new file mode 100644 index 0000000..0a80539 Binary files /dev/null and b/src/subpackage/menu/static/images/mine_tab/0.png differ diff --git a/src/subpackage/menu/static/images/mine_tab/1.png b/src/subpackage/menu/static/images/mine_tab/1.png new file mode 100644 index 0000000..3efd220 Binary files /dev/null and b/src/subpackage/menu/static/images/mine_tab/1.png differ diff --git a/src/subpackage/menu/static/images/mine_tab/2.png b/src/subpackage/menu/static/images/mine_tab/2.png new file mode 100644 index 0000000..8c1b55c Binary files /dev/null and b/src/subpackage/menu/static/images/mine_tab/2.png differ diff --git a/src/subpackage/menu/static/images/mine_tab/3.png b/src/subpackage/menu/static/images/mine_tab/3.png new file mode 100644 index 0000000..b203514 Binary files /dev/null and b/src/subpackage/menu/static/images/mine_tab/3.png differ diff --git a/src/subpackage/menu/static/images/mine_tab/4.png b/src/subpackage/menu/static/images/mine_tab/4.png new file mode 100644 index 0000000..9722c80 Binary files /dev/null and b/src/subpackage/menu/static/images/mine_tab/4.png differ diff --git a/src/subpackage/menu/static/images/mine_tab/5.png b/src/subpackage/menu/static/images/mine_tab/5.png new file mode 100644 index 0000000..5ada9fe Binary files /dev/null and b/src/subpackage/menu/static/images/mine_tab/5.png differ diff --git a/src/subpackage/menu/static/images/mine_tab/6.png b/src/subpackage/menu/static/images/mine_tab/6.png new file mode 100644 index 0000000..496eed0 Binary files /dev/null and b/src/subpackage/menu/static/images/mine_tab/6.png differ diff --git a/src/subpackage/message/components/detail/answer_item.vue b/src/subpackage/message/components/detail/answer_item.vue new file mode 100644 index 0000000..ccfbe25 --- /dev/null +++ b/src/subpackage/message/components/detail/answer_item.vue @@ -0,0 +1,59 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/message/components/detail/image_flow.vue b/src/subpackage/message/components/detail/image_flow.vue new file mode 100644 index 0000000..748a691 --- /dev/null +++ b/src/subpackage/message/components/detail/image_flow.vue @@ -0,0 +1,51 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/message/components/detail/info.vue b/src/subpackage/message/components/detail/info.vue new file mode 100644 index 0000000..ccadc39 --- /dev/null +++ b/src/subpackage/message/components/detail/info.vue @@ -0,0 +1,60 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/message/components/edit/fixed_button.vue b/src/subpackage/message/components/edit/fixed_button.vue new file mode 100644 index 0000000..fa8b4e1 --- /dev/null +++ b/src/subpackage/message/components/edit/fixed_button.vue @@ -0,0 +1,37 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/message/components/edit/info_edit.vue b/src/subpackage/message/components/edit/info_edit.vue new file mode 100644 index 0000000..63f54eb --- /dev/null +++ b/src/subpackage/message/components/edit/info_edit.vue @@ -0,0 +1,195 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/message/components/edit/upload_img.vue b/src/subpackage/message/components/edit/upload_img.vue new file mode 100644 index 0000000..bbaa0d5 --- /dev/null +++ b/src/subpackage/message/components/edit/upload_img.vue @@ -0,0 +1,189 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/message/components/fixed_button.vue b/src/subpackage/message/components/fixed_button.vue new file mode 100644 index 0000000..45203d5 --- /dev/null +++ b/src/subpackage/message/components/fixed_button.vue @@ -0,0 +1,33 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/message/components/message_item.vue b/src/subpackage/message/components/message_item.vue new file mode 100644 index 0000000..b25b83a --- /dev/null +++ b/src/subpackage/message/components/message_item.vue @@ -0,0 +1,85 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/message/js/api.js b/src/subpackage/message/js/api.js new file mode 100644 index 0000000..2385d0b --- /dev/null +++ b/src/subpackage/message/js/api.js @@ -0,0 +1,16 @@ +import { ORIGIN } from '@/js/api'; + +export const MESSAGE_API = { + zs_message_imgs:`${ORIGIN}/upload/file/zs_message_imgs`, // 投诉/工单图片 + complaintSubmit:`${ORIGIN}/admin/assistant/complaint/submit`, // 投诉提交 + complaintList:`${ORIGIN}/admin/assistant/complaint/list`, // 投诉列表 + complaintInfo:`${ORIGIN}/admin/assistant/complaint/info`, // 投诉详情 + complaintReply:`${ORIGIN}/admin/assistant/complaint/reply`, // 投诉回复 + workorderSubmit:`${ORIGIN}/admin/assistant/workorder/submit`, // 工单提交 + workorderList:`${ORIGIN}/admin/assistant/workorder/list`, // 工单列表 + workorderInfo:`${ORIGIN}/admin/assistant/workorder/info`, // 工单详情 + workorderReply:`${ORIGIN}/admin/assistant/workorder/reply`, // 工单回复 +} + + +export default { ORIGIN, MESSAGE_API }; \ No newline at end of file diff --git a/src/subpackage/message/js/server.js b/src/subpackage/message/js/server.js new file mode 100644 index 0000000..c06aecb --- /dev/null +++ b/src/subpackage/message/js/server.js @@ -0,0 +1,9 @@ +import { Server } from '@/js/server'; + +class _server extends Server { + constructor(props){ + super(props) + } +} + +export default new _server(); \ No newline at end of file diff --git a/src/subpackage/message/pages/complaint/detail.vue b/src/subpackage/message/pages/complaint/detail.vue new file mode 100644 index 0000000..fe5ded5 --- /dev/null +++ b/src/subpackage/message/pages/complaint/detail.vue @@ -0,0 +1,171 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/message/pages/complaint/edit.vue b/src/subpackage/message/pages/complaint/edit.vue new file mode 100644 index 0000000..b0a409e --- /dev/null +++ b/src/subpackage/message/pages/complaint/edit.vue @@ -0,0 +1,87 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/message/pages/complaint/list.vue b/src/subpackage/message/pages/complaint/list.vue new file mode 100644 index 0000000..a6188e2 --- /dev/null +++ b/src/subpackage/message/pages/complaint/list.vue @@ -0,0 +1,105 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/message/pages/work_order/detail.vue b/src/subpackage/message/pages/work_order/detail.vue new file mode 100644 index 0000000..3c74259 --- /dev/null +++ b/src/subpackage/message/pages/work_order/detail.vue @@ -0,0 +1,171 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/message/pages/work_order/edit.vue b/src/subpackage/message/pages/work_order/edit.vue new file mode 100644 index 0000000..7863694 --- /dev/null +++ b/src/subpackage/message/pages/work_order/edit.vue @@ -0,0 +1,99 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/message/pages/work_order/list.vue b/src/subpackage/message/pages/work_order/list.vue new file mode 100644 index 0000000..014eeb5 --- /dev/null +++ b/src/subpackage/message/pages/work_order/list.vue @@ -0,0 +1,105 @@ + + + + + \ No newline at end of file diff --git a/src/subpackage/message/static/images/arrow_b2.png b/src/subpackage/message/static/images/arrow_b2.png new file mode 100644 index 0000000..e4e1580 Binary files /dev/null and b/src/subpackage/message/static/images/arrow_b2.png differ diff --git a/src/subpackage/message/static/images/close.png b/src/subpackage/message/static/images/close.png new file mode 100644 index 0000000..3844523 Binary files /dev/null and b/src/subpackage/message/static/images/close.png differ diff --git a/src/subpackage/message/static/images/message.png b/src/subpackage/message/static/images/message.png new file mode 100644 index 0000000..6e182f8 Binary files /dev/null and b/src/subpackage/message/static/images/message.png differ diff --git a/src/subpackage/message/static/images/unfold.png b/src/subpackage/message/static/images/unfold.png new file mode 100644 index 0000000..5456142 Binary files /dev/null and b/src/subpackage/message/static/images/unfold.png differ diff --git a/src/subpackage/verification/pages/record.vue b/src/subpackage/verification/pages/record.vue index 24d26c9..f7b0359 100644 --- a/src/subpackage/verification/pages/record.vue +++ b/src/subpackage/verification/pages/record.vue @@ -16,7 +16,7 @@ {{ showPeriodStr }} - 核销数量:{{ recordLs.length || 0 }} + 核销数量:{{ verificationNum || 0 }} @@ -109,6 +109,7 @@ export default { curStadium: {}, recordLs: [], page: 1, + verificationNum: 0, } }, /** @@ -123,6 +124,9 @@ export default { // 设置选中场馆 let _selected = _stadiumLs.find(ele => +ele.id === +(options?.stadium_id ?? '')); if(_selected?.id)this.curStadium = _selected; + } else if(_stadiumLs?.length){ + // 售后: 只要有门店就随便默认一个是吧 + this.curStadium = _stadiumLs[0]; } this.reloadRecordLs(); }, @@ -158,12 +162,12 @@ export default { }) }, 300, true), // 初始化时间段 - initPeriodStr(){ + initPeriodStr(dayNum = 0){ let _today = new Date(); let _todayTimestamp = _today.getTime(); let _eStr = formatDate({ date: _today }); - let _first30DaysTimestamp = _todayTimestamp - 30 * 24 * 60 * 60 * 1000; - let _sStr = formatDate({ date: new Date(_first30DaysTimestamp) }); + let _firstDaysTimestamp = _todayTimestamp - dayNum * 24 * 60 * 60 * 1000; + let _sStr = formatDate({ date: new Date(_firstDaysTimestamp) }); return this.periodStr = `${_sStr}_${_eStr}`; }, showPeriodModal(){ @@ -243,6 +247,8 @@ export default { let _data = res?.data || {}; if(_data.code === 0){ let _ls = this.formatRecordLs(_data?.data?.list || []); + let _total = _data?.data?.total ?? 0; + this.verificationNum = _total; if(page === 1)return this.recordLs = _ls; if(!_ls.length)return showNone('没有更多!'); this.page = page; diff --git a/src/subpackage/wallet/pages/index/index.vue b/src/subpackage/wallet/pages/index/index.vue index fc10103..34175d7 100644 --- a/src/subpackage/wallet/pages/index/index.vue +++ b/src/subpackage/wallet/pages/index/index.vue @@ -34,7 +34,7 @@ import walletModalSuccess from '../../components/wallet_modal_success.vue'; import rechargeModal from "./modules/recharge_modal.vue"; import { WALLET_API } from '../../js/api'; import servers from '../../js/server'; -import { routeTo, showLoad, hideLoad, debounce, showModal } from '@/utils/util'; +import { routeTo, showLoad, hideLoad, debounce, showModal, jsonStr } from '@/utils/util'; export default { components: { 'wallet-info': walletInfo, @@ -80,7 +80,7 @@ export default { }) }, 300, true), toWebView(){ - routeTo(`/pages/web_view/web_view?src=${encodeURIComponent(this.getAdminAddress())}`,'nT'); + routeTo(`/pages/web_view/web_view?src=${jsonStr(this.getAdminAddress())}`,'nT'); }, getAdminAddress(){ let _appid = uni.getAccountInfoSync()?.miniProgram?.appId || ''; diff --git a/src/utils/util.js b/src/utils/util.js index c7fb4f3..145beb5 100644 --- a/src/utils/util.js +++ b/src/utils/util.js @@ -95,7 +95,9 @@ export function showModal({ confirmColor='#009874', success, fail, - complete + complete, + editable = false, + placeholderText = '' }){ uni.showModal({ title, @@ -106,7 +108,9 @@ export function showModal({ confirmText, success, fail, - complete + complete, + editable, + placeholderText, }) }