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