Commit 985808f1 authored by xd's avatar xd

Merge branch 'master' of http://114.67.93.201/xulili/ybf

parents e31c7a45 433e696a
......@@ -357,6 +357,12 @@ export default {
// 分享
handleShare() {
let url = `http://oysales.oywanhao.com:8087/activeDetail?id=${this.active_id}&active_type=${this.active_type}`;
let env = window.navigator.userAgent.toLowerCase();
if (
env.match(/MicroMessenger/i) == "micromessenger" &&
env.match(/wxwork/i) == "wxwork"
) {
console.log("企业微信客户端");
wx.invoke(
"shareToExternalContact",
{
......@@ -373,6 +379,26 @@ export default {
}
}
);
} else if (env.match(/micromessenger/i) == "micromessenger") {
console.log("微信客户端");
wx.ready(function() {
wx.onMenuShareTimeline({
title: `${this.activityName}`, // 分享标题
link: url, // 分享链接,将当前登录用户转为puid,以便于发展下线
imgUrl: "", // 分享图标
success: function() {
// 用户确认分享后执行的回调函数
},
cancel: function() {
// 用户取消分享后执行的回调函数
}
});
wx.error(function(res) {
// config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
alert("errorMSG:" + res);
});
});
}
}
},
destroyed() {
......
......@@ -5,7 +5,7 @@
</div>
<div class="active">
<template v-for="(item, index) in wheelList">
<van-swipe-cell v-if="index < wheelActive_limit" :key="item.id">
<van-swipe-cell v-if="index < wheelActive_limit" :key="index">
<div class="list" @click="toDetail(item.id, item.activityType)">
<div class="left">
<img :src="item.logo" alt="logo" style="width:100%;height:100%;" />
......@@ -32,7 +32,7 @@
<div v-if="couponList.length > 0" class="fg">送券活动</div>
<div class="active">
<template v-for="(item, index) in couponList">
<van-swipe-cell v-if="index < couponActive_limit" :key="item.id">
<van-swipe-cell v-if="index < couponActive_limit" :key="index">
<div class="list" @click="toDetail(item.id, item.activityType)">
<div class="left">
<img :src="item.logo" alt="logo" style="width:100%;height:100%;" />
......
......@@ -272,7 +272,7 @@
v-model="prizeList[index].probability"
:show-plus="false"
:show-minus="false"
input-width="40px"
input-width="60px"
step="1"
min="1"
max="100"
......
......@@ -256,9 +256,9 @@ export default {
},
handleMore() {
this.active_limit += 3;
if (this.active_limit === this.currentActives.length - 3) {
console.log(this.currentActives.length);
if (this.active_limit >= this.currentActives.length) {
this.finished = true;
return;
}
},
// 获取当前 活动
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment