diff --git a/app.json b/app.json
index c02f778..1c2fbc7 100644
--- a/app.json
+++ b/app.json
@@ -9,6 +9,7 @@
"pages/home/factory-list/index",
"pages/home/customer-info/index",
"pages/home/qrcode/index",
+ "pages/home/registe/index",
"pages/process/agent-list/index",
"pages/process/check-list/index",
"pages/process/order-list/index",
@@ -53,12 +54,18 @@
"pages/setting/password/index",
"pages/setting/mobile/index",
"pages/setting/paper-list/index",
- "pages/setting/paper-detial/index",
- "pages/client/index/index",
- "pages/client/registe/index",
- "pages/client/home/index",
- "pages/client/order-list/index",
- "pages/client/factory-list/index"
+ "pages/setting/paper-detial/index"
+ ],
+ "subpackages": [
+ {
+ "root": "client/",
+ "pages": [
+ "index/index",
+ "message/detail/index",
+ "order-list/index",
+ "factory-list/index"
+ ]
+ }
],
"window":{
"backgroundTextStyle":"light",
diff --git a/pages/client/factory-list/index.js b/client/factory-list/index.js
similarity index 95%
rename from pages/client/factory-list/index.js
rename to client/factory-list/index.js
index 87f5937..eff1919 100644
--- a/pages/client/factory-list/index.js
+++ b/client/factory-list/index.js
@@ -1,6 +1,6 @@
// pages/client/order-list/index.js
-import { getFactoryOrderList } from "../../../api/saas"
-const util = require('../../../utils/util')
+import { getFactoryOrderList } from "../../api/saas"
+const util = require('../../utils/util')
const app = getApp()
Page({
diff --git a/pages/client/factory-list/index.json b/client/factory-list/index.json
similarity index 100%
rename from pages/client/factory-list/index.json
rename to client/factory-list/index.json
diff --git a/pages/client/factory-list/index.wxml b/client/factory-list/index.wxml
similarity index 100%
rename from pages/client/factory-list/index.wxml
rename to client/factory-list/index.wxml
diff --git a/pages/client/factory-list/index.wxss b/client/factory-list/index.wxss
similarity index 100%
rename from pages/client/factory-list/index.wxss
rename to client/factory-list/index.wxss
diff --git a/pages/client/home/index.js b/client/home/index.js
similarity index 88%
rename from pages/client/home/index.js
rename to client/home/index.js
index 07871c3..e3e708a 100644
--- a/pages/client/home/index.js
+++ b/client/home/index.js
@@ -1,11 +1,11 @@
// pages/stock/index.js
-import Dialog from '../../../components/dialog/dialog'
-import { finalizeToken } from "../../../api/user"
-import { getBalanceInfo } from '../../../api/payment'
-const util = require('../../../utils/util')
-const event = require('../../../utils/event')
-const math = require('../../../utils/math')
-const storage = require('../../../utils/storage')
+import Dialog from '../../components/dialog/dialog'
+import { finalizeToken } from "../../api/user"
+import { getBalanceInfo } from '../../api/payment'
+const util = require('../../utils/util')
+const event = require('../../utils/event')
+const math = require('../../utils/math')
+const storage = require('../../utils/storage')
const app = getApp()
Component({
diff --git a/pages/client/home/index.json b/client/home/index.json
similarity index 100%
rename from pages/client/home/index.json
rename to client/home/index.json
diff --git a/pages/client/home/index.wxml b/client/home/index.wxml
similarity index 100%
rename from pages/client/home/index.wxml
rename to client/home/index.wxml
diff --git a/pages/client/home/index.wxss b/client/home/index.wxss
similarity index 100%
rename from pages/client/home/index.wxss
rename to client/home/index.wxss
diff --git a/pages/client/index/index.js b/client/index/index.js
similarity index 97%
rename from pages/client/index/index.js
rename to client/index/index.js
index ce3d042..9c62662 100644
--- a/pages/client/index/index.js
+++ b/client/index/index.js
@@ -1,5 +1,5 @@
// pages/administ/index.js
-const event = require('../../../utils/event')
+const event = require('../../utils/event')
const app = getApp()
Page({
diff --git a/pages/client/index/index.json b/client/index/index.json
similarity index 61%
rename from pages/client/index/index.json
rename to client/index/index.json
index 1d4a0c3..54bdfe4 100644
--- a/pages/client/index/index.json
+++ b/client/index/index.json
@@ -3,9 +3,9 @@
"van-icon": "/components/icon/index",
"van-tabbar": "/components/tabbar/index",
"van-tabbar-item": "/components/tabbar-item/index",
- "message": "/pages/message/index/index",
- "workbench": "/pages/client/workbench/index",
- "home": "/pages/client/home/index",
+ "message": "/client/message/index/index",
+ "workbench": "/client/workbench/index",
+ "home": "/client/home/index",
"van-dialog": "/components/dialog/index"
}
}
\ No newline at end of file
diff --git a/pages/client/index/index.wxml b/client/index/index.wxml
similarity index 100%
rename from pages/client/index/index.wxml
rename to client/index/index.wxml
diff --git a/pages/client/index/index.wxss b/client/index/index.wxss
similarity index 100%
rename from pages/client/index/index.wxss
rename to client/index/index.wxss
diff --git a/client/message/detail/index.js b/client/message/detail/index.js
new file mode 100644
index 0000000..122845d
--- /dev/null
+++ b/client/message/detail/index.js
@@ -0,0 +1,66 @@
+// client//message/detail/index.js
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ 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/client/message/detail/index.json b/client/message/detail/index.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/client/message/detail/index.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/client/message/detail/index.wxml b/client/message/detail/index.wxml
new file mode 100644
index 0000000..5b49215
--- /dev/null
+++ b/client/message/detail/index.wxml
@@ -0,0 +1,2 @@
+
+client//message/detail/index.wxml
diff --git a/client/message/detail/index.wxss b/client/message/detail/index.wxss
new file mode 100644
index 0000000..9915ede
--- /dev/null
+++ b/client/message/detail/index.wxss
@@ -0,0 +1 @@
+/* client//message/detail/index.wxss */
\ No newline at end of file
diff --git a/client/message/index/index.js b/client/message/index/index.js
new file mode 100644
index 0000000..8fc2f6e
--- /dev/null
+++ b/client/message/index/index.js
@@ -0,0 +1,86 @@
+import { getMessageList } from "../../../api/saas"
+const event = require('../../../utils/event')
+const util = require('../../../utils/util')
+const app = getApp()
+
+Component({
+ options: {
+ addGlobalClass: true,
+ multipleSlots: true
+ },
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ height: app.globalData.safeFragmentHeight - 100,
+ userInfo: null,
+ firstShow: false,
+ loading: false,
+ requesting: false,
+ finished: false,
+ top: 0,
+ orderList: [],
+ form: { productType: 'ZTB_FACTORY', pageNum: 1, pageSize: 10 }
+ },
+ lifetimes: {
+ attached: function () {
+ this.setData({ height: app.globalData.safeFragmentHeight - 100 })
+ event.on('EventMessage', this, this.onEvent)
+ },
+ detached: function () {
+ event.remove('EventMessage', this)
+ }
+ },
+ methods: {
+ onRestart: function () {
+ if (this.data.firstShow) {
+ return
+ }
+ // this.fetchList()
+ this.data.firstShow = true
+ },
+ onEvent: function (message) {
+ if (message.what == 888) {
+ this.setData({ userInfo: app.userInfo })
+ }
+ },
+ onRefreshList: function () {
+ this.setData({ orderList: [], ['form.pageNum']: 1, loading: true, finished: false })
+ // this.fetchList()
+ },
+ fetchList: function () {
+ if (this.data.requesting || this.data.finished) {
+ return
+ }
+ this.data.requesting = true
+ getMessageList(this.data.form).then(result => {
+ if (result.data.records.length) {
+ var respList = result.data.records
+ let nowList = `orderList[${this.data.orderList.length}]`
+ var num = this.data.form.pageNum
+ var finished = ((num - 1) * this.data.form.pageSize + respList.length) >= result.data.total
+ if(this.data.form.pageNum == 1){
+ this.setData({ [nowList]: respList, ['form.pageNum']: (num + 1), top: 0, finished, requesting: false, loading: false })
+ } else {
+ this.setData({ [nowList]: respList, ['form.pageNum']: (num + 1), finished, requesting: false, loading: false })
+ }
+ } else {
+ this.setData({ finished: true, requesting: false, loading: false })
+ }
+ }).catch(err => {
+ this.setData({ requesting: false, loading: false })
+ util.showToast(err)
+ }).then(() => {
+ this.refresh = this.refresh || this.selectComponent('#refresh')
+ this.refresh.setRefresh(false)
+ })
+ },
+ lookItem: function (e) {
+ var item = this.data.orderList[e.currentTarget.dataset.page][e.currentTarget.dataset.index]
+ wx.navigateTo({ url: '/pages/message/detail/index?id=' + item.id })
+ },
+ searchList: function(){
+ // wx.navigateTo({ url: '/pages/message/search-list/index' })
+ }
+ }
+})
\ No newline at end of file
diff --git a/client/message/index/index.json b/client/message/index/index.json
new file mode 100644
index 0000000..f5c7a85
--- /dev/null
+++ b/client/message/index/index.json
@@ -0,0 +1,14 @@
+{
+ "component": true,
+ "usingComponents": {
+ "van-search": "/components/search/index",
+ "refresh-view": "/components/refresh-view/index",
+ "van-tabs": "/components/tabs/index",
+ "van-tab": "/components/tab/index",
+ "van-divider": "/components/divider/index",
+ "van-loading": "/components/loading/index",
+ "skeleton": "/components/skeleton/index",
+ "skeleton-avatar": "/components/skeleton-avatar/index",
+ "skeleton-paragraph": "/components/skeleton-paragraph/index"
+ }
+}
\ No newline at end of file
diff --git a/client/message/index/index.wxml b/client/message/index/index.wxml
new file mode 100644
index 0000000..08bc3df
--- /dev/null
+++ b/client/message/index/index.wxml
@@ -0,0 +1,27 @@
+
+
+ 消息
+
+
+
+
+
+
+
+
+ {{loading? '正在加载' : '暂无消息'}}
+
+
+
+
+
+
+
+
+
+
+
+ {{finished?'到底啦~':'加载中...'}}
+
+
+
diff --git a/client/message/index/index.wxss b/client/message/index/index.wxss
new file mode 100644
index 0000000..13a97eb
--- /dev/null
+++ b/client/message/index/index.wxss
@@ -0,0 +1,4 @@
+/* pages/mall/index/index.wxss */
+.margin-l{
+ margin-left: 32rpx;
+}
\ No newline at end of file
diff --git a/pages/client/order-list/index.js b/client/order-list/index.js
similarity index 97%
rename from pages/client/order-list/index.js
rename to client/order-list/index.js
index 872b0ad..77053f6 100644
--- a/pages/client/order-list/index.js
+++ b/client/order-list/index.js
@@ -1,6 +1,6 @@
// pages/client/order-list/index.js
-import { getCustomerOrderList } from "../../../api/saas"
-const util = require('../../../utils/util')
+import { getCustomerOrderList } from "../../api/saas"
+const util = require('../../utils/util')
const app = getApp()
Page({
diff --git a/pages/client/order-list/index.json b/client/order-list/index.json
similarity index 100%
rename from pages/client/order-list/index.json
rename to client/order-list/index.json
diff --git a/pages/client/order-list/index.wxml b/client/order-list/index.wxml
similarity index 100%
rename from pages/client/order-list/index.wxml
rename to client/order-list/index.wxml
diff --git a/pages/client/order-list/index.wxss b/client/order-list/index.wxss
similarity index 100%
rename from pages/client/order-list/index.wxss
rename to client/order-list/index.wxss
diff --git a/pages/client/workbench/index.js b/client/workbench/index.js
similarity index 95%
rename from pages/client/workbench/index.js
rename to client/workbench/index.js
index 7ba85e4..b439839 100644
--- a/pages/client/workbench/index.js
+++ b/client/workbench/index.js
@@ -1,6 +1,6 @@
// pages/index/index.js
-import { getStatisticsInfo } from "../../../api/saas"
-const event = require('../../../utils/event')
+import { getStatisticsInfo } from "../../api/saas"
+const event = require('../../utils/event')
const app = getApp()
Component({
diff --git a/pages/client/workbench/index.json b/client/workbench/index.json
similarity index 100%
rename from pages/client/workbench/index.json
rename to client/workbench/index.json
diff --git a/pages/client/workbench/index.wxml b/client/workbench/index.wxml
similarity index 100%
rename from pages/client/workbench/index.wxml
rename to client/workbench/index.wxml
diff --git a/pages/client/workbench/index.wxss b/client/workbench/index.wxss
similarity index 100%
rename from pages/client/workbench/index.wxss
rename to client/workbench/index.wxss
diff --git a/pages/home/customer-info/index.js b/pages/home/customer-info/index.js
index 4a2b3b1..3d2403a 100644
--- a/pages/home/customer-info/index.js
+++ b/pages/home/customer-info/index.js
@@ -68,7 +68,7 @@ Scene({
this.setData({ ['form.defaultPaymentMethod']: detail.id })
},
registCustomer: function(){
- wx.navigateTo({ url: `/pages/client/registe/index?id=${this.data.form.id}` })
+ wx.navigateTo({ url: `/pages/home/registe/index?id=${this.data.form.id}` })
},
onHide: function() {
this.setData({ visible: false })
diff --git a/pages/home/customer-list/index.js b/pages/home/customer-list/index.js
index 279514b..da46668 100644
--- a/pages/home/customer-list/index.js
+++ b/pages/home/customer-list/index.js
@@ -102,7 +102,7 @@ Scene({
},
bindCustomer: function(e){
var item = this.data.orderList[e.currentTarget.dataset.page][e.currentTarget.dataset.index]
- wx.navigateTo({ url: `/pages/client/registe/index?id=${item.id}` })
+ wx.navigateTo({ url: `/pages/home/registe/index?id=${item.id}` })
},
onUnload: function(){
event.remove('EventMessage', this)
diff --git a/pages/client/registe/index.js b/pages/home/registe/index.js
similarity index 100%
rename from pages/client/registe/index.js
rename to pages/home/registe/index.js
diff --git a/pages/client/registe/index.json b/pages/home/registe/index.json
similarity index 100%
rename from pages/client/registe/index.json
rename to pages/home/registe/index.json
diff --git a/pages/client/registe/index.wxml b/pages/home/registe/index.wxml
similarity index 100%
rename from pages/client/registe/index.wxml
rename to pages/home/registe/index.wxml
diff --git a/pages/client/registe/index.wxss b/pages/home/registe/index.wxss
similarity index 100%
rename from pages/client/registe/index.wxss
rename to pages/home/registe/index.wxss
diff --git a/pages/login/index.js b/pages/login/index.js
index 9d29f0f..401c315 100644
--- a/pages/login/index.js
+++ b/pages/login/index.js
@@ -421,7 +421,7 @@ Page({
bindCustomer(this.data.metaData).then(result => {
this.data.metaData = null
this.setData({loging: false})
- wx.redirectTo({ url: '/pages/client/index/index' })
+ wx.redirectTo({ url: '/client/index/index' })
}).catch(error => {
this.setData({loging: false})
util.showToast(error)
diff --git a/pages/process/payment/index.js b/pages/process/payment/index.js
index acf9caa..4814ec9 100644
--- a/pages/process/payment/index.js
+++ b/pages/process/payment/index.js
@@ -183,7 +183,7 @@ Scene({
} else if(err.indexOf('客户未注册') >= 0){
Dialog.confirm({ title: '温馨提示', message: '该客户注册成为纸通宝用户,才可以使用千鸟代付,现在去注册?' }).then(() => {
var cid = this.data.orderList[0].factoryCustomerId
- wx.navigateTo({ url: '/pages/client/registe/index?id=' + cid })
+ wx.navigateTo({ url: '/pages/home/registe/index?id=' + cid })
}).catch(err => {
})
} else if(err.indexOf('没有开通代付') >= 0){