提交im 优化app 中余额支付
parent
c756223363
commit
201ee840d5
|
@ -6,11 +6,11 @@ export default {
|
||||||
downloadLink: "https://pickmall.cn/download-page/index.html", //下载地址,下载app的地址
|
downloadLink: "https://pickmall.cn/download-page/index.html", //下载地址,下载app的地址
|
||||||
shareLink: "https://m-b2b2c.pickmall.cn", //分享地址,也就是在h5中默认的复制地址
|
shareLink: "https://m-b2b2c.pickmall.cn", //分享地址,也就是在h5中默认的复制地址
|
||||||
appid: "wx6f10f29075dc1b0b", //小程序唯一凭证,即 AppID,可在「微信公众平台 - 设置 - 开发设置」页中获得。(需要已经成为开发者,且帐号没有异常状态)
|
appid: "wx6f10f29075dc1b0b", //小程序唯一凭证,即 AppID,可在「微信公众平台 - 设置 - 开发设置」页中获得。(需要已经成为开发者,且帐号没有异常状态)
|
||||||
appSecret: "6dfbe0c72380dce5d49d65b3c91059b1", //可在 manifest.json 查看
|
|
||||||
aMapKey: "d649892b3937a5ad20b76dacb2bcb5bd", //在高德中申请web端key
|
aMapKey: "d649892b3937a5ad20b76dacb2bcb5bd", //在高德中申请web端key
|
||||||
scanAuthNavigation:['https://m-b2b2c.pickmall.cn/'], //扫码认证跳转域名配置 会根据此处配置的路由进行跳转
|
scanAuthNavigation:['https://m-b2b2c.pickmall.cn/'], //扫码认证跳转域名配置 会根据此处配置的路由进行跳转
|
||||||
iosAppId:"id1564638363", //AppStore的应用地址id 具体在分享->拷贝链接中查看
|
iosAppId:"id1564638363", //AppStore的应用地址id 具体在分享->拷贝链接中查看
|
||||||
logo:"https://lilishop-oss.oss-cn-beijing.aliyuncs.com/4c864e133c2944efad1f7282ac8a3b9e.png", //logo地址
|
logo:"https://lilishop-oss.oss-cn-beijing.aliyuncs.com/4c864e133c2944efad1f7282ac8a3b9e.png", //logo地址
|
||||||
customerServiceMobile:"13161366885", //客服电话
|
customerServiceMobile:"13161366885", //客服电话
|
||||||
customerServiceEmail:"lili@lili.com" //客服邮箱
|
customerServiceEmail:"lili@lili.com", //客服邮箱
|
||||||
|
imWebSrc:"https://im.pickmall.cn" //IM地址
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
"name" : "lili商城",
|
"name" : "lili商城",
|
||||||
"appid" : "__UNI__C100675",
|
"appid" : "__UNI__C100675",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "4.2.4",
|
"versionName" : "4.2.4.1",
|
||||||
"versionCode" : 4000240,
|
"versionCode" : 4000241,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
"compatible" : {
|
"compatible" : {
|
||||||
|
|
|
@ -226,13 +226,18 @@
|
||||||
const paymentMethod = payment;
|
const paymentMethod = payment;
|
||||||
// 客户端类型 APP/NATIVE/JSAPI/H5
|
// 客户端类型 APP/NATIVE/JSAPI/H5
|
||||||
const paymentClient = this.paymentClient;
|
const paymentClient = this.paymentClient;
|
||||||
|
|
||||||
|
uni.showLoading({
|
||||||
|
title: "正在唤起支付...",
|
||||||
|
mask:true
|
||||||
|
});
|
||||||
|
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
//APP pay
|
//APP pay
|
||||||
// 初始化支付签名
|
// 初始化支付签名
|
||||||
await API_Trade.initiatePay(paymentMethod, paymentClient, params).then(
|
await API_Trade.initiatePay(paymentMethod, paymentClient, params).then(
|
||||||
(signXml) => {
|
(signXml) => {
|
||||||
|
uni.hideLoading();
|
||||||
//如果支付异常
|
//如果支付异常
|
||||||
if (!signXml.data.success) {
|
if (!signXml.data.success) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
@ -241,33 +246,39 @@
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let payForm = signXml.data.result;
|
let payForm = signXml.data.result;
|
||||||
|
|
||||||
let paymentType = paymentMethod === "WECHAT" ? "wxpay" : "alipay";
|
let paymentType = paymentMethod === "WECHAT" ? "wxpay" : "alipay";
|
||||||
uni.requestPayment({
|
|
||||||
provider: paymentType,
|
if(paymentMethod === "WALLET"){
|
||||||
orderInfo: payForm,
|
uni.showToast({
|
||||||
success: (e) => {
|
icon: "none",
|
||||||
console.log(e);
|
title: "支付成功!",
|
||||||
uni.showToast({
|
});
|
||||||
icon: "none",
|
this.callback(paymentMethod)
|
||||||
title: "支付成功!",
|
}
|
||||||
});
|
else{
|
||||||
|
uni.requestPayment({
|
||||||
this.callback(paymentMethod)
|
provider: paymentType,
|
||||||
|
orderInfo: payForm || '',
|
||||||
|
success: (e) => {
|
||||||
},
|
uni.showToast({
|
||||||
fail: (e) => {
|
icon: "none",
|
||||||
console.log(this);
|
title: "支付成功!",
|
||||||
this.exception = e;
|
});
|
||||||
uni.showModal({
|
this.callback(paymentMethod)
|
||||||
content: "支付失败,如果您已支付,请勿反复支付",
|
},
|
||||||
showCancel: false,
|
fail: (e) => {
|
||||||
});
|
console.log(this);
|
||||||
},
|
this.exception = e;
|
||||||
});
|
uni.showModal({
|
||||||
|
content: "支付失败,如果您已支付,请勿反复支付",
|
||||||
|
showCancel: false,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
//APP pay
|
//APP pay
|
||||||
|
|
|
@ -382,7 +382,6 @@ import popupGoods from "@/components/m-buy/goods"; //购物车商品的模块
|
||||||
import popupAddress from "./product/popup/address"; //地址选择模块
|
import popupAddress from "./product/popup/address"; //地址选择模块
|
||||||
import shares from "@/components/m-share/index"; //分享
|
import shares from "@/components/m-share/index"; //分享
|
||||||
import popups from "@/components/popups/popups"; //气泡框
|
import popups from "@/components/popups/popups"; //气泡框
|
||||||
|
|
||||||
import setup from "./product/popup/popup";
|
import setup from "./product/popup/popup";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -527,7 +526,8 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
|
// udesk IM
|
||||||
IM() {
|
IM() {
|
||||||
return this.IMLink + this.storeDetail.merchantEuid;
|
return this.IMLink + this.storeDetail.merchantEuid;
|
||||||
},
|
},
|
||||||
|
@ -708,40 +708,49 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
linkMsgDetail() {
|
linkMsgDetail() {
|
||||||
if (this.storeDetail.merchantEuid) {
|
// lili 基础客服
|
||||||
uni.navigateTo({
|
|
||||||
url: `/pages/tabbar/home/web-view?src=${this.IM}`,
|
uni.navigateTo({
|
||||||
});
|
url: `/pages/tabbar/home/web-view?IM=${this.storeDetail.storeId}`,
|
||||||
} else {
|
});
|
||||||
// 客服
|
|
||||||
// #ifdef MP-WEIXIN
|
// udesk 代码
|
||||||
const params = {
|
// if (this.storeDetail.merchantEuid) {
|
||||||
storeName: this.storeDetail.storeName,
|
// uni.navigateTo({
|
||||||
goodsName: this.goodsDetail.goodsName,
|
// url: `/pages/tabbar/home/web-view?src=${this.IM}`,
|
||||||
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(),
|
// // #ifdef MP-WEIXIN
|
||||||
sign: this.storeDetail.yzfSign,
|
// const params = {
|
||||||
mpSign: this.storeDetail.yzfMpSign,
|
// storeName: this.storeDetail.storeName,
|
||||||
};
|
// goodsName: this.goodsDetail.goodsName,
|
||||||
uni.navigateTo({
|
// goodsId: this.goodsDetail.goodsId,
|
||||||
url:
|
// goodsImg: this.goodsDetail.thumbnail,
|
||||||
"/pages/product/customerservice/index?params=" +
|
// price: this.goodsDetail.promotionPrice || this.goodsDetail.price,
|
||||||
encodeURIComponent(JSON.stringify(params)),
|
// // originalPrice: this.goodsDetail.original || this.goodsDetail.price,
|
||||||
});
|
// uuid: storage.getUuid(),
|
||||||
// #endif
|
// token: storage.getAccessToken(),
|
||||||
// #ifndef MP-WEIXIN
|
// sign: this.storeDetail.yzfSign,
|
||||||
const sign = this.storeDetail.yzfSign;
|
// mpSign: this.storeDetail.yzfMpSign,
|
||||||
uni.navigateTo({
|
// };
|
||||||
url:
|
// uni.navigateTo({
|
||||||
"/pages/tabbar/home/web-view?src=https://yzf.qq.com/xv/web/static/chat/index.html?sign=" +
|
// url:
|
||||||
sign,
|
// "/pages/product/customerservice/index?params=" +
|
||||||
});
|
// encodeURIComponent(JSON.stringify(params)),
|
||||||
// #endif
|
// });
|
||||||
}
|
// // #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]
|
// 格式化金钱 1999 --> [1999,00]
|
||||||
formatPrice(val) {
|
formatPrice(val) {
|
||||||
|
|
|
@ -5,9 +5,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import configs from "@/config/config";
|
||||||
|
import storage from "@/utils/storage";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
configs,
|
||||||
|
storage,
|
||||||
webviewStyles: {
|
webviewStyles: {
|
||||||
progress: {
|
progress: {
|
||||||
color: this.$lightColor,
|
color: this.$lightColor,
|
||||||
|
@ -17,7 +21,12 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad(params) {
|
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>
|
</script>
|
||||||
|
@ -29,4 +38,4 @@ export default {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue