Commit 6bdaefe5c1d297cf2c02ae92e128d4cc1efa5c95

Authored by zhangyan
1 parent eaf3db4a

no message

... ... @@ -12,6 +12,9 @@
"pages/person/person",
"pages/person/p_list",
"pages/person/p_photo",
"pages/pet/p_detail",
"pages/pet/p_edit",
"pages/pet/p_add",
"pages/topic/t_list",
"pages/topic/t_detail",
"pages/activity/a_list"
... ...
<view class="top-tab flex-cm bg-white fixed left top">
<block wx:for="{{list}}">
<view class="font28r {{item.isactive==true ? 'white-font tab-block-active' : 'orange-font'}} top-tab-block flex-cm {{index!=2 ? 'border-right-none' : ''}}">{{item.title}}</view>
<view class="font30r {{item.isactive==true ? 'orange-font' : 'black-font'}} top-tab-block flex-cm {{index!=2 ? 'border-right-none' : ''}}">{{item.title}}</view>
</block>
</view>
\ No newline at end of file
... ...
@import '../../app.wxss'
.top-tab{
width:100%;
height:100rpx;
height:80rpx;
padding:0 20rpx;
padding-bottom:20rpx;
/*padding-bottom:20rpx;*/
box-sizing:border-box;
z-index:99;
border-bottom:1px solid #efeef3;
}
.top-tab-block{
padding:0 24rpx;
padding:0 50rpx;
height:60rpx;
border:1px solid #fcb34c;
/*border:1px solid #fcb34c;*/
box-sizing:border-box;
}
.border-right-none{
... ...
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1541663173031" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5327" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M725.290667 405.248a192 192 0 0 1-170.666667 190.677333v86.656h74.666667c5.973333 0 10.666667 4.693333 10.666666 10.666667v21.333333c0 5.973333-4.693333 10.666667-10.666666 10.666667h-74.666667v74.666667c0 5.973333-4.693333 10.666667-10.666667 10.666666h-21.333333c-5.973333 0-10.666667-4.693333-10.666667-10.666666v-74.666667h-74.666666c-5.973333 0-10.666667-4.693333-10.666667-10.666667v-21.333333c0-5.973333 4.693333-10.666667 10.666667-10.666667h74.666666v-86.656A191.872 191.872 0 0 1 341.930667 389.546667c7.338667-90.666667 79.36-164.992 169.386666-175.018667a191.829333 191.829333 0 0 1 213.973334 190.677333z m-341.333334 0c0 82.346667 66.986667 149.333333 149.333334 149.333333s149.333333-66.986667 149.333333-149.333333-66.986667-149.333333-149.333333-149.333333-149.333333 66.986667-149.333334 149.333333z" fill="#fe9401" p-id="5328"></path></svg>
\ No newline at end of file
... ...
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1541667732058" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="42357" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M974.4 936H46.4c-19.2 0-38.4 19.2-38.4 38.4s19.2 38.4 38.4 38.4h928c19.2 0 38.4-19.2 38.4-38.4s-12.8-38.4-38.4-38.4z m-704-134.4l262.4-115.2c6.4 0 6.4-6.4 12.8-6.4l448-448c32-32 32-83.2 0-115.2l-89.6-83.2c-32-32-83.2-32-115.2 0l-448 448-6.4 6.4-115.2 262.4c-6.4 12.8 0 32 6.4 38.4s25.6 19.2 44.8 12.8z m576-710.4l89.6 89.6-70.4 70.4-89.6-89.6 70.4-70.4z m-441.6 441.6l313.6-313.6 89.6 89.6-313.6 307.2-153.6 64 64-147.2z" p-id="42358" fill="#999999"></path></svg>
\ No newline at end of file
... ...
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1541665316620" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="33199" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M234.4 638.48a286.8 180.4 0 1 0 573.6 0 286.8 180.4 0 1 0-573.6 0Z" p-id="33200" fill="#fcb34c"></path><path d="M194.36337 443.657856a70.88 46.8 60 1 0 81.059978-46.8 70.88 46.8 60 1 0-81.059978 46.8Z" p-id="33201" fill="#fcb34c"></path><path d="M344.939931 341.85791a86.24 59.44 79.43 1 0 116.862789-21.80695 86.24 59.44 79.43 1 0-116.862789 21.80695Z" p-id="33202" fill="#fcb34c"></path><path d="M613.230287 403.430056a62.56 106.56 7.63 1 0 28.297087-211.233069 62.56 106.56 7.63 1 0-28.297087 211.233069Z" p-id="33203" fill="#fcb34c"></path><path d="M758.202431 487.453064a45.92 77.76 30 1 0 77.76-134.684271 45.92 77.76 30 1 0-77.76 134.684271Z" p-id="33204" fill="#fcb34c"></path></svg>
\ No newline at end of file
... ...
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1541389691470" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4927" xmlns:xlink="http://www.w3.org/1999/xlink" width="64" height="64"><defs><style type="text/css"></style></defs><path d="M898.2 155.8C649.2 308.6 468.5 501.5 387 598.2L187.9 442.1l-88 70.9 343.7 349.8c59-151.6 246.6-447.7 475.5-658.2l-20.9-48.8" p-id="4928" fill="#fcb34c"></path></svg>
\ No newline at end of file
... ...
<!--<topTab></topTab>-->
<view class="banner">
<swiper>
<block wx:for="{{banners}}">
... ... @@ -136,12 +135,12 @@
</view>
<view class="menu fixed" style="right:{{menuright}}rpx;bottom:{{menubottom}}rpx;" catchtouchmove="menumove">
<!--<view class="menu fixed" style="right:{{menuright}}rpx;bottom:{{menubottom}}rpx;" catchtouchmove="menumove">
<view class="black-font font-siny font24r flex-cm menu-menu" style="background:#fff;"bindtap="menushow">菜单</view>
<view class="white-font font-siny font24r flex-cm menu-scale {{isshow==true ? 'menu-team' : 'menu-hide'}}" bindtap="team">组队</view>
<view class="white-font font-siny font24r flex-cm menu-scale {{isshow==true ? 'menu-home' : 'menu-hide'}}" bindtap="home">社区</view>
<view class="white-font font-siny font24r flex-cm menu-scale {{isshow==true ? 'menu-sort' : 'menu-hide'}}" bindtap="sort">榜单</view>
</view>
</view>-->
<tabbar></tabbar>
\ No newline at end of file
... ...
... ... @@ -32,10 +32,10 @@ Page({
title:'粉丝',
count:100,
},
{
title:'卡券',
count:2,
},
// {
// title:'卡券',
// count:2,
// },
{
title:'积分',
count:200,
... ... @@ -61,5 +61,10 @@ Page({
})
}
}
},
petdetail:function () {
wx.navigateTo({
url:'../pet/p_detail'
})
}
})
\ No newline at end of file
... ...
<!--<view class="person-info flex-lr">
<view class="flex-vl">
<view class="black-font font38r font-bold flex-lm">喵玖铲屎官 <image src="http://qn.colorcun.com/ac/bianji.png" style="width:30rpx; height:30rpx;margin-left:14rpx;"></image></view>
<view class="flex-lt" style="margin-top:30rpx;">
<view class="person-fan gray-deep-font font22r font-siny flex-cm">关注 20</view>
<view class="person-fan gray-deep-font font22r font-siny flex-cm">粉丝 198</view>
</view>
</view>
<image src="/pages/image/topic3.jpg" class="person-headimg"></image>
</view>
<view class="setting flex-lr">
<block wx:for="{{setting}}">
<view class="flex-vc">
<image src="{{item.iconurl}}" class="setting-icon"></image>
<view class="gray-deep-font font26r font-siny">{{item.title}}</view>
</view>
</block>
</view>-->
<!--<view class="cut"></view>-->
<!--<view class="person-pet">
<view class="font34r font-bold black-font flex-lr" style="padding:40rpx 0;">
<view>我的爱宠</view>
<image src="/pages/image/add.svg" class="add-icon"></image>
</view>
<block wx:for="{{blocks}}">
<view class="flex-lm person-pet-block">
<image src="/pages/image/topic3.jpg" class="pet-headimg"></image>
<view class="flex-vl">
<view class="black-font font30r font-bold">美琪琪</view>
<view class="gray-deep-font font24r font-siny" style="line-height:1.5;margin-top:20rpx;">作为一只金毛mm,保持傲娇绝对是她的生活状态!</view>
</view>
</view>
</block>
</view>-->
<!--<view class="person-pet">
<view class="font34r font-bold black-font" style="padding:40rpx 0;">生活相册</view>
<view class="pet-picture flex-lrt">
<view class="pet-picture-block">
<block wx:for="{{blocks}}">
<block wx:if="{{index%2==0}}">
<image src="/pages/image/{{item}}.jpg" class="pet-picture-image" mode="widthFix"></image>
</block>
</block>
</view>
<view class="pet-picture-block">
<block wx:for="{{blocks}}">
<block wx:if="{{index%2==1}}">
<image src="/pages/image/{{item}}.jpg" class="pet-picture-image" mode="widthFix"></image>
</block>
</block>
</view>
</view>
</view>-->
<view class="me">
<view class="me-top">
<view class="flex-lr">
... ... @@ -91,9 +37,9 @@
</view>
<view class="my-pet-list flex-vl">
<block wx:for="{{blocks}}">
<view class="flex-lm my-pet-block">
<view class="flex-lm my-pet-block" bindtap="petdetail">
<view>
<image src="/pages/image/topic2.jpg" style="width:120rpx;height:120rpx;border-radius:50%;margin-right:20rpx;"></image>
<image src="/pages/image/topic2.jpg" style="width:120rpx;height:120rpx;border-radius:50%;margin-right:20rpx;"></image>
</view>
<view class="flex-vl">
<view class="black-font font30r font-bold">小煎包</view>
... ...
page{
background:#f7f7f7;
}
.person-info{
width:690rpx;
padding:60rpx 0;
margin:0 auto;
}
.person-fan{
height:38rpx;
padding:0 20rpx;
border-radius:6rpx;
background:#f7f7f7;
margin-right:20rpx;
}
.person-headimg{
width:140rpx;
height:140rpx;
border-radius:50%;
}
.setting{
width:690rpx;
margin:30rpx auto;
padding:25rpx 0;
border-top:1px dotted #666;
border-bottom:1px dotted #666;
}
.setting-icon{
width:50rpx;
height:50rpx;
margin-bottom:20rpx;
}
.cut{
width:100%;
height:20rpx;
background:#f7f7f7;
}
.person-pet{
width:100%;
padding:0 30rpx;
box-sizing:border-box;
}
.add-icon{
width:50rpx;
height:50rpx;
}
swiper{
width:100%;
height:240rpx;
}
swiper-item{
width:440rpx!important;
}
.person-pet-block{
width:690rpx;
heigth:200rpx;
margin-right:40rpx;
border-radius:14rpx;
/*box-shadow:1px 1px 5px rgba(0,0,0,.2);*/
padding:30rpx;
box-sizing:border-box;
margin-bottom:30rpx;
}
.pet-headimg{
width:140rpx;
height:140rpx;
border-radius:50%;
margin-right:20rpx;
}
.pet-picture-block{
width:330rpx;
}
.pet-picture-image{
width:100%;
margin-bottom:30rpx;
border-radius:12rpx;
}
.me-top{
width:100%;
... ...
var comfun = require('../../comjs/comfun.js');
Page({
data:{
kindlist:[
{
image:'/pages/image/topic1.jpg',
kindtitle:'猫咪',
type:'cat',
isactive:false
},
{
image:'/pages/image/topic3.jpg',
kindtitle:'狗狗',
type:'dog',
isactive:false
},
],
petkind:{
cat:{
}
[
{
title:"折耳猫",
imageurl:""
},
{
title:"英国短毛猫",
imageurl:""
},
{
title:"美国短毛猫",
imageurl:""
},
{
title:"波斯猫",
imageurl:""
},
{
title:"加菲猫",
imageurl:""
},
{
title:"斯芬克斯猫",
imageurl:""
},
{
title:"布偶猫",
imageurl:""
},
{
title:"暹罗猫",
imageurl:""
},
{
title:"狸花猫",
imageurl:""
},
{
title:"矮脚猫",
imageurl:""
},
],
dog:[
{
title:"泰迪",
imageurl:""
},
{
title:"博美",
imageurl:""
},
{
title:"金毛",
imageurl:""
},
{
title:"哈士奇",
imageurl:""
},
{
title:"萨摩",
imageurl:""
},
{
title:"阿拉斯加",
imageurl:""
},
{
title:"比熊",
imageurl:""
},
{
title:"拉布拉多",
imageurl:""
},
{
title:"八哥犬",
imageurl:""
},
{
title:"牧羊犬",
imageurl:""
},
{
title:"柯基",
imageurl:""
},
{
title:"柴犬",
imageurl:""
},
]
},
},
onLoad:function () {
comfun.setBarTitle('添加宠物')
},
onShow:function () {
},
selectkind:function (e) {
var type=e.currentTarget.dataset.type;
var kindlist=this.data.kindlist;
kindlist.forEach(function (v,i) {
v.isactive=false;
if(v.type==type){
v.isactive=true
}
})
this.setData({
kindlist:kindlist,
pettype:type,
})
},
afterstep:function () {
this.setData({
petlist:this.data.petkind[this.data.pettype]
})
}
})
\ No newline at end of file
... ...
{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle":"black"
}
\ No newline at end of file
... ...
<view class="pet-kind fixed left bottom top">
<view class="pet-kind-list flex-vc">
<block wx:for="{{kindlist}}">
<view class="kind-pet flex-vc" bindtap="selectkind" data-type="{{item.type}}">
<view class="kind-pet-des" style="border:{{item.isactive==true ? '2px solid #fcb34c' : 0}};"><image src="{{item.image}}" class="kind-pet-img"></image></view>
<view class="{{item.isactive==true ? 'orange-font' : 'black-font'}} font34r">{{item.kindtitle}}</view>
</view>
</block>
</view>
<view class="pet-after-button bg-orange white-font font32r left right flex-cm" bindtap="afterstep">下一步</view>
</view>
<block wx:if="{{petlist}}">
<view class="pet-kind fixed left bottom top bg-white pet-kind-after">
<view class="gray-deep-font font30r pet-kind-select">选择宠物品种</view>
<view class="pet-kind-kind flex-rs">
<block wx:for="{{petlist}}">
<view class="pet-kind-single flex-vc">
<view>
<image src="/pages/image/topic3.jpg" class="pet-kind-image"></image>
</view>
<view class="black-font font28r">{{item.title}}</view>
</view>
</block>
</view>
</view>
</block>
\ No newline at end of file
... ...
.pet-kind{
width:100%;
}
.pet-kind-list{
width:100%;
height:60%;
}
.kind-pet{
padding:80rpx 0;
}
.kind-pet-des{
width:160rpx;
height:160rpx;
padding:10rpx;
border-radius:50%;
margin-bottom:30rpx;
}
.kind-pet-img{
width:160rpx;
height:160rpx;
border-radius:50%;
}
.pet-after-button{
width:560rpx;
height:80rpx;
position:absolute;
bottom:200rpx;
margin:0 auto;
border-radius:10rpx;
}
.pet-kind-select{
width:100%;
padding:0 30rpx 60rpx;
box-sizing:border-box;
}
.pet-kind-after{
}
.pet-kind-kind{
width:680rpx;
margin:0 auto;
}
.pet-kind-single{
width:170rpx;
margin-bottom:50rpx;
}
.pet-kind-image{
width:130rpx;
height:130rpx;
border-radius:50%;
margin-bottom:20rpx;
}
... ...
var comfun = require('../../comjs/comfun.js');
Page({
data:{
},
onLoad:function () {
comfun.setBarTitle('宠物详情')
},
onShow:function () {
},
petdetail:function () {
wx.navigateTo({
url:'p_edit'
})
}
})
\ No newline at end of file
... ...
{}
\ No newline at end of file
... ...
<view class="pet-list bg-white">
<image class="pet-headimg" src="/pages/image/topic3.jpg"></image>
</view>
<view class="pet-info">
<view class="pet-name-sex flex-cm">
<view class="black-font font36r font-bold">小煎包</view>
<image src="/pages/image/female.svg" class="pet-sex"></image>
</view>
<view class="pet-other-single flex-lm">
<image src="/pages/image/pet-foot.svg" class="pet-food-icon"></image>
<view class="black-font font28r">年龄:1岁半</view>
</view>
<view class="pet-other-single flex-lm">
<image src="/pages/image/pet-foot.svg" class="pet-food-icon"></image>
<view class="black-font font28r">体重:6kg</view>
</view>
<view class="pet-other-single flex-lm">
<image src="/pages/image/pet-foot.svg" class="pet-food-icon"></image>
<view class="black-font font28r">种类:拉布拉多</view>
</view>
<view class="pet-edit" bindtap="petdetail">
<image src="/pages/image/pet-edit.svg" class="edit-icon"></image>
</view>
</view>
... ...
page{
overflow:hidden;
}
.pet-list{
width:800rpx;
height:800rpx;
border-radius:50%;
box-shadow:0 0 5px rgba(0,0,0,.2);
position:relative;
margin-top:-540rpx;
margin-left:-25rpx;
z-index:2;
}
.pet-name-sex{
width:100%;
padding-top:16rpx;
margin-bottom:40rpx;
}
.pet-sex{
width:46rpx;
height:46rpx;
margin-left:2rpx;
}
.pet-headimg{
width:120rpx;
height:120rpx;
border-radius:50%;
position:absolute;
left:0;
right:0;
margin:0 auto;
bottom:-50rpx;
}
.pet-info{
width:280rpx;
height:380rpx;
padding:60rpx 40rpx;
box-sizing:border-box;
margin:0 auto;
box-shadow:0 0 5px rgba(0,0,0,.2);
border-bottom-left-radius:60rpx;
border-top-left-radius:100rpx;
border-top-right-radius:100rpx;
position:relative;
}
.pet-other-single{
height:60rpx;
position:relative;
}
.pet-food-icon{
width:56rpx;
height:56rpx;
position:absolute;
left:0;
top:-4rpx;
z-index:-1;
}
.pet-edit{
width:76rpx;
height:76rpx;
padding:20rpx;
position:absolute;
top:110rpx;
right:-40rpx;
}
.edit-icon{
width:36rpx;
height:36rpx;
}
\ No newline at end of file
... ...
var comfun = require('../../comjs/comfun.js');
Page({
data:{
},
onLoad:function () {
comfun.setBarTitle('修改宠物信息')
},
onShow:function () {
},
})
\ No newline at end of file
... ...
{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#fcb34c",
"navigationBarTextStyle":"white"
}
\ No newline at end of file
... ...
<view class="bg-white flex-lr pet-info">
<view class="black-font font28r">头像</view>
<image src="/pages/image/topic3.jpg" class="pet-img"></image>
</view>
<view class="bg-white flex-lr pet-info">
<view class="black-font font28r">昵称</view>
<input placeholder-class="gray-font font28r" value="小煎包" placeholder="请输入宠物昵称" class="black-font font28r" maxlength="5"/>
</view>
<view class="bg-white flex-lr pet-info">
<view class="black-font font28r">年龄</view>
<input placeholder-class="gray-font font28r" value="1岁半" placeholder="请输入宠物年龄" class="black-font font28r"/>
</view>
<view class="bg-white flex-lr pet-info">
<view class="black-font font28r">体重</view>
<view class="flex-rr">
<input placeholder-class="gray-font font28r" value="6" placeholder="请输入宠物体重" class="black-font font28r" type="digit"/>
<view class="black-font font30r">kg</view>
</view>
</view>
<view class="bg-white flex-lr pet-info">
<view class="black-font font28r">种类</view>
<input placeholder-class="gray-font font28r" value="拉布拉多" placeholder="请输入宠物种类" class="black-font font28r" type="text"/>
</view>
<view class="bg-orange white-font font32r save-button flex-cm fixed left bottom">保存</view>
\ No newline at end of file
... ...
page{
background:#efeef3;
}
.pet-info{
width:100%;
padding:30rpx;
box-sizing:border-box;
border-bottom:1px solid #efeef3;
}
.pet-img{
width:100rpx;
height:100rpx;
}
.pet-info input{
text-align:right;
}
.save-button{
width:100%;
height:100rpx;
border-radius:10rpx;
margin:0 auto;
margin-top:120rpx;
}
\ No newline at end of file
... ...
... ... @@ -2,7 +2,7 @@
<!--<view class="banner">
<image src="/pages/image/seller-detail.jpg" class="banner-img"></image>
</view>-->
<view style="height:100rpx;"></view>
<view style="height:80rpx;"></view>
<!--<view class="search flex-cm">
<view class="search-con flex-cm">
<view class="search-image">
... ... @@ -12,14 +12,14 @@
</view>
</view>-->
<view class="seller-list">
<view class="best-info-title flex-cm">
<!--<view class="best-info-title flex-cm">
<view class="best-line bg-black"></view>
<view class="best-react bg-black"></view>
<view class="black-font font34r font-siny" style="margin:0 30rpx;">附近推荐</view>
<view class="best-react bg-black"></view>
<view class="best-line bg-black"></view>
</view>
<swiper next-margin="90rpx" display-multiple-items="2">
</view>-->
<!--<swiper next-margin="90rpx" display-multiple-items="2">
<block wx:for="{{sellericons}}">
<swiper-item>
<view class="recommand-seller">
... ... @@ -31,7 +31,7 @@
</view>
</swiper-item>
</block>
</swiper>
</swiper>-->
<block wx:for="{{sellericons}}">
<view class="flex-lm seller-block" bindtap="sellerdetail">
<image src="/pages/image/pet-seller.jpg" class="seller-image"></image>
... ...
... ... @@ -63,7 +63,7 @@ swiper-item{
height:260rpx;
margin:0 auto;
box-sizing:border-box;
border-radius:10rpx;
/*border-radius:10rpx;*/
/*box-shadow:0 0 5px rgba(0,0,0,.1);*/
border-bottom:1px solid #efeef3;
}
... ... @@ -71,7 +71,7 @@ swiper-item{
width:260rpx;
height:180rpx;
margin-right:30rpx;
border-radius:12rpx;
/*border-radius:12rpx;;*/
}
.seller-book{
height:40rpx;
... ...
Page({
data:{
votelist:['洁癖晚期','一个字"穷"','各有所爱','嫌麻烦','心软害怕失去','其他'],
votelist:[
{
id:1,
title:'洁癖晚期',
selected:false
},
{ id:2,
title:'一个字"穷"',
selected:false
},
{
id:3,
title:'各有所爱',
selected:false
},
{
id:4,
title:'嫌麻烦',
selected:false
},
{
id:5,
title:'心软害怕失去',
selected:false
},
{
id:6,
title:'其他',
selected:false
}
],
voteres:[
{
per:10,
... ... @@ -26,6 +56,41 @@ Page({
per:10,
title:'其他'
},
]
}
],
votehide:true
},
onLoad:function(){
},
onShow:function(){
},
vote:function () {
this.setData({
votehide:!this.data.votehide
})
},
selectreason:function (e) {
var id=e.currentTarget.dataset.id;
var votelist=this.data.votelist;
var vote_name;
votelist.forEach(function (v,i) {
v.selected=false;
if(v.id==id){
v.selected=true;
vote_name=v.title;
}
})
this.setData({
votelist:votelist,
vote_name:vote_name
})
},
voteconfim:function(){
if(this.data.vote_name){
this.vote();
}else{
}
},
})
\ No newline at end of file
... ...
... ... @@ -26,4 +26,18 @@
</view>
</block>
</view>
<view class="vote-act bg-orange white-font font32r fixed left bottom flex-cm">投票</view>
<view class="vote-act bg-orange white-font font32r fixed left bottom flex-cm" bindtap="vote">投票</view>
<view class="vote-mask fixed left right top bottom" hidden="{{votehide}}" bindtap="vote"></view>
<view class="vote-list fixed left bottom bg-white {{votehide==false ? 'vote-list-active' : ''}}">
<block wx:for="{{votelist}}">
<view class="vote-single flex-lr" bindtap="selectreason" data-id="{{item.id}}">
<view class="black-font font30r">{{item.title}}</view>
<view class="vote-right flex-cc">
<block wx:if="{{item.selected==true}}">
<image src="/pages/image/right.svg" class="vote-right-icon"></image>
</block>
</view>
</view>
</block>
<view class="vote-button bg-orange white-font font30r flex-cm" bindtap="voteconfim">确认</view>
</view>
... ...
... ... @@ -81,4 +81,41 @@
width:100%;
height:100rpx;
background:#ffc16a;
}
.vote-mask{
width:100%;
background:rgba(0,0,0,.4);
z-index:999;
}
.vote-list{
width:100%;
padding:40rpx 0 0;
box-sizing:border-box;
box-shadow:0 0 5px rgba(0,0,0,.2);
bottom:-800rpx;
transition:bottom .4s ease;
z-index:1000;
}
.vote-list-active{
bottom:0;
}
.vote-single{
width:100%;
padding:0 80rpx;
box-sizing:border-box;
height:80rpx;
}
.vote-right{
width:30rpx;
height:30rpx;
border:1px solid #ccc;
}
.vote-right-icon{
width:30rpx;
height:30rpx;
}
.vote-button{
width:100%;
height:90rpx;
margin-top:30rpx;
}
\ No newline at end of file
... ...