Commit 24d28a68 authored by 李智书's avatar 李智书

1.修改周消费报告页面

parent 2e811de2
<template>
<view class="container">
<!-- 头部背景图 -->
<view class="headerImg">
<image src="../../static/images/header.png" mode="aspectFit"></image>
</view>
<view class="bgmbox">
<!-- 头部背景图 -->
<view class="headerImg">
<image src="../../static/images/header.png" mode="aspectFit"></image>
</view>
<!-- 班级汇总选择切换 -->
<picker class="classpicker" @change="bindPickerChange" :value="index" :range="array" range-key="Name">
<view class="selectClass" @click="selectReport">
......@@ -130,7 +130,7 @@
}],
index: 0,
time: '12:01',
token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJwZW5nemhpbG9uZyIsImNvcnBJZCI6Ind3NGY1ZjRkMzgwYjYwYjMzNCIsInNjaG9vbElkIjoxLCJ1c2VyVHlwZSI6MywiZXhwIjoxNzA3MDM3NDQ2LCJpc3MiOiJhZG1pbiIsIm5iZiI6MTYyMDYzNjQ0Nn0.GnvWd800Zi1rKUEDjNgnqmjmSsKyS7n21_wFBwzyZwI",
token: "",
weekid: -1,
consume_prefs: [],
consume_trend: [],
......@@ -160,7 +160,7 @@
// 切换班级获取报告
this.QueryClsReport(this.array[e.target.value].DepId)
},
// 切换班级选择汇总
async selectReport() {
......@@ -189,6 +189,7 @@
},
// 二维码加密内容转tokenqrcode2Token
async tokenqrcode2Token() {
let this_ = this
return new Promise((resolve, reject) => {
// 二维码加密内容获取token
$.ajax({
......@@ -201,13 +202,12 @@
},
success: function(res) {
if (res.code == 10000) {
this_.schoolName = res.results.schoolName
this_.teacherName = res.results.teacherName
this_.token = res.results.token
resolve(res)
} else {
resolve(res)
uni.showToast({
icon: "none",
title: res.message
})
reject(res)
}
},
error: function(error) {
......@@ -266,11 +266,7 @@
if (res.code == 10000) {
resolve(res)
} else {
resolve(res)
uni.showToast({
icon: "none",
title: res.message
})
reject(res)
}
},
error: function(error) {
......@@ -293,7 +289,8 @@
data: JSON.stringify({
"clsId": clsId + '',
"qyToken": this_.token,
"weekId": -1
"weekId": getQueryParams('weekid') ? parseInt(getQueryParams(
'weekid')) : -1
}),
success: function(res) {
if (res.code == 10000) {
......@@ -315,11 +312,7 @@
this_.piechart()
resolve(res)
} else {
resolve(res)
uni.showToast({
icon: "none",
title: res.message
})
reject(res)
}
},
error: function(error) {
......@@ -599,8 +592,12 @@
},
// 初始化
async init_() {
uni.showLoading({
title: "加载中....."
})
try {
// await this.tokenqrcode2Token();
await this.tokenqrcode2Token();
let AdminCls = await this.QueryAdminCls();
if (AdminCls.results) {
this.array = AdminCls.results
......@@ -615,11 +612,12 @@
// Name: "102班周消费报告 "
// }]
}
await this.QueryClsReport(AdminCls.results[0].DepId);
// await this.CaptureEvent()
await this.CaptureEvent()
uni.hideLoading()
} catch (e) {
//TODO handle the exception
uni.hideLoading()
uni.showModal({
title: "系统提示",
showCancel: false,
......@@ -637,7 +635,6 @@
content: "hex参数错误",
})
}
this_.init_()
window.addEventListener('resize', () => {
this.$nextTick(function() {
......@@ -645,9 +642,9 @@
myChart.resize()
})
})
setTimeout(function() {
this_.js_sdk_init()
}, 2000)
// setTimeout(function() {
// this_.js_sdk_init()
// }, 2000)
}
}
</script>
......@@ -675,7 +672,9 @@
}
.headerImg {
height: 206rpx;
width: 670rpx;
height: 130rpx;
margin: 0 auto;
}
.headerImg image {
......@@ -702,7 +701,7 @@
.classpicker {
position: relative;
top: -130rpx;
top: -90rpx;
}
.selectClass image {
......@@ -742,7 +741,7 @@
justify-content: flex-end;
align-items: center;
padding-right: 20rpx;
margin-top: -50rpx;
margin-top: -30rpx;
}
.huizongTime {
......
static/images/header.png

88.1 KB | W: | H:

static/images/header.png

7.68 KB | W: | H:

static/images/header.png
static/images/header.png
static/images/header.png
static/images/header.png
  • 2-up
  • Swipe
  • Onion skin
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