diff --git a/src/api/map.ts b/src/api/map.ts index 1147615..98e6697 100644 --- a/src/api/map.ts +++ b/src/api/map.ts @@ -9,3 +9,13 @@ export async function queryArea(str: string, region: string) { }) } + +export async function addressToLoc(address: string) { + let data = { address } + return request({ + url: '/area/geocoder', + method: 'post', + data + }) + +} diff --git a/src/api/shop.ts b/src/api/shop.ts index 24bf9be..a77e3df 100644 --- a/src/api/shop.ts +++ b/src/api/shop.ts @@ -5,6 +5,7 @@ export const defaultShopData: IShopData = { name: '', _id: '', address: '', + logo: '' } export const getShops = (params: any) => diff --git a/src/api/types.d.ts b/src/api/types.d.ts index fb4ec46..2e389b9 100644 --- a/src/api/types.d.ts +++ b/src/api/types.d.ts @@ -47,5 +47,11 @@ export interface IShopData { createdAt?: Date, areaCode?: number, areaStr?: string, - address: string + address: string, + logo?: string, + lng?: number, + lat?: number, + showName?: string, + extData?: string, + category?: string } diff --git a/src/components/UploadImage/index.vue b/src/components/UploadImage/index.vue index 2a1054e..3c3d10d 100644 --- a/src/components/UploadImage/index.vue +++ b/src/components/UploadImage/index.vue @@ -2,32 +2,33 @@
将文件拖到此处,或点击上传
-
-
- -
- -
-
-
+ + + + + + + + + + + + + +
@@ -88,7 +93,6 @@ export default class extends Vue { .image-preview { width: 200px; - height: 200px; position: relative; border: 1px dashed #d9d9d9; float: left; @@ -97,18 +101,15 @@ export default class extends Vue { .image-preview-wrapper { position: relative; width: 100%; - height: 100%; img { width: 100%; - height: 100%; } } .image-preview-action { position: absolute; width: 100%; - height: 100%; left: 0; top: 0; cursor: default; diff --git a/src/router/modules/marketing.ts b/src/router/modules/marketing.ts index 72df80c..c4b0856 100644 --- a/src/router/modules/marketing.ts +++ b/src/router/modules/marketing.ts @@ -30,16 +30,16 @@ const marketingRoutes: RouteConfig = { icon: 'promo' } }, - // { - // path: 'points', - // component: () => import('@/views/marketing/points.vue'), - // name: 'PointsSetting', - // meta: { - // title: 'marketing_points', - // permissions: ['points:read'], - // icon: 'points' - // } - // } + { + path: 'points', + component: () => import('@/views/marketing/points.vue'), + name: 'PointsSetting', + meta: { + title: 'marketing_points', + permissions: ['points:read'], + icon: 'points' + } + } ] } diff --git a/src/views/marketing/points.vue b/src/views/marketing/points.vue index 96f461d..fdcbaea 100644 --- a/src/views/marketing/points.vue +++ b/src/views/marketing/points.vue @@ -1,187 +1,135 @@ diff --git a/src/views/shop/edit.vue b/src/views/shop/edit.vue index 4a676d2..3d54df1 100644 --- a/src/views/shop/edit.vue +++ b/src/views/shop/edit.vue @@ -8,7 +8,6 @@ class="form-container" > + + + + + + @@ -49,6 +69,25 @@ required /> + + {{postForm.lat}} - {{postForm.lng}} + + 更新座标 + + + + +