Feat:抽奖2.0(部分接口未调通)
This commit is contained in:
@@ -215,6 +215,13 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
v-if="drawConfig.myTicketImageEnable === 1 && drawConfig.myTicketImage"
|
||||
class="my-ticket-entry"
|
||||
@click="goMyTicketList"
|
||||
>
|
||||
<image :src="drawConfig.myTicketImage" mode="widthFix" class="img" />
|
||||
</view>
|
||||
<!-- 我的服务开始 -->
|
||||
<view class="myService" style="margin-top: 30rpx !important;">
|
||||
<view class="title acea-row row-middle">
|
||||
@@ -301,6 +308,7 @@ import {
|
||||
noticeList,
|
||||
getUserCenterBanner
|
||||
} from "@/api/user"
|
||||
import { getDrawConfig } from '@/api/lottery'
|
||||
import {isWeixin} from "@/utils"
|
||||
import cookie from "@/utils/store/cookie"
|
||||
import { pageListenMixins } from '@/mixins/pageListenMixins'
|
||||
@@ -389,6 +397,10 @@ export default {
|
||||
],
|
||||
bannerBgUrl: '',
|
||||
userCenterBannerUrl: '',
|
||||
drawConfig: {
|
||||
myTicketImage: '',
|
||||
myTicketImageEnable: 0
|
||||
},
|
||||
pageKeyId: Object.freeze('userIndex'),
|
||||
nowrap: true,
|
||||
// 是否已登录
|
||||
@@ -403,6 +415,7 @@ export default {
|
||||
},
|
||||
onShow() {
|
||||
uni.$emit('updateUnreadMessageCount')
|
||||
this.getDrawConfigReq()
|
||||
if (this.$store.getters.token) {
|
||||
this.isNoLogin = false
|
||||
uni.showLoading({
|
||||
@@ -429,6 +442,19 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['updateAuthorizationPage']),
|
||||
getDrawConfigReq() {
|
||||
getDrawConfig().then(res => {
|
||||
if (res && res.data) {
|
||||
this.drawConfig = {
|
||||
myTicketImage: res.data.myTicketImage || '',
|
||||
myTicketImageEnable: Number(res.data.myTicketImageEnable) || 0
|
||||
}
|
||||
}
|
||||
}).catch(() => {})
|
||||
},
|
||||
goMyTicketList() {
|
||||
this.linkTo('/pkg-video/views/county-my-tickets')
|
||||
},
|
||||
// 新增方法:计算文本像素长度
|
||||
getTextWidth() {
|
||||
this.$nextTick(() => {
|
||||
@@ -681,6 +707,14 @@ export default {
|
||||
}
|
||||
.my-wrapper {
|
||||
padding: 30upx;
|
||||
.my-ticket-entry {
|
||||
margin-top: 30rpx;
|
||||
.img {
|
||||
width: 100%;
|
||||
border-radius: 24rpx;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
&.wrapper {
|
||||
padding: 0 0 30rpx 0 !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user