Commit 4eec01a3 by liimin

格式化

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