From bf71677b82cb80ca640c4acbbf4dfcd022b4c811 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Fri, 11 Jun 2021 12:00:32 +0800 Subject: [PATCH] no message --- pages/index/index.js | 5 ++--- workers/process.js | 11 ++++++++--- xtends/client/index/index.wxml | 10 +++++----- xtends/statics/index/index.js | 15 +++------------ xtends/statics/index/index.wxml | 5 ++--- 5 files changed, 20 insertions(+), 26 deletions(-) diff --git a/pages/index/index.js b/pages/index/index.js index a4c6920..77eefbd 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -1,6 +1,6 @@ // pages/administ/index.js import Scene from './scene' -import { getMessageList } from "../../api/saas" +import { sconfig, getMessageList } from "../../api/saas" import { headerFactoryId } from "../../api/user" const event = require('../../utils/event') const storage = require('../../utils/storage') @@ -112,8 +112,7 @@ Scene({ } }, fetchMessage: function(){ - // var params = { url: sconfig.baseUrl, xAppId: app.xAppId} - // params.url = sconfig.baseUrl + '/message-center/message/get/message-list' + // var params = { url: sconfig.baseUrl + '/message-center/message/get/message-list', xAppId: app.xAppId} // params.xFactoryId = app.userInfo.factoryId // params.authorization = app.globalData.authorization // this.worker.postMessage({ type: 1, params }) diff --git a/workers/process.js b/workers/process.js index ab033af..7a8b5c7 100644 --- a/workers/process.js +++ b/workers/process.js @@ -2,9 +2,14 @@ worker.onMessage(function (res) { console.log('这是worker内部线程打印的') console.log(res) + if(res.type == 1){ + fetchMessages(worker, res.params, res.data) + } +}) +function fetchMessages(worker, params, data){ worker.request({ - header: { 'X-APP-ID': res.params.xAppId, 'X-FACTORY-ID': res.params.xFactoryId, 'Authorization': 'QNT ' + res.params.authorization }, - url: res.params.url, + header: { 'X-APP-ID': params.xAppId, 'X-FACTORY-ID': params.xFactoryId, 'Authorization': 'QNT ' + params.authorization }, + url: params.url, data: { productType: 'ZTB_FACTORY', status: 0 }, method: 'GET', success: function (result) { @@ -13,4 +18,4 @@ worker.onMessage(function (res) { } } }) -}) \ No newline at end of file +} \ No newline at end of file diff --git a/xtends/client/index/index.wxml b/xtends/client/index/index.wxml index 3005b31..33d06fc 100644 --- a/xtends/client/index/index.wxml +++ b/xtends/client/index/index.wxml @@ -19,23 +19,23 @@ 18565126880 - + 优惠券 - + 分享邀请 - + 历史订单 - + 消息列表 - + 问题反馈 diff --git a/xtends/statics/index/index.js b/xtends/statics/index/index.js index 5356932..4aa3991 100644 --- a/xtends/statics/index/index.js +++ b/xtends/statics/index/index.js @@ -58,17 +58,7 @@ Scene({ // animation: true, // categories: chartData.categories, series: chartData.series, - color: [ - "#1890FF", - "#91CB74", - "#FAC858", - "#EE6666", - "#73C0DE", - "#3CA272", - "#FC8452", - "#9A60B4", - "#ea7ccc" - ], + color: [ "#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", "#ea7ccc" ], dataLabel: true, width: that.data.cWidth, height: that.data.cHeight, @@ -104,8 +94,9 @@ Scene({ touchColumn(e) { canvaColumn.showToolTip(e, { formatter: function (item) { + console.log(item) return item.name + ':' + item.data } - }); + }) } }) \ No newline at end of file diff --git a/xtends/statics/index/index.wxml b/xtends/statics/index/index.wxml index 92b4192..8eef297 100644 --- a/xtends/statics/index/index.wxml +++ b/xtends/statics/index/index.wxml @@ -1,7 +1,7 @@ - 报表智能 + 智能报表 @@ -29,8 +29,7 @@ 收货统计 - - + 收货总重量