diff --git a/App.vue b/App.vue index 9d79478..b9d935e 100644 --- a/App.vue +++ b/App.vue @@ -5,19 +5,21 @@ // brestUrl: 'http://192.168.3.4:9302/brest', // imgUrl: 'https://192.168.3.4:9301/filesystem/', //正式 - // url: 'https://hsg.dctpay.com/brest', - // imgUrl: 'https://hsg.dctpay.com/filesystem/', - // imageWxImg: 'https://hsg.dctpay.com/filesystem/wxApplets/', - // wsssocket:'wss://hsgcs.dctpay.com/msg/WebSocket/', + url: 'https://hsg.dctpay.com/brest', + imgUrl: 'https://hsg.dctpay.com/filesystem/', + imageWxImg: 'https://hsg.dctpay.com/filesystem/wxApplets/', + wsssocket:'wss://hsg.dctpay.com/msg/WebSocket/', //测试 - url: 'https://hsgcs.dctpay.com/brest', - imgUrl: 'https://hsgcs.dctpay.com/filesystem/', - imageWxImg:'https://hsgcs.dctpay.com/filesystem/wxApplets/', - wsssocket:'wss://hsgcs.dctpay.com/msg/WebSocket/', + // url: 'https://hsgcs.dctpay.com/brest', + // imgUrl: 'https://hsgcs.dctpay.com/filesystem/', + // imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/', + // wsssocket: 'wss://hsgcs.dctpay.com/msg/WebSocket/', userInfo: "", openId: '', code: '', - token: '' + token: '', + //角色权限 + positionType:0 }, onLaunch: function() { console.log('App Launch') diff --git a/Utils/Request.js b/Utils/Request.js index 33da75e..38d3043 100644 --- a/Utils/Request.js +++ b/Utils/Request.js @@ -43,7 +43,14 @@ function request(method, url, data) { uni.showToast({ title: '请求失败', icon: 'none', - duration: 1500, + duration: 1500, + success() { + setTimeout(() => { + uni.reLaunch({ + url:'/pages/login/login/login' + }) + }, 2000); + } }) } }) diff --git a/manifest.json b/manifest.json index ab60d0c..936198d 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { - "name" : "high-mini-manage", + "name" : "嗨森逛商家端", "appid" : "__UNI__309E2E8", "description" : "", "versionName" : "1.0.0", diff --git a/pages.json b/pages.json index b00b192..c2164e2 100644 --- a/pages.json +++ b/pages.json @@ -112,7 +112,7 @@ "pagePath": "pages/tabBar/home/home", "iconPath": "static/img/tabBar/home.png", "selectedIconPath": "static/img/tabBar/home-on.png", - "text": "嗨森逛" + "text": "订单" }, { "pagePath": "pages/tabBar/user/user", diff --git a/pages/home/oderDetails/oderDetails.vue b/pages/home/oderDetails/oderDetails.vue index 6f01447..d60f7f7 100644 --- a/pages/home/oderDetails/oderDetails.vue +++ b/pages/home/oderDetails/oderDetails.vue @@ -50,7 +50,7 @@ ¥{{oilorderdetails.gasPriceGun}} - 加油升数实际升数以油站加油机为准 + 加油升数实际升数以油站加油机为准 {{oilorderdetails.gasOilLiters}}升 diff --git a/pages/login/login/login.vue b/pages/login/login/login.vue index dc60474..cb09589 100644 --- a/pages/login/login/login.vue +++ b/pages/login/login/login.vue @@ -28,25 +28,25 @@ passData: '', //密码 isRotate: false, //是否加载旋转 } - }, + }, mounted() { this.isLogin(); }, - methods: { - //判断缓存中是否登录过,直接登录 - isLogin() { - uni.getStorage({ - key: 'oilaccount', - success: (res) => { - this.phoneData = res.data - } - }); - uni.getStorage({ - key: 'oilpass', - success: (res) => { - this.passData = res.data - } - }); + methods: { + //判断缓存中是否登录过,直接登录 + isLogin() { + uni.getStorage({ + key: 'oilaccount', + success: (res) => { + this.phoneData = res.data + } + }); + uni.getStorage({ + key: 'oilpass', + success: (res) => { + this.passData = res.data + } + }); }, //登录 startLogin(e) { @@ -65,14 +65,6 @@ }); return; } - if (this.passData.length < 5) { - uni.showToast({ - icon: 'none', - position: 'bottom', - title: '密码不正确' - }); - return; - } this.isRotate = true let params = { loginName: this.phoneData, @@ -84,6 +76,9 @@ if (res.return_code == '000000' && res.return_data) { app.globalData.userInfo = res.return_data .object; + if (res.return_data.object.gasStaff) { + app.globalData.positionType = res.return_data.object.gasStaff.positionType; + } app.globalData.token = res.return_data.uniqueCode; uni.setStorage({ key: "oiluser", @@ -93,17 +88,17 @@ uni.setStorage({ key: "oiltoken", data: res.return_data.uniqueCode - }) - uni.setStorage({ - key: "oilaccount", - data: this.phoneData - }) - uni.setStorage({ - key: "oilpass", - data: this.passData - }) - uni.reLaunch({ - url: '../../tabBar/home/home' + }) + uni.setStorage({ + key: "oilaccount", + data: this.phoneData + }) + uni.setStorage({ + key: "oilpass", + data: this.passData + }) + uni.reLaunch({ + url: '../../tabBar/home/home' }) } else { uni.showToast({ diff --git a/pages/tabBar/user/user.vue b/pages/tabBar/user/user.vue index 0792fe5..3f9b68c 100644 --- a/pages/tabBar/user/user.vue +++ b/pages/tabBar/user/user.vue @@ -122,7 +122,8 @@ uni.hideLoading(); if (res.return_code == '000000') { app.globalData.userInfo = ''; - app.globalData.token = ''; + app.globalData.token = ''; + app.globalData.positionType = 0; uni.setStorage({ key: "oiluser", data: '' diff --git a/pages/user/oil-list/oil-list.vue b/pages/user/oil-list/oil-list.vue index fcc11cf..d6b2a6c 100644 --- a/pages/user/oil-list/oil-list.vue +++ b/pages/user/oil-list/oil-list.vue @@ -1,16 +1,15 @@ @@ -25,7 +24,8 @@ return { oilpriceList: [], typeid: '', //跳转类型 - userinfo: '' //用户信息 + userinfo: '', //用户信息 + positionType: app.globalData.positionType // 角色权限 } }, onLoad(Option) { diff --git a/pages/user/updateOilgun/updateOilgun.vue b/pages/user/updateOilgun/updateOilgun.vue index 3530ee3..b35a240 100644 --- a/pages/user/updateOilgun/updateOilgun.vue +++ b/pages/user/updateOilgun/updateOilgun.vue @@ -5,10 +5,10 @@ {{item.gunNo}}号枪 - + - 新 增 油 枪 + 新 增 油 枪 @@ -23,7 +23,8 @@ data() { return { oilgunList: [], //油枪列表 - oilNo: '' //油品 + oilNo: '' ,//油品 + positionType: app.globalData.positionType // 角色权限 } }, onLoad(options) { diff --git a/pages/user/updateOilprice/updateOilprice.vue b/pages/user/updateOilprice/updateOilprice.vue index 4de4b2f..3eaec88 100644 --- a/pages/user/updateOilprice/updateOilprice.vue +++ b/pages/user/updateOilprice/updateOilprice.vue @@ -15,7 +15,7 @@ - 修 改 + 修 改 @@ -33,7 +33,8 @@ discountPrice: '', //优惠价 oilNo: '', //油品 oilDetails: '', //油品详情 - userinfo: '' //个人信息 + userinfo: '' ,//个人信息 + positionType: app.globalData.positionType // 角色权限 } }, onLoad(options) {