Pārlūkot izejas kodu

上传文件至 'hangout-master/Pages/HGBot/Vote/received'

master
曹天怡 pirms 2 gadiem
vecāks
revīzija
ae2556ca90
4 mainītis faili ar 206 papildinājumiem un 0 dzēšanām
  1. +92
    -0
      hangout-master/Pages/HGBot/Vote/received/received.js
  2. +3
    -0
      hangout-master/Pages/HGBot/Vote/received/received.json
  3. +36
    -0
      hangout-master/Pages/HGBot/Vote/received/received.wxml
  4. +75
    -0
      hangout-master/Pages/HGBot/Vote/received/received.wxss

+ 92
- 0
hangout-master/Pages/HGBot/Vote/received/received.js Parādīt failu

@ -0,0 +1,92 @@
// Pages/HGBot/Vote/recevied/recevied.js
Page({
/**
* 页面的初始数据
*/
data: {
userName:"洗后提",
array:[1,2]
},
checkboxChange(e) {
console.log('checkbox发生change事件,携带value值为:', e.detail.value)
const items = this.data.array
const values = e.detail.value
for (let i = 0, lenI = items.length; i < lenI; ++i) {
items[i].checked = false
for (let j = 0, lenJ = values.length; j < lenJ; ++j) {
if (items[i].value === values[j]) {
items[i].checked = true
break
}
}
}
},
onAdd: function(){
const length = this.data.array.length
this.data.array = this.data.array.concat([length + 1])
this.setData({
array:this.data.array
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

+ 3
- 0
hangout-master/Pages/HGBot/Vote/received/received.json Parādīt failu

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

+ 36
- 0
hangout-master/Pages/HGBot/Vote/received/received.wxml Parādīt failu

@ -0,0 +1,36 @@
<!--Pages/HGBot/Vote/recevied/recevied.wxml-->
<!--TODO: 更改文字,后期实现从服务器获得其他用户设定的投票选项-->
<view class="ques">
<view> 憨憨,这是 {{userName}}</view>
<view style="padding: 0;margin: 0;height: 25px;"></view>
<view>发起的投票喔</view>
</view>
<view class="sent">
选项是这些,请选择吧!
</view>
<view class="choice">
<view style="display: flex; margin-bottom: 15px;" wx:for="{{array}}" wx:key="*this">
{{item}} 、
<text id="{{item}}" style="height: 28px;width: 180px;"></text>
<label class="check">
<checkbox value="cb" bindtap="checkboxChange"></checkbox>
</label>
</view>
</view>
<view class="add">
<button bindtap="onAdd">
<image src="../../../../asset/img/icon-add.png" style="align-items: center;"></image>
</button>
</view>
<view>
<button class="button" bindtap="onOK">好了</button>
</view>
<view>
<image src="../../../../asset/img/hangou1.png" mode="heightFix" class="hg"></image>
</view>

+ 75
- 0
hangout-master/Pages/HGBot/Vote/received/received.wxss Parādīt failu

@ -0,0 +1,75 @@
/* Pages/HGBot/Vote/Vote.wxss */
@import "/Pages/HGBot/Home/Home.wxss";
.ques{
margin-top: 15%;
font-size: 22px;
text-align: center;
justify-self: center;
align-items: center;
color: #000;
}
.sent{
padding: 10px;
margin-top: 20px;
margin-left: 5%;
font-size: 22px;
text-align: center;
color: #000;
}
.choice{
padding: 10px;
font-size: 23px;
align-items: center;
justify-content: center;
margin-left: 20%;
color: #000;
}
.add{
display: flex;
padding-left: 20%;
margin-left: 5px;
}
.add button{
color: #d8caaf;
padding: 0;
margin: 0;
background-color: inherit;
}
.add button:after{
content: 0;
}
.add button::after{
border: 0;
}
.add image{
width: 23.25px;
height:23.25px;
}
.button{
display:flex;
align-items: center;
justify-content: center;
width: 102px;
height: 42px;
background: #d8caaf;
font-size: 22px;
text-align: center;
color: #000;
}
.hg{
position: sticky;
align-items: center;
justify-content: center;
text-align: center;
padding-top: 20px;
}

Notiek ielāde…
Atcelt
Saglabāt