Merge pull request '新增 701' (#220) from xbx into master

Reviewed-on: http://git.luyuan.tk/luyuan/deming/pulls/220
This commit is contained in:
luyuan 2020-08-17 15:15:17 +08:00
commit a5962d96df

View File

@ -56,7 +56,7 @@
<view class="cart" @click="toCartPage">
<image src="/static/image/common/3.png"></image>
</view>
<u-picker mode="selector" :range="areaList" v-model="chooseArea" range-key="area_name" @confirm="setArea"></u-picker>
<u-picker mode="region" v-model="chooseArea" @confirm="setArea"></u-picker>
</scroll-view>
</view>
</template>
@ -124,8 +124,8 @@
type: 'wgs84',
geocode: true,
success: (res) => {
// console.log(res.address);
this.area = res.address.city;
console.log(res.address);
this.area = res.address.district;
},
fail: (e) => {
console.log(e);
@ -221,7 +221,7 @@
},
setArea(e) {
console.log(e);
this.area = this.areaList[e[0]].area_name;
this.area = e.area.label;
},
toCartPage() {
uni.navigateTo({