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. 31
      agentApp/pages/user-login/index.vue

2
agentApp/manifest.json

@ -130,7 +130,7 @@
"template" : "template.h5.html", "template" : "template.h5.html",
"router" : { "router" : {
"mode" : "history", "mode" : "history",
"base" : "/h5/"
"base" : "/wap/"
}, },
"optimization" : { "optimization" : {
"treeShaking" : { "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="" /> <image v-else style="width: 110rpx;height: 110rpx;" src="/static/index/head-sculpture.png" alt="" />
<view class="information-content"> <view class="information-content">
<view class="information-name">{{accountInfo.name}}</view> <view class="information-name">{{accountInfo.name}}</view>
<view class="address-text">地址{{accountInfo.address}}</view>
<view class="address-text">地址{{accountInfo.address || '未填写地址'}}</view>
</view> </view>
</view> </view>
<view class="information-id-content"> <view class="information-id-content">

2
agentApp/pages/payment/payment.vue

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

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

@ -1,34 +1,39 @@
<template> <template>
<view class="app-container"> <view class="app-container">
登录中...
登录中...
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return {
};
return {};
}, },
onLoad(q) { onLoad(q) {
let payment_code = q.payment_code; let payment_code = q.payment_code;
let user_token = q.token; let user_token = q.token;
if (!payment_code || !user_token) {
let to = q.to;
if (!to || (to == 'payment' && !payment_code) || !user_token) {
uni.showToast({ uni.showToast({
title:'缺少参数',
icon:'none'
title: '缺少参数',
icon: 'none'
}) })
return; return;
} }
uni.setStorageSync('user_token', user_token); uni.setStorageSync('user_token', user_token);
uni.setStorageSync('payment_code', payment_code); 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>
</script>
Loading…
Cancel
Save