|
|
@ -1,5 +1,6 @@ |
|
|
// pages/stock/index.js
|
|
|
// pages/stock/index.js
|
|
|
const request = require('../../../utils/request') //导入模块
|
|
|
const request = require('../../../utils/request') //导入模块
|
|
|
|
|
|
const util = require('../../../utils/util') |
|
|
const app = getApp() |
|
|
const app = getApp() |
|
|
|
|
|
|
|
|
Component({ |
|
|
Component({ |
|
|
@ -12,6 +13,7 @@ Component({ |
|
|
*/ |
|
|
*/ |
|
|
data: { |
|
|
data: { |
|
|
height: app.globalData.safeFragmentHeight - 190, |
|
|
height: app.globalData.safeFragmentHeight - 190, |
|
|
|
|
|
safeBottom: app.globalData.safeBottom, |
|
|
firstShow: false, |
|
|
firstShow: false, |
|
|
tabList: [ '热门', '纸品价格', '车辆排队', '纸厂扣点' ], |
|
|
tabList: [ '热门', '纸品价格', '车辆排队', '纸厂扣点' ], |
|
|
tabIndex: 0 |
|
|
tabIndex: 0 |
|
|
@ -23,7 +25,7 @@ Component({ |
|
|
fragment.onRestart() |
|
|
fragment.onRestart() |
|
|
} |
|
|
} |
|
|
if (!this.data.firstShow) { |
|
|
if (!this.data.firstShow) { |
|
|
this.setData({ height: app.globalData.safeFragmentHeight - 190, tabList: this.data.tabList}) |
|
|
|
|
|
|
|
|
this.setData({ height: app.globalData.safeFragmentHeight - 190, tabList: this.data.tabList, safeBottom: app.globalData.safeBottom}) |
|
|
// request.get('/information-center/article-category/get/article-category-list').then(result => {
|
|
|
// request.get('/information-center/article-category/get/article-category-list').then(result => {
|
|
|
// for (let index = 0; index < result.data.length; index++) {
|
|
|
// for (let index = 0; index < result.data.length; index++) {
|
|
|
// this.data.tabList[index + 1] = result.data[index].name
|
|
|
// this.data.tabList[index + 1] = result.data[index].name
|
|
|
@ -44,6 +46,9 @@ Component({ |
|
|
}, |
|
|
}, |
|
|
stopTouchMove: function(e){ |
|
|
stopTouchMove: function(e){ |
|
|
return false |
|
|
return false |
|
|
|
|
|
}, |
|
|
|
|
|
postMoment: function(){ |
|
|
|
|
|
util.navigateTo('/pages/article/publish/index') |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |