Browse Source

feat: 页面调整;

pull/5/head
Fox-33 1 week ago
parent
commit
30fa7ac1ef
3 changed files with 26 additions and 11 deletions
  1. +1
    -1
      pages_order/sharing/group.vue
  2. +14
    -4
      pages_order/sharing/personal.vue
  3. +11
    -6
      pages_order/sharing/video.vue

+ 1
- 1
pages_order/sharing/group.vue View File

@ -5,7 +5,7 @@
<view class="content">
<image class="avatar" :src="detail.headImage"></image>
<text class="nick-name">{{ detail.headTitle || '' }}</text>
<text class="desc">{{ `群人数:${detail.memberNum || 0}` }}</text>
<text class="desc">{{ `${detail.memberNum || 0}` }}</text>
<template v-if="isLocked">
<button class="btn" type="success" @click="onAdd">加入</button>


+ 14
- 4
pages_order/sharing/personal.vue View File

@ -9,9 +9,10 @@
<template v-if="isLocked">
<button class="btn" type="success" @click="onAdd">添加</button>
</template>
<template v-else>
<view v-else class="flex qr-popup">
<text class="tips">长按识别二维码了解更多内容</text>
<image class="qr" :src="detail.wxCodeImage" :show-menu-by-longpress="true"></image>
</template>
</view>
</view>
<popupUnlock ref="popupUnlock" src="../static/sharing/unlock-user.png"></popupUnlock>
@ -175,7 +176,7 @@
margin-top: 30rpx;
}
.btn, .qr {
.btn, .qr-popup {
position: absolute;
}
@ -195,9 +196,18 @@
box-sizing: border-box;
}
.qr-popup {
bottom: 269rpx;
.tips {
color: #1B1B1B;
font-size: 32rpx;
}
}
.qr {
margin-top: 40rpx;
width: 350rpx;
height: 350rpx;
bottom: 269rpx;
}
</style>

+ 11
- 6
pages_order/sharing/video.vue View File

@ -12,6 +12,7 @@
:show-fullscreen-btn="false"
:show-center-play-btn="true"
@timeupdate="onTimeupdate"
@ended="onTimeEnd"
></video>
<view class="info">
<view class="author">{{ detail.author || '' }}</view>
@ -64,7 +65,6 @@
}
},
async onLoad(option) {
console.log('--onLoad', option)
const { id, state, shareId } = option
if (shareId) {
@ -137,7 +137,8 @@
if (open) {
this.isLocked = false
this.$refs.popupQrCode.open()
this.timeIsUp = false
this.videoContext.play()
return
}
@ -149,7 +150,6 @@
},
async onPlay() {
if (!this.isLocked) {
this.$refs.popupQrCode.open()
return
}
@ -160,8 +160,11 @@
if (open) { //
this.isLocked = false
this.$refs.popupQrCode.open()
this.timeIsUp = false
this.videoContext.play()
} else {
this.videoContext.pause()
this.timeIsUp = true
uni.showToast({
title: `还需转发${need_num - num}`,
icon: 'none',
@ -172,13 +175,15 @@
async onTimeupdate(e) {
const { currentTime } = e.target
// todo: check
if (currentTime >= this.detail.timeNum) {
if (currentTime >= this.detail.timeNum && this.isLocked) {
this.videoContext.pause()
this.timeIsUp = true
this.onPlay()
}
},
onTimeEnd() {
this.$refs.popupQrCode.open()
},
},
}
</script>


Loading…
Cancel
Save