diff --git a/App.vue b/App.vue index 024e4d1..16e969c 100644 --- a/App.vue +++ b/App.vue @@ -4,6 +4,7 @@ // #endif import { loginShopAccount, + loginParseToken, userInfo } from "@/api/oaUser.js" export default { @@ -33,9 +34,13 @@ uni.setStorageSync('uniMP', info.referrerInfo?.extraData?.uniMP); uni.setStorageSync('APP_token', info.referrerInfo?.extraData?.token); try { - let res = await loginShopAccount({ - shop_token: info.referrerInfo?.extraData?.token - }); + let res = await loginParseToken({ + // token:"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjZXNoaS1taWRkbGUubGloYWluay5jbiIsImF1ZCI6ImNlc2hpLW1pZGRsZS5saWhhaW5rLmNuIiwiaWF0IjoxNzAwNzkzMjY2LCJuYmYiOjE3MDA3OTMyNjYsImV4cCI6MTcwMTM5ODA2NiwiZGF0YSI6eyJ1aWQiOjUsInBob25lIjoiMTc2ODUxNTE2NDMiLCJhdmF0YXIiOiIvcmVzb3VyY2UvaW1hZ2UvYWRtaW5hcGkvZGVmYXVsdC9kZWZhdWx0X2F2YXRhci5wbmciLCJuaWNrbmFtZSI6Ilx1NzUyOFx1NjIzNzE3Njg1MTUxNjQzIn19.ctEIiBUd6T6zpp9m3x5wdop5vnBcnpS6VOliy4uz9bc" + token: info.referrerInfo?.extraData?.token + }) + // let res = await loginShopAccount({ + // shop_token: info.referrerInfo?.extraData?.token + // }); this.$store.commit('SET_USERINFO', { user: {}, token: res.data.token diff --git a/api/oaUser.js b/api/oaUser.js index 5cf351c..b742186 100644 --- a/api/oaUser.js +++ b/api/oaUser.js @@ -69,3 +69,8 @@ export const destroyAccount = (data) => oahttp.post('/user/destroy_account', dat * 商城登录 */ export const loginShopAccount = (data) => oahttp.post('/login/shop_account', data, { noAuth: true }) + +/** + * 中台登录 + */ +export const loginParseToken = (data) => oahttp.post('/login/parseToken', data, { noAuth: true }) diff --git a/config/app.js b/config/app.js index ae60234..d42bfbc 100644 --- a/config/app.js +++ b/config/app.js @@ -2,7 +2,7 @@ let httpApiThree; let httpApi; // 总域名 let httpApiTwo; // 物流系统域名 -const env = 'local'; // 开发 +const env = 'dev'; // 开发 // const env = 'prod'; // 生产 // const env = 'prew'; // 预上线 // const env = 'local'; // 本地 @@ -19,7 +19,6 @@ switch (env) { httpApiTwo = 'https://preview-logistics.lihaink.cn' //预上线 break; case 'local': - httpApi = 'http://192.168.1.20:8000' //预上线 httpApiThree = 'http://192.168.1.20:8000' //预上线 httpApiTwo = 'http://192.168.1.20:8000' //预上线 diff --git a/pages/logistics/deliveryDetil.vue b/pages/logistics/deliveryDetil.vue index 4315930..e9b49a1 100644 --- a/pages/logistics/deliveryDetil.vue +++ b/pages/logistics/deliveryDetil.vue @@ -337,6 +337,8 @@ qrqodeFn() { + // uni.navigateBack() + // return let that = this console.log(6666) uni.scanCode({ diff --git a/pages/logistics/logisticDetil.vue b/pages/logistics/logisticDetil.vue index c0d4fe0..9d355c9 100644 --- a/pages/logistics/logisticDetil.vue +++ b/pages/logistics/logisticDetil.vue @@ -82,7 +82,7 @@ - X{{item.product_num}}{{item.goods_unit}} + X{{item.product_num}} @@ -211,7 +211,7 @@ {{item.goods_name}} - X{{item.product_num}}{{item.goods_unit}} + X{{item.product_num}} @@ -320,7 +320,7 @@ {{item.goods_name}} - X{{item.product_num}}{{item.goods_unit}} + X{{item.product_num}} @@ -377,6 +377,9 @@ import { getDetil } from "@/api/logistics.js" + import { + Toast + } from "../../libs/uniApi" export default { data() { return { @@ -419,6 +422,8 @@ setTimeout(() => { uni.navigateBack() }, 2000) + }).catch((err) => { + Toast(err.msg) }) this.showPop = false diff --git a/pages/oaHome/oaHome.vue b/pages/oaHome/oaHome.vue index f5ecb88..ec8e508 100644 --- a/pages/oaHome/oaHome.vue +++ b/pages/oaHome/oaHome.vue @@ -315,6 +315,8 @@ // this.getUserIndex() // this.getIndexList() let user_id = JSON.parse(uni.getStorageSync("USER_INFO")).id + this.getOrderList(); + console.log("show") getAreaManagerApi({ user_id }).then(res => { @@ -335,7 +337,6 @@ this.initUserInfo(); this.showToask(); // this.initOaHomeDada(); - this.getOrderList(); //#ifdef APP-PLUS this.noticeFn(); // #endif @@ -434,6 +435,7 @@ // courier_id: 167 }); this.orderList = res.data.data; + console.log("获取列表") }, goOrderList() { uni.navigateTo({ diff --git a/store/modules/app.js b/store/modules/app.js index bb3aab9..122f992 100644 --- a/store/modules/app.js +++ b/store/modules/app.js @@ -33,6 +33,8 @@ const mutations = { state.token = null; Cache.clear('USER_INFO') Cache.clear('TOKEN') + + uni.clearStorageSync() }, UPDATE_USERINFO(state, data) { let time = res.data.result.expires_time - Cache.time(); diff --git a/subpkg/merchantDetails/merchantDetails.vue b/subpkg/merchantDetails/merchantDetails.vue index 7bc5a97..73753ba 100644 --- a/subpkg/merchantDetails/merchantDetails.vue +++ b/subpkg/merchantDetails/merchantDetails.vue @@ -1,424 +1,431 @@ \ No newline at end of file diff --git a/subpkg/topUp/topUp.vue b/subpkg/topUp/topUp.vue index 53154e0..9033ea6 100644 --- a/subpkg/topUp/topUp.vue +++ b/subpkg/topUp/topUp.vue @@ -152,13 +152,14 @@ }) // console.log(res1.data, res1.data.config.package.split('=')[1]); let obj = { - "appid": res1.data.appid, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致 - "noncestr": res1.data.noncestr, // 随机字符串 - "package": res1.data.package, // 固定值 - "partnerid": res1.data.partnerid, // 微信支付商户号 - "prepayid": res1.data.prepayid, // 统一下单订单号 - "timestamp": res1.data.timestamp, // 时间戳(单位:秒) - "sign": res1.data.sign + "appid": res1.data.config + .appId, // 微信开放平台 - 应用 - AppId,注意和微信小程序、公众号 AppId 可能不一致 + "noncestr": res1.data.config.nonceStr, // 随机字符串 + "package": res1.data.config.package, // 固定值 + "partnerid": res1.data.config.partnerid, // 微信支付商户号 + "prepayid": res1.data.config.package.split('=')[1], // 统一下单订单号 + "timestamp": res1.data.config.timestamp, // 时间戳(单位:秒) + "sign": res1.data.config.paySign } uni.getProvider({