lyb 4 лет назад
Родитель
Сommit
b2210e36df
3 измененных файлов с 7 добавлено и 0 удалено
  1. 3 0
      pages/activity/activityDetail.vue
  2. 3 0
      utils/jweixin.js
  3. 1 0
      utils/webAuth.js

+ 3 - 0
pages/activity/activityDetail.vue

@@ -439,8 +439,11 @@
 				if (res.data.success) {
 					console.log("支付订单",JSON.parse(res.data.data.prePayTn))
 					this.$shareConfig.H5Pay(JSON.parse(res.data.data.prePayTn)).then((res) => {
+						console.log("作品投票页面res", res)
 						this.voteSuccess();
+						
 					}).catch((err) => {
+						console.log("作品投票页面err", err)
 						this.$refs.toast.error(err)
 					})
 				} else {

+ 3 - 0
utils/jweixin.js

@@ -53,6 +53,7 @@ wx.H5Share = async (shareParam) => {
  * JS-SDK 支付
  */
 wx.H5Pay = async (payParam) => {
+	console.log("JS-SDK 支付Url",url);
 	let configData = (await api.wxApp.getWxShareData({url})).data.data;
 	//通过微信config接口注入配置
 	jweixin.config({
@@ -73,9 +74,11 @@ wx.H5Pay = async (payParam) => {
 				paySign: payParam.paySign, // 支付签名
 			    success: function (res) {
 				  // 支付成功后的回调函数
+				  console.log("支付成功",res);
 				  resolve(res)
 			    },
 				fail: function(err) {
+					console.log("支付失败",err);
 					reject(err)
 				}
 			});

+ 1 - 0
utils/webAuth.js

@@ -6,6 +6,7 @@ let appId = 'wxdad9b7d8e7750457';
 let scope = 'snsapi_userinfo'
 
 webAuth.getUserOpenid = () => {
+	console.log("url",decodeURIComponent(url))
 	window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${url}&response_type=code&scope=${scope}&state=STATE#wechat_redirect`
 }