diff --git a/config/index.js b/config/index.js index 9e31efc..94a83db 100644 --- a/config/index.js +++ b/config/index.js @@ -1,6 +1,6 @@ -const isPro = true +const isPro = false export default { - imgUrl: 'http://47.100.35.222:8080/jeecg-boot/sys/common/static/', - apiUrl: isPro ? 'http://47.100.35.222:8080/jeecg-boot' : 'http://47.100.35.222:8080/jeecg-boot', + imgUrl: 'http://store-admin.nhet.cloud:8080/jeecg-boot/sys/common/static/', + apiUrl: isPro ? 'http://store-admin.nhet.cloud:8080/jeecg-boot' : 'http://store-admin.nhet.cloud:8080/jeecg-boot', isPro } diff --git a/pages/commponent/home/goodList.vue b/pages/commponent/home/goodList.vue index 67cc5ce..3beead2 100644 --- a/pages/commponent/home/goodList.vue +++ b/pages/commponent/home/goodList.vue @@ -5,7 +5,8 @@ - + + @@ -24,8 +25,8 @@ --> - - {{item.price}} + + {{item.price}} /{{ item.unit}} diff --git a/pages/views/goods/goodsDetails.scss b/pages/views/goods/goodsDetails.scss index 218b285..4362e57 100644 --- a/pages/views/goods/goodsDetails.scss +++ b/pages/views/goods/goodsDetails.scss @@ -224,6 +224,8 @@ width: 65%; color: #999; font-size: 24upx; + line-height: 1; + overflow: hidden; } .cell image { diff --git a/pages/views/goods/goodsDetails.vue b/pages/views/goods/goodsDetails.vue index 7254a98..2854d6a 100644 --- a/pages/views/goods/goodsDetails.vue +++ b/pages/views/goods/goodsDetails.vue @@ -18,7 +18,7 @@ {{goods.category}} - + ¥{{goods.price}} /{{ goods.unit }} {{goodsData.hprice}} @@ -633,7 +633,7 @@ this.showModal = false }, openSku() { - if (!this.hasToken) { + if (this.goods.price === 0) { this.$toast('请联系客服人员询价') return } diff --git a/pages/views/order/orderList.vue b/pages/views/order/orderList.vue index c701e42..8ac9c3c 100644 --- a/pages/views/order/orderList.vue +++ b/pages/views/order/orderList.vue @@ -368,8 +368,8 @@ import { getUserInfo, setSalesGoods } from '@/utils/auth'; } .lists .top .sku { - height: 40upx; - line-height: 40upx; + // height: 40upx; + // line-height: 40upx; font-size: 24upx; border-radius: 8upx; padding: 0 10upx; diff --git a/utils/request.js b/utils/request.js index 860fb56..cae8c21 100644 --- a/utils/request.js +++ b/utils/request.js @@ -4,11 +4,12 @@ * request('接口名称',{key:value},'请求方式(默认为GET)') * .then(res=>{console.log(res)}) */ -import { getToken, removeToken } from "./auth"; +import {getToken} from "./auth"; import CONFIG from '@/config' + export const baseUrl = CONFIG.apiUrl const whitePath = ['/pages/login/index1'] -async function request(mehtod, params, type = 'GET') { +async function request(method, params, type = 'GET') { //创建一个名为request请求的方法函数 const token = getToken() // if (!token) { @@ -25,15 +26,15 @@ async function request(mehtod, params, type = 'GET') { "Content-Type": "application/json; charset=UTF-8" }; let http = { - url: baseUrl + mehtod, + url: baseUrl + method, data: params, method: type.toUpperCase(), header: header }; - let promise = new Promise((resolve, reject) => { + return new Promise((resolve, reject) => { uni.request(http).then(res => { - let newdata = res[1].data; // if (newdata.code == 403) { - if (newdata == -1) { + let newData = res[1].data; // if (newdata.code == 403) { + if (newData == -1) { //如果错误码为 -1 提示 uni.showToast({ title: res[1].data.msg, @@ -42,15 +43,14 @@ async function request(mehtod, params, type = 'GET') { } resolve(res[1].data); }).catch(err => { - if (err.statusCode === 401) { - uni.redirectTo({ - url: '/pages/login/index1?status=' + 1 - }) - } + if (err.statusCode === 401) { + uni.redirectTo({ + url: '/pages/login/index1?status=' + 1 + }) + } reject(err); console.log(err); }); }); - return promise; } -export default request \ No newline at end of file +export default request