Browse Source

no message

feature/v2.0
xpz2018 4 years ago
parent
commit
fbe054c28f
2 changed files with 10 additions and 4 deletions
  1. 8
      pages/process/order-price/index.js
  2. 6
      workers/process.js

8
pages/process/order-price/index.js

@ -102,7 +102,13 @@ Scene({
this.data.form.inspectionRemark = e.detail this.data.form.inspectionRemark = e.detail
}, },
paddingOrder: function(){ paddingOrder: function(){
this.setData({ ['form.isWithoutTare']: !this.data.form.isWithoutTare })
if(!this.data.form.isWithoutTare){
Dialog.confirm({ title: '温馨提示', message: '为了防止定价流程异常,请耐心查看纸品,是否确定无皮过磅?' }).then(() => {
this.setData({ ['form.isWithoutTare']: !this.data.form.isWithoutTare })
})
} else {
this.setData({ ['form.isWithoutTare']: !this.data.form.isWithoutTare })
}
}, },
cancelOrder: function(e){ cancelOrder: function(e){
Dialog.confirm({ title: '温馨提示', message: '确定取消该订单?' }).then(() => { Dialog.confirm({ title: '温馨提示', message: '确定取消该订单?' }).then(() => {

6
workers/process.js

@ -1,9 +1,9 @@
// worker的优化计算
// worker的优化计算,暂时没用到;
const math = require('../utils/math') const math = require('../utils/math')
worker.onMessage(function(res){
worker.onMessage(function (res) {
console.log('这是worker内部线程打印的') console.log('这是worker内部线程打印的')
console.log(res) console.log(res)
let sum = math.plus(res.x, res.y) let sum = math.plus(res.x, res.y)
worker.postMessage({ sum : sum })
worker.postMessage({ sum })
}) })
Loading…
Cancel
Save