Commit a4a49bcf by 李伟康

提交代码

1 parent f6eaa9eb
...@@ -18,7 +18,7 @@ export default { ...@@ -18,7 +18,7 @@ export default {
create_time: new Date().format('yyyy-MM-dd hh:mm:ss'), create_time: new Date().format('yyyy-MM-dd hh:mm:ss'),
item_type: 3, item_type: 3,
customer_phone: userInfo.phone || '', customer_phone: userInfo.phone || '',
action_type: view ? 1 : 4, action_type: view ? 1 : 4, //1浏览 4分享
item_id: id, item_id: id,
business_type: 1, business_type: 1,
add_way: 104, add_way: 104,
......
...@@ -117,7 +117,7 @@ ...@@ -117,7 +117,7 @@
background: linear-gradient(360deg, #292929 0%, #474747 100%); background: linear-gradient(360deg, #292929 0%, #474747 100%);
.line { .line {
width: 90px; width: 54%;
height: 2px; height: 2px;
background: #fff; background: #fff;
border-radius: 1px; border-radius: 1px;
...@@ -210,7 +210,7 @@ ...@@ -210,7 +210,7 @@
margin: 3px 0 0 auto; margin: 3px 0 0 auto;
.icon-address { .icon-address {
margin: 0 auto; margin: 0 auto 2px;
} }
.auth-text { .auth-text {
......
...@@ -44,11 +44,10 @@ let body = document.getElementsByTagName('head')[0], ...@@ -44,11 +44,10 @@ let body = document.getElementsByTagName('head')[0],
WXJDK = document.createElement('script'), WXJDK = document.createElement('script'),
WWJDK = document.createElement('script'), WWJDK = document.createElement('script'),
ISWXWORK = false ISWXWORK = false
WXJDK.src = '//res.wx.qq.com/open/js/jweixin-1.6.0.js' WXJDK.src = '//res.wx.qq.com/open/js/jweixin-1.2.0.js'
if (Boolean(ua.match(/MicroMessenger/i)) && Boolean(ua.match(/wxwork/i))) { //是否企微 if (Boolean(ua.match(/MicroMessenger/i)) && Boolean(ua.match(/wxwork/i))) { //是否企微
WXJDK.src = '//res.wx.qq.com/open/js/jweixin-1.2.0.js' // WXJDK.src = '//res.wx.qq.com/open/js/jweixin-1.2.0.js'
WWJDK.src = '//open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js' WWJDK.src = '//open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js'
// WWJDK.src = '//res.wx.qq.com/wwopen/js/jsapi/jweixin-1.0.0.js'
ISWXWORK = true ISWXWORK = true
} }
window.$ISWXWORK = ISWXWORK window.$ISWXWORK = ISWXWORK
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
v-if="show" v-if="show"
> >
<div class="btn-box flex"> <div class="btn-box flex">
<div <!-- <div
class="item" class="item"
@click="launchMiniprogram" @click="launchMiniprogram"
> >
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</script> </script>
</wx-open-launch-weapp> </wx-open-launch-weapp>
</template> </template>
</div> </div> -->
<div <div
class="item" class="item"
@click="getPoster" @click="getPoster"
......
<template> <template>
<div class="group-list" ref="groupBox"> <div
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
...@@ -8,7 +11,7 @@ ...@@ -8,7 +11,7 @@
> >
<template v-for="(i,index) in list"> <template v-for="(i,index) in list">
<div <div
:class="['item flex',{'group-item' :index == 0},{'first':index == moveIndex }]" :class="['item flex',{'group-item' :index == 0}]"
:key="index" :key="index"
> >
<img :src="i.imageUrl"> <img :src="i.imageUrl">
...@@ -21,7 +24,6 @@ ...@@ -21,7 +24,6 @@
</template> </template>
<script type='text/ecmascript-6'> <script type='text/ecmascript-6'>
let timer = null
export default { export default {
name: 'MoveGroup', name: 'MoveGroup',
props: ['groupInfo'], props: ['groupInfo'],
...@@ -33,38 +35,29 @@ export default { ...@@ -33,38 +35,29 @@ export default {
data () { data () {
return { return {
list: [], list: [],
moveIndex: 0 speed: 0.8
} }
}, },
mounted () { mounted () {
if (timer) clearInterval(timer)
}, },
methods: { methods: {
setList (list) { setList (list) {
this.list = list this.list = list
this.$nextTick(() => { this.$nextTick(() => {
let boxHeight = this.$refs.groupBox let boxHeight = this.$refs.groupBox.offsetHeight
let [item] = document.getElementsByClassName('group-item') let [item] = document.getElementsByClassName('group-item')
let itemHeight = item.offsetHeight / 7 + item.offsetHeight let itemHeight = item.offsetHeight / 7 + item.offsetHeight
let groupHeight = `${itemHeight * (list.length)}` let groupHeight = `${itemHeight * list.length}`
let { speed } = this
let rule = `@keyframes rowup { let rule = `@keyframes rowup {
0% {transform: translateY(${boxHeight.offsetHeight}px);} 0% {transform: translateY(${boxHeight}px);}
100% {transform: translateY(-${groupHeight}px);} 100% {transform: translateY(-${groupHeight}px);}
}` }`
let sheet = document.styleSheets[0] let sheet = document.styleSheets[0]
sheet.insertRule(rule, 0) sheet.insertRule(rule, 0)
let speed = 2 * list.length + 14 let duration = speed * list.length + (boxHeight / itemHeight * speed)
// linear this.$refs.move.style.animation = `${duration}s rowup linear infinite normal`
this.$refs.move.style.animation = `${speed}s rowup linear infinite normal`
// this.move()
}) })
},
move () {
setTimeout(() => {
this.moveIndex += 1
if (this.moveIndex == this.list.length - 1) this.moveIndex = 0
this.move()
}, 10e3)
} }
} }
} }
...@@ -74,35 +67,17 @@ export default { ...@@ -74,35 +67,17 @@ export default {
.group-list { .group-list {
position: absolute; position: absolute;
left: 8px; left: 8px;
bottom: 52px; top: 5%;
width: 180px; width: 180px;
height: 220px; height: 80%;
overflow: hidden; overflow: hidden;
.mask {
// position: absolute;
// width: 100%;
// height: 100%;
// left: 0;
// top: 0;
// z-index: 1;
// background-repeat: no-repeat;
// background-position: top,bottom;
// transform: translateZ(0);
// pointer-events: none;
// background-image:linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%);
// background-size: 100% 10px;
}
.move { .move {
// transition-duration: 500ms;
width: 100%; width: 100%;
// animation: 10s rowup linear infinite normal;
} }
.item { .item {
position: relative; position: relative;
display: inline-flex; display: inline-flex;
padding: 0 6px 0 3px; padding: 0 6px 0 3px;
// max-width: 180px;
box-sizing: border-box; box-sizing: border-box;
height: 28px; height: 28px;
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.5);
......
...@@ -249,7 +249,7 @@ export default { ...@@ -249,7 +249,7 @@ export default {
window.location.reload() window.location.reload()
}) })
let _this = this let _this = this
let jsApiList = ['getLocation', 'openLocation', 'getNetworkType', 'onMenuShareAppMessage', 'launchMiniprogram', 'updateAppMessageShareData'] let jsApiList = ['getLocation', 'openLocation', 'getNetworkType', 'onMenuShareAppMessage']
wxConfig.init(jsApiList).then(() => { wxConfig.init(jsApiList).then(() => {
wxConfig.ready(() => { wxConfig.ready(() => {
this.getActivityDetail() this.getActivityDetail()
...@@ -340,8 +340,10 @@ export default { ...@@ -340,8 +340,10 @@ export default {
link, link,
imgUrl: data.posterImg || data.activityImg imgUrl: data.posterImg || data.activityImg
} }
if (!this.ISWXWORK) wxConfig.updateAppMessageShareData(this.shareInfo) wxConfig.onMenuShareAppMessage(this.shareInfo).then(() => {
else wxConfig.onMenuShareAppMessage(this.shareInfo) console.log('------------------分享----------------------')
bigdatautilApi.reportTrack(id, false)
})
}) })
}, },
loadedmetadata ({ srcElement }, index) { loadedmetadata ({ srcElement }, index) {
...@@ -429,11 +431,10 @@ export default { ...@@ -429,11 +431,10 @@ export default {
}) })
}, },
clickKF () { clickKF () {
// 活动客服标志:1 同步在线客服;2 单独设置 (暂时没有在线客服) // 活动客服标志:1 同步在线客服;2 单独设置
let { customerServiceFlag } = this.detail let { customerServiceFlag } = this.detail
this.showKf = true if (customerServiceFlag == 2) this.showKf = true
// if (customerServiceFlag == 2) this.showKf = true else window.location.href = 'https://weixin.qq.com/sph/AAiu1t'
// else window.location.href = ''
} }
} }
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="sprite-icon icon-success"></div>恭喜您已参团成功! <div class="sprite-icon icon-success"></div>恭喜您已参团成功!
</div> </div>
<div class="info">登录{{miniprogramInfo.miniprogramName}}车生活小程序,到店凭码核销订单并支付尾款</div> <div class="info">登录{{miniprogramInfo.miniprogramName}}车生活小程序,到店凭码核销订单并支付尾款</div>
<div class="miniprogram-btn flex text-center"> <!-- <div class="miniprogram-btn flex text-center">
立即跳转小程序 立即跳转小程序
<template v-if="!ISWXWORK"> <template v-if="!ISWXWORK">
<wx-open-launch-weapp <wx-open-launch-weapp
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</script> </script>
</wx-open-launch-weapp> </wx-open-launch-weapp>
</template> </template>
</div> </div> -->
</div> </div>
</template> </template>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!