Merge branch 'develop' into dongjian

# Conflicts:
#	pages/other_package/productInfo/productInfo.vue
This commit is contained in:
2025-09-09 12:45:04 +08:00
4 changed files with 1275 additions and 1279 deletions
+2 -2
View File
@@ -3,10 +3,10 @@
<view class="mine_header">
<view class="mine_login_data" v-if="currentUserData && Object.keys(currentUserData).length !== 0">
<view class="mine_data">
<up-image src="/static/mine/avatar.png" shape="circle" width="54" height="54" bgColor="#f1f6ff00"></up-image>
<up-image :src="currentUserData.avatarUrl ? currentUserData.avatarUrl : '/static/mine/avatar.png'" shape="circle" width="54" height="54" bgColor="#f1f6ff00"></up-image>
<view class="mine_info">
<view class="mine_info_name">
<text style="margin-right: 20rpx">{{ currentUserData.name || '信任桥用户' }}</text>
<text style="margin-right: 20rpx">{{ currentUserData.nickname || '信任桥用户' }}</text>
<view class="level">
<up-image
src="/static/mine/rz.png"
@@ -3,18 +3,20 @@
<!-- 导航栏 -->
<view class="header_">
<view style="margin-top: 10rpx;">
<up-image src="/static/common/left_b.png" width="18" height="20" bgColor="#f1f6ff00" @click="jumpMine" />
<up-image src="/static/common/left_b.png" width="18" height="20" bgColor="#f1f6ff00"
@click="jumpMine" />
</view>
<view class="title_">我的推广</view>
</view>
<!-- 我的信息 -->
<view class="my_info">
<view class="left_">
<up-image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/logo_y.png" width="50" height="50"
bgColor="#f1f6ff00" shape="circle" />
<up-image
:src="userData.avatarUrl ? userData.avatarUrl: 'https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/logo_y.png'"
width="50" height="50" bgColor="#f1f6ff00" shape="circle" />
<view class="left_msg">
<view>
<text>{{ userData.name || '信任桥用户' }}</text>
<text>{{ userData.nickname || '信任桥用户' }}</text>
<text style="margin-left: 20rpx;">{{ userData.gradeName }}</text>
</view>
<view class="left_msg_title">ID:{{ userData.id || 0 }}</view>
@@ -113,7 +115,8 @@
<view class="card_item_comm">
<view class="card_title_comm">提成来源</view>
<view class="royalty_list">
<scroll-view scroll-y="true" @scrolltolower="loadMore" :style="{ 'height': 'calc(100vh - 1220rpx)' }">
<scroll-view scroll-y="true" @scrolltolower="loadMore"
:style="{ 'height': 'calc(100vh - 1220rpx)' }">
<view class="royalty_item" v-for="(item, index) in royaltyList" :key="index"
v-if="royaltyList && royaltyList.length !== 0">
<view>
@@ -126,8 +129,8 @@
</view>
</view>
<view v-else class="not_order_warp">
<up-image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/not_order.png" width="80"
height="80" bgColor="#f1f6ff00"></up-image>
<up-image src="https://cex-pub.s3.ap-southeast-1.amazonaws.com/static/not_order.png"
width="80" height="80" bgColor="#f1f6ff00"></up-image>
<view class="not_order_msg_warp">暂无相关数据</view>
</view>
<view v-if="royaltyLoading" style="text-align: center;">加载中...</view>
@@ -187,14 +190,29 @@
</template>
<script>
import {
getPerformance,
getAcctCategory,
getRewardSummaryRecord,
getRewardSummary
} from '@/api/team.js';
import {
formatDate
} from '@/utils/index.js';
import {
BALANCE_TYPE,
getValue
} from '@/utils/enumUtils.js';
import {
getStorageFun,
USER_DATA
} from '@/utils/auth.js';
import {
getUserInfo,
bindInvitationCode
} from '@/api/auth.js'
import { getPerformance, getAcctCategory, getRewardSummaryRecord, getRewardSummary } from '@/api/team.js';
import { formatDate } from '@/utils/index.js';
import { BALANCE_TYPE, getValue } from '@/utils/enumUtils.js';
import { getStorageFun, USER_DATA } from '@/utils/auth.js';
import { getUserInfo, bindInvitationCode } from '@/api/auth.js'
export default {
export default {
computed: {
BALANCE_TYPE() {
return BALANCE_TYPE;
@@ -207,17 +225,17 @@ export default {
pageSize: 15,
category: null,
},
royaltyList: [],// 提成来源
royaltyList: [], // 提成来源
royaltyLoading: false,
currencyShow: false,
currencyColumns: [],
currencyLoading: false,
performanceData: {},
selAcctCategory: {},// 选择的账户
rewardSummary: {},// 提成统计
openTeamShow: false,// 团队业绩的提示
openTcShow: false,// 提成统计
userData: {},// 当前登录对象
selAcctCategory: {}, // 选择的账户
rewardSummary: {}, // 提成统计
openTeamShow: false, // 团队业绩的提示
openTcShow: false, // 提成统计
userData: {}, // 当前登录对象
bindHowShow: false,
bindValue: '',
};
@@ -248,7 +266,7 @@ export default {
},
jumpMine() {
uni.switchTab({// 首页
uni.switchTab({ // 首页
url: '/pages/mine/mine',
})
},
@@ -357,11 +375,11 @@ export default {
this.loadData(); // 加载更多数据
},
}
}
}
</script>
<style lang="scss" scoped>
.my_team_warp {
.my_team_warp {
background-color: $app-bt-bj;
height: calc(100vh - 144rpx);
overflow: hidden;
@@ -548,9 +566,9 @@ export default {
text-align: left;
margin-top: 10rpx;
}
}
}
.commission_count {
.commission_count {
display: flex;
justify-content: space-between;
align-items: center;
@@ -561,9 +579,9 @@ export default {
font-size: 27rpx;
color: rgba(0, 0, 0, 0.4);
line-height: 38rpx;
}
}
.bind_how {
.bind_how {
width: 150rpx;
height: 45rpx;
display: flex;
@@ -573,5 +591,5 @@ export default {
border: 1rpx solid #fff;
margin-right: 10rpx;
font-size: 24rpx;
}
}
</style>
+151 -173
View File
@@ -2,9 +2,7 @@
<view class="product_info_warp">
<!-- 头部产品描述图 -->
<view class="product_info_header_warp">
<up-swiper :list="swiperList" class="product_info_header_swiper" @click="onSwiper"
@change="e => currentNum = e.current">
<up-swiper :list="swiperList" class="product_info_header_swiper" @click="onSwiper" @change="(e) => (currentNum = e.current)">
<template #indicator>
<view class="indicator-num">
<text class="indicator-num__text">{{ currentNum + 1 }}/{{ swiperList.length }}</text>
@@ -12,12 +10,10 @@
</template>
</up-swiper>
<view class="img_comm left_warp">
<up-image src="/static/common/left_b_st.png" width="30" height="30" bgColor="#f1f6ff00"
@click="jumpLeft"></up-image>
<up-image src="/static/common/left_b_st.png" width="30" height="30" bgColor="#f1f6ff00" @click="jumpLeft"></up-image>
</view>
<view class="img_comm right_warp">
<up-image src="/static/common/share_st.png" width="30" height="30" bgColor="#f1f6ff00"
@click="jumpShare"></up-image>
<up-image src="/static/common/share_st.png" width="30" height="30" bgColor="#f1f6ff00" @click="jumpShare"></up-image>
</view>
</view>
<!-- 数据详情 -->
@@ -26,10 +22,8 @@
<view class="content_data">
<view class="content_data_price">
<text>¥</text>
<text style="font-size: 60rpx;" v-if="orderInfo.minPrice && orderInfo.maxPrice">
{{ orderInfo.minPrice }} - {{ orderInfo.maxPrice }}
</text>
<text style="font-size: 60rpx;" v-else>{{ orderInfo.minPrice }}</text>
<text style="font-size: 60rpx" v-if="orderInfo.minPrice && orderInfo.maxPrice">{{ orderInfo.minPrice }} - {{ orderInfo.maxPrice }}</text>
<text style="font-size: 60rpx" v-else>{{ orderInfo.minPrice }}</text>
<text class="price_o">¥{{ orderInfo.adPrice }}</text>
</view>
<view class="content_data_title">
@@ -37,8 +31,7 @@
</view>
<view class="content_data_series">
<!-- 暂时隐藏 -->
<view>
</view>
<view></view>
<!-- 销量还需要改 -->
<view>销量{{ orderInfo.sales }}件</view>
</view>
@@ -61,7 +54,7 @@
<view class="concrete_item_value">
<view class="address_warp">
<up-image src="/static/common/address2.png" width="10" height="10" bgColor="#f1f6ff00"></up-image>
<view style="margin-left: 10rpx;">请填写地址</view>
<view style="margin-left: 10rpx">请填写地址</view>
</view>
<view class="address_72_warp">现货{{ getValue(PRODUCT_DELIVERY_TIME, orderInfo.deliveryTime) }}</view>
</view>
@@ -97,30 +90,25 @@
<view class="product_but_warp">
<view class="product_but_left">
<view class="left_item">
<up-image src="/static/product/home.png" width="20" height="20" bgColor="#f1f6ff00"
@click="jumpOther('home')"></up-image>
<up-image src="/static/product/home.png" width="20" height="20" bgColor="#f1f6ff00" @click="jumpOther('home')"></up-image>
<view>首页</view>
</view>
<view class="left_item">
<up-image src="/static/product/kefu.png" width="20" height="20" bgColor="#f1f6ff00"
@click="onZiXun"></up-image>
<up-image src="/static/product/kefu.png" width="20" height="20" bgColor="#f1f6ff00" @click="onZiXun"></up-image>
<view>咨询</view>
</view>
<view class="left_item" v-if="!ji">
<up-image src="/static/product/cart.png" width="24" height="20" bgColor="#f1f6ff00"
@click="jumpOther('cart')"></up-image>
<up-image src="/static/product/cart.png" width="24" height="20" bgColor="#f1f6ff00" @click="jumpOther('cart')"></up-image>
<view>购物车</view>
</view>
</view>
<view class="product_but_right">
<view v-if="!ji" class="but_comm join_warp" @click="checkSpecification(true, 'addCart')">加入购物车</view>
<view class="but_comm buy_warp" :class="{ 'border-16': ji }" @click="checkSpecification(true, 'buy')">立即购买
</view>
<view class="but_comm buy_warp" :class="{ 'border-16': ji }" @click="checkSpecification(true, 'buy')">立即购买</view>
</view>
</view>
<!-- 选择规格的弹框 -->
<up-popup :show="specificationShow" :round="10" :closeOnClickOverlay="false" :closeable="true"
@close="specificationShow = false" mode="bottom">
<up-popup :show="specificationShow" :round="10" :closeOnClickOverlay="false" :closeable="true" @close="specificationShow = false" mode="bottom">
<view class="specification_warp">
<!-- 选择地址 -->
<view class="specification_adress_warp">
@@ -142,20 +130,17 @@
<view class="price_warp">
<view class="price_content_warp">
<view>¥</view>
<text style="font-size: 50rpx;"
v-if="selectSpecificationTempl && Object.keys(selectSpecificationTempl).length !== 0">
<text style="font-size: 50rpx" v-if="selectSpecificationTempl && Object.keys(selectSpecificationTempl).length !== 0">
{{ selectSpecificationTempl.price }}
</text>
<view style="font-size: 50rpx" v-else>
{{ orderInfo.minPrice }}
<text v-if="orderInfo.maxPrice">- {{ orderInfo.maxPrice }}</text>
</view>
<view class="price_content_coupon_warp" v-if="orderInfo.couponPrice && orderInfo.couponPrice !== 0">
优惠卷{{ orderInfo.couponPrice }}</view>
<view class="price_content_coupon_warp" v-if="orderInfo.couponPrice && orderInfo.couponPrice !== 0">优惠卷{{ orderInfo.couponPrice }}</view>
</view>
<view class="oOrice_content_warp">¥{{ orderInfo.adPrice }}</view>
<view class="coupon_content_warp" v-if="orderInfo.couponPrice && orderInfo.couponPrice !== 0">
优惠卷已优惠¥{{ orderInfo.couponPrice }}</view>
<view class="coupon_content_warp" v-if="orderInfo.couponPrice && orderInfo.couponPrice !== 0">优惠卷已优惠¥{{ orderInfo.couponPrice }}</view>
</view>
<view class="inventory_warp">
<view>库存</view>
@@ -171,7 +156,10 @@
<view class="specification_item_warp">
<view
:class="oItem.inventory === 0 ? 'item_Warp item_Warp_no_warp' : item.selectVal === oItem.n ? 'item_Warp item_Warp_yes_warp' : 'item_Warp'"
v-for="(oItem, oIndex) in item.items" :key="oItem.n" @click="clickSpecification(index, oItem)">
v-for="(oItem, oIndex) in item.items"
:key="oItem.n"
@click="clickSpecification(index, oItem)"
>
{{ oItem.n }}
</view>
</view>
@@ -188,11 +176,9 @@
</view>
</view>
<view v-if="specificationShowType === 'buy'" class="specification_buy_but" @click="addCart(true)">去支付</view>
<view v-else-if="specificationShowType === 'addCart'" class="specification_buy_but" @click="addCart(false)">
加入购物车
</view>
<view v-else-if="specificationShowType === 'addCart'" class="specification_buy_but" @click="addCart(false)">加入购物车</view>
<view v-else class="product_but_right popup_but">
<view class='but_comm join_warp' @click="addCart(false)">加入购物车</view>
<view class="but_comm join_warp" @click="addCart(false)">加入购物车</view>
<view class="but_comm buy_warp" @click="addCart(true)">立即购买</view>
</view>
</view>
@@ -201,21 +187,16 @@
<!-- 我的客服 -->
<up-modal :show="serviceShow" :showConfirmButton="false">
<view class="slot-content">
<view class="close_warp" @click="serviceShow = false;">
<view class="close_warp" @click="serviceShow = false">
<up-image src="/static/common/close.png" width="20" height="20" bgColor="#f1f6ff00"></up-image>
</view>
<view class="content_">
<view class="content_1">{{ source === "supply_chain" ? '云仓客服' : '平台客服' }}</view>
<view class="content_3">{{ source === "supply_chain"
? CLOUD_SERVICE_PHONE_NUMBER : CUSTOMER_SERVICE_PHONE_NUMBER }}
</view>
<view class="content_1">{{ source === 'supply_chain' ? '云仓客服' : '平台客服' }}</view>
<view class="content_3">{{ source === 'supply_chain' ? CLOUD_SERVICE_PHONE_NUMBER : CUSTOMER_SERVICE_PHONE_NUMBER }}</view>
</view>
<view class="but_">
<view class="but_copy"
@click="copyMobile(source === 'supply_chain' ? CLOUD_SERVICE_PHONE_NUMBER : CUSTOMER_SERVICE_PHONE_NUMBER)">
复制号码
</view>
<view class="but_close" @click="serviceShow = false;">取消</view>
<view class="but_copy" @click="copyMobile(source === 'supply_chain' ? CLOUD_SERVICE_PHONE_NUMBER : CUSTOMER_SERVICE_PHONE_NUMBER)">复制号码</view>
<view class="but_close" @click="serviceShow = false">取消</view>
</view>
</view>
</up-modal>
@@ -225,9 +206,7 @@
<view class="uni-banner">
<view class="banner_box">
<view class="title_">温馨提示</view>
<view class="msg_">
该商家暂未开通供应链权限,请联系供应链客服开通授权。
</view>
<view class="msg_">该商家暂未开通供应链权限,请联系供应链客服开通授权。</view>
<view class="phone_">{{ CLOUD_SERVICE_PHONE_NUMBER }}</view>
<view class="but_">
<view class="but_b" @click="copyMobile(CLOUD_SERVICE_PHONE_NUMBER)">立即联系</view>
@@ -242,7 +221,7 @@
<script>
import { getGoodsDetail, addGoods, getGoodsSpecs } from '@/api/product.js';
import { getValue, PRODUCT_DELIVERY_TIME } from '@/utils/enumUtils.js';
import { copyData } from '@/utils/index.js'
import { copyData } from '@/utils/index.js';
import { CUSTOMER_SERVICE_PHONE_NUMBER, CLOUD_SERVICE_PHONE_NUMBER } from '@/utils/config.js';
export default {
@@ -255,7 +234,7 @@ export default {
},
CLOUD_SERVICE_PHONE_NUMBER() {
return CLOUD_SERVICE_PHONE_NUMBER;
},
}
},
data() {
return {
@@ -263,17 +242,17 @@ export default {
swiperList: [],
currentNum: 0,
specificationShow: false,
specificationShowType: '',// 弹框类型
specificationShowType: '', // 弹框类型
orderInfo: {},
specificationList: [],//规格
selectSpecification: [],// 选择的规格
specificationTempl: [],// 规格模版数据
selectSpecificationTempl: {},// 选择规格模版数据
serviceShow: false,// 联系客服弹框
specificationList: [], //规格
selectSpecification: [], // 选择的规格
specificationTempl: [], // 规格模版数据
selectSpecificationTempl: {}, // 选择规格模版数据
serviceShow: false, // 联系客服弹框
openShow: false,
source: null,// 来源:供应链,自营
source: null, // 来源:供应链,自营
ji: 0
}
};
},
onLoad(options) {
const id = options.id;
@@ -288,13 +267,12 @@ export default {
this.getById();
}
}
},
methods: {
onZiXun(){
onZiXun() {
uni.navigateTo({
url:'/pages/rwa_package/setting/kefu?type=5260'
})
url: '/pages/rwa_package/setting/kefu?type=5260'
});
},
getValue,
onSwiper(index) {
@@ -316,17 +294,20 @@ export default {
},
jumpOther(type) {
if (type === 'home') {
uni.switchTab({// 首页
url: '/pages/home/home',
})
} else if (type === "share") {// 分享
uni.navigateTo({
url: '/pages/other_package/invite_friends/invite_friends',
})
} else if (type === "cart") {// 购物车
uni.switchTab({
url: '/pages/shopping_cart/shopping_cart',
})
// 首页
url: '/pages/home/home'
});
} else if (type === 'share') {
// 分享
uni.navigateTo({
url: '/pages/other_package/invite_friends/invite_friends'
});
} else if (type === 'cart') {
// 购物车
uni.switchTab({
url: '/pages/shopping_cart/shopping_cart'
});
}
},
/**
@@ -334,21 +315,20 @@ export default {
*/
async getById() {
const params = {
id: this.id,
}
id: this.id
};
const resp = await getGoodsDetail(params);
if (resp && resp.bizcode === 100) {
const data = resp.data;
this.ji = data.type == 3 ? 1 : 0;
// 商品图
if (data.goodsGraph) {
this.swiperList = data.goodsGraph.split(",");
this.swiperList = data.goodsGraph.split(',');
}
data.addressObj = {}// 收件人地址
data.quantity = 1// 数量
data.inventory = 0// 库存
data.addressObj = {}; // 收件人地址
data.quantity = 1; // 数量
data.inventory = 0; // 库存
this.orderInfo = data;
}
},
/**
@@ -357,45 +337,45 @@ export default {
getSupplyChainById() {
const params = {
goods_id: this.id,
app_id: "2024111300164927",
sign_type: "MD5",
sign: "d04be0cedd49608e758458325faecf90",
}
app_id: '2024111300164927',
sign_type: 'MD5',
sign: 'd04be0cedd49608e758458325faecf90'
};
uni.request({
url: "https://cyysc.gscm.top/outside/1/atm/goods/detail",
method: "get",
url: 'https://cyysc.gscm.top/outside/1/atm/goods/detail',
method: 'get',
data: params,
header: {
},
header: {},
success: (res) => {
const data = res.data;
if (data && data.result === 1) {
const objData = data.data;
const content = objData.content.replace(/&amp;/g, '&')
.replace(/&lt;/g, "<")
.replace(/&gt;/g, ">")
.replace(/&quot;/g, "\'")
.replace(/&#39;/g, '\"')
.replace(/\n/g, "<br>");
const content = objData.content
.replace(/&amp;/g, '&')
.replace(/&lt;/g, '<')
.replace(/&gt;/g, '>')
.replace(/&quot;/g, "'")
.replace(/&#39;/g, '"')
.replace(/\n/g, '<br>');
const orderInfo = {
detailInfo: content,
minPrice: objData.min_price,
// maxPrice:objData.max_price,
adPrice: objData.price,
sales: objData.virtual_sales,
}
const domain = "https://cyysc.gscm.top";
sales: objData.virtual_sales
};
const domain = 'https://cyysc.gscm.top';
let currentThumb = objData.thumb;
if (objData.thumb.indexOf('https://') === -1 && objData.thumb.indexOf('http://') === -1) {
currentThumb = domain + "/static/upload/" + objData.thumb;
currentThumb = domain + '/static/upload/' + objData.thumb;
}
this.swiperList = [currentThumb];// 封面图
this.swiperList = [currentThumb]; // 封面图
this.orderInfo = orderInfo;
}
},
fail: (error) => {
console.log("error", error);
},
console.log('error', error);
}
});
},
async checkSpecification(val, type) {
@@ -403,20 +383,20 @@ export default {
if (type == 'n' && this.ji == 1) {
type = 'buy';
}
console.log('afsdfsd', source, type)
if (source && source === "supply_chain") {
console.log('afsdfsd', source, type);
if (source && source === 'supply_chain') {
this.openShow = true;
return;
}
// 需要查询一下最新的规格
if (val) {
await this.querySpecification()
await this.querySpecification();
const data = this.orderInfo;
this.getSpecification(data.specs);
} else {
this.specificationList = [];//规格
this.selectSpecification = [];// 选择的规格
this.specificationTempl = [];// 规格模版数据
this.specificationList = []; //规格
this.selectSpecification = []; // 选择的规格
this.specificationTempl = []; // 规格模版数据
}
this.specificationShow = val;
this.specificationShowType = type;
@@ -426,30 +406,30 @@ export default {
const optionArr = [];
if (specs) {
const arr = JSON.parse(specs);
arr.map(item => {
arr.map((item) => {
optionArr.push({
type: item.type,
items: item.items,
selectVal: null,
})
})
selectVal: null
});
});
}
this.specificationList = optionArr;
},
// 获取规格模版数据
async querySpecification() {
const params = {
id: this.id,
}
id: this.id
};
const resp = await getGoodsSpecs(params);
if (resp && resp.bizcode === 100) {
const data = resp.data;
let stock = 0;
data.map(item => {
data.map((item) => {
stock = stock + item.stock;
})
});
this.specificationTempl = data;
this.orderInfo.inventory = stock;// 库存
this.orderInfo.inventory = stock; // 库存
}
},
//改变规格的样式
@@ -468,52 +448,49 @@ export default {
this.selectSpecification = currentSelectSpecification;
const oldLength = this.specificationList.length;
const newLength = this.selectSpecification.length;
console.log('selectSpecificationFun',oldLength,newLength)
// 开始做校验
if (oldLength === newLength) {
const newLengthStr = this.selectSpecification.join("♧");
const newLengthStr = this.selectSpecification.join('♧');
const specificationTempl = this.specificationTempl;
let selectTempl = {};
console.log('selectSpecificationFun1',specificationTempl,this.selectSpecification)
specificationTempl.map(item => {
console.log('selectSpecificationFun11',item.combNames,newLengthStr)
specificationTempl.map((item) => {
if (item.combNames === newLengthStr) {
selectTempl = item
selectTempl = item;
return;
}
});
console.log('selectSpecificationFun11',selectTempl)
this.selectSpecificationTempl = selectTempl;
this.orderInfo.inventory = selectTempl.stock;// 库存
this.orderInfo.inventory = selectTempl.stock; // 库存
}
},
// 改变数量
quantityFun(type) {
let currentQuantity = this.orderInfo.quantity;// 当前数量
if (type === "minus") {
if (currentQuantity === 1) {
let currentQuantity = this.orderInfo.quantity; // 当前数量
const minBuyNum = this.selectSpecificationTempl.minBuyNum || 1; // 当前起订量,默认为1
// 确保起订量至少为1
const step = Math.max(minBuyNum, 1);
if (type === 'minus') {
// 计算减少后的数量,确保不低于最小起订量且是其倍数
const newQuantity = currentQuantity - step;
if (newQuantity < minBuyNum) {
this.$refs.uToastRef.show({
type: 'error',
message: "不能低于最低购买数量",
message: `不能低于最低购买数量${minBuyNum}`
});
} else {
currentQuantity = currentQuantity - 1;
currentQuantity = newQuantity;
}
} else if (type === "add") {
// 需要判断一下库存
currentQuantity = currentQuantity + 1;
} else if (type === 'add') {
currentQuantity = currentQuantity + step;
}
this.orderInfo.quantity = currentQuantity;
},
// 加入购入车
async addCart(isBy = false) {
const selectTempl = this.selectSpecificationTempl;
console.log('aaaaaaaaaaaa',selectTempl)
if (!selectTempl || Object.keys(selectTempl).length === 0) {
uni.showToast({
title: '请先选择规格',
@@ -522,26 +499,33 @@ export default {
});
return;
}
if (!(selectTempl.minBuyNum > 0 && this.orderInfo.quantity >= selectTempl.minBuyNum && this.orderInfo.quantity % selectTempl.minBuyNum === 0)) {
uni.showToast({
title: `购买数量需要大于等于起订量${selectTempl.minBuyNum}`,
icon: 'none', // 可选 success/loading/none
duration: 2000 // 持续时长,单位ms
});
return;
}
const params = {
id: this.id,
specsId: selectTempl.id,// 规格ID
goodsNum: this.orderInfo.quantity,// 商品数量
}
console.log('selectTempl', selectTempl)
specsId: selectTempl.id, // 规格ID
goodsNum: this.orderInfo.quantity // 商品数量
};
console.log('selectTempl', selectTempl);
if (this.ji == 1) {
params['specsId'] = selectTempl;
uni.navigateTo({
url: `/pages/order_package/order_submit/order_submit?sed=${JSON.stringify(params)}`,
})
url: `/pages/order_package/order_submit/order_submit?sed=${JSON.stringify(params)}`
});
return;
}
const resp = await addGoods(params);
if (resp && resp.bizcode === 100) {
if (isBy) {
uni.navigateTo({
url: `/pages/order_package/order_submit/order_submit?ids=${resp.data}`,
})
url: `/pages/order_package/order_submit/order_submit?ids=${resp.data}`
});
} else {
this.specificationShow = false;
uni.showToast({
@@ -556,12 +540,9 @@ export default {
}
},
// 跳转到分享页面
jumpShare() {
jumpShare() {}
}
}
}
};
</script>
<style lang="scss" scoped>
@@ -665,7 +646,7 @@ export default {
.content_concrete {
padding: 20rpx;
background: #FFFFFF;
background: #ffffff;
border-radius: 30rpx;
margin-top: 20rpx;
@@ -682,7 +663,7 @@ export default {
}
.concrete_item_but {
border-bottom: 1rpx solid #EEEEEEFF;
border-bottom: 1rpx solid #eeeeeeff;
}
.concrete_item_title {
@@ -692,7 +673,7 @@ export default {
.concrete_item_value {
font-weight: 500;
color: #1A1A1A;
color: #1a1a1a;
width: calc(100% - 140rpx);
.address_warp {
@@ -721,7 +702,7 @@ export default {
}
.content_details {
background: #FFFFFF;
background: #ffffff;
border-radius: 24rpx;
padding: 10rpx 10rpx 30rpx;
margin-top: 30rpx;
@@ -737,14 +718,13 @@ export default {
}
}
.product_but_warp {
padding: 20rpx;
position: fixed;
bottom: 0;
height: 160rpx;
width: calc(100% - 40rpx);
background-color: #FFFFFF;
background-color: #ffffff;
display: flex;
justify-content: space-between;
@@ -762,7 +742,6 @@ export default {
color: #666666;
}
}
}
.product_but_right {
@@ -772,12 +751,12 @@ export default {
.but_comm {
text-align: center;
padding: 20rpx 40rpx;
color: #FFFFFF;
color: #ffffff;
height: 46rpx;
}
.join_warp {
background: #E4D6FD;
background: #e4d6fd;
border-radius: 16rpx 0rpx 0rpx 16rpx;
color: $app-zt-color;
}
@@ -793,7 +772,7 @@ export default {
.specification_adress_warp {
padding: 30rpx;
background: #FFFFFF;
background: #ffffff;
border-radius: 24rpx;
}
@@ -814,7 +793,7 @@ export default {
.address_title {
font-weight: 500;
font-size: 26rpx;
color: #BBBBBB;
color: #bbbbbb;
margin-bottom: 10rpx;
margin-right: 20rpx;
width: 592rpx;
@@ -832,7 +811,7 @@ export default {
.specification_product_warp {
display: flex;
background: #FFFFFF;
background: #ffffff;
border-radius: 24rpx;
padding: 30rpx;
margin-top: 20rpx;
@@ -885,7 +864,7 @@ export default {
}
.specification_list_warp {
background: #FFFFFF;
background: #ffffff;
border-radius: 24rpx;
padding: 30rpx;
margin-top: 20rpx;
@@ -897,7 +876,7 @@ export default {
.list_title_warp {
font-weight: 500;
font-size: 30rpx;
color: #1A1A1A;
color: #1a1a1a;
line-height: 48rpx;
}
@@ -922,7 +901,7 @@ export default {
}
.item_Warp_no_warp {
background: #F5F5F5;
background: #f5f5f5;
color: #999999;
text-decoration-line: line-through;
}
@@ -930,12 +909,12 @@ export default {
.item_Warp_yes_warp {
border: 1px solid $app-bt-bj;
color: $app-bt-bj;
background: #FFFFFF;
background: #ffffff;
}
}
.specification_but {
background: #FFFFFF;
background: #ffffff;
border-radius: 24rpx;
padding: 30rpx;
margin-top: 30rpx;
@@ -952,18 +931,18 @@ export default {
padding: 20rpx 0;
text-align: center;
background-color: $app-bt-bj;
color: #FFFFFF;
color: #ffffff;
margin-top: 20rpx;
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
color: #ffffff;
border-radius: 16rpx;
}
}
}
.popup_but {
background-color: #FFFFFF;
background-color: #ffffff;
.but_comm {
width: 40%;
@@ -971,7 +950,6 @@ export default {
}
.open_Show {
/* 弹出层形式的广告 */
.uni-banner {
display: flex;
@@ -1025,10 +1003,10 @@ export default {
margin-top: 50rpx;
.but_b {
background: #03AD27;
background: #03ad27;
border-radius: 41rpx;
font-size: 32rpx;
color: #FFFFFF;
color: #ffffff;
width: 70%;
text-align: center;
padding: 20rpx 0;
+2 -2
View File
@@ -2,8 +2,8 @@
// export const BASE_URL="http://cl55un59859.vicp.fun:24346"; // 测试环境
// export const BASE_URL = "https://api.tbmall.xin"; //生产
// export const BASE_URL ='http://api.hm.a-d.work:6880/api' // 测试
export const BASE_URL ='http://api.outer.tbmall.xin:6880' // 测试
// export const BASE_URL ='http://api.hm.a-d.work:6880' // 测试
export const BASE_URL ='http://api.outer.tbmall.xin:6880' // 本地测试