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

Merge branch 'v_req_0831' into uat

parents 369a2c1c 585708cc
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<div class="orderHeadWrapper"> <div class="orderHeadWrapper">
<img :src="ImgUrl+'wechatXZF/orderHead.png'" class="orderHead" alt=""> <img :src="ImgUrl+'wechatXZF/orderHead.png'" class="orderHead" alt="">
</div> </div>
<div class="fixedBottomBtn" @click="openAzMenber"> <div class="fixedBottomBtn" @click="openAzMenber_">
<img :src="ImgUrl+'wechatXZF/goToCost.png'" class="goToCost" alt=""> <img :src="ImgUrl+'wechatXZF/goToCost.png'" class="goToCost" alt="">
</div> </div>
</view> </view>
...@@ -260,17 +260,30 @@ ...@@ -260,17 +260,30 @@
import dayjs from "dayjs"; import dayjs from "dayjs";
import { Dialog } from "vant"; import { Dialog } from "vant";
let gHost = "https://" + window.location.host; let gHost = "https://" + window.location.host;
var azAppId = 'wx5decb3fc29c94953'
if (window.location.protocol != "https:") { if (window.location.protocol != "https:") {
gHost = "https://test-az-cloud-api.xiaopay.net"; gHost = "https://uat-pay.xiaopay.net";
azAppId = 'wx008a4a07f3d9f7a7'
}
let az_gHost = "https://" + window.location.host;
if (window.location.protocol != "https:") {
az_gHost = "https://uat-az-cloud-api.xiaopay.net";
azAppId = 'wx008a4a07f3d9f7a7'
} }
if (window.location.host == "fpdev.xiaopay.net") { if (window.location.host == "fpdev.xiaopay.net") {
gHost = "https://dev-az-cloud-api.xiaopay.net"; az_gHost = "https://dev-az-cloud-api.xiaopay.net";
azAppId = 'wx008a4a07f3d9f7a7'
} }
if (window.location.host == "uat.xiaopay.net" || window.location.host == "uat-pay.xiaopay.net") { if (
gHost = "https://uat-az-cloud-api.xiaopay.net"; window.location.host == "uat.xiaopay.net" ||
window.location.host == "uat-pay.xiaopay.net"
) {
az_gHost = "https://uat-az-cloud-api.xiaopay.net";
azAppId = 'wx008a4a07f3d9f7a7'
} }
if (window.location.host == "pay.xiaopay.net") { if (window.location.host == "pay.xiaopay.net") {
gHost = "https://az-cloud-api.xiaopay.net"; az_gHost = "https://az-cloud-api.xiaopay.net";
azAppId = 'wx5decb3fc29c94953'
} }
export default { export default {
name: "AbnormalConsumption", name: "AbnormalConsumption",
...@@ -304,9 +317,48 @@ export default { ...@@ -304,9 +317,48 @@ export default {
}, },
methods: { methods: {
// 跳转云平台权益中心 // 跳转云平台权益中心
async openAzMenber() { // async openAzMenber() {
jWeixin.miniProgram.navigateTo({ // jWeixin.miniProgram.navigateTo({
url: '/pages/nationalCenterForLesbianRights/index?productId=3' // url: '/pages/nationalCenterForLesbianRights/index?productId=3'
// })
// },
// 跳转云平台权益中心-支付宝
async openAzMenber_() {
// const AuthOauthToken = await this.$getAuthOauthToken(this.currentSwiperInfo['id'])
let AuthOauthToken = await this.$http.post(
{
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: '您已取消'
})
}
}) })
}, },
// 页面跳转 // 页面跳转
......
...@@ -1262,7 +1262,10 @@ ...@@ -1262,7 +1262,10 @@
</view> </view>
</view> </view>
<view class="school-report-footer-item-two"> <view class="school-report-footer-item-two">
<view class="school-report-footer-item-btn" @tap="equityPay"> <view class="school-report-footer-item-btn" @tap="openAzMenber" v-if="from == 'wechat'">
<text>延长权益</text>
</view>
<view class="school-report-footer-item-btn" @tap="openAzMenber_" v-else-if="from == 'alipay'">
<text>延长权益</text> <text>延长权益</text>
</view> </view>
</view> </view>
...@@ -1521,21 +1524,36 @@ ...@@ -1521,21 +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 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';
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';
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';
azAppId = 'wx008a4a07f3d9f7a7'
} }
if (window.location.host == "uat.xiaopay.net" || window.location.host == "uat-pay.xiaopay.net") { if (
window.location.host == "uat.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';
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';
azAppId = 'wx5decb3fc29c94953'
} }
//获取参数 //获取参数
function getQueryParams(params) { function getQueryParams(params) {
...@@ -1722,7 +1740,7 @@ export default { ...@@ -1722,7 +1740,7 @@ export default {
}, },
async mounted() { async mounted() {
await this.init(); await this.init();
this.piechart() this.piechart();
}, },
methods: { methods: {
async init() { async init() {
...@@ -1820,7 +1838,6 @@ export default { ...@@ -1820,7 +1838,6 @@ export default {
); );
await this.queryConsumerSummaryAmount(1); await this.queryConsumerSummaryAmount(1);
this.queryLivingCostsAmount(); this.queryLivingCostsAmount();
// this.queryDayConsumerTrend(1).then((e) => // this.queryDayConsumerTrend(1).then((e) =>
// // this.linechart(this.reportTypeIndex) // // this.linechart(this.reportTypeIndex)
...@@ -1927,7 +1944,7 @@ export default { ...@@ -1927,7 +1944,7 @@ export default {
// if (this.isOpen) { // if (this.isOpen) {
// if (true) { // if (true) {
await this.queryConsumerSummaryAmount(1); await this.queryConsumerSummaryAmount(1);
this.piechart() this.piechart();
this.queryLivingCostsAmount(); this.queryLivingCostsAmount();
// this.queryDayConsumerTrend(1).then((e) => // this.queryDayConsumerTrend(1).then((e) =>
...@@ -2063,12 +2080,17 @@ export default { ...@@ -2063,12 +2080,17 @@ export default {
}); });
}, },
shareHandler: function () { shareHandler: function () {
uni.showLoading({
title: "请稍后",
mask: true,
});
let htmlCanvasImg = document.getElementsByClassName("htmlCanvasImg")[0]; let htmlCanvasImg = document.getElementsByClassName("htmlCanvasImg")[0];
if (htmlCanvasImg) { if (htmlCanvasImg) {
htmlCanvasImg.parentNode.removeChild(htmlCanvasImg); htmlCanvasImg.parentNode.removeChild(htmlCanvasImg);
} }
this.toImage(); this.toImage();
this.dialogShow = true; this.dialogShow = true;
uni.hideLoading();
}, },
schoolReportChange: function (e) { schoolReportChange: function (e) {
this.reportTypeIndex = e.target.value; this.reportTypeIndex = e.target.value;
...@@ -2297,7 +2319,11 @@ export default { ...@@ -2297,7 +2319,11 @@ export default {
}, },
piechart() { piechart() {
this.$nextTick(() => { this.$nextTick(() => {
console.log(document.getElementById("consumer-preferences-pie"), 'xxxxxxxxxxxxxxxxxxxxxx', this.pieDatas); console.log(
document.getElementById("consumer-preferences-pie"),
"xxxxxxxxxxxxxxxxxxxxxx",
this.pieDatas
);
let arr = this.pieDatas; let arr = this.pieDatas;
let myChart = echarts.init( let myChart = echarts.init(
document.getElementById("consumer-preferences-pie") document.getElementById("consumer-preferences-pie")
...@@ -2336,8 +2362,7 @@ export default { ...@@ -2336,8 +2362,7 @@ export default {
window.addEventListener("resize", function () { window.addEventListener("resize", function () {
myChart.resize(); myChart.resize();
}); });
});
})
}, },
// 获取某月的所有周六 // 获取某月的所有周六
getMonthSaturdayDate: function (year, month) { getMonthSaturdayDate: function (year, month) {
...@@ -3253,14 +3278,14 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -3253,14 +3278,14 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
} }
if (data.code == 200) { if (data.code == 200) {
this.campusConsumerDetailObj = {} this.campusConsumerDetailObj = {};
this.campusConsumerDetailObj.campusConsumerDetailList = [] this.campusConsumerDetailObj.campusConsumerDetailList = [];
this.trendColorList = [] this.trendColorList = [];
this.consumerDetailCalculateObj.canteenData = 0 this.consumerDetailCalculateObj.canteenData = 0;
this.consumerDetailCalculateObj.totalData = 0 this.consumerDetailCalculateObj.totalData = 0;
this.consumerDetailCalculateObj.cateringNumber = 0 this.consumerDetailCalculateObj.cateringNumber = 0;
this.consumerDetailCalculateObj.notCateringNumber = 0 this.consumerDetailCalculateObj.notCateringNumber = 0;
if(!data.obj){ if (!data.obj) {
return; return;
} }
if ( if (
...@@ -3596,7 +3621,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -3596,7 +3621,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
], ],
]; ];
} }
this.$forceUpdate() this.$forceUpdate();
// this.consumerAmountObj = tmpObj; // this.consumerAmountObj = tmpObj;
// this.isReasonable = this.consumerAmountObj.gtgraderate >= 40 && this // this.isReasonable = this.consumerAmountObj.gtgraderate >= 40 && this
// .consumerAmountObj.gtgraderate <= // .consumerAmountObj.gtgraderate <=
...@@ -3744,8 +3769,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -3744,8 +3769,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
obj.mealTypeTotalAmount = obj.mealTypeTotalAmount =
obj.mealTypeTotalAmount + arr[4].mealTypeTotalAmount; obj.mealTypeTotalAmount + arr[4].mealTypeTotalAmount;
obj.gradeMealTypeTotalAmount = obj.gradeMealTypeTotalAmount =
obj.gradeMealTypeTotalAmount + obj.gradeMealTypeTotalAmount + arr[4].gradeMealTypeTotalAmount;
arr[4].gradeMealTypeTotalAmount;
obj.schoolMealTypeTotalAmount = obj.schoolMealTypeTotalAmount =
obj.schoolMealTypeTotalAmount + obj.schoolMealTypeTotalAmount +
arr[4].schoolMealTypeTotalAmount; arr[4].schoolMealTypeTotalAmount;
...@@ -3757,8 +3781,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -3757,8 +3781,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
obj.mealTypeTotalAmount = obj.mealTypeTotalAmount =
obj.mealTypeTotalAmount + arr[3].mealTypeTotalAmount; obj.mealTypeTotalAmount + arr[3].mealTypeTotalAmount;
obj.gradeMealTypeTotalAmount = obj.gradeMealTypeTotalAmount =
obj.gradeMealTypeTotalAmount + obj.gradeMealTypeTotalAmount + arr[3].gradeMealTypeTotalAmount;
arr[3].gradeMealTypeTotalAmount;
obj.schoolMealTypeTotalAmount = obj.schoolMealTypeTotalAmount =
obj.schoolMealTypeTotalAmount + obj.schoolMealTypeTotalAmount +
arr[3].schoolMealTypeTotalAmount; arr[3].schoolMealTypeTotalAmount;
...@@ -3769,7 +3792,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -3769,7 +3792,7 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
newArr.push(nullObj); newArr.push(nullObj);
} }
this.consumerAmountObj.campusMealTypeConsumerSummaryList = newArr; this.consumerAmountObj.campusMealTypeConsumerSummaryList = newArr;
console.log(this.consumerAmountObj.campusMealTypeConsumerSummaryList) console.log(this.consumerAmountObj.campusMealTypeConsumerSummaryList);
// } else { // } else {
// this.consumerAmountObj.campusMealTypeConsumerSummaryList = []; // this.consumerAmountObj.campusMealTypeConsumerSummaryList = [];
// } // }
...@@ -4372,10 +4395,15 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -4372,10 +4395,15 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
} }
); );
if (data["code"] != 200) { if (data["code"] != 200) {
await Dialog({ // await Dialog({
title: "温馨提示", // title: "温馨提示",
message: data["message"], // message: data["message"],
confirmButtonText: "知道了", // confirmButtonText: "知道了",
// });
uni.showToast({
icon: "none",
mask: true,
title: data.message,
}); });
return; return;
} }
...@@ -4438,23 +4466,115 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`, ...@@ -4438,23 +4466,115 @@ color: #FF8646;padding:13rpx 12rpx 30rpx 17rpx;`,
// }); // });
} }
}, },
equityPay: function () { // 获取云平台鉴权Token
// jWeixin.miniProgram.switchTab({ async getAuthOauthToken() {
// url: `/pages/Member/main`, uni.showLoading({
// success: function success() { title: "请稍后",
// console.log("skip success"); mask: true,
// },
// fail: function fail(_fail) {
// console.warn(_fail);
// uni.showModal({
// content: JSON.stringify(_fail),
// });
// },
// });
jWeixin.miniProgram.navigateTo({
url: "/pages/nationalCenterForLesbianRights/index?productId=3",
}); });
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() {
let AuthOauthToken = await this.getAuthOauthToken();
let path = `pages/sys/quickLogin/quickLogin?AuthOauthToken=${AuthOauthToken}&origin='XZF'&productId=3&serviceItemCodeList=${JSON.stringify(
["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_() {
// const AuthOauthToken = await this.$getAuthOauthToken(this.currentSwiperInfo['id'])
let AuthOauthToken = await this.$http.post(
{
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 () {
// // jWeixin.miniProgram.switchTab({
// // url: `/pages/Member/main`,
// // success: function success() {
// // console.log("skip success");
// // },
// // fail: function fail(_fail) {
// // console.warn(_fail);
// // uni.showModal({
// // content: JSON.stringify(_fail),
// // });
// // },
// // });
// jWeixin.miniProgram.navigateTo({
// url: "/pages/nationalCenterForLesbianRights/index?productId=3",
// });
// },
imageClick: function (src) { imageClick: function (src) {
this.imageDialogSrc = src; this.imageDialogSrc = src;
this.imageDialogShow = true; this.imageDialogShow = true;
...@@ -4574,12 +4694,13 @@ uni-page-wrapper { ...@@ -4574,12 +4694,13 @@ uni-page-wrapper {
background: no-repeat center/100% background: no-repeat center/100%
url(https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport/costReportIMG7.png); url(https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/SchoolReport/costReportIMG7.png);
position: relative; position: relative;
margin-top: -80rpx;
} }
.school-report-header-position { .school-report-header-position {
width: 100%; width: 100%;
height: 120rpx; height: 120rpx;
padding: 200rpx 0 0 32rpx; padding: 40rpx 0 0 32rpx;
box-sizing: border-box; box-sizing: border-box;
position: fixed; position: fixed;
top: 0; top: 0;
...@@ -5918,7 +6039,7 @@ uni-page-wrapper { ...@@ -5918,7 +6039,7 @@ uni-page-wrapper {
} }
.school-report-context-card-three { .school-report-context-card-three {
height: 526rpx; height: 600rpx;
background: #ffffff; background: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
margin-bottom: 40rpx; margin-bottom: 40rpx;
...@@ -5950,7 +6071,7 @@ uni-page-wrapper { ...@@ -5950,7 +6071,7 @@ uni-page-wrapper {
#consumer-preferences-pie { #consumer-preferences-pie {
height: 385rpx; height: 385rpx;
top: -60rpx; top: -30rpx;
z-index: 100; z-index: 100;
} }
} }
......
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