From a5b83f31a85f7505d9eeab8ed7bd795255d5d8aa Mon Sep 17 00:00:00 2001 From: ghusermoon <2673031505@qq.com> Date: Fri, 10 Jul 2020 09:03:19 +0800 Subject: [PATCH] upload file --- README.md | 4 +- common/api/user.js | 11 +----- components/mine/order-item/index.vue | 8 +++- pageE/mine/EditUserInfo.vue | 3 +- pageE/mine/MemberServe.vue | 9 ++++- pageE/more/Complaints.vue | 37 ++++++++--------- pageE/more/WriteComments.vue | 31 +++++++++------ pageE/order/Details.vue | 29 +++++++------- pageE/order/Index.vue | 10 ++--- pageE/setting/Index.vue | 6 ++- pageE/setting/ShieldUsers.vue | 59 ++++++++++++++++++++++++++++ pageE/tool/ManicureOrder.vue | 30 ++++++++++---- pages.json | 13 ++++++ pages/mine/index.vue | 4 +- static/js/common.js | 13 +++--- 15 files changed, 183 insertions(+), 84 deletions(-) create mode 100644 pageE/setting/ShieldUsers.vue diff --git a/README.md b/README.md index d7273e7..762c8f6 100644 --- a/README.md +++ b/README.md @@ -44,9 +44,9 @@ unescapeHTML(temp){} /** * 上传文件(只能单文件上传) * @param { String } url 服务器 url +* @param { String } name 上传类型 goods-商品图片 avatar-用户头像 video-视频 store_logo-店铺logo store_banner-店铺banner store_avatar-店铺头像 * @param { String } filePath 要上传文件资源的路径 -* @param { String } type 上传文件验证类型 默认: img 可选: video * @return { object } promise 对象 resolve 返回文件服务器地址 reject 返回错误信息 */ -uploadFile({ url, filePath, type = 'img' } = {}) {} +uploadFile({ url, name, filePath }) {} ``` \ No newline at end of file diff --git a/common/api/user.js b/common/api/user.js index a2bf0a0..547978c 100644 --- a/common/api/user.js +++ b/common/api/user.js @@ -216,7 +216,7 @@ export default { page: page, }); }, - // 意见反馈列表 + // 意见反馈列表 getFeedbackList({ page }) { return vm.$u.post('Member/feedbackList', { page: page, @@ -254,15 +254,6 @@ export default { file: file, }); }, - // 上传图片视频 - uploadfile({ file }) { - const params = { - file: file - } - console.log(params); - - return vm.$u.post('Upload/uploadfile', params); - }, } } } \ No newline at end of file diff --git a/components/mine/order-item/index.vue b/components/mine/order-item/index.vue index cc7cb64..8000b77 100644 --- a/components/mine/order-item/index.vue +++ b/components/mine/order-item/index.vue @@ -17,7 +17,7 @@ 总价:¥99.00,实付款¥99 - 2020.05.17 + {{ order.add_time | date }} @@ -25,6 +25,7 @@ 查看物流 立即评价 + 取消支付 立即支付 联系官方客服 提交官方审核 @@ -70,7 +71,7 @@ export default { methods: { toDetailsPage() { uni.navigateTo({ - url: '/pageE/order/Details?order.order_state=' + this.order.order_state + url: '/pageE/order/Details?id=' + this.order.order_id }); }, toLogistics() { @@ -184,6 +185,9 @@ export default { .logistics, .comment, .payment { @include btn-class($width: 160rpx, $color: rgba(255,119,15,1)); } + .calcel { + @include btn-class($width: 160rpx, $color: rgba(155,153,153,1)); + } .service { @include btn-class($width: 216rpx, $color: rgba(155,153,153,1)); } diff --git a/pageE/mine/EditUserInfo.vue b/pageE/mine/EditUserInfo.vue index 91fc9c1..c5276bd 100644 --- a/pageE/mine/EditUserInfo.vue +++ b/pageE/mine/EditUserInfo.vue @@ -80,7 +80,8 @@ export default { this.avatar = res.tempFilePaths[0]; common.uploadFile({ url: url, - filePath: res.tempFilePaths[0] + name: 'avatar', + filePath: res.tempFilePaths[0] }).then(result => { this.avatar = result; }, error => { diff --git a/pageE/mine/MemberServe.vue b/pageE/mine/MemberServe.vue index 575dfa1..af082c6 100644 --- a/pageE/mine/MemberServe.vue +++ b/pageE/mine/MemberServe.vue @@ -17,7 +17,10 @@ 预计进度 - {{ memberInfo.next_grade_exppoints_diff }} + + + + @@ -151,6 +154,10 @@ export default { font-size: 48rpx; font-weight: 500; color: rgba(255,255,255,1); + > image { + width: 52rpx; + height: 35rpx; + } } } } diff --git a/pageE/more/Complaints.vue b/pageE/more/Complaints.vue index 7c99502..4366878 100644 --- a/pageE/more/Complaints.vue +++ b/pageE/more/Complaints.vue @@ -1,33 +1,30 @@ + \ No newline at end of file diff --git a/pageE/tool/ManicureOrder.vue b/pageE/tool/ManicureOrder.vue index c0bf180..c8db2d9 100644 --- a/pageE/tool/ManicureOrder.vue +++ b/pageE/tool/ManicureOrder.vue @@ -1,14 +1,18 @@