diff --git a/buyer/package.json b/buyer/package.json index ae2ec6e8..9f64b7fb 100644 --- a/buyer/package.json +++ b/buyer/package.json @@ -14,9 +14,10 @@ "js-cookie": "^2.2.1", "less": "^3.12.2", "less-loader": "^5.0.0", + "mv-count-down": "^0.1.15", "psl": "^1.8.0", "qs": "^6.9.4", - "swiper": "^6.4.1", + "swiper": "^5.2.0", "uuid": "^8.3.2", "v-distpicker": "^1.0.17", "view-design": "^4.3.2", diff --git a/buyer/src/assets/iconfont/icomoon.eot b/buyer/src/assets/iconfont/icomoon.eot index 5a5b53d3..1155a87a 100644 Binary files a/buyer/src/assets/iconfont/icomoon.eot and b/buyer/src/assets/iconfont/icomoon.eot differ diff --git a/buyer/src/assets/iconfont/icomoon.svg b/buyer/src/assets/iconfont/icomoon.svg index a44989ac..780957bd 100644 --- a/buyer/src/assets/iconfont/icomoon.svg +++ b/buyer/src/assets/iconfont/icomoon.svg @@ -11,4 +11,6 @@ + + \ No newline at end of file diff --git a/buyer/src/assets/iconfont/icomoon.ttf b/buyer/src/assets/iconfont/icomoon.ttf index b63f6d43..d89161b6 100644 Binary files a/buyer/src/assets/iconfont/icomoon.ttf and b/buyer/src/assets/iconfont/icomoon.ttf differ diff --git a/buyer/src/assets/iconfont/icomoon.woff b/buyer/src/assets/iconfont/icomoon.woff index 1a942db4..64960b47 100644 Binary files a/buyer/src/assets/iconfont/icomoon.woff and b/buyer/src/assets/iconfont/icomoon.woff differ diff --git a/buyer/src/assets/iconfont/iconfont.css b/buyer/src/assets/iconfont/iconfont.css index aded85f0..2e74525c 100644 --- a/buyer/src/assets/iconfont/iconfont.css +++ b/buyer/src/assets/iconfont/iconfont.css @@ -1,10 +1,10 @@ @font-face { font-family: 'icomoon'; - src: url('icomoon.eot?4ejtdc'); - src: url('icomoon.eot?4ejtdc#iefix') format('embedded-opentype'), - url('icomoon.ttf?4ejtdc') format('truetype'), - url('icomoon.woff?4ejtdc') format('woff'), - url('icomoon.svg?4ejtdc#icomoon') format('svg'); + src: url('icomoon.eot?jvagvf'); + src: url('icomoon.eot?jvagvf#iefix') format('embedded-opentype'), + url('icomoon.ttf?jvagvf') format('truetype'), + url('icomoon.woff?jvagvf') format('woff'), + url('icomoon.svg?jvagvf#icomoon') format('svg'); font-weight: normal; font-style: normal; font-display: block; @@ -25,6 +25,14 @@ -moz-osx-font-smoothing: grayscale; } +.icon-wallet:before { + content: "\e905"; + color: #3c56c6; +} +.icon-qrcode:before { + content: "\e904"; + color: #999; +} .icon-customer-service:before { content: "\e900"; } diff --git a/buyer/src/components/goodsDetail/ShowGoods.vue b/buyer/src/components/goodsDetail/ShowGoods.vue index 40bda016..32536da6 100644 --- a/buyer/src/components/goodsDetail/ShowGoods.vue +++ b/buyer/src/components/goodsDetail/ShowGoods.vue @@ -64,7 +64,7 @@

- +

促     销 @@ -111,7 +111,7 @@ 库存{{skuDetail.quantity}}

-
+

重量

@@ -119,11 +119,11 @@ {{skuDetail.weight}}kg
-
+
-
- +
+
@@ -151,7 +151,7 @@ export default { count: 1, // 商品数量 imgIndex: 0, // 展示图片下标 currentSelceted: [], // 当前商品sku - imgList: this.detail.data.specList[0].specImage, // 商品图片列表 + imgList: this.detail.data.specList[0].specImage || [], // 商品图片列表 skuDetail: this.detail.data, // sku详情 goodsSpecList: this.detail.specs, // 商品spec promotionMap: { // 活动状态 @@ -199,7 +199,6 @@ export default { skuId: this.skuDetail.id }; this.loading = true; - console.log(11111111); addCartGoods(params).then(res => { debugger; this.loading = false; @@ -219,11 +218,15 @@ export default { skuId: this.skuDetail.id, cartType: 'BUY_NOW' }; + // 虚拟商品购买 + if (this.skuDetail.goodsType === 'VIRTUAL_GOODS') { + params.cartType = 'VIRTUAL' + } this.loading1 = true; addCartGoods(params).then(res => { this.loading1 = false; if (res.success) { - this.$router.push({path: '/pay', query: {way: 'BUY_NOW'}}); + this.$router.push({path: '/pay', query: {way: params.cartType}}); } else { this.$Message.warning(res.message); } @@ -324,6 +327,7 @@ export default { }) }, promotion () { // 格式化促销活动,返回当前促销的对象 + if (!this.detail.promotionMap) return false; let keysArr = Object.keys(this.detail.promotionMap); if (keysArr.length === 0) return false; diff --git a/buyer/src/components/goodsDetail/ShowGoodsDetail.vue b/buyer/src/components/goodsDetail/ShowGoodsDetail.vue index 72b4a349..d58f5a6e 100644 --- a/buyer/src/components/goodsDetail/ShowGoodsDetail.vue +++ b/buyer/src/components/goodsDetail/ShowGoodsDetail.vue @@ -86,6 +86,14 @@
+ + + + + +
{{param.paramName}}{{param.paramValue}}
+ +
@@ -475,4 +483,18 @@ export default { .ivu-rate-star-full:before, .ivu-rate-star-half .ivu-rate-star-content:before { color: $theme_color; } +table{ + border-color: #eee; + color: #999; + width: 70%; + margin-left: 10px; + tr{ + td:nth-child(1){ + width: 200px; + } + } + td{ + padding: 5px; + } +} diff --git a/buyer/src/components/indexDecorate/modelList/seckill.vue b/buyer/src/components/indexDecorate/modelList/seckill.vue index c1f16dd8..adbf6f5e 100644 --- a/buyer/src/components/indexDecorate/modelList/seckill.vue +++ b/buyer/src/components/indexDecorate/modelList/seckill.vue @@ -36,7 +36,7 @@ diff --git a/buyer/src/pages/home/orderCenter/MyOrder.vue b/buyer/src/pages/home/orderCenter/MyOrder.vue index c66c1ec5..fa03011e 100644 --- a/buyer/src/pages/home/orderCenter/MyOrder.vue +++ b/buyer/src/pages/home/orderCenter/MyOrder.vue @@ -29,7 +29,6 @@
{{ filterOrderStatus(order.orderStatus) }}
订单号:{{ order.sn }}      {{order.createTime}} -    {{ order.memberName | secrecyMobile }}
diff --git a/buyer/src/pages/home/orderCenter/OrderDetail.vue b/buyer/src/pages/home/orderCenter/OrderDetail.vue index 629ac5aa..6ebc1468 100644 --- a/buyer/src/pages/home/orderCenter/OrderDetail.vue +++ b/buyer/src/pages/home/orderCenter/OrderDetail.vue @@ -2,7 +2,7 @@
-

{{ order.orderStatusValue }}

+

{{ order.orderStatusValue }} 核验码:{{order.order.verificationCode}}

订单号:{{ order.order.sn }}

操作时间:{{order.order.updateTime}}
@@ -22,8 +22,8 @@

付款信息

-

支付方式:在线支付

-

付款状态:未付款

+

支付方式:{{order.paymentMethodValue}}

+

付款状态:{{order.payStatusValue}}

配送信息

@@ -234,7 +234,12 @@ table { font-size: 20px; } } - +.verificationCode { + font-size: 16px; + margin-left: 240px; + color: rgb(65, 63, 63); + font-weight: bold; +} /** 订单进度条 */ .progress { margin: 15px 0; diff --git a/buyer/src/pages/home/userCenter/MoneyManagement.vue b/buyer/src/pages/home/userCenter/MoneyManagement.vue index d9e8a317..f57011b3 100644 --- a/buyer/src/pages/home/userCenter/MoneyManagement.vue +++ b/buyer/src/pages/home/userCenter/MoneyManagement.vue @@ -215,7 +215,7 @@ export default { color: 'green' } }, - params.row.money + this.$options.filters.unitPrice(params.row.money, '+ ¥') ) ]); } else if (params.row.money < 0) { @@ -227,7 +227,7 @@ export default { color: 'red' } }, - params.row.money + this.$options.filters.unitPrice(0 - params.row.money, '- ¥') ) ]); } @@ -252,7 +252,10 @@ export default { }, { title: '充值金额', - key: 'rechargeMoney' + key: 'rechargeMoney', + render: (h, params) => { + return h('div', [h('span', this.$options.filters.unitPrice(params.row.rechargeMoney, '¥'))]); + } }, { title: '支付状态', @@ -281,7 +284,9 @@ export default { { title: '提现金额', key: 'applyMoney', - width: 120 + render: (h, params) => { + return h('div', [h('span', this.$options.filters.unitPrice(params.row.applyMoney, '¥'))]); + } }, { title: '提现状态', @@ -392,9 +397,10 @@ export default { if (valid) { recharge(this.formData).then((res) => { if (res.message === 'success') { - // TODO 根据返回的值跳转到收银台进行支付,一下是输出sn - console.warn(res.result.rechargeSn); - this.modal = false; + this.$router.push({ + path: '/payment', + query: { orderType: 'RECHARGE', sn: res.result.rechargeSn } + }); } }); } diff --git a/buyer/src/pages/home/userCenter/MyTracks.vue b/buyer/src/pages/home/userCenter/MyTracks.vue index 7a721be1..4c87b002 100644 --- a/buyer/src/pages/home/userCenter/MyTracks.vue +++ b/buyer/src/pages/home/userCenter/MyTracks.vue @@ -15,6 +15,14 @@ + +
+ + +
@@ -25,7 +33,14 @@ export default { data () { return { list: [], // 我的足迹,商品列表 - spinShow: false // 控制loading是否加载 + spinShow: false, // 控制loading是否加载 + params: { + pageNumber: 1, + pageSize: 30, + order: 'desc', + sort: 'createTime' + }, + total: 0 }; }, mounted () { @@ -71,7 +86,16 @@ export default { } }) }, - getList () { + changePageNum (val) { // 修改页码 + this.params.pageNumber = val; + this.getList() + }, + changePageSize (val) { // 修改页数 + this.pageNumber = 1; + this.params.pageSize = val; + this.getList() + }, + getList () { // 获取足迹列表 this.spinShow = true; tracksList(this.params).then(res => { this.spinShow = false diff --git a/buyer/src/pages/payment/PayDone.vue b/buyer/src/pages/payment/PayDone.vue index 7f76d562..cc950370 100644 --- a/buyer/src/pages/payment/PayDone.vue +++ b/buyer/src/pages/payment/PayDone.vue @@ -6,7 +6,8 @@
- + +
diff --git a/buyer/src/pages/payment/PayMent.vue b/buyer/src/pages/payment/PayMent.vue index 18f81c20..2e2cd35e 100644 --- a/buyer/src/pages/payment/PayMent.vue +++ b/buyer/src/pages/payment/PayMent.vue @@ -5,31 +5,64 @@
订单提交成功,请尽快付款!
请您尽快完成支付,否则订单会被自动取消
+
+ + +
-
应付金额 {{payDetail.price | unitPrice}}
+
应付金额 {{ payDetail.price | unitPrice }}
-
- +
+ 支付宝
-
- +
+ 微信
+
+ + 余额支付 + 当前剩余({{ walletValue | unitPrice('¥') }}) +
diff --git a/buyer/src/pages/payment/thirdPay.vue b/buyer/src/pages/payment/thirdPay.vue index e953892a..470d6afa 100644 --- a/buyer/src/pages/payment/thirdPay.vue +++ b/buyer/src/pages/payment/thirdPay.vue @@ -70,7 +70,7 @@ export default { payCallback(params).then(res => { if (res.result) { clearInterval(this.interval); - this.$router.push('/payDone'); + this.$router.push({path: '/payDone', query: {orderType: this.$route.query.orderType}}); } }); } diff --git a/buyer/src/plugins/request.js b/buyer/src/plugins/request.js index 727ab21f..3e5e1e9e 100644 --- a/buyer/src/plugins/request.js +++ b/buyer/src/plugins/request.js @@ -69,10 +69,10 @@ service.interceptors.request.use( config.headers['accessToken'] = accessToken; // 解析当前token时间 let jwtData = JSON.parse( - decodeURIComponent(escape(window.atob(accessToken.split('.')[1]))) + decodeURIComponent(escape(window.atob(accessToken.split('.')[1].replace(/-/g, '+').replace(/_/g, '/')))) ); if (jwtData.exp < Math.round(new Date() / 1000)) { - refresh() + refresh(config) } } @@ -142,6 +142,8 @@ service.interceptors.response.use( refresh(error) isRefreshToken = 0; } + } else if (errorResponse.status === 404) { + // 避免刷新token时也提示报错信息 } else { if (error.message) { let _message = diff --git a/buyer/yarn.lock b/buyer/yarn.lock index 6dbcc1c8..afd75933 100644 --- a/buyer/yarn.lock +++ b/buyer/yarn.lock @@ -2051,7 +2051,7 @@ copy-webpack-plugin@^4.0.1: p-limit "^1.0.0" serialize-javascript "^1.4.0" -core-js@^2.4.0, core-js@^2.5.0: +core-js@^2.4.0, core-js@^2.5.0, core-js@^2.6.5: version "2.6.12" resolved "https://registry.npm.taobao.org/core-js/download/core-js-2.6.12.tgz?cache=0&sync_timestamp=1607216048810&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fcore-js%2Fdownload%2Fcore-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" integrity sha1-2TM9+nsGXjR8xWgiGdb2kIWcwuw= @@ -5150,6 +5150,16 @@ mute-stream@0.0.7: resolved "https://registry.npm.taobao.org/mute-stream/download/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= +mv-count-down@^0.1.15: + version "0.1.15" + resolved "https://registry.npmjs.org/mv-count-down/-/mv-count-down-0.1.15.tgz#a3f3c1677576e592c7710b441b2dda96acac2702" + integrity sha512-7poh86i27D/u4AvE9Ne8QHhy61p4MYAhSf4XAVyxzL0gXVCyccJ0NtJferEOxBP6C2q9jImknpKLGdwnEeJ7qQ== + dependencies: + core-js "^2.6.5" + vue "^2.6.10" + vue-router "^3.0.3" + vuex "^3.0.1" + nan@^2.12.1, nan@^2.13.2: version "2.14.2" resolved "https://registry.npm.taobao.org/nan/download/nan-2.14.2.tgz?cache=0&sync_timestamp=1602591700047&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fnan%2Fdownload%2Fnan-2.14.2.tgz#f5376400695168f4cc694ac9393d0c9585eeea19" @@ -8315,6 +8325,11 @@ vue-router@^3.0.1: resolved "https://registry.npm.taobao.org/vue-router/download/vue-router-3.4.9.tgz?cache=0&sync_timestamp=1607347231238&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue-router%2Fdownload%2Fvue-router-3.4.9.tgz#c016f42030ae2932f14e4748b39a1d9a0e250e66" integrity sha1-wBb0IDCuKTLxTkdIs5odmg4lDmY= +vue-router@^3.0.3: + version "3.5.2" + resolved "https://registry.npmjs.org/vue-router/-/vue-router-3.5.2.tgz#5f55e3f251970e36c3e8d88a7cd2d67a350ade5c" + integrity sha512-807gn82hTnjCYGrnF3eNmIw/dk7/GE4B5h69BlyCK9KHASwSloD1Sjcn06zg9fVG4fYH2DrsNBZkpLtb25WtaQ== + vue-style-loader@^3.0.0, vue-style-loader@^3.0.1: version "3.1.2" resolved "https://registry.npm.taobao.org/vue-style-loader/download/vue-style-loader-3.1.2.tgz#6b66ad34998fc9520c2f1e4d5fa4091641c1597a" diff --git a/manager/package.json b/manager/package.json index 112223b4..427ac89e 100644 --- a/manager/package.json +++ b/manager/package.json @@ -31,6 +31,7 @@ "sockjs-client": "^1.4.0", "stompjs": "^2.3.3", "swiper": "^6.3.5", + "uuid": "^8.3.2", "view-design": "^4.2.0", "vue": "^2.6.10", "vue-apexcharts": "^1.5.1", @@ -48,8 +49,7 @@ "vuex": "^3.4.0", "wangeditor": "^4.5.3", "xlsx": "^0.16.2", - "xss": "^1.0.7", - "uuid": "^8.3.2" + "xss": "^1.0.7" }, "devDependencies": { "@vue/cli-plugin-babel": "^4.4.4", diff --git a/manager/src/api/goods.js b/manager/src/api/goods.js index 4b02cd15..13a4a41a 100644 --- a/manager/src/api/goods.js +++ b/manager/src/api/goods.js @@ -76,15 +76,15 @@ export const disableCategory = (id, type) => { // 获取商品规格分页列表 export const getSpecListData = (params) => { - return getRequest('/goods/spec/page', params) + return getRequest('/goods/spec', params) } // 添加或修改规格设置 export const insertSpec = (params) => { return postRequest('/goods/spec', params) } // 添加或修改规格设置 -export const updateSpec = (params) => { - return putRequest('/goods/spec', params) +export const updateSpec = (id,params) => { + return putRequest(`/goods/spec/${id}`, params) } //根据分类id获取关联规格 export const getCategorySpecListData = (category_id, params) => { @@ -94,15 +94,6 @@ export const getCategorySpecListData = (category_id, params) => { export const delSpec = (id, params) => { return deleteRequest(`/goods/spec/${id}`, params) } -// 获取商品规格值列表 -export const getSpecValuesListData = (id, params) => { - return getRequest(`/goods/specValues/values/${id}`, params) -} -// 添加商品规格值 -export const saveSpecValues = (id, params) => { - return postRequest(`/goods/specValues/save/${id}`, params) -} - // 查询某分类下的全部子分类列表 export const getGoodsCategory = (parent_id) => { diff --git a/manager/src/api/promotion.js b/manager/src/api/promotion.js index 42173562..0c7c6113 100644 --- a/manager/src/api/promotion.js +++ b/manager/src/api/promotion.js @@ -30,7 +30,7 @@ export const getLiveList = params => { // 获取直播间详情 export const getLiveInfo = studioId => { - return getRequest(`/broadcast/studio/studioInfo/${studioId}`); + return getRequest(`/broadcast/studio/${studioId}`); }; // 获取当前进行中的促销活动商品 diff --git a/manager/src/config/index.js b/manager/src/config/index.js index 1a28698c..8b6b162f 100644 --- a/manager/src/config/index.js +++ b/manager/src/config/index.js @@ -21,10 +21,10 @@ export default { // buyer: "https://buyer-api.pickmall.cn", // seller: "https://store-api.pickmall.cn", // manager: "https://admin-api.pickmall.cn" - common: 'http://192.168.0.100:8890', - buyer: 'http://192.168.0.100:8888', - seller: 'http://192.168.0.100:8889', - manager: 'http://192.168.0.100:8887' + common: 'http://192.168.0.109:8890', + buyer: 'http://192.168.0.109:8888', + seller: 'http://192.168.0.109:8889', + manager: 'http://192.168.0.109:8887' }, api_prod: { common: "https://common-api.pickmall.cn", diff --git a/manager/src/libs/axios.js b/manager/src/libs/axios.js index 6bd6d6c1..5d8c68ec 100644 --- a/manager/src/libs/axios.js +++ b/manager/src/libs/axios.js @@ -64,14 +64,6 @@ service.interceptors.response.use( } return data; break; - case 403: - // 权限不足 - if (data.message !== null) { - Message.error(data.message); - } else { - Message.error("权限不足"); - } - break; case 500: // 系统异常 if (data.message !== null) { @@ -89,6 +81,8 @@ service.interceptors.response.use( if (error.response) { if (error.response.status === 401) { // 这种情况一般调到登录页 + } else if (error.response.status === 404) { + // 避免刷新token报错 } else if (error.response.status === 403) { isRefreshToken++; if(isRefreshToken === 1) { diff --git a/manager/src/main.js b/manager/src/main.js index 2bbf62ee..fa03abd2 100644 --- a/manager/src/main.js +++ b/manager/src/main.js @@ -6,7 +6,7 @@ import ViewUI from 'view-design' import './styles/theme.less'; import "core-js/stable" -import "regenerator-runtime/runtime" +// import "regenerator-runtime/runtime" import App from './App' import { router } from './router/index' import store from './store' diff --git a/manager/src/utils/filters.js b/manager/src/utils/filters.js index 71c092db..9124cbfe 100644 --- a/manager/src/utils/filters.js +++ b/manager/src/utils/filters.js @@ -16,6 +16,22 @@ export function unitPrice(val, unit, location) { return (unit || '') + price } +/** + * 订单来源 + */ +export function clientTypeWay(val) { + if (val == "H5") { + return "移动端"; + } else if (val == "PC") { + return "PC端"; + } else if (val == "WECHAT_MP") { + return "小程序端"; + } else if (val == "APP") { + return "移动应用端"; + } else { + return val; + } +} diff --git a/manager/src/views/distribution/distribution.vue b/manager/src/views/distribution/distribution.vue index e76799ab..7a2d5147 100644 --- a/manager/src/views/distribution/distribution.vue +++ b/manager/src/views/distribution/distribution.vue @@ -147,21 +147,13 @@ export default { sortable: false, render: (h, params) => { if (params.row.distributionStatus == "PASS") { - return h("Badge", { - props: { status: "success", text: "审核通过" }, - }); + return h("Tag", {props: {color: "green",},},"通过"); } else if (params.row.distributionStatus == "APPLY") { - return h("Badge", { - props: { status: "processing", text: "申请中" }, - }); + return h("Tag", {props: {color: "geekblue",},},"待审核"); } else if (params.row.distributionStatus == "RETREAT") { - return h("Badge", { - props: { status: "warning", text: "已清退" }, - }); + return h("Tag", {props: {color: "volcano",},},"清退"); } else if (params.row.distributionStatus == "REFUSE") { - return h("Badge", { - props: { status: "error", text: "审核拒绝" }, - }); + return h("Tag", {props: {color: "red",},},"拒绝"); } }, }, diff --git a/manager/src/views/distribution/distributionGoods.vue b/manager/src/views/distribution/distributionGoods.vue index a78c5830..05acecf5 100644 --- a/manager/src/views/distribution/distributionGoods.vue +++ b/manager/src/views/distribution/distributionGoods.vue @@ -67,10 +67,12 @@ export default { { type: "selection", width: 60, - align: "center" + align: "center", + fixed: "left", }, { title: "商品图片", + fixed: "left", key: "thumbnail", width: 120, align: "center", diff --git a/manager/src/views/goods/goods-info/goods.vue b/manager/src/views/goods/goods-info/goods.vue index d46ce5e8..6d442b05 100644 --- a/manager/src/views/goods/goods-info/goods.vue +++ b/manager/src/views/goods/goods-info/goods.vue @@ -38,6 +38,12 @@ + + + @@ -174,29 +180,29 @@ export default { ); }, }, + { + title: "商品类型", + key: "goodsType", + width: 130, + render: (h, params) => { + if (params.row.goodsType === 'PHYSICAL_GOODS') { + return h("Tag", {props: {color: "green",},}, "实物商品"); + } else if (params.row.goodsType === 'VIRTUAL_GOODS') { + return h("Tag", {props: {color: "volcano",},}, "虚拟商品"); + } else { + return h("Tag", {props: {color: "geekblue",},}, "电子卡券"); + } + }, + }, { title: "状态", key: "marketEnable", width: 100, render: (h, params) => { if (params.row.marketEnable == "DOWN") { - return h("div", [ - h("Badge", { - props: { - status: "error", - text: "下架", - }, - }), - ]); + return h("Tag", {props: {color: "green"},},"上架"); } else if (params.row.marketEnable == "UPPER") { - return h("div", [ - h("Badge", { - props: { - status: "success", - text: "上架", - }, - }), - ]); + return h("Tag", {props: {color: "volcano",},},"下架"); } }, }, @@ -206,36 +212,14 @@ export default { width: 130, render: (h, params) => { if (params.row.isAuth == "TOBEAUDITED") { - return h("div", [ - h("Badge", { - props: { - status: "error", - text: "待审核", - }, - }), - ]); + return h("Tag", {props: {color: "volcano",},},"待审核"); } else if (params.row.isAuth == "PASS") { - return h("div", [ - h("Badge", { - props: { - status: "success", - text: "审核通过", - }, - }), - ]); + return h("Tag", {props: {color: "green"},},"通过"); } else if (params.row.isAuth == "REFUSE") { - return h("div", [ - h("Badge", { - props: { - status: "error", - text: "审核拒绝", - }, - }), - ]); + return h("Tag", {props: {color: "red",},},"拒绝"); } }, }, - { title: "店铺名称", key: "storeName", diff --git a/manager/src/views/goods/goods-manage/brand.vue b/manager/src/views/goods/goods-manage/brand.vue index b45dd2ce..d2f2212c 100644 --- a/manager/src/views/goods/goods-manage/brand.vue +++ b/manager/src/views/goods/goods-manage/brand.vue @@ -113,23 +113,9 @@ export default { align: "left", render: (h, params) => { if (params.row.deleteFlag == 0) { - return h("div", [ - h("Badge", { - props: { - status: "success", - text: "启用", - }, - }), - ]); + return h("Tag", {props: {color: "green",},},"启用"); } else if (params.row.deleteFlag == 1) { - return h("div", [ - h("Badge", { - props: { - status: "error", - text: "禁用", - }, - }), - ]); + return h("Tag", {props: {color: "volcano",},},"禁用"); } }, filters: [ diff --git a/manager/src/views/goods/goods-manage/category.vue b/manager/src/views/goods/goods-manage/category.vue index 1bcc3217..deacb087 100644 --- a/manager/src/views/goods/goods-manage/category.vue +++ b/manager/src/views/goods/goods-manage/category.vue @@ -261,7 +261,6 @@ export default { getCategorySpecListData(v.id).then((res) => { this.categoryId = v.id; this.modalSpecTitle = "规格关联"; - console.log(res); this.specForm.categorySpecs = res.map((item) => item.id); this.modalSpecVisible = true; }); diff --git a/manager/src/views/goods/goods-manage/spec.vue b/manager/src/views/goods/goods-manage/spec.vue index 701554d8..b6cdfa3e 100644 --- a/manager/src/views/goods/goods-manage/spec.vue +++ b/manager/src/views/goods/goods-manage/spec.vue @@ -23,8 +23,8 @@ - - + + - + + + +
-
- - -
- - -
- - 提交 +
@@ -118,10 +98,9 @@ import { getSpecListData, insertSpec, updateSpec, - delSpec, - getSpecValuesListData, - saveSpecValues, + delSpec } from "@/api/goods"; + export default { name: "spec", components: {}, @@ -131,7 +110,6 @@ export default { modalType: 0, // 添加或编辑标识 modalVisible: false, // 添加或编辑显示 modalTitle: "", // 添加或编辑标题 - dialogSpecValuesVisible: false, // 添加或编辑规格值 specTitle: "", // 添加或编辑规格值 searchForm: { // 搜索框初始化对象 @@ -145,9 +123,8 @@ export default { specName: "", specValue: "", }, - specForm: {}, /** 编辑规格值 */ - specValues: [], + specValue: [], // 表单验证规则 formValidate: {}, submitLoading: false, // 添加或编辑提交状态 @@ -179,24 +156,7 @@ export default { width: 250, render: (h, params) => { return h("div", [ - h( - "Button", - { - props: { - type: "primary", - size: "small", - }, - style: { - marginRight: "5px", - }, - on: { - click: () => { - this.editSpec(params.row); - }, - }, - }, - "编辑规格值" - ), + h( "Button", { @@ -239,23 +199,28 @@ export default { }; }, methods: { + //初始化,获取数据 init() { this.getDataList(); }, + //修改分页 changePage(v) { this.searchForm.pageNumber = v; this.getDataList(); this.clearSelectAll(); }, + //修改页面大小 changePageSize(v) { this.searchForm.pageSize = v; this.getDataList(); }, + //搜索参数 handleSearch() { this.searchForm.pageNumber = 1; this.searchForm.pageSize = 10; this.getDataList(); }, + //重置搜索参数 handleReset() { this.$refs.searchForm.resetFields(); this.searchForm.pageNumber = 1; @@ -263,6 +228,7 @@ export default { // 重新加载数据 this.getDataList(); }, + //更改排序 changeSort(e) { this.searchForm.sort = e.key; this.searchForm.order = e.order; @@ -271,36 +237,27 @@ export default { } this.getDataList(); }, + //清除已选择 clearSelectAll() { this.$refs.table.selectAll(false); }, + //修改已选择 changeSelect(e) { this.selectList = e; this.selectCount = e.length; }, + //获取数据 getDataList() { this.loading = true; // 带多条件搜索参数获取表单数据 请自行修改接口 getSpecListData(this.searchForm).then((res) => { this.loading = false; - if (res.success) { - this.data = res.result.records; - this.total = res.result.total; - } + this.data = res.records; + this.total = res.total; }); this.loading = false; }, - submitSpecValuesForm() { - saveSpecValues(this.specForm.specId, this.specForm).then((res) => { - this.submitLoading = false; - if (res.success) { - this.$Message.success("规格值保存成功"); - this.getDataList(); - this.modalVisible = false; - this.dialogSpecValuesVisible = false; - } - }); - }, + //新增规格 saveSpec() { this.$refs.form.validate((valid) => { if (valid) { @@ -318,7 +275,7 @@ export default { }); } else { // 编辑 - updateSpec(this.form).then((res) => { + updateSpec(this.form.id, this.form).then((res) => { this.submitLoading = false; if (res.success) { this.$Message.success("操作成功"); @@ -330,6 +287,7 @@ export default { } }); }, + //弹出添加框 add() { this.modalType = 0; this.modalTitle = "添加"; @@ -337,31 +295,31 @@ export default { delete this.form.id; this.modalVisible = true; }, + //弹出编辑框 edit(v) { this.modalType = 1; this.modalTitle = "编辑"; - this.$refs.form.resetFields(); // 转换null为"" for (let attr in v) { if (v[attr] === null) { v[attr] = ""; } } - let str = JSON.stringify(v); - let data = JSON.parse(str); - this.form = data; + let localVal = v.specValue; + + this.form.specName = v.specName; + this.form.id = v.id; + this.form.specValue = v.specValue; + + if (localVal && localVal.indexOf("," > 0)) { + this.form.specValue = localVal.split(",") + this.specValue = this.form.specValue + this.$set(this, 'specValue', this.form.specValue) + } else { + this.specValue = []; + } this.modalVisible = true; }, - editSpec(v) { - getSpecValuesListData(v.id).then((res) => { - this.modalType = 1; - this.modalTitle = "编辑"; - this.specValues = res.result; - this.specForm.specValue = res.result.map(item => item.specValue) - this.specForm.specId = v.id; - this.dialogSpecValuesVisible = true; - }); - }, remove(v) { this.$Modal.confirm({ title: "确认删除", @@ -415,5 +373,5 @@ export default { }; diff --git a/manager/src/views/goods/goods-review/index.vue b/manager/src/views/goods/goods-review/index.vue index bc2b8ea0..3be73358 100644 --- a/manager/src/views/goods/goods-review/index.vue +++ b/manager/src/views/goods/goods-review/index.vue @@ -135,35 +135,11 @@ export default { width: 90, render: (h, params) => { if (params.row.grade == "GOOD") { - return h( - "Tag", - { - props: { - color: "success", - }, - }, - "好评" - ); + return h("Tag", {props: {color: "green",},}, "好评"); } else if (params.row.grade == "MODERATE") { - return h( - "Tag", - { - props: { - color: "warning", - }, - }, - "中评" - ); + return h("Tag", {props: {color: "orange",},}, "中评"); } else { - return h( - "Tag", - { - props: { - color: "error", - }, - }, - "差评" - ); + return h("Tag", {props: {color: "red",},}, "差评"); } }, }, diff --git a/manager/src/views/main-components/footer.vue b/manager/src/views/main-components/footer.vue index 666ae443..e471877c 100644 --- a/manager/src/views/main-components/footer.vue +++ b/manager/src/views/main-components/footer.vue @@ -8,7 +8,7 @@ Copyright © 2020 - Present lili-shop {{ $t('rights') }} diff --git a/manager/src/views/member/advance/recharge.vue b/manager/src/views/member/advance/recharge.vue index 96759e43..6d2b893d 100644 --- a/manager/src/views/member/advance/recharge.vue +++ b/manager/src/views/member/advance/recharge.vue @@ -131,23 +131,9 @@ sortable: false, render: (h, params) => { if (params.row.payStatus == "PAID") { - return h("div", [ - h("Badge", { - props: { - status: "success", - text: "已付款", - }, - }), - ]); - } else if (params.row.payStatus == "UNPAID") { - return h("div", [ - h("Badge", { - props: { - status: "error", - text: "未付款", - }, - }), - ]); + return h("Tag", {props: {color: "green",},}, "已付款"); + } else { + return h("Tag", {props: {color: "red",},}, "未付款"); } }, }, diff --git a/manager/src/views/my-components/lili/upload-pic-thumb.vue b/manager/src/views/my-components/lili/upload-pic-thumb.vue index d9583ca6..03ec4086 100644 --- a/manager/src/views/my-components/lili/upload-pic-thumb.vue +++ b/manager/src/views/my-components/lili/upload-pic-thumb.vue @@ -1,47 +1,48 @@ @@ -145,41 +102,13 @@ export default { width: 100, render: (h, params) => { if (params.row.promotionStatus == "NEW") { - return h("div", [ - h("Badge", { - props: { - status: "error", - text: "新建", - }, - }), - ]); + return h("Tag", {props: {color: "geekblue",},},"新建"); } else if (params.row.promotionStatus == "START") { - return h("div", [ - h("Badge", { - props: { - status: "success", - text: "开始", - }, - }), - ]); + return h("Tag", {props: {color: "green",},},"开始"); } else if (params.row.promotionStatus == "END") { - return h("div", [ - h("Badge", { - props: { - status: "error", - text: "结束", - }, - }), - ]); + return h("Tag", {props: {color: "volcano",},},"结束"); } else if (params.row.promotionStatus == "CLOSE") { - return h("div", [ - h("Badge", { - props: { - status: "error", - text: "废弃", - }, - }), - ]); + return h("Tag", {props: {color: "red",},},"结束"); } }, }, @@ -302,7 +231,7 @@ export default { diff --git a/manager/src/views/promotion/seckill/setupSeckill.vue b/manager/src/views/promotion/seckill/setupSeckill.vue index 9ad7c77b..0ab8ce68 100644 --- a/manager/src/views/promotion/seckill/setupSeckill.vue +++ b/manager/src/views/promotion/seckill/setupSeckill.vue @@ -1,5 +1,5 @@ - +
- + @@ -185,46 +182,39 @@
- + + -
+
- -
- +
- +
@@ -238,34 +228,36 @@ } " :span-method="handleSpan"> - diff --git a/seller/src/views/promotion/coupon/coupon.vue b/seller/src/views/promotion/coupon/coupon.vue index 9cd259de..5fae1965 100644 --- a/seller/src/views/promotion/coupon/coupon.vue +++ b/seller/src/views/promotion/coupon/coupon.vue @@ -2,29 +2,12 @@
+
- +