diff --git a/app.json b/app.json
index 6bb229e..fdf791a 100644
--- a/app.json
+++ b/app.json
@@ -18,6 +18,7 @@
"pages/process/payment/index",
"pages/htmls/agreement/index",
"pages/htmls/auths/index",
+ "pages/htmls/banner/index",
"pages/message/card-list/index",
"pages/message/detail/index",
"pages/storage/index/index",
@@ -28,6 +29,7 @@
"pages/storage/order-info/index",
"pages/storage/order-settlement/index",
"pages/agent/agent-list/index",
+ "pages/agent/ability-list/index",
"pages/agent/factory-detail/index",
"pages/agent/order-list/index",
"pages/agent/focus-list/index",
diff --git a/pages/agent/ability-list/index.js b/pages/agent/ability-list/index.js
new file mode 100644
index 0000000..9183d9c
--- /dev/null
+++ b/pages/agent/ability-list/index.js
@@ -0,0 +1,66 @@
+// pages/agent/ability-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/agent/ability-list/index.json b/pages/agent/ability-list/index.json
new file mode 100644
index 0000000..8835af0
--- /dev/null
+++ b/pages/agent/ability-list/index.json
@@ -0,0 +1,3 @@
+{
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/agent/ability-list/index.wxml b/pages/agent/ability-list/index.wxml
new file mode 100644
index 0000000..c419e4a
--- /dev/null
+++ b/pages/agent/ability-list/index.wxml
@@ -0,0 +1,2 @@
+
+pages/agent/ability-list/index.wxml
diff --git a/pages/agent/ability-list/index.wxss b/pages/agent/ability-list/index.wxss
new file mode 100644
index 0000000..4ea6b85
--- /dev/null
+++ b/pages/agent/ability-list/index.wxss
@@ -0,0 +1 @@
+/* pages/agent/ability-list/index.wxss */
\ No newline at end of file
diff --git a/pages/agent/factory-fragment/index.js b/pages/agent/factory-fragment/index.js
index 16cce7b..e596587 100644
--- a/pages/agent/factory-fragment/index.js
+++ b/pages/agent/factory-fragment/index.js
@@ -52,7 +52,7 @@ Component({
this.data.firstShow = true
},
toAbility: function(){
- wx.navigateTo({ url: '/pages/agent/ability/index' })
+ wx.navigateTo({ url: '/pages/agent/ability-list/index' })
},
fetchRegionList: function () {
getFactoryCity().then(result => {
@@ -84,11 +84,7 @@ Component({
if (this.data.requesting || this.data.finished) {
return
}
- if (this.data.loading) {
- this.data.requesting = true
- } else {
- this.setData({ requesting: true })
- }
+ this.data.requesting = true
getFactoryPrice(this.data.form).then(result => {
if (result.data.records.length) {
var respList = result.data.records
diff --git a/pages/agent/factory-fragment/index.json b/pages/agent/factory-fragment/index.json
index e82a215..af23ead 100644
--- a/pages/agent/factory-fragment/index.json
+++ b/pages/agent/factory-fragment/index.json
@@ -6,6 +6,7 @@
"refresh-view": "/components/refresh-view/index",
"van-divider": "/components/divider/index",
"van-loading": "/components/loading/index",
+ "van-image": "/components/image/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
index a0221c3..0f7d71c 100644
--- a/pages/agent/factory-fragment/index.wxml
+++ b/pages/agent/factory-fragment/index.wxml
@@ -13,6 +13,13 @@
{{loading? '正在加载' : '暂无数据'}}
+
+
+
+
+
+
+
diff --git a/pages/htmls/banner/index.js b/pages/htmls/banner/index.js
new file mode 100644
index 0000000..fd3bf13
--- /dev/null
+++ b/pages/htmls/banner/index.js
@@ -0,0 +1,42 @@
+// pages/message/detail/index.js
+import Scene from '../../index/scene'
+const math = require('../../../utils/math')
+const app = getApp()
+
+Scene({
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ fheight: app.globalData.fragmentHeight,
+ src: null,
+ height: 1200
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ if(!options.src){
+ wx.navigateBack()
+ return
+ }
+ wx.showLoading({ title: '处理中', mask: true })
+ this.setData({
+ fheight: app.globalData.fragmentHeight,
+ StatusBar: app.globalData.StatusBar || 40,
+ CustomBar: app.globalData.CustomBar || (app.globalData.isIos ? 64 : 60),
+ src: options.src
+ })
+ },
+ onImageLoad: function({detail}){
+ if(detail && detail.width){
+ var radio = math.divide(detail.width, 750)
+ var height = parseInt(math.divide(detail.height, radio))
+ this.setData({ height })
+ }
+ wx.hideLoading()
+ },
+ backPage() {
+ wx.navigateBack()
+ }
+})
\ No newline at end of file
diff --git a/pages/htmls/banner/index.json b/pages/htmls/banner/index.json
new file mode 100644
index 0000000..d437b7c
--- /dev/null
+++ b/pages/htmls/banner/index.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "van-image": "/components/image/index",
+ "van-loading": "/components/loading/index",
+ "notification": "/pages/message/notification/index"
+ }
+}
\ No newline at end of file
diff --git a/pages/htmls/banner/index.wxml b/pages/htmls/banner/index.wxml
new file mode 100644
index 0000000..9c9f764
--- /dev/null
+++ b/pages/htmls/banner/index.wxml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/htmls/banner/index.wxss b/pages/htmls/banner/index.wxss
new file mode 100644
index 0000000..f42776e
--- /dev/null
+++ b/pages/htmls/banner/index.wxss
@@ -0,0 +1 @@
+/* pages/message/detail/index.wxss */
\ No newline at end of file
diff --git a/utils/util.js b/utils/util.js
index 3a70e94..345daeb 100644
--- a/utils/util.js
+++ b/utils/util.js
@@ -180,6 +180,34 @@ function combination(arr, m) {
}
}
+
+const tokenList = [
+
+]
+
+function navigateTo(url){
+ var white = true
+ for (let index = 0; index < tokenList.length; index++) {
+ if(url.indexOf(tokenList[index]) == -1){
+ white = false
+ break
+ }
+ }
+ if(white && !app.userInfo){
+ wx.navigateTo({ url: '/pages/login/index' })
+ return
+ }
+ wx.navigateTo({ url })
+}
+
+function navigateTarget(redirectInfo){
+ if(redirectInfo.targetView == 'showImage'){
+ navigateTo('/pages/htmls/banner/index?src=' + redirectInfo.params.id)
+ } else if(redirectInfo.targetView == 'proxySellActivity'){
+ navigateTo('/pages/agent/ability-list/index')
+ }
+}
+
module.exports = {
isEmpty: isEmpty,
extend: extend,
@@ -193,5 +221,7 @@ module.exports = {
showBackToast: showBackToast,
checkPhone: checkPhone,
checkId: checkId,
- combination: combination
+ combination: combination,
+ navigateTo: navigateTo,
+ navigateTarget: navigateTarget
}
\ No newline at end of file