Commit 2b4b7b8d authored by ziyu's avatar ziyu

improvement: 优化

parent c12c7ca6
This diff is collapsed.
...@@ -205,6 +205,7 @@ ...@@ -205,6 +205,7 @@
import Notify from '../components/vant/notify/notify'; import Notify from '../components/vant/notify/notify';
import Dialog from '../components/vant/dialog/dialog'; import Dialog from '../components/vant/dialog/dialog';
import { login, register, getMainInfo, addGold, getPrizeList, signIn, getActivityFeed, checkCornCode } from '../common/api.js'; import { login, register, getMainInfo, addGold, getPrizeList, signIn, getActivityFeed, checkCornCode } from '../common/api.js';
let flag = false;
wepy.page({ wepy.page({
store, store,
data: { data: {
...@@ -446,6 +447,8 @@ ...@@ -446,6 +447,8 @@
// 获取openid // 获取openid
await this.getOpenId(); await this.getOpenId();
this.getMainInfo();
flag = true;
// 获取用户信息并注册 // 获取用户信息并注册
if (this.userInfo.nickName) { if (this.userInfo.nickName) {
...@@ -468,7 +471,9 @@ ...@@ -468,7 +471,9 @@
}, },
async onShow() { async onShow() {
// 获取主页信息 // 获取主页信息
this.getMainInfo(); if(flag) {
this.getMainInfo();
}
let join = wx.getStorageSync('userJoin'); let join = wx.getStorageSync('userJoin');
if (join === 1) { if (join === 1) {
......
...@@ -59,6 +59,9 @@ ...@@ -59,6 +59,9 @@
font-size: @font-large; font-size: @font-large;
} }
} }
.addtitle{
color:#c8c9cc
}
.van-picker .van-picker__cancel,.van-picker .van-picker__confirm{ .van-picker .van-picker__cancel,.van-picker .van-picker__confirm{
color:@maincolor; color:@maincolor;
} }
...@@ -81,7 +84,7 @@ ...@@ -81,7 +84,7 @@
<van-field value="{{name}}" data-form="name" placeholder="收货人" bind:input ="setValue"></van-field> <van-field value="{{name}}" data-form="name" placeholder="收货人" bind:input ="setValue"></van-field>
<van-field value="{{phone}}" data-form="phone" placeholder="手机号码" bind:input ="setValue" maxlength="{{11}}"></van-field> <van-field value="{{phone}}" data-form="phone" placeholder="手机号码" bind:input ="setValue" maxlength="{{11}}"></van-field>
<van-field value="{{idNumber}}" data-form="idNumber" placeholder="收货人身份证号(应监管要求,必须填写)" bind:input ="setValue"></van-field> <van-field value="{{idNumber}}" data-form="idNumber" placeholder="收货人身份证号(应监管要求,必须填写)" bind:input ="setValue"></van-field>
<van-field value="{{cityValue}}" placeholder="所在地区" bindtap="onClose" is-link readonly></van-field> <van-cell title="{{cityValue}}" is-link bindtap="onClose" title-class="{{!city?'addtitle':''}}"></van-cell>
<van-field value="{{address}}" data-form="address" placeholder="详细地址:如街道、小区、门牌号、楼栋号等" bind:input ="setValue"></van-field> <van-field value="{{address}}" data-form="address" placeholder="详细地址:如街道、小区、门牌号、楼栋号等" bind:input ="setValue"></van-field>
</view> </view>
</view> </view>
...@@ -113,7 +116,7 @@ ...@@ -113,7 +116,7 @@
province: '', province: '',
city: '', city: '',
county: '', county: '',
cityValue: '', cityValue: '所在地区',
areaList: [], areaList: [],
showAddress: false, showAddress: false,
joinRecordId: null, joinRecordId: null,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment