From 6b83cf4c84318d8802b530d3edd96376e34aac79 Mon Sep 17 00:00:00 2001
From: gyq <875626088@qq.com>
Date: Mon, 8 Jan 2024 14:50:25 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BA=97=E9=93=BA=E8=AE=BE?=
=?UTF-8?q?=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 5 +-
public/index.html | 5 +
src/api/shop.js | 35 +++
src/api/user.js | 24 ++
src/assets/images/upload.png | Bin 0 -> 934 bytes
src/main.js | 9 +
src/store/modules/user.js | 2 +
src/views/product/add_shop.vue | 159 +++++++++++
src/views/product/index.vue | 52 ++--
src/views/shop/components/shopInfo.vue | 312 ++++++++++++++++++++++
src/views/shop/components/shopSetting.vue | 85 ++++++
src/views/shop/shop_configuration.vue | 26 ++
src/views/system/menu/index.vue | 92 +++----
src/views/tools/storage/qiniu/index.vue | 52 ++--
14 files changed, 746 insertions(+), 112 deletions(-)
create mode 100644 src/api/user.js
create mode 100644 src/assets/images/upload.png
create mode 100644 src/views/product/add_shop.vue
create mode 100644 src/views/shop/components/shopInfo.vue
create mode 100644 src/views/shop/components/shopSetting.vue
create mode 100644 src/views/shop/shop_configuration.vue
diff --git a/package.json b/package.json
index 96d5e4f..4354f89 100644
--- a/package.json
+++ b/package.json
@@ -14,7 +14,6 @@
"svgo": "svgo -f src/assets/icons/svg --config=src/assets/icons/svgo.yml",
"new": "plop",
"dev_t": "set NODE_OPTIONS=\"--openssl-legacy-provider\" & npm run dev\n"
-
},
"repository": {
"type": "git",
@@ -29,6 +28,7 @@
"clipboard": "2.0.4",
"codemirror": "^5.49.2",
"core-js": "^2.6.12",
+ "dayjs": "^1.11.10",
"echarts": "^4.2.1",
"echarts-wordcloud": "^1.1.3",
"element-ui": "^2.15.8",
@@ -47,11 +47,12 @@
"screenfull": "4.2.0",
"sortablejs": "1.8.4",
"vue": "^2.6.14",
+ "vue-amap": "^0.5.10",
"vue-count-to": "^1.0.13",
"vue-cropper": "0.4.9",
"vue-echarts": "^5.0.0-beta.0",
"vue-ele-upload-image": "^2.0.12",
- "vue-image-crop-upload": "^2.5.0",
+ "vue-image-crop-upload": "^3.0.3",
"vue-material": "^1.0.0-beta-15",
"vue-router": "3.0.2",
"vue-splitpane": "1.0.4",
diff --git a/public/index.html b/public/index.html
index e918500..1b7144a 100644
--- a/public/index.html
+++ b/public/index.html
@@ -7,6 +7,11 @@
<%= webpackConfig.name %>
+
diff --git a/src/api/shop.js b/src/api/shop.js
index c6be2c5..4387f4f 100644
--- a/src/api/shop.js
+++ b/src/api/shop.js
@@ -11,3 +11,38 @@ export function tbProduct(params) {
params
})
}
+
+/**
+ * 商品单位列表
+ * @returns
+ */
+export function tbShopUnit(params) {
+ return request({
+ url: '/api/tbShopUnit',
+ method: 'get',
+ params
+ })
+}
+
+/**
+ * 店铺基本配置
+ * @returns
+ */
+export function tbShopCurrency(shopId) {
+ return request({
+ url: `/api/tbShopCurrency/${shopId}`,
+ method: 'get'
+ })
+}
+
+/**
+ * 修改店铺信息
+ * @returns
+ */
+export function tbShopCurrencyPut(data) {
+ return request({
+ url: `/api/tbShopCurrency`,
+ method: 'put',
+ data
+ })
+}
\ No newline at end of file
diff --git a/src/api/user.js b/src/api/user.js
new file mode 100644
index 0000000..2a4602e
--- /dev/null
+++ b/src/api/user.js
@@ -0,0 +1,24 @@
+import request from '@/utils/request'
+
+/**
+ * 用户详情
+ * @returns
+ */
+export function tbShopInfo(shopId) {
+ return request({
+ url: `/api/tbShopInfo/${shopId}`,
+ method: 'get'
+ })
+}
+
+/**
+ * 修改店铺信息
+ * @returns
+ */
+export function tbShopInfoPut(data) {
+ return request({
+ url: `/api/tbShopInfo`,
+ method: 'put',
+ data
+ })
+}
\ No newline at end of file
diff --git a/src/assets/images/upload.png b/src/assets/images/upload.png
new file mode 100644
index 0000000000000000000000000000000000000000..e2a27e67fb9f51d4ccaa53ea6ad4878c3ecfb989
GIT binary patch
literal 934
zcmeAS@N?(olHy`uVBq!ia0vp^CqS5k4M?tyST_$yNtU=qlmzFem6RtIr7}3C%(>(w`RS;##)&0oB@ZJFVu_EQc?5_5lideYUX?Im$MVB1UQ$Co(^
z4{U5){t3w1FCI+~Bo%%aJNW_7&F*m;^XD
zSXh{t7#kZL9267;1UNvLkPt*AiYg2tn0ZiD2ey|bvs_QyeYfpz-T!al4O^zZnLmk5_uysPT~D2b?ZbmVEFu*`NhZKjElnliT`$bnlG!l
zv!uG?#l-rJT>qYZHDB+r?n2VW9TjyJGE$RN#h}h%Knhm;LVxP@-Zo~}$24BKw>0+3
z+YNdXZh2d;47aUPtet-DWB$#%f4!C**PGIB>&?Hu@aqmfbGL%O-nu#);h~IZv3DOVWnPy5ehs;{;koJsWYFgyH=YM}ZyQu?ASc`AJUH54A%E$wq
znOVx(_D8i(p8rvlt|#!!uOQH;dT9dm?S*x_^HZUeCnCaLIl9Zh {
login(userInfo.username, userInfo.password, userInfo.code, userInfo.uuid).then(res => {
+ // console.log('登录成功后返回===', res)
+ localStorage.setItem('shopId', res.shopId)
setToken(res.token, rememberMe)
commit('SET_TOKEN', res.token)
setUserInfo(res.user, commit)
diff --git a/src/views/product/add_shop.vue b/src/views/product/add_shop.vue
new file mode 100644
index 0000000..80285c4
--- /dev/null
+++ b/src/views/product/add_shop.vue
@@ -0,0 +1,159 @@
+
+
+
+
+
+
+
{{ item.label }}
+
({{ item.intro }})
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 添加单位
+
+
+
+
+
+ 添加分类
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/product/index.vue b/src/views/product/index.vue
index 9a49f9c..a69d112 100644
--- a/src/views/product/index.vue
+++ b/src/views/product/index.vue
@@ -3,15 +3,8 @@
-
+
@@ -34,19 +27,19 @@
- 添加商品
+
+ 添加商品
+
-
+
-
+
{{ scope.row.name }}
@@ -74,6 +67,10 @@
+
+
+
@@ -88,22 +85,11 @@ export default {
sku: ''
},
tableData: {
- data: [
- {
- url: 'https://cash-register.oss-cn-beijing.aliyuncs.com/shop/f12c3cc097e147daa33ac4b55aca8ef3/2023-08-21/20230821-110556-2425668054.png?x-oss-process=image/resize,w_50,h_50,m_fill',
- title: '套餐商品',
- class: '烤串',
- price: 2,
- xl: 0,
- kc: 0,
- area: '收银端',
- sort: 0,
- update: '2023-11-20 16:08'
- }
- ],
+ data: [],
page: 0,
size: 10,
- loading: false
+ loading: false,
+ total: 0
}
}
},
@@ -121,14 +107,22 @@ export default {
this.query.class = ''
this.query.sku = ''
},
+ // 分页回调
+ paginationChange(e) {
+ this.tableData.page = e
+ this.tbProduct()
+ },
// 获取商品列表
async tbProduct() {
+ this.tableData.loading = true
try {
const res = await tbProduct({
page: this.tableData.page,
size: this.tableData.size
})
+ this.tableData.loading = false
this.tableData.data = res.content
+ this.tableData.total = res.totalElements
} catch (error) { }
}
}
diff --git a/src/views/shop/components/shopInfo.vue b/src/views/shop/components/shopInfo.vue
new file mode 100644
index 0000000..f24d5fb
--- /dev/null
+++ b/src/views/shop/components/shopInfo.vue
@@ -0,0 +1,312 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 选择坐标
+
+
+ 注:准确的定位便于用户导航到店铺
+
+
+
+
+
+
+
+
+
+
+
+
+ 今日
+ 次日
+
+
+
+
+
+
+
+
+
+
+
+ 营业中
+ 休息中
+
+
+
+
+ 保存
+ 保存中...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ item.name }}-{{ item.address }}
+
+ 经纬度:{{ item.lng }},{{ item.lat }}
+
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+ 点击上传
+ 请勿上传违法文件,且文件不超过15M
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/shop/components/shopSetting.vue b/src/views/shop/components/shopSetting.vue
new file mode 100644
index 0000000..5389097
--- /dev/null
+++ b/src/views/shop/components/shopSetting.vue
@@ -0,0 +1,85 @@
+
+
+
+
+
+ ¥
+
+
+
+
+
+
+
+ 元
+ 角
+ 分
+
+
+
+
+ 开启后将语音播报待处理事件
+
+
+
+ 是否允许用户在小程序端支付订单
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 保存中...
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/shop/shop_configuration.vue b/src/views/shop/shop_configuration.vue
new file mode 100644
index 0000000..ea77fde
--- /dev/null
+++ b/src/views/shop/shop_configuration.vue
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue
index e4800e1..531c770 100644
--- a/src/views/system/menu/index.vue
+++ b/src/views/system/menu/index.vue
@@ -4,15 +4,17 @@
-
-
+
+
目录
@@ -21,15 +23,11 @@
-
+
-
+
@@ -53,34 +51,37 @@
-
+
-
+
-
+
-
+
-
+
+
+
+
-
+
-
+
@@ -134,13 +126,10 @@
-
+
-
+
@@ -165,7 +154,7 @@ export default {
name: 'Menu',
components: { Treeselect, IconSelect, crudOperation, rrOperation, udOperation, DateRangePicker },
cruds() {
- return CRUD({ title: '菜单', url: 'api/menus', crudMethod: { ...crudMenu }})
+ return CRUD({ title: '菜单', url: 'api/menus', crudMethod: { ...crudMenu } })
},
mixins: [presenter(), header(), form(defaultForm), crud()],
data() {
@@ -209,7 +198,7 @@ export default {
},
getSupDepts(id) {
crudMenu.getMenuSuperior(id).then(res => {
- const children = res.map(function(obj) {
+ const children = res.map(function (obj) {
if (!obj.leaf && !obj.children) {
obj.children = null
}
@@ -221,7 +210,7 @@ export default {
loadMenus({ action, parentNode, callback }) {
if (action === LOAD_CHILDREN_OPTIONS) {
crudMenu.getMenusTree(parentNode.id).then(res => {
- parentNode.children = res.map(function(obj) {
+ parentNode.children = res.map(function (obj) {
if (!obj.leaf) {
obj.children = null
}
@@ -242,11 +231,14 @@ export default {
diff --git a/src/views/tools/storage/qiniu/index.vue b/src/views/tools/storage/qiniu/index.vue
index 1d37462..dff1274 100644
--- a/src/views/tools/storage/qiniu/index.vue
+++ b/src/views/tools/storage/qiniu/index.vue
@@ -6,38 +6,27 @@
-
+
- 上传
+ 上传
同步
- 配置
+ 配置
-
+
点击上传
请勿上传违法文件,且文件不超过15M
@@ -46,14 +35,17 @@
-
+
- {{ scope.row.key }}
+ {{ scope.row.key }}
-
+
@@ -79,7 +71,7 @@ import DateRangePicker from '@/components/DateRangePicker'
export default {
components: { eForm, pagination, crudOperation, rrOperation, DateRangePicker },
cruds() {
- return CRUD({ title: '七牛云文件', url: 'api/qiNiuContent', crudMethod: { ...crudQiNiu }})
+ return CRUD({ title: '七牛云文件', url: 'api/qiNiuContent', crudMethod: { ...crudQiNiu } })
},
mixins: [presenter(), header(), crud()],
data() {
@@ -90,11 +82,11 @@ export default {
title: '文件', dialog: false,
icon: 'el-icon-refresh',
url: '', headers: { 'Authorization': getToken() },
- dialogImageUrl: '',
+ dialogImageUrl: '',
dialogVisible: false,
- fileList: [],
- files: [],
- newWin: null
+ fileList: [],
+ files: [],
+ newWin: null
}
},
computed: {
@@ -132,7 +124,7 @@ export default {
handleBeforeRemove(file, fileList) {
for (let i = 0; i < this.files.length; i++) {
if (this.files[i].uid === file.uid) {
- crudQiNiu.del([this.files[i].id]).then(res => {})
+ crudQiNiu.del([this.files[i].id]).then(res => { })
return true
}
}
@@ -188,6 +180,4 @@ export default {
}
-
+