|
@@ -124,7 +124,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<!-- 省市联动 -->
|
|
<!-- 省市联动 -->
|
|
|
- <simple-address ref="simpleAddress" :region="orderShop.region" :pickerValueDefault="cityPickerValueDefault" @onConfirm="getCityConfirm" ></simple-address>
|
|
|
|
|
|
|
+ <simple-address ref="simpleAddress" :region="regionTree" :pickerValueDefault="cityPickerValueDefault" @onConfirm="getCityConfirm" ></simple-address>
|
|
|
|
|
|
|
|
<!-- 选择详细地址 -->
|
|
<!-- 选择详细地址 -->
|
|
|
<app-area-sel :show.sync="showRegion" :city="form.city" @change="changeAreaFn" />
|
|
<app-area-sel :show.sync="showRegion" :city="form.city" @change="changeAreaFn" />
|
|
@@ -140,6 +140,7 @@ import SimpleAddress from "@/components/plugin/simple-address";
|
|
|
import AppAreaSel from "@/components/app-area-sel";
|
|
import AppAreaSel from "@/components/app-area-sel";
|
|
|
import AppBindInfo from "@/components/app-bind-info";
|
|
import AppBindInfo from "@/components/app-bind-info";
|
|
|
import {getShop} from "@/api/common"
|
|
import {getShop} from "@/api/common"
|
|
|
|
|
+import {getRegion} from "@/api/shop"
|
|
|
export default {
|
|
export default {
|
|
|
name: "app-delivery-module",
|
|
name: "app-delivery-module",
|
|
|
components: {
|
|
components: {
|
|
@@ -176,19 +177,29 @@ export default {
|
|
|
latitude: 0,
|
|
latitude: 0,
|
|
|
longitude: 0
|
|
longitude: 0
|
|
|
},
|
|
},
|
|
|
- // 省市联动
|
|
|
|
|
|
|
+ regionTree:[],
|
|
|
cityPickerValueDefault: [0, 0]
|
|
cityPickerValueDefault: [0, 0]
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
- getShop().then(res=>{
|
|
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ getRegion().then(res=>{
|
|
|
if(res.code == 1){
|
|
if(res.code == 1){
|
|
|
- if(res.data.info){
|
|
|
|
|
- this.form.province = res.data.info.province
|
|
|
|
|
- this.form.city = res.data.info.city
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ that.regionTree = res.data.region
|
|
|
|
|
+
|
|
|
|
|
+ getShop().then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ if(res.data.info){
|
|
|
|
|
+ that.form.province = res.data.info.province
|
|
|
|
|
+ that.form.city = res.data.info.city
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
selTimeFn(e) {
|
|
selTimeFn(e) {
|