diff --git a/dist.zip b/dist.zip deleted file mode 100644 index 222363e..0000000 Binary files a/dist.zip and /dev/null differ diff --git a/index.html b/index.html index 7809021..7fe64e5 100644 --- a/index.html +++ b/index.html @@ -67,5 +67,5 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/src/api/goods.ts b/src/api/goods.ts index 51e53a4..c9699b4 100644 --- a/src/api/goods.ts +++ b/src/api/goods.ts @@ -23,4 +23,9 @@ export function apiGoodsDelete(params: any) { // 商品主表详情 export function apiGoodsDetail(params: any) { return request.get({ url: '/goods/detail', params }) +} + +// 商品分类列表 +export function checkCategory(params: any) { + return request.post({ url: '/goodsCategory/checkCategory', params }) } \ No newline at end of file diff --git a/src/api/goods_category.ts b/src/api/goods_category.ts new file mode 100644 index 0000000..d43ee65 --- /dev/null +++ b/src/api/goods_category.ts @@ -0,0 +1,26 @@ +import request from '@/utils/request' + +// 商品分类列表 +export function apiGoodsCategoryLists(params: any) { + return request.get({ url: '/goods_category/lists', params }) +} + +// 添加商品分类 +export function apiGoodsCategoryAdd(params: any) { + return request.post({ url: '/goods_category/add', params }) +} + +// 编辑商品分类 +export function apiGoodsCategoryEdit(params: any) { + return request.post({ url: '/goods_category/edit', params }) +} + +// 删除商品分类 +export function apiGoodsCategoryDelete(params: any) { + return request.post({ url: '/goods_category/delete', params }) +} + +// 商品分类详情 +export function apiGoodsCategoryDetail(params: any) { + return request.get({ url: '/goods_category/detail', params }) +} \ No newline at end of file diff --git a/src/components/map/map-choose.vue b/src/components/map/map-choose.vue index 2f8347e..f015794 100644 --- a/src/components/map/map-choose.vue +++ b/src/components/map/map-choose.vue @@ -1,82 +1,110 @@ - \ No newline at end of file + //定义map变量,调用 TMap.Map() 构造函数创建地图 + map = new TMap.Map(document.getElementById("tx_map_d"), { + center: center, //设置地图中心点坐标 + zoom: 17.2, //设置地图缩放级别 + pitch: 43.5, //设置俯仰角 + rotation: 45, //设置地图旋转角度 + }); + removeMarker(); + createMarker(center); + + geocoder = new TMap.service.Geocoder(); // 新建一个正逆地址解析类 + + // 创建点聚合实例 + map.on("click", function (evt) { + loc.lat = evt.latLng.getLat(); + loc.lng = evt.latLng.getLng(); + removeMarker(); + createMarker(evt.latLng); + }); + }; + const createMarker = (latLng) => { + if (!markerFlag) { + markerFlag = new TMap.MultiMarker({ + id: "marker-layer", + map: map, + geometries: [ + { + id: "marker", + styleId: "marker", + position: latLng, + }, + ], + }); + emit('update:coordinate', { 'lat': latLng.lat, 'lng': latLng.lng }); + } + }; + const removeMarker = () => { + if (markerFlag) { + markerFlag.setMap(null); + markerFlag = null; + } + }; + const covert = (val) => { + geocoder.getLocation({ address: val }).then((result) => { + removeMarker(); + createMarker(result.result.location); + // 设置地图中心为新地址位置 + map.setCenter(result.result.location); + }); + }; + // 搜索地址 + const handleSearch = () => { + if (searchKeyword.value) { + covert(searchKeyword.value); + } + }; + return { + handleSearch, + searchKeyword, + }; + }, +}); + + + diff --git a/src/views/goods/edit copy.vue b/src/views/goods/edit copy.vue new file mode 100644 index 0000000..bd7f0d6 --- /dev/null +++ b/src/views/goods/edit copy.vue @@ -0,0 +1,348 @@ + + + diff --git a/src/views/goods/edit.vue b/src/views/goods/edit.vue index bd7f0d6..fcab077 100644 --- a/src/views/goods/edit.vue +++ b/src/views/goods/edit.vue @@ -2,13 +2,49 @@
- - - - - - - + + + + + + + + + + + + +
+ + + + +
+ +
+ + + + +
+ +
+ + + + +
+
+ + +
+ + + +
+
@@ -151,7 +187,7 @@ diff --git a/src/views/goods_category/index.vue b/src/views/goods_category/index.vue new file mode 100644 index 0000000..c077699 --- /dev/null +++ b/src/views/goods_category/index.vue @@ -0,0 +1,165 @@ + + + + diff --git a/src/views/shop/edit.vue b/src/views/shop/edit.vue index 4b4652e..e003562 100644 --- a/src/views/shop/edit.vue +++ b/src/views/shop/edit.vue @@ -19,36 +19,25 @@ - - - - + - - -
- -
- 取消 - 确认 -
-
-
+
-