Browse Source

no message

feature/v2.1
xpz2018 4 years ago
parent
commit
1a73e95a7a
8 changed files with 25 additions and 0 deletions
  1. 4
      pages/agent/ability-item/index.js
  2. 4
      pages/agent/agent-item/index.js
  3. 6
      pages/agent/factory-detail/index.js
  4. 1
      pages/agent/factory-detail/index.json
  5. 2
      pages/agent/factory-detail/index.wxml
  6. 6
      pages/moment/new-list/index.js
  7. 1
      pages/moment/new-list/index.json
  8. 1
      pages/moment/new-list/index.wxml

4
pages/agent/ability-item/index.js

@ -39,6 +39,10 @@ Component({
wx.navigateTo({ url: '/pages/login/index' }) wx.navigateTo({ url: '/pages/login/index' })
return return
} }
if (!app.userInfo.type || app.userInfo.type.indexOf('ADMIN') < 0) {
util.showToast('您不是工厂管理员,无法预约代卖,请联系工厂管理员')
return
}
if(!this.data.item.isOperations){ if(!this.data.item.isOperations){
util.showToast(this.data.item.manageNotifyMessage) util.showToast(this.data.item.manageNotifyMessage)
return return

4
pages/agent/agent-item/index.js

@ -36,6 +36,10 @@ Component({
wx.navigateTo({ url: '/pages/login/index' }) wx.navigateTo({ url: '/pages/login/index' })
return return
} }
if (!app.userInfo.type || app.userInfo.type.indexOf('ADMIN') < 0) {
util.showToast('您不是工厂管理员,无法预约代卖,请联系工厂管理员')
return
}
if(!this.data.item.isOperations){ if(!this.data.item.isOperations){
util.showToast(this.data.item.manageNotifyMessage) util.showToast(this.data.item.manageNotifyMessage)
return return

6
pages/agent/factory-detail/index.js

@ -1,5 +1,6 @@
// pages/message/detail/index.js // pages/message/detail/index.js
import Scene from '../../index/scene' import Scene from '../../index/scene'
import Dialog from '../../../components/dialog/dialog'
import { getFactoryPriceDetail, userPushFollowMill } from "../../../api/ztb" import { getFactoryPriceDetail, userPushFollowMill } from "../../../api/ztb"
const event = require('../../../utils/event') const event = require('../../../utils/event')
const util = require('../../../utils/util') const util = require('../../../utils/util')
@ -96,6 +97,11 @@ Scene({
wx.navigateTo({ url: '/pages/login/index' }) wx.navigateTo({ url: '/pages/login/index' })
return return
} }
if (!app.userInfo.type || app.userInfo.type.indexOf('ADMIN') < 0) {
Dialog.alert({ title: '温馨提示', message: '您不是工厂管理员,无法预约代卖,请联系工厂管理员' }).then(() => {
})
return
}
if(!this.data.factoryDetail.isOperations){ if(!this.data.factoryDetail.isOperations){
util.showToast(this.data.factoryDetail.manageNotifyMessage) util.showToast(this.data.factoryDetail.manageNotifyMessage)
return return

1
pages/agent/factory-detail/index.json

@ -6,6 +6,7 @@
"van-tabi": "/components/tabi/index", "van-tabi": "/components/tabi/index",
"van-image": "/components/image/index", "van-image": "/components/image/index",
"van-button": "/components/button/index", "van-button": "/components/button/index",
"van-dialog": "/components/dialog/index",
"submit-layout": "/components/submit-layout/index", "submit-layout": "/components/submit-layout/index",
"notification": "/pages/message/notification/index" "notification": "/pages/message/notification/index"
} }

2
pages/agent/factory-detail/index.wxml

@ -130,6 +130,8 @@
<submit-layout wx:if="{{factoryDetail}}"> <submit-layout wx:if="{{factoryDetail}}">
<van-button type="{{factoryDetail.isOperations? 'info' : 'default'}}" custom-style="height:88rpx;width:686rpx" bind:click="saleGood">我要卖货</van-button> <van-button type="{{factoryDetail.isOperations? 'info' : 'default'}}" custom-style="height:88rpx;width:686rpx" bind:click="saleGood">我要卖货</van-button>
</submit-layout> </submit-layout>
<van-dialog id="van-dialog" />
<notification id="qn-notification"/> <notification id="qn-notification"/>
<wxs module="priceItem"> <wxs module="priceItem">

6
pages/moment/new-list/index.js

@ -1,5 +1,6 @@
// pages/message/detail/index.js // pages/message/detail/index.js
import Scene from '../../index/scene' import Scene from '../../index/scene'
import Dialog from '../../../components/dialog/dialog'
import { getPaperMillOfInformationList } from "../../../api/ztb" import { getPaperMillOfInformationList } from "../../../api/ztb"
const util = require('../../../utils/util') const util = require('../../../utils/util')
const math = require('../../../utils/math') //导入模块 const math = require('../../../utils/math') //导入模块
@ -38,6 +39,11 @@ Scene({
wx.navigateTo({url: '/pages/login/index' }) wx.navigateTo({url: '/pages/login/index' })
return return
} }
if (!app.userInfo.type || app.userInfo.type.indexOf('ADMIN') < 0) {
Dialog.alert({ title: '温馨提示', message: '您不是工厂管理员,无法预约代卖,请联系工厂管理员' }).then(() => {
})
return
}
if(!e.currentTarget.dataset.operations){ if(!e.currentTarget.dataset.operations){
util.showToast(e.currentTarget.dataset.msg) util.showToast(e.currentTarget.dataset.msg)
return return

1
pages/moment/new-list/index.json

@ -1,6 +1,7 @@
{ {
"usingComponents": { "usingComponents": {
"van-loading": "/components/loading/index", "van-loading": "/components/loading/index",
"van-dialog": "/components/dialog/index",
"notification": "/pages/message/notification/index" "notification": "/pages/message/notification/index"
} }
} }

1
pages/moment/new-list/index.wxml

@ -88,4 +88,5 @@
</view> </view>
</scroll-view> </scroll-view>
<van-dialog id="van-dialog" />
<notification id="qn-notification"/> <notification id="qn-notification"/>
Loading…
Cancel
Save