Commit 30eacab8 authored by lizhishu's avatar lizhishu

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

parent 558927b9
......@@ -138,19 +138,14 @@
<van-dialog v-model="contractMenber" :show-confirm-button="false">
<view class="modalDlgBox">
<view class="modalDlgHeader">
<text>温馨提示</text>
<text>您还未开通消费会员</text>
</view>
<view class="contentt">
<view class="line1">
<text>您还未开通消费会员,</text>
</view>
<view class="line2">
成为会员即可开启消费限额,自定义设置单日限额与场景限额
</view>
<image class="quanyi" :src="ImgUrl2+'quanyi.png'" mode="aspectFit"></image>
</view>
<view class="btngroup">
<button @tap="BtnEvent(1)">取消</button>
<button @tap="BtnEvent(2)">马上开通</button>
<button @tap="BtnEvent(1)" style="border: none;">残忍拒绝</button>
<button @tap="BtnEvent(2)" style="border: none;">立即开通</button>
</view>
</view>
</van-dialog>
......@@ -221,7 +216,7 @@
if (type == 1) {
setTimeout(() => {
uni.navigateBack()
}, 1000)
}, 300)
}
if (type == 2) {
jWeixin.miniProgram.navigateTo({
......@@ -623,19 +618,22 @@
}
.modalDlgBox {
width: 622rpx;
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;
background: linear-gradient(270deg, #FFF9E7 0%, #FFFAEB 100%);
border-radius: 20rpx 20rpx 0rpx 0rpx;
// filter: blur(21rpx);
line-height: 124rpx;
font-size: 36rpx;
......@@ -643,18 +641,21 @@
font-weight: 600;
color: #512C19;
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 {
width: 512rpx;
width: 504rpx;
height: 189rpx;
margin: 0 auto;
text-align: center;
margin-top: 28rpx;
line-height: 45rpx;
// margin-top: 33rpx;
// line-height: 45rpx;
.quanyi{
position: relative;
height: 100%;
width: 100%;
}
.line1 {
font-size: 34rpx;
......@@ -681,26 +682,29 @@
justify-content: space-around;
button {
width: 254rpx;
height: 88rpx;
width: 234rpx;
height: 78rpx;
border-radius: 12rpx;
line-height: 88rpx;
line-height: 78rpx;
text-align: center;
font-size: 30rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
}
button::after {
border:none;
}
button:nth-child(1) {
color: rgba(0, 0, 0, 0.85);
background-color: #EBEBEB;
background: #EBEBEB;
border-radius: 12rpx;
}
button:nth-child(2) {
color: #512C19;
background: linear-gradient(270deg, #EEC16F 0%, #FADCA9 100%);
background: linear-gradient(90deg, #FFE25E 0%, #FFC222 100%);
opacity: 0.9;
}
}
}
......
......@@ -88,6 +88,21 @@
<image :src="this.$ImgUrl + 'applyCons/menberImg.png'" mode="aspectFit"></image>
<view class="tomenber" @tap="openAzMenber"></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>
</template>
......@@ -106,6 +121,7 @@
data() {
return {
ImgUrl: this.$ImgUrl,
ImgUrl2: this.$ImgUrl + 'xzfalipay/',
menuList: Array(4).fill(1).map((v, index) => {
return {
path: ['../ConsumptIoninfo/ConsumptIoninfo', '../ConsumptionQuota/ConsumptionQuota',
......@@ -114,7 +130,13 @@
][index],
title: ['消费记录', '消费限额', '消费异常', '常见问题'][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: {
......@@ -145,7 +167,9 @@
userInfo: {
schoolId: '',
userId: ''
}
},
// 消费会员弹框
contractMenber: false,
};
},
onLoad(options) {
......@@ -162,6 +186,20 @@
this.UserLogin(options['token'])
},
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) {
let data = await requestPost('/cgi-xpay/app/Login', {
......@@ -257,6 +295,14 @@
if (!item.path) {
return
}
if (item['auth'] && item['serviceItemCode']) {
// 查询消费会员权益项
const result = await this.QueryProductContractItem(item['serviceItemCode'])
if (result == "fail") {
this.contractMenber = true
throw ('您还未开通消费会员,')
}
}
const query =
`?name=${this.HomeDataInfo['userName']}&userId=${this.userInfo['userId']}&schoolId=${this.userInfo['schoolId']}`
uni.switchTab({
......@@ -279,6 +325,100 @@
}
.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 {
width: 686rpx;
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