修复商家入驻页面

parent 2b696271
...@@ -383,11 +383,12 @@ const exsitedData = ref(); ...@@ -383,11 +383,12 @@ const exsitedData = ref();
const dealCategoryData = ref([]); const dealCategoryData = ref([]);
onLoad((options) => { onLoad((options) => {
console.log(options.content);
headers.value = { Authorization: 'Bearer ' + token }; headers.value = { Authorization: 'Bearer ' + token };
if (options.id != null) { if (options.content != null) {
isNewFlag.value = false; isNewFlag.value = false;
console.log(options.id); console.log(options.content);
getShopInfoByIdFun({ shopId: options.id }); getShopInfoByIdFun({ shopId: options.content });
} }
getShopCategoryFun(); getShopCategoryFun();
}); });
...@@ -409,9 +410,7 @@ const editShopFun = async (data) => { ...@@ -409,9 +410,7 @@ const editShopFun = async (data) => {
}; };
// 根据shopId获取店铺数据 // 根据shopId获取店铺数据
const getShopInfoByIdFun = async (data) => { const getShopInfoByIdFun = async (data) => {
// let shopDetail = reactive({}); console.log(data);
// const categoryShops = ref([]);
// const information = ref({});
const res = await getShopInfoById(data); const res = await getShopInfoById(data);
exsitedData.value = res.data; exsitedData.value = res.data;
console.log(exsitedData.value); console.log(exsitedData.value);
...@@ -441,6 +440,8 @@ const getShopInfoByIdFun = async (data) => { ...@@ -441,6 +440,8 @@ const getShopInfoByIdFun = async (data) => {
formData.city = shopDetail.city; formData.city = shopDetail.city;
// 区县 // 区县
formData.area = shopDetail.area; formData.area = shopDetail.area;
ssq.value = shopDetail.province + shopDetail.city + shopDetail.area;
console.log(fileDomain + shopDetail.shopLogo); console.log(fileDomain + shopDetail.shopLogo);
// 店铺LOGO // 店铺LOGO
// fileListShopLogo.value = fileDomain + shopDetail.value.shopLogo; // fileListShopLogo.value = fileDomain + shopDetail.value.shopLogo;
...@@ -543,7 +544,7 @@ const formData = reactive({ ...@@ -543,7 +544,7 @@ const formData = reactive({
communities: [], // 绑定小区 communities: [], // 绑定小区
}); });
const ssq = ref(); const ssq = ref();
ssq.value = formData.province + formData.city + formData.area;
const form = ref(); const form = ref();
const test = ref(); const test = ref();
...@@ -665,8 +666,7 @@ async function changeLocation() { ...@@ -665,8 +666,7 @@ async function changeLocation() {
formData.shopAddress = res.address; formData.shopAddress = res.address;
formData.shopLng = res.longitude; formData.shopLng = res.longitude;
formData.shopLat = res.latitude; formData.shopLat = res.latitude;
console.log('第一层回调');
console.log(res);
uni.request({ uni.request({
url: '/ws/geocoder/v1/', url: '/ws/geocoder/v1/',
data: { data: {
...@@ -675,12 +675,13 @@ async function changeLocation() { ...@@ -675,12 +675,13 @@ async function changeLocation() {
}, },
success: function (res) { success: function (res) {
// console.log('逆地理编码:' + JSON.stringify(res)); // console.log('逆地理编码:' + JSON.stringify(res));
console.log('第二层回调');
console.log(res);
if (res.data.status === 0) { if (res.data.status === 0) {
formData.province = res.data.result.address_component.province; formData.province = res.data.result.address_component.province;
formData.city = res.data.result.address_component.city; formData.city = res.data.result.address_component.city;
formData.area = res.data.result.address_component.district; formData.area = res.data.result.address_component.district;
ssq.value = formData.province + formData.city + formData.area;
} }
}, },
}); });
......
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