|
@@ -2,7 +2,8 @@
|
|
|
<view class="login-main">
|
|
|
<view style="width: 100%; height: 220px">
|
|
|
<view class="login-main-content">
|
|
|
- <image class="img" :src="shopInfo?shopInfo.store_logo_url:''" mode=""></image>
|
|
|
+ <image class="img" :src="shopInfo.store_logo_url?shopInfo.store_logo_url:'/static/images/error.jpeg'"
|
|
|
+ mode=""></image>
|
|
|
<h4 class="shopName">{{shopInfo?shopInfo.store_name:""}}</h4>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -19,12 +20,6 @@
|
|
|
<button class="btn" @click="Pay">立即支付</button>
|
|
|
<view style="margin-top: 20rpx; font-size: 26rpx">
|
|
|
支付成功后,次日有奖励红包,农商直采小程序领取
|
|
|
- <!-- 支付成功立返
|
|
|
- <span
|
|
|
- style="color: red">
|
|
|
-
|
|
|
- {{ requestConfig.pay }}元</span>红包,可进入农商网小程序查看
|
|
|
- -->
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -84,13 +79,16 @@
|
|
|
price: null,
|
|
|
shopId: "",
|
|
|
shopInfo: {},
|
|
|
- localUserInfo: {}
|
|
|
+ localUserInfo: {},
|
|
|
+ uid: ""
|
|
|
|
|
|
};
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
this.shopId = options.shopId
|
|
|
- let info = localStorage.getItem('weChatUserInfo');
|
|
|
+ this.uid = options.uid
|
|
|
+ console.log(this.uid);
|
|
|
+ let info = localStorage.getItem('wechatuserInfo');
|
|
|
this.localUserInfo = JSON.parse(info)
|
|
|
if (this.localUserInfo) {
|
|
|
this.vidTokenExist()
|
|
@@ -112,7 +110,7 @@
|
|
|
this.getShopInfo();
|
|
|
} else {
|
|
|
uni.$u.toast('登录已过期,请重新登录!');
|
|
|
- localStorage.removeItem('weChatUserInfo');
|
|
|
+ localStorage.removeItem('wechatuserInfo');
|
|
|
setTimeout(() => {
|
|
|
uni.redirectTo({
|
|
|
url: '/pages/index/index?shopId=' + this.shopId
|
|
@@ -135,7 +133,7 @@
|
|
|
|
|
|
async getShopInfo() {
|
|
|
let res = await axios.get(
|
|
|
- `${requestConfig.BaseUrl}user/app/v1/store/getStoreInfoByScan?shopId=${this.shopId}`, {
|
|
|
+ `${requestConfig.BaseUrl}user/app/v1/store/getStoreInfoByScan?shopId=${this.shopId}&uid=${this.uid}`, {
|
|
|
headers: {
|
|
|
'token': `${this.userInfo.token}`
|
|
|
}
|
|
@@ -198,7 +196,7 @@
|
|
|
uni.$u.toast('请输入支付金额!');
|
|
|
}
|
|
|
let res = await axios.get(`${requestConfig.BaseUrl}order/app/v1/buyer/order/createOfflineOrder
|
|
|
- ?shopId=${this.shopId}&price=${this.price}`, {
|
|
|
+ ?shopId=${this.shopId}&price=${this.price}&uid=${this.uid}`, {
|
|
|
headers: {
|
|
|
'token': `${this.userInfo.token}`
|
|
|
}
|
|
@@ -254,7 +252,7 @@
|
|
|
}
|
|
|
} else if (res.data.code == 403) {
|
|
|
uni.$u.toast('登录已过期,请重新登录!');
|
|
|
- localStorage.removeItem('weChatUserInfo');
|
|
|
+ localStorage.removeItem('wechatuserInfo');
|
|
|
setTimeout(() => {
|
|
|
uni.redirectTo({
|
|
|
url: '/pages/index/index'
|
|
@@ -273,9 +271,7 @@
|
|
|
);
|
|
|
if (res.data.code == 200) {
|
|
|
this.userInfo = res.data.data;
|
|
|
-
|
|
|
localStorage.setItem('weChatUserInfo', JSON.stringify(this.userInfo))
|
|
|
-
|
|
|
if (this.userInfo.bindPhoneStatus == 0) {
|
|
|
this.showPhone = true
|
|
|
} else {
|