Commit 370fea12 authored by 李智书's avatar 李智书

Merge branch 'v_c_application_feature_1031' into 'master'

V c application feature 1031

See merge request !11
parents 4b26c2c2 7b9ea81f
......@@ -3,7 +3,7 @@
<!-- 头部卡片 -->
<view class="cardInfo"
:style="'background-image: url('+this.$ImgUrl + (HomeDataInfo['vipStatus']==1? 'applyCons/bgm.png':'applyCons/bgm1.png')+')'">
<view class="userInfo">
<view class="userInfo" v-if="!path">
<view class="left">
<view class="useravatar" :style="'background-image: url('+this.$ImgUrl + 'applyCons/icon.png'+')'">
</view>
......@@ -24,7 +24,7 @@
</view>
</view>
<!-- 消费数据 -->
<view class="cdatabox">
<view class="cdatabox" v-if="!path">
<view class="cdatal">
<span class="integer">{{HomeDataInfo['schoolConsumption']['dailySpend_integer']}}</span>
<span class="decimal">.{{HomeDataInfo['schoolConsumption']['dailySpend_decimal']}}</span>
......@@ -41,7 +41,7 @@
</view>
</view>
<!-- -->
<view class="cdatabox2">
<view class="cdatabox2" v-if="!path">
<view class="cdatal"
:style="HomeDataInfo['schoolConsumption']['pendingcharge_decimal']>0?'color: red;':''"
@click="goToPage(1)">
......@@ -72,14 +72,16 @@
</view>
</view>
<!-- 功能菜单 -->
<view class="menuList">
<view class="menuList" v-if="!path">
<view class="menuitem" v-for="(item,index) in menuList" :key="index" @click="menuClick(item,index+1)">
<view class="">
<view class="title">{{item.title||''}}</view>
<view class="sketch">{{item.sketch||''}}</view>
</view>
<view class="icon">
<image :src="index+1 != 5 ? item.icon : 'https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/applyCons/menu3.png'" mode="aspectFit"></image>
<image
:src="index+1 != 5 ? item.icon : 'https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/applyCons/menu3.png'"
mode="aspectFit"></image>
</view>
</view>
</view>
......@@ -116,6 +118,8 @@
requestGet,
requestPost
} from '../common/request.js'
// 判断是否支付宝小程序
const AliAppMini = navigator.userAgent.indexOf('AliApp') > -1
export default {
name: "CampusConsumption",
data() {
......@@ -176,6 +180,10 @@
},
// 消费会员弹框
contractMenber: false,
// 跳转内部页面path
path: '',
// 支付宝小程序
aliMini: AliAppMini
};
},
onLoad(options) {
......@@ -190,6 +198,9 @@
return;
}
this.UserLogin(options['token'])
if (options['path']) {
this.path = options['path'] || ""
}
},
methods: {
// 弹框点击事情
......@@ -221,7 +232,7 @@
return
}
uni.setStorageSync('token', data.data['token'])
this.HomePageData()
await this.HomePageData()
},
// 查询消费会员权益项
async QueryProductContractItem(serviceItemCode = '1008') {
......@@ -270,7 +281,17 @@
sessionStorage.setItem('HomeDataInfo', JSON.stringify(this.HomeDataInfo))
sessionStorage.setItem('accountId', this.HomeDataInfo['accountId'])
// 查询消费会员权益项
this.QueryProductContractItem()
await this.QueryProductContractItem()
// 20231031
if (this['path']) {
if ('/pages/ApplyConsumption/campusReport/campusReport' == this['path']) {
this.menuClick(this.menuList[4], 5)
return
}
uni.redirectTo({
url: this['path']
})
}
},
// 跳转页面
async goToPage(value) {
......@@ -315,7 +336,7 @@
}
const query =
`?name=${this.HomeDataInfo['userName']}&accountId=${this.HomeDataInfo['accountId']}&userId=${this.userInfo['userId']}&schoolId=${this.userInfo['schoolId']}&userType=${this.userInfo['userType']}`
console.log(item.path + query)
console.log(item.path + query)
uni.switchTab({
url: item.path + query,
fail: () => {
......
......@@ -81,7 +81,7 @@
</template>
</view>
<template >
<template>
<!-- 生活费额度 -->
<view class="living">
<view class="hed">
......@@ -227,7 +227,8 @@
class="prefer_light">{{userDealReportListAndSumObj.wanSumAmount || 0}}</text></span>
</view>
<view class="detail_lists">
<view class="listsHead" v-if="userDealReportListAndSumObj.list && userDealReportListAndSumObj.list.length">
<view class="listsHead"
v-if="userDealReportListAndSumObj.list && userDealReportListAndSumObj.list.length">
<span>日期</span>
<span>早餐</span>
<span>午餐</span>
......@@ -257,7 +258,7 @@
</template>
<!-- 底部部分 -->
<view class="footer">
<view class="footer" :style="aliMini?'visibility: hidden;':''">
<view class="footer_left">
<view class="footer_left_top">到期后将无法查看完整报告</view>
<view class="footer_left_bottom">有效期至<span class="special">{{vipExpiredDt}}</span>,剩余<span
......@@ -320,6 +321,8 @@
requestPost
} from '../common/request.js'
import config from '../common/config.js'
// 判断是否支付宝小程序
const AliAppMini = navigator.userAgent.indexOf('AliApp') > -1
export default {
name: 'campusReport',
data() {
......@@ -362,6 +365,8 @@
homeDataInfo: {},
vipExpiredDt: "", // 有效期
vipDaysRemaining: 0, //有效天数
// 支付宝小程序
aliMini: AliAppMini
}
},
components: {
......@@ -396,18 +401,18 @@
this.today.date = (this.currentDate.month + 1) + '月1日'
console.log(this.currentDate, 'currentDate1111111111111', this.shareDate, 'this.homeDataInfo', this
.homeDataInfo)
},
mounted() {
console.log(this.dataRangeArr, 'dataRangeArr')
this.homeDataInfo = JSON.parse(sessionStorage.getItem('HomeDataInfo'))
this.QueryProductContractItemDetailResp(config['ServiceEnum']['Auth2']);
this.getCampusConsumerReport()
if (this.homeDataInfo.vipStatus === 1) {
this.isVip = true;
}
this.getCateringAbnormalTypeGroupList()
console.log(this.isVip, 'isVip')
this.columns = this.dataRangeArr.map(x => x.month)
......@@ -416,7 +421,7 @@
methods: {
// 查询消费会员权益项
async QueryProductContractItemDetailResp(serviceItemCode = '1002') {
console.log(config['ServiceEnum']['Auth2'], 'Auth2',this.homeDataInfo)
console.log(config['ServiceEnum']['Auth2'], 'Auth2', this.homeDataInfo)
const data = await requestPost('/cgi-xpay/app/h5/QueryProductContractItemDetail', {
accountId: this.homeDataInfo['accountId'],
serviceItemCode
......@@ -491,8 +496,8 @@
this.getCampusConsumerReport()
// if (this.homeDataInfo.vipStatus === 1) {
// this.initPieCharts()
this.getCateringAbnormalTypeGroupList()
this.getCateringAbnormalTypeGroupList()
// }
this.pickerShow = !this.pickerShow;
this.isShow = false;
......@@ -538,7 +543,7 @@
return
}
this.campusConsumerReportInfo = data.data;
this.initPieCharts()
this.initPieCharts()
} catch (e) {
console.warn(e)
//TODO handle the exception
......
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