fixbug: 修改点击的问题&更换图片
This commit is contained in:
+1
-1
@@ -63,7 +63,7 @@
|
||||
"urltypes" : [
|
||||
{
|
||||
"urlidentifier" : "com.trustbridgeapp.mm",
|
||||
"urlschemes" : [ "trustbridgeapp" ]
|
||||
"urlschemes" : "trustbridgeapp"
|
||||
}
|
||||
],
|
||||
"associatedDomains" : [ "applinks:ulink.trustbridgeapp.com" ],
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
<view class="purse_content_warp">
|
||||
<view v-for="(item, vIndex) in balanceList" :key="item.id" class="purse_warp_item" @click="jumpBonus(item)">
|
||||
<view class="purse_item_title">
|
||||
<view class="purse_item_title-left">
|
||||
<view class="purse_item_title-left" @click.stop="openTip(item.categoty)">
|
||||
<up-image :src="`https://static.tbmall.xin/static/mine-purse/${item.categoty}.png`" width="22" height="22"
|
||||
bgColor="#f1f6ff00" class="purse_amount"></up-image>
|
||||
<view class="title">{{ item.name }}</view>
|
||||
<up-image v-if="item.categoty != 'balance'" src="/pages/rwa_package/static/tips.png" width="16" height="16"
|
||||
bgColor="#f1f6ff00" @click.stop="openTip(item.categoty)" />
|
||||
bgColor="#f1f6ff00" />
|
||||
<up-image src="/static/common/right_soild.png" width="10" height="10" bgColor="#fff"
|
||||
class="right_soild"></up-image>
|
||||
</view>
|
||||
@@ -34,10 +34,10 @@
|
||||
|
||||
<view class="bottom_item" v-if="item.categoty == 'vcoin'">
|
||||
<view class="bottom_item_amount bottom_item_amount_center">{{ item.bonusAmount || 0 }}</view>
|
||||
<view class="bottom_item_title bottom_item_title_center">
|
||||
<view class="bottom_item_title bottom_item_title_center" @click.stop="openTip('rights')">
|
||||
<text class="title_text">消费者权益</text>
|
||||
<up-image v-if="item.categoty != 'balance'" src="/pages/rwa_package/static/tips.png" width="12" height="12"
|
||||
bgColor="#f1f6ff00" class="tip_icon" @click.stop="openTip('rights')" />
|
||||
<up-image v-if="item.categoty != 'balance'" src="/pages/rwa_package/static/tips.png" width="12"
|
||||
height="12" bgColor="#f1f6ff00" class="tip_icon" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -655,7 +655,7 @@ export default {
|
||||
.tip_popup_btn {
|
||||
width: 100%;
|
||||
height: 84rpx;
|
||||
background: #707070;
|
||||
background: #7934F6;
|
||||
border-radius: 42rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -218,11 +218,16 @@
|
||||
<image v-if="item.type == 'alipay'" src="https://static.tbmall.xin/static/new/zfb.png"></image>
|
||||
<image v-if="item.type == 'balance'" src="https://static.tbmall.xin/static/new/bank.png"></image>
|
||||
<image v-if="item.type == 'redpacket'" src="https://static.tbmall.xin/static/new/jf.png"></image>
|
||||
<text v-if="item.type == 'douyin'" aria-hidden="true" style="display: inline-flex; align-items: center; justify-content: center; width: 48rpx; height: 48rpx; border-radius: 50%; background: #161823; color: #fff; font-size: 32rpx; flex-shrink: 0;">♪</text>
|
||||
<image v-if="item.type == 'douyin'" src="https://static.tbmall.xin/static/new/douyin.png"></image>
|
||||
|
||||
<!-- <text aria-hidden="true"
|
||||
style="display: inline-flex; align-items: center; justify-content: center; width: 48rpx; height: 48rpx; border-radius: 50%; background: #161823; color: #fff; font-size: 32rpx; flex-shrink: 0;">♪</text> -->
|
||||
<!-- <text v-if="item.type == 'douyin'" aria-hidden="true" style="display: inline-flex; align-items: center; justify-content: center; width: 48rpx; height: 48rpx; border-radius: 50%; background: #161823; color: #fff; font-size: 32rpx; flex-shrink: 0;">♪</text> -->
|
||||
<text v-if="item.type == 'wechat' || item.type == 'alipay' || item.type == 'douyin'" class="text-32 text-zu"
|
||||
style="margin-left: 20rpx">{{ item.name }}
|
||||
<!-- #ifdef H5 -->
|
||||
<text v-if="item.type == 'douyin'" style="font-size: 24rpx; color: #777; margin-left: 12rpx;">仅 App 支持</text>
|
||||
<text v-if="item.type == 'douyin'" style="font-size: 24rpx; color: #777; margin-left: 12rpx;">仅 App
|
||||
支持</text>
|
||||
<!-- #endif -->
|
||||
</text>
|
||||
<text v-else style="margin-left: 20rpx" class="text-32 text-zu">{{ item.name }}
|
||||
@@ -613,6 +618,7 @@ export default {
|
||||
|
||||
|
||||
parmas.types = douyinPayTypes(parmas.types);
|
||||
console.log("支付的入口", parmas.types)
|
||||
const result = await getSupportPay(parmas);
|
||||
if (result && result.bizcode === 100) {
|
||||
const data = filterDouyinPayWays(result.data);
|
||||
@@ -637,7 +643,7 @@ export default {
|
||||
);
|
||||
// #endif
|
||||
|
||||
console.log("getWayOption", this.wayOption);
|
||||
console.log("getWayOption", result.data, this.wayOption);
|
||||
}
|
||||
},
|
||||
async getOrder(couponUserId) {
|
||||
@@ -968,7 +974,7 @@ export default {
|
||||
return (this.tipsShow = true);
|
||||
}
|
||||
|
||||
console.log("orderInfo----", arr);
|
||||
console.log("orderInfo---11-", arr);
|
||||
if (arr.length) {
|
||||
if (this.isCoupon) {
|
||||
this.show = true;
|
||||
@@ -985,120 +991,120 @@ export default {
|
||||
if (this._paySubmitting) return;
|
||||
this._paySubmitting = true;
|
||||
try {
|
||||
if (!await prepareDouyinPay(this.orderInfo.paymentMethod)) return;
|
||||
let params = {
|
||||
addrId: this.orderInfo.address.id, // 收货地址ID
|
||||
//结算的购物车ID,多个以逗号分割,ALL表示全选
|
||||
payway: this.orderInfo.paymentMethod, // 支付方式:1-微信,2-支付宝
|
||||
remark: JSON.stringify(this.getRemark()), //备注信息'[{"sid":"店铺ID","rmk":"备注内容"},{"sid":"店铺ID","rmk":"备注内容"}]'
|
||||
};
|
||||
if (!await prepareDouyinPay(this.orderInfo.paymentMethod)) return;
|
||||
let params = {
|
||||
addrId: this.orderInfo.address.id, // 收货地址ID
|
||||
//结算的购物车ID,多个以逗号分割,ALL表示全选
|
||||
payway: this.orderInfo.paymentMethod, // 支付方式:1-微信,2-支付宝
|
||||
remark: JSON.stringify(this.getRemark()), //备注信息'[{"sid":"店铺ID","rmk":"备注内容"},{"sid":"店铺ID","rmk":"备注内容"}]'
|
||||
};
|
||||
|
||||
if (params.payway == "wechat") {
|
||||
// #ifdef MP-WEIXIN
|
||||
params["payway"] = "wechatMiniProgram";
|
||||
params["code"] = await new Promise((resolve) => {
|
||||
uni.login({
|
||||
provider: "weixin",
|
||||
onlyAuthorize: true,
|
||||
success: function (loginRes) {
|
||||
resolve(loginRes.code);
|
||||
},
|
||||
fail: (err) => {
|
||||
resolve(""); // 登录失败时返回空字符串,避免后续流程中断
|
||||
},
|
||||
if (params.payway == "wechat") {
|
||||
// #ifdef MP-WEIXIN
|
||||
params["payway"] = "wechatMiniProgram";
|
||||
params["code"] = await new Promise((resolve) => {
|
||||
uni.login({
|
||||
provider: "weixin",
|
||||
onlyAuthorize: true,
|
||||
success: function (loginRes) {
|
||||
resolve(loginRes.code);
|
||||
},
|
||||
fail: (err) => {
|
||||
resolve(""); // 登录失败时返回空字符串,避免后续流程中断
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
|
||||
console.log("收货地址ID--params", params);
|
||||
|
||||
let resp = null;
|
||||
console.log("orderInfo----", this.sed, this.orderInfo);
|
||||
if (this.sed) {
|
||||
if (
|
||||
this.orderInfo.paymentMethod == "balance" ||
|
||||
this.orderInfo.paymentMethod == "redpacket" ||
|
||||
this.isCoupon
|
||||
) {
|
||||
params["password"] = CryptoJS.MD5(this.payPwd).toString();
|
||||
// #endif
|
||||
}
|
||||
params["goodsId"] = this.sed.id;
|
||||
params["specsId"] = this.sed.specsId.id;
|
||||
params["goodsNum"] = this.orderInfo.shops[0].addrTimes[0].goods[0].num;
|
||||
|
||||
console.log("收货地址ID--params", params);
|
||||
|
||||
console.log("秦星星params-----", this.sed?.activedType);
|
||||
if (this.sed?.activedType == "seckill") {
|
||||
params["activityId"] = Number(this.sed?.activityId); // 秒杀活动ID
|
||||
resp = await setSeckillOrder(params);
|
||||
} else {
|
||||
if (this.isCoupon) {
|
||||
params.payway2 = "vcoin";
|
||||
resp = await settlementOrder(params);
|
||||
} else {
|
||||
// params["cartIds"] = this.ids;
|
||||
if (
|
||||
this.orderInfo.paymentMethod == "balance" ||
|
||||
this.orderInfo.paymentMethod == "redpacket"
|
||||
) {
|
||||
params["password"] = CryptoJS.MD5(this.payPwd).toString();
|
||||
}
|
||||
if (this.selectedCoupon) {
|
||||
params["couponUserId"] = this.getCouponUserId(this.selectedCoupon);
|
||||
}
|
||||
resp = await settle(params);
|
||||
let resp = null;
|
||||
console.log("orderInfo--22--", this.sed, this.orderInfo);
|
||||
if (this.sed) {
|
||||
if (
|
||||
this.orderInfo.paymentMethod == "balance" ||
|
||||
this.orderInfo.paymentMethod == "redpacket" ||
|
||||
this.isCoupon
|
||||
) {
|
||||
params["password"] = CryptoJS.MD5(this.payPwd).toString();
|
||||
}
|
||||
params["goodsId"] = this.sed.id;
|
||||
params["specsId"] = this.sed.specsId.id;
|
||||
params["goodsNum"] = this.orderInfo.shops[0].addrTimes[0].goods[0].num;
|
||||
|
||||
// resp = await settle(params);
|
||||
}
|
||||
} else {
|
||||
params["cartIds"] = this.ids;
|
||||
if (
|
||||
this.orderInfo.paymentMethod == "balance" ||
|
||||
this.orderInfo.paymentMethod == "redpacket"
|
||||
) {
|
||||
params["password"] = CryptoJS.MD5(this.payPwd).toString();
|
||||
}
|
||||
if (this.selectedCoupon) {
|
||||
params["couponUserId"] = this.getCouponUserId(this.selectedCoupon);
|
||||
}
|
||||
console.log("秦星星----2", params);
|
||||
resp = await settle(params);
|
||||
}
|
||||
|
||||
console.log("getWayOption", resp);
|
||||
console.log("秦星星params-----", this.sed?.activedType);
|
||||
if (this.sed?.activedType == "seckill") {
|
||||
params["activityId"] = Number(this.sed?.activityId); // 秒杀活动ID
|
||||
resp = await setSeckillOrder(params);
|
||||
} else {
|
||||
if (this.isCoupon) {
|
||||
params.payway2 = "vcoin";
|
||||
resp = await settlementOrder(params);
|
||||
} else {
|
||||
// params["cartIds"] = this.ids;
|
||||
if (
|
||||
this.orderInfo.paymentMethod == "balance" ||
|
||||
this.orderInfo.paymentMethod == "redpacket"
|
||||
) {
|
||||
params["password"] = CryptoJS.MD5(this.payPwd).toString();
|
||||
}
|
||||
if (this.selectedCoupon) {
|
||||
params["couponUserId"] = this.getCouponUserId(this.selectedCoupon);
|
||||
}
|
||||
resp = await settle(params);
|
||||
}
|
||||
|
||||
// 提交订单成功,就唤起支付
|
||||
if (resp && resp.bizcode === 100) {
|
||||
console.log("提交订单成功", resp.data);
|
||||
const item = resp.data;
|
||||
if (item.status === 1) {
|
||||
jumpWayOk();
|
||||
return;
|
||||
}
|
||||
if (item.douyin) {
|
||||
await appDypayFun(item);
|
||||
} else if (item.wechat && Object.keys(item.wechat).length !== 0) {
|
||||
this.appWxpay(item.wechat, item.orderId, item.orderNum);
|
||||
} else if (
|
||||
item.alipay &&
|
||||
Object.keys(item.alipay).length !== 0 &&
|
||||
item.alipay
|
||||
) {
|
||||
this.zfbPay(item.alipay, item.orderId, item.orderNum);
|
||||
// resp = await settle(params);
|
||||
}
|
||||
} else {
|
||||
this.$refs.uToastRef.show({
|
||||
type: "error",
|
||||
message: "订单支付失败",
|
||||
});
|
||||
setTimeout(() => {
|
||||
jumpWayError();
|
||||
}, 2000);
|
||||
params["cartIds"] = this.ids;
|
||||
if (
|
||||
this.orderInfo.paymentMethod == "balance" ||
|
||||
this.orderInfo.paymentMethod == "redpacket"
|
||||
) {
|
||||
params["password"] = CryptoJS.MD5(this.payPwd).toString();
|
||||
}
|
||||
if (this.selectedCoupon) {
|
||||
params["couponUserId"] = this.getCouponUserId(this.selectedCoupon);
|
||||
}
|
||||
console.log("秦星星----2", params);
|
||||
resp = await settle(params);
|
||||
}
|
||||
|
||||
console.log("getWayOption", resp);
|
||||
|
||||
// 提交订单成功,就唤起支付
|
||||
if (resp && resp.bizcode === 100) {
|
||||
console.log("提交订单成功", resp.data);
|
||||
const item = resp.data;
|
||||
if (item.status === 1) {
|
||||
jumpWayOk();
|
||||
return;
|
||||
}
|
||||
if (item.douyin) {
|
||||
await appDypayFun(item);
|
||||
} else if (item.wechat && Object.keys(item.wechat).length !== 0) {
|
||||
this.appWxpay(item.wechat, item.orderId, item.orderNum);
|
||||
} else if (
|
||||
item.alipay &&
|
||||
Object.keys(item.alipay).length !== 0 &&
|
||||
item.alipay
|
||||
) {
|
||||
this.zfbPay(item.alipay, item.orderId, item.orderNum);
|
||||
} else {
|
||||
this.$refs.uToastRef.show({
|
||||
type: "error",
|
||||
message: "订单支付失败",
|
||||
});
|
||||
setTimeout(() => {
|
||||
jumpWayError();
|
||||
}, 2000);
|
||||
}
|
||||
} else {
|
||||
this.getOrder();
|
||||
}
|
||||
} else {
|
||||
this.getOrder();
|
||||
}
|
||||
} catch (error) {
|
||||
uni.showToast({ title: error.message || error.msg || '支付请求失败,请查看订单后重试', icon: 'none' });
|
||||
} finally { this._paySubmitting = false; }
|
||||
|
||||
Reference in New Issue
Block a user