From 19a5960e1c1b53b24c7abe5eb571c30daa34cdb1 Mon Sep 17 00:00:00 2001 From: liaoxiping <1104442507@qq.com> Date: Sat, 7 Aug 2021 11:07:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 1 + package-lock.json | 5 + package.json | 1 + public/index.html | 2 + src/api/Setting.js | 168 +++-- src/components/Amap/index.vue | 143 ++++ src/router/index.js | 15 + src/store/modules/account.js | 16 + src/views/System/posSystem/index.vue | 47 +- src/views/banner/Edit.vue | 155 ++++- src/views/brand/Edit.vue | 2 +- src/views/classification/Edit.vue | 2 +- src/views/creditGoods/goods/Edit.vue | 51 +- src/views/creditGoods/goodsCategory/Edit.vue | 10 +- src/views/information/Edit.vue | 2 +- src/views/information/index.vue | 2 +- src/views/marketing/add/index.vue | 2 +- src/views/setting/collectionAccount/Edit.vue | 205 ++++++ src/views/setting/collectionAccount/index.vue | 327 ++++++++++ src/views/setting/logistics/Edit.vue | 608 ++++++++++++++++++ src/views/setting/logistics/index.vue | 237 +++++++ src/views/setting/shop/Edit.vue | 545 ++++++++++++++++ src/views/setting/shop/index.vue | 370 +++++++++++ src/views/setting/shop/index2.vue | 405 ++++++++++++ .../shop/wechat-approve/component/approve.vue | 22 + .../shop/wechat-approve/component/info.vue | 250 +++++++ .../shop/wechat-approve/component/sign.vue | 22 + .../shop/wechat-approve/component/success.vue | 22 + .../setting/shop/wechat-approve/index.vue | 65 ++ src/views/setting/shop/wxEdit.vue | 414 ++++++++++++ 30 files changed, 4020 insertions(+), 96 deletions(-) create mode 100644 src/components/Amap/index.vue create mode 100644 src/views/setting/collectionAccount/Edit.vue create mode 100644 src/views/setting/collectionAccount/index.vue create mode 100644 src/views/setting/logistics/Edit.vue create mode 100644 src/views/setting/logistics/index.vue create mode 100644 src/views/setting/shop/Edit.vue create mode 100644 src/views/setting/shop/index.vue create mode 100644 src/views/setting/shop/index2.vue create mode 100644 src/views/setting/shop/wechat-approve/component/approve.vue create mode 100644 src/views/setting/shop/wechat-approve/component/info.vue create mode 100644 src/views/setting/shop/wechat-approve/component/sign.vue create mode 100644 src/views/setting/shop/wechat-approve/component/success.vue create mode 100644 src/views/setting/shop/wechat-approve/index.vue create mode 100644 src/views/setting/shop/wxEdit.vue diff --git a/.env.development b/.env.development index 481aac1..79bfb00 100644 --- a/.env.development +++ b/.env.development @@ -4,6 +4,7 @@ VUE_APP_PROJECT_NAME = 'cereshop-admin-web' # 请求服务配置 VUE_APP_DEV_REQUEST_DOMAIN_PREFIX = 'http://192.168.10.129:8764' +#VUE_APP_DEV_REQUEST_DOMAIN_PREFIX = 'http://8764.graf0b20.7xedcknz.ca6242.grapps.cn' #VUE_APP_DEV_REQUEST_DOMAIN_PREFIX = 'http://platform.test.api.lotus-wallet.com/' # 是否启用验证码 VUE_APP_IS_CAPTCHA = true diff --git a/package-lock.json b/package-lock.json index ba0b5c1..60d7ff3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16044,6 +16044,11 @@ "commander": "*" } }, + "moment": { + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", + "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", diff --git a/package.json b/package.json index 0dc1d14..259d896 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "jszip": "^3.5.0", "less": "^3.12.2", "less-loader": "^7.0.0", + "moment": "^2.29.1", "normalize.css": "^8.0.1", "nprogress": "0.2.0", "path-to-regexp": "^6.1.0", diff --git a/public/index.html b/public/index.html index 4be64fe..54986f9 100644 --- a/public/index.html +++ b/public/index.html @@ -7,6 +7,8 @@ 回乡POS平台端 + +
diff --git a/src/api/Setting.js b/src/api/Setting.js index 64cc0d3..4313075 100644 --- a/src/api/Setting.js +++ b/src/api/Setting.js @@ -2,29 +2,33 @@ import axiosApi from './AxiosApi.js' const apiList = { getLogistics: `/logistics/detail/page`, - // addLogistics: `/logistics`, - // checkLogistics: `/logistics/detail/`, - // updateLogistics: `/logistics`, - // deleteLogistics: `/logistics`, - // getProductList: `/product/page`, - // findDefaultStore: `/store/findDefaultStore`, - // updateStore: `/store` + addLogistics: `/logistics`, + checkLogistics: `/logistics/detail/`, + updateLogistics: `/logistics`, + deleteLogistics: `/logistics`, + getProductList: `/product/page`, + findDefaultStore: `/store/findDefaultStore`, + updateStore: `/store`, + searchStoreList: `/store/getStoreList`, + openDadaDelivery: `/store/openDadaDelivery`, + queryCouponList: '/coupon/queryCouponList', + updateWxStore: `/store/setStoreWxPayConfig` } export default { - // updateStore(data) { - // return axiosApi({ - // method: 'PUT', - // url: apiList.updateStore, - // data - // }) - // }, - // findDefaultStore() { - // return axiosApi({ - // method: 'GET', - // url: apiList.findDefaultStore - // }) - // }, + updateStore(data) { + return axiosApi({ + method: 'PUT', + url: apiList.updateStore, + data + }) + }, + findDefaultStore() { + return axiosApi({ + method: 'GET', + url: apiList.findDefaultStore + }) + }, getLogistics(data) { return axiosApi({ method: 'POST', @@ -32,45 +36,87 @@ export default { data }) }, - // addLogistics(data) { - // return axiosApi({ - // method: 'POST', - // url: apiList.addLogistics, - // data - // }) - // }, - // checkLogistics(id) { - // return axiosApi({ - // method: 'GET', - // url: apiList.checkLogistics + id - // }) - // }, - // updateLogistics(data) { - // return axiosApi({ - // method: 'PUT', - // url: apiList.updateLogistics, - // data - // }) - // }, - // deleteLogistics(data) { - // return axiosApi({ - // method: 'DELETE', - // url: apiList.deleteLogistics, - // data - // }) - // }, - // eidtGroup(data) { - // return axiosApi({ - // method: 'PUT', - // url: apiList.productGroup, - // data - // }) - // }, - // deleteGroup(data) { - // return axiosApi({ - // method: 'POST', - // url: apiList.deleteGroup, - // data - // }) - // } + addLogistics(data) { + return axiosApi({ + method: 'POST', + url: apiList.addLogistics, + data + }) + }, + checkLogistics(id) { + return axiosApi({ + method: 'GET', + url: apiList.checkLogistics + id + }) + }, + updateLogistics(data) { + return axiosApi({ + method: 'PUT', + url: apiList.updateLogistics, + data + }) + }, + deleteLogistics(data) { + return axiosApi({ + method: 'DELETE', + url: apiList.deleteLogistics, + data + }) + }, + eidtGroup(data) { + return axiosApi({ + method: 'PUT', + url: apiList.productGroup, + data + }) + }, + deleteGroup(data) { + return axiosApi({ + method: 'POST', + url: apiList.deleteGroup, + data + }) + }, + searchStoreList(data) { + return axiosApi({ + method: 'GET', + url: apiList.searchStoreList, + data + }) + }, + addStoreList(data) { + return axiosApi({ + method: 'POST', + url: apiList.updateStore, + data + }) + }, + deleteStore(data) { + return axiosApi({ + method: 'DELETE', + url: apiList.updateStore, + data + }) + }, + openDadaDelivery(data) { + return axiosApi({ + method: 'GET', + url: apiList.openDadaDelivery, + data + }) + }, + queryCouponList(data) { + return axiosApi({ + method: 'GET', + url: apiList.queryCouponList, + data + }) + }, + updateWxStore(data,id) { + return axiosApi({ + method: 'POST', + url: apiList.updateWxStore + '?id=' + id, + data + }) + } } diff --git a/src/components/Amap/index.vue b/src/components/Amap/index.vue new file mode 100644 index 0000000..b376ba9 --- /dev/null +++ b/src/components/Amap/index.vue @@ -0,0 +1,143 @@ + + + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index f0bf9f5..5749d72 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -61,6 +61,21 @@ const constRouter = [{ } ] }, + { + path: '/', + component: Layout, + redirect: '/shop', + children: [{ + path: '/shop', + name: '店铺列表', + component: () => import('@/views/setting/shop/index'), + meta: { + title: '店铺列表', + affix: true + } + } + ] + }, { path: '/', component: Layout, diff --git a/src/store/modules/account.js b/src/store/modules/account.js index 245656d..80b2410 100644 --- a/src/store/modules/account.js +++ b/src/store/modules/account.js @@ -33,6 +33,22 @@ export default { } ] }, + { + path: '/shop', + name: '店铺管理', + meta: { + title: '店铺管理', + icon: 'el-icon-office-building' + }, + children: [ + { + path: '/shop', + meta: { + title: '店铺列表' + } + } + ] + }, { path: '/', meta: { diff --git a/src/views/System/posSystem/index.vue b/src/views/System/posSystem/index.vue index 8efacb9..1d4eeea 100644 --- a/src/views/System/posSystem/index.vue +++ b/src/views/System/posSystem/index.vue @@ -72,6 +72,33 @@ /> + + + + + + 点击上传 + +
支付宝设置
@@ -831,7 +858,9 @@ export default { { name: 'mini_key_cert_path', value: '', id: '' }, { name: 'mini_key_key_path', value: '', id: '' }, { name: 'mini_version', value: '', id: '' }, - { name: 'mini_download_url', value: '', id: '' } + { name: 'mini_download_url', value: '', id: '' }, + { name: 'founderImg', value: '', id: '' } + /* { name: 'mini_program_appId', value: '', id: '' }, { name: 'mini_program_secret', value: '', id: '' }, { name: 'receipt_top', value: '', id: '' }, @@ -890,7 +919,8 @@ export default { mini_key_cert_path: '', mini_key_key_path: '', mini_version: '', - mini_download_url: '' + mini_download_url: '', + founderImg: '' /* // printer_sn: 30, mini_program_appId: '', mini_program_secret: '', @@ -954,7 +984,8 @@ export default { mini_key_cert_path: '', mini_key_key_path: '', mini_version: '', - mini_download_url: '' + mini_download_url: '', + founderImg: '' /* // printer_sn: 30, mini_program_appId: '', mini_program_secret: '', @@ -1010,11 +1041,14 @@ export default { console.log(db.get('TENANT')) // this.formLabelAlign.storeId = sessionStorage.getItem('UserID') this.headers.token = 'Bearer ' + db.get('TOKEN', '') - this.headers.tenant = db.get('TENANT') + this.headers.tenant = '0000' // this.queryse() // this.getLogistics() }, methods: { + founderImgSuccess(file) { + this.formLabelAlign.founderImg = file.data.url + }, //获取运费方案 // getLogistics(){ // let data = { @@ -1425,7 +1459,10 @@ export default { item.value = this.formLabelAlign.mini_version }else if (item.name == 'mini_download_url') { item.value = this.formLabelAlign.mini_download_url + }else if (item.name == 'founderImg') { + item.value = this.formLabelAlign.founderImg } + }) console.log(this.formLabelAlignss) // if (this.wrong == 1 || this.wrongs == 1) { @@ -1500,6 +1537,8 @@ export default { this.formLabelAlignss[23].id = item.id }else if (item.name == 'mini_download_url') { this.formLabelAlignss[24].id = item.id + }else if (item.name == 'founderImg') { + this.formLabelAlignss[25].id = item.id } }) // console.log(this.payChannelChooses) diff --git a/src/views/banner/Edit.vue b/src/views/banner/Edit.vue index 7c45ba6..281a3b0 100644 --- a/src/views/banner/Edit.vue +++ b/src/views/banner/Edit.vue @@ -52,8 +52,28 @@ - - + + + + + + + + + + + + @@ -85,6 +105,8 @@ import elDragDialog from '@/directive/el-drag-dialog' import bannerApi from '@/api/Banner.js' import db from '@/utils/localstorage' +import creditGoodsApi from "@/api/creditGoods/CreditGoods.js"; +import ActivityTweets from '@/api/ActivityTweets' import { downloadFile, loadEnums, @@ -110,6 +132,19 @@ export default { default: () => {} } }, + watch: { + banner() { + if(this.banner.contentType == 1) { + this.getGoodList() + } + if(this.banner.contentType == 2) { + this.getActivityList() + } + if(this.banner.contentType == 3) { + this.getArticleList() + } + } + }, data() { return { typeOptions: [], @@ -129,7 +164,26 @@ export default { dataObj: { folderId: 1 }, - unStart: false + unStart: false, + contentTypeList:[ + { + value: 0, + label: '不跳转' + }, + { + value: 1, + label: '积分商品' + }, + { + value: 2, + label: '活动' + }, + { + value: 3, + label: '文章' + } + ], + currentList: [], } }, computed: { @@ -146,11 +200,9 @@ export default { return this.$t('common.' + this.type) }, }, - watch: {}, created(){ this.headers.token = 'Bearer ' + db.get('TOKEN', '') - this.headers.tenant = 'MDAwMA==' - console.log(this.headers,"this.headers") + this.headers.tenant = '0000' }, mounted() { window.onresize = () => { @@ -160,6 +212,92 @@ export default { } }, methods: { + //商品列表 + getGoodList() { + let data = { + current: 1, + map: {}, + model: {}, + order: "descending", + size: 999, + sort: "id", + timeRange: null + } + this.currentList = [] + creditGoodsApi.page(data).then(response=> { + const res = response.data; + if (res.isSuccess) { + res.data.list.forEach(v => { + let data = {} + data.id = v.id + data.name = v.name + this.currentList.push(data) + }); + console.log(this.currentList,"this.currentList") + } + }) + }, + getArticleList() { + let data = { + "pageNum": 1, + "pageSize": 999, + "searchKey": "", + "type": 2, + state: 1 + } + this.currentList = [] + ActivityTweets.page(data).then(response=> { + const res = response.data; + if (res.isSuccess) { + res.data.list.forEach(v => { + let data = {} + data.id = v.id + data.name = v.mainTitle + this.currentList.push(data) + }); + console.log(this.currentList,"this.currentList") + } + }) + }, + getActivityList() { + let data = { + "pageNum": 1, + "pageSize": 999, + "searchKey": "", + "type": 1, + state: 1 + } + this.currentList = [] + ActivityTweets.page(data).then(response=> { + const res = response.data; + if (res.isSuccess) { + res.data.list.forEach(v => { + let data = {} + data.id = v.id + data.name = v.mainTitle + this.currentList.push(data) + }); + console.log(this.currentList,"this.currentList") + } + }) + }, + changeContentType() { + if(this.banner.contentType == 0) { + this.banner.content = '' + } + if(this.banner.contentType == 1) { + this.getGoodList() + return + } + if(this.banner.contentType == 2) { + this.getActivityList() + return + } + if(this.banner.contentType == 3) { + this.getArticleList() + return + } + }, handleAvatarSuccess (response) { const { url } = response.data this.banner.imgUrl = url @@ -271,4 +409,7 @@ export default { }, } - + diff --git a/src/views/brand/Edit.vue b/src/views/brand/Edit.vue index 6175a21..1ed798c 100644 --- a/src/views/brand/Edit.vue +++ b/src/views/brand/Edit.vue @@ -115,7 +115,7 @@ export default { watch: {}, created() { this.headers.token = 'Bearer ' + db.get('TOKEN', '') - this.headers.tenant = 'MDAwMA==' + this.headers.tenant = '0000' }, mounted() { window.onresize = () => { diff --git a/src/views/classification/Edit.vue b/src/views/classification/Edit.vue index 327e94a..8a973c7 100644 --- a/src/views/classification/Edit.vue +++ b/src/views/classification/Edit.vue @@ -225,7 +225,7 @@ export default { }, created () { this.headers.token = 'Bearer ' + db.get('TOKEN', '') - this.headers.tenant = 'MDAwMA==' + this.headers.tenant = '0000' // console.log(this.headers) }, methods: { diff --git a/src/views/creditGoods/goods/Edit.vue b/src/views/creditGoods/goods/Edit.vue index dcf0e0a..0cd1a73 100644 --- a/src/views/creditGoods/goods/Edit.vue +++ b/src/views/creditGoods/goods/Edit.vue @@ -86,6 +86,8 @@ :limit="3" :on-exceed="handleExceed" :on-success="multipleFilesSuccess" + :file-list="fileList" + list-type="picture" > 点击上传
@@ -133,13 +135,13 @@ }} - + {{ @@ -177,13 +179,9 @@ placeholder="状态:1-上架,0-下架" /> - + + +