Commit 4eec01a3 by liimin

格式化

1 parent 52effe2c
......@@ -17,7 +17,7 @@
import { bigdatautilApi } from '@/api'
export default {
name: 'App',
data () {
data() {
return {
timer: null
}
......@@ -25,14 +25,14 @@ export default {
watch: {
watchFlag: {
immediate: true,
handler (newval) {
handler(newval) {
this.showWindow = newval
this.hideLoading()
}
},
wacthLoginStatus: {
immediate: true,
handler (newval) {
handler(newval) {
if (newval) {
console.log('触发埋点')
this.init()
......@@ -41,19 +41,17 @@ export default {
}
},
computed: {
watchFlag () {
watchFlag() {
return this.$store.state.app.showWindow
},
wacthLoginStatus () {
wacthLoginStatus() {
return this.$store.state.app.loginStatus
}
},
mounted () {
},
mounted() {},
methods: {
init () {
init() {
this.openListener()
window.addEventListener('pagehide', () => {
this.leave()
......@@ -62,24 +60,24 @@ export default {
})
},
// 心跳检测
openListener () {
openListener() {
this.timer = setInterval(() => {
this.heartbeat()
}, 60 * 1000)
},
closeListener () {
closeListener() {
clearInterval(this.timer)
},
// 心跳检测
heartbeat () {
heartbeat() {
this.trackFn('heartbeat', 5)
},
//离开事件
leave () {
leave() {
// console.log('离开时间')
this.trackFn('leaveReportTrack', 5)
},
trackFn (name, actionType) {
trackFn(name, actionType) {
const { id } = this.getQuery()
bigdatautilApi[name](id, actionType)
}
......
<template>
<div
:class="['action isFullSucreen flex', { bgBlack: bgBlack }]"
v-if="show"
>
<div
class="btn-box flex"
v-show="!bgBlack"
>
<div
class="item"
@click="getPoster"
>
<div :class="['action isFullSucreen flex', { bgBlack: bgBlack }]" v-if="show">
<div class="btn-box flex" v-show="!bgBlack">
<div class="item" @click="getPoster">
<div class="sprite-icon icon-poster"></div>
海报
</div>
......@@ -20,20 +11,10 @@
{{ detail.price }}
<span>.{{ detail.decimal }}</span>
</div>
<div
:class="['btn text-center', { disabled:!detail.isStaffLoginLink && (iSMiniprogram || detail.activityStatus == 3 || detail.buyFlag == 2) }, { short: detail.buyFlag == 3 }]"
@click="submit"
@touchstart="touchstart"
@touchend="touchend"
>
<div :class="['btn text-center', { disabled: !detail.isStaffLoginLink && (iSMiniprogram || detail.activityStatus == 3 || detail.buyFlag == 2) }, { short: detail.buyFlag == 3 }]" @click="submit" @touchstart="touchstart" @touchend="touchend">
<template v-if="detail.isStaffLoginLink">
员工注册
<wx-open-launch-weapp
class="mini"
:path="path"
:username="miniprogramInfo.username"
:env-version="miniprogramInfo.envVersion"
>
<wx-open-launch-weapp class="mini" :path="path" :username="miniprogramInfo.username" :env-version="miniprogramInfo.envVersion">
<script type="text/wxtag-template">
<div class="mini-btn">点击跳转</div>
</script>
......@@ -49,32 +30,12 @@
</template>
</template>
</div>
<pay-modal
v-model="showModal"
:list="formList"
@cancel="showModal = false"
@pay="checkOut"
:payStatus="payStatus"
:carInfo="carInfo"
/>
<van-overlay
:show="showPoster"
@click.self="showPoster = false"
>
<div
class="wrapper"
@click.stop
>
<van-image
:src="posterImg"
width="100%"
height="100%"
>
<pay-modal v-model="showModal" :list="formList" @cancel="showModal = false" @pay="checkOut" :payStatus="payStatus" :carInfo="carInfo" />
<van-overlay :show="showPoster" @click.self="showPoster = false">
<div class="wrapper" @click.stop>
<van-image :src="posterImg" width="100%" height="100%">
<template v-slot:loading>
<van-loading
type="spinner"
size="20"
/>
<van-loading type="spinner" size="20" />
</template>
</van-image>
</div>
......
<template>
<div id="chat">
<div class="chatBox">
<!-- <div class="chatBox-top">
......@@ -11,10 +10,11 @@
</div> -->
<div class="chatBox-middle">
<div class="chatInfo" id="chatInfo">
<div class="chatUser-box" v-for="(item,index) in messageList" :key="index" :class="chatUser-box">
<div class="chatUser-box" v-for="(item, index) in messageList" :key="index" :class="chatUser - box">
<div class="chatUser-info">
<span class="chatUser-info-text" :class="current==item.id">
<span class="chatUser-info-name">{{item.userName}}:</span><span>{{item.content}}</span>
<span class="chatUser-info-text" :class="current == item.id">
<span class="chatUser-info-name">{{ item.userName }}:</span>
<span>{{ item.content }}</span>
</span>
</div>
</div>
......@@ -90,16 +90,14 @@ export default {
updated() {
this.scrollToBottom()
},
mounted() {
},
mounted() {},
beforeRouteLeave(to, from, next) {
// 1 操作来自关闭按钮(按钮点击flag)
console.log('我退出了')
setTimeout(() => {
Dialog.confirm({
title: '确认',
message: '确认离开直播间?',
message: '确认离开直播间?'
})
.then(() => {
console.log(from.path, from)
......@@ -150,15 +148,18 @@ export default {
},
//登录聊天室
timLogin() {
tim.login(this.loginMessages).then(res => {
console.log('登陆成功', res)
if (res.code == 0) {
this.timListener()
}
}).catch(imError => {
//登录失败的消息
console.log('登陆失败')
})
tim
.login(this.loginMessages)
.then(res => {
console.log('登陆成功', res)
if (res.code == 0) {
this.timListener()
}
})
.catch(imError => {
//登录失败的消息
console.log('登陆失败')
})
},
// IM监听
timListener() {
......@@ -178,18 +179,20 @@ export default {
console.log('登录成功触发')
let _this = this
// 加入群聊
tim.joinGroup({
groupID: _this.groupId,
type: 'AVChatRoom'
}).then(res => {
if (res.data.status === 'JoinedSuccess') {
console.log('加入群聊成功')
}
}).catch(imError => {
//加入群聊失败
console.log('加入群聊失败', imError)
})
tim
.joinGroup({
groupID: _this.groupId,
type: 'AVChatRoom'
})
.then(res => {
if (res.data.status === 'JoinedSuccess') {
console.log('加入群聊成功')
}
})
.catch(imError => {
//加入群聊失败
console.log('加入群聊失败', imError)
})
// 获取群详细资料
// tim.getGroupProfile({
// groupID: _this.groupId
......@@ -234,18 +237,15 @@ export default {
//发送聊天
sendTextMessage() {
let _this = this
if (
this.messageContent === '' ||
this.messageContent.trim().length === 0
) {
if (this.messageContent === '' || this.messageContent.trim().length === 0) {
this.messageContent = ''
this.$toast('不能发送空消息哦')
return
}
//拼接消息,包括内容,昵称,头像
let data = {
'userName': _this.userName,
'content': _this.messageContent,
userName: _this.userName,
content: _this.messageContent
}
// 1. 创建消息实例,接口返回的实例可以上屏
let message = tim.createTextMessage({
......@@ -260,34 +260,40 @@ export default {
})
// 发送消息
let promise = tim.sendMessage(message)
promise.then(function (imResponse) {
// 发送成功
console.log('发送消息成功')
console.log(imResponse.data)
_this.messageContent = ''
// 把自己发的消息拼接上屏(因为onReceiveMessage是监听不到自己发的消息的)
let text = JSON.parse(imResponse.data.message.payload.text)
_this.updateMessageList(text)
}).catch(function (imError) {
// 发送失败
console.log('发送消息失败:', imError)
})
promise
.then(function (imResponse) {
// 发送成功
console.log('发送消息成功')
console.log(imResponse.data)
_this.messageContent = ''
// 把自己发的消息拼接上屏(因为onReceiveMessage是监听不到自己发的消息的)
let text = JSON.parse(imResponse.data.message.payload.text)
_this.updateMessageList(text)
})
.catch(function (imError) {
// 发送失败
console.log('发送消息失败:', imError)
})
},
//离开直播间,退出群聊
quitGroup() {
tim.quitGroup(this.groupId).then(() => {
console.log('退群成功')
let promise = tim.logout()
promise.then(function (imResponse) {
console.log('登出成功') //
// this.destroy()
}).catch(function (imError) {
console.warn('登出失败')
tim
.quitGroup(this.groupId)
.then(() => {
console.log('退群成功')
let promise = tim.logout()
promise
.then(function (imResponse) {
console.log('登出成功') //
// this.destroy()
})
.catch(function (imError) {
console.warn('登出失败')
})
})
.catch(error => {
console.log('退群失败')
})
}).catch(error => {
console.log('退群失败')
})
},
// 观看计时
// currentTime() {
......@@ -337,11 +343,11 @@ export default {
let container = this.$el.querySelector('#chatInfo')
container.scrollTop = container.scrollHeight
})
},
}
}
}
</script>
<style lang="scss" scoped>
<style lang="scss" scoped>
html,
body {
background-color: #e8e8e8;
......
<template>
<van-overlay :show="show">
<div
class="wrapper"
@click.self="cancel"
>
<div :class="['kf-box flex',{short:!detail.customerServiceQrImg}]">
<van-overlay :show="show">
<div class="wrapper" @click.self="cancel">
<div :class="['kf-box flex', { short: !detail.customerServiceQrImg }]">
<div class="sprite-icon icon-kf-box"></div>
<div class="sprite-icon icon-kf-logo x-center"></div>
<div class="info">
<div class="name">{{detail.customerServiceName}}</div>
<div class="name">{{ detail.customerServiceName }}</div>
<template v-if="detail.customerServicePhone">
<div
class="phone flex"
@click="makePhoneCall(detail.customerServicePhone)"
>
<div class="sprite-icon icon-phone"></div>{{detail.customerServicePhone}}
<div class="phone flex" @click="makePhoneCall(detail.customerServicePhone)">
<div class="sprite-icon icon-phone"></div>
{{ detail.customerServicePhone }}
</div>
</template>
</div>
<template v-if="detail.customerServiceQrImg">
<div class="qr-box">
<div class="sprite-icon icon-qr"></div>
<img
:src="detail.customerServiceQrImg"
class="qr xy-center"
/>
<img :src="detail.customerServiceQrImg" class="qr xy-center" />
</div>
<div class="bottom flex">
<div class="item flex">
<div class="sprite-icon icon-download"></div>
<div>保存图片<br>到相册</div>
<div>
保存图片
<br />
到相册
</div>
</div>
<div class="item flex">
<div class="sprite-icon icon-scan"></div>
<div>打开微信扫一扫<br>添加客服企微</div>
<div>
打开微信扫一扫
<br />
添加客服企微
</div>
</div>
</div>
</template>
......@@ -41,7 +41,7 @@
</div>
</van-overlay>
</template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
export default {
name: 'KfModal',
props: ['value', 'detail'],
......@@ -68,7 +68,7 @@ export default {
}
}
</script>
<style scoped lang='scss'>
<style scoped lang="scss">
.van-overlay {
z-index: 3;
}
......@@ -142,4 +142,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
<template>
<van-action-sheet
v-model="showBox"
@click-overlay="onCancel"
:lock-scroll="false"
>
<van-action-sheet v-model="showBox" @click-overlay="onCancel" :lock-scroll="false">
<div class="box">
<template v-for="(i, index) in items">
<template v-if="i.name">
<div
class="item flex"
:key="index"
>
<div class="item flex" :key="index">
<div class="label text-hide">
<span>*</span>
{{ i.name }}
</div>
<div class="value">
<template v-if="i.route">
<van-field
readonly
:placeholder="`请选择您的${i.name}`"
@click="jumpCarBrands(i.route)"
v-model="params[i.key]"
class="readonly"
right-icon="arrow"
></van-field>
<van-field readonly :placeholder="`请选择您的${i.name}`" @click="jumpCarBrands(i.route)" v-model="params[i.key]" class="readonly" right-icon="arrow"></van-field>
</template>
<template v-else>
<van-field
v-model="params[i.key]"
:placeholder="`请填写您的${i.name}`"
:maxlength="i.maxlength"
:type="i.type"
clearable
/>
<van-field v-model="params[i.key]" :placeholder="`请填写您的${i.name}`" :maxlength="i.maxlength" :type="i.type" clearable />
</template>
</div>
</div>
......@@ -43,19 +23,10 @@
本人已阅读且同意<span @click="jump('agreement')">《隐私协议》</span>
</div> -->
<template v-if="ISWXWORK">
<van-button
color="#b1b1b1"
class="btn disabled"
>企微暂不支持支付</van-button>
<van-button color="#b1b1b1" class="btn disabled">企微暂不支持支付</van-button>
</template>
<template v-else>
<van-button
color="#f13c3d"
class="btn"
@click="pay"
loading-text="支付中..."
:loading="payLoading"
>立即支付</van-button>
<van-button color="#f13c3d" class="btn" @click="pay" loading-text="支付中..." :loading="payLoading">立即支付</van-button>
</template>
</div>
</van-action-sheet>
......@@ -177,7 +148,7 @@ export default {
if (userInfo.phone) this.emit(obj)
else {
// if (!hasPhoneSelect) this.emit(obj)
// else
// else
ssoApi.captchaLogin({
mobile: params.userPhone || '88888888888',
captcha: 8888,
......
// 从v2.11.2起,SDK 支持了 WebSocket,推荐接入;v2.10.2及以下版本,使用 HTTP
import TIM from 'tim-js-sdk'
import TIMUploadPlugin from 'tim-upload-plugin'
export default class IM {
SDKAppID = 1400743527
constructor(options) {}
}
// 从v2.11.2起,SDK 支持了 WebSocket,推荐接入;v2.10.2及以下版本,使用 HTTP
import TIM from 'tim-js-sdk'
import TIMUploadPlugin from 'tim-upload-plugin'
let options = {
SDKAppID: 1400743527 // 接入时需要将0替换为您的即时通信 IM 应用的 SDKAppID
}
// 创建 SDK 实例,`TIM.create()`方法对于同一个 `SDKAppID` 只会返回同一份实例
let tim = TIM.create(options) // SDK 实例通常用 tim 表示
// 设置 SDK 日志输出级别,详细分级请参见 <a href="https://web.sdk.qcloud.com/im/doc/en/SDK.html#setLogLevel">setLogLevel 接口的说明</a>
tim.setLogLevel(0) // 普通级别,日志量较多,接入时建议使用
// tim.setLogLevel(1); // release 级别,SDK 输出关键信息,生产环境时建议使用
// 注册腾讯云即时通信 IM 上传插件
tim.registerPlugin({ 'tim-upload-plugin': TIMUploadPlugin })
export default TIM
<template>
<canvas
:id="canvasId"
class="create"
></canvas>
<canvas :id="canvasId" class="create"></canvas>
</template>
<script type="text/ecmascript-6">
......
......@@ -4,7 +4,7 @@
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-07-06 12:02:21
* @LastEditTime: 2022-10-25 09:31:24
*/
import { ssoApi } from '@/api'
import { util } from 'utils'
......@@ -16,7 +16,7 @@ const state = {
lastPath: '',
activityInfo: {},
updataCarInfo: Date.now(),
loginStatus:false
loginStatus: false
}
const mutations = {
SET_ACTIVITY_INFO(state, value) {
......@@ -44,7 +44,7 @@ const mutations = {
},
SET_LOGIN_STATUS(state, data) {
state.loginStatus = data
},
}
}
const actions = {
setPageMeta({ commit }, meta) {
......@@ -188,7 +188,7 @@ const actions = {
return
} else dispatch('login')
},
registerHttp({}, sessionId = '') {
registerHttp({ dispatch }, sessionId = '') {
window.$HTTP = new Http({ ...window.$fetchConfig, alert: Notify, headers: { token: sessionId } })
}
}
......
export function Audio (url, callBack) {
export function Audio(url, callBack) {
// this.IsIOS = false
this.IsIOS = window.$IsIOS
this.audioContext = new (window.AudioContext || window.webkitAudioContext || window.mozAudioContext)()
......
......@@ -26,7 +26,7 @@ Date.prototype.format = function (fmt) {
return fmt
}
const iosTimeFormat = time => {
return time.replace(/\-/g, '/')
return time.replace(/-/g, '/')
}
const throttle = (fn, gapTime) => {
if (gapTime == null || gapTime == undefined) {
......
<template>
<div v-if="detail.activityDetail">
<div
class="activity-info"
v-html="decodeURIComponent(detail.activityDetail)"
></div>
<div class="activity-info" v-html="decodeURIComponent(detail.activityDetail)"></div>
<div class="tips text-center">
<img
src="https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/logo.png"
alt="技术支持:广联数科"
/>
<img src="https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/logo.png" alt="技术支持:广联数科" />
</div>
</div>
</template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
export default {
name: 'ActivityDetails',
props: {
......@@ -33,21 +27,21 @@ export default {
}
</script>
<style scoped lang='scss'>
.activity-info {
/deep/img {
object-fit: contain;
height: auto;
}
<style scoped lang="scss">
.activity-info {
/deep/img {
object-fit: contain;
height: auto;
}
}
.tips {
padding-top: 47px;
font-size: 12px;
.tips {
padding-top: 47px;
font-size: 12px;
img {
width: 143px;
height: 21px;
}
img {
width: 143px;
height: 21px;
}
</style>
\ No newline at end of file
}
</style>
<template>
<div
class="guide-page"
v-if="show"
>
<img
:src="img"
@click="tap"
>
<div class="guide-page" v-if="show">
<img :src="img" @click="tap" />
</div>
</template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
const imgUrl = 'https://img02.glsx.com.cn/weapp/resource/scrm-mobile/crowdfunding/guide-'
export default {
name: 'GuidePage',
......@@ -48,7 +42,7 @@ export default {
}
</script>
<style scoped lang='scss'>
<style scoped lang="scss">
.guide-page {
position: fixed;
top: 0;
......@@ -58,4 +52,4 @@ export default {
z-index: 10086;
background-color: #000;
}
</style>
\ No newline at end of file
</style>
<template>
<div
class="group-list"
ref="groupBox"
>
<div class="group-list" ref="groupBox">
<div class="mask"></div>
<template v-if="list.length">
<div
class="move"
ref="move"
>
<div class="move" ref="move">
<template v-for="(i, index) in list">
<div
:class="['item flex', { 'group-item': index == 0 }]"
:key="index"
>
<div :class="['item flex', { 'group-item': index == 0 }]" :key="index">
<img :src="i.imageUrl" />
<div class="text">{{ i.name }}刚刚参加了活动</div>
</div>
......
<template>
<div class="page-btn">
<template v-if="detail.customerServiceName || detail.customerServicePhone || detail.customerServiceQrImg || detail.customerServerUrl">
<div
class="page-item flex"
@click="clickKF"
@touchstart="touchstart"
@touchend="touchend"
>
<div class="page-item flex" @click="clickKF" @touchstart="touchstart" @touchend="touchend">
<div class="sprite-icon icon-kf"></div>
客服
</div>
</template>
<template v-if="showOrderBtn">
<div
class="page-item flex order-move"
@click="to('crowdfunding.orderList')"
@touchstart="touchstart"
@touchend="touchend"
>
<div class="page-item flex order-move" @click="to('crowdfunding.orderList')" @touchstart="touchstart" @touchend="touchend">
<div class="sprite-icon icon-order"></div>
订单
</div>
......@@ -25,7 +15,7 @@
</div>
</template>
<script type='text/ecmascript-6'>
<script type="text/ecmascript-6">
import { shopmallApi } from '@/api'
export default {
name: 'PageBtns',
......@@ -58,7 +48,7 @@ export default {
}
</script>
<style scoped lang='scss'>
<style scoped lang="scss">
@keyframes move-btn {
10%,
90% {
......@@ -105,4 +95,4 @@ export default {
animation: move-btn 1.5s infinite cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
}
</style>
\ No newline at end of file
</style>
......@@ -5,32 +5,16 @@
<guide-page />
</template>
<template v-else>
<div
class="empty-page"
v-if="noPro"
>
<img
webp
class="empty-img"
src="@/assets/images/active-empty.png"
/>
<div class="empty-page" v-if="noPro">
<img webp class="empty-img" src="@/assets/images/active-empty.png" />
活动重新配置中,请稍后重试
</div>
<div v-else>
<template v-if="detail.liveBroadcastRoomId && liveDetail && liveDetail.status != 0">
<live-box
ref="liveBox"
:detail="detail"
:liveDetail="liveDetail"
@handleLiveFull="handleLiveFull"
></live-box>
<live-box ref="liveBox" :detail="detail" :liveDetail="liveDetail" @handleLiveFull="handleLiveFull"></live-box>
</template>
<!--👇 点击回到顶部 -->
<div
class="to-top"
v-show="scrollY > 300"
@click="toTop"
>
<div class="to-top" v-show="scrollY > 300" @click="toTop">
<div class="sprite-icon icon-top"></div>
</div>
<!--👇 客服&订单按钮 -->
......@@ -42,50 +26,31 @@
<img :src="detail.activityBigImg" />
<!--👇 参团人数 -->
<template v-if="detail.activityStatus != 1">
<div
class="hot x-center flex"
v-if="groupInfo.groupQuantity"
>
<div class="hot x-center flex" v-if="groupInfo.groupQuantity">
<div class="sprite-icon icon-hot"></div>
{{ groupInfo.groupQuantity }}人已参团
</div>
</template>
<!--👇 背景音乐按钮 -->
<template v-if="audioFlag">
<div
:class="['music', { musicOff }]"
@click="audioAutoPlay"
>
<div :class="['music', { musicOff }]" @click="audioAutoPlay">
<template v-if="musicOff">
<div
class="sprite-icon icon-music-off"
@click="userOff = 0"
></div>
<div class="sprite-icon icon-music-off" @click="userOff = 0"></div>
</template>
<template v-else>
<div
class="sprite-icon icon-music"
@click="userOff = 1"
></div>
<div class="sprite-icon icon-music" @click="userOff = 1"></div>
</template>
</div>
</template>
<!--👇 参团人数滚动显示 -->
<template v-if="detail.activityStatus != 1">
<move-group
:show="detail.showAvatarNicknameFlag == 2"
:groupInfo="groupInfo"
/>
<move-group :show="detail.showAvatarNicknameFlag == 2" :groupInfo="groupInfo" />
</template>
</div>
<template v-if="viewFlag">
<div class="activity">
<!--👇 活动倒计时 -->
<count-down
:detail="detail"
@refresh="refresh"
ref="countDown"
/>
<count-down :detail="detail" @refresh="refresh" ref="countDown" />
<template v-if="detail.activityStatus != 1">
<!--👇 活动人数预览 -->
<div class="box">
......@@ -100,21 +65,12 @@
</div>
</div>
<template v-if="detail.showAvatarNicknameFlag == 2 && groupInfo.arr && groupInfo.arr.length">
<van-swipe
class="group-swipe"
vertical
:show-indicators="false"
:touchable="false"
autoplay="5000"
>
<van-swipe class="group-swipe" vertical :show-indicators="false" :touchable="false" autoplay="5000">
<template v-for="(item, ind) in groupInfo.arr">
<van-swipe-item :key="ind">
<div class="group-box">
<template v-for="(i, index) in item">
<div
class="item"
:key="index"
>
<div class="item" :key="index">
<img :src="i.imageUrl" />
<div class="name">{{ i.name }}</div>
</div>
......@@ -126,25 +82,16 @@
</template>
</div>
<!--👇 活动进度 -->
<div
class="box progress-box"
id="progress"
>
<div class="box progress-box" id="progress">
<div class="progress-title">活动进度</div>
<div class="progress-bar">
<div
class="bar flex"
:style="{ left: `${progress > 89 ? 89 : progress < 11 ? 10 : progress}%` }"
>
<div class="bar flex" :style="{ left: `${progress > 89 ? 89 : progress < 11 ? 10 : progress}%` }">
<div class="sprite-icon icon-flash"></div>
<div class="number">{{ progress ? `${count}%` : '0%' }}</div>
<div :class="['arrow', { right: count > 91 }]"></div>
</div>
<div class="progress">
<div
class="line"
:style="{ width: `${progress > 100 ? 100 : progress < 11 ? 10 : progress}%` }"
>
<div class="line" :style="{ width: `${progress > 100 ? 100 : progress < 11 ? 10 : progress}%` }">
<div class="stripe"></div>
</div>
</div>
......@@ -168,36 +115,19 @@
<!-- 👇 服务说明 -->
<serve :list="detail.activityServices || []" />
<!-- 👇 玩家心得&商品答疑 -->
<share-goods
:evaList="detail.activityExperienceDTOs || []"
:faqList="detail.activityCommoditys || []"
:detail="detail"
/>
<share-goods :evaList="detail.activityExperienceDTOs || []" :faqList="detail.activityCommoditys || []" :detail="detail" />
<!--👇 活动视频 -->
<template v-if="detail.activityVideos && detail.activityVideos.length">
<div :class="['video-box flex', { onlyone: detail.activityVideos.length == 1 }, { onlytwo: detail.activityVideos.length == 2 }]">
<template v-for="(i, index) in detail.activityVideos">
<div
class="item text-center"
:key="index"
@click="playVideo(index)"
>
<video
:src="i.activityVideo"
:ref="`video-${index}`"
:controls="false"
preload
@loadedmetadata="loadedmetadata($event)"
></video>
<div class="item text-center" :key="index" @click="playVideo(index)">
<video :src="i.activityVideo" :ref="`video-${index}`" :controls="false" preload @loadedmetadata="loadedmetadata($event)"></video>
<div class="mask">
<img :src="i.activityVideoCoverImage" />
<div :class="['sprite-icon xy-center', detail.activityVideos.length == 1 ? 'icon-big-play' : 'icon-play']"></div>
<div class="line-box flex">
<div class="line"></div>
<div
v-if="i.activityVideoTime"
class="duration"
>{{ date_format(i.activityVideoTime) }}</div>
<div v-if="i.activityVideoTime" class="duration">{{ date_format(i.activityVideoTime) }}</div>
</div>
</div>
</div>
......@@ -223,11 +153,7 @@
</div>
</div>
<template v-if="detail.activityAddressLat && detail.activityAddressLng">
<div
class="address-btn"
:key="distanceKey"
@click="authLocation(detail)"
>
<div class="address-btn" :key="distanceKey" @click="authLocation(detail)">
<div class="sprite-icon icon-address"></div>
<template v-if="detail.distance">{{ detail.distance }}km</template>
......@@ -243,22 +169,9 @@
<!--👇 活动详情 -->
<activity-details :detail="detail" />
<!--👇 客服弹窗 -->
<kf-modal
v-model="showKf"
:detail="detail"
/>
<kf-modal v-model="showKf" :detail="detail" />
<!--👇 IOS音频播放 -->
<video
id="audio"
style="object-fit: contain"
controls
webkit-playsinline="true"
playsinline="true"
x5-video-player-type="h5-page"
preload="auto"
:autoplay="!detail.liveBroadcastRoomId"
loop
></video>
<video id="audio" style="object-fit: contain" controls webkit-playsinline="true" playsinline="true" x5-video-player-type="h5-page" preload="auto" :autoplay="!detail.liveBroadcastRoomId" loop></video>
</div>
</template>
</div>
......
......@@ -2,7 +2,7 @@
<div class="layout">
<div class="title">左右滑动查看核销凭证</div>
<div class="content" @touchend="end">
<van-swipe :class="['img-box',{ 'one':orderList.length == 1}]" :key="updata" indicator-color="#FFFFFF" :loop="false" @change="change" :style="swipeStyle" :show-indicators="false" ref="swipe" duration="200">
<van-swipe :class="['img-box', { one: orderList.length == 1 }]" :key="updata" indicator-color="#FFFFFF" :loop="false" @change="change" :style="swipeStyle" :show-indicators="false" ref="swipe" duration="200">
<template v-for="(i, index) in orderList">
<van-swipe-item :key="index">
<create-order-img :orderInfo="i" :canvasId="`order-${index}`" :ref="`order-${index}`" />
......@@ -125,7 +125,7 @@ export default {
margin-left: 10px;
}
}
.one{
.one {
box-sizing: border-box;
}
.tips {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!