xg
This commit is contained in:
parent
19c25f27e8
commit
2ad1790eff
12
api/pagesC/noticedetails/index.js
Normal file
12
api/pagesC/noticedetails/index.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import request from "@/api/request.js"
|
||||||
|
|
||||||
|
// 视频观看完成后增加积分
|
||||||
|
export function videoadd(identity, actId) {
|
||||||
|
return request({
|
||||||
|
url: `/applet/score/prizeExchange/video/add/${identity}/${actId}`,
|
||||||
|
method: 'get',
|
||||||
|
header: {
|
||||||
|
region: uni.getStorageSync('region'),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -198,6 +198,7 @@
|
|||||||
line-height: 30rpx;
|
line-height: 30rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: white;
|
color: white;
|
||||||
|
font-size: 18rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
|
|||||||
@ -79,7 +79,7 @@
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pagesC/noticedetails/noticedetails?item=${JSON.stringify(item)}&title=${this.title}&messageNo=${item.messageNo}`
|
url: `/pagesC/noticedetails/noticedetails?item=${JSON.stringify(item)}&title=${this.title}&messageNo=${item.messageNo}&actId=${item.actId}`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -11,16 +11,19 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="" style="height: 2rpx;width: 100%;background-color: #f6f6f6;">
|
<view class="" style="height: 2rpx;width: 100%;background-color: #f6f6f6;">
|
||||||
</view>
|
</view>
|
||||||
<!-- @timeupdate="videoFun" -->
|
<video v-if="messageNo" id="myVideo" @timeupdate="videoFun" :src="messageNo" :initial-time="initial_time"
|
||||||
<video v-if="messageNo" id="myVideo" :src="messageNo" :initial-time="initial_time"
|
|
||||||
@ended='ended' />
|
@ended='ended' />
|
||||||
<view class="text">
|
<view class="text">
|
||||||
<text>{{currentItem.content}}</text>
|
<text>{{currentItem.content}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
videoadd
|
||||||
|
} from '@/api/pagesC/noticedetails/index.js'
|
||||||
import baseurl from '@/api/baseurl.js'
|
import baseurl from '@/api/baseurl.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@ -30,6 +33,8 @@
|
|||||||
messageNo: null,
|
messageNo: null,
|
||||||
video_real_time: 0, //实时播放进度
|
video_real_time: 0, //实时播放进度
|
||||||
nitial_time: '', //视频跳转进度 秒
|
nitial_time: '', //视频跳转进度 秒
|
||||||
|
actId: '',
|
||||||
|
cardNo: uni.getStorageSync('userinfo').cardNo
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onReady() { //更改导航栏文字
|
onReady() { //更改导航栏文字
|
||||||
@ -38,6 +43,7 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
this.actId = options.actId
|
||||||
this.initial_time = '0' //视频进度
|
this.initial_time = '0' //视频进度
|
||||||
this.title = options.title
|
this.title = options.title
|
||||||
this.currentItem = JSON.parse(options.item)
|
this.currentItem = JSON.parse(options.item)
|
||||||
@ -47,7 +53,14 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
ended(e) {
|
ended(e) {
|
||||||
console.log(e)
|
videoadd(this.cardNo, this.actId).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: '已为您增加积分',
|
||||||
|
type: 'success',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
videoFun(e) {
|
videoFun(e) {
|
||||||
var isReady = 1; // 是否开启可以视频快进 1 禁止开启
|
var isReady = 1; // 是否开启可以视频快进 1 禁止开启
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user