Commit 985808f1 authored by xd's avatar xd

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

parents e31c7a45 433e696a
...@@ -357,22 +357,48 @@ export default { ...@@ -357,22 +357,48 @@ export default {
// 分享 // 分享
handleShare() { handleShare() {
let url = `http://oysales.oywanhao.com:8087/activeDetail?id=${this.active_id}&active_type=${this.active_type}`; let url = `http://oysales.oywanhao.com:8087/activeDetail?id=${this.active_id}&active_type=${this.active_type}`;
wx.invoke( let env = window.navigator.userAgent.toLowerCase();
"shareToExternalContact", if (
{ env.match(/MicroMessenger/i) == "micromessenger" &&
title: `${this.activityName}`, // 分享标题 env.match(/wxwork/i) == "wxwork"
desc: `${this.des}`, // 分享描述 ) {
link: url, // 分享链接 console.log("企业微信客户端");
imgUrl: "" // 分享封面 wx.invoke(
}, "shareToExternalContact",
function(res) { {
if (res.err_msg == "shareToExternalContact:ok") { title: `${this.activityName}`, // 分享标题
console.log("分享成功"); desc: `${this.des}`, // 分享描述
} else { link: url, // 分享链接
console.log(res.err_msg, "错误信息"); imgUrl: "" // 分享封面
},
function(res) {
if (res.err_msg == "shareToExternalContact:ok") {
console.log("分享成功");
} else {
console.log(res.err_msg, "错误信息");
}
} }
} );
); } 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() { destroyed() {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
</div> </div>
<div class="active"> <div class="active">
<template v-for="(item, index) in wheelList"> <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="list" @click="toDetail(item.id, item.activityType)">
<div class="left"> <div class="left">
<img :src="item.logo" alt="logo" style="width:100%;height:100%;" /> <img :src="item.logo" alt="logo" style="width:100%;height:100%;" />
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<div v-if="couponList.length > 0" class="fg">送券活动</div> <div v-if="couponList.length > 0" class="fg">送券活动</div>
<div class="active"> <div class="active">
<template v-for="(item, index) in couponList"> <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="list" @click="toDetail(item.id, item.activityType)">
<div class="left"> <div class="left">
<img :src="item.logo" alt="logo" style="width:100%;height:100%;" /> <img :src="item.logo" alt="logo" style="width:100%;height:100%;" />
......
...@@ -272,7 +272,7 @@ ...@@ -272,7 +272,7 @@
v-model="prizeList[index].probability" v-model="prizeList[index].probability"
:show-plus="false" :show-plus="false"
:show-minus="false" :show-minus="false"
input-width="40px" input-width="60px"
step="1" step="1"
min="1" min="1"
max="100" max="100"
......
...@@ -256,9 +256,9 @@ export default { ...@@ -256,9 +256,9 @@ export default {
}, },
handleMore() { handleMore() {
this.active_limit += 3; 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; 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