29 changed files with 1531 additions and 12 deletions
@ -0,0 +1,162 @@ |
|||||
|
// pages/activity/huawei/form/index.js
|
||||
|
import commonApi from "../../../../utils/https/common" |
||||
|
import userApi from "../../../../utils/https/user" |
||||
|
Page({ |
||||
|
|
||||
|
/** |
||||
|
* 页面的初始数据 |
||||
|
*/ |
||||
|
data: { |
||||
|
multiArray:[], |
||||
|
multiIndex:[], |
||||
|
areaList:[], |
||||
|
info:{}, |
||||
|
brands:[], |
||||
|
brandIndex:-1, |
||||
|
id:null, |
||||
|
info:{} |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面加载 |
||||
|
*/ |
||||
|
onLoad: function (options) { |
||||
|
commonApi.user_post('actonline/act_online/getActDetail',{ |
||||
|
id:options.id |
||||
|
}).then(res=>{ |
||||
|
this.setData({ |
||||
|
info:res.data |
||||
|
}) |
||||
|
}) |
||||
|
commonApi.user_post('actonline/act_online/getMobileBrand',{}).then(res=>{ |
||||
|
let brands = [] |
||||
|
for(let i in res.data){ |
||||
|
brands.push({ |
||||
|
name:res.data[i], |
||||
|
id:i |
||||
|
}) |
||||
|
} |
||||
|
this.setData({ |
||||
|
brands:brands, |
||||
|
id:options.id |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
changeBrand:function(e){ |
||||
|
this.setData({ |
||||
|
brandIndex:e.detail.value |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面初次渲染完成 |
||||
|
*/ |
||||
|
onReady: function () { |
||||
|
|
||||
|
}, |
||||
|
changeName:function(e){ |
||||
|
let info = this.data.info |
||||
|
info.name = e.detail.value |
||||
|
this.setData({ |
||||
|
info:info |
||||
|
}) |
||||
|
}, |
||||
|
changeTel:function(e){ |
||||
|
let info = this.data.info |
||||
|
info.mobile = e.detail.value |
||||
|
this.setData({ |
||||
|
info:info |
||||
|
}) |
||||
|
}, |
||||
|
changeCard:function(e){ |
||||
|
let info = this.data.info |
||||
|
info.card_number = e.detail.value |
||||
|
this.setData({ |
||||
|
info:info |
||||
|
}) |
||||
|
}, |
||||
|
submit:function(e){ |
||||
|
let info = this.data.info; |
||||
|
|
||||
|
if(!info.name){ |
||||
|
wx.showToast({ |
||||
|
title: '请输入姓名', |
||||
|
icon:'none' |
||||
|
}) |
||||
|
return; |
||||
|
} |
||||
|
if(info.mobile.length!=11){ |
||||
|
wx.showToast({ |
||||
|
title: '请输入正确的手机号', |
||||
|
icon:'none' |
||||
|
}) |
||||
|
return; |
||||
|
} |
||||
|
if(info.card_number.length!=18){ |
||||
|
wx.showToast({ |
||||
|
title: '请输入正确的身份证号码', |
||||
|
icon:'none' |
||||
|
}) |
||||
|
return; |
||||
|
} |
||||
|
if(this.data.brandIndex==-1){ |
||||
|
wx.showToast({ |
||||
|
title: '请选择手机品牌', |
||||
|
icon:'none' |
||||
|
}) |
||||
|
return; |
||||
|
} |
||||
|
info.id = this.data.id |
||||
|
info.mobile_type = Number(this.data.brands[this.data.brandIndex].id) |
||||
|
commonApi.user_post("actonline/act_online/actSign",info).then(res=>{ |
||||
|
if(res.code==1){ |
||||
|
wx.navigateTo({ |
||||
|
url: '../result/index?id='+this.data.id, |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面显示 |
||||
|
*/ |
||||
|
onShow: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面隐藏 |
||||
|
*/ |
||||
|
onHide: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面卸载 |
||||
|
*/ |
||||
|
onUnload: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面相关事件处理函数--监听用户下拉动作 |
||||
|
*/ |
||||
|
onPullDownRefresh: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面上拉触底事件的处理函数 |
||||
|
*/ |
||||
|
onReachBottom: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 用户点击右上角分享 |
||||
|
*/ |
||||
|
onShareAppMessage: function () { |
||||
|
|
||||
|
} |
||||
|
}) |
||||
@ -0,0 +1,5 @@ |
|||||
|
{ |
||||
|
"usingComponents": { |
||||
|
"title":"/pages/component/TitleHeader" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,29 @@ |
|||||
|
<!--pages/activity/huawei/form/index.wxml--> |
||||
|
<title title="信息填写"></title> |
||||
|
<image src="{{info.head_img}}" mode="widthFix" class="topimg"></image> |
||||
|
<view class="input-box"> |
||||
|
<image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/regtip.png" mode="widthFix"></image> |
||||
|
<view class="input-item"> |
||||
|
<view>姓名</view> |
||||
|
<input bindinput="changeName" type="text" /> |
||||
|
</view> |
||||
|
<view class="input-item"> |
||||
|
<view>联系方式</view> |
||||
|
<input bindinput="changeTel" type="text" /> |
||||
|
</view> |
||||
|
<view class="input-item"> |
||||
|
<view>身份证</view> |
||||
|
<input bindinput="changeCard" type="text" /> |
||||
|
</view> |
||||
|
<view class="input-item"> |
||||
|
<view>手机品牌</view> |
||||
|
<picker mode="selector" value="{{brandIndex}}" range="{{brands}}" range-key="name" bindchange="changeBrand"> |
||||
|
<view class="picker"> |
||||
|
<view class="areatext">{{brandIndex==-1?'请选择':brands[brandIndex].name}}</view> |
||||
|
<view class="iconfont icon-xia"></view> |
||||
|
</view> |
||||
|
</picker> |
||||
|
</view> |
||||
|
<image bindtap="submit" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/regsubmit.png" class="submit-btn" mode="widthFix"></image> |
||||
|
</view> |
||||
|
<view style="height:30rpx"></view> |
||||
@ -0,0 +1,72 @@ |
|||||
|
/* pages/activity/huawei/form/index.wxss */ |
||||
|
.topimg { |
||||
|
display: block; |
||||
|
width: 100%; |
||||
|
} |
||||
|
page { |
||||
|
background: #003323; |
||||
|
} |
||||
|
.input-box { |
||||
|
margin: 0 42rpx; |
||||
|
position: relative; |
||||
|
z-index: 1; |
||||
|
margin-top: -130rpx; |
||||
|
background: white; |
||||
|
border-radius: 16rpx; |
||||
|
font-size: 31rpx; |
||||
|
padding: 30rpx 52rpx; |
||||
|
} |
||||
|
.input-box image { |
||||
|
display: block; |
||||
|
width: 264rpx; |
||||
|
height: 68rpx; |
||||
|
} |
||||
|
.input-box image.submit-btn { |
||||
|
display: block; |
||||
|
width: 561rpx; |
||||
|
height: 104rpx; |
||||
|
margin: 0 auto; |
||||
|
margin-top: 35rpx; |
||||
|
} |
||||
|
.input-box input { |
||||
|
display: block; |
||||
|
padding: 10rpx 30rpx; |
||||
|
width: 420rpx; |
||||
|
height: 71rpx; |
||||
|
line-height: 71rpx; |
||||
|
background: #FFFFFF; |
||||
|
border: 1rpx solid #CCCCCC; |
||||
|
border-radius: 10rpx; |
||||
|
box-sizing: border-box; |
||||
|
color: #333; |
||||
|
font-size: 32rpx; |
||||
|
font-weight: 500; |
||||
|
flex-shrink: 0; |
||||
|
} |
||||
|
.input-item { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: space-between; |
||||
|
font-weight: 500; |
||||
|
font-size: 32rpx; |
||||
|
color: #333333; |
||||
|
margin-top: 45rpx; |
||||
|
margin-bottom: 45rpx; |
||||
|
} |
||||
|
.picker { |
||||
|
padding: 0 30rpx; |
||||
|
width: 420rpx; |
||||
|
height: 71rpx; |
||||
|
line-height: 71rpx; |
||||
|
background: #FFFFFF; |
||||
|
border: 1rpx solid #CCCCCC; |
||||
|
border-radius: 10rpx; |
||||
|
box-sizing: border-box; |
||||
|
color: #333; |
||||
|
font-size: 32rpx; |
||||
|
font-weight: 500; |
||||
|
flex-shrink: 0; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: space-between; |
||||
|
} |
||||
@ -0,0 +1,107 @@ |
|||||
|
// pages/activity/huawei/index.js
|
||||
|
const sys = wx.getSystemInfoSync(),rect = wx.getMenuButtonBoundingClientRect(); |
||||
|
let height = sys.screenHeight - (rect.top - sys.statusBarHeight) * 2 - rect.height - sys.statusBarHeight; |
||||
|
import commonApi from "../../../utils/https/common" |
||||
|
Page({ |
||||
|
|
||||
|
/** |
||||
|
* 页面的初始数据 |
||||
|
*/ |
||||
|
data: { |
||||
|
height:height, |
||||
|
isReg:false, |
||||
|
id:null, |
||||
|
info:{}, |
||||
|
showRuleFlag:false |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面加载 |
||||
|
*/ |
||||
|
onLoad: function (options) { |
||||
|
// 判断是否报名
|
||||
|
this.setData({ |
||||
|
id:options.id |
||||
|
}) |
||||
|
commonApi.user_post("actonline/act_online/isSign",{id:options.id}).then(res=>{ |
||||
|
this.setData({ |
||||
|
isReg:res.data |
||||
|
}) |
||||
|
}) |
||||
|
commonApi.user_post("actonline/act_online/getActDetail",{ |
||||
|
id:options.id |
||||
|
}).then(res=>{ |
||||
|
if(res.data){ |
||||
|
for(let i in res.data){ |
||||
|
if(i.indexOf('time')!=-1 && res.data[i]){ |
||||
|
res.data[i] = res.data[i].replace(/-/g,'.') |
||||
|
res.data[i] = res.data[i].substr(0,res.data[i].length-3) |
||||
|
} |
||||
|
} |
||||
|
this.setData({ |
||||
|
info:res.data |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
showRule:function(){ |
||||
|
this.setData({ |
||||
|
showRuleFlag:!this.data.showRuleFlag |
||||
|
}) |
||||
|
}, |
||||
|
gotoPath:function(e){ |
||||
|
let path = e.currentTarget.dataset.path; |
||||
|
wx.navigateTo({ |
||||
|
url: path |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面初次渲染完成 |
||||
|
*/ |
||||
|
onReady: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面显示 |
||||
|
*/ |
||||
|
onShow: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面隐藏 |
||||
|
*/ |
||||
|
onHide: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面卸载 |
||||
|
*/ |
||||
|
onUnload: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面相关事件处理函数--监听用户下拉动作 |
||||
|
*/ |
||||
|
onPullDownRefresh: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面上拉触底事件的处理函数 |
||||
|
*/ |
||||
|
onReachBottom: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 用户点击右上角分享 |
||||
|
*/ |
||||
|
onShareAppMessage: function () { |
||||
|
|
||||
|
} |
||||
|
}) |
||||
@ -0,0 +1,5 @@ |
|||||
|
{ |
||||
|
"usingComponents": { |
||||
|
"title":"/pages/component/TitleHeader" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
<!--pages/activity/huawei/index.wxml--> |
||||
|
<view class="bg"> |
||||
|
<title title="摄影大赛"></title> |
||||
|
<view class="info-box" style="background:url({{info.back_img}});background-size:100% 100%;background-repeat:no-repat;height:{{height}}px"> |
||||
|
<view bindtap="showRule" class="rule-btn">规则</view> |
||||
|
<view wx:if="{{!isReg}}" class="tiptext">线上报名时间:{{info.sign_begin_time}} - {{info.sign_end_time}} </view> |
||||
|
<view wx:if="{{!isReg}}" class="tiptext">线上投票时间:{{info.begin_time}} - {{info.end_time}} </view> |
||||
|
<image bindtap="gotoPath" style="margin-top:40rpx" data-path="form/index?id={{id}}" wx:if="{{!isReg}}" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/regbtn.png" mode="widthFix" class="btnimg"></image> |
||||
|
<image bindtap="gotoPath" data-path="upload/index?id={{id}}" wx:if="{{isReg}}" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/uploadbtn.png" mode="widthFix" class="btnimg"></image> |
||||
|
<image bindtap="gotoPath" data-path="list/index?id={{id}}" wx:if="{{isReg}}" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/mybtn.png" mode="widthFix" class="btnimg"></image> |
||||
|
<view class="bottomtext">{{info.sub_title}}</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="mask" wx:if="{{info && showRuleFlag}}"> |
||||
|
<view bindtap="showRule" class="mask-bg"></view> |
||||
|
<view class="mask-content rule-box"> |
||||
|
<view class="rule-title">• 活动规则 •</view> |
||||
|
<rich-text nodes="{{info.rule_desc}}"></rich-text> |
||||
|
</view> |
||||
|
</view> |
||||
@ -0,0 +1,71 @@ |
|||||
|
/* pages/activity/huawei/index.wxss */ |
||||
|
.info-box { |
||||
|
position: absolute; |
||||
|
left: 0; |
||||
|
right: 0; |
||||
|
bottom: 0; |
||||
|
background: url(https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/bg.png); |
||||
|
background-size: 100% 100%; |
||||
|
background-repeat: no-repeat; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
justify-content: flex-end; |
||||
|
align-items: center; |
||||
|
} |
||||
|
.bg { |
||||
|
position: absolute; |
||||
|
left: 0; |
||||
|
right: 0; |
||||
|
bottom: 0; |
||||
|
top: 0; |
||||
|
} |
||||
|
.btnimg { |
||||
|
display: block; |
||||
|
width: 558rpx; |
||||
|
height: 104rpx; |
||||
|
margin-bottom: 23rpx; |
||||
|
} |
||||
|
.bottomtext { |
||||
|
color: #fff; |
||||
|
text-align: center; |
||||
|
font-size: 24rpx; |
||||
|
margin-bottom: 45rpx; |
||||
|
} |
||||
|
.rule-btn { |
||||
|
font-size: 27rpx; |
||||
|
color: #fff; |
||||
|
font-weight: 500; |
||||
|
width: 73rpx; |
||||
|
height: 73rpx; |
||||
|
border: 1rpx solid; |
||||
|
border-radius: 50%; |
||||
|
position: absolute; |
||||
|
right: 30rpx; |
||||
|
top: 30rpx; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: center; |
||||
|
box-sizing: border-box; |
||||
|
} |
||||
|
.tiptext { |
||||
|
color: #fff; |
||||
|
font-size: 25rpx; |
||||
|
margin-top: 20rpx; |
||||
|
} |
||||
|
.rule-box { |
||||
|
height: 50%; |
||||
|
overflow-y: auto; |
||||
|
font-size: 27rpx; |
||||
|
color: #010101; |
||||
|
padding: 0 50rpx; |
||||
|
width: 500rpx; |
||||
|
padding-bottom: 30rpx; |
||||
|
line-height: 46rpx; |
||||
|
} |
||||
|
.rule-title { |
||||
|
text-align: center; |
||||
|
font-size: 32rpx; |
||||
|
color: #000; |
||||
|
font-weight: 500; |
||||
|
line-height: 100rpx; |
||||
|
} |
||||
@ -0,0 +1,200 @@ |
|||||
|
// pages/activity/huawei/list/index.js
|
||||
|
import commonApi from "../../../../utils/https/common" |
||||
|
Page({ |
||||
|
|
||||
|
/** |
||||
|
* 页面的初始数据 |
||||
|
*/ |
||||
|
data: { |
||||
|
id:null, |
||||
|
types:[], |
||||
|
typeIndex:0, |
||||
|
list:[], |
||||
|
detail:{}, |
||||
|
showRuleFlag:false, |
||||
|
user_id:null, |
||||
|
isReg:false |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面加载 |
||||
|
*/ |
||||
|
onLoad: function (options) { |
||||
|
this.setData({ |
||||
|
id:options.id |
||||
|
}) |
||||
|
if(options.user_id){ |
||||
|
let user_id = wx.getStorageSync('jstrip_userid'); |
||||
|
if(user_id!=options.user_id){ |
||||
|
this.setData({ |
||||
|
user_id:options.user_id |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
commonApi.user_post("actonline/act_online/isSign",{id:options.id}).then(res=>{ |
||||
|
if(res.code==1){ |
||||
|
this.setData({ |
||||
|
isReg:res.data |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
commonApi.user_post("actonline/act_online/getActDetail",{id:options.id}).then(res=>{ |
||||
|
this.setData({ |
||||
|
detail:res.data |
||||
|
}) |
||||
|
}) |
||||
|
commonApi.user_post("actonline/act_online/getActTypeList",{ |
||||
|
act_id:this.data.id |
||||
|
}).then(res=>{ |
||||
|
this.setData({ |
||||
|
types:res.data |
||||
|
}) |
||||
|
if(res.data.length>0){ |
||||
|
this.getList() |
||||
|
} |
||||
|
|
||||
|
}) |
||||
|
}, |
||||
|
showRule:function(){ |
||||
|
this.setData({ |
||||
|
showRuleFlag:!this.data.showRuleFlag |
||||
|
}) |
||||
|
}, |
||||
|
reUpload:function(){ |
||||
|
let that = this; |
||||
|
wx.showModal({ |
||||
|
title:"提示", |
||||
|
content:"一个分类的作品多次提交,平台只保留最近上传的作品。", |
||||
|
cancelText:"否", |
||||
|
confirmText:"是", |
||||
|
success:function(res){ |
||||
|
if(res.confirm){ |
||||
|
that.gotoUpload() |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
changeType:function(e){ |
||||
|
this.setData({ |
||||
|
typeIndex:e.currentTarget.dataset.type, |
||||
|
list:[] |
||||
|
}) |
||||
|
this.getList() |
||||
|
}, |
||||
|
getList:function(){ |
||||
|
commonApi.user_post("actonline/act_online/myWork",{ |
||||
|
type_id:this.data.types[this.data.typeIndex].id, |
||||
|
id:this.data.id, |
||||
|
page:1, |
||||
|
limit:100, |
||||
|
user_id:this.data.user_id || null |
||||
|
}).then(res=>{ |
||||
|
if(this.data.user_id && res.data.data[0].status!=1){ |
||||
|
res.data.data = [] |
||||
|
} |
||||
|
this.setData({ |
||||
|
list:res.data.data |
||||
|
}) |
||||
|
|
||||
|
this.onShareAppMessage() |
||||
|
}) |
||||
|
}, |
||||
|
gotoUpload:function(){ |
||||
|
if(this.data.isReg){ |
||||
|
wx.navigateTo({ |
||||
|
url: '../upload/index?id='+this.data.id |
||||
|
}) |
||||
|
} |
||||
|
else { |
||||
|
wx.navigateTo({ |
||||
|
url: '../index?id='+this.data.id |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
vote:function(e){ |
||||
|
let that = this |
||||
|
commonApi.user_post("actonline/act_online/vote",{ |
||||
|
id:this.data.list[0].id |
||||
|
}).then(res=>{ |
||||
|
if(res.code==1){ |
||||
|
wx.showToast({ |
||||
|
title: '投票成功', |
||||
|
icon:'success' |
||||
|
}) |
||||
|
let list = this.data.list; |
||||
|
list[0].votes = Number(list[0].votes) + 1; |
||||
|
} |
||||
|
else if(res.code==-1){ |
||||
|
wx.showModal({ |
||||
|
title:"提示", |
||||
|
content:res.msg, |
||||
|
confirmText:"关闭", |
||||
|
cancelText:"前往报名", |
||||
|
success:function(res){ |
||||
|
if(!res.confirm){ |
||||
|
wx.navigateTo({ |
||||
|
url: '/pages/activity/huawei/index?id='+that.data.id |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面初次渲染完成 |
||||
|
*/ |
||||
|
onReady: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面显示 |
||||
|
*/ |
||||
|
onShow: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面隐藏 |
||||
|
*/ |
||||
|
onHide: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面卸载 |
||||
|
*/ |
||||
|
onUnload: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面相关事件处理函数--监听用户下拉动作 |
||||
|
*/ |
||||
|
onPullDownRefresh: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面上拉触底事件的处理函数 |
||||
|
*/ |
||||
|
onReachBottom: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 用户点击右上角分享 |
||||
|
*/ |
||||
|
onShareAppMessage: function () { |
||||
|
if(this.data.list.length>0){ |
||||
|
return { |
||||
|
title:"帮我投一票吧~", |
||||
|
path:"/pages/activity/huawei/list/index?id="+this.data.id+"&user_id="+this.data.list[0].user.id, |
||||
|
imageUrl:this.data.list[0].img |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
@ -0,0 +1,5 @@ |
|||||
|
{ |
||||
|
"usingComponents": { |
||||
|
"title":"/pages/component/TitleHeader" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,42 @@ |
|||||
|
<!--pages/activity/huawei/list/index.wxml--> |
||||
|
<title title="{{user_id?'作品详情':'我的作品'}}"></title> |
||||
|
<view class="tabs"> |
||||
|
<view wx:for="{{types}}" bindtap="changeType" data-type="{{index}}" class="tab{{typeIndex==index?' active':''}}">{{item.title}}</view> |
||||
|
</view> |
||||
|
<view wx:if="{{list.length!=0}}"> |
||||
|
<view class="title">{{list[0].title}}</view> |
||||
|
<view class="work-tips-my" wx:if="{{user_id}}"> |
||||
|
<image src="{{list[0].user.avatar}}" mode="aspectFill"></image> |
||||
|
<view class="nickname">{{list[0].user.nickname}}</view> |
||||
|
<text style="color:#333">作品id:{{list[0].id}}</text> |
||||
|
</view> |
||||
|
<view class="work-tips-my" wx:else> |
||||
|
<view>作品id:{{list[0].id}}</view> |
||||
|
<text>作品状态:</text> |
||||
|
<text class="status{{list[0].status==1?' active':''}}">{{list[0].status_text}}</text> |
||||
|
</view> |
||||
|
<view class="refund-msg" wx:if="{{!user_id && list[0].status==2 && list[0].refund_msg}}">拒绝理由:{{list[0].refund_msg}}</view> |
||||
|
<image src="{{list[0].img}}" class="mainimg" mode="widthFix"></image> |
||||
|
<view class="vote-box"> |
||||
|
<view class="count-num">当前得票:{{list[0].votes}}</view> |
||||
|
<view class="vote-btn" wx:if="{{user_id}}" bindtap="vote">投票</view> |
||||
|
</view> |
||||
|
<view class="content"> |
||||
|
{{list[0].desc}} |
||||
|
</view> |
||||
|
<view wx:if="{{!user_id}}" class="rule-btn" bindtap="showRule">规则</view> |
||||
|
<image wx:if="{{!user_id}}" style="width:646rpx" bindtap="reUpload" class="btnimg" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/reupload.png" mode="widthFix"></image> |
||||
|
<view wx:if="{{!user_id}}" style="height:50rpx"></view> |
||||
|
</view> |
||||
|
<view wx:else> |
||||
|
<image class="emptyimg" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/emptyimg.png" mode="widthFix"></image> |
||||
|
<view class="tip1">您还未上传作品,快去上传吧!</view> |
||||
|
<image bindtap="gotoUpload" class="btnimg" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/uploadbtn.png" mode="widthFix"></image> |
||||
|
</view> |
||||
|
<view class="mask" wx:if="{{detail && showRuleFlag}}"> |
||||
|
<view bindtap="showRule" class="mask-bg"></view> |
||||
|
<view class="mask-content rule-box"> |
||||
|
<view class="rule-title">• 活动规则 •</view> |
||||
|
<rich-text nodes="{{detail.rule_desc}}"></rich-text> |
||||
|
</view> |
||||
|
</view> |
||||
@ -0,0 +1,163 @@ |
|||||
|
/* pages/activity/huawei/list/index.wxss */ |
||||
|
.tabs { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
flex-wrap: nowrap; |
||||
|
overflow-x: auto; |
||||
|
margin: 0 27rpx; |
||||
|
height: 92rpx; |
||||
|
border-bottom: 1rpx solid #cccccc; |
||||
|
color: #666; |
||||
|
font-size: 31rpx; |
||||
|
padding: 0 28rpx; |
||||
|
} |
||||
|
.tab { |
||||
|
margin-right: 140rpx; |
||||
|
position: relative; |
||||
|
line-height: 92rpx; |
||||
|
flex-shrink: 0; |
||||
|
} |
||||
|
.tab:last-child { |
||||
|
margin-right: 0; |
||||
|
} |
||||
|
.tab.active { |
||||
|
color: #000; |
||||
|
font-weight: 500; |
||||
|
} |
||||
|
.tab.active::after { |
||||
|
content: "1"; |
||||
|
font-size: 0; |
||||
|
display: block; |
||||
|
position: absolute; |
||||
|
width: 60rpx; |
||||
|
left: 50%; |
||||
|
margin-left: -30rpx; |
||||
|
bottom: 0; |
||||
|
height: 7rpx; |
||||
|
background: linear-gradient(0deg, rgba(251, 197, 34, 0.93), rgba(255, 252, 0, 0.93)); |
||||
|
border-radius: 3rpx; |
||||
|
} |
||||
|
.title { |
||||
|
text-align: center; |
||||
|
padding: 39rpx 30rpx; |
||||
|
margin-top: 12rpx; |
||||
|
font-size: 36rpx; |
||||
|
color: #333; |
||||
|
font-weight: bold; |
||||
|
} |
||||
|
.mainimg { |
||||
|
display: block; |
||||
|
margin: 0 auto; |
||||
|
width: 625rpx; |
||||
|
border: 13rpx solid #FEE5C6; |
||||
|
margin-bottom: 50rpx; |
||||
|
} |
||||
|
.content { |
||||
|
margin: 0 52rpx; |
||||
|
padding-bottom: 30rpx; |
||||
|
font-size: 27rpx; |
||||
|
color: #333333; |
||||
|
} |
||||
|
.emptyimg { |
||||
|
display: block; |
||||
|
margin: 91rpx auto; |
||||
|
width: 414rpx; |
||||
|
height: 193rpx; |
||||
|
} |
||||
|
.tip1 { |
||||
|
text-align: center; |
||||
|
font-size: 35rpx; |
||||
|
color: #000000; |
||||
|
} |
||||
|
.btnimg { |
||||
|
width: 558rpx; |
||||
|
margin: 0 auto; |
||||
|
margin-top: 86rpx; |
||||
|
display: block; |
||||
|
} |
||||
|
.work-tips-my { |
||||
|
display: flex; |
||||
|
justify-content: space-between; |
||||
|
align-items: center; |
||||
|
font-size: 31rpx; |
||||
|
color: #666; |
||||
|
margin: 0 53rpx; |
||||
|
padding: 20rpx 0; |
||||
|
} |
||||
|
.work-tips-my view { |
||||
|
flex: 1; |
||||
|
} |
||||
|
.work-tips-my .status { |
||||
|
color: #CC0000; |
||||
|
} |
||||
|
.work-tips-my .status.active { |
||||
|
color: #169900; |
||||
|
} |
||||
|
.count-num { |
||||
|
color: #333; |
||||
|
font-size: 31rpx; |
||||
|
font-weight: 500; |
||||
|
} |
||||
|
.rule-btn { |
||||
|
width: 143rpx; |
||||
|
position: fixed; |
||||
|
text-align: center; |
||||
|
line-height: 66rpx; |
||||
|
background: #FFFC00; |
||||
|
border-top-left-radius: 33rpx; |
||||
|
border-bottom-left-radius: 33rpx; |
||||
|
font-size: 31rpx; |
||||
|
color: #333333; |
||||
|
padding-right: 10rpx; |
||||
|
right: 0; |
||||
|
bottom: 246rpx; |
||||
|
} |
||||
|
.rule-box { |
||||
|
height: 50%; |
||||
|
overflow-y: auto; |
||||
|
font-size: 27rpx; |
||||
|
color: #010101; |
||||
|
padding: 0 50rpx; |
||||
|
width: 500rpx; |
||||
|
padding-bottom: 30rpx; |
||||
|
line-height: 46rpx; |
||||
|
} |
||||
|
.rule-title { |
||||
|
text-align: center; |
||||
|
font-size: 32rpx; |
||||
|
color: #000; |
||||
|
font-weight: 500; |
||||
|
line-height: 100rpx; |
||||
|
} |
||||
|
.vote-box { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: space-between; |
||||
|
margin: 0 53rpx; |
||||
|
padding-bottom: 50rpx; |
||||
|
} |
||||
|
.vote-btn { |
||||
|
width: 175rpx; |
||||
|
line-height: 64rpx; |
||||
|
background: linear-gradient(0deg, rgba(251, 197, 34, 0.93), rgba(255, 252, 0, 0.93)); |
||||
|
border-radius: 32rpx; |
||||
|
text-align: center; |
||||
|
color: #333333; |
||||
|
font-size: 31rpx; |
||||
|
font-weight: 500; |
||||
|
} |
||||
|
.work-tips-my image { |
||||
|
display: block; |
||||
|
width: 53rpx; |
||||
|
height: 53rpx; |
||||
|
border-radius: 50%; |
||||
|
} |
||||
|
.work-tips-my view.nickname { |
||||
|
font-size: 28rpx; |
||||
|
margin: 0 20rpx; |
||||
|
} |
||||
|
.refund-msg { |
||||
|
color: #CC0000; |
||||
|
margin: 30rpx 53rpx; |
||||
|
margin-top: 10rpx; |
||||
|
} |
||||
@ -0,0 +1,73 @@ |
|||||
|
// pages/activity/huawei/result/index.js
|
||||
|
Page({ |
||||
|
|
||||
|
/** |
||||
|
* 页面的初始数据 |
||||
|
*/ |
||||
|
data: { |
||||
|
id:null |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面加载 |
||||
|
*/ |
||||
|
onLoad: function (options) { |
||||
|
this.setData({ |
||||
|
id:options.id |
||||
|
}) |
||||
|
}, |
||||
|
upload:function(e){ |
||||
|
wx.navigateTo({ |
||||
|
url: '../upload/index?id='+this.data.id |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面初次渲染完成 |
||||
|
*/ |
||||
|
onReady: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面显示 |
||||
|
*/ |
||||
|
onShow: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面隐藏 |
||||
|
*/ |
||||
|
onHide: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面卸载 |
||||
|
*/ |
||||
|
onUnload: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面相关事件处理函数--监听用户下拉动作 |
||||
|
*/ |
||||
|
onPullDownRefresh: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面上拉触底事件的处理函数 |
||||
|
*/ |
||||
|
onReachBottom: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 用户点击右上角分享 |
||||
|
*/ |
||||
|
onShareAppMessage: function () { |
||||
|
|
||||
|
} |
||||
|
}) |
||||
@ -0,0 +1,5 @@ |
|||||
|
{ |
||||
|
"usingComponents": { |
||||
|
"title":"/pages/component/TitleHeader" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
<!--pages/activity/huawei/result/index.wxml--> |
||||
|
<title title="报名成功"></title> |
||||
|
<image class="logo" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/regsuccess.png" mode="widthFix"></image> |
||||
|
<view class="text">恭喜您已报名成功!</view> |
||||
|
<view>点击下方按钮开始进行作品上传</view> |
||||
|
<image class="arrowimg" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/resarrow.png" mode="widthFix"></image> |
||||
|
<image bindtap="upload" class="uploadimg" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/uploadbtn.png"></image> |
||||
@ -0,0 +1,30 @@ |
|||||
|
/* pages/activity/huawei/result/index.wxss */ |
||||
|
.logo { |
||||
|
margin: 64rpx auto; |
||||
|
width: 415rpx; |
||||
|
height: 393rpx; |
||||
|
display: block; |
||||
|
} |
||||
|
page { |
||||
|
text-align: center; |
||||
|
color: #666666; |
||||
|
font-size: 28rpx; |
||||
|
} |
||||
|
.uploadimg { |
||||
|
display: block; |
||||
|
width: 558rpx; |
||||
|
height: 104rpx; |
||||
|
margin: 0 auto; |
||||
|
} |
||||
|
.arrowimg { |
||||
|
display: block; |
||||
|
margin: 35rpx auto; |
||||
|
width: 42rpx; |
||||
|
height: 58rpx; |
||||
|
} |
||||
|
.text { |
||||
|
font-size: 45rpx; |
||||
|
font-weight: 500; |
||||
|
color: #000000; |
||||
|
margin-bottom: 20rpx; |
||||
|
} |
||||
@ -0,0 +1,234 @@ |
|||||
|
// pages/activity/huawei/upload/index.js
|
||||
|
import commonApi from "../../../../utils/https/common" |
||||
|
Page({ |
||||
|
|
||||
|
/** |
||||
|
* 页面的初始数据 |
||||
|
*/ |
||||
|
data: { |
||||
|
id:null, |
||||
|
types:[], |
||||
|
typeIndex:-1, |
||||
|
title:"", |
||||
|
img:null, |
||||
|
desc:"", |
||||
|
date:null, |
||||
|
address:"" |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面加载 |
||||
|
*/ |
||||
|
onLoad: function (options) { |
||||
|
this.setData({ |
||||
|
id:options.id |
||||
|
}) |
||||
|
commonApi.user_post('actonline/act_online/getActTypeList',{ |
||||
|
act_id:options.id |
||||
|
}).then(res=>{ |
||||
|
this.setData({ |
||||
|
types:res.data |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
changeType:function(e){ |
||||
|
this.setData({ |
||||
|
typeIndex:e.detail.value |
||||
|
}) |
||||
|
}, |
||||
|
changeTitle:function(e){ |
||||
|
this.setData({ |
||||
|
title:e.detail.value |
||||
|
}) |
||||
|
}, |
||||
|
changeContent:function(e){ |
||||
|
this.setData({ |
||||
|
desc:e.detail.value |
||||
|
}) |
||||
|
}, |
||||
|
uploadImg:function(){ |
||||
|
let that = this; |
||||
|
wx.chooseImage({ |
||||
|
count: 1, |
||||
|
sizeType: ['original', 'compressed'], |
||||
|
sourceType: ['album', 'camera'], |
||||
|
success (res) { |
||||
|
// tempFilePath可以作为img标签的src属性显示图片
|
||||
|
const tempFilePaths = res.tempFilePaths[0] |
||||
|
if(tempFilePaths.substr(tempFilePaths.length-4,4)=='.gif'){ |
||||
|
wx.showToast({ |
||||
|
title: '图片格式错误', |
||||
|
icon:'none' |
||||
|
}) |
||||
|
return; |
||||
|
} |
||||
|
wx.showLoading({ |
||||
|
title: '图片上传中,请稍后' |
||||
|
}) |
||||
|
wx.uploadFile({ |
||||
|
url: 'https://api.cloud.sz-trip.com/api/pbservice.other/upload', //这里是上传的服务器地址
|
||||
|
filePath: tempFilePaths, |
||||
|
header:{ |
||||
|
token: wx.getStorageSync('jstrip_token'), |
||||
|
}, |
||||
|
name: "file", |
||||
|
success: function (res) { |
||||
|
var res = JSON.parse(res.data); |
||||
|
let img = res.data.url; |
||||
|
that.setData({ |
||||
|
img:img |
||||
|
}) |
||||
|
wx.hideLoading(); |
||||
|
}, |
||||
|
fail:function(res){ |
||||
|
wx.hideLoading(); |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
bindDateChange:function(e){ |
||||
|
this.setData({ |
||||
|
date:e.detail.value |
||||
|
}) |
||||
|
}, |
||||
|
changeAddress:function(e){ |
||||
|
this.setData({ |
||||
|
address:e.detail.value |
||||
|
}) |
||||
|
}, |
||||
|
submit:function(){ |
||||
|
if(!this.data.title){ |
||||
|
wx.showToast({ |
||||
|
title: '请输入作品标题', |
||||
|
icon:'none' |
||||
|
}) |
||||
|
return; |
||||
|
} |
||||
|
if(this.getCNLen(this.data.title)>30){ |
||||
|
wx.showToast({ |
||||
|
title: '作品标题过长', |
||||
|
icon:'none' |
||||
|
}) |
||||
|
return; |
||||
|
} |
||||
|
if(this.data.typeIndex==-1){ |
||||
|
wx.showToast({ |
||||
|
title: '请选择分类', |
||||
|
icon:'none' |
||||
|
}) |
||||
|
return; |
||||
|
} |
||||
|
if(!this.data.date){ |
||||
|
wx.showToast({ |
||||
|
title: '请选择拍摄时间', |
||||
|
icon:'none' |
||||
|
}) |
||||
|
return; |
||||
|
} |
||||
|
if(!this.data.address){ |
||||
|
wx.showToast({ |
||||
|
title: '请输入您所上传照片的拍摄地点', |
||||
|
icon:'none' |
||||
|
}) |
||||
|
return; |
||||
|
} |
||||
|
if(!this.data.img){ |
||||
|
wx.showToast({ |
||||
|
title: '请上传图片', |
||||
|
icon:'none' |
||||
|
}) |
||||
|
return; |
||||
|
} |
||||
|
if(!this.data.desc){ |
||||
|
wx.showToast({ |
||||
|
title: '请输入作品描述', |
||||
|
icon:'none' |
||||
|
}) |
||||
|
return; |
||||
|
} |
||||
|
if(this.getCNLen(this.data.desc)>600){ |
||||
|
wx.showToast({ |
||||
|
title: '作品描述过长', |
||||
|
icon:'none' |
||||
|
}) |
||||
|
return; |
||||
|
} |
||||
|
commonApi.user_post("actonline/act_online/uploadWork",{ |
||||
|
title:this.data.title, |
||||
|
img:this.data.img, |
||||
|
desc:this.data.desc, |
||||
|
type_id:this.data.types[this.data.typeIndex].id, |
||||
|
id:this.data.id, |
||||
|
shot_time:this.data.date, |
||||
|
shot_address:this.data.address |
||||
|
}).then(res=>{ |
||||
|
if(res.code==1){ |
||||
|
wx.navigateTo({ |
||||
|
url: '../uploadres/index?id='+this.data.id |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
getCNLen:function(str){ |
||||
|
var len = 0; |
||||
|
for (var i=0; i<str.length; i++) { |
||||
|
if (str.charCodeAt(i)>127 || str.charCodeAt(i)==94) { |
||||
|
len += 2; |
||||
|
} else { |
||||
|
len ++; |
||||
|
} |
||||
|
} |
||||
|
return len; |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面初次渲染完成 |
||||
|
*/ |
||||
|
onReady: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面显示 |
||||
|
*/ |
||||
|
onShow: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面隐藏 |
||||
|
*/ |
||||
|
onHide: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面卸载 |
||||
|
*/ |
||||
|
onUnload: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面相关事件处理函数--监听用户下拉动作 |
||||
|
*/ |
||||
|
onPullDownRefresh: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面上拉触底事件的处理函数 |
||||
|
*/ |
||||
|
onReachBottom: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 用户点击右上角分享 |
||||
|
*/ |
||||
|
onShareAppMessage: function () { |
||||
|
|
||||
|
} |
||||
|
}) |
||||
@ -0,0 +1,5 @@ |
|||||
|
{ |
||||
|
"usingComponents": { |
||||
|
"title":"/pages/component/TitleHeader" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,38 @@ |
|||||
|
<!--pages/activity/huawei/upload/index.wxml--> |
||||
|
<title title="作品上传"></title> |
||||
|
<image class="topimg" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/uploadtop.png" mode="widthFix"></image> |
||||
|
<view class="input-box"> |
||||
|
<view class="input-item"> |
||||
|
<text>作品标题</text> |
||||
|
<input type="text" bindinput="changeTitle" placeholder="标题长度限制15个中文字符" /> |
||||
|
</view> |
||||
|
<view class="input-item"> |
||||
|
<text>选择分类</text> |
||||
|
<picker mode="selector" value="{{typeIndex}}" range="{{types}}" range-key="title" bindchange="changeType"> |
||||
|
<view class="picker"> |
||||
|
<view class="areatext">{{typeIndex==-1?'请选择':types[typeIndex].title}}</view> |
||||
|
<view class="iconfont icon-xia"></view> |
||||
|
</view> |
||||
|
</picker> |
||||
|
</view> |
||||
|
<view class="input-item"> |
||||
|
<text>拍摄时间</text> |
||||
|
<picker mode="date" value="{{date}}" start="2015-09-01" end="2022-09-01" bindchange="bindDateChange"> |
||||
|
<view class="picker"> |
||||
|
<view class="areatext">{{!date?'请选择':date}}</view> |
||||
|
<view class="iconfont icon-xia"></view> |
||||
|
</view> |
||||
|
</picker> |
||||
|
</view> |
||||
|
<view class="input-item"> |
||||
|
<text>拍摄地点</text> |
||||
|
<input type="text" bindinput="changeAddress" placeholder="请输入您所上传照片的拍摄地点" /> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="tip1">上传图片</view> |
||||
|
<image wx:if="{{img}}" class="uploadimg" bindtap="uploadImg" src="{{img}}" mode="aspectFill"></image> |
||||
|
<image wx:else class="uploadimg" bindtap="uploadImg" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/uploadimg.png" mode="widthFix"></image> |
||||
|
<view class="tip1">作品描述</view> |
||||
|
<textarea bindinput="changeContent" placeholder="请添加您作品的描述(最多300字)" class="textarea"></textarea> |
||||
|
<image bindtap="submit" class="uploadbtn" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/uploadbtn.png" mode="widthFix"></image> |
||||
|
<view class="tip2">一个分类的作品多次提交,平台只保留最近上传的作品</view> |
||||
@ -0,0 +1,112 @@ |
|||||
|
/* pages/activity/huawei/upload/index.wxss */ |
||||
|
.topimg { |
||||
|
display: block; |
||||
|
width: 100%; |
||||
|
} |
||||
|
page { |
||||
|
background: #F7F7F7; |
||||
|
} |
||||
|
.input-box { |
||||
|
margin: 0 24rpx; |
||||
|
margin-top: -60rpx; |
||||
|
position: relative; |
||||
|
z-index: 1; |
||||
|
border-radius: 7rpx; |
||||
|
background: white; |
||||
|
padding: 32rpx 28rpx; |
||||
|
font-size: 31rpx; |
||||
|
color: #333333; |
||||
|
} |
||||
|
.input-item { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
justify-content: space-between; |
||||
|
font-size: 24rpx; |
||||
|
margin-bottom: 27rpx; |
||||
|
} |
||||
|
.input-box text { |
||||
|
margin-right: 20rpx; |
||||
|
flex-shrink: 0; |
||||
|
font-size: 31rpx; |
||||
|
} |
||||
|
.input-box input { |
||||
|
width: 483rpx; |
||||
|
height: 80rpx; |
||||
|
line-height: 80rpx; |
||||
|
box-sizing: border-box; |
||||
|
display: block; |
||||
|
padding: 0 15rpx; |
||||
|
border: 1rpx solid #CCCCCC; |
||||
|
border-radius: 4rpx; |
||||
|
} |
||||
|
.input-box .input-item:last-child{ |
||||
|
margin-bottom: 0; |
||||
|
} |
||||
|
.picker { |
||||
|
display: flex; |
||||
|
width: 483rpx; |
||||
|
height: 80rpx; |
||||
|
box-sizing: border-box; |
||||
|
padding-left: 15rpx; |
||||
|
border: 1rpx solid #CCCCCC; |
||||
|
border-radius: 4rpx; |
||||
|
align-items: center; |
||||
|
justify-content: space-between; |
||||
|
} |
||||
|
.picker .iconfont { |
||||
|
width: 80rpx; |
||||
|
text-align: center; |
||||
|
line-height: 80rpx; |
||||
|
border-left: 1rpx solid #CCCCCC; |
||||
|
flex-shrink: 0; |
||||
|
} |
||||
|
.picker .areatext { |
||||
|
flex: 1; |
||||
|
} |
||||
|
.tip1 { |
||||
|
font-size: 36rpx; |
||||
|
padding-left: 52rpx; |
||||
|
margin-top: 46rpx; |
||||
|
margin-bottom: 26rpx; |
||||
|
position: relative; |
||||
|
line-height: 33rpx; |
||||
|
} |
||||
|
.tip1::before { |
||||
|
content:"1"; |
||||
|
font-size: 0; |
||||
|
position: absolute; |
||||
|
width: 10rpx; |
||||
|
height: 33rpx; |
||||
|
left: 24rpx; |
||||
|
top: 0; |
||||
|
background: linear-gradient(0deg, rgba(251, 197, 34, 0.93), rgba(255, 252, 0, 0.93)); |
||||
|
} |
||||
|
.uploadimg { |
||||
|
display: block; |
||||
|
margin-left: 24rpx; |
||||
|
width: 249rpx; |
||||
|
height: 191rpx; |
||||
|
margin-bottom: 50rpx; |
||||
|
} |
||||
|
.textarea { |
||||
|
font-size: 24rpx; |
||||
|
margin: 24rpx; |
||||
|
padding: 20rpx 30rpx; |
||||
|
border-radius: 7rpx; |
||||
|
background: white; |
||||
|
display: block; |
||||
|
height: 230rpx; |
||||
|
width: 640rpx; |
||||
|
} |
||||
|
.uploadbtn { |
||||
|
display: block; |
||||
|
margin: 40rpx auto; |
||||
|
width: 558rpx; |
||||
|
height: 104rpx; |
||||
|
} |
||||
|
.tip2 { |
||||
|
text-align: center; |
||||
|
font-size: 24rpx; |
||||
|
color: #b2b2b2; |
||||
|
padding-bottom: 40rpx; |
||||
|
} |
||||
@ -0,0 +1,78 @@ |
|||||
|
// pages/activity/huawei/uploadres/index.js
|
||||
|
Page({ |
||||
|
|
||||
|
/** |
||||
|
* 页面的初始数据 |
||||
|
*/ |
||||
|
data: { |
||||
|
id:null |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面加载 |
||||
|
*/ |
||||
|
onLoad: function (options) { |
||||
|
this.setData({ |
||||
|
id:options.id |
||||
|
}) |
||||
|
}, |
||||
|
gotoPath:function(e){ |
||||
|
wx.navigateTo({ |
||||
|
url: e.currentTarget.dataset.path, |
||||
|
}) |
||||
|
}, |
||||
|
backhome:function(){ |
||||
|
wx.switchTab({ |
||||
|
url: '/pages/index/index' |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面初次渲染完成 |
||||
|
*/ |
||||
|
onReady: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面显示 |
||||
|
*/ |
||||
|
onShow: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面隐藏 |
||||
|
*/ |
||||
|
onHide: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面卸载 |
||||
|
*/ |
||||
|
onUnload: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面相关事件处理函数--监听用户下拉动作 |
||||
|
*/ |
||||
|
onPullDownRefresh: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面上拉触底事件的处理函数 |
||||
|
*/ |
||||
|
onReachBottom: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 用户点击右上角分享 |
||||
|
*/ |
||||
|
onShareAppMessage: function () { |
||||
|
|
||||
|
} |
||||
|
}) |
||||
@ -0,0 +1,5 @@ |
|||||
|
{ |
||||
|
"usingComponents": { |
||||
|
"title":"/pages/component/TitleHeader" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,8 @@ |
|||||
|
<!--pages/activity/huawei/uploadres/index.wxml--> |
||||
|
<title title="上传成功"></title> |
||||
|
<image class="logo" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/uploadres.png" mode="widthFix"></image> |
||||
|
<view class="tip1">恭喜您的作品已上传完成!</view> |
||||
|
<image class="btnimg" bindtap="backhome" data-path="/pages/index/index" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/gobtn.png" mode="widthFix"></image> |
||||
|
<image class="btnimg" bindtap="gotoPath" data-path="../list/index?id={{id}}" style="margin-bottom:92rpx" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/huawei/mybtn.png" mode="widthFix"></image> |
||||
|
<view class="tip2">通过第一轮评审的摄影作品将在9月1号后</view> |
||||
|
<view class="tip2">进行线上展示,请注意查看平台通知</view> |
||||
@ -0,0 +1,26 @@ |
|||||
|
/* pages/activity/huawei/uploadres/index.wxss */ |
||||
|
.logo { |
||||
|
display: block; |
||||
|
margin: 64rpx auto; |
||||
|
width: 414rpx; |
||||
|
height: 393rpx; |
||||
|
} |
||||
|
.tip1 { |
||||
|
font-size: 45rpx; |
||||
|
color: #000000; |
||||
|
font-weight: 500; |
||||
|
margin-bottom: 90rpx; |
||||
|
text-align: center; |
||||
|
} |
||||
|
.btnimg { |
||||
|
display: block; |
||||
|
margin: 24rpx auto; |
||||
|
width: 558rpx; |
||||
|
height: 104rpx; |
||||
|
} |
||||
|
.tip2 { |
||||
|
text-align: center; |
||||
|
font-size: 28rpx; |
||||
|
color: #666; |
||||
|
margin-bottom: 20rpx; |
||||
|
} |
||||
Loading…
Reference in new issue