This commit is contained in:
zmj 2023-12-04 09:17:36 +08:00
commit 96d2552de2
9 changed files with 433 additions and 405 deletions

11
App.vue
View File

@ -4,6 +4,7 @@
// #endif // #endif
import { import {
loginShopAccount, loginShopAccount,
loginParseToken,
userInfo userInfo
} from "@/api/oaUser.js" } from "@/api/oaUser.js"
export default { export default {
@ -33,9 +34,13 @@
uni.setStorageSync('uniMP', info.referrerInfo?.extraData?.uniMP); uni.setStorageSync('uniMP', info.referrerInfo?.extraData?.uniMP);
uni.setStorageSync('APP_token', info.referrerInfo?.extraData?.token); uni.setStorageSync('APP_token', info.referrerInfo?.extraData?.token);
try { try {
let res = await loginShopAccount({ let res = await loginParseToken({
shop_token: info.referrerInfo?.extraData?.token // token:"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJjZXNoaS1taWRkbGUubGloYWluay5jbiIsImF1ZCI6ImNlc2hpLW1pZGRsZS5saWhhaW5rLmNuIiwiaWF0IjoxNzAwNzkzMjY2LCJuYmYiOjE3MDA3OTMyNjYsImV4cCI6MTcwMTM5ODA2NiwiZGF0YSI6eyJ1aWQiOjUsInBob25lIjoiMTc2ODUxNTE2NDMiLCJhdmF0YXIiOiIvcmVzb3VyY2UvaW1hZ2UvYWRtaW5hcGkvZGVmYXVsdC9kZWZhdWx0X2F2YXRhci5wbmciLCJuaWNrbmFtZSI6Ilx1NzUyOFx1NjIzNzE3Njg1MTUxNjQzIn19.ctEIiBUd6T6zpp9m3x5wdop5vnBcnpS6VOliy4uz9bc"
}); token: info.referrerInfo?.extraData?.token
})
// let res = await loginShopAccount({
// shop_token: info.referrerInfo?.extraData?.token
// });
this.$store.commit('SET_USERINFO', { this.$store.commit('SET_USERINFO', {
user: {}, user: {},
token: res.data.token token: res.data.token

View File

@ -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 loginShopAccount = (data) => oahttp.post('/login/shop_account', data, { noAuth: true })
/**
* 中台登录
*/
export const loginParseToken = (data) => oahttp.post('/login/parseToken', data, { noAuth: true })

View File

@ -2,7 +2,7 @@ let httpApiThree;
let httpApi; // 总域名 let httpApi; // 总域名
let httpApiTwo; // 物流系统域名 let httpApiTwo; // 物流系统域名
const env = 'local'; // 开发 const env = 'dev'; // 开发
// const env = 'prod'; // 生产 // const env = 'prod'; // 生产
// const env = 'prew'; // 预上线 // const env = 'prew'; // 预上线
// const env = 'local'; // 本地 // const env = 'local'; // 本地
@ -19,7 +19,6 @@ switch (env) {
httpApiTwo = 'https://preview-logistics.lihaink.cn' //预上线 httpApiTwo = 'https://preview-logistics.lihaink.cn' //预上线
break; break;
case 'local': case 'local':
httpApi = 'http://192.168.1.20:8000' //预上线 httpApi = 'http://192.168.1.20:8000' //预上线
httpApiThree = 'http://192.168.1.20:8000' //预上线 httpApiThree = 'http://192.168.1.20:8000' //预上线
httpApiTwo = 'http://192.168.1.20:8000' //预上线 httpApiTwo = 'http://192.168.1.20:8000' //预上线

View File

@ -337,6 +337,8 @@
qrqodeFn() { qrqodeFn() {
// uni.navigateBack()
// return
let that = this let that = this
console.log(6666) console.log(6666)
uni.scanCode({ uni.scanCode({

View File

@ -82,7 +82,7 @@
<!-- <u--image style="flex: 2;" :showLoading="true" :src="item.goods_pic" width="100rpx" <!-- <u--image style="flex: 2;" :showLoading="true" :src="item.goods_pic" width="100rpx"
height="100rpx" @click="click"></u--image> --> height="100rpx" @click="click"></u--image> -->
<text>X{{item.product_num}}{{item.goods_unit}}</text> <text>X{{item.product_num}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -211,7 +211,7 @@
<u--image style="flex: 2;margin-right: 20rpx;" radius='10' :showLoading="true" <u--image style="flex: 2;margin-right: 20rpx;" radius='10' :showLoading="true"
:src="item.goods_pic" width="100rpx" height="100rpx"></u--image> :src="item.goods_pic" width="100rpx" height="100rpx"></u--image>
<text style="width: 70vw;margin: 0;padding: 0;">{{item.goods_name}}</text> <text style="width: 70vw;margin: 0;padding: 0;">{{item.goods_name}}</text>
<text>X{{item.product_num}}{{item.goods_unit}}</text> <text>X{{item.product_num}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -320,7 +320,7 @@
<u--image style="flex: 2;margin-right: 20rpx;" radius='10' :showLoading="true" <u--image style="flex: 2;margin-right: 20rpx;" radius='10' :showLoading="true"
:src="item.goods_pic" width="100rpx" height="100rpx"></u--image> :src="item.goods_pic" width="100rpx" height="100rpx"></u--image>
<text style="width: 70vw;margin: 0;padding: 0;">{{item.goods_name}}</text> <text style="width: 70vw;margin: 0;padding: 0;">{{item.goods_name}}</text>
<text>X{{item.product_num}}{{item.goods_unit}}</text> <text>X{{item.product_num}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -377,6 +377,9 @@
import { import {
getDetil getDetil
} from "@/api/logistics.js" } from "@/api/logistics.js"
import {
Toast
} from "../../libs/uniApi"
export default { export default {
data() { data() {
return { return {
@ -419,6 +422,8 @@
setTimeout(() => { setTimeout(() => {
uni.navigateBack() uni.navigateBack()
}, 2000) }, 2000)
}).catch((err) => {
Toast(err.msg)
}) })
this.showPop = false this.showPop = false

View File

@ -315,6 +315,8 @@
// this.getUserIndex() // this.getUserIndex()
// this.getIndexList() // this.getIndexList()
let user_id = JSON.parse(uni.getStorageSync("USER_INFO")).id let user_id = JSON.parse(uni.getStorageSync("USER_INFO")).id
this.getOrderList();
console.log("show")
getAreaManagerApi({ getAreaManagerApi({
user_id user_id
}).then(res => { }).then(res => {
@ -335,7 +337,6 @@
this.initUserInfo(); this.initUserInfo();
this.showToask(); this.showToask();
// this.initOaHomeDada(); // this.initOaHomeDada();
this.getOrderList();
//#ifdef APP-PLUS //#ifdef APP-PLUS
this.noticeFn(); this.noticeFn();
// #endif // #endif
@ -434,6 +435,7 @@
// courier_id: 167 // courier_id: 167
}); });
this.orderList = res.data.data; this.orderList = res.data.data;
console.log("获取列表")
}, },
goOrderList() { goOrderList() {
uni.navigateTo({ uni.navigateTo({

View File

@ -33,6 +33,8 @@ const mutations = {
state.token = null; state.token = null;
Cache.clear('USER_INFO') Cache.clear('USER_INFO')
Cache.clear('TOKEN') Cache.clear('TOKEN')
uni.clearStorageSync()
}, },
UPDATE_USERINFO(state, data) { UPDATE_USERINFO(state, data) {
let time = res.data.result.expires_time - Cache.time(); let time = res.data.result.expires_time - Cache.time();

View File

@ -72,7 +72,8 @@
<view class="body"> <view class="body">
<block v-for="(item, index) in extend.qualification"> <block v-for="(item, index) in extend.qualification">
<image @click="priview(item)" :src="item"></image> <image @click="priview(item)" :src="item"></image>
<view v-if="index<extend.qualification.length-1" style="border-top: 1px dashed #0022c7;margin: 28rpx 0;"> <view v-if="index<extend.qualification.length-1"
style="border-top: 1px dashed #0022c7;margin: 28rpx 0;">
</view> </view>
</block> </block>
</view> </view>
@ -86,11 +87,11 @@
</view> </view>
<view class="body"> <view class="body">
<view class="b_item"> <view class="b_item">
<view>银行账户姓名:</view> <view>开户银行名称:</view>
<view>{{extend.bank_username}}</view> <view>{{extend.bank_username}}</view>
</view> </view>
<view class="b_item"> <view class="b_item">
<view>开户行:</view> <view>银行卡号:</view>
<view>{{extend.bank_opening}}</view> <view>{{extend.bank_opening}}</view>
</view> </view>
<view class="b_item"> <view class="b_item">
@ -142,14 +143,19 @@
</view> </view>
</view> </view>
</u-popup> </u-popup>
<u-modal :show="tipShow" title="提示" content='确认信息无误再通过' closeOnClickOverlay showCancelButton @close="tipShow=false" <u-modal :show="tipShow" title="提示" content='确认信息无误再通过' closeOnClickOverlay showCancelButton
@cancel="tipShow=false" @confirm="$u.throttle(pass, 1500)"></u-modal> @close="tipShow=false" @cancel="tipShow=false" @confirm="$u.throttle(pass, 1500)"></u-modal>
</view> </view>
</template> </template>
<script> <script>
import { Toast } from '../../libs/uniApi' import {
import { approveAudit, approveDetails } from "@/api/approve.js" Toast
} from '../../libs/uniApi'
import {
approveAudit,
approveDetails
} from "@/api/approve.js"
export default { export default {
data() { data() {
return { return {
@ -190,7 +196,8 @@
}); });
this.formData = res.data; this.formData = res.data;
this.extend = this.formData?.extend; this.extend = this.formData?.extend;
this.extend.qualification ? this.extend.qualification = JSON.parse(this.extend.qualification) : this.extend this.extend.qualification ? this.extend.qualification = JSON.parse(this.extend.qualification) :
this.extend
.qualification = [] .qualification = []
} catch (e) { } catch (e) {
//TODO handle the exception //TODO handle the exception

View File

@ -152,13 +152,14 @@
}) })
// console.log(res1.data, res1.data.config.package.split('=')[1]); // console.log(res1.data, res1.data.config.package.split('=')[1]);
let obj = { let obj = {
"appid": res1.data.appid, // - - AppId AppId "appid": res1.data.config
"noncestr": res1.data.noncestr, // .appId, // - - AppId AppId
"package": res1.data.package, // "noncestr": res1.data.config.nonceStr, //
"partnerid": res1.data.partnerid, // "package": res1.data.config.package, //
"prepayid": res1.data.prepayid, // "partnerid": res1.data.config.partnerid, //
"timestamp": res1.data.timestamp, // "prepayid": res1.data.config.package.split('=')[1], //
"sign": res1.data.sign "timestamp": res1.data.config.timestamp, //
"sign": res1.data.config.paySign
} }
uni.getProvider({ uni.getProvider({