From 7f4212755d27d643139fcb8eb9bb25be1ba879db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?lemon=E6=A9=AA?= <17633066053@163.com> Date: Fri, 14 May 2021 17:31:40 +0800 Subject: [PATCH] =?UTF-8?q?=C2=B7=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=95=B0=E6=8D=AE=E5=86=97=E4=BD=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/common.js | 2 +- api/members.js | 26 - api/message.js | 3 +- config/config.js | 7 +- pages.json | 35 +- pages/cart/coupon/couponCenter.vue | 119 ++--- pages/cart/coupon/couponDetail.vue | 30 +- pages/cart/coupon/couponIntro.vue | 59 --- pages/cart/coupon/index.vue | 190 +------ pages/cart/coupon/myCoupon.vue | 120 ++--- pages/mine/aboutUs.vue | 34 +- pages/mine/address/add.vue | 56 ++- pages/mine/address/address.scss | 132 +++++ pages/mine/address/address.vue | 200 +------- pages/mine/address/addressManage.vue | 240 ++------- pages/mine/address/map.vue | 66 --- pages/mine/address/uniMap.vue | 16 +- pages/mine/myCollect.vue | 471 ++++++++---------- pages/mine/myTracks.vue | 149 +++--- pages/mine/point/myPoint.vue | 185 ++----- pages/mine/point/pointDetail.vue | 135 ----- pages/mine/set/editionIntro.vue | 231 +++++---- pages/mine/set/feedBack.vue | 13 +- .../mine/set/securityCenter/deviceManage.vue | 40 -- .../mine/set/securityCenter/editPassword.vue | 15 +- pages/mine/set/securityCenter/faceLogin.vue | 144 +++--- pages/mine/set/securityCenter/fingerLogin.vue | 120 ++--- pages/order/afterSales/applyDetail.vue | 3 + pages/order/complain/complain.vue | 62 ++- pages/order/complain/complainInfo.vue | 106 ++-- pages/order/complain/complainList.vue | 91 ++-- pages/order/evaluate/againEvaluate.vue | 241 --------- pages/order/evaluate/evaluateDetail.vue | 214 ++------ pages/order/evaluate/evaluateInfo.vue | 81 --- pages/order/evaluate/myEvaluate.vue | 96 ++-- pages/order/evaluate/releaseEvaluate.vue | 56 ++- pages/order/invoice/invoiceDetail.vue | 3 + pages/passport/codeLogin.vue | 86 ++-- pages/passport/onClickLogin.vue | 62 +-- pages/product/comment.vue | 272 ++-------- .../product/evaluation/-evaluation.vue | 10 +- utils/Foundation.js | 181 ++++--- 42 files changed, 1415 insertions(+), 2987 deletions(-) delete mode 100644 pages/cart/coupon/couponIntro.vue create mode 100644 pages/mine/address/address.scss delete mode 100644 pages/mine/address/map.vue delete mode 100644 pages/mine/point/pointDetail.vue delete mode 100644 pages/mine/set/securityCenter/deviceManage.vue delete mode 100644 pages/order/evaluate/againEvaluate.vue delete mode 100644 pages/order/evaluate/evaluateInfo.vue diff --git a/api/common.js b/api/common.js index 6f2911c..e02b561 100644 --- a/api/common.js +++ b/api/common.js @@ -35,7 +35,7 @@ export function getRegionsById(id = 0) { } /** - * 文件上传 + * 文件上传地址 * @type {string} */ export const upload =api.common+'/upload/file'; diff --git a/api/members.js b/api/members.js index 7b6e13c..625023b 100644 --- a/api/members.js +++ b/api/members.js @@ -72,19 +72,6 @@ export function receiveCoupons(couponId) { }); } -/** - * 获取当前会员积分 - * @returns {*} - */ - -export function getPoints() { - return http.request({ - url: 'members/points/current', - method: Method.GET, - needToken: true, - }); -} - /** * 获取积分明细数据 * @param params @@ -99,19 +86,6 @@ export function getPointsData(params) { }); } -/** - * 获取积分明细数据 按月分组 - * @param params - * @returns {AxiosPromise} - */ -export function getPointsDataDetail(params) { - return http.request({ - url: 'members/points/total', - method: Method.GET, - needToken: true, - params, - }); -} /** * 获取我的评论列表 diff --git a/api/message.js b/api/message.js index 4edf136..73fbc53 100644 --- a/api/message.js +++ b/api/message.js @@ -66,9 +66,10 @@ export function getLogisticsMessages(params) { /** - * 获取版本更新信息 + * TODO 获取版本更新信息 暂无此功能。后续会优化更新 * @param params * @returns {AxiosPromise} + * */ export function getAppVersionList(params) { params = params || {}; diff --git a/config/config.js b/config/config.js index ef2b0e4..0e26422 100644 --- a/config/config.js +++ b/config/config.js @@ -1,9 +1,10 @@ -const name = 'lilishop' +const name = "lilishop"; export default { name: name, - schemeLink: `${name}://`, //唤起app地址 + schemeLink: `${name}://`, //唤起app地址 downloadLink: "https://pickmall.cn/download-page/index.html", //下载地址 shareLink: "https://m-b2b2c.pickmall.cn", //分享地址 appid: "wx6f10f29075dc1b0b", //小程序唯一凭证,即 AppID,可在「微信公众平台 - 设置 - 开发设置」页中获得。(需要已经成为开发者,且帐号没有异常状态) - appSecret :"6dfbe0c72380dce5d49d65b3c91059b1" //可在 manifest.json 查看 + appSecret: "6dfbe0c72380dce5d49d65b3c91059b1", //可在 manifest.json 查看 + aMapKey: "d649892b3937a5ad20b76dacb2bcb5bd", //在高德中申请web端key }; diff --git a/pages.json b/pages.json index 49aa144..638bc4b 100644 --- a/pages.json +++ b/pages.json @@ -213,14 +213,6 @@ "navigationBarTitleText": "面容登录" } }, - { - "path": "set/securityCenter/deviceManage", - "style": { - "navigationBarTitleText": "设备管理" - } - }, - - { "path": "set/securityCenter/editPassword", "style": { @@ -284,12 +276,7 @@ "navigationBarTitleText": "我的积分" } }, - { - "path": "point/pointDetail", - "style": { - "navigationBarTitleText": "积分明细" - } - }, { + { "path": "msgTips/main", "style": { "navigationBarTitleText": "消息中心" @@ -492,12 +479,7 @@ "navigationBarTitleText": "优惠券" } }, - { - "path": "coupon/couponIntro", - "style": { - "navigationBarTitleText": "优惠券说明" - } - }, + { "path": "coupon/couponCenter", "style": { @@ -594,24 +576,13 @@ "navigationBarTitleText": "订单详情" } }, - { - "path": "evaluate/evaluateInfo", - "style": { - "navigationBarTitleText": "评价介绍" - } - }, { "path": "evaluate/evaluateDetail", "style": { "navigationBarTitleText": "评价详情" } }, - { - "path": "evaluate/againEvaluate", - "style": { - "navigationBarTitleText": "追加评价" - } - }, + { "path": "evaluate/releaseEvaluate", "style": { diff --git a/pages/cart/coupon/couponCenter.vue b/pages/cart/coupon/couponCenter.vue index 607e067..87f0d40 100644 --- a/pages/cart/coupon/couponCenter.vue +++ b/pages/cart/coupon/couponCenter.vue @@ -1,17 +1,17 @@ @@ -99,8 +47,7 @@ import { getComplainDetail } from "@/api/after-sale"; export default { data() { return { - detail: "", - + complainDetail: "", //投诉详情 statusData: { NO_APPLY: "未申请", APPLYING: "申请中", @@ -110,10 +57,14 @@ export default { }, }; }, + onLoad(option) { this.init(option.id); }, methods: { + /** + * 点击图片放大或保存 + */ preview(urls, index) { uni.previewImage({ current: index, @@ -125,24 +76,29 @@ export default { }, }); }, + /** + * 初始化投诉详情 + */ init(id) { uni.showLoading({ title: "加载中", }); getComplainDetail(id).then((res) => { if (res.data.success) { - this.detail = res.data.result; - + this.complainDetail = res.data.result; + } else { + uni.showToast({ + title: res.data.message, + duration: 2000, + icon: "none", + }); } - uni.hideLoading(); }); }, }, - mounted() {}, }; - diff --git a/pages/order/evaluate/againEvaluate.vue b/pages/order/evaluate/againEvaluate.vue deleted file mode 100644 index 0a1f453..0000000 --- a/pages/order/evaluate/againEvaluate.vue +++ /dev/null @@ -1,241 +0,0 @@ - - - - - diff --git a/pages/order/evaluate/evaluateDetail.vue b/pages/order/evaluate/evaluateDetail.vue index 399bb9b..9f2ec35 100644 --- a/pages/order/evaluate/evaluateDetail.vue +++ b/pages/order/evaluate/evaluateDetail.vue @@ -3,13 +3,7 @@ - + {{ comment.memberName }} @@ -17,21 +11,13 @@ - 商品评价: {{ gradeList[comment.grade] }} + 商品评价: {{ gradeList[comment.grade] }} {{ comment.content }} - - - - + + + @@ -39,38 +25,7 @@ {{ comment.goodsName }} - - - - 购买{{ calcDay(comment) }}天后追加评论 - - {{ - comment.additional_comment.create_time | unixToDate - }} - - {{ - comment.additional_comment.content - }} - - - - - - - - - - 掌柜回复: - - {{ - comment.additional_comment.reply.content - }} - - + @@ -80,9 +35,9 @@ export default { data() { return { - src: "", - comment: {}, - gradeList: { + comment: {}, //评论信息 + gradeList: { + //评价grade GOOD: "好评", MODERATE: "中评", WORSE: "差评", @@ -92,11 +47,12 @@ export default { }, onLoad(options) { this.comment = JSON.parse(decodeURIComponent(options.comment)); - }, methods: { - preview(urls, index) { - + /** + * 点击图片放大或保存 + */ + preview(urls, index) { uni.previewImage({ current: index, urls: urls, @@ -107,47 +63,15 @@ export default { }, }); }, - calcDay(order) { - let date = ""; - console.log(); - if (order.additional_comment) { - date = - (order.additional_comment.create_time - order.create_time) / - 60 / - 60 / - 24; - } - return Math.ceil(date); - }, }, }; - diff --git a/pages/order/evaluate/evaluateInfo.vue b/pages/order/evaluate/evaluateInfo.vue deleted file mode 100644 index 335f6d5..0000000 --- a/pages/order/evaluate/evaluateInfo.vue +++ /dev/null @@ -1,81 +0,0 @@ - - - - - diff --git a/pages/order/evaluate/myEvaluate.vue b/pages/order/evaluate/myEvaluate.vue index bb73bd9..74666fe 100644 --- a/pages/order/evaluate/myEvaluate.vue +++ b/pages/order/evaluate/myEvaluate.vue @@ -2,9 +2,9 @@ - + - + @@ -32,7 +32,7 @@ - + - + @@ -69,14 +69,7 @@ import { getComments } from "@/api/members.js"; export default { data() { return { - customStyle: { - backgroundColor: this.$lightColor, - color: "#FFF", - height: "60rpx", - width: "150rpx", - margin: "20rpx 0", - }, - list: [ + list: [ //顶部tab { name: "待评价", }, @@ -84,28 +77,32 @@ export default { name: "已评价", }, ], - gradeList: { + gradeList: { //评论表 GOOD: "好评", MODERATE: "中评", WORSE: "差评", haveImage: "有图", }, - current: 0, - orderList: [], + current: 0, //当前tabIndex + orderList: [], //商品集合 params: { pageNumber: 1, pageSize: 10, - orderStatus: "", loadStatus: "more", }, }; }, + onShow() { this.orderList = []; this.params.pageNumber = 1; this.current == 0 ? this.loadData() : this.loadComments(); }, watch: { + /** + * 切换current + * 更改页面并重新加载数据 + */ current(val) { this.params.pageNumber = 1; this.params.loadStatus = "more"; @@ -120,16 +117,16 @@ export default { } }, }, - mounted() { - }, + methods: { - // 判断当前店铺是否有可评价的商品 + /** + * 判断当前店铺是否有可评价的商品 + */ commentStatus(val) { if (this.current == 1) { return true; } else { let show; - val.orderItems && val.orderItems.forEach((item) => { if (item.commentStatus == "UNFINISHED") { @@ -143,6 +140,9 @@ export default { } }, + /** + * 点击图片放大或保存 + */ preview(urls, index) { uni.previewImage({ current: index, @@ -155,14 +155,27 @@ export default { }); }, - change(index) { + /** + * 点击tab触发 + */ + changeTab(index) { this.current = index; }, - changeTab(e) { + + /** + * 点击swiper + */ + changeSwiper(e) { this.current = e.target.current; }, + + /** + * 获取订单数据 + */ loadData() { - uni.showLoading({}); + uni.showLoading({ + title: "加载中", + }); getOrderList(this.params).then((res) => { uni.hideLoading(); const orderList = res.data.result.records; @@ -175,15 +188,25 @@ export default { } }); }, - onCommont(order) { + + /** + * 发表评价 + */ + talkCommont(order) { uni.navigateTo({ url: `./releaseEvaluate?sn=${order.sn}&order=${encodeURIComponent( JSON.stringify(order) )}`, }); }, + + /** + * 加载已评价数据 + */ loadComments() { - uni.showLoading({}); + uni.showLoading({ + title: "加载中", + }); getComments(this.params).then((res) => { uni.hideLoading(); let orderList = res.data.result.records; @@ -200,19 +223,14 @@ export default { }, ]; }); - this.orderList = this.orderList.concat(orderList); - this.params.pageNumber += 1; }); }, - onAgain(order) { - uni.navigateTo({ - url: `./againEvaluate?order=${encodeURIComponent( - JSON.stringify(order) - )}`, - }); - }, + + /** + * 滑到底部加载数据 + */ renderData(index) { if (this.params.loadStatus == "noMore") return; if (index == 0) { @@ -224,13 +242,11 @@ export default { this.params.comment_status = "WAIT_CHASE"; this.loadComments(); } - if (index == 2) { - this.params.audit_status = ""; - this.params.comments_type = ""; - this.params.comment_status = "FINISHED"; - this.loadComments(); - } }, + + /** + * 评价详情 + */ onDetail(comment) { uni.navigateTo({ url: diff --git a/pages/order/evaluate/releaseEvaluate.vue b/pages/order/evaluate/releaseEvaluate.vue index 18ec8fc..b3398d4 100644 --- a/pages/order/evaluate/releaseEvaluate.vue +++ b/pages/order/evaluate/releaseEvaluate.vue @@ -1,5 +1,6 @@