提交im 优化app 中余额支付

master
lemon橪 2022-04-02 18:32:01 +08:00
parent c756223363
commit 201ee840d5
5 changed files with 98 additions and 69 deletions

View File

@ -6,11 +6,11 @@ export default {
downloadLink: "https://pickmall.cn/download-page/index.html", //下载地址下载app的地址
shareLink: "https://m-b2b2c.pickmall.cn", //分享地址也就是在h5中默认的复制地址
appid: "wx6f10f29075dc1b0b", //小程序唯一凭证,即 AppID可在「微信公众平台 - 设置 - 开发设置」页中获得。(需要已经成为开发者,且帐号没有异常状态)
appSecret: "6dfbe0c72380dce5d49d65b3c91059b1", //可在 manifest.json 查看
aMapKey: "d649892b3937a5ad20b76dacb2bcb5bd", //在高德中申请web端key
scanAuthNavigation:['https://m-b2b2c.pickmall.cn/'], //扫码认证跳转域名配置 会根据此处配置的路由进行跳转
iosAppId:"id1564638363", //AppStore的应用地址id 具体在分享->拷贝链接中查看
logo:"https://lilishop-oss.oss-cn-beijing.aliyuncs.com/4c864e133c2944efad1f7282ac8a3b9e.png", //logo地址
customerServiceMobile:"13161366885", //客服电话
customerServiceEmail:"lili@lili.com" //客服邮箱
customerServiceEmail:"lili@lili.com", //客服邮箱
imWebSrc:"https://im.pickmall.cn" //IM地址
};

View File

@ -2,8 +2,8 @@
"name" : "lili商城",
"appid" : "__UNI__C100675",
"description" : "",
"versionName" : "4.2.4",
"versionCode" : 4000240,
"versionName" : "4.2.4.1",
"versionCode" : 4000241,
"transformPx" : false,
"app-plus" : {
"compatible" : {

View File

@ -227,12 +227,17 @@
// APP/NATIVE/JSAPI/H5
const paymentClient = this.paymentClient;
uni.showLoading({
title: "正在唤起支付...",
mask:true
});
// #ifdef APP-PLUS
//APP pay
//
await API_Trade.initiatePay(paymentMethod, paymentClient, params).then(
(signXml) => {
uni.hideLoading();
//
if (!signXml.data.success) {
uni.showToast({
@ -245,19 +250,24 @@
let payForm = signXml.data.result;
let paymentType = paymentMethod === "WECHAT" ? "wxpay" : "alipay";
uni.requestPayment({
provider: paymentType,
orderInfo: payForm,
success: (e) => {
console.log(e);
if(paymentMethod === "WALLET"){
uni.showToast({
icon: "none",
title: "支付成功!",
});
this.callback(paymentMethod)
}
else{
uni.requestPayment({
provider: paymentType,
orderInfo: payForm || '',
success: (e) => {
uni.showToast({
icon: "none",
title: "支付成功!",
});
this.callback(paymentMethod)
},
fail: (e) => {
console.log(this);
@ -269,6 +279,7 @@
},
});
}
}
);
//APP pay
// #endif

View File

@ -382,7 +382,6 @@ import popupGoods from "@/components/m-buy/goods"; //购物车商品的模块
import popupAddress from "./product/popup/address"; //
import shares from "@/components/m-share/index"; //
import popups from "@/components/popups/popups"; //
import setup from "./product/popup/popup";
export default {
components: {
@ -528,6 +527,7 @@ export default {
},
computed: {
// udesk IM
IM() {
return this.IMLink + this.storeDetail.merchantEuid;
},
@ -708,40 +708,49 @@ export default {
},
linkMsgDetail() {
if (this.storeDetail.merchantEuid) {
// lili
uni.navigateTo({
url: `/pages/tabbar/home/web-view?src=${this.IM}`,
url: `/pages/tabbar/home/web-view?IM=${this.storeDetail.storeId}`,
});
} else {
//
// #ifdef MP-WEIXIN
const params = {
storeName: this.storeDetail.storeName,
goodsName: this.goodsDetail.goodsName,
goodsId: this.goodsDetail.goodsId,
goodsImg: this.goodsDetail.thumbnail,
price: this.goodsDetail.promotionPrice || this.goodsDetail.price,
// originalPrice: this.goodsDetail.original || this.goodsDetail.price,
uuid: storage.getUuid(),
token: storage.getAccessToken(),
sign: this.storeDetail.yzfSign,
mpSign: this.storeDetail.yzfMpSign,
};
uni.navigateTo({
url:
"/pages/product/customerservice/index?params=" +
encodeURIComponent(JSON.stringify(params)),
});
// #endif
// #ifndef MP-WEIXIN
const sign = this.storeDetail.yzfSign;
uni.navigateTo({
url:
"/pages/tabbar/home/web-view?src=https://yzf.qq.com/xv/web/static/chat/index.html?sign=" +
sign,
});
// #endif
}
// udesk
// if (this.storeDetail.merchantEuid) {
// uni.navigateTo({
// url: `/pages/tabbar/home/web-view?src=${this.IM}`,
// });
// }
//
// // #ifdef MP-WEIXIN
// const params = {
// storeName: this.storeDetail.storeName,
// goodsName: this.goodsDetail.goodsName,
// goodsId: this.goodsDetail.goodsId,
// goodsImg: this.goodsDetail.thumbnail,
// price: this.goodsDetail.promotionPrice || this.goodsDetail.price,
// // originalPrice: this.goodsDetail.original || this.goodsDetail.price,
// uuid: storage.getUuid(),
// token: storage.getAccessToken(),
// sign: this.storeDetail.yzfSign,
// mpSign: this.storeDetail.yzfMpSign,
// };
// uni.navigateTo({
// url:
// "/pages/product/customerservice/index?params=" +
// encodeURIComponent(JSON.stringify(params)),
// });
// // #endif
// // #ifndef MP-WEIXIN
// const sign = this.storeDetail.yzfSign;
// uni.navigateTo({
// url:
// "/pages/tabbar/home/web-view?src=https://yzf.qq.com/xv/web/static/chat/index.html?sign=" +
// sign,
// });
// // #endif
},
// 1999 --> [1999,00]
formatPrice(val) {

View File

@ -5,9 +5,13 @@
</template>
<script>
import configs from "@/config/config";
import storage from "@/utils/storage";
export default {
data() {
return {
configs,
storage,
webviewStyles: {
progress: {
color: this.$lightColor,
@ -17,7 +21,12 @@ export default {
};
},
onLoad(params) {
this.src = decodeURIComponent(params.src);
params.IM
? (this.src = `${configs.imWebSrc}?token=${storage.getAccessToken()}&id=${
params.IM
}`)
: (this.src = decodeURIComponent(params.src));
console.log(this.src);
},
};
</script>