门店位置编辑更新
This commit is contained in:
@@ -28,10 +28,10 @@
|
||||
<view class="label">门店详细地址</view>
|
||||
<view class="right"><view>{{ vdata.shopInfo.address }}</view><up-icon name="arrow-right" color="#999999" size="15"></up-icon></view>
|
||||
</view>
|
||||
<view class="page-cell">
|
||||
<!-- <view class="page-cell">
|
||||
<view class="label">堂食功能</view>
|
||||
<view class="right"><up-switch v-model="vdata.dineIn" size="20" activeColor="#0FC161" @change="switchChange('eatModel')"></up-switch></view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="page-cell">
|
||||
<view class="label">允许打包</view>
|
||||
<view class="right"><up-switch v-model="vdata.takeout" size="20"activeColor="#0FC161" @change="switchChange('eatModel')"></up-switch></view>
|
||||
@@ -122,7 +122,10 @@ import { forIn } from 'lodash';
|
||||
const uploadImg = ref()
|
||||
const phone = ref(null)
|
||||
const vdata = reactive({
|
||||
shopInfo: {},
|
||||
shopInfo: {
|
||||
status: 2,
|
||||
isUseVip: 0,
|
||||
},
|
||||
extendList: [],
|
||||
registerTypeList: [
|
||||
{name: "先付费", value: "munchies"},
|
||||
@@ -142,6 +145,7 @@ const vdata = reactive({
|
||||
})
|
||||
onMounted(() => {
|
||||
shopExtend();
|
||||
|
||||
})
|
||||
|
||||
onShow(() => {
|
||||
@@ -304,11 +308,10 @@ let switchChange = ( type ) => {
|
||||
id : vdata.shopInfo.id,
|
||||
}
|
||||
switch ( type ){
|
||||
case "isUseVip":
|
||||
case "address":
|
||||
params.lng = vdata.shopInfo.lng;
|
||||
params.lat = vdata.shopInfo.lat;
|
||||
params.address = vdata.shopInfo.address;
|
||||
params.isUseVip = vdata.shopInfo.isUseVip;
|
||||
break;
|
||||
case "status":
|
||||
params.status = vdata.shopInfo.status;
|
||||
@@ -341,15 +344,26 @@ let switchChange = ( type ) => {
|
||||
*/
|
||||
let showMap = () => {
|
||||
// 本地 测试选择
|
||||
// return test();
|
||||
// 打开地图 && 获取省市县
|
||||
uni.chooseLocation().then((res) => {
|
||||
console.log(res);
|
||||
vdata.shopInfo.lng = res.longitude.toFixed(6); // IOS 小程序中: 经纬度12位。
|
||||
vdata.shopInfo.lat = res.latitude.toFixed(6);
|
||||
vdata.shopInfo.address = res.name;
|
||||
switchChange('address')
|
||||
});
|
||||
// 打开地图
|
||||
|
||||
uni.chooseLocation({
|
||||
// type: 'wgs84',
|
||||
success: function (res) {
|
||||
|
||||
vdata.shopInfo.lng = res.longitude.toFixed(6); // IOS 小程序中: 经纬度12位。
|
||||
vdata.shopInfo.lat = res.latitude.toFixed(6);
|
||||
vdata.shopInfo.address = res.name;
|
||||
switchChange('address')
|
||||
},
|
||||
fail: function(err) {
|
||||
uni.showToast({
|
||||
title:err,
|
||||
icon:'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -372,6 +386,8 @@ let showMap = () => {
|
||||
color: #333333;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
margin-right: 20rpx;
|
||||
.tableFee {
|
||||
width: 186rpx;
|
||||
height: 54rpx;
|
||||
|
||||
Reference in New Issue
Block a user