fix:bug修复

This commit is contained in:
黄泽群
2026-07-22 17:18:26 +08:00
parent 53f1ebba18
commit 17ab8beefa
6 changed files with 237 additions and 179 deletions
+1 -7
View File
@@ -46,16 +46,10 @@
methods: { methods: {
leftJump() { leftJump() {
const leftPath = this.leftPath; const leftPath = this.leftPath;
if(!leftPath){
return;
}
const leftPathType = this.leftPathType; const leftPathType = this.leftPathType;
if(leftPathType === "navigateTo"){ if(leftPathType === "navigateTo"){
// uni.navigateTo({
// url:leftPath,
// })
uni.navigateBack(); uni.navigateBack();
}else if(leftPathType === "switchTab"){ }else if(leftPathType === "switchTab" && leftPath){
uni.switchTab({ uni.switchTab({
url: leftPath, url: leftPath,
}); });
+84 -21
View File
@@ -79,6 +79,18 @@
</up-checkbox> </up-checkbox>
</view> </view>
<up-toast ref="uToastRef"></up-toast> <up-toast ref="uToastRef"></up-toast>
<!-- 自定义协议弹窗 -->
<view v-if="showPolicyModal" class="modal-overlay" @click="showPolicyModal = false">
<view class="modal-content" @click.stop>
<view class="modal-title">温馨提示</view>
<view class="modal-message">请您阅读并同意《服务协议》与《隐私政策》</view>
<view class="modal-buttons">
<view class="modal-btn modal-btn-cancel" @click="showPolicyModal = false">取消</view>
<view class="modal-btn modal-btn-confirm" @click="handlePolicyConfirm">同意并登录</view>
</view>
</view>
</view>
</view> </view>
</template> </template>
@@ -109,14 +121,14 @@
const hyyAlipay = uni.requireNativePlugin("Hyy-Alipay"); const hyyAlipay = uni.requireNativePlugin("Hyy-Alipay");
// #endif // #endif
export default { export default {
onLaunch: function() { onLaunch: function () {
console.log("App Launch"); console.log("App Launch");
const res = uni.getSystemInfoSync(); const res = uni.getSystemInfoSync();
uni.setStorageSync("platform", res.platform); uni.setStorageSync("platform", res.platform);
// #ifdef APP-PLUS // #ifdef APP-PLUS
// 获取应用版本信息 // 获取应用版本信息
plus.runtime.getProperty(plus.runtime.appid, function(inf) { plus.runtime.getProperty(plus.runtime.appid, function (inf) {
console.log("版本信息", inf.versionCode); console.log("版本信息", inf.versionCode);
uni.setStorageSync("version-1", inf.version); // 大版本号 uni.setStorageSync("version-1", inf.version); // 大版本号
uni.setStorageSync("versionCode", inf.versionCode); // 小版本号 uni.setStorageSync("versionCode", inf.versionCode); // 小版本号
@@ -143,17 +155,18 @@
"padding-left": "16px", "padding-left": "16px",
}, },
loginWay: "password", loginWay: "password",
isShow: false, // 是否显示 isShow: false,
isPolicy: false, // 是否同意 isPolicy: false,
countdown: false, // 清空倒计时 countdown: false,
loading: false, loading: false,
showPolicyModal: false,
}; };
}, },
methods: { methods: {
onBack(){ onBack() {
console.log('onBack',) console.log('onBack',)
uni.switchTab({ uni.switchTab({
url:'/pages/home/home' url: '/pages/home/home'
}) })
}, },
aa() { aa() {
@@ -185,17 +198,7 @@
const form = this.form; const form = this.form;
const params = {}; const params = {};
if (!this.isPolicy) { if (!this.isPolicy) {
uni.showModal({ this.showPolicyModal = true;
title: '温馨提示',
content: '请您阅读并同意《服务协议》与《隐私政策》',
confirmText: "同意并登录",
success: (res) => {
if (res.confirm) {
this.isPolicy = true;
this.loginFun(val);
}
}
});
return; return;
} }
let response = val; let response = val;
@@ -451,6 +454,11 @@
} }
); );
}, },
handlePolicyConfirm() {
this.showPolicyModal = false;
this.isPolicy = true;
this.loginFun();
},
}, },
computed: { computed: {
isIOS() { isIOS() {
@@ -460,7 +468,7 @@
return false; return false;
}, },
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@@ -535,5 +543,60 @@
align-items: center; align-items: center;
margin-bottom: 80rpx; margin-bottom: 80rpx;
} }
} }
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
}
.modal-content {
width: 500rpx;
background: #fff;
border-radius: 20rpx;
padding:24rpx;
text-align: center;
}
.modal-title {
font-size: 36rpx;
font-weight: bold;
color: #333;
margin-bottom: 30rpx;
}
.modal-message {
font-size: 28rpx;
color: #666;
line-height: 1.6;
margin-bottom: 40rpx;
}
.modal-buttons {
display: flex;
}
.modal-btn {
flex: 1;
height: 80rpx;
line-height: 80rpx;
font-size: 30rpx;
}
.modal-btn-cancel {
color: #999;
border-right: 1rpx solid #eee;
}
.modal-btn-confirm {
color: #7934F6;
}
</style> </style>
+3 -3
View File
@@ -11,7 +11,7 @@
<text style="margin-right: 20rpx">{{ currentUserData.nickname || '信任桥用户' }}</text> <text style="margin-right: 20rpx">{{ currentUserData.nickname || '信任桥用户' }}</text>
<view class="level level-grade" @click="jumpToTrustBridge" v-if="currentUserData.agentName"> <view class="level level-grade" @click="jumpToTrustBridge" v-if="currentUserData.agentName">
<up-image src="https://static.tbmall.xin/static/mine/rz.png" <up-image src="/static/common/rz.png"
style="margin-right: 8rpx; margin-top: 6rpx" shape="circle" width="13" height="13" style="margin-right: 8rpx; margin-top: 6rpx" shape="circle" width="13" height="13"
bgColor="#f1f6ff00"></up-image> bgColor="#f1f6ff00"></up-image>
<view>{{ currentUserData.agentName }}</view> <view>{{ currentUserData.agentName }}</view>
@@ -680,8 +680,8 @@ export default {
} }
&.level-grade { &.level-grade {
background: rgba(122, 53, 246, 0.1); background: rgba(248,185,75,0.15);
color: #7a35f6; color: #613700;
} }
} }
@@ -1,6 +1,6 @@
<template> <template>
<view class="order_submit_warp"> <view class="order_submit_warp">
<Header leftTitle="提交订单" leftPathType="switchTab" leftPath="/pages/shopping_cart/shopping_cart" /> <Header leftTitle="提交订单" :leftPathType="leftPathType" :leftPath="leftPath" />
<!-- 收件人信息 --> <!-- 收件人信息 -->
<view class="order_submit_header_warp" @click="checkAddressShow(true, 'data')" <view class="order_submit_header_warp" @click="checkAddressShow(true, 'data')"
v-if="orderInfo.address && Object.keys(orderInfo.address).length !== 0"> v-if="orderInfo.address && Object.keys(orderInfo.address).length !== 0">
@@ -261,11 +261,9 @@
<view class="address_popup_warp"> <view class="address_popup_warp">
<view class="address_popup_title">收件地址</view> <view class="address_popup_title">收件地址</view>
<view class="address_popup_content"> <view class="address_popup_content">
<view class="address_popup_content_add" @click="addAdress">
+ 新增地址</view>
<Address @valueFunc="getAddressValueFunc" /> <Address @valueFunc="getAddressValueFunc" />
</view> </view>
<view class="popup_but" @click="addressOk"> 确认 </view> <view class="popup_but" @click="addAdress"> 新增地址 </view>
</view> </view>
</up-popup> </up-popup>
<u-modal :show="tipsShow" v-if="tipsShow" title="提示" showCancelButton @cancel="onCancel" @confirm="onConfirm" <u-modal :show="tipsShow" v-if="tipsShow" title="提示" showCancelButton @cancel="onCancel" @confirm="onConfirm"
@@ -364,6 +362,8 @@ export default {
isShow: false, isShow: false,
addressListOne: [], addressListOne: [],
ids: 0, ids: 0,
leftPathType: "switchTab",
leftPath: "/pages/shopping_cart/shopping_cart",
orderInfo: { orderInfo: {
// coupon:2,//优惠卷 // coupon:2,//优惠卷
paymentMethod: PAYMENT_WAY.ALIPAY, // 支付方式,暂时默认用支付宝 paymentMethod: PAYMENT_WAY.ALIPAY, // 支付方式,暂时默认用支付宝
@@ -409,6 +409,8 @@ export default {
if (option.sed) { if (option.sed) {
this.isPoints = 1; this.isPoints = 1;
this.sed = JSON.parse(option.sed); this.sed = JSON.parse(option.sed);
this.leftPathType = "navigateTo";
this.leftPath = null;
await this.addressList(); await this.addressList();
// console.log('addressListOne',this.addressListOne) // console.log('addressListOne',this.addressListOne)
// if(this.addressListOne && this.addressListOne.length){ // if(this.addressListOne && this.addressListOne.length){
@@ -1005,14 +1007,10 @@ export default {
} }
}, },
// 地址选中 // 地址选中
getAddressValueFunc(item) { async getAddressValueFunc(item) {
const addressObj = item; const addressObj = item;
addressObj.addressStr = assembleAddress(addressObj).names; addressObj.addressStr = assembleAddress(addressObj).names;
this.selectAddress = addressObj; this.selectAddress = addressObj;
},
// 地址选中OK
async addressOk() {
console.log("this.selectAddress", this.selectAddress);
const type = this.addressType; const type = this.addressType;
const addressIndex = this.addressIndex; const addressIndex = this.addressIndex;
const shopsIndex = this.shopsIndex; const shopsIndex = this.shopsIndex;
@@ -1022,7 +1020,7 @@ export default {
this.orderInfo.shops[shopsIndex].addrTimes[addressIndex].address = this.orderInfo.shops[shopsIndex].addrTimes[addressIndex].address =
this.selectAddress; this.selectAddress;
} }
this.addressShow = this.false; this.addressShow = false;
if (this.selectAddress && !this.sed) { if (this.selectAddress && !this.sed) {
const params = { const params = {
cartIds: this.ids, cartIds: this.ids,
@@ -1040,7 +1038,7 @@ export default {
}); });
} }
data.shops = shops; data.shops = shops;
data.paymentMethod = null; // 支付方式 data.paymentMethod = null;
this.orderInfo = data; this.orderInfo = data;
} }
} }
@@ -1190,7 +1190,7 @@ export default {
}; };
console.log("selectTempl", selectTempl); console.log("selectTempl", selectTempl);
if (this.isShowCart == 1 || this.isCoupon) { if (this.isShowCart == 1 || this.isCoupon || isBy) {
console.log("活动类型params---秦星星", params, this.isCoupon); console.log("活动类型params---秦星星", params, this.isCoupon);
params["specsId"] = selectTempl; params["specsId"] = selectTempl;
let url = ""; let url = "";
@@ -1208,6 +1208,13 @@ export default {
)}&address=${this.selectAddress?.id}&isCoupon=${this.isCoupon}` )}&address=${this.selectAddress?.id}&isCoupon=${this.isCoupon}`
} }
if (!url) {
url = `/pages/order_package/order_submit/order_submit?sed=${JSON.stringify(
params
)}&address=${this.selectAddress?.id}`;
this.specificationShow = false;
}
uni.navigateTo({ uni.navigateTo({
url: url url: url
}); });
@@ -1215,11 +1222,6 @@ export default {
} }
const resp = await addGoods(params); const resp = await addGoods(params);
if (resp && resp.bizcode === 100) { if (resp && resp.bizcode === 100) {
if (isBy) {
uni.navigateTo({
url: `/pages/order_package/order_submit/order_submit?ids=${resp.data}&address=${this.selectAddress?.id}`,
});
} else {
this.specificationShow = false; this.specificationShow = false;
uni.showToast({ uni.showToast({
title: "成功加入购物车", title: "成功加入购物车",
@@ -1227,7 +1229,6 @@ export default {
duration: 2000, // 持续时长,单位ms duration: 2000, // 持续时长,单位ms
}); });
} }
}
}, },
// 跳转到分享页面 // 跳转到分享页面
jumpShare() { jumpShare() {
+4 -2
View File
@@ -5,7 +5,7 @@
<template v-slot:left> <template v-slot:left>
<view class="header-left-content"> <view class="header-left-content">
<u-icon size="36rpx" name="arrow-left" color="#000" @click="goback"></u-icon> <u-icon size="36rpx" name="arrow-left" color="#000" @click="goback"></u-icon>
<up-image src="https://static.tbmall.xin/static/mine-purse/vcoin.png" width="22" height="22" <up-image src="https://static.tbmall.xin/static/mine-purse/vcoin.png" width="18" height="18"
bgColor="#f1f6ff00" class="purse_amount"></up-image> bgColor="#f1f6ff00" class="purse_amount"></up-image>
<text class="header-text">数字积分兑换专区: {{ balanceData.curAmount || 0 }}</text> <text class="header-text">数字积分兑换专区: {{ balanceData.curAmount || 0 }}</text>
</view> </view>
@@ -196,14 +196,16 @@ export default {
.header-text { .header-text {
font-size: 28rpx; font-size: 28rpx;
color: #333; color: #333;
margin-left: 18rpx;
} }
.purse_amount{ .purse_amount{
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
margin: 0 12rpx;
display: flex; display: flex;
margin-top: 8rpx;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
vertical-align: middle;
} }
.bottom-btn { .bottom-btn {
width: 100%; width: 100%;