[fix]修改数据地址

main
huyuanxiang 2 years ago
parent 17f2b5dfeb
commit 316035ddda

@ -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
}

@ -5,7 +5,8 @@
<view class="top" @tap="jumpDetails(item)">
<image class="cover" lazy-load="true" :src="item.url" mode="scaleToFill"></image>
</view>
<view class="bottom padding-lr-sm" >
<!-- class padding-lr-sm -->
<view class="bottom " >
<!-- <view v-if="item.goodsName" class="text-xs good_skuSubTitle" style="color: #009125;">
{{item.goodsName}}
</view> -->
@ -24,8 +25,8 @@
</view> -->
</view>
<view class="goumai margin-top-xs flex justify-between align-center">
<view class="g_left price" v-if="hasToken">
<text v-if="item.price" class="text1 text-bold text-sm"> {{item.price}} </text>
<view class="g_left price" v-if="item.price">
<text class="text1 text-bold text-sm"> {{item.price}} </text>
<text style="color: #222">/{{ item.unit}}</text>
<!-- <text v-if="item.skuItem.dashPrice" class="text2 text-xs"> {{item.skuItem.dashPrice.text}}</text> -->

@ -224,6 +224,8 @@
width: 65%;
color: #999;
font-size: 24upx;
line-height: 1;
overflow: hidden;
}
.cell image {

@ -18,7 +18,7 @@
<view class="text-gray text-sm padding-top-xs">
{{goods.category}}
</view>
<view class="goods_price" v-if="hasToken">
<view class="goods_price" v-if="goods.price > 0">
<text class="money text-lg">¥{{goods.price}}</text>
<text>/{{ goods.unit }}</text>
<text class="h_money">{{goodsData.hprice}}</text>
@ -633,7 +633,7 @@
this.showModal = false
},
openSku() {
if (!this.hasToken) {
if (this.goods.price === 0) {
this.$toast('请联系客服人员询价')
return
}

@ -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;

@ -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,
@ -51,6 +52,5 @@ async function request(mehtod, params, type = 'GET') {
console.log(err);
});
});
return promise;
}
export default request
Loading…
Cancel
Save