Browse Source

no message

featrue/v4.5
xpz2018 4 years ago
parent
commit
36a8013f3b
19 changed files with 185 additions and 119 deletions
  1. 4
      app.json
  2. 2
      pages/agent/factory-fragment/index.js
  3. 4
      pages/agent/focus-fragment/index.js
  4. 1
      pages/article/attention-factory/index.wxml
  5. 1
      pages/article/attention-factory/index.wxss
  6. 71
      pages/home/attention-paper/index.js
  7. 0
      pages/home/attention-paper/index.json
  8. 41
      pages/home/attention-paper/index.wxml
  9. 0
      pages/home/attention-paper/index.wxss
  10. 131
      pages/home/attentionPaperList/index.js
  11. 41
      pages/home/attentionPaperList/index.wxml
  12. 0
      pages/home/business-license/index.js
  13. 0
      pages/home/business-license/index.json
  14. 0
      pages/home/business-license/index.wxml
  15. 0
      pages/home/business-license/index.wxss
  16. 2
      pages/home/enterprise/enterprise.js
  17. 2
      pages/home/info/index.js
  18. 2
      pages/home/personal/index.js
  19. 2
      utils/util.js

4
app.json

@ -18,8 +18,8 @@
"pages/home/tab4/index",
"pages/home/tab5/index",
"pages/home/tab6/index",
"pages/home/attentionPaperList/index",
"pages/home/businessLicense/index",
"pages/home/attention-paper/index",
"pages/home/business-license/index",
"pages/shop/create/index",
"pages/shop/detail/index",
"pages/shop/order/index",

2
pages/agent/factory-fragment/index.js

@ -128,7 +128,7 @@ Component({
})
},
goattentionIndex: function () {
wx.navigateTo({ url: '/pages/home/attentionPaperList/index' })
wx.navigateTo({ url: '/pages/home/attention-paper/index' })
}
}

4
pages/agent/focus-fragment/index.js

@ -67,7 +67,7 @@ Component({
text: '确定',
type: 'primary',
onTap(e) {
util.navigateTo('/pages/home/attentionPaperList/index')
util.navigateTo('/pages/home/attention-paper/index')
}
}]
})
@ -128,7 +128,7 @@ Component({
})
},
goattentionIndex: function () {
util.navigateTo('/pages/home/attentionPaperList/index')
util.navigateTo('/pages/home/attention-paper/index')
}
}

1
pages/article/attention-factory/index.wxml

@ -1,4 +1,3 @@
<!--pages/home/attentionPaperList/index.wxml-->
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">关注纸厂</view>
</cu-custom>

1
pages/article/attention-factory/index.wxss

@ -1,4 +1,3 @@
/* pages/home/attentionPaperList/index.wxss */
page{
background-color: white;
}

71
pages/home/attention-paper/index.js

@ -0,0 +1,71 @@
// pages/home/tab4/index.js
import { getFactoryPrice, userPushFollowMill } from '../../../api/ztb'
const event = require('../../../utils/event.js')
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('EventMessage', { what: 1100, desc: 'attentionPaperList' })
wx.navigateBack({})
},
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) {
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
})
}
})

pages/home/attentionPaperList/index.json → pages/home/attention-paper/index.json

41
pages/home/attention-paper/index.wxml

@ -0,0 +1,41 @@
<!--pages/home/attentionPaperList/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="https://636c-cloud1-1gjilu3e74c1a18a-1305669442.tcb.qcloud.la/tabBj.png?sign=20dc0a73aab123a0c36d3a984250cac1&t=1631627591" 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>

pages/home/attentionPaperList/index.wxss → pages/home/attention-paper/index.wxss

131
pages/home/attentionPaperList/index.js

@ -1,71 +1,66 @@
// pages/home/tab4/index.js
import { getFactoryPrice, userPushFollowMill } from '../../../api/ztb'
const event = require('../../../utils/event.js')
const app = getApp()
// pages/home/attentionPaperList/index.js
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('EventMessage', { what: 1100, desc: 'attentionPaperList' })
wx.navigateBack({})
},
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) {
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
})
}
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

41
pages/home/attentionPaperList/index.wxml

@ -1,41 +1,2 @@
<!--pages/home/attentionPaperList/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="https://636c-cloud1-1gjilu3e74c1a18a-1305669442.tcb.qcloud.la/tabBj.png?sign=20dc0a73aab123a0c36d3a984250cac1&t=1631627591" 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>
<text>pages/home/attentionPaperList/index.wxml</text>

pages/home/businessLicense/index.js → pages/home/business-license/index.js

pages/home/businessLicense/index.json → pages/home/business-license/index.json

pages/home/businessLicense/index.wxml → pages/home/business-license/index.wxml

pages/home/businessLicense/index.wxss → pages/home/business-license/index.wxss

2
pages/home/enterprise/enterprise.js

@ -386,7 +386,7 @@ Page({
},
toBusinessLicense: function () {
wx.navigateTo({
url: '/pages/home/businessLicense/index'
url: '/pages/home/business-license/index'
})
},
toTab4: function () {

2
pages/home/info/index.js

@ -399,7 +399,7 @@ Page({
},
toBusinessLicense: function () {
wx.navigateTo({
url: '/pages/home/businessLicense/index'
url: '/pages/home/business-license/index'
})
},
toTab4: function () {

2
pages/home/personal/index.js

@ -386,7 +386,7 @@ Page({
},
toBusinessLicense: function () {
wx.navigateTo({
url: '/pages/home/businessLicense/index'
url: '/pages/home/business-license/index'
})
},
toTab4: function () {

2
utils/util.js

@ -181,7 +181,7 @@ const tokenList = [
'/pages/home/idcard/index',
'/pages/shop/detail/index',
'/pages/article/publish/index',
'/pages/home/attentionPaperList/index',
'/pages/home/attention-paper/index',
'/pages/article/feedback/index',
'pages/agent/edit/index',
'/pages/agent/ability/index'

Loading…
Cancel
Save