修复商家入驻页面

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