Commit ac2fd620 authored by 袁玲利's avatar 袁玲利

校园报告

parent 585708cc
...@@ -1524,36 +1524,36 @@ ...@@ -1524,36 +1524,36 @@
// import html2cancas from "html2canvas" // import html2cancas from "html2canvas"
import { requestPost } from "../ApplyConsumption/common/request.js"; import { requestPost } from "../ApplyConsumption/common/request.js";
var gHost = "https://" + window.location.host; var gHost = "https://" + window.location.host;
var envVersion = 'release'; var envVersion = "release";
var azAppId = 'wx5decb3fc29c94953' var azAppId = "wx5decb3fc29c94953";
if (window.location.protocol != "https:") { if (window.location.protocol != "https:") {
gHost = "https://uat-pay.xiaopay.net"; gHost = "https://uat-pay.xiaopay.net";
envVersion = 'trial'; envVersion = "trial";
azAppId = 'wx008a4a07f3d9f7a7' azAppId = "wx008a4a07f3d9f7a7";
} }
let az_gHost = "https://" + window.location.host; let az_gHost = "https://" + window.location.host;
if (window.location.protocol != "https:") { if (window.location.protocol != "https:") {
az_gHost = "https://uat-az-cloud-api.xiaopay.net"; az_gHost = "https://uat-az-cloud-api.xiaopay.net";
envVersion = 'trial'; envVersion = "trial";
azAppId = 'wx008a4a07f3d9f7a7' azAppId = "wx008a4a07f3d9f7a7";
} }
if (window.location.host == "fpdev.xiaopay.net") { if (window.location.host == "fpdev.xiaopay.net") {
az_gHost = "https://dev-az-cloud-api.xiaopay.net"; az_gHost = "https://dev-az-cloud-api.xiaopay.net";
envVersion = 'trial'; envVersion = "trial";
azAppId = 'wx008a4a07f3d9f7a7' azAppId = "wx008a4a07f3d9f7a7";
} }
if ( if (
window.location.host == "uat.xiaopay.net" || window.location.host == "uat.xiaopay.net" ||
window.location.host == "uat-pay.xiaopay.net" window.location.host == "uat-pay.xiaopay.net"
) { ) {
az_gHost = "https://uat-az-cloud-api.xiaopay.net"; az_gHost = "https://uat-az-cloud-api.xiaopay.net";
envVersion = 'trial'; envVersion = "trial";
azAppId = 'wx008a4a07f3d9f7a7' azAppId = "wx008a4a07f3d9f7a7";
} }
if (window.location.host == "pay.xiaopay.net") { if (window.location.host == "pay.xiaopay.net") {
az_gHost = "https://az-cloud-api.xiaopay.net"; az_gHost = "https://az-cloud-api.xiaopay.net";
envVersion = 'release'; envVersion = "release";
azAppId = 'wx5decb3fc29c94953' azAppId = "wx5decb3fc29c94953";
} }
//获取参数 //获取参数
function getQueryParams(params) { function getQueryParams(params) {
...@@ -4466,98 +4466,18 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -4466,98 +4466,18 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
// }); // });
} }
}, },
// 获取云平台鉴权Token
async getAuthOauthToken() {
uni.showLoading({
title: "请稍后",
mask: true,
});
let respes = await this.$http.post(
{
url: gHost + "/wechat/svweapp/GetUserLoginCode",
},
{}
);
// let respes = await this.$httpWX.post({
// url: `/wechat/svweapp/GetUserLoginCode`
// }, {})
console.log(respes);
uni.hideLoading();
if (respes.code != "10000") {
uni.showToast({
icon: "none",
title: respes.message,
});
throw respes.message;
}
return respes.results.token;
},
// 跳转云平台权益中心-微信 // 跳转云平台权益中心-微信
async openAzMenber() { async openAzMenber() {
let AuthOauthToken = await this.getAuthOauthToken(); jWeixin.miniProgram.navigateTo({
let path = `pages/sys/quickLogin/quickLogin?AuthOauthToken=${AuthOauthToken}&origin='XZF'&productId=3&serviceItemCodeList=${JSON.stringify( url: "/pages_subpackB/pages/ToCloudOrder/ToCloudOrder",
["1008"]
)}&to=${encodeURIComponent(
"/pages/nationalCenterForLesbianRights/index"
)}&productId=[3,4,7]`;
uni.navigateToMiniProgram({
// 安智云校小程序
appId: azAppId,
path: path,
query: {
AuthOauthToken: AuthOauthToken,
origin: "XZF",
to: encodeURIComponent("/pages/nationalCenterForLesbianRights/index"),
},
envVersion: envVersion,
success: (res) => {},
fail: (fail) => {
uni.showToast({
icon: "none",
title: "您已取消",
});
},
}); });
}, },
// 跳转云平台权益中心-支付宝 // 跳转云平台权益中心-支付宝
async openAzMenber_() { async openAzMenber_() {
// const AuthOauthToken = await this.$getAuthOauthToken(this.currentSwiperInfo['id']) jWeixin.miniProgram.navigateTo({
let AuthOauthToken = await this.$http.post( url: "/pages/ToCloudOrder/ToCloudOrder",
{ });
url: az_gHost + "/cgi-xpay/app/user/GetUserLoginCode", },
},
{
accountId: getQueryParams("accountId")
}
);
if (!AuthOauthToken) {
uni.showToast({
icon: "none",
title: '没有获取到云平台凭证!'
})
return
}
const path =
`pages/sys/quickLogin/quickLogin?AuthOauthToken=${AuthOauthToken}&origin='XZF'&productId=[3,4,7]&to=${encodeURIComponent('/pages/nationalCenterForLesbianRights/index')}`;
console.warn('跳转云平台参数', path);
uni.navigateToMiniProgram({
// 安智云校小程序
appId: azAppId,
path: path,
query: {
AuthOauthToken: AuthOauthToken,
origin: "XZF",
to: encodeURIComponent('/pages/nationalCenterForLesbianRights/index')
},
success: (res) => {},
fail: (fail) => {
uni.showToast({
icon: "none",
title: '您已取消'
})
}
})
},
// equityPay: function () { // equityPay: function () {
// // jWeixin.miniProgram.switchTab({ // // jWeixin.miniProgram.switchTab({
// // url: `/pages/Member/main`, // // url: `/pages/Member/main`,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment