7 changed files with 256 additions and 1 deletions
Unified View
Diff Options
-
1app.json
-
5pages/home/info/index.js
-
2pages/home/info/index.wxml
-
143pages/home/tab5/index.js
-
7pages/home/tab5/index.json
-
35pages/home/tab5/index.wxml
-
64pages/home/tab5/index.wxss
@ -0,0 +1,143 @@ |
|||||
|
// pages/home/tab5/index.js
|
||||
|
import { |
||||
|
getLategoriesList, |
||||
|
updateUserInfo |
||||
|
} from '../../api/ztb' |
||||
|
const storage = require('../../../utils/storage') |
||||
|
Page({ |
||||
|
|
||||
|
/** |
||||
|
* 页面的初始数据 |
||||
|
*/ |
||||
|
data: { |
||||
|
loopRequesting:false, |
||||
|
form: { |
||||
|
proxyCategoriesTag: [] |
||||
|
}, |
||||
|
categoryListone: [{ |
||||
|
name: '黑卡', |
||||
|
id: '1', |
||||
|
array: [{ |
||||
|
name: '黄纸边', |
||||
|
sid: '1' |
||||
|
}, { |
||||
|
name: '坑卡A', |
||||
|
sid: '2' |
||||
|
}] |
||||
|
}, { |
||||
|
name: '白费', |
||||
|
id: '2', |
||||
|
array: [{ |
||||
|
name: '坑卡B', |
||||
|
sid: '3' |
||||
|
}, { |
||||
|
name: '黄皮纸', |
||||
|
sid: '4' |
||||
|
}] |
||||
|
}, { |
||||
|
name: '特种纸', |
||||
|
id: '3', |
||||
|
array: [{ |
||||
|
name: '坑卡B', |
||||
|
sid: '3' |
||||
|
}, { |
||||
|
name: '黄皮纸', |
||||
|
sid: '4' |
||||
|
}] |
||||
|
}] |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面加载 |
||||
|
*/ |
||||
|
onLoad: function (options) { |
||||
|
this.getLategoriesListFct() |
||||
|
|
||||
|
}, |
||||
|
toMyInfo: function () { |
||||
|
wx.redirectTo({ |
||||
|
url: '/pages/index/index' |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面初次渲染完成 |
||||
|
*/ |
||||
|
onReady: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面显示 |
||||
|
*/ |
||||
|
onShow: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面隐藏 |
||||
|
*/ |
||||
|
onHide: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面卸载 |
||||
|
*/ |
||||
|
onUnload: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面相关事件处理函数--监听用户下拉动作 |
||||
|
*/ |
||||
|
onPullDownRefresh: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 页面上拉触底事件的处理函数 |
||||
|
*/ |
||||
|
onReachBottom: function () { |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 用户点击右上角分享 |
||||
|
*/ |
||||
|
onShareAppMessage: function () { |
||||
|
|
||||
|
}, |
||||
|
backspace: function () { |
||||
|
// console.log('点击返回被触发4')
|
||||
|
wx.redirectTo({ |
||||
|
url: '/pages/home/tab3/index' |
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
getLategoriesListFct: function () { |
||||
|
getLategoriesList({categoryType:1}).then(res => { |
||||
|
this.setData({ |
||||
|
categoryListone:res.data |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
checkboxChange: function (e) { |
||||
|
console.log(e) |
||||
|
this.setData({ |
||||
|
'form.proxyCategoriesTag':e.detail.value |
||||
|
}) |
||||
|
}, |
||||
|
bindtap: function (e) { |
||||
|
console.log(e) |
||||
|
}, |
||||
|
submitForm:function(){ |
||||
|
updateUserInfo(this.data.form).then(result => { |
||||
|
this.data.loopRequesting = false |
||||
|
setTimeout(() => this.toMyInfo(), 1000) |
||||
|
}).catch(err => { |
||||
|
this.data.loopRequesting = false |
||||
|
}) |
||||
|
} |
||||
|
}) |
||||
@ -0,0 +1,7 @@ |
|||||
|
{ |
||||
|
"usingComponents": { |
||||
|
"wux-cascader": "/components/cascader/index", |
||||
|
"wux-accordion-group": "/components/accordion-group/index", |
||||
|
"wux-accordion": "/components/accordion/index" |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,35 @@ |
|||||
|
<!--pages/home/tab5/index.wxml--> |
||||
|
<cu-custom bgColor="bg-white" isBack="{{true}}"> |
||||
|
<view slot="content">采购品类</view> |
||||
|
</cu-custom> |
||||
|
|
||||
|
<view class="bj"> |
||||
|
<view style="width:100%;height:130rpx;padding-top:10rpx;padding-right:10rpx"> |
||||
|
<button class="cu-btn bg-red round shadow-blur vip-btn" bindtap="toMyInfo">跳出</button> |
||||
|
</view> |
||||
|
<view class="top"> |
||||
|
<view class="topText"> |
||||
|
<text>HI,\n欢迎使用纸通宝\n开启一站式废纸交易</text> |
||||
|
</view> |
||||
|
<view style="width:310rpx;height:258rpx;float:right"> |
||||
|
<image src="/assets/image/tabBj.png" style="width:310rpx;height:258rpx"></image> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="mid"> |
||||
|
<text>你希望卖品类是?</text> |
||||
|
</view> |
||||
|
<view class="bottom"> |
||||
|
<view> |
||||
|
<wux-accordion-group title=""> |
||||
|
<checkbox-group bindchange="checkboxChange"> |
||||
|
<wux-accordion wx:for="{{ categoryListone }}" wx:key="index" title="{{index+1+'、'+item.categoryName}}"> |
||||
|
<checkbox style="width:100%;margin-top:15rpx" wx:for="{{ item.childCategoryDtoList }}" wx:for-item="cell" wx:key="index" value="{{cell.categoryId}}" checked="{{cell.isSelected}}">{{cell.categoryName}}</checkbox> |
||||
|
</wux-accordion> |
||||
|
</checkbox-group> |
||||
|
</wux-accordion-group> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view style="width:100%;height:130rpx;padding-top:10rpx;padding-right:10rpx"> |
||||
|
<button class="cu-btn offer-btn" disabled="{{loopRequesting}}" bindtap="submitForm">确认</button> |
||||
|
</view> |
||||
|
</view> |
||||
@ -0,0 +1,64 @@ |
|||||
|
/* pages/home/tab1/index.wxss */ |
||||
|
page{ |
||||
|
background-color: white; |
||||
|
} |
||||
|
.bj { |
||||
|
background-color: white; |
||||
|
min-height: 900rpx; |
||||
|
} |
||||
|
|
||||
|
.vip-btn { |
||||
|
/* height: 90rpx; */ |
||||
|
width: 180rpx; |
||||
|
background: #F5F5F5; |
||||
|
float: right; |
||||
|
color: rgba(0, 0, 0, 0.45); |
||||
|
font-size: 28rpx; |
||||
|
} |
||||
|
|
||||
|
.top { |
||||
|
height: 258rpx; |
||||
|
width: 100%; |
||||
|
} |
||||
|
|
||||
|
.topText { |
||||
|
width: 440rpx; |
||||
|
height: 258rpx; |
||||
|
float: left; |
||||
|
padding-left: 48rpx; |
||||
|
padding-top: 60rpx; |
||||
|
font-size: 44rpx; |
||||
|
color: #000000; |
||||
|
font-family: PingFangSC-Medium; |
||||
|
} |
||||
|
|
||||
|
.mid { |
||||
|
height: 150rpx; |
||||
|
padding-top: 100rpx; |
||||
|
padding-left: 48rpx; |
||||
|
font-family: PingFangSC-Medium; |
||||
|
font-size: 36rpx; |
||||
|
color: #000000; |
||||
|
letter-spacing: 2px; |
||||
|
} |
||||
|
|
||||
|
.bottom { |
||||
|
height: 410rpx; |
||||
|
padding: 48rpx; |
||||
|
} |
||||
|
|
||||
|
.bg-blue{ |
||||
|
color: #FFFFFF; |
||||
|
background-color: #008AFF; |
||||
|
} |
||||
|
|
||||
|
.offer-btn { |
||||
|
width: 90%; |
||||
|
height: 90rpx; |
||||
|
background: linear-gradient(312deg, rgba(38, 125, 214, 1) 0%, rgba(0, 138, 255, 1) 100%); |
||||
|
box-shadow: 0px 10px 13px -8px rgba(35, 126, 217, 0.53); |
||||
|
border-radius: 23px; |
||||
|
color: white; |
||||
|
font-size: 32rpx; |
||||
|
margin-left: 32rpx; |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save