14 changed files with 509 additions and 79 deletions
Unified View
Diff Options
-
1app.json
-
BINassets/info/addgzicon.png
-
3pages/article/allNewInfo/index.js
-
63pages/article/allNewInfo/index.wxml
-
156pages/article/allNewInfo/index.wxss
-
129pages/article/attentionPaperFactory/index.js
-
7pages/article/attentionPaperFactory/index.json
-
38pages/article/attentionPaperFactory/index.wxml
-
77pages/article/attentionPaperFactory/index.wxss
-
2pages/article/feedback/index.wxss
-
2pages/article/index/index.wxml
-
54pages/article/newInfo/index.js
-
52pages/article/newInfo/index.wxml
-
4pages/article/newInfo/index.wxss
@ -0,0 +1,129 @@ |
|||||
|
// pages/home/tab4/index.js
|
||||
|
import { |
||||
|
getFactoryPrice, |
||||
|
userPushFollowMill |
||||
|
} from '../../api/ztb' |
||||
|
const event = require('../../../utils/event.js') |
||||
|
const storage = require('../../../utils/storage') |
||||
|
const app = getApp() |
||||
|
Page({ |
||||
|
|
||||
|
/** |
||||
|
* 页面的初始数据 |
||||
|
*/ |
||||
|
data: { |
||||
|
loopRequesting:false, |
||||
|
form: { |
||||
|
paperMillIds: [], |
||||
|
|
||||
|
}, |
||||
|
model: { |
||||
|
paperMillIds: [], |
||||
|
cityId: '', |
||||
|
enableSalesAgent: 1, |
||||
|
pageNum: 1, |
||||
|
listType: 0, |
||||
|
pageSize:1000 |
||||
|
}, |
||||
|
categoryListone: [], |
||||
|
safeBottom: app.globalData.safeBottom, |
||||
|
userInfo: null, |
||||
|
loading:true |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面加载 |
||||
|
*/ |
||||
|
onLoad: function (options) { |
||||
|
this.setData({ safeBottom: app.globalData.safeBottom, userInfo: app.globalData.userInfo }) |
||||
|
this.getFactoryPriceFct(this.data.model) |
||||
|
}, |
||||
|
toMyInfo: function () { |
||||
|
event.emit('attentionPaperList', { what: 1100, desc: 'attentionPaperList' }) |
||||
|
wx.navigateBack({ |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
/** |
||||
|
* 生命周期函数--监听页面初次渲染完成 |
||||
|
*/ |
||||
|
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' |
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
getFactoryPriceFct:function(model){ |
||||
|
getFactoryPrice(model).then(res=>{ |
||||
|
this.setData({ |
||||
|
categoryListone:res.data.records, |
||||
|
loading:false |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
checkboxChange: function (e) { |
||||
|
console.log(e) |
||||
|
this.setData({ |
||||
|
'form.paperMillIds':e.detail.value, |
||||
|
'form.follow':true |
||||
|
}) |
||||
|
}, |
||||
|
bindtap: function (e) { |
||||
|
console.log(e) |
||||
|
}, |
||||
|
submitForm:function(){ |
||||
|
userPushFollowMill(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,38 @@ |
|||||
|
<!--pages/home/attentionPaperList/index.wxml--> |
||||
|
<cu-custom bgColor="bg-white" isBack="{{true}}"> |
||||
|
<view slot="content">关注纸厂</view> |
||||
|
</cu-custom> |
||||
|
|
||||
|
<view class="bj"> |
||||
|
<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> |
||||
|
<scroll-view scroll-y="true" style='height:500rpx;margin-top:15rpx'> |
||||
|
<view class="bg-white list-empty" style="height:{{height}}rpx" wx:if="{{!categoryListone.length}}"> |
||||
|
<view class="load-spinner text-gray" style="margin-bottom:24px" wx:if="{{loading}}" /> |
||||
|
<image class="img-empty" src="/assets/image/list_empty.png" wx:else></image> |
||||
|
<view class="text-empty">{{loading? '正在加载' : '暂无数据'}}</view> |
||||
|
</view> |
||||
|
<view class="bottom"> |
||||
|
<view> |
||||
|
<checkbox-group bindchange="checkboxChange"> |
||||
|
<checkbox wx:for="{{ categoryListone }}" wx:key="index" class="interestthreecheckbox" style="width:100%;margin-top:30rpx" value="{{item.paperMillId}}" checked="{{item.hasFollowed}}">{{item.name}}</checkbox> |
||||
|
</checkbox-group> |
||||
|
</view> |
||||
|
</view> |
||||
|
</scroll-view> |
||||
|
<!-- <view style="width:100%;height:130rpx;padding-top:10rpx;padding-right:10rpx"> |
||||
|
<button class="cu-btn bg-red round shadow-blur page-btn" disabled="{{loopRequesting}}" bindtap="submitForm">确认</button> |
||||
|
</view> --> |
||||
|
<view class="cu-bar bg-white foot" style="height:{{120 + safeBottom}}rpx;padding: 32rpx 32rpx {{safeBottom + 32}}rpx 32rpx;"> |
||||
|
<button class="cu-btn bg-red round shadow-blur page-btn" bindtap="submitForm">确认</button> |
||||
|
</view> |
||||
|
</view> |
||||
@ -0,0 +1,77 @@ |
|||||
|
/* pages/home/attentionPaperList/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; |
||||
|
} |
||||
|
|
||||
|
.page-btn { |
||||
|
height: 90rpx; |
||||
|
width: 100%; |
||||
|
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); |
||||
|
color: white; |
||||
|
font-size: 32rpx; |
||||
|
} |
||||
|
.interestthreecheckbox .wx-checkbox-input { |
||||
|
border-radius: 50%; |
||||
|
width: 40rpx; |
||||
|
height: 40rpx; |
||||
|
} |
||||
|
.interestthreecheckbox .wx-checkbox-input.wx-checkbox-input-checked{ |
||||
|
background: white; |
||||
|
border: 1px solid #007AFF; |
||||
|
} |
||||
|
.interestthreecheckbox .wx-checkbox-input.wx-checkbox-input-checked::before{ |
||||
|
width: 40rpx;/* 选中后对勾大小 */ |
||||
|
height: 40rpx;/* 选中后对勾大小 */ |
||||
|
font-size:40rpx; /* 对勾大小30rpx */ |
||||
|
color:#007AFF; /* 对勾颜色 白色 */ |
||||
|
} |
||||
Write
Preview
Loading…
Cancel
Save