This commit is contained in:
Vinjor 2025-04-21 13:57:36 +08:00
parent 278e20a98e
commit 8a7c00c212
2 changed files with 65 additions and 28 deletions

View File

@ -170,10 +170,16 @@
import {
getNoticeList
} from '@/api/business/notice.js'
import {dealMemberRights} from '@/api/business/member.js'
import {getJSONData} from '@/utils/auth.js';
import {getUserType} from '@/utils/common.js'
import constant from '@/utils/constant';
import {
dealMemberRights
} from '@/api/business/member.js'
import {
getJSONData
} from '@/utils/auth.js';
import {
getUserType
} from '@/utils/common.js'
import constant from '@/utils/constant';
export default {
components: {
@ -285,9 +291,12 @@
* 选择平台
*/
async choosePlat(index) {
this.$emit("openVip")
return
if (index == 2) {
//
if (!this.checkIfHasRights(rightsCode.subscribeSelect)) {
this.$emit("openVip")
return
}
this.$refs.showRight2.open()
@ -444,32 +453,32 @@
* @param {Object} item
*/
goDetail(item) {
let userInfo = getJSONData(constant.userInfo)
let userType = getUserType()
let param = {
userId: userInfo.userId,
userType: userType,
noticeId: item.id,
rightsCode: 'unlock_notice',
deplete:1
}
dealMemberRights(param).then(res=>{
if (res.code == 200) {
this.$tab.navigateTo(`/pages/notice/detail?id=${item.id}`)
}
}).catch((e) => {
uni.showToast({
icon: 'error',
duration: 2000,
title: e
});
})
let userInfo = getJSONData(constant.userInfo)
let userType = getUserType()
let param = {
userId: userInfo.userId,
userType: userType,
noticeId: item.id,
rightsCode: 'unlock_notice',
deplete: 1
}
dealMemberRights(param).then(res => {
if (res.code == 200) {
this.$tab.navigateTo(`/pages/notice/detail?id=${item.id}`)
}
}).catch((e) => {
uni.showToast({
icon: 'error',
duration: 2000,
title: e
});
})
},
/**扣除解锁通告权益*/
dealMemberRights(){
dealMemberRights()
}
dealMemberRights() {
dealMemberRights()
}
}
}
</script>

View File

@ -3,7 +3,7 @@
<!-- 主体区域 -->
<view class="content-body">
<!-- 通告列表页 -->
<notice-index v-if="'home'==menuCode"></notice-index>
<notice-index v-if="'home'==menuCode" @openVip="openVip"></notice-index>
<mine-index :key="nowUserType" :nowUserType="nowUserType" v-if="'my'==menuCode"
@refreshUserType="refreshUserType()"></mine-index>
<subscribe v-if="'dingyue'==menuCode"></subscribe>
@ -11,6 +11,12 @@
<my-notice-tg v-if="'myNotice'==menuCode && '01'==nowUserType"></my-notice-tg>
</view>
<tabBarVue :menuCode="menuCode" :nowUserType="nowUserType" ref="tarBar" @changeMenu="changeMenu"></tabBarVue>
<!-- 普通弹窗 -->
<uni-popup ref="popup">
<view class="popup-content" @click="goVip">
<image src="@/static/VIP.png" mode="widthFix"></image>
</view>
</uni-popup>
</view>
</template>
@ -85,6 +91,18 @@
this.selectSiteConfig("platform_tel")
},
methods: {
/**
* 打开VIP弹窗
*/
openVip() {
this.$refs.popup.open('center')
},
/**
* 去VIP开通页
*/
goVip() {
this.$tab.navigateTo('/pages/mine/member/member-card?userType=' + this.nowUserType)
},
/**
* 重新获取当前角色
*/
@ -189,5 +207,15 @@
height: 100%;
background-color: white;
// padding-bottom: calc(var(--window-bottom) + 127rpx);
}
.popup-content {
padding: 0 !important;
background-color: transparent;
image {
width: 70vw;
}
}
</style>