From 36a8013f3b4b8937a7e899f4767bb6336101c433 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Fri, 17 Sep 2021 21:42:30 +0800 Subject: [PATCH] no message --- app.json | 4 +- pages/agent/factory-fragment/index.js | 2 +- pages/agent/focus-fragment/index.js | 4 +- pages/article/attention-factory/index.wxml | 1 - pages/article/attention-factory/index.wxss | 1 - pages/home/attention-paper/index.js | 71 ++++++++++ .../index.json | 0 pages/home/attention-paper/index.wxml | 41 ++++++ .../index.wxss | 0 pages/home/attentionPaperList/index.js | 131 +++++++++--------- pages/home/attentionPaperList/index.wxml | 41 +----- .../index.js | 0 .../index.json | 0 .../index.wxml | 0 .../index.wxss | 0 pages/home/enterprise/enterprise.js | 2 +- pages/home/info/index.js | 2 +- pages/home/personal/index.js | 2 +- utils/util.js | 2 +- 19 files changed, 185 insertions(+), 119 deletions(-) create mode 100644 pages/home/attention-paper/index.js rename pages/home/{attentionPaperList => attention-paper}/index.json (100%) create mode 100644 pages/home/attention-paper/index.wxml rename pages/home/{attentionPaperList => attention-paper}/index.wxss (100%) rename pages/home/{businessLicense => business-license}/index.js (100%) rename pages/home/{businessLicense => business-license}/index.json (100%) rename pages/home/{businessLicense => business-license}/index.wxml (100%) rename pages/home/{businessLicense => business-license}/index.wxss (100%) diff --git a/app.json b/app.json index c7beec8..900f4d7 100644 --- a/app.json +++ b/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", diff --git a/pages/agent/factory-fragment/index.js b/pages/agent/factory-fragment/index.js index 28813e4..c860259 100644 --- a/pages/agent/factory-fragment/index.js +++ b/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' }) } } diff --git a/pages/agent/focus-fragment/index.js b/pages/agent/focus-fragment/index.js index 133edf9..f9925f6 100644 --- a/pages/agent/focus-fragment/index.js +++ b/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') } } diff --git a/pages/article/attention-factory/index.wxml b/pages/article/attention-factory/index.wxml index 6dad90e..8f5eaee 100644 --- a/pages/article/attention-factory/index.wxml +++ b/pages/article/attention-factory/index.wxml @@ -1,4 +1,3 @@ - 关注纸厂 diff --git a/pages/article/attention-factory/index.wxss b/pages/article/attention-factory/index.wxss index 9277633..19bdd3d 100644 --- a/pages/article/attention-factory/index.wxss +++ b/pages/article/attention-factory/index.wxss @@ -1,4 +1,3 @@ -/* pages/home/attentionPaperList/index.wxss */ page{ background-color: white; } diff --git a/pages/home/attention-paper/index.js b/pages/home/attention-paper/index.js new file mode 100644 index 0000000..6992559 --- /dev/null +++ b/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 + }) + } +}) \ No newline at end of file diff --git a/pages/home/attentionPaperList/index.json b/pages/home/attention-paper/index.json similarity index 100% rename from pages/home/attentionPaperList/index.json rename to pages/home/attention-paper/index.json diff --git a/pages/home/attention-paper/index.wxml b/pages/home/attention-paper/index.wxml new file mode 100644 index 0000000..051b6cf --- /dev/null +++ b/pages/home/attention-paper/index.wxml @@ -0,0 +1,41 @@ + + + 关注纸厂 + + + + + + + + + HI,\n欢迎使用纸通宝\n开启一站式废纸交易 + + + + + + + 你经常卖的纸厂是? + + + + + + {{loading? '正在加载' : '暂无数据'}} + + + + + {{item.name}} + + + + + + + + + \ No newline at end of file diff --git a/pages/home/attentionPaperList/index.wxss b/pages/home/attention-paper/index.wxss similarity index 100% rename from pages/home/attentionPaperList/index.wxss rename to pages/home/attention-paper/index.wxss diff --git a/pages/home/attentionPaperList/index.js b/pages/home/attentionPaperList/index.js index 6992559..48c9786 100644 --- a/pages/home/attentionPaperList/index.js +++ b/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 () { + + } }) \ No newline at end of file diff --git a/pages/home/attentionPaperList/index.wxml b/pages/home/attentionPaperList/index.wxml index 051b6cf..0457f61 100644 --- a/pages/home/attentionPaperList/index.wxml +++ b/pages/home/attentionPaperList/index.wxml @@ -1,41 +1,2 @@ - - 关注纸厂 - - - - - - - - - HI,\n欢迎使用纸通宝\n开启一站式废纸交易 - - - - - - - 你经常卖的纸厂是? - - - - - - {{loading? '正在加载' : '暂无数据'}} - - - - - {{item.name}} - - - - - - - - - \ No newline at end of file +pages/home/attentionPaperList/index.wxml diff --git a/pages/home/businessLicense/index.js b/pages/home/business-license/index.js similarity index 100% rename from pages/home/businessLicense/index.js rename to pages/home/business-license/index.js diff --git a/pages/home/businessLicense/index.json b/pages/home/business-license/index.json similarity index 100% rename from pages/home/businessLicense/index.json rename to pages/home/business-license/index.json diff --git a/pages/home/businessLicense/index.wxml b/pages/home/business-license/index.wxml similarity index 100% rename from pages/home/businessLicense/index.wxml rename to pages/home/business-license/index.wxml diff --git a/pages/home/businessLicense/index.wxss b/pages/home/business-license/index.wxss similarity index 100% rename from pages/home/businessLicense/index.wxss rename to pages/home/business-license/index.wxss diff --git a/pages/home/enterprise/enterprise.js b/pages/home/enterprise/enterprise.js index a612c79..f6bcfc2 100644 --- a/pages/home/enterprise/enterprise.js +++ b/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 () { diff --git a/pages/home/info/index.js b/pages/home/info/index.js index 2fa5143..ae2f31f 100644 --- a/pages/home/info/index.js +++ b/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 () { diff --git a/pages/home/personal/index.js b/pages/home/personal/index.js index a612c79..f6bcfc2 100644 --- a/pages/home/personal/index.js +++ b/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 () { diff --git a/utils/util.js b/utils/util.js index a53c21e..8660538 100644 --- a/utils/util.js +++ b/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'