Browse Source

no message

feature/v2.1
xpz2018 4 years ago
parent
commit
bf71677b82
5 changed files with 20 additions and 26 deletions
  1. 5
      pages/index/index.js
  2. 11
      workers/process.js
  3. 10
      xtends/client/index/index.wxml
  4. 15
      xtends/statics/index/index.js
  5. 5
      xtends/statics/index/index.wxml

5
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 })

11
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) {
}
}
})
})
}

10
xtends/client/index/index.wxml

@ -19,23 +19,23 @@
<view style="color:black;font-size:30rpx;margin-top:16rpx">18565126880</view>
</view>
<view style="height:48rpx"></view>
<van-cell is-link url="/pages/home/coupon/index">
<van-cell is-link url="/xtends/client/home/coupon/index">
<van-icon slot="icon" name="coupon-o" size="20px" />
<view class="van-cell-text" slot="title" style="margin-left:16rpx">优惠券</view>
</van-cell>
<van-cell is-link url="/pages/message/index/index">
<van-cell is-link url="/xtends/client/message/index/index">
<van-icon slot="icon" name="expand-o" size="20px" />
<view class="van-cell-text" slot="title" style="margin-left:16rpx">分享邀请</view>
</van-cell>
<van-cell is-link url="/pages/order/index/index">
<van-cell is-link url="/xtends/client/order/index/index">
<van-icon slot="icon" name="balance-list-o" size="20px" />
<view class="van-cell-text" slot="title" style="margin-left:16rpx">历史订单</view>
</van-cell>
<van-cell is-link url="/pages/message/index/index">
<van-cell is-link url="/xtends/client/message/index/index">
<van-icon slot="icon" name="chat-o" size="20px" />
<view class="van-cell-text" slot="title" style="margin-left:16rpx">消息列表</view>
</van-cell>
<van-cell is-link url="/pages/message/index/index">
<van-cell is-link url="/xtends/client/message/index/index">
<van-icon slot="icon" name="service-o" size="20px" />
<view class="van-cell-text" slot="title" style="margin-left:16rpx">问题反馈</view>
</van-cell>

15
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
}
});
})
}
})

5
xtends/statics/index/index.wxml

@ -1,7 +1,7 @@
<!--xtends//statics/index/index.wxml-->
<wxs module="formate" src="../../../pages/formate.wxs"></wxs>
<cu-custom bgColor="bg-white" isBack="{{true}}">
<view slot="content">报表智能</view>
<view slot="content">智能报表</view>
</cu-custom>
<view style="padding: 0rpx 28rpx;margin-top:24rpx">
@ -29,8 +29,7 @@
<view class="text-black text-sg text-bold">收货统计</view>
</view>
<view style="padding:0rpx 24rpx 0rpx 24rpx">
<canvas canvas-id="canvasColumn" id="canvasColumn" class="charts" bindtouchstart="touchColumn">
</canvas>
<canvas canvas-id="canvasColumn" id="canvasColumn" class="charts" bindtouchstart="touchColumn"></canvas>
</view>
<view class="flex flex-justify" style="padding:0rpx 30rpx">
<view class="text-black text-sg">收货总重量</view>

Loading…
Cancel
Save