From f66f7371c0d5ab495f52409989a32defeba13fba Mon Sep 17 00:00:00 2001
From: xpz2018 <107107461@qq.com>
Date: Tue, 2 Mar 2021 11:10:50 +0800
Subject: [PATCH] no message
---
colorui/main.wxss | 87 ---------
pages/agent/ability/index.js | 96 ++++++++++
pages/agent/ability/index.json | 14 ++
pages/agent/ability/index.wxml | 32 ++++
pages/agent/ability/index.wxss | 63 +++++++
pages/agent/factory-fragment/index.js | 151 +++++++++++++++
pages/agent/factory-fragment/index.json | 14 ++
pages/agent/factory-fragment/index.wxml | 32 ++++
pages/agent/factory-fragment/index.wxss | 1 +
pages/agent/focus-fragment/index.js | 141 ++++++++++++++
pages/agent/focus-fragment/index.json | 15 ++
pages/agent/focus-fragment/index.wxml | 41 +++++
pages/agent/focus-fragment/index.wxss | 60 ++++++
pages/agent/index/index.js | 233 ++----------------------
pages/agent/index/index.json | 12 +-
pages/agent/index/index.wxml | 138 +++-----------
pages/article/newInfo/index.js | 6 +-
pages/article/newInfo/index.wxml | 6 +-
pages/home/attentionPaperList/index.js | 64 +------
pages/index/index.js | 1 -
pages/message/index/index.js | 2 +-
21 files changed, 711 insertions(+), 498 deletions(-)
create mode 100644 pages/agent/ability/index.js
create mode 100644 pages/agent/ability/index.json
create mode 100644 pages/agent/ability/index.wxml
create mode 100644 pages/agent/ability/index.wxss
create mode 100644 pages/agent/factory-fragment/index.js
create mode 100644 pages/agent/factory-fragment/index.json
create mode 100644 pages/agent/factory-fragment/index.wxml
create mode 100644 pages/agent/factory-fragment/index.wxss
create mode 100644 pages/agent/focus-fragment/index.js
create mode 100644 pages/agent/focus-fragment/index.json
create mode 100644 pages/agent/focus-fragment/index.wxml
create mode 100644 pages/agent/focus-fragment/index.wxss
diff --git a/colorui/main.wxss b/colorui/main.wxss
index c897cc0..5bebb19 100644
--- a/colorui/main.wxss
+++ b/colorui/main.wxss
@@ -1065,93 +1065,6 @@ button.icon.lg {
border-bottom: 4rpx solid;
}
-/* ==================
- 时间轴
- ==================== */
-
-.cu-timeline {
- display: block;
- background-color: var(--white);
-}
-
-.cu-timeline .cu-time {
- width: 120rpx;
- text-align: center;
- padding: 20rpx 0;
- font-size: 26rpx;
- color: #888;
- display: block;
-}
-
-.cu-timeline>.cu-item {
- padding: 24rpx 30rpx 30rpx 90rpx;
- position: relative;
- display: block;
- z-index: 0;
-}
-
-.cu-timeline>.cu-item:not([class*="text-"]) {
- color: #ccc;
-}
-
-.cu-timeline>.cu-item::after {
- content: "";
- display: block;
- position: absolute;
- width: 1rpx;
- background-color: #ddd;
- left: 60rpx;
- height: 100%;
- top: 0;
- z-index: 8;
-}
-
-.cu-timeline>.cu-item::before {
- font-family: "cuIcon";
- display: block;
- position: absolute;
- top: 36rpx;
- z-index: 9;
- background-color: var(--white);
- width: 50rpx;
- height: 50rpx;
- text-align: center;
- border: none;
- line-height: 50rpx;
- left: 36rpx;
-}
-
-.cu-timeline>.cu-item:not([class*="cuIcon-"])::before {
- content: "\e763";
-}
-
-.cu-timeline>.cu-item[class*="cuIcon-"]::before {
- background-color: var(--white);
- width: 50rpx;
- height: 50rpx;
- text-align: center;
- border: none;
- line-height: 50rpx;
- left: 36rpx;
-}
-
-.cu-timeline>.cu-item>.content {
- padding: 30rpx;
- border-radius: 6rpx;
- display: block;
- line-height: 1.6;
-}
-
-.cu-timeline>.cu-item>.content:not([class*="bg-"]) {
- /* background-color: var(--ghostWhite); */
- color: var(--black);
-}
-
-.cu-timeline>.cu-item>.content+.content {
- margin-top: 20rpx;
-}
-
-
/* ==================
模态窗口
==================== */
diff --git a/pages/agent/ability/index.js b/pages/agent/ability/index.js
new file mode 100644
index 0000000..d115f79
--- /dev/null
+++ b/pages/agent/ability/index.js
@@ -0,0 +1,96 @@
+// pages/agent/index/index.js
+import { getFactoryPrice } from "../../api/ztb"
+const app = getApp()
+
+Page({
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ height: app.globalData.fragmentHeight,
+ kg: app.globalData.kg,
+ loading: true,
+ requesting: false,
+ finished: false,
+ scrolled: false,
+ top: 0,
+ orderList: [],
+ form: {
+ cityId: '',
+ enableSalesAgent: 1,
+ pageNum: 1,
+ listType: 0
+ }
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ this.setData({ height: app.globalData.fragmentHeight })
+ this.fetchPapersList()
+ },
+ // 下拉刷新...
+ onRefreshList: function () {
+ this.setData({
+ orderList: [],
+ ['form.pageNum']: 1,
+ loading: true,
+ finished: false
+ })
+ this.fetchPapersList()
+ },
+ // 获取特价列表
+ fetchPapersList: function () {
+ if (this.data.requesting || this.data.finished) {
+ return
+ }
+ if (this.data.loading) {
+ this.data.requesting = true
+ } else {
+ this.setData({ requesting: true })
+ }
+ getFactoryPrice(this.data.form).then(result => {
+ if (result.data.records.length) {
+ var respList = result.data.records
+ let nowList = `orderList[${this.data.orderList.length}]`
+ var num = result.data.current
+ var finished = result.data.current >= result.data.pages
+ if (this.data.form.pageNum == 1) {
+ this.setData({
+ [nowList]: respList,
+ total: result.data.total,
+ ['form.pageNum']: (num + 1),
+ top: 0,
+ finished,
+ requesting: false,
+ loading: false
+ })
+ } else {
+ this.setData({
+ [nowList]: respList,
+ total: result.data.total,
+ ['form.pageNum']: (num + 1),
+ finished,
+ requesting: false,
+ loading: false
+ })
+ }
+ } else {
+ this.setData({
+ finished: true,
+ requesting: false,
+ loading: false,
+ pageNum: 1
+ })
+ }
+ }).catch(err => {
+ //异常回调
+ this.setData({
+ requesting: false,
+ finished: true,
+ loading: false,
+ })
+ })
+ }
+
+})
\ No newline at end of file
diff --git a/pages/agent/ability/index.json b/pages/agent/ability/index.json
new file mode 100644
index 0000000..0faa308
--- /dev/null
+++ b/pages/agent/ability/index.json
@@ -0,0 +1,14 @@
+{
+ "usingComponents": {
+ "wux-skeleton": "/components/skeleton/index",
+ "wux-skeleton-avatar": "/components/skeleton-avatar/index",
+ "wux-skeleton-paragraph": "/components/skeleton-paragraph/index",
+ "wux-button": "/components/button/index",
+ "refresh-view": "/components/refresher/index",
+ "wux-tabi": "/components/tabi/index",
+ "wux-image": "/components/image/index",
+ "wux-divider": "/components/divider/index",
+ "agent-item": "/pages/agent/agent-item/index",
+ "wux-dialog": "/components/dialog/index"
+ }
+}
\ No newline at end of file
diff --git a/pages/agent/ability/index.wxml b/pages/agent/ability/index.wxml
new file mode 100644
index 0000000..063cf62
--- /dev/null
+++ b/pages/agent/ability/index.wxml
@@ -0,0 +1,32 @@
+
+
+
+ 代卖活动
+
+
+
+
+
+
+ {{loading? '正在加载' : '暂无数据'}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{finished?'到底啦~':'加载中...'}}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/agent/ability/index.wxss b/pages/agent/ability/index.wxss
new file mode 100644
index 0000000..3b89291
--- /dev/null
+++ b/pages/agent/ability/index.wxss
@@ -0,0 +1,63 @@
+/* pages/agent/index/index.wxss */
+.bj{
+ height: 1300rpx;
+ background-color: white;
+}
+.bgImgView {
+ width: 100%;
+ height: 548rpx;
+ padding: 160rpx 186rpx 94rpx 186rpx;
+ background-color: white;
+}
+
+.imgsj {
+ height: 294rpx;
+ width: 378rpx;
+}
+
+.midText {
+ width: 100%;
+ height: 67rpx;
+ padding: 0rpx 279rpx 0rpx 279rpx;
+}
+
+.midText2 {
+ font-size: 48rpx;
+ color: #000000;
+ letter-spacing: 0;
+ text-align: left;
+}
+
+.midText3 {
+ width: 100%;
+ height: 45px;
+ padding: 0rpx 199rpx 0rpx 199rpx;
+ margin-top: 12rpx;
+}
+
+.midText4 {
+ font-size: 32rpx;
+ color: rgba(0, 0, 0, 0.75);
+ letter-spacing: 0;
+ text-align: left;
+}
+.bg-blue{
+ color: #FFFFFF;
+ background-color: #008AFF;
+}
+
+.offer-btn {
+ width: 480rpx;
+ height: 88rpx;
+ 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: 10rpx;
+ color: white;
+ font-size: 32rpx;
+ margin-left: 32rpx;
+}
+.bottomBtn{
+ width: 100%;
+ height: 88rpx;
+ padding:0rpx 135rpx 0rpx 135rpx;
+}
\ No newline at end of file
diff --git a/pages/agent/factory-fragment/index.js b/pages/agent/factory-fragment/index.js
new file mode 100644
index 0000000..361d163
--- /dev/null
+++ b/pages/agent/factory-fragment/index.js
@@ -0,0 +1,151 @@
+// pages/agent/index/index.js
+import { getFactoryPrice, getFactoryCity } from "../../api/ztb"
+const app = getApp()
+
+Component({
+ options: {
+ addGlobalClass: true,
+ multipleSlots: true
+ },
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ height: app.globalData.fragmentHeight - 90,
+ CustomBar: app.globalData.CustomBar,
+ kg: app.globalData.kg,
+ loading: true,
+ requesting: false,
+ finished: false,
+ tabList: [],
+ tabIndex: 0,
+ cateList: [],
+ scrolled: false,
+ top: 0,
+ orderList: [],
+ form: {
+ cityId: '',
+ enableSalesAgent: 1,
+ pageNum: 1,
+ listType: 0
+ }
+ },
+ lifetimes: {
+ // 生命周期函数,可以为函数,或一个在methods段中定义的方法名
+ attached: function () {
+ this.setData({ height: app.globalData.fragmentHeight - 90, kg: app.globalData.kg })
+ this.fetchRegionList()
+ this.fetchPapersList()
+ }
+ },
+ methods: {
+ onEvent: function (message) {
+ if (message.what == 1100 || message.what == 1101) {
+ this.data.form = {
+ cityId: '',
+ enableSalesAgent: 1,
+ pageNum: 1,
+ listType: 1
+ }
+ this.setData({ bidType: 2 })
+ this.data.orderList = []
+ this.fetchPapersList()
+ }
+ },
+ onRestart: function(){
+
+ },
+ fetchRegionList: function () {
+ getFactoryCity().then(result => {
+ //成功回调
+ this.data.cateList = [{
+ cityId: '',
+ cityName: '全部'
+ }].concat(result.data)
+ for (let index = 0; index < this.data.cateList.length; index++) {
+ this.data.tabList.push(this.data.cateList[index].cityName)
+ }
+ this.setData({
+ tabList: this.data.tabList,
+ scrolled: this.data.cateList.length >= 5
+ })
+ })
+ },
+ onTabChange: function ({ detail }) {
+ if (this.data.tabIndex == Number(detail.index)) {
+ return
+ }
+ this.data.tabIndex = Number(detail.index)
+ this.data.form.cityId = this.data.cateList[this.data.tabIndex].cityId
+ this.onRefreshList()
+ },
+ // 下拉刷新...
+ onRefreshList: function () {
+ this.setData({
+ orderList: [],
+ tabIndex: this.data.tabIndex,
+ ['form.pageNum']: 1,
+ loading: true,
+ finished: false
+ })
+ this.fetchPapersList()
+ },
+ // 获取特价列表
+ fetchPapersList: function () {
+ if (this.data.requesting || this.data.finished) {
+ return
+ }
+ if (this.data.loading) {
+ this.data.requesting = true
+ } else {
+ this.setData({ requesting: true })
+ }
+ getFactoryPrice(this.data.form).then(result => {
+ if (result.data.records.length) {
+ var respList = result.data.records
+ let nowList = `orderList[${this.data.orderList.length}]`
+ var num = result.data.current
+ var finished = result.data.current >= result.data.pages
+ if (this.data.form.pageNum == 1) {
+ this.setData({
+ [nowList]: respList,
+ total: result.data.total,
+ ['form.pageNum']: (num + 1),
+ top: 0,
+ finished,
+ requesting: false,
+ loading: false
+ })
+ } else {
+ this.setData({
+ [nowList]: respList,
+ total: result.data.total,
+ ['form.pageNum']: (num + 1),
+ finished,
+ requesting: false,
+ loading: false
+ })
+ }
+ } else {
+ this.setData({
+ finished: true,
+ requesting: false,
+ loading: false,
+ pageNum: 1
+ })
+ }
+ }).catch(err => {
+ //异常回调
+ this.setData({
+ requesting: false,
+ finished: true,
+ loading: false,
+ })
+ })
+ },
+ goattentionIndex: function () {
+ wx.navigateTo({ url: '/pages/home/attentionPaperList/index' })
+ }
+ }
+
+})
\ No newline at end of file
diff --git a/pages/agent/factory-fragment/index.json b/pages/agent/factory-fragment/index.json
new file mode 100644
index 0000000..5130038
--- /dev/null
+++ b/pages/agent/factory-fragment/index.json
@@ -0,0 +1,14 @@
+{
+ "component": true,
+ "usingComponents": {
+ "wux-skeleton": "/components/skeleton/index",
+ "wux-skeleton-avatar": "/components/skeleton-avatar/index",
+ "wux-skeleton-paragraph": "/components/skeleton-paragraph/index",
+ "wux-button": "/components/button/index",
+ "refresh-view": "/components/refresher/index",
+ "wux-tabi": "/components/tabi/index",
+ "wux-image": "/components/image/index",
+ "wux-divider": "/components/divider/index",
+ "agent-item": "/pages/agent/agent-item/index"
+ }
+}
\ No newline at end of file
diff --git a/pages/agent/factory-fragment/index.wxml b/pages/agent/factory-fragment/index.wxml
new file mode 100644
index 0000000..251c9ca
--- /dev/null
+++ b/pages/agent/factory-fragment/index.wxml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{loading? '正在加载' : '暂无数据'}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{finished?'到底啦~':'加载中...'}}
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/agent/factory-fragment/index.wxss b/pages/agent/factory-fragment/index.wxss
new file mode 100644
index 0000000..14f8cb0
--- /dev/null
+++ b/pages/agent/factory-fragment/index.wxss
@@ -0,0 +1 @@
+/* pages/agent/index/index.wxss */
\ No newline at end of file
diff --git a/pages/agent/focus-fragment/index.js b/pages/agent/focus-fragment/index.js
new file mode 100644
index 0000000..f95105f
--- /dev/null
+++ b/pages/agent/focus-fragment/index.js
@@ -0,0 +1,141 @@
+// pages/agent/index/index.js
+import { getFactoryPrice, getBaseInfo, updateUserInfo } from "../../api/ztb"
+const event = require('../../../utils/event')
+const app = getApp()
+
+Component({
+ options: {
+ addGlobalClass: true,
+ multipleSlots: true
+ },
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ height: app.globalData.fragmentHeight - 90,
+ CustomBar: app.globalData.CustomBar,
+ kg: app.globalData.kg,
+ loading: true,
+ requesting: false,
+ finished: false,
+ tabList: [],
+ tabIndex: 0,
+ cateList: [],
+ scrolled: false,
+ top: 0,
+ orderList: [],
+ form: {
+ cityId: '',
+ enableSalesAgent: 1,
+ pageNum: 1,
+ listType: 1
+ }
+ },
+ lifetimes: {
+ // 生命周期函数,可以为函数,或一个在methods段中定义的方法名
+ attached: function () {
+ this.setData({ height: app.globalData.fragmentHeight, kg: app.globalData.kg })
+ this.fetchPapersList()
+ event.on('factoryDetails', this, this.onEvent)
+ event.on('attentionPaperList', this, this.onEvent)
+ },
+ detached: function () {
+ event.remove('factoryDetails', this)
+ event.remove('attentionPaperList', this)
+ }
+ },
+ methods: {
+ onEvent: function (message) {
+ if (message.what == 1100 || message.what == 1101) {
+ this.onRefreshList()
+ }
+ },
+ onRestart: function () {
+ getBaseInfo().then(result => {
+ if (result.data.isSetProxyTag == false) {
+ updateUserInfo({ isSetProxyTag: true }).then(result => {})
+ this.wuxDialog = this.wuxDialog || this.selectComponent('#wux-dialog')
+ this.wuxDialog.open({
+ resetOnClose: true,
+ title: '温馨提示',
+ content: '是否选择关注您常卖的纸厂?',
+ buttons: [{
+ text: '取消'
+ }, {
+ text: '确定',
+ type: 'primary',
+ onTap(e) {
+ wx.navigateTo({
+ url: '/pages/home/attentionPaperList/index'
+ })
+ }
+ }]
+ })
+ }
+ })
+ },
+ // 下拉刷新...
+ onRefreshList: function () {
+ this.setData({
+ orderList: [],
+ ['form.pageNum']: 1,
+ loading: true,
+ finished: false
+ })
+ this.fetchPapersList()
+ },
+ // 获取特价列表
+ fetchPapersList: function () {
+ if (this.data.requesting || this.data.finished) {
+ return
+ }
+ if (this.data.loading) {
+ this.data.requesting = true
+ } else {
+ this.setData({ requesting: true })
+ }
+ getFactoryPrice(this.data.form).then(result => {
+ if (result.data.records.length) {
+ var respList = result.data.records
+ let nowList = `orderList[${this.data.orderList.length}]`
+ var num = result.data.current
+ var finished = result.data.current >= result.data.pages
+ if (this.data.form.pageNum == 1) {
+ this.setData({
+ [nowList]: respList,
+ total: result.data.total,
+ ['form.pageNum']: (num + 1),
+ top: 0,
+ finished,
+ requesting: false,
+ loading: false
+ })
+ } else {
+ this.setData({
+ [nowList]: respList,
+ total: result.data.total,
+ ['form.pageNum']: (num + 1),
+ finished,
+ requesting: false,
+ loading: false
+ })
+ }
+ } else {
+ this.setData({
+ finished: true,
+ requesting: false,
+ loading: false,
+ pageNum: 1
+ })
+ }
+ }).catch(err => {
+ //异常回调
+ this.setData({ requesting: false, finished: true, loading: false })
+ })
+ },
+ goattentionIndex: function () {
+ wx.navigateTo({ url: '/pages/home/attentionPaperList/index' })
+ }
+ }
+
+})
\ No newline at end of file
diff --git a/pages/agent/focus-fragment/index.json b/pages/agent/focus-fragment/index.json
new file mode 100644
index 0000000..b634036
--- /dev/null
+++ b/pages/agent/focus-fragment/index.json
@@ -0,0 +1,15 @@
+{
+ "component": true,
+ "usingComponents": {
+ "wux-skeleton": "/components/skeleton/index",
+ "wux-skeleton-avatar": "/components/skeleton-avatar/index",
+ "wux-skeleton-paragraph": "/components/skeleton-paragraph/index",
+ "wux-button": "/components/button/index",
+ "refresh-view": "/components/refresher/index",
+ "wux-tabi": "/components/tabi/index",
+ "wux-image": "/components/image/index",
+ "wux-divider": "/components/divider/index",
+ "agent-item": "/pages/agent/agent-item/index",
+ "wux-dialog": "/components/dialog/index"
+ }
+}
\ No newline at end of file
diff --git a/pages/agent/focus-fragment/index.wxml b/pages/agent/focus-fragment/index.wxml
new file mode 100644
index 0000000..2fca736
--- /dev/null
+++ b/pages/agent/focus-fragment/index.wxml
@@ -0,0 +1,41 @@
+
+
+
+
+
+ 正在加载
+
+
+
+
+
+
+ 暂无关注
+
+
+ 可前往纸厂列表添加关注
+
+
+ 添加关注
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{finished?'到底啦~':'加载中...'}}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/agent/focus-fragment/index.wxss b/pages/agent/focus-fragment/index.wxss
new file mode 100644
index 0000000..cbfb519
--- /dev/null
+++ b/pages/agent/focus-fragment/index.wxss
@@ -0,0 +1,60 @@
+/* pages/agent/index/index.wxss */
+
+.bgImgView {
+ width: 100%;
+ height: 548rpx;
+ padding: 160rpx 186rpx 94rpx 186rpx;
+ background-color: white;
+}
+
+.imgsj {
+ height: 294rpx;
+ width: 378rpx;
+}
+
+.midText {
+ width: 100%;
+ height: 67rpx;
+ padding: 0rpx 279rpx 0rpx 279rpx;
+}
+
+.midText2 {
+ font-size: 48rpx;
+ color: #000000;
+ letter-spacing: 0;
+ text-align: left;
+}
+
+.midText3 {
+ width: 100%;
+ height: 45px;
+ padding: 0rpx 199rpx 0rpx 199rpx;
+ margin-top: 12rpx;
+}
+
+.midText4 {
+ font-size: 32rpx;
+ color: rgba(0, 0, 0, 0.75);
+ letter-spacing: 0;
+ text-align: left;
+}
+.bg-blue{
+ color: #FFFFFF;
+ background-color: #008AFF;
+}
+
+.offer-btn {
+ width: 480rpx;
+ height: 88rpx;
+ 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: 10rpx;
+ color: white;
+ font-size: 32rpx;
+ margin-left: 32rpx;
+}
+.bottomBtn{
+ width: 100%;
+ height: 88rpx;
+ padding:0rpx 135rpx 0rpx 135rpx;
+}
\ No newline at end of file
diff --git a/pages/agent/index/index.js b/pages/agent/index/index.js
index c9106c3..9c29366 100644
--- a/pages/agent/index/index.js
+++ b/pages/agent/index/index.js
@@ -1,11 +1,4 @@
// pages/agent/index/index.js
-import {
- getFactoryPrice,
- getFactoryCity,
- getBaseInfo,
- updateUserInfo
-} from "../../api/ztb"
-const event = require('../../../utils/event')
const app = getApp()
Page({
@@ -15,231 +8,43 @@ Page({
data: {
height: app.globalData.fragmentHeight - 90,
CustomBar: app.globalData.CustomBar,
- kg: app.globalData.kg,
- loading: true,
- requesting: false,
- finished: false,
- tabList: [],
- tabIndex: 0,
- cateList: [],
- scrolled: false,
- top: 0,
- orderList: [],
- form: {
- cityId: '',
- enableSalesAgent: 1,
- pageNum: 1,
- listType: 0
- },
-
- bidType: 1,
- bidTypeHight: 210,
- isSetProxyTag: false, //是否已经选择过代卖标签
-
+ TabList: [
+ { index: 0, value: 'focus', name: '关注' },
+ { index: 1, value: 'factory', name: '全部' }
+ ],
+ pageIndex: 1,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
- height: app.globalData.fragmentHeight - 90,
+ height: app.globalData.fragmentHeight,
kg: app.globalData.kg,
- CustomBar: app.globalData.CustomBar
+ StatusBar: app.globalData.StatusBar || 40,
+ CustomBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 80),
})
- this.fetchRegionList()
- this.fetchPapersList()
- event.on('factoryDetails', this, this.onEvent)
- event.on('attentionPaperList', this, this.onEvent)
-
},
- onEvent: function (message) {
- if (message.what == 1100 || message.what == 1101) {
- this.data.form = {
- cityId: '',
- enableSalesAgent: 1,
- pageNum: 1,
- listType: 1
- }
- this.setData({
- bidType: 2
- })
- this.data.orderList = []
- this.fetchPapersList()
-
- }
+ backspace() {
+ wx.navigateBack()
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
- // this.fetchPapersList()
- this.wuxDialog = this.wuxDialog || this.selectComponent('#wux-dialog')
- var that = this
- getBaseInfo().then(result => {
- this.setData({
- isSetProxyTag: result.data.isSetProxyTag
- })
- if (this.data.isSetProxyTag == false) {
- this.updateUserInfoFct({
- isSetProxyTag: true
- })
- this.wuxDialog.open({
- resetOnClose: true,
- title: '温馨提示',
- content: '是否选择关注您常卖的纸厂?',
- buttons: [{
- text: '取消'
- }, {
- text: '确定',
- type: 'primary',
- onTap(e) {
- wx.navigateTo({
- url: '/pages/home/attentionPaperList/index'
- })
- }
- }]
- })
- }
- })
-
+ var pageView = this.selectComponent('#' + this.data.TabList[this.data.pageIndex].value)
+ if (pageView) {
+ pageView.onRestart()
+ }
},
- updateUserInfoFct: function (model) {
- updateUserInfo(model).then(result => {})
- },
- fetchRegionList: function () {
- getFactoryCity().then(result => {
- //成功回调
- this.data.cateList = [{
- cityId: '',
- cityName: '全部'
- }].concat(result.data)
- for (let index = 0; index < this.data.cateList.length; index++) {
- this.data.tabList.push(this.data.cateList[index].cityName)
- }
- this.setData({
- tabList: this.data.tabList,
- scrolled: this.data.cateList.length >= 5
- })
- })
+ stopTouchMove: function (e) {
+ return false
},
onTabChangeTop: function (e) {
- if (this.data.bidType == Number(e.currentTarget.dataset.index)) {
- return
- }
- var tabIndex = Number(e.currentTarget.dataset.index)
- this.data.firstCategoryId = ''
- this.setData({
- pageIndex: 0,
- ['bidType']: tabIndex
- })
- if (this.data.bidType == 1) {
- this.setData({
- bidTypeHight: 210,
- 'form.listType': 0,
- 'form.cityId': '',
- 'form.enableSalesAgent': 1,
- 'form.pageNum': 1,
-
- })
- } else {
- this.setData({
- bidTypeHight: 50,
- 'form.listType': 1,
- 'form.cityId': '',
- 'form.enableSalesAgent': 1,
- 'form.pageNum': 1,
- })
- }
-
- this.onRefreshList()
-
- },
- onTabChange: function ({
- detail
- }) {
- if (this.data.tabIndex == Number(detail.index)) {
+ if (this.data.pageIndex == Number(e.currentTarget.dataset.index)) {
return
}
- this.data.tabIndex = Number(detail.index)
- this.data.form.cityId = this.data.cateList[this.data.tabIndex].cityId
- this.onRefreshList()
- },
- // 下拉刷新...
- onRefreshList: function () {
- this.setData({
- orderList: [],
- tabIndex: this.data.tabIndex,
- ['form.pageNum']: 1,
- loading: true,
- finished: false
- })
- this.fetchPapersList()
- },
- // 获取特价列表
- fetchPapersList: function () {
- // if (this.data.requesting || this.data.finished) {
- // return
- // }
- if (this.data.loading) {
- this.data.requesting = true
- } else {
- this.setData({
- requesting: true
- })
- }
- getFactoryPrice(this.data.form).then(result => {
- if (result.data.records.length) {
- var respList = result.data.records
- let nowList = `orderList[${this.data.orderList.length}]`
- var num = result.data.current
- var finished = result.data.current >= result.data.pages
- if (this.data.form.pageNum == 1) {
- this.setData({
- [nowList]: respList,
- total: result.data.total,
- ['form.pageNum']: (num + 1),
- top: 0,
- finished,
- requesting: false,
- loading: false
- })
- } else {
- this.setData({
- [nowList]: respList,
- total: result.data.total,
- ['form.pageNum']: (num + 1),
- finished,
- requesting: false,
- loading: false
- })
- }
- } else {
- this.setData({
- finished: true,
- requesting: false,
- loading: false,
- pageNum: 1
- })
- }
- }).catch(err => {
- //异常回调
- this.setData({
- requesting: false,
- finished: true,
- loading: false,
- })
- })
- },
-
- goattentionIndex: function () {
- wx.navigateTo({
- url: '/pages/home/attentionPaperList/index'
- })
- },
- onUnload: function () {
- event.remove('attentionPaperList', this)
- event.remove('factoryDetails', this)
-
+ this.setData({ pageIndex: Number(e.currentTarget.dataset.index) })
+ this.onShow()
}
-
})
\ No newline at end of file
diff --git a/pages/agent/index/index.json b/pages/agent/index/index.json
index 0faa308..b637617 100644
--- a/pages/agent/index/index.json
+++ b/pages/agent/index/index.json
@@ -1,14 +1,6 @@
{
"usingComponents": {
- "wux-skeleton": "/components/skeleton/index",
- "wux-skeleton-avatar": "/components/skeleton-avatar/index",
- "wux-skeleton-paragraph": "/components/skeleton-paragraph/index",
- "wux-button": "/components/button/index",
- "refresh-view": "/components/refresher/index",
- "wux-tabi": "/components/tabi/index",
- "wux-image": "/components/image/index",
- "wux-divider": "/components/divider/index",
- "agent-item": "/pages/agent/agent-item/index",
- "wux-dialog": "/components/dialog/index"
+ "focus": "/pages/agent/focus-fragment/index",
+ "factory": "/pages/agent/factory-fragment/index"
}
}
\ No newline at end of file
diff --git a/pages/agent/index/index.wxml b/pages/agent/index/index.wxml
index 9009924..22c9739 100644
--- a/pages/agent/index/index.wxml
+++ b/pages/agent/index/index.wxml
@@ -1,124 +1,28 @@
-
- 纸厂代卖
-
-
-
-
- 关注
-
-
- 全部
+
+
+
+
+
+
+
+ 关注
+
+
+ 全部
+
-
-
-
-
-
-
-
- {{loading? '正在加载' : '暂无数据'}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{finished?'到底啦~':'加载中...'}}
-
-
-
-
-
-
-
-
-
-
-
-
- 暂无关注
-
-
- 可前往纸厂列表添加关注
-
-
- 添加关注
-
-
-
-
-
-
-
-
-
-
- 加载更多的UI
-
-
-
-
- {{finished?'到底啦~':'加载中...'}}
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/article/newInfo/index.js b/pages/article/newInfo/index.js
index 90c097e..b21ab18 100644
--- a/pages/article/newInfo/index.js
+++ b/pages/article/newInfo/index.js
@@ -27,16 +27,14 @@ Component({
priceSort:1
},
factoryList:[],
- scorllHeight:app.globalData.fragmentHeight
-
+ scorllHeight:app.globalData.safeFragmentHeight
},
methods: {
onRestart: function () {
- console.log(app.globalData.fragmentHeight)
this.setData({
StatusBar: app.globalData.StatusBar || 40,
CustomBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 80),
- scorllHeight:app.globalData.fragmentHeight
+ scorllHeight:app.globalData.safeFragmentHeight - 100
})
this.data.querFrom.queryWay=0
this.getPaperMillOfInformationListFct(this.data.querFrom)
diff --git a/pages/article/newInfo/index.wxml b/pages/article/newInfo/index.wxml
index 2a89e7f..ffab277 100644
--- a/pages/article/newInfo/index.wxml
+++ b/pages/article/newInfo/index.wxml
@@ -9,7 +9,7 @@
全部纸厂>
-
+
@@ -31,8 +31,8 @@
-
-
+
+
纸厂名称
diff --git a/pages/home/attentionPaperList/index.js b/pages/home/attentionPaperList/index.js
index b2e6d1f..01f7aaa 100644
--- a/pages/home/attentionPaperList/index.js
+++ b/pages/home/attentionPaperList/index.js
@@ -1,10 +1,6 @@
// pages/home/tab4/index.js
-import {
- getFactoryPrice,
- userPushFollowMill
-} from '../../api/ztb'
+import { getFactoryPrice, userPushFollowMill } from '../../api/ztb'
const event = require('../../../utils/event.js')
-const storage = require('../../../utils/storage')
const app = getApp()
Page({
@@ -41,57 +37,7 @@ Page({
},
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 () {
-
+ wx.navigateBack({})
},
backspace: function () {
// console.log('点击返回被触发4')
@@ -109,11 +55,7 @@ Page({
})
},
checkboxChange: function (e) {
- console.log(e)
- this.setData({
- 'form.paperMillIds':e.detail.value,
- 'form.follow':true
- })
+ this.setData({ 'form.paperMillIds':e.detail.value, 'form.follow':true })
},
bindtap: function (e) {
console.log(e)
diff --git a/pages/index/index.js b/pages/index/index.js
index 36c7484..ab8fb6e 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -177,7 +177,6 @@ Page({
}
getBaseInfo().then(result => {
app.globalData.userInfo = result.data
- console.log(app.globalData.userInfo)
wx.hideLoading()
this.defaultIndex()
}).catch(err => {
diff --git a/pages/message/index/index.js b/pages/message/index/index.js
index 5134a93..eae7680 100644
--- a/pages/message/index/index.js
+++ b/pages/message/index/index.js
@@ -166,7 +166,7 @@ Page({
},
readAllMessage: function(){
wx.showLoading({ title: '加载中', mask: true })
- readMessage().then(result => {
+ readMessage({ idList: [] }).then(result => {
this.setData({ ['tabList[0].badge']: 0, ['tabList[1].badge']: 0 })
wx.hideLoading()
}).catch(err => {