Commit 30eacab8 authored by lizhishu's avatar lizhishu

1.消费应用新增计费鉴权;

parent 558927b9
...@@ -138,19 +138,14 @@ ...@@ -138,19 +138,14 @@
<van-dialog v-model="contractMenber" :show-confirm-button="false"> <van-dialog v-model="contractMenber" :show-confirm-button="false">
<view class="modalDlgBox"> <view class="modalDlgBox">
<view class="modalDlgHeader"> <view class="modalDlgHeader">
<text>温馨提示</text> <text>您还未开通消费会员</text>
</view> </view>
<view class="contentt"> <view class="contentt">
<view class="line1"> <image class="quanyi" :src="ImgUrl2+'quanyi.png'" mode="aspectFit"></image>
<text>您还未开通消费会员,</text>
</view>
<view class="line2">
成为会员即可开启消费限额,自定义设置单日限额与场景限额
</view>
</view> </view>
<view class="btngroup"> <view class="btngroup">
<button @tap="BtnEvent(1)">取消</button> <button @tap="BtnEvent(1)" style="border: none;">残忍拒绝</button>
<button @tap="BtnEvent(2)">马上开通</button> <button @tap="BtnEvent(2)" style="border: none;">立即开通</button>
</view> </view>
</view> </view>
</van-dialog> </van-dialog>
...@@ -221,7 +216,7 @@ ...@@ -221,7 +216,7 @@
if (type == 1) { if (type == 1) {
setTimeout(() => { setTimeout(() => {
uni.navigateBack() uni.navigateBack()
}, 1000) }, 300)
} }
if (type == 2) { if (type == 2) {
jWeixin.miniProgram.navigateTo({ jWeixin.miniProgram.navigateTo({
...@@ -623,19 +618,22 @@ ...@@ -623,19 +618,22 @@
} }
.modalDlgBox { .modalDlgBox {
width: 622rpx; width: 100%;
height: 467rpx; height: 467rpx;
top: 480rpx; top: 480rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
border-radius: 26rpx; border-radius: 26rpx;
margin: 0 auto; margin: 0 auto;
background-image: url(https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/xzfalipay/dlgb.png);
background-size: 100% 100%;
background-repeat: no-repeat;
.modalDlgHeader { .modalDlgHeader {
width: 100%; width: 100%;
height: 124rpx; height: 124rpx;
background: linear-gradient(270deg, #FFF9E7 0%, #FFFAEB 100%);
border-radius: 20rpx 20rpx 0rpx 0rpx; border-radius: 20rpx 20rpx 0rpx 0rpx;
// filter: blur(21rpx);
line-height: 124rpx; line-height: 124rpx;
font-size: 36rpx; font-size: 36rpx;
...@@ -643,18 +641,21 @@ ...@@ -643,18 +641,21 @@
font-weight: 600; font-weight: 600;
color: #512C19; color: #512C19;
text-align: center; text-align: center;
background-image: url(https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/user/mengban.png);
background-size: cover;
background-repeat: no-repeat;
} }
.contentt { .contentt {
width: 512rpx; width: 504rpx;
height: 189rpx;
margin: 0 auto; margin: 0 auto;
text-align: center; text-align: center;
margin-top: 28rpx; // margin-top: 33rpx;
line-height: 45rpx; // line-height: 45rpx;
.quanyi{
position: relative;
height: 100%;
width: 100%;
}
.line1 { .line1 {
font-size: 34rpx; font-size: 34rpx;
...@@ -681,26 +682,29 @@ ...@@ -681,26 +682,29 @@
justify-content: space-around; justify-content: space-around;
button { button {
width: 254rpx; width: 234rpx;
height: 88rpx; height: 78rpx;
border-radius: 12rpx; border-radius: 12rpx;
line-height: 88rpx; line-height: 78rpx;
text-align: center; text-align: center;
font-size: 30rpx; font-size: 30rpx;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 500; font-weight: 400;
}
button::after {
border:none;
} }
button:nth-child(1) { button:nth-child(1) {
color: rgba(0, 0, 0, 0.85); background: #EBEBEB;
background-color: #EBEBEB; border-radius: 12rpx;
} }
button:nth-child(2) { button:nth-child(2) {
color: #512C19; background: linear-gradient(90deg, #FFE25E 0%, #FFC222 100%);
background: linear-gradient(270deg, #EEC16F 0%, #FADCA9 100%); opacity: 0.9;
} }
} }
} }
......
...@@ -88,6 +88,21 @@ ...@@ -88,6 +88,21 @@
<image :src="this.$ImgUrl + 'applyCons/menberImg.png'" mode="aspectFit"></image> <image :src="this.$ImgUrl + 'applyCons/menberImg.png'" mode="aspectFit"></image>
<view class="tomenber" @tap="openAzMenber"></view> <view class="tomenber" @tap="openAzMenber"></view>
</view> </view>
<!-- 消费会员限制弹框 -->
<van-dialog v-model="contractMenber" :show-confirm-button="false">
<view class="modalDlgBox">
<view class="modalDlgHeader">
<text>您还未开通消费会员</text>
</view>
<view class="contentt">
<image class="quanyi" :src="ImgUrl2+'quanyi.png'" mode="aspectFit"></image>
</view>
<view class="btngroup">
<button @tap="BtnEvent(1)" style="border: none;">残忍拒绝</button>
<button @tap="BtnEvent(2)" style="border: none;">立即开通</button>
</view>
</view>
</van-dialog>
</view> </view>
</template> </template>
...@@ -106,6 +121,7 @@ ...@@ -106,6 +121,7 @@
data() { data() {
return { return {
ImgUrl: this.$ImgUrl, ImgUrl: this.$ImgUrl,
ImgUrl2: this.$ImgUrl + 'xzfalipay/',
menuList: Array(4).fill(1).map((v, index) => { menuList: Array(4).fill(1).map((v, index) => {
return { return {
path: ['../ConsumptIoninfo/ConsumptIoninfo', '../ConsumptionQuota/ConsumptionQuota', path: ['../ConsumptIoninfo/ConsumptIoninfo', '../ConsumptionQuota/ConsumptionQuota',
...@@ -114,7 +130,13 @@ ...@@ -114,7 +130,13 @@
][index], ][index],
title: ['消费记录', '消费限额', '消费异常', '常见问题'][index], title: ['消费记录', '消费限额', '消费异常', '常见问题'][index],
sketch: ['消费记录 笔笔可查', '设置额度 管控消费', '消费异常 每日提醒', '使用疑问 一一解答'][index], sketch: ['消费记录 笔笔可查', '设置额度 管控消费', '消费异常 每日提醒', '使用疑问 一一解答'][index],
icon: this.$ImgUrl + `applyCons/menu${index+1}.png` icon: this.$ImgUrl + `applyCons/menu${index+1}.png`,
// 是否需要鉴权
auth: [true, true, true, false][index],
// 鉴权服务项code
serviceItemCode: [config['ServiceEnum']['Auth10'], config['ServiceEnum']['Auth8'], config[
'ServiceEnum']['Auth11'], '']
[index]
} }
}), }),
HomeDataInfo: { HomeDataInfo: {
...@@ -145,7 +167,9 @@ ...@@ -145,7 +167,9 @@
userInfo: { userInfo: {
schoolId: '', schoolId: '',
userId: '' userId: ''
} },
// 消费会员弹框
contractMenber: false,
}; };
}, },
onLoad(options) { onLoad(options) {
...@@ -162,6 +186,20 @@ ...@@ -162,6 +186,20 @@
this.UserLogin(options['token']) this.UserLogin(options['token'])
}, },
methods: { methods: {
// 弹框点击事情
async BtnEvent(type) {
if (type == 1) {
// setTimeout(() => {
// uni.navigateBack()
// }, 300)
}
if (type == 2) {
jWeixin.miniProgram.navigateTo({
url: '/pages/nationalCenterForLesbianRights/index'
})
}
this.contractMenber = false
},
//登录获取用户信息 //登录获取用户信息
async UserLogin(token) { async UserLogin(token) {
let data = await requestPost('/cgi-xpay/app/Login', { let data = await requestPost('/cgi-xpay/app/Login', {
...@@ -257,6 +295,14 @@ ...@@ -257,6 +295,14 @@
if (!item.path) { if (!item.path) {
return return
} }
if (item['auth'] && item['serviceItemCode']) {
// 查询消费会员权益项
const result = await this.QueryProductContractItem(item['serviceItemCode'])
if (result == "fail") {
this.contractMenber = true
throw ('您还未开通消费会员,')
}
}
const query = const query =
`?name=${this.HomeDataInfo['userName']}&userId=${this.userInfo['userId']}&schoolId=${this.userInfo['schoolId']}` `?name=${this.HomeDataInfo['userName']}&userId=${this.userInfo['userId']}&schoolId=${this.userInfo['schoolId']}`
uni.switchTab({ uni.switchTab({
...@@ -279,6 +325,100 @@ ...@@ -279,6 +325,100 @@
} }
.CampusConsumption { .CampusConsumption {
.modalDlgBox {
width: 100%;
height: 467rpx;
top: 480rpx;
background-color: #FFFFFF;
border-radius: 26rpx;
margin: 0 auto;
background-image: url(https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/xzfalipay/dlgb.png);
background-size: 100% 100%;
background-repeat: no-repeat;
.modalDlgHeader {
width: 100%;
height: 124rpx;
border-radius: 20rpx 20rpx 0rpx 0rpx;
line-height: 124rpx;
font-size: 36rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 600;
color: #512C19;
text-align: center;
}
.contentt {
width: 504rpx;
height: 189rpx;
margin: 0 auto;
text-align: center;
// margin-top: 33rpx;
// line-height: 45rpx;
.quanyi {
position: relative;
height: 100%;
width: 100%;
}
.line1 {
font-size: 34rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 600;
color: rgba(0, 0, 0, 0.85);
}
.line2 {
margin-top: 14rpx;
font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
}
}
.btngroup {
display: flex;
position: absolute;
left: 0;
right: 0;
bottom: 40rpx;
justify-content: space-around;
button {
width: 234rpx;
height: 78rpx;
border-radius: 12rpx;
line-height: 78rpx;
text-align: center;
font-size: 30rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
}
button::after {
border: none;
}
button:nth-child(1) {
background: #EBEBEB;
border-radius: 12rpx;
}
button:nth-child(2) {
background: linear-gradient(90deg, #FFE25E 0%, #FFC222 100%);
opacity: 0.9;
}
}
}
.cardInfo { .cardInfo {
width: 686rpx; width: 686rpx;
height: 435rpx; height: 435rpx;
......
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