|
@@ -9,12 +9,20 @@
|
|
<van-row>3.将截图发送至<span style="color: #F4A460"> 深大换换 </span>公众号后台,才可获得本次活动的【匹配资格】和【抽奖机会】</van-row>
|
|
<van-row>3.将截图发送至<span style="color: #F4A460"> 深大换换 </span>公众号后台,才可获得本次活动的【匹配资格】和【抽奖机会】</van-row>
|
|
</div>
|
|
</div>
|
|
<div style="position: relative;">
|
|
<div style="position: relative;">
|
|
- <img :src="isWX ? share_http[i] : share[i]" style="max-width: 80%; position: relative;"/>
|
|
|
|
|
|
+ <img :src="share[i]" style="max-width: 80%; position: relative;"/>
|
|
</div>
|
|
</div>
|
|
<a :href="share[i]" download="post">
|
|
<a :href="share[i]" download="post">
|
|
- <van-button size="large" type="primary" @click="savePic">保存</van-button>
|
|
|
|
|
|
+ <van-button size="large" type="primary" @click="savePic" style="background-color: #00FF00;
|
|
|
|
+ border-color: #00FF00;
|
|
|
|
+ margin: 10px 0 10px;
|
|
|
|
+ width: 55%;"
|
|
|
|
+ >保存</van-button>
|
|
</a>
|
|
</a>
|
|
- <van-button size="large" type="primary" @click="Toindex">返回首页</van-button>
|
|
|
|
|
|
+ <van-button size="large" type="primary" @click="Toindex" style="background-color: #fd6740;
|
|
|
|
+ border-color: #fd6740;
|
|
|
|
+ margin: 10px 0 10px;
|
|
|
|
+ width: 55%;"
|
|
|
|
+ >返回首页</van-button>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
@@ -52,7 +60,7 @@
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
note: {
|
|
note: {
|
|
- backgroundImage: "url('http://pjczv6ygf.bkt.clouddn.com/share_background.jpg')",
|
|
|
|
|
|
+ backgroundImage: "url(" + require("../assets/prize_background.jpg") + ")",
|
|
},
|
|
},
|
|
transparent: {
|
|
transparent: {
|
|
backgroundColor: "rgba(50,50,50,0.7)",
|
|
backgroundColor: "rgba(50,50,50,0.7)",
|
|
@@ -64,14 +72,7 @@
|
|
require('../assets/posts/3.png'),
|
|
require('../assets/posts/3.png'),
|
|
require('../assets/posts/4.png'),
|
|
require('../assets/posts/4.png'),
|
|
],
|
|
],
|
|
- share_http: [
|
|
|
|
- "http://pjczv6ygf.bkt.clouddn.com/1.png",
|
|
|
|
- "http://pjczv6ygf.bkt.clouddn.com/2.png",
|
|
|
|
- "http://pjczv6ygf.bkt.clouddn.com/3.png",
|
|
|
|
- "http://pjczv6ygf.bkt.clouddn.com/4.png",
|
|
|
|
- ],
|
|
|
|
- i: 0,
|
|
|
|
- isWX: false
|
|
|
|
|
|
+ i: 0
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -79,7 +80,6 @@
|
|
this.$router.push('index');
|
|
this.$router.push('index');
|
|
},
|
|
},
|
|
savePic() {
|
|
savePic() {
|
|
- console.log(isWeiXin());
|
|
|
|
if (isWeiXin()) alert('请长按图片,保存至手机');
|
|
if (isWeiXin()) alert('请长按图片,保存至手机');
|
|
}
|
|
}
|
|
// Toshare() {
|
|
// Toshare() {
|
|
@@ -96,7 +96,6 @@
|
|
}
|
|
}
|
|
this.i = Math.ceil(Math.random() * 4) - 1;
|
|
this.i = Math.ceil(Math.random() * 4) - 1;
|
|
console.log(this.i);
|
|
console.log(this.i);
|
|
- if (isWeiXin()) this.isWX = true;
|
|
|
|
|
|
|
|
BasicFunction.getSigned(['onMenuShareTimeline', 'onMenuShareAppMessage',], function () {
|
|
BasicFunction.getSigned(['onMenuShareTimeline', 'onMenuShareAppMessage',], function () {
|
|
wx.ready(function () { //需在用户可能点击分享按钮前就先调用
|
|
wx.ready(function () { //需在用户可能点击分享按钮前就先调用
|
|
@@ -136,6 +135,7 @@
|
|
Toast({
|
|
Toast({
|
|
message: "分享失败,您取消了分享!"
|
|
message: "分享失败,您取消了分享!"
|
|
});
|
|
});
|
|
|
|
+
|
|
}
|
|
}
|
|
})
|
|
})
|
|
});
|
|
});
|
|
@@ -144,24 +144,12 @@
|
|
}
|
|
}
|
|
|
|
|
|
function isWeiXin() {
|
|
function isWeiXin() {
|
|
- let ua = navigator.userAgent.toLowerCase();
|
|
|
|
- // if (ua.match(/micromessenger/i) == "micromessenger") {
|
|
|
|
- // return true;
|
|
|
|
- // } else {
|
|
|
|
- // return false;
|
|
|
|
- // }
|
|
|
|
- return ua.match(/micromessenger/i) == "micromessenger";
|
|
|
|
|
|
+ let ua = window.navigator.userAgent.toLowerCase();
|
|
|
|
+ return ua.match(/MicroMessenger/i) === 'micromessenger';
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
- .van-button {
|
|
|
|
- background-color: #fd6740;
|
|
|
|
- border-color: #fd6740;
|
|
|
|
- margin: 10px 0 10px;
|
|
|
|
- width: 55%;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
.card {
|
|
.card {
|
|
margin-bottom: 20px;
|
|
margin-bottom: 20px;
|
|
margin-left: 20px;
|
|
margin-left: 20px;
|
|
@@ -170,11 +158,13 @@
|
|
text-align: left;
|
|
text-align: left;
|
|
}
|
|
}
|
|
h3{
|
|
h3{
|
|
- font-size: 20px;
|
|
|
|
|
|
+ font-size: 1.5em;
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
.van-row {
|
|
.van-row {
|
|
- font-size: 15px;
|
|
|
|
|
|
+
|
|
|
|
+ font-size: 1em;
|
|
color: white;
|
|
color: white;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|