main
xy 2 years ago
parent 0a27a5733d
commit b11dd5a476

@ -18,45 +18,6 @@
})
this.$u.vuex('vuex_token', res.token)
this.$u.vuex('vuex_userId', res.user_id)
let url = location.href.split('#')[0]
this.$u.api.share({
url
}).then(res => {
jwx.config({
debug: true, // , api alert pc log pc
appId: res.appId,
jsApiList: res.jsApiList,
nonceStr: res.nonceStr,
signature: res.signature,
timestamp: res.timestamp,
})
jwx.ready(() => {
jwx.updateAppMessageShareData({
title: '疯狂赏金-192用户现金红包大派送', //
desc: '疯狂赏金-192用户现金红包大派',
link: url, // ,JS
imgUrl: '/static/share-img.jpeg', //
});
jwx.onMenuShareAppMessage({
title: '疯狂赏金-192用户现金红包大派', //
desc: '疯狂赏金-192用户现金红包大派',
link: url, // ,JS
imgUrl: '/static/share-img.jpeg', //
});
jwx.updateTimelineShareData({
title: '疯狂赏金-192用户现金红包大派', //
desc: '疯狂赏金-192用户现金红包大派',
link: url, // ,JS
imgUrl: '/static/share-img.jpeg', //
});
jwx.onMenuShareTimeline({
title: '疯狂赏金-192用户现金红包大派', //
desc: '疯狂赏金-192用户现金红包大派',
link: url, // ,JS
imgUrl: '/static/share-img.jpeg', //
});
})
})
})
}
} else {

@ -46,7 +46,7 @@
<u-input v-model="code" placeholder-style="color:#969696" :custom-style="{ 'color': '#333333' }" @input="$u.debounce(bindMobile, 1000)"></u-input>
<u-verification-code :keep-running="true" :seconds="60" ref="uCode" start-text=""
@change="t => tips = t"></u-verification-code>
<u-button :ripple="true" :hair-line="false" :custom-style="{ 'height': '100%','background': '#969696','color': '#fff' }" shape="circle" @click="sendCode">{{ tips }}</u-button>
<u-button :ripple="true" :hair-line="false" :custom-style="btnStyle" shape="circle" @click="sendCode">{{ tips }}</u-button>
</view>
<view class="login-tip">
@ -176,6 +176,13 @@ import popover from "@/component/popover/index.vue";
case 3:
return 'laugh';
}
},
btnStyle() {
if(!/^1[3-9]\d{9}$/.test(`192${this.inputMobile}`)) {
return { 'height': '100%','background': '#969696','color': '#fff' }
} else {
return { 'height': '100%','background': '#ea3323','color': '#fff' }
}
}
},
watch: {

@ -102,14 +102,17 @@
<view class="box-text__item-5" v-for="(item,index) in
[
{
i: 1,
v: '将活动分享给小伙伴',
b: '去分享'
},
{
i: 2,
v: '关注江苏有线苏州分公司公众号或视频号',
b: '去关注'
},
{
i: 3,
v: '下载“视界观”App',
b: '去下载'
}
@ -121,7 +124,7 @@
fontSize: '28rpx',
width: '166rpx',
height: '56rpx'
}" shape="circle" :hair-line="false" :ripple="true" @click="index === 0 ? toShare = true : ''">{{ item.b }}</u-button>
}" shape="circle" :hair-line="false" :ripple="true" @click="taskClick(item)">{{ item.b }}</u-button>
</view>
</view>
</view>
@ -143,17 +146,38 @@
</view>
</view>
</transition>
<transition name="share-pop" enter-active-class="fade-in" leave-to-class="fade-out">
<view class="share_cover" v-show="toShare" @click="toShare = false">
<image src="/static/share.png" class="share_cover_arrow"></image>
<view class="share_cover_word">
请点击右上角将它发送给指定朋友或分享到朋友圈
</view>
</view>
</transition>
<transition name="qrcode-pop" enter-active-class="fade-in" leave-to-class="fade-out">
<view class="qrcode-pop_cover" v-show="isShowQr" @click="isShowQr = false">
<image src="" class="qrcode-pop_cover_img"></image>
<view class="qrcode-pop_cover_word">
扫码{{ taskId === 2 ? '关注' : '下载' }}
</view>
</view>
</transition>
</view>
</template>
<script>
import popover from "@/component/popover/index.vue";
import jwx from "jweixin-module";
export default {
components: {
popover
},
data() {
return {
taskId: '',
isShowQr: false,
toShare: false,
popoverType: 1,//12345
flag: '',//
@ -164,6 +188,71 @@ export default {
}
},
onLoad() {
let url = location.href.split('#')[0]
this.$u.api.share({
url
}).then(res => {
jwx.config({
debug: true, // , api alert pc log pc
appId: res.appId,
jsApiList: res.jsApiList,
nonceStr: res.nonceStr,
signature: res.signature,
timestamp: res.timestamp,
})
jwx.ready(() => {
jwx.updateAppMessageShareData({
title: '疯狂赏金-192用户现金红包大派送', //
desc: '疯狂赏金-192用户现金红包大派',
link: url, // ,JS
imgUrl: 'http://h5.ali251.langye.net/storage/files/1686122729648030e9447aa.jpeg', //
});
jwx.updateTimelineShareData({
title: '疯狂赏金-192用户现金红包大派', //
desc: '疯狂赏金-192用户现金红包大派',
link: url, // ,JS
imgUrl: 'http://h5.ali251.langye.net/storage/files/1686122729648030e9447aa.jpeg', //
});
jwx.onMenuShareAppMessage({
title: '疯狂赏金-192用户现金红包大派', //
desc: '疯狂赏金-192用户现金红包大派',
link: url, // ,JS
imgUrl: 'http://h5.ali251.langye.net/storage/files/1686122729648030e9447aa.jpeg', //
success: () => {
uni.showToast({
icon: 'none',
title: '分享成功'
})
this.getProducts()
},
cancel: () => {
uni.showToast({
icon: 'none',
title: '分享取消'
})
}
});
jwx.onMenuShareTimeline({
title: '疯狂赏金-192用户现金红包大派', //
desc: '疯狂赏金-192用户现金红包大派',
link: url, // ,JS
imgUrl: 'http://h5.ali251.langye.net/storage/files/1686122729648030e9447aa.jpeg', //
success: () => {
uni.showToast({
icon: 'none',
title: '分享成功'
})
this.getProducts()
},
cancel: () => {
uni.showToast({
icon: 'none',
title: '分享取消'
})
}
});
})
})
},
methods: {
toMe() {
@ -226,6 +315,20 @@ export default {
this.popoverType = 4
this.$refs['popover'].show();
}
},
taskClick(item) {
this.taskId = item.i
if(item.i === 1) {
this.toShare = true
return
}
if(item.i === 2) {
this.isShowQr = true
}
if(item.i === 3) {
this.isShowQr = true
}
}
},
computed: {
@ -239,6 +342,17 @@ export default {
}
}
},
watch: {
isShowQr(newVal) {
if(!newVal) {
this.$u.api.endTask({
task_id: this.taskId
}).then(res => {
this.getProducts()
})
}
}
},
onShow() {
this.getProducts()
}
@ -380,7 +494,7 @@ export default {
&::after {
width: 80rpx;
content: "开始抽奖";
font-size: 40rpx;
font-size: 38rpx;
font-weight: normal;
color: #D8372C;
text-shadow: 0 2rpx 0 #FCF4CA;
@ -528,7 +642,36 @@ export default {
height: 400rpx;
}
}
.qrcode-pop_cover {
background: rgba(0, 0, 0, 0.8);
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
height: 100vh;
width: 100vw;
z-index: 100001;
&_word {
color: #FFFFFF;
font-size: 48rpx;
width: 60%;
margin: 400rpx auto;
text-align: center;
line-height: 40px;
}
&_img {
background: #fff;
transform: translate(-50%,-50%);
position: absolute;
left: 50%;
top: 50%;
width: 300rpx;
height: 300rpx;
}
}
.fade-in {
animation: fade-in 1s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;

Loading…
Cancel
Save