From 76837ec484711ffbf1344bf250e9db9312c57138 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Thu, 7 Jan 2021 14:54:34 +0800 Subject: [PATCH] no message --- app.json | 4 -- pages/agent/agent-item/index.js | 6 ++- pages/agent/factory/index.js | 2 +- pages/article/detail/index.js | 2 +- pages/home/about/index.js | 49 ----------------------- pages/home/share/index.js | 25 ------------ pages/home/share/index.json | 3 -- pages/home/share/index.wxml | 4 -- pages/home/share/index.wxss | 1 - pages/html/bankcard/index.js | 51 ------------------------ pages/html/risk/index.js | 51 ------------------------ pages/index/index.js | 12 +++++- pages/mall/detail/index.js | 18 ++++----- pages/mall/offer/index.js | 66 ------------------------------- pages/mall/offer/index.json | 3 -- pages/mall/offer/index.wxml | 2 - pages/mall/offer/index.wxss | 1 - pages/mall/search/index.js | 51 ------------------------ pages/message/detail/index.js | 51 ------------------------ pages/moment/detail/index.js | 2 +- pages/moment/host-list/index.js | 66 ------------------------------- pages/moment/host-list/index.json | 3 -- pages/moment/host-list/index.wxml | 4 -- pages/moment/host-list/index.wxss | 1 - pages/purchase/detail/index.js | 2 +- pages/shop/money/index.js | 66 ------------------------------- pages/shop/money/index.json | 6 --- pages/shop/money/index.wxml | 43 -------------------- pages/shop/money/index.wxss | 1 - pages/ztbvip/index.js | 12 +++--- pages/ztbvip/index.wxml | 4 +- utils/util.js | 3 +- 32 files changed, 39 insertions(+), 576 deletions(-) delete mode 100644 pages/home/share/index.js delete mode 100644 pages/home/share/index.json delete mode 100644 pages/home/share/index.wxml delete mode 100644 pages/home/share/index.wxss delete mode 100644 pages/mall/offer/index.js delete mode 100644 pages/mall/offer/index.json delete mode 100644 pages/mall/offer/index.wxml delete mode 100644 pages/mall/offer/index.wxss delete mode 100644 pages/moment/host-list/index.js delete mode 100644 pages/moment/host-list/index.json delete mode 100644 pages/moment/host-list/index.wxml delete mode 100644 pages/moment/host-list/index.wxss delete mode 100644 pages/shop/money/index.js delete mode 100644 pages/shop/money/index.json delete mode 100644 pages/shop/money/index.wxml delete mode 100644 pages/shop/money/index.wxss diff --git a/app.json b/app.json index 524e9d9..aa0ac54 100644 --- a/app.json +++ b/app.json @@ -15,18 +15,15 @@ "pages/home/pinfo/index", "pages/home/qrcode/index", "pages/home/instructions/index", - "pages/home/share/index", "pages/shop/create/index", "pages/shop/detail/index", "pages/shop/order/index", "pages/shop/bidding/index", "pages/shop/bill/index", - "pages/shop/money/index", "pages/moment/paper/index", "pages/moment/create/index", "pages/moment/detail/index", "pages/moment/list/index", - "pages/moment/host-list/index", "pages/moment/host-info/index", "pages/moment/host-detail/index", "pages/article/publish/index", @@ -43,7 +40,6 @@ "pages/bidding/detail/index", "pages/mall/price-index/index", "pages/mall/detail/index", - "pages/mall/offer/index", "pages/mall/search/index", "pages/morder/index/index", "pages/morder/create/index", diff --git a/pages/agent/agent-item/index.js b/pages/agent/agent-item/index.js index 2b60e0f..0737856 100644 --- a/pages/agent/agent-item/index.js +++ b/pages/agent/agent-item/index.js @@ -47,7 +47,11 @@ Component({ this.setData({ ['item.cateIndex']: cateIndex }) } }, - saleGood: function(event){ + saleGood: function(e){ + if (!app.globalData.userInfo) { + wx.navigateTo({ url: '/pages/login/index' }) + return + } if(util.isEmpty(this.data.item.cateIndex)){ util.showToast('请选择一个纸品') return diff --git a/pages/agent/factory/index.js b/pages/agent/factory/index.js index 86b2845..85d8f35 100644 --- a/pages/agent/factory/index.js +++ b/pages/agent/factory/index.js @@ -147,7 +147,7 @@ Page({ onShareAppMessage: function () { return { title: this.data.factoryDetail.name + '废纸报价', - path: 'pages/login/index?url=/pages/agent/factory/index&key=id&value=' + this.data.factoryDetail.paperMillId + path: 'pages/index/index?url=/pages/agent/factory/index&key=id&value=' + this.data.factoryDetail.paperMillId } }, toService: function(){ diff --git a/pages/article/detail/index.js b/pages/article/detail/index.js index a75d32a..e2afe25 100644 --- a/pages/article/detail/index.js +++ b/pages/article/detail/index.js @@ -196,7 +196,7 @@ Page({ } return { title: this.data.momentDetail.title, - path: 'pages/login/index?url=/pages/article/detail/index&key=id&value=' + this.data.momentDetail.id, + path: 'pages/index/index?url=/pages/article/detail/index&key=id&value=' + this.data.momentDetail.id, imageUrl: imageUrl } } diff --git a/pages/home/about/index.js b/pages/home/about/index.js index 9c40b3c..3a2f5e8 100644 --- a/pages/home/about/index.js +++ b/pages/home/about/index.js @@ -13,54 +13,5 @@ Page({ */ 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/share/index.js b/pages/home/share/index.js deleted file mode 100644 index 8d07b8c..0000000 --- a/pages/home/share/index.js +++ /dev/null @@ -1,25 +0,0 @@ -// pages/home/share/index.js -const request = require('../../../utils/request') //导入模块 -const util = require('../../../utils/util') - -Page({ - - /** - * 页面的初始数据 - */ - data: { - - }, - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - // cloud.init() - }, - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { - - } -}) \ No newline at end of file diff --git a/pages/home/share/index.json b/pages/home/share/index.json deleted file mode 100644 index 8835af0..0000000 --- a/pages/home/share/index.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} \ No newline at end of file diff --git a/pages/home/share/index.wxml b/pages/home/share/index.wxml deleted file mode 100644 index 9bb8e04..0000000 --- a/pages/home/share/index.wxml +++ /dev/null @@ -1,4 +0,0 @@ - - - 纸通宝二维码 - diff --git a/pages/home/share/index.wxss b/pages/home/share/index.wxss deleted file mode 100644 index ec9f74c..0000000 --- a/pages/home/share/index.wxss +++ /dev/null @@ -1 +0,0 @@ -/* pages/home/share/index.wxss */ \ No newline at end of file diff --git a/pages/html/bankcard/index.js b/pages/html/bankcard/index.js index f2cf7cf..e099d3b 100644 --- a/pages/html/bankcard/index.js +++ b/pages/html/bankcard/index.js @@ -1,66 +1,15 @@ // pages/home/agreement/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/pages/html/risk/index.js b/pages/html/risk/index.js index f973d62..c346c51 100644 --- a/pages/html/risk/index.js +++ b/pages/html/risk/index.js @@ -1,66 +1,15 @@ // pages/html/risk/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/pages/index/index.js b/pages/index/index.js index 374e09b..2702d83 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -12,7 +12,8 @@ Page({ ], pageIndex: 1, safeBottom: app.globalData.safeBottom, - inited: false + inited: false, + path: null }, /************************************** 初始化流程 ********************************************/ onLoad: function (options) { @@ -25,6 +26,12 @@ Page({ // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 updateManager.applyUpdate() }) + if(options.url){ + this.data.path = options.url + if(options.key && options.value){ + this.data.path += '?' + options.key + '=' + options.value + } + } }, onReady: function () { wx.showLoading({ title: '获取中', mask: true }) @@ -87,6 +94,9 @@ Page({ app.globalData.userInfo = result.data wx.hideLoading() this.onResume() + if(this.data.path){ + wx.navigateTo({ url: this.data.path }) + } }).catch(err => { wx.hideLoading() }) diff --git a/pages/mall/detail/index.js b/pages/mall/detail/index.js index 7f1a7e4..87762a8 100644 --- a/pages/mall/detail/index.js +++ b/pages/mall/detail/index.js @@ -35,9 +35,7 @@ Page({ */ onLoad: function (options) { if (getCurrentPages().length == 1) { - this.setData({ - backStr: '首页' - }) + this.setData({ backStr: '首页' }) } this.setData({ imageHeight: 750, kg: app.globalData.kg, safeBottom: app.globalData.safeBottom }) event.on('EventMessage', this, this.onEvent) @@ -207,6 +205,10 @@ Page({ }, // 进入支付流程 offerProject: function (e) { + if (!app.globalData.userInfo) { + wx.navigateTo({ url: '/pages/login/index' }) + return + } if (!app.globalData.userInfo.isVIP) { this.wuxDialog.open({ resetOnClose: true, @@ -216,9 +218,7 @@ Page({ text: '确定', type: 'primary', onTap(e) { - wx.navigateTo({ - url: '/pages/ztbvip/index' - }) + wx.navigateTo({ url: '/pages/ztbvip/index' }) } }] }) @@ -294,7 +294,7 @@ Page({ } return { title: title, - path: 'pages/login/index?url=/pages/mall/detail/index&key=id&value=' + this.data.orderInfo.productId, + path: 'pages/index/index?url=/pages/mall/detail/index&key=id&value=' + this.data.orderInfo.productId, imageUrl: imgUrl, success: function (res) {} } @@ -311,9 +311,7 @@ Page({ if (!this.data.orderInfo) { return } - wx.navigateTo({ - url: '/pages/shop/detail/index?storeId=' + this.data.orderInfo.storeId - }) + util.navigateTo('/pages/shop/detail/index?storeId=' + this.data.orderInfo.storeId) }, biddingPrice: function (price) { if(util.isEmpty(price)){ diff --git a/pages/mall/offer/index.js b/pages/mall/offer/index.js deleted file mode 100644 index d9917e0..0000000 --- a/pages/mall/offer/index.js +++ /dev/null @@ -1,66 +0,0 @@ -// pages/mall/offer/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/pages/mall/offer/index.json b/pages/mall/offer/index.json deleted file mode 100644 index 8835af0..0000000 --- a/pages/mall/offer/index.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} \ No newline at end of file diff --git a/pages/mall/offer/index.wxml b/pages/mall/offer/index.wxml deleted file mode 100644 index ed54125..0000000 --- a/pages/mall/offer/index.wxml +++ /dev/null @@ -1,2 +0,0 @@ - -pages/mall/offer/index.wxml diff --git a/pages/mall/offer/index.wxss b/pages/mall/offer/index.wxss deleted file mode 100644 index f1b1cd1..0000000 --- a/pages/mall/offer/index.wxss +++ /dev/null @@ -1 +0,0 @@ -/* pages/mall/offer/index.wxss */ \ No newline at end of file diff --git a/pages/mall/search/index.js b/pages/mall/search/index.js index c1a7b0d..afd7fc3 100644 --- a/pages/mall/search/index.js +++ b/pages/mall/search/index.js @@ -1,66 +1,15 @@ // pages/mall/search/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/pages/message/detail/index.js b/pages/message/detail/index.js index 5c85a49..9e0d759 100644 --- a/pages/message/detail/index.js +++ b/pages/message/detail/index.js @@ -1,66 +1,15 @@ // pages/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/pages/moment/detail/index.js b/pages/moment/detail/index.js index f0221ca..bec30b4 100644 --- a/pages/moment/detail/index.js +++ b/pages/moment/detail/index.js @@ -195,7 +195,7 @@ Page({ } return { title: this.data.momentDetail.title, - path: 'pages/login/index?url=/pages/moment/detail/index&key=id&value=' + this.data.momentDetail.id, + path: 'pages/index/index?url=/pages/moment/detail/index&key=id&value=' + this.data.momentDetail.id, imageUrl: imageUrl } } diff --git a/pages/moment/host-list/index.js b/pages/moment/host-list/index.js deleted file mode 100644 index e8e6d0f..0000000 --- a/pages/moment/host-list/index.js +++ /dev/null @@ -1,66 +0,0 @@ -// pages/moment/host-list/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/pages/moment/host-list/index.json b/pages/moment/host-list/index.json deleted file mode 100644 index 8835af0..0000000 --- a/pages/moment/host-list/index.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} \ No newline at end of file diff --git a/pages/moment/host-list/index.wxml b/pages/moment/host-list/index.wxml deleted file mode 100644 index 90958fe..0000000 --- a/pages/moment/host-list/index.wxml +++ /dev/null @@ -1,4 +0,0 @@ - - - 纸吧列表 - diff --git a/pages/moment/host-list/index.wxss b/pages/moment/host-list/index.wxss deleted file mode 100644 index b33d556..0000000 --- a/pages/moment/host-list/index.wxss +++ /dev/null @@ -1 +0,0 @@ -/* pages/moment/host-list/index.wxss */ \ No newline at end of file diff --git a/pages/purchase/detail/index.js b/pages/purchase/detail/index.js index 63a5cf3..4edbc95 100644 --- a/pages/purchase/detail/index.js +++ b/pages/purchase/detail/index.js @@ -117,7 +117,7 @@ Page({ } return { title: title, - path: 'pages/login/index?url=/pages/purchase/detail/index&key=id&value=' + this.data.orderInfo.productId, + path: 'pages/index/index?url=/pages/purchase/detail/index&key=id&value=' + this.data.orderInfo.productId, imageUrl: imageUrl, success: function (res) {} } diff --git a/pages/shop/money/index.js b/pages/shop/money/index.js deleted file mode 100644 index ea7f038..0000000 --- a/pages/shop/money/index.js +++ /dev/null @@ -1,66 +0,0 @@ -// pages/shop/money/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/pages/shop/money/index.json b/pages/shop/money/index.json deleted file mode 100644 index 3570e67..0000000 --- a/pages/shop/money/index.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "usingComponents": { - "wux-divider": "/components/divider/index", - "wux-cell": "/components/cell/index" - } -} \ No newline at end of file diff --git a/pages/shop/money/index.wxml b/pages/shop/money/index.wxml deleted file mode 100644 index 25f63a3..0000000 --- a/pages/shop/money/index.wxml +++ /dev/null @@ -1,43 +0,0 @@ - - - 资金管理 - - - - - 账户余额(元) - - - ¥6000.66 - - - - - - - 保证金(元) - - - ¥6000.66 - - - - - 未结算金额(元) - - - ¥6000.66 - - - - - - - - - - - - - - \ No newline at end of file diff --git a/pages/shop/money/index.wxss b/pages/shop/money/index.wxss deleted file mode 100644 index c3bc00b..0000000 --- a/pages/shop/money/index.wxss +++ /dev/null @@ -1 +0,0 @@ -/* pages/shop/money/index.wxss */ \ No newline at end of file diff --git a/pages/ztbvip/index.js b/pages/ztbvip/index.js index 6324c09..b7ea51b 100644 --- a/pages/ztbvip/index.js +++ b/pages/ztbvip/index.js @@ -56,7 +56,7 @@ Page({ }) }, toAuthor: function(){ - if(!this.data.userInfo.isAuth){ + if(this.data.userInfo && !this.data.userInfo.isAuth){ util.navigateTo('/pages/home/idcard/index') } }, @@ -65,11 +65,13 @@ Page({ */ onGridTap:function(e){ var divIndexId=e.currentTarget.dataset.index - this.setData({ - divIndex:this.data.iconList[divIndexId].id - }) + this.setData({ divIndex:this.data.iconList[divIndexId].id }) }, openVip:function(){ + if(!app.globalData.userInfo){ + wx.navigateTo({ url: '/pages/login/index' }) + return + } if(!app.globalData.userInfo.isAuth){ this.wuxDialog.open({ resetOnClose: true, @@ -79,7 +81,7 @@ Page({ text: '确定', type: 'primary', onTap(e) { - wx.navigateTo({ url: '/pages/home/idcard/index' }) + util.navigateTo('/pages/home/idcard/index') } }] }) diff --git a/pages/ztbvip/index.wxml b/pages/ztbvip/index.wxml index 5f19e5d..329084b 100644 --- a/pages/ztbvip/index.wxml +++ b/pages/ztbvip/index.wxml @@ -5,7 +5,7 @@ - + @@ -15,7 +15,7 @@ {{userInfo.isAuth == 1 ? '已认证' : '未实名认证'}} - 去认证 + 去认证 diff --git a/utils/util.js b/utils/util.js index 8282917..a3d3b52 100644 --- a/utils/util.js +++ b/utils/util.js @@ -184,7 +184,8 @@ const tokenList = [ '/pages/html/integral/index', '/pages/withdrawal/balance/index', '/pages/agent/order/index', - '/pages/home/idcard/index' + '/pages/home/idcard/index', + '/pages/shop/detail/index' ] function navigateTo(url){