Merge branch 'dev' of git.oa00.com:xiaowen/swsWecat into dev

* 'dev' of git.oa00.com:xiaowen/swsWecat:
  1
  cxw-010203
  no message

# Conflicts:
#	components/indexCom/eventChild/index.wxml
dev
liuyongli 3 years ago
commit 927317a4f0

@ -1,22 +1,45 @@
//app.js
App({
onLaunch: function () {
// 展示本地存储能力
var logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
const systemInfo = wx.getSystemInfoSync(); //获取系统信息
const menuInfo = wx.getMenuButtonBoundingClientRect(); // 获取胶囊按钮的信息
this.globalData.menuHeight = menuInfo.height; // 获取胶囊按钮的高
this.globalData.statusBarHeight = systemInfo.statusBarHeight; // 获取状态栏的高
this.globalData.menuRight = menuInfo.right; // 获取胶囊按钮的距离屏幕最右边的距离(此处用于设置导航栏左侧距离屏幕的距离)
this.globalData.navBarHeight = (menuInfo.top - systemInfo.statusBarHeight) * 2 + menuInfo.height; // 计算出导航栏的高度
},
onLaunch: function () {
// 展示本地存储能力
var logs = wx.getStorageSync('logs') || []
logs.unshift(Date.now())
wx.setStorageSync('logs', logs)
const systemInfo = wx.getSystemInfoSync(); //获取系统信息
const menuInfo = wx.getMenuButtonBoundingClientRect(); // 获取胶囊按钮的信息
this.globalData.menuHeight = menuInfo.height; // 获取胶囊按钮的高
this.globalData.statusBarHeight = systemInfo.statusBarHeight; // 获取状态栏的高
this.globalData.menuRight = menuInfo.right; // 获取胶囊按钮的距离屏幕最右边的距离(此处用于设置导航栏左侧距离屏幕的距离)
this.globalData.navBarHeight = (menuInfo.top - systemInfo.statusBarHeight) * 2 + menuInfo.height; // 计算出导航栏的高度
},
globalData: {
imageUrl: "https://cdn.sws010.com/wxapp/images",
navBarHeight:0,// 导航栏高度
menuHeight:0,//胶囊按钮 高度
statusBarHeight:0,//状态栏高度
menuRight:0,//胶囊按钮 距离屏幕右边的距离
navBarHeight: 0, // 导航栏高度
menuHeight: 0, //胶囊按钮 高度
statusBarHeight: 0, //状态栏高度
menuRight: 0, //胶囊按钮 距离屏幕右边的距离
request: function (prarms) {
return new Promise((resolve, reject) => {
wx.request({
url: 'http://cloud.sws010.com/api/v7.ashx',
data: {
version: "0.0.1",
...prarms
},
method: 'get',
success: function (res) {
//接口实际返回的内容在res.data中
if (res.data.Code == 1) {
resolve(res.data.Data);
} else {
reject(res.data)
}
},
fail: function (err) {
reject(err);
}
})
})
}
}
})

@ -0,0 +1,177 @@
export default {
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'line' // 默认为直线,可选为:'line' | 'shadow'
},
confine: true
},
legend: {
icon: 'rectangle',//data图标样式
itemWidth: 8,//data图标大小
itemHeight: 8,
left: 5,
textStyle: {
fontSize: 8,
fontWeight: 400
},
data: ['微博', '其他','短视频', '微信','APP', '论坛', '新闻'],
// color:['#FF4852','#FF6E25','#FFBF00','#20CC62','#00D6D6','#00AAFF','#7257FF'],
},
//图表位置
grid: {
left: 7,
right: 7,
bottom: 7,
top: 36,
containLabel: true
},
yAxis: [
{
type: 'value',
axisTick:{
show:false //去除刻度线
},
axisLine:{
show:false //去除轴线
},
axisLabel: {
color: '#999999',//y轴文本颜色
textStyle: {
fontSize : 9
}
},
splitLine: { //分割线
// lineStyle:{
// // color:"#2d3436"
// }
show: true,
lineStyle: {
type: 'dashed',
color: '#E8E8E8',
}
}
}
],
xAxis: [
{
type: 'category',
data: ['00:00', '04:00', '08:00', '12:00', '16:00', '20:00', '24:00'],
axisTick:{
show:false //去除刻度线
},
axisLine:{
show:false, //去除轴线
},
axisLabel: {
color: '#999999',//x轴文本颜色
textStyle: {
fontSize : 9
}
}
}
],
series: [
{
name: '微博',
type: 'line',
symbol:'none', //去圆点
data: [1400, 2000, 1500, 1800, 1490, 900, 310],
itemStyle: {
normal:{
color: '#FF4852',
lineStyle: {
color: '#FF4852'
}
}
}
},
{
name: '其他',
type: 'line',
symbol:'none', //去圆点
data: [1520, 1052, 141, 174, 1690, 250, 220],
itemStyle: {
normal:{
color: '#FF6E25',
lineStyle: {
color: '#FF6E25'
}
}
}
},
{
name: '短视频',
type: 'line',
symbol:'none', //去圆点
data: [210, 322, 551, 364, 960, 1307, 10],
itemStyle: {
normal:{
color: '#FFBF00',
lineStyle: {
color: '#FFBF00'
}
}
}
},
{
name: '微信',
type: 'line',
symbol:'none', //去圆点
data: [250, 362, 71, 374, 970, 130, 170],
itemStyle: {
normal:{
color: '#20CC62',
lineStyle: {
color: '#20CC62'
}
}
}
},
{
name: 'APP',
type: 'line',
symbol:'none', //去圆点
data: [20, 32, 41, 354, 90, 130, 10],
itemStyle: {
normal:{
color: '#00D6D6',
lineStyle: {
color: '#00D6D6'
}
}
}
},
{
name: '论坛',
type: 'line',
symbol:'none', //去圆点
data: [200, 382, 661, 34, 909, 1308, 150],
itemStyle: {
normal:{
color: '#00AAFF',
lineStyle: {
color: '#00AAFF'
}
}
}
},
{
name: '新闻',
type: 'line',
symbol:'none', //去圆点
data: [250, 326, 178, 349, 900, 1300, 140],
itemStyle: {
normal:{
color: '#7257FF',
lineStyle: {
color: '#7257FF'
}
}
}
}
]
}

@ -0,0 +1,42 @@
export default [
{
url:'/ruku.png',
text:'入库数据',
num:'198,897,987',
},
{
url:'/weibo.png',
text:'微博数据',
num:'198,897,987'
},
{
url:'/shipin.png',
text:'短视频数据',
num:'198,897,987'
},
{
url:'/weixin.png',
text:'微信数据',
num:'198,897,987'
},
{
url:'/app.png',
text:'APP数据',
num:'198,897,987'
},
{
url:'/luntan.png',
text:'论坛数据',
num:'198,897,987'
},
{
url:'/xinwen.png',
text:'新闻数据',
num:'198,897,987'
},
{
url:'/qita.png',
text:'其他数据',
num:'198,897,987'
},
]

@ -1,240 +1,46 @@
const app = getApp();
import totallist from "./dataConfig/totallist"
import dataOption from "./dataConfig/dataOption"
Component({
data: {
imageUrl: getApp().globalData.imageUrl,
active:0,
countYear: 0,
count6month: 0,
countAll: 0,
timelist: ['二十四小时', '最近七天', '最近三十天', '自定义'],
totallist:[
{
url:'/ruku.png',
text:'入库数据',
num:'198,897,987'
},
{
url:'/weibo.png',
text:'微博数据',
num:'198,897,987'
},
{
url:'/shipin.png',
text:'短视频数据',
num:'198,897,987'
},
{
url:'/weixin.png',
text:'微信数据',
num:'198,897,987'
},
{
url:'/app.png',
text:'APP数据',
num:'198,897,987'
},
{
url:'/luntan.png',
text:'论坛数据',
num:'198,897,987'
},
{
url:'/xinwen.png',
text:'新闻数据',
num:'198,897,987'
},
{
url:'/qita.png',
text:'其他数据',
num:'198,897,987'
},
],
totallist: [],
showChart: true,
chartOption: {
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'line' // 默认为直线,可选为:'line' | 'shadow'
},
confine: true
},
legend: {
icon: 'rectangle',//data图标样式
itemWidth: 8,//data图标大小
itemHeight: 8,
left: 5,
textStyle: {
fontSize: 8,
fontWeight: 400
},
data: ['微博', '其他','短视频', '微信','APP', '论坛', '新闻'],
// color:['#FF4852','#FF6E25','#FFBF00','#20CC62','#00D6D6','#00AAFF','#7257FF'],
},
//图表位置
grid: {
left: 7,
right: 7,
bottom: 7,
top: 36,
containLabel: true
},
yAxis: [
{
type: 'value',
axisTick:{
show:false //去除刻度线
},
axisLine:{
show:false //去除轴线
},
axisLabel: {
color: '#999999',//y轴文本颜色
textStyle: {
fontSize : 9
}
},
splitLine: { //分割线
// lineStyle:{
// // color:"#2d3436"
// }
show: true,
lineStyle: {
type: 'dashed',
color: '#E8E8E8',
}
}
}
],
xAxis: [
{
type: 'category',
data: ['00:00', '04:00', '08:00', '12:00', '16:00', '20:00', '24:00'],
axisTick:{
show:false //去除刻度线
},
axisLine:{
show:false, //去除轴线
},
axisLabel: {
color: '#999999',//x轴文本颜色
textStyle: {
fontSize : 9
}
}
}
],
series: [
{
name: '微博',
type: 'line',
symbol:'none', //去圆点
data: [1400, 2000, 1500, 1800, 1490, 900, 310],
itemStyle: {
normal:{
color: '#FF4852',
lineStyle: {
color: '#FF4852'
}
}
}
},
{
name: '其他',
type: 'line',
symbol:'none', //去圆点
data: [1520, 1052, 141, 174, 1690, 250, 220],
itemStyle: {
normal:{
color: '#FF6E25',
lineStyle: {
color: '#FF6E25'
}
}
}
},
{
name: '短视频',
type: 'line',
symbol:'none', //去圆点
data: [210, 322, 551, 364, 960, 1307, 10],
itemStyle: {
normal:{
color: '#FFBF00',
lineStyle: {
color: '#FFBF00'
}
}
}
},
{
name: '微信',
type: 'line',
symbol:'none', //去圆点
data: [250, 362, 71, 374, 970, 130, 170],
itemStyle: {
normal:{
color: '#20CC62',
lineStyle: {
color: '#20CC62'
}
}
}
},
{
name: 'APP',
type: 'line',
symbol:'none', //去圆点
data: [20, 32, 41, 354, 90, 130, 10],
itemStyle: {
normal:{
color: '#00D6D6',
lineStyle: {
color: '#00D6D6'
}
}
}
},
{
name: '论坛',
type: 'line',
symbol:'none', //去圆点
data: [200, 382, 661, 34, 909, 1308, 150],
itemStyle: {
normal:{
color: '#00AAFF',
lineStyle: {
color: '#00AAFF'
}
}
}
},
{
name: '新闻',
type: 'line',
symbol:'none', //去圆点
data: [250, 326, 178, 349, 900, 1300, 140],
itemStyle: {
normal:{
color: '#7257FF',
lineStyle: {
color: '#7257FF'
}
}
}
}
]
}
chartOption: dataOption
},
lifetimes: {
attached() {
// setTimeout(() => {
// this.setData({
// showChart: false
// })
// },1000)
app.globalData.request({action: 'getHomeCount0528', sType: 'Home', sTimeType: 3, iStatus: 1}).then(res => {
const data = res;
const sourcetypeCount = data.sourcetypeCount || [];
const arr = []
const imgObj = {'微博': '/weibo.png', '微信': '/weixin.png', 'APP': '/app.png', '论坛': '/luntan.png', '新闻': '/xinwen.png', '其他': '/qita.png'}
arr.push({
num: data.count,
text: '入库数据',
url: '/ruku.png'
})
sourcetypeCount.forEach(ele => {
let obj = {
num: ele.value,
text: ele.key + '数据',
url: imgObj[ele.key]
}
arr.push(obj)
})
this.setData({
countYear: data.count_year,
count6month: data.count_6month,
countAll: data.count_all,
totallist: arr
})
})
},
},
methods: {

@ -13,15 +13,15 @@
<view class="Cumulative">
<view class="Cumulative_box">
<view class="box">
<view class="box_num">12,233</view>
<view class="box_num">{{countAll}}</view>
<view class="box_text">历史累计入库</view>
</view>
<view class="box2">
<view class="box_num">12,233</view>
<view class="box_num">{{countYear}}</view>
<view class="box_text">一年累计入库</view>
</view>
<view class="box">
<view class="box_num">12,233</view>
<view class="box_num">{{count6month}}</view>
<view class="box_text">半年累计入库</view>
</view>
</view>

@ -62,7 +62,19 @@ Component({
]
},
methods: {
bindtaps(){
wx.request({
url: 'http://cloud.sws010.com/api/v7.ashx',
method:"POST",
success:(res)=>{
console.log(res.Data)
}
})
},
priceSel(e){
this.setData({
intervalSel: e.currentTarget.dataset.index

@ -2,8 +2,8 @@
<!-- 时间组件 -->
<time-component></time-component>
<view class="list_event" style="{{bgImage}}">
<view class="event_title">热点事件</view>
<view class="event_content" wx:for="{{questes}}" wx:if="{{index < 5}}" wx:key="index" data-quest='{{item}}' bindtap="to">
<view class="event_title" bindtap="bindtaps">热点事件</view>
<view class="event_content" wx:for="{{questes}}" wx:if="{{index < 5}}" wx:key="index" data-quest='{{item}}'>
<view class="event_text">
<view class="text_title">{{item.tip}}
</view>

@ -180,76 +180,12 @@ Page({
},
],
showChart: true,
positiveOption: {
grid:{
},
yAxis: [
{
type: 'value',
axisTick:{
show:false //去除刻度线
},
axisLine:{
show:false //去除轴线
},
axisLabel: {
color: '#999999',//y轴文本颜色
textStyle: {
fontSize : 9
}
},
splitLine: { //分割线
// lineStyle:{
// // color:"#2d3436"
// }
show: true,
lineStyle: {
type: 'dashed',
color: '#E8E8E8',
}
}
}
],
xAxis: [
{
type: 'category',
data: ['12月', '1月', '2月', '3月', '4月', '5月', '6月'],
axisTick:{
show:false //去除刻度线
},
axisLine:{
show:false, //去除轴线
},
axisLabel: {
color: '#999999',//x轴文本颜色
textStyle: {
fontSize : 9
}
}
}
],
series: {
type: 'line',
symbol:'none', //去圆点
data: [100, 200, 300, 500, 700, 500, 300],
itemStyle: {
normal:{
color: '#0084FF',
lineStyle: {
color: '#0084FF'
}
}
}}
},
option :{
grid:{
left:45,
left:30,
top:25,
height:168,
width:343
height:146,
width:323
},
yAxis: [
{

@ -189,7 +189,7 @@
<view class="popContent-text">销量趋势 </view>
<view class="popContent-title">宏光MINIEV销量趋势</view>
<view class="popContent-echars">
<c-echars showChart="{{showChart}}" canvasId="modelbar-canvas" chartId="modelbar" chartOption="{{option}}" height="100%">
<c-echars showChart="{{showChart}}" canvasId="modelbar-canvas" chartId="modelbar" chartOption="{{option}}" height="100%" >
</c-echars>
</view>
</view>

Loading…
Cancel
Save