From 533375f0560ac9569addd2bc2447d965820f6cef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Fri, 21 May 2021 16:47:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=A0=B7=E5=BC=8F=E4=BB=A5=E5=8F=8Abug,=E6=96=B0?= =?UTF-8?q?=E5=A2=9Eapp=E5=8D=87=E7=BA=A7=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 1 + api/goods.js | 16 +++- api/members.js | 4 +- api/message.js | 13 ++-- config/api.js | 3 +- manifest.json | 2 +- pages/order/evaluate/evaluateDetail.vue | 6 +- pages/order/evaluate/releaseEvaluate.vue | 24 +++--- pages/order/myOrder.vue | 9 ++- pages/product/comment.vue | 2 +- pages/product/goods.vue | 37 ++++++---- pages/tabbar/cart/cartList.vue | 10 +-- plugins/APPUpdate/index.js | 94 +++++++----------------- store/index.js | 3 + utils/request.js | 3 +- vue.config.js | 38 +++++----- 16 files changed, 127 insertions(+), 138 deletions(-) diff --git a/App.vue b/App.vue index 3583593..4e09368 100644 --- a/App.vue +++ b/App.vue @@ -21,6 +21,7 @@ export default { onLaunch: function () { // #ifdef APP-PLUS this.checkArguments(); // 检测启动参数 + APPUpdate(); // 重点是以下: 一定要监听后台恢复 !一定要 plus.globalEvent.addEventListener("newintent", (e) => { this.checkArguments(); // 检测启动参数 diff --git a/api/goods.js b/api/goods.js index 2e6bc95..2545438 100644 --- a/api/goods.js +++ b/api/goods.js @@ -30,13 +30,25 @@ export function getGoodsRelated(params) { * @param skuId 商品ID * @returns {AxiosPromise} */ -export function getGoods(skuId, goodsId, distributionId) { + export function getGoods(skuId, goodsId) { return http.request({ - url: `/goods/sku/${goodsId}/${skuId}${distributionId ? '?distributionId='+distributionId : ''}`, + url: `/goods/sku/${goodsId}/${skuId}`, method: Method.GET, }); } +/** + * 获取商品分销 + * @param distributionId 商品分销ID + */ + export function getGoodsDistribution(distributionId) { + return http.request({ + url: `/distribution/bindingDistribution/${distributionId}`, + method: Method.GET, + }); +} + + /** * 获取商品列表 * @param params diff --git a/api/members.js b/api/members.js index 625023b..a4f46d1 100644 --- a/api/members.js +++ b/api/members.js @@ -146,8 +146,8 @@ export function AppendCommentsOrder(params) { }); } - -/** +// TODO 第一版本暂未实现此功能 +/** * 商品咨询 * @param goods_id * @param ask_content diff --git a/api/message.js b/api/message.js index 73fbc53..4c0d41d 100644 --- a/api/message.js +++ b/api/message.js @@ -5,6 +5,7 @@ import {http,Method} from '@/utils/request.js'; const request = http.request +import api from '@/config/api.js'; /** * 获取微信消息订阅 @@ -67,16 +68,14 @@ export function getLogisticsMessages(params) { /** * TODO 获取版本更新信息 暂无此功能。后续会优化更新 - * @param params + * @param appType * @returns {AxiosPromise} * - */ -export function getAppVersionList(params) { - params = params || {}; - params.pageSize = params.pageSize || 5; + */ +export function getAppVersionList(appType) { return http.request({ - url: 'members/app/version', + url: `/appVersion/${appType}`, method: Method.GET, - params, + type:"manager" }); } diff --git a/config/api.js b/config/api.js index b35b2dc..5932087 100644 --- a/config/api.js +++ b/config/api.js @@ -11,10 +11,11 @@ const dev = { const prod = { common: "https://common-api.pickmall.cn", buyer: "https://buyer-api.pickmall.cn", + }; //默认生产环境 -let api = prod; +let api = dev; //如果是开发环境 if (process.env.NODE_ENV == "development") { api = dev; diff --git a/manifest.json b/manifest.json index d399649..b6373fd 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "appid" : "__UNI__C100675", "description" : "", "versionName" : "4.0.14", - "versionCode" : 4000013, + "versionCode" : 4000014, "transformPx" : false, "app-plus" : { "compatible" : { diff --git a/pages/order/evaluate/evaluateDetail.vue b/pages/order/evaluate/evaluateDetail.vue index 9f2ec35..a2e018b 100644 --- a/pages/order/evaluate/evaluateDetail.vue +++ b/pages/order/evaluate/evaluateDetail.vue @@ -16,9 +16,9 @@ {{ comment.content }} - - - + + + diff --git a/pages/order/evaluate/releaseEvaluate.vue b/pages/order/evaluate/releaseEvaluate.vue index b3398d4..4158929 100644 --- a/pages/order/evaluate/releaseEvaluate.vue +++ b/pages/order/evaluate/releaseEvaluate.vue @@ -117,7 +117,6 @@ export default { this.form.skuId = this.order.orderItems[0].skuId; }, methods: { - /** * 点击评价 */ @@ -134,17 +133,18 @@ export default { }); commentsMemberOrder(this.form).then((res) => { uni.hideLoading(); - - uni.showToast({ - title: "发布评价成功", - duration: 2000, - icon: "none", - success: () => { - setTimeout(() => { - uni.navigateBack(); - }, 1000); - }, - }); + if (res.data.success) { + uni.showToast({ + title: "发布评价成功", + duration: 2000, + icon: "none", + success: () => { + setTimeout(() => { + uni.navigateBack(); + }, 2000); + }, + }); + } }); }, diff --git a/pages/order/myOrder.vue b/pages/order/myOrder.vue index 805a550..0686c9d 100644 --- a/pages/order/myOrder.vue +++ b/pages/order/myOrder.vue @@ -54,7 +54,7 @@ 查看物流 - + 确认收货 - {{ item.reason }} + {{ item.reason }} @@ -94,7 +94,7 @@ - + @@ -111,6 +111,7 @@ export default { }, data() { return { + lightColor:this.$lightColor, tabCurrentIndex: 0, //导航栏索引 navList: [ //导航栏list @@ -492,7 +493,7 @@ page, } .swiper-box { - height: calc(100% - 40px); + height: calc(100vh - 40px); } .list-scroll-content { diff --git a/pages/product/comment.vue b/pages/product/comment.vue index 98909ea..122151d 100644 --- a/pages/product/comment.vue +++ b/pages/product/comment.vue @@ -37,7 +37,7 @@
{{ item.content }}
- + diff --git a/pages/product/goods.vue b/pages/product/goods.vue index 5075a71..26a605e 100644 --- a/pages/product/goods.vue +++ b/pages/product/goods.vue @@ -223,7 +223,12 @@