From 4030e40ebca615eb09d0121c7446c9a07af7c80e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=BD=E6=97=A5=E6=99=9A=E9=A3=8E?= <1811466536@qq.com> Date: Tue, 5 Dec 2023 14:27:36 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=8E=E8=B4=AD?= =?UTF-8?q?=E7=89=A9=E8=BD=A6=E4=B8=8B=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 63 +- pages/goods/index.vue | 741 ++++++++-------- pages/index/cart.vue | 373 ++++---- pages/index/index.vue | 7 +- pages/order/confirm.vue | 757 ++++++++-------- pages/user/address/list.vue | 272 +++--- sheep/api/cart.js | 76 +- sheep/api/order.js | 312 +++---- sheep/api/user.js | 30 +- .../components/s-select-sku/s-select-sku.vue | 810 +++++++++--------- sheep/request/index.js | 345 ++++---- sheep/request2/index.js | 3 +- 12 files changed, 1889 insertions(+), 1900 deletions(-) diff --git a/App.vue b/App.vue index 5b5b9866..9ee06f8d 100644 --- a/App.vue +++ b/App.vue @@ -1,41 +1,46 @@ + @import '@/sheep/scss/index.scss'; + \ No newline at end of file diff --git a/pages/goods/index.vue b/pages/goods/index.vue index 2c70b59c..1661dfcb 100644 --- a/pages/goods/index.vue +++ b/pages/goods/index.vue @@ -1,417 +1,400 @@ + border-radius: 0 40rpx 40rpx 0; + background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient)); + color: $white; + } + + .disabled-btn { + width: 428rpx; + height: 72rpx; + border-radius: 40rpx; + background: #999999; + color: $white; + } + } + + .model-box { + height: 60vh; + + .model-content { + height: 56vh; + } + + .title { + font-size: 36rpx; + font-weight: bold; + color: #333333; + } + + .subtitle { + font-size: 26rpx; + font-weight: 500; + color: #333333; + } + } + \ No newline at end of file diff --git a/pages/index/cart.vue b/pages/index/cart.vue index aba9db49..02c052f1 100644 --- a/pages/index/cart.vue +++ b/pages/index/cart.vue @@ -1,207 +1,200 @@ + .cart-content { + margin-top: 70rpx; + + .goods-box { + background-color: #fff; + } + } + } + \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue index d9ece7bb..5c725125 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -22,17 +22,18 @@ } from '@dcloudio/uni-app'; import sheep from '@/sheep'; import $share from '@/sheep/platform/share'; + import index2Api from '@/sheep/api/index2' // 隐藏原生tabBar uni.hideTabBar(); const template = computed(() => sheep.$store('app').template?.home); // 在此处拦截改变一下首页轮播图 此处先写死后期复活 放到启动函数里 (async function() { - console.log('原代码首页定制化数据',template) + console.log('原代码首页定制化数据', template) let { data } = await index2Api.decorate(); - console.log('首页导航配置化过高无法兼容',JSON.parse(data[1].value)) + console.log('首页导航配置化过高无法兼容', JSON.parse(data[1].value)) // 改变首页底部数据 但是没有通过数组id获取商品数据接口 // let { // data: datas @@ -88,4 +89,4 @@ onPageScroll(() => {}); - + \ No newline at end of file diff --git a/pages/order/confirm.vue b/pages/order/confirm.vue index 6a204d75..7f866a4c 100644 --- a/pages/order/confirm.vue +++ b/pages/order/confirm.vue @@ -1,419 +1,414 @@ + .total-num { + color: #333333; + font-family: OPPOSANS; + } + } + + .footer-box { + height: 100rpx; + + .submit-btn { + width: 240rpx; + height: 70rpx; + font-size: 28rpx; + font-weight: 500; + + .goto-pay-text { + line-height: 28rpx; + } + } + + .cancel-btn { + width: 240rpx; + height: 80rpx; + font-size: 26rpx; + background-color: #e5e5e5; + color: $dark-9; + } + } + + .title { + font-size: 36rpx; + font-weight: bold; + color: #333333; + } + + .subtitle { + font-size: 28rpx; + color: #999999; + } + + .cicon-checkbox { + font-size: 36rpx; + color: var(--ui-BG-Main); + } + + .cicon-box { + font-size: 36rpx; + color: #999999; + } + \ No newline at end of file diff --git a/pages/user/address/list.vue b/pages/user/address/list.vue index 9d824329..f8421a2f 100644 --- a/pages/user/address/list.vue +++ b/pages/user/address/list.vue @@ -1,153 +1,147 @@ + .sync-wxaddress { + flex: 1; + line-height: 80rpx; + background: $white; + border-radius: 80rpx; + font-size: 30rpx; + font-weight: 500; + color: $dark-6; + margin-right: 18rpx; + } + } + \ No newline at end of file diff --git a/sheep/api/cart.js b/sheep/api/cart.js index a319ec55..f4aacaa3 100644 --- a/sheep/api/cart.js +++ b/sheep/api/cart.js @@ -2,41 +2,41 @@ import request from '@/sheep/request'; import request2 from '@/sheep/request2'; export default { - list: (data) => - request2({ - url: 'trade/cart/list', - method: 'GET', - custom: { - showLoading: false, - auth: true, - }, - }), - append: (data) => - request({ - url: 'cart', - method: 'POST', - custom: { - showSuccess: true, - successMsg: '已添加到购物车~', - }, - data: { - ...data, - type: 'inc', - }, - }), - // 删除购物车 - delete: (ids) => - request2({ - url: 'trade/cart/delete?ids=' + ids, - method: 'DELETE', - }), - update: (data) => - request2({ - url: 'trade/cart/update-count', - method: 'PUT', - data: { - ...data, - type: 'cover', - }, - }), -}; + list: (data) => + request2({ + url: 'trade/cart/list', + method: 'GET', + custom: { + showLoading: false, + auth: true, + }, + }), + append: (data) => + request({ + url: 'cart', + method: 'POST', + custom: { + showSuccess: true, + successMsg: '已添加到购物车~', + }, + data: { + ...data, + type: 'inc', + }, + }), + // 删除购物车 + delete: (ids) => + request2({ + url: 'trade/cart/delete?ids=' + ids, + method: 'DELETE', + }), + update: (data) => + request2({ + url: 'trade/cart/update-count', + method: 'PUT', + data: { + ...data, + type: 'cover', + }, + }), +}; \ No newline at end of file diff --git a/sheep/api/order.js b/sheep/api/order.js index acb16418..919e233e 100644 --- a/sheep/api/order.js +++ b/sheep/api/order.js @@ -2,148 +2,170 @@ import request from '@/sheep/request'; import request2 from '@/sheep/request2'; export default { - // 订单详情 - detail: (id,params) => - request({ - url: 'order/order/' + id, - method: 'GET', - params, - }), - // 发票详情 - invoice: (id) => - request({ - url: 'order/invoice/' + id, - method: 'GET', - }), - // 获取支付结果 - payResult: (id) => - request({ - url: 'order/order/' + id, - method: 'GET', - custom: { - showLoading: false, - }, - }), - itemDetail: (id,itemId) => - request({ - url: 'order/order/itemDetail/'+ id + '/' + itemId, - method: 'GET', - custom: { - showLoading: false, - }, - }), - // 订单列表 - list: (params) => - request2({ - url: 'trade/order/page', - method: 'GET', - params, - custom: { - showLoading: false, - }, - }), - // list: (params) => - // request({ - // url: 'order/order', - // method: 'GET', - // params, - // custom: { - // showLoading: false, - // }, - // }), - // 计算订单信息 - calc: (data) => - request({ - url: 'order/order/calc', - method: 'POST', - data, - }), - // 创建订单 - create: (data) => - request({ - url: 'order/order/create', - method: 'POST', - data, - }), - //订单可用优惠券 - coupons: (data) => - request({ - url: 'order/order/coupons', - method: 'POST', - data, - }), - // 确认收货 - confirm: (id) => - request({ - url: 'order/order/confirm/' + id, - method: 'PUT', - }), - // 评价订单 - comment: (id, data) => - request({ - url: 'order/order/comment/' + id, - method: 'POST', - data, - }), - // 申请退款 - applyRefund: (id) => - request({ - url: 'order/order/applyRefund/' + id, - method: 'PUT', - }), - // 取消订单 - cancel: (id) => - request({ - url: 'order/order/cancel/' + id, - method: 'PUT', - }), - // 删除订单 - delete: (id) => - request({ - url: 'order/order/' + id, - method: 'DELETE', - }), - // 售后 - aftersale: { - // 申请售后 - apply: (data) => - request({ - url: 'order/aftersale', - method: 'POST', - data, - }), - list: (params) => - request({ - url: 'order/aftersale', - method: 'GET', - params, - custom: { - showLoading: false, - }, - }), - //取消售后 - cancel: (id) => - request({ - url: 'order/aftersale/cancel/' + id, - method: 'PUT', - }), - //删除售后单 - delete: (id) => - request({ - url: 'order/aftersale/' + id, - method: 'DELETE', - }), - // 售后详情 - detail: (id) => - request({ - url: 'order/aftersale/' + id, - method: 'GET', - }), - }, - //订单包裹 - express: (id, orderId) => - request({ - url: 'order/express/' + id + `${orderId ? '/' + orderId : ''}`, - method: 'GET', - }), -}; + // 订单详情 + detail: (id, params) => + request({ + url: 'order/order/' + id, + method: 'GET', + params, + }), + // 发票详情 + invoice: (id) => + request({ + url: 'order/invoice/' + id, + method: 'GET', + }), + // 获取支付结果 + payResult: (id) => + request({ + url: 'order/order/' + id, + method: 'GET', + custom: { + showLoading: false, + }, + }), + itemDetail: (id, itemId) => + request({ + url: 'order/order/itemDetail/' + id + '/' + itemId, + method: 'GET', + custom: { + showLoading: false, + }, + }), + // 订单列表 + list: (params) => + request2({ + url: 'trade/order/page', + method: 'GET', + params, + custom: { + showLoading: false, + }, + }), + // list: (params) => + // request({ + // url: 'order/order', + // method: 'GET', + // params, + // custom: { + // showLoading: false, + // }, + // }), + // 计算订单信息 + calc: (data) => { + const data2 = { + ...data, + } + // 解决 SpringMVC 接受 List 参数的问题 + delete data2.items + for (let i = 0; i < data.items.length; i++) { + data2['items[' + i + '' + '].skuId'] = data.items[i].skuId + ''; + data2['items[' + i + '' + '].count'] = data.items[i].count + ''; + data2['items[' + i + '' + '].cartId'] = data.items[i].cartId + ''; + // data2['items' + `%5B${i}%5D` + '.skuId'] = data.items[i].skuId + ''; + // data2['items' + `%5B${i}%5D` + '.count'] = data.items[i].count + ''; + // data2['items' + `%5B${i}%5D` + '.cartId'] = data.items[i].cartId + ''; + } + console.log(data2, '对比数据') + return request2({ + url: 'trade/order/settlement', + method: 'GET', + // data, + params: data2 + }) + }, + // calc: (data) => + // request({ + // url: 'order/order/calc', + // method: 'POST', + // data, + // }), + // 创建订单 + create: (data) => + request({ + url: 'order/order/create', + method: 'POST', + data, + }), + //订单可用优惠券 + coupons: (data) => + request({ + url: 'order/order/coupons', + method: 'POST', + data, + }), + // 确认收货 + confirm: (id) => + request({ + url: 'order/order/confirm/' + id, + method: 'PUT', + }), + // 评价订单 + comment: (id, data) => + request({ + url: 'order/order/comment/' + id, + method: 'POST', + data, + }), + // 申请退款 + applyRefund: (id) => + request({ + url: 'order/order/applyRefund/' + id, + method: 'PUT', + }), + // 取消订单 + cancel: (id) => + request({ + url: 'order/order/cancel/' + id, + method: 'PUT', + }), + // 删除订单 + delete: (id) => + request({ + url: 'order/order/' + id, + method: 'DELETE', + }), + // 售后 + aftersale: { + // 申请售后 + apply: (data) => + request({ + url: 'order/aftersale', + method: 'POST', + data, + }), + list: (params) => + request({ + url: 'order/aftersale', + method: 'GET', + params, + custom: { + showLoading: false, + }, + }), + //取消售后 + cancel: (id) => + request({ + url: 'order/aftersale/cancel/' + id, + method: 'PUT', + }), + //删除售后单 + delete: (id) => + request({ + url: 'order/aftersale/' + id, + method: 'DELETE', + }), + // 售后详情 + detail: (id) => + request({ + url: 'order/aftersale/' + id, + method: 'GET', + }), + }, + //订单包裹 + express: (id, orderId) => + request({ + url: 'order/express/' + id + `${orderId ? '/' + orderId : ''}`, + method: 'GET', + }), +}; \ No newline at end of file diff --git a/sheep/api/user.js b/sheep/api/user.js index 3f16f237..fa6f1a5c 100644 --- a/sheep/api/user.js +++ b/sheep/api/user.js @@ -187,9 +187,17 @@ export default { }), address: { + // default: () => + // request({ + // url: 'user/address/default', + // method: 'GET', + // custom: { + // showError: false, + // }, + // }), default: () => - request({ - url: 'user/address/default', + request2({ + url: 'member/address/get-default', method: 'GET', custom: { showError: false, @@ -225,7 +233,7 @@ export default { // showSuccess: true, // }, // }), - update: ( data) => + update: (data) => request2({ url: 'member/address/update', method: 'PUT', @@ -325,7 +333,7 @@ export default { url: 'product/favorite/delete-list', method: 'DELETE', data: { - spuIds: id.split(',').map(item=>item*1), + spuIds: id.split(',').map(item => item * 1), // spuIds: id.split(',').join(','), }, custom: { @@ -372,13 +380,13 @@ export default { params, custom: {}, }), - // log: (params) => - // request({ - // url: '/user/api/walletLog', - // method: 'GET', - // params, - // custom: {}, - // }), + // log: (params) => + // request({ + // url: '/user/api/walletLog', + // method: 'GET', + // params, + // custom: {}, + // }), }, account: { info: (params) => diff --git a/sheep/components/s-select-sku/s-select-sku.vue b/sheep/components/s-select-sku/s-select-sku.vue index dc846d7c..7819b900 100644 --- a/sheep/components/s-select-sku/s-select-sku.vue +++ b/sheep/components/s-select-sku/s-select-sku.vue @@ -1,476 +1,458 @@ + .disabled-btn { + font-weight: 400; + color: #c6c6c6; + background: #f8f8f8; + } + } + } + } + \ No newline at end of file diff --git a/sheep/request/index.js b/sheep/request/index.js index 8fb44616..94d5bc08 100644 --- a/sheep/request/index.js +++ b/sheep/request/index.js @@ -4,213 +4,218 @@ */ import Request from 'luch-request'; -import { baseUrl, apiPath } from '@/sheep/config'; +import { + baseUrl, + apiPath +} from '@/sheep/config'; import $store from '@/sheep/store'; import $platform from '@/sheep/platform'; -import { showAuthModal } from '@/sheep/hooks/useModal'; +import { + showAuthModal +} from '@/sheep/hooks/useModal'; const options = { - // 显示操作成功消息 默认不显示 - showSuccess: false, - // 成功提醒 默认使用后端返回值 - successMsg: '', - // 显示失败消息 默认显示 - showError: true, - // 失败提醒 默认使用后端返回信息 - errorMsg: '', - // 显示请求时loading模态框 默认显示 - showLoading: true, - // loading提醒文字 - loadingMsg: '加载中', - // 需要授权才能请求 默认放开 - auth: false, - // ... + // 显示操作成功消息 默认不显示 + showSuccess: false, + // 成功提醒 默认使用后端返回值 + successMsg: '', + // 显示失败消息 默认显示 + showError: true, + // 失败提醒 默认使用后端返回信息 + errorMsg: '', + // 显示请求时loading模态框 默认显示 + showLoading: true, + // loading提醒文字 + loadingMsg: '加载中', + // 需要授权才能请求 默认放开 + auth: false, + // ... }; // Loading全局实例 let LoadingInstance = { - target: null, - count: 0, + target: null, + count: 0, }; /** * 关闭loading */ function closeLoading() { - if (LoadingInstance.count > 0) LoadingInstance.count--; - if (LoadingInstance.count === 0) uni.hideLoading(); + if (LoadingInstance.count > 0) LoadingInstance.count--; + if (LoadingInstance.count === 0) uni.hideLoading(); } /** * @description 请求基础配置 可直接使用访问自定义请求 */ const http = new Request({ - baseURL: baseUrl, - timeout: 8000, - method: 'GET', - header: { - Accept: 'text/json', - 'Content-Type': 'application/json;charset=UTF-8', - platform: $platform.name, - }, - // #ifdef APP-PLUS - sslVerify: false, - // #endif - // #ifdef H5 - // 跨域请求时是否携带凭证(cookies)仅H5支持(HBuilderX 2.6.15+) - withCredentials: false, - // #endif - custom: options, + baseURL: baseUrl, + timeout: 8000, + method: 'GET', + header: { + Accept: 'text/json', + 'Content-Type': 'application/json;charset=UTF-8', + platform: $platform.name, + }, + // #ifdef APP-PLUS + sslVerify: false, + // #endif + // #ifdef H5 + // 跨域请求时是否携带凭证(cookies)仅H5支持(HBuilderX 2.6.15+) + withCredentials: false, + // #endif + custom: options, }); /** * @description 请求拦截器 */ http.interceptors.request.use( - (config) => { - if (config.custom.auth && !$store('user').isLogin) { - showAuthModal(); - return Promise.reject(); - } - if (config.custom.showLoading) { - LoadingInstance.count++; - LoadingInstance.count === 1 && - uni.showLoading({ - title: config.custom.loadingMsg, - mask: true, - fail: () => { - uni.hideLoading(); - }, - }); - } - const token = uni.getStorageSync('token'); - if (token) config.header['Authorization'] = token; - // TODO 芋艿:特殊处理 - if (config.url.indexOf('/app-api/') !== -1) { - config.header['Accept'] = '*/*' - config.header['tenant-id'] = '1'; - config.header['Authorization'] = 'Bearer test247'; - } - return config; - }, - (error) => { - return Promise.reject(error); - }, + (config) => { + if (config.custom.auth && !$store('user').isLogin) { + showAuthModal(); + return Promise.reject(); + } + if (config.custom.showLoading) { + LoadingInstance.count++; + LoadingInstance.count === 1 && + uni.showLoading({ + title: config.custom.loadingMsg, + mask: true, + fail: () => { + uni.hideLoading(); + }, + }); + } + const token = uni.getStorageSync('token'); + if (token) config.header['Authorization'] = token; + // TODO 芋艿:特殊处理 + if (config.url.indexOf('/app-api/') !== -1) { + config.header['Accept'] = '*/*' + config.header['tenant-id'] = '1'; + config.header['Authorization'] = 'Bearer test247'; + } + return config; + }, + (error) => { + return Promise.reject(error); + }, ); /** * @description 响应拦截器 */ http.interceptors.response.use( - (response) => { - // 自动设置登陆令牌 - if (response.header.authorization || response.header.Authorization) { - $store('user').setToken(response.header.authorization || response.header.Authorization); - } + (response) => { + // 自动设置登陆令牌 + if (response.header.authorization || response.header.Authorization) { + $store('user').setToken(response.header.authorization || response.header.Authorization); + } - response.config.custom.showLoading && closeLoading(); - if (response.data.error !== 0) { - if (response.config.custom.showError) - uni.showToast({ - title: response.data.msg || '服务器开小差啦,请稍后再试~', - icon: 'none', - mask: true, - }); - return Promise.resolve(response.data); - } - if ( - response.data.error === 0 && - response.data.msg !== '' && - response.config.custom.showSuccess - ) { - uni.showToast({ - title: response.config.custom.successMsg || response.data.msg, - icon: 'none', - }); - } - return Promise.resolve(response.data); - }, - (error) => { - const userStore = $store('user'); - const isLogin = userStore.isLogin; - let errorMessage = '网络请求出错'; - if (error !== undefined) { - switch (error.statusCode) { - case 400: - errorMessage = '请求错误'; - break; - case 401: - if (isLogin) { - errorMessage = '您的登陆已过期'; - } else { - errorMessage = '请先登录'; - } - userStore.logout(true); - showAuthModal(); - break; - case 403: - errorMessage = '拒绝访问'; - break; - case 404: - errorMessage = '请求出错'; - break; - case 408: - errorMessage = '请求超时'; - break; - case 429: - errorMessage = '请求频繁, 请稍后再访问'; - break; - case 500: - errorMessage = '服务器开小差啦,请稍后再试~'; - break; - case 501: - errorMessage = '服务未实现'; - break; - case 502: - errorMessage = '网络错误'; - break; - case 503: - errorMessage = '服务不可用'; - break; - case 504: - errorMessage = '网络超时'; - break; - case 505: - errorMessage = 'HTTP版本不受支持'; - break; - } - if (error.errMsg.includes('timeout')) errorMessage = '请求超时'; - // #ifdef H5 - if (error.errMsg.includes('Network')) - errorMessage = window.navigator.onLine ? '服务器异常' : '请检查您的网络连接'; - // #endif - } + response.config.custom.showLoading && closeLoading(); + if (response.data.error !== 0) { + if (response.config.custom.showError) + uni.showToast({ + title: response.data.msg || '服务器开小差啦,请稍后再试~', + icon: 'none', + mask: true, + }); + return Promise.resolve(response.data); + } + if ( + response.data.error === 0 && + response.data.msg !== '' && + response.config.custom.showSuccess + ) { + uni.showToast({ + title: response.config.custom.successMsg || response.data.msg, + icon: 'none', + }); + } + return Promise.resolve(response.data); + }, + (error) => { + const userStore = $store('user'); + const isLogin = userStore.isLogin; + let errorMessage = '网络请求出错'; + if (error !== undefined) { + switch (error.statusCode) { + case 400: + errorMessage = '请求错误'; + break; + case 401: + if (isLogin) { + errorMessage = '您的登陆已过期'; + } else { + errorMessage = '请先登录'; + } + userStore.logout(true); + showAuthModal(); + break; + case 403: + errorMessage = '拒绝访问'; + break; + case 404: + errorMessage = '请求出错'; + break; + case 408: + errorMessage = '请求超时'; + break; + case 429: + errorMessage = '请求频繁, 请稍后再访问'; + break; + case 500: + errorMessage = '服务器开小差啦,请稍后再试~'; + break; + case 501: + errorMessage = '服务未实现'; + break; + case 502: + errorMessage = '网络错误'; + break; + case 503: + errorMessage = '服务不可用'; + break; + case 504: + errorMessage = '网络超时'; + break; + case 505: + errorMessage = 'HTTP版本不受支持'; + break; + } + if (error.errMsg.includes('timeout')) errorMessage = '请求超时'; + // #ifdef H5 + if (error.errMsg.includes('Network')) + errorMessage = window.navigator.onLine ? '服务器异常' : '请检查您的网络连接'; + // #endif + } - if (error && error.config) { - if (error.config.custom.showError === false) { - uni.showToast({ - title: error.data?.msg || errorMessage, - icon: 'none', - mask: true, - }); - } - error.config.custom.showLoading && closeLoading(); - } + if (error && error.config) { + if (error.config.custom.showError === false) { + uni.showToast({ + title: error.data?.msg || errorMessage, + icon: 'none', + mask: true, + }); + } + error.config.custom.showLoading && closeLoading(); + } - return false; - }, + return false; + }, ); const request = (config) => { - if (config.url[0] !== '/') { - config.url = apiPath + config.url; - } - // TODO 芋艿:额外拼接 - if (config.url.indexOf('/app-api/') >= 0) { - config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】 - // config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】 - } - return http.middleware(config); + if (config.url[0] !== '/') { + config.url = apiPath + config.url; + } + // TODO 芋艿:额外拼接 + if (config.url.indexOf('/app-api/') >= 0) { + config.url = 'http://api-dashboard.yudao.iocoder.cn' + config.url; // 调用【云端】 + // config.url = 'http://127.0.0.1:48080' + config.url; // 调用【本地】 + } + return http.middleware(config); }; -export default request; +export default request; \ No newline at end of file diff --git a/sheep/request2/index.js b/sheep/request2/index.js index c2a3f903..f60c7860 100644 --- a/sheep/request2/index.js +++ b/sheep/request2/index.js @@ -55,7 +55,8 @@ const http = new Request({ method: 'GET', header: { Accept: 'text/json', - 'Content-Type': 'application/json;charset=UTF-8', + 'Content-Type': 'application/json', + // ;charset=UTF-8 platform: $platform.name, }, // #ifdef APP-PLUS From 648b1a635122a6c30ab65b65d86c3a04786fbd8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=BD=E6=97=A5=E6=99=9A=E9=A3=8E?= <1811466536@qq.com> Date: Tue, 5 Dec 2023 17:59:31 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=88=91=E7=9A=84-=E5=85=A8=E9=83=A8?= =?UTF-8?q?=E8=AE=A2=E5=8D=95-=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/order/detail.vue | 1240 +++++++++++++++++++-------------------- pages/order/list.vue | 13 +- sheep/api/order.js | 22 +- sheep/request2/index.js | 3 +- 4 files changed, 623 insertions(+), 655 deletions(-) diff --git a/pages/order/detail.vue b/pages/order/detail.vue index d0fa5cde..8a748f9f 100644 --- a/pages/order/detail.vue +++ b/pages/order/detail.vue @@ -1,726 +1,688 @@ + .all-rpice-item { + justify-content: flex-end; + align-items: center; + + .title { + font-size: 26rpx; + font-weight: 500; + color: #333333; + line-height: normal; + } + + .all-price { + font-size: 26rpx; + font-family: OPPOSANS; + line-height: normal; + color: $red; + } + } + } + + // 底部 + .footer-box { + height: 100rpx; + width: 100%; + box-sizing: border-box; + border-radius: 10rpx; + padding-right: 20rpx; + + .cancel-btn { + width: 160rpx; + height: 60rpx; + background: #eeeeee; + border-radius: 30rpx; + margin-right: 20rpx; + font-size: 26rpx; + font-weight: 400; + color: #333333; + } + + .pay-btn { + width: 160rpx; + height: 60rpx; + font-size: 26rpx; + border-radius: 30rpx; + font-weight: 500; + color: #fff; + } + } + \ No newline at end of file diff --git a/pages/order/list.vue b/pages/order/list.vue index 5cb1607d..5cc39aae 100644 --- a/pages/order/list.vue +++ b/pages/order/list.vue @@ -7,7 +7,7 @@ + :key="order.id" @tap="onOrderDetail(order.id)"> 订单号:{{ order.no }} {{ @@ -15,7 +15,8 @@ }} - --> - + .card-btn { + // width: 144rpx; + padding: 0 16rpx; + height: 50rpx; + border-radius: 40rpx; + background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient)); + color: #ffffff; + font-size: 24rpx; + font-weight: 400; + } + + .border-btn { + background: linear-gradient(90deg, var(--ui-BG-Main-opacity-4), var(--ui-BG-Main-light)); + color: #fff !important; + } + + .disabled-btn { + background: #cccccc; + background-color: #cccccc !important; + color: #fff !important; + } + \ No newline at end of file diff --git a/pages/goods/comment/add.vue b/pages/goods/comment/add.vue index 0392516e..a0902194 100644 --- a/pages/goods/comment/add.vue +++ b/pages/goods/comment/add.vue @@ -1,157 +1,209 @@ + .star-box { + height: 100rpx; + padding: 0 25rpx; + } + + .star-title { + font-weight: 600; + } + } + + .area-box { + width: 690rpx; + min-height: 306rpx; + background: rgba(249, 250, 251, 1); + border-radius: 20rpx; + padding: 28rpx; + margin: auto; + + .img-box { + margin-top: 20rpx; + } + } + + .post-btn { + width: 690rpx; + line-height: 80rpx; + border-radius: 40rpx; + color: rgba(#fff, 0.9); + margin-bottom: 20rpx; + } + \ No newline at end of file diff --git a/pages/order/detail.vue b/pages/order/detail.vue index 8a748f9f..c6b370fc 100644 --- a/pages/order/detail.vue +++ b/pages/order/detail.vue @@ -200,7 +200,7 @@ + @tap="onComment(state.orderInfo.id,state.orderInfo)">评价晒单