|
|
@@ -28,10 +28,6 @@
|
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="openAddres">
|
|
|
<div class="tui-title">收花人城市</div>
|
|
|
- <!-- <picker mode="date" :value="form.reachTime" @change="selTimeFn" class="tui-input">
|
|
|
- <div v-if="form.reachTime">{{ form.reachTime }}</div>
|
|
|
- <div class="tui-placeholder" v-else>请选择</div>
|
|
|
- </picker>-->
|
|
|
<div
|
|
|
class="tui-input"
|
|
|
v-if="form.receiveProvince || form.receiveCity"
|
|
|
@@ -41,8 +37,7 @@
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="selRegionFn">
|
|
|
<div class="tui-title">详细地址</div>
|
|
|
<div class="tui-input" v-if="form.receiveAddress">{{ form.receiveAddress }}</div>
|
|
|
- <div class="tui-placeholder" v-else>请选择详细地址</div>
|
|
|
- <!-- <input v-model="form.receiveFullAddress" placeholder-class="phcolor" class="tui-input" name="receiveFullAddress" placeholder="小区、大厦或街道名称" /> -->
|
|
|
+ <div class="tui-placeholder" v-else>请选择地址</div>
|
|
|
</tui-list-cell>
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title">门牌号</div>
|
|
|
@@ -58,10 +53,6 @@
|
|
|
</div>
|
|
|
<!-- 订花人 -->
|
|
|
<div class="module-com">
|
|
|
- <!-- <tui-list-cell class="line-cell" :hover="false">
|
|
|
- <div class="tui-title">订花人姓名</div>
|
|
|
- <input v-model="form.bookName" placeholder-class="phcolor" class="tui-input" name="bookName" placeholder="请输入姓名(选填)" />
|
|
|
- </tui-list-cell>-->
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="true">
|
|
|
<div class="tui-title">送达时间</div>
|
|
|
<picker mode="date" :value="form.reachTime" @change="selTimeFn" class="tui-input">
|
|
|
@@ -87,10 +78,8 @@
|
|
|
@click="timeTodaySelFn(2)"
|
|
|
>晚上</button>
|
|
|
</div>
|
|
|
-
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<div class="tui-title">我的电话</div>
|
|
|
-
|
|
|
<!-- #ifdef MP-WEIXIN -->
|
|
|
<input
|
|
|
v-model="form.bookMobile"
|
|
|
@@ -108,10 +97,10 @@
|
|
|
@click="showPopup"
|
|
|
open-type="getPhoneNumber"
|
|
|
@getphonenumber="getWxMobile"
|
|
|
+ v-if="shopUser.mobile == ''"
|
|
|
style="padding:12rpx 25rpx;font-size:22rpx;"
|
|
|
>帮我填</button>
|
|
|
<!-- #endif -->
|
|
|
-
|
|
|
<!-- #ifndef MP-WEIXIN -->
|
|
|
<input
|
|
|
v-model="form.bookMobile"
|
|
|
@@ -191,7 +180,6 @@
|
|
|
import { mapGetters } from "vuex";
|
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
|
import AppDatePicker from "@/components/app-date-picker";
|
|
|
-// import AppTextarea from '@/components/app-textarea'
|
|
|
import SimpleAddress from "@/components/plugin/simple-address";
|
|
|
import { getUser, wxLoginFn } from "@/utils/auth";
|
|
|
import AppAreaSel from "@/components/app-area-sel";
|
|
|
@@ -202,7 +190,6 @@ export default {
|
|
|
AppAreaSel,
|
|
|
TuiListCell,
|
|
|
AppDatePicker,
|
|
|
- // AppTextarea,
|
|
|
SimpleAddress
|
|
|
},
|
|
|
props: {
|
|
|
@@ -223,7 +210,6 @@ export default {
|
|
|
receiveAddress: "", // 收花人城市
|
|
|
receiveFloor: "", // 收花人门楼号和牌号
|
|
|
receiveFullAddress: "", // 收花人完整地址,从腾讯地图接口获取
|
|
|
- // bookName: '', // 订花人姓名
|
|
|
bookMobile: "", // 订花人手机号
|
|
|
reachTime: 0, // 配送时间
|
|
|
reachPeriod: "0", // 配送时段,0上午1下午2晚上
|
|
|
@@ -237,14 +223,11 @@ export default {
|
|
|
},
|
|
|
// 省市联动
|
|
|
cityPickerValueDefault: [0, 0]
|
|
|
- // pickerText: ''
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters({ orderShop: "getOrderShop" })
|
|
|
- // regionArr() {
|
|
|
- // return this.$util.isEmpty(this.orderShop) ? [] : this.orderShop.region
|
|
|
- // }
|
|
|
+ ...mapGetters({ orderShop: "getOrderShop" }),
|
|
|
+ ...mapGetters({ shopUser: "getShopUser" })
|
|
|
},
|
|
|
watch: {
|
|
|
orderShop(val) {
|
|
|
@@ -262,9 +245,9 @@ export default {
|
|
|
? this.orderShop.shop.city
|
|
|
: "";
|
|
|
}
|
|
|
- // if (this.anonymous) {
|
|
|
- this.form.anonymous = "0";
|
|
|
- // }
|
|
|
+ this.form.anonymous = "0"
|
|
|
+ //自动填写已有手机号
|
|
|
+ this.$set(this.form, "bookMobile", this.shopUser.mobile);
|
|
|
},
|
|
|
methods: {
|
|
|
selTimeFn(e) {
|
|
|
@@ -277,14 +260,6 @@ export default {
|
|
|
return false;
|
|
|
}
|
|
|
this.showRegion = true;
|
|
|
- // let that = this
|
|
|
- // uni.chooseLocation({
|
|
|
- // success: res => {
|
|
|
- // this.form.receiveFullAddress = res.address
|
|
|
- // this.region.latitude = res.latitude
|
|
|
- // this.region.longitude = res.longitude
|
|
|
- // }
|
|
|
- // })
|
|
|
},
|
|
|
changeAreaFn(e) {
|
|
|
console.log("changeAreaFn", e);
|
|
|
@@ -294,7 +269,6 @@ export default {
|
|
|
this.region.longitude = e.location.lng;
|
|
|
this.$emit("changeAddress", e);
|
|
|
},
|
|
|
- // -----
|
|
|
timeTodaySelFn(index) {
|
|
|
this.form.reachPeriod = index;
|
|
|
},
|
|
|
@@ -314,7 +288,6 @@ export default {
|
|
|
this.form.receiveAddress = e.label;
|
|
|
this.form.receiveProvince = e.provinceName;
|
|
|
this.form.receiveCity = e.cityName;
|
|
|
- // this.pickerText = JSON.stringify(e)
|
|
|
},
|
|
|
// 获取微信手机号
|
|
|
getWxMobile(e) {
|
|
|
@@ -329,7 +302,6 @@ export default {
|
|
|
icon: "success"
|
|
|
});
|
|
|
this.form.bookMobile = res.data.mobile;
|
|
|
- //wxLoginFn(true)
|
|
|
});
|
|
|
} else {
|
|
|
this.$msg("获取信息失败!");
|