新增首页右上角分享功能
parent
cfd961aef8
commit
8a48573ec6
2
app.json
2
app.json
|
@ -44,7 +44,7 @@
|
||||||
"pagePath": "pages/index/index",
|
"pagePath": "pages/index/index",
|
||||||
"iconPath": "img/bg_w.png",
|
"iconPath": "img/bg_w.png",
|
||||||
"selectedIconPath": "img/bg_b.png",
|
"selectedIconPath": "img/bg_b.png",
|
||||||
"text": "产品"
|
"text": "活动现场"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "pages/ranking/ranking",
|
"pagePath": "pages/ranking/ranking",
|
||||||
|
|
|
@ -12,7 +12,7 @@ Component({
|
||||||
pagePath: "/pages/index/index",
|
pagePath: "/pages/index/index",
|
||||||
iconPath: "/img/bg_w.png",
|
iconPath: "/img/bg_w.png",
|
||||||
selectedIconPath: "/img/bg_b.png",
|
selectedIconPath: "/img/bg_b.png",
|
||||||
text: "产品"
|
text: "活动现场"
|
||||||
}, {
|
}, {
|
||||||
pagePath: "/pages/ranking/ranking",
|
pagePath: "/pages/ranking/ranking",
|
||||||
iconPath: "/img/bg_w.png",
|
iconPath: "/img/bg_w.png",
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 295 KiB |
Binary file not shown.
After Width: | Height: | Size: 510 KiB |
|
@ -42,8 +42,10 @@ Page({
|
||||||
worksBox:false,
|
worksBox:false,
|
||||||
isloading:false,
|
isloading:false,
|
||||||
playAudio:false,
|
playAudio:false,
|
||||||
guiz:false
|
guiz:true,
|
||||||
|
gamesImg:''
|
||||||
},
|
},
|
||||||
|
onShareAppMessage(){},
|
||||||
// 下一个
|
// 下一个
|
||||||
nextEv(){
|
nextEv(){
|
||||||
if(this.data.allList.length-5 >= this.data.currentIndex) {
|
if(this.data.allList.length-5 >= this.data.currentIndex) {
|
||||||
|
@ -153,9 +155,10 @@ Page({
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad: function(options) {
|
onLoad: function(options) {
|
||||||
if(wx.getStorageSync('guiz')!=false) {
|
if(!wx.getStorageSync('guiz')) {
|
||||||
this.setData({
|
this.setData({
|
||||||
guiz:true
|
gamesImg:`${urlPath.host}/static/image/active-rule.jpg`,
|
||||||
|
guiz:false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
let that = this;
|
let that = this;
|
||||||
|
@ -191,8 +194,11 @@ Page({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
that.setBackGroundImg({
|
that.setBackGroundImg({
|
||||||
url: '../../img/background/3.png'
|
url: '../../img/background/home.jpg'
|
||||||
});
|
});
|
||||||
|
// that.setBackGroundImg({
|
||||||
|
// url: `${urlPath.host}/static/image/61b8998d0b0c7.jpg`
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
// 上传图片
|
// 上传图片
|
||||||
uploadImg() {
|
uploadImg() {
|
||||||
|
@ -871,9 +877,9 @@ Page({
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
closeTank(){
|
closeTank(){
|
||||||
wx.setStorageSync('guiz',false);
|
wx.setStorageSync('guiz',true);
|
||||||
this.setData({
|
this.setData({
|
||||||
guiz:false
|
guiz:true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -126,18 +126,16 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 游戏规则 -->
|
<!-- 游戏规则 -->
|
||||||
<view wx:if="{{guiz}}" class="guiz">
|
<view hidden="{{guiz}}" class="guiz">
|
||||||
<view class="guiz-box">
|
<!-- <view class="guiz-box">
|
||||||
<view style="font-size: 28rpx;font-weight: bold;color: #000;">DIY“丰谷酒王”游戏规则:</view>
|
<view style="font-size: 28rpx;font-weight: bold;color: #000;">DIY“丰谷酒王”游戏规则:</view>
|
||||||
<view style="text-indent: 2em;">您可以为亲人、朋友、爱人专属定制的换装小游戏,点击背景、人物、文字和装饰,将这些素材拖动到“丰谷酒王”瓶身上随意DIY,换装完成后,点击下载,即可自动生成专属的“丰谷酒王”海报图。让您在元旦佳节给朋友送上最浓烈的专属祝福,使你们的有情更有情。</view>
|
<view class="textIndent2">您可以为亲人、朋友、爱人专属定制的换装小游戏,点击背景、人物、文字和装饰,将这些素材拖动到“丰谷酒王”瓶身上随意DIY,换装完成后,点击下载,即可自动生成专属的“丰谷酒王”海报图。让您在元旦佳节给朋友送上最浓烈的专属祝福,使你们的有情更有情。</view>
|
||||||
<view style="text-indent: 2em;">活动期间(2022年1月1日-3日),参与此游戏并下载生成专属“丰谷酒王”图,你的DIY图片将会自动参与到作品投票环节,获得票数最多的前十名用户,会获得丰谷好礼。</view>
|
<view class="textIndent2">活动期间(2022年1月1日-3日),参与此游戏并下载生成专属“丰谷酒王”图,你的DIY图片将会自动参与到作品投票环节,获得票数最多的前十名用户,会获得丰谷好礼。</view>
|
||||||
<view style="text-align: center;">
|
<view class="textIndent2">第一名“丰谷壹号”1瓶(价值968元)</view>
|
||||||
<view>第一名“丰谷壹号”1瓶(价值968元)</view>
|
<view class="textIndent2">第二名“丰谷酒王”2瓶(价值876)</view>
|
||||||
<view>第二名“丰谷酒王”2瓶(价值876)</view>
|
<view class="textIndent2">第三名“丰谷酒王”1瓶(价值438元)</view>
|
||||||
<view>第三名“丰谷酒王”1瓶(价值438元)</view>
|
<view class="textIndent2">第四至六“丰谷墨渊”1件6瓶(价值350元)</view>
|
||||||
<view>第四至六“丰谷墨渊”1件6瓶(价值350元)</view>
|
<view class="textIndent2">第七至十“丰谷墨渊”2瓶(价值116元)</view>
|
||||||
<view>第七至十“丰谷墨渊”2瓶(价值116元)</view>
|
|
||||||
</view>
|
|
||||||
<view style="font-size: 28rpx;font-weight: bold;color: #000;">投票规则</view>
|
<view style="font-size: 28rpx;font-weight: bold;color: #000;">投票规则</view>
|
||||||
<view>1. 进行3轮线上网友投票,每次在所有参赛作品中选出前20张DIY作品入围决赛,并进行线下展出;</view>
|
<view>1. 进行3轮线上网友投票,每次在所有参赛作品中选出前20张DIY作品入围决赛,并进行线下展出;</view>
|
||||||
<view>2. 每个ID限制投票1次;</view>
|
<view>2. 每个ID限制投票1次;</view>
|
||||||
|
@ -146,5 +144,7 @@
|
||||||
<view>5. 最终解释权归鑫焱探索科技有限公司所有;</view>
|
<view>5. 最终解释权归鑫焱探索科技有限公司所有;</view>
|
||||||
<view>6.整个投票截止时间为2022年1月3日23点59分结束。</view>
|
<view>6.整个投票截止时间为2022年1月3日23点59分结束。</view>
|
||||||
<view bindtap="closeTank" class="close-btn">X</view>
|
<view bindtap="closeTank" class="close-btn">X</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
<image src="{{gamesImg}}" style="width: 100%;height: 100%;"></image>
|
||||||
|
<button style="background-color: #2a7be9;color: #fff;font-size: 28rpx;position: absolute;bottom: 80rpx;" bindtap="closeTank">关闭</button>
|
||||||
|
</view>
|
||||||
|
|
|
@ -345,6 +345,7 @@ swiper {
|
||||||
.isNyin{box-shadow: 0rpx 3rpx 6rpx rgba(0,0,0,.5);}
|
.isNyin{box-shadow: 0rpx 3rpx 6rpx rgba(0,0,0,.5);}
|
||||||
.isOyin{box-shadow: 0rpx 3rpx 6rpx rgba(0,0,0,1);}
|
.isOyin{box-shadow: 0rpx 3rpx 6rpx rgba(0,0,0,1);}
|
||||||
.card-box-userinfo {transform: rotate(360deg) scale(0);transition: all 1s ease-in-out;}
|
.card-box-userinfo {transform: rotate(360deg) scale(0);transition: all 1s ease-in-out;}
|
||||||
.guiz {position: fixed;top: 0;left: 0;right: 0;bottom: 80rpx;background-color: rgba(0,0,0,.5);display: flex;justify-content: center;align-items: center;z-index: 10000;padding: 60rpx;}
|
.guiz {position: fixed;top: 0;left: 0;right: 0;bottom: 80rpx;background-color: rgba(0,0,0,.5);display: flex;justify-content: center;align-items: center;z-index: 10000;}
|
||||||
.guiz-box {background-color: rgba(255,255,255,1);border-radius: 20rpx;padding: 20rpx;font-size: 24rpx;color: #333;line-height: 40rpx;position: relative;}
|
.guiz-box {background-color: rgba(255,255,255,1);border-radius: 20rpx;padding: 20rpx;font-size: 24rpx;color: #333;line-height: 40rpx;position: relative;}
|
||||||
.close-btn {width: 30rpx;height: 30rpx;display: flex;justify-content: center;align-items: center;background-color: #2a7be9;color: #fff;border-radius: 50%;padding: 30rpx;font-size: 30rpx;position: absolute;right: -20rpx;top: -20rpx;}
|
.close-btn {width: 30rpx;height: 30rpx;display: flex;justify-content: center;align-items: center;background-color: #2a7be9;color: #fff;border-radius: 50%;padding: 30rpx;font-size: 30rpx;position: absolute;right: -20rpx;top: -20rpx;}
|
||||||
|
.textIndent2 {text-indent: 2em;}
|
|
@ -90,6 +90,7 @@ Page({
|
||||||
*/
|
*/
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
this.getBaseInfo();
|
this.getBaseInfo();
|
||||||
|
this.getSlideList();
|
||||||
},
|
},
|
||||||
saveVisit:function(){
|
saveVisit:function(){
|
||||||
wx.request({
|
wx.request({
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<block wx:for="{{img_url}}" wx:key="index">
|
<block wx:for="{{img_url}}" wx:key="index">
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<view class="swiper-item">
|
<view class="swiper-item">
|
||||||
<image src="{{item}}"></image>
|
<image src="{{item}}" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</block>
|
</block>
|
||||||
|
|
|
@ -12,7 +12,7 @@ Page({
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
img_url:wx.getStorageSync('img_url'),
|
img_url:[],
|
||||||
swiperCurrent:0,
|
swiperCurrent:0,
|
||||||
autoplay: false,
|
autoplay: false,
|
||||||
interval: 3000,
|
interval: 3000,
|
||||||
|
@ -34,7 +34,29 @@ Page({
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
|
var that = this;
|
||||||
|
var slide_list = [];
|
||||||
|
wx.request({
|
||||||
|
url: urlPath.getSlideList,
|
||||||
|
header:{
|
||||||
|
'token': wx.getStorageSync('token')
|
||||||
|
},
|
||||||
|
success(res){
|
||||||
|
if(res.data.code == 0){
|
||||||
|
if(res.data.data.length > 0){
|
||||||
|
res.data.data.forEach(function(item){
|
||||||
|
slide_list.push(urlPath.host + item.src);
|
||||||
|
});
|
||||||
|
that.setData({
|
||||||
|
img_url:slide_list
|
||||||
|
});
|
||||||
|
wx.setStorageSync('img_url', that.data.img_url);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
console.log(res.data.msg); //失败
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
//小于10的格式化函数(2变成02)
|
//小于10的格式化函数(2变成02)
|
||||||
timeFormat(param) {
|
timeFormat(param) {
|
||||||
|
@ -57,7 +79,7 @@ Page({
|
||||||
* 生命周期函数--监听页面显示
|
* 生命周期函数--监听页面显示
|
||||||
*/
|
*/
|
||||||
onShow: function () {
|
onShow: function () {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<block wx:for="{{img_url}}" wx:key="index">
|
<block wx:for="{{img_url}}" wx:key="index">
|
||||||
<swiper-item>
|
<swiper-item>
|
||||||
<view class="swiper-item">
|
<view class="swiper-item">
|
||||||
<image src="{{item}}"></image>
|
<image src="{{item}}" mode="widthFix"></image>
|
||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</block>
|
</block>
|
||||||
|
|
|
@ -34,13 +34,16 @@ Page({
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
var that = this;
|
var that = this;
|
||||||
var baseInfo = wx.getStorageSync('baseInfo');
|
var baseInfo = wx.getStorageSync('baseInfo');
|
||||||
|
var resVal = baseInfo.vote.rule.replace(/style="[^"]+"/gi, "")
|
||||||
|
.replace(/style='[^']+'/gi, "") //小程序展示要自己统一的样式,替换了行内样式
|
||||||
|
console.log(resVal);
|
||||||
that.setData({
|
that.setData({
|
||||||
tab_number: baseInfo.numberOfPeople,
|
tab_number: baseInfo.numberOfPeople,
|
||||||
tab_vote: baseInfo.voteNumber,
|
tab_vote: baseInfo.voteNumber,
|
||||||
endTime: baseInfo.vote.time,
|
endTime: baseInfo.vote.time,
|
||||||
rule_text: baseInfo.vote.rule_text,
|
rule_text: baseInfo.vote.rule_text,
|
||||||
tab_visit:baseInfo.vote.visits,
|
tab_visit:baseInfo.vote.visits,
|
||||||
rule:baseInfo.vote.rule,
|
rule:resVal,
|
||||||
img_url:wx.getStorageSync('img_url'),
|
img_url:wx.getStorageSync('img_url'),
|
||||||
});
|
});
|
||||||
that.countDown()
|
that.countDown()
|
||||||
|
|
|
@ -53,4 +53,6 @@
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
line-height: 50rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
Loading…
Reference in New Issue