Browse Source

显示“未填写地址”,跳转用户主页

master
yangrz 2 years ago
parent
commit
8c16199c07
  1. 2
      agentApp/manifest.json
  2. 2
      agentApp/pages/merchant-index/index.vue
  3. 2
      agentApp/pages/payment/payment.vue
  4. 23
      agentApp/pages/user-login/index.vue

2
agentApp/manifest.json

@ -130,7 +130,7 @@
"template" : "template.h5.html",
"router" : {
"mode" : "history",
"base" : "/h5/"
"base" : "/wap/"
},
"optimization" : {
"treeShaking" : {

2
agentApp/pages/merchant-index/index.vue

@ -7,7 +7,7 @@
<image v-else style="width: 110rpx;height: 110rpx;" src="/static/index/head-sculpture.png" alt="" />
<view class="information-content">
<view class="information-name">{{accountInfo.name}}</view>
<view class="address-text">地址{{accountInfo.address}}</view>
<view class="address-text">地址{{accountInfo.address || '未填写地址'}}</view>
</view>
</view>
<view class="information-id-content">

2
agentApp/pages/payment/payment.vue

@ -13,7 +13,7 @@
{{merchant.name}}
</view>
<view class="paddre">
{{merchant.address}}
{{merchant.address || '未填写地址'}}
</view>
</view>
</view>

23
agentApp/pages/user-login/index.vue

@ -1,23 +1,23 @@
<template>
<view class="app-container">
登录中...
登录中...
</view>
</template>
<script>
export default {
data() {
return {
};
return {};
},
onLoad(q) {
let payment_code = q.payment_code;
let user_token = q.token;
let to = q.to;
if (!payment_code || !user_token) {
if (!to || (to == 'payment' && !payment_code) || !user_token) {
uni.showToast({
title:'缺少参数',
icon:'none'
title: '缺少参数',
icon: 'none'
})
return;
}
@ -25,10 +25,15 @@
uni.setStorageSync('user_token', user_token);
uni.setStorageSync('payment_code', payment_code);
uni.redirectTo({
url:'/pages/payment/payment'
let url = '/pages/payment/payment';
if (to == 'index') {
url = '/pages/user-orders/user-orders'
}
uni.reLaunch({
url
})
}
}
</script>
Loading…
Cancel
Save