fix:bug修复
This commit is contained in:
@@ -46,16 +46,10 @@
|
||||
methods: {
|
||||
leftJump() {
|
||||
const leftPath = this.leftPath;
|
||||
if(!leftPath){
|
||||
return;
|
||||
}
|
||||
const leftPathType = this.leftPathType;
|
||||
if(leftPathType === "navigateTo"){
|
||||
// uni.navigateTo({
|
||||
// url:leftPath,
|
||||
// })
|
||||
uni.navigateBack();
|
||||
}else if(leftPathType === "switchTab"){
|
||||
}else if(leftPathType === "switchTab" && leftPath){
|
||||
uni.switchTab({
|
||||
url: leftPath,
|
||||
});
|
||||
|
||||
@@ -79,6 +79,18 @@
|
||||
</up-checkbox>
|
||||
</view>
|
||||
<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>
|
||||
</template>
|
||||
|
||||
@@ -109,14 +121,14 @@
|
||||
const hyyAlipay = uni.requireNativePlugin("Hyy-Alipay");
|
||||
// #endif
|
||||
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
export default {
|
||||
onLaunch: function () {
|
||||
console.log("App Launch");
|
||||
const res = uni.getSystemInfoSync();
|
||||
uni.setStorageSync("platform", res.platform);
|
||||
// #ifdef APP-PLUS
|
||||
// 获取应用版本信息
|
||||
plus.runtime.getProperty(plus.runtime.appid, function(inf) {
|
||||
plus.runtime.getProperty(plus.runtime.appid, function (inf) {
|
||||
console.log("版本信息", inf.versionCode);
|
||||
uni.setStorageSync("version-1", inf.version); // 大版本号
|
||||
uni.setStorageSync("versionCode", inf.versionCode); // 小版本号
|
||||
@@ -143,17 +155,18 @@
|
||||
"padding-left": "16px",
|
||||
},
|
||||
loginWay: "password",
|
||||
isShow: false, // 是否显示
|
||||
isPolicy: false, // 是否同意
|
||||
countdown: false, // 清空倒计时
|
||||
isShow: false,
|
||||
isPolicy: false,
|
||||
countdown: false,
|
||||
loading: false,
|
||||
showPolicyModal: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
onBack(){
|
||||
onBack() {
|
||||
console.log('onBack',)
|
||||
uni.switchTab({
|
||||
url:'/pages/home/home'
|
||||
url: '/pages/home/home'
|
||||
})
|
||||
},
|
||||
aa() {
|
||||
@@ -185,17 +198,7 @@
|
||||
const form = this.form;
|
||||
const params = {};
|
||||
if (!this.isPolicy) {
|
||||
uni.showModal({
|
||||
title: '温馨提示',
|
||||
content: '请您阅读并同意《服务协议》与《隐私政策》',
|
||||
confirmText: "同意并登录",
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.isPolicy = true;
|
||||
this.loginFun(val);
|
||||
}
|
||||
}
|
||||
});
|
||||
this.showPolicyModal = true;
|
||||
return;
|
||||
}
|
||||
let response = val;
|
||||
@@ -451,6 +454,11 @@
|
||||
}
|
||||
);
|
||||
},
|
||||
handlePolicyConfirm() {
|
||||
this.showPolicyModal = false;
|
||||
this.isPolicy = true;
|
||||
this.loginFun();
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
isIOS() {
|
||||
@@ -460,7 +468,7 @@
|
||||
return false;
|
||||
},
|
||||
},
|
||||
};
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@@ -535,5 +543,60 @@
|
||||
align-items: center;
|
||||
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>
|
||||
+3
-3
@@ -11,7 +11,7 @@
|
||||
<text style="margin-right: 20rpx">{{ currentUserData.nickname || '信任桥用户' }}</text>
|
||||
|
||||
<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"
|
||||
bgColor="#f1f6ff00"></up-image>
|
||||
<view>{{ currentUserData.agentName }}</view>
|
||||
@@ -680,8 +680,8 @@ export default {
|
||||
}
|
||||
|
||||
&.level-grade {
|
||||
background: rgba(122, 53, 246, 0.1);
|
||||
color: #7a35f6;
|
||||
background: rgba(248,185,75,0.15);
|
||||
color: #613700;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<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')"
|
||||
v-if="orderInfo.address && Object.keys(orderInfo.address).length !== 0">
|
||||
@@ -261,11 +261,9 @@
|
||||
<view class="address_popup_warp">
|
||||
<view class="address_popup_title">收件地址</view>
|
||||
<view class="address_popup_content">
|
||||
<view class="address_popup_content_add" @click="addAdress">
|
||||
+ 新增地址</view>
|
||||
<Address @valueFunc="getAddressValueFunc" />
|
||||
</view>
|
||||
<view class="popup_but" @click="addressOk"> 确认 </view>
|
||||
<view class="popup_but" @click="addAdress"> 新增地址 </view>
|
||||
</view>
|
||||
</up-popup>
|
||||
<u-modal :show="tipsShow" v-if="tipsShow" title="提示" showCancelButton @cancel="onCancel" @confirm="onConfirm"
|
||||
@@ -364,6 +362,8 @@ export default {
|
||||
isShow: false,
|
||||
addressListOne: [],
|
||||
ids: 0,
|
||||
leftPathType: "switchTab",
|
||||
leftPath: "/pages/shopping_cart/shopping_cart",
|
||||
orderInfo: {
|
||||
// coupon:2,//优惠卷
|
||||
paymentMethod: PAYMENT_WAY.ALIPAY, // 支付方式,暂时默认用支付宝
|
||||
@@ -409,6 +409,8 @@ export default {
|
||||
if (option.sed) {
|
||||
this.isPoints = 1;
|
||||
this.sed = JSON.parse(option.sed);
|
||||
this.leftPathType = "navigateTo";
|
||||
this.leftPath = null;
|
||||
await this.addressList();
|
||||
// console.log('addressListOne',this.addressListOne)
|
||||
// if(this.addressListOne && this.addressListOne.length){
|
||||
@@ -1005,14 +1007,10 @@ export default {
|
||||
}
|
||||
},
|
||||
// 地址选中
|
||||
getAddressValueFunc(item) {
|
||||
async getAddressValueFunc(item) {
|
||||
const addressObj = item;
|
||||
addressObj.addressStr = assembleAddress(addressObj).names;
|
||||
this.selectAddress = addressObj;
|
||||
},
|
||||
// 地址选中OK
|
||||
async addressOk() {
|
||||
console.log("this.selectAddress", this.selectAddress);
|
||||
const type = this.addressType;
|
||||
const addressIndex = this.addressIndex;
|
||||
const shopsIndex = this.shopsIndex;
|
||||
@@ -1022,7 +1020,7 @@ export default {
|
||||
this.orderInfo.shops[shopsIndex].addrTimes[addressIndex].address =
|
||||
this.selectAddress;
|
||||
}
|
||||
this.addressShow = this.false;
|
||||
this.addressShow = false;
|
||||
if (this.selectAddress && !this.sed) {
|
||||
const params = {
|
||||
cartIds: this.ids,
|
||||
@@ -1040,7 +1038,7 @@ export default {
|
||||
});
|
||||
}
|
||||
data.shops = shops;
|
||||
data.paymentMethod = null; // 支付方式
|
||||
data.paymentMethod = null;
|
||||
this.orderInfo = data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1190,7 +1190,7 @@ export default {
|
||||
};
|
||||
|
||||
console.log("selectTempl", selectTempl);
|
||||
if (this.isShowCart == 1 || this.isCoupon) {
|
||||
if (this.isShowCart == 1 || this.isCoupon || isBy) {
|
||||
console.log("活动类型params---秦星星", params, this.isCoupon);
|
||||
params["specsId"] = selectTempl;
|
||||
let url = "";
|
||||
@@ -1208,6 +1208,13 @@ export default {
|
||||
)}&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({
|
||||
url: url
|
||||
});
|
||||
@@ -1215,11 +1222,6 @@ export default {
|
||||
}
|
||||
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}&address=${this.selectAddress?.id}`,
|
||||
});
|
||||
} else {
|
||||
this.specificationShow = false;
|
||||
uni.showToast({
|
||||
title: "成功加入购物车",
|
||||
@@ -1227,7 +1229,6 @@ export default {
|
||||
duration: 2000, // 持续时长,单位ms
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
// 跳转到分享页面
|
||||
jumpShare() {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<template v-slot:left>
|
||||
<view class="header-left-content">
|
||||
<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>
|
||||
<text class="header-text">数字积分兑换专区: {{ balanceData.curAmount || 0 }}</text>
|
||||
</view>
|
||||
@@ -196,14 +196,16 @@ export default {
|
||||
.header-text {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
margin-left: 18rpx;
|
||||
}
|
||||
.purse_amount{
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
margin: 0 12rpx;
|
||||
display: flex;
|
||||
margin-top: 8rpx;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.bottom-btn {
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user