Commit a68e0eb1 by 夏新然

aaa

1 parent 2ea674e6
...@@ -41,7 +41,6 @@ ...@@ -41,7 +41,6 @@
var yMax=0; var yMax=0;
let myChart = {}; let myChart = {};
let chartDom = document.getElementById(this.bindId); let chartDom = document.getElementById(this.bindId);
console.log('line',chartDom)
myChart = this.echarts.init(chartDom); myChart = this.echarts.init(chartDom);
myChart.showLoading('default', { myChart.showLoading('default', {
text: '', text: '',
...@@ -161,13 +160,16 @@ ...@@ -161,13 +160,16 @@
item.symbolSize=uni.upx2px(12.7) item.symbolSize=uni.upx2px(12.7)
}) })
} }
option.xAxis.data = this.chartData.xaxis.data; if(this.chartData.xaxis.data){
option.xAxis.data = this.chartData.xaxis.data;
}else{
option.xAxis.data =[]
}
// myChart.clear(); // myChart.clear();
setTimeout(() => { setTimeout(() => {
myChart.hideLoading(); myChart.hideLoading();
}, 500); }, 500);
myChart.setOption(option); myChart.setOption(option);
console.log('option', String(yMax).length)
// option.grid.left=uni.upx2px(String(yMax).length*uni.upx2px(21.74))+uni.upx2px(18.11) // option.grid.left=uni.upx2px(String(yMax).length*uni.upx2px(21.74))+uni.upx2px(18.11)
option.grid.left=uni.upx2px(18.11)+15+String(yMax).length*uni.upx2px(9.05) option.grid.left=uni.upx2px(18.11)+15+String(yMax).length*uni.upx2px(9.05)
myChart.setOption(option); myChart.setOption(option);
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
}, },
grid:{ grid:{
left: uni.upx2px(30.79), left: uni.upx2px(30.79),
right: uni.upx2px(85.14), right: uni.upx2px(101.14),
top: uni.upx2px(63.33), top: uni.upx2px(63.33),
bottom: uni.upx2px(36.23) bottom: uni.upx2px(36.23)
}, },
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
var rankWidths = ''; var rankWidths = '';
uni.getSystemInfo({ uni.getSystemInfo({
success:(res)=>{ success:(res)=>{
rankWidths=res.windowWidth-uni.upx2px(144.92); rankWidths=res.windowWidth-uni.upx2px(160.92);
} }
}) })
var rankTop = -1; var rankTop = -1;
......
...@@ -6,8 +6,6 @@ import MiniRefreshTools from 'module/minirefresh'; ...@@ -6,8 +6,6 @@ import MiniRefreshTools from 'module/minirefresh';
import 'module/minirefresh/dist/debug/minirefresh.css' import 'module/minirefresh/dist/debug/minirefresh.css'
import AwesomePicker from 'module/vue-awesome-picker'; import AwesomePicker from 'module/vue-awesome-picker';
import VueI18n from 'module/vue-i18n' import VueI18n from 'module/vue-i18n'
import storezh from 'i18n/langs/storeCN'
import mallzh from 'i18n/langs/mallCN'
// 引入样式 // 引入样式
import 'vue-easytable/libs/themes-base/index.css' import 'vue-easytable/libs/themes-base/index.css'
// 导入 table 和 分页组件 // 导入 table 和 分页组件
...@@ -50,22 +48,24 @@ if(window.pageType=="store"){ ...@@ -50,22 +48,24 @@ if(window.pageType=="store"){
} }
// var src='./i18n/langs/mallCN' // var src='./i18n/langs/mallCN'
var src='./i18n/langs/storeCN' var src='./i18n/langs/storeCN'
const i18n = new VueI18n({ const i18n = new VueI18n({
locale:locale, locale:locale,
messages:{ messages:{}
// 'en':{...require(src)},
'zh-store':storezh,
'zh-mall':mallzh
}
}) })
Vue.prototype._i18n = i18n; function loadI18nMessages(lang) {
// if(process.env.NODE_ENV === 'development') { return import(/* webpackChunkName: "[request]" */'./i18n/langs/'+lang).then(msg => {
// window.url = 'https://store.keliuyun.com/report' i18n.setLocaleMessage(lang, msg.default)
// } i18n.locale = lang
const app = new Vue({ return Promise.resolve()
i18n, })
store, }
...App loadI18nMessages(locale).then(() => {
const app = new Vue({
i18n,
store,
...App
})
app.$mount()
}) })
app.$mount()
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
return{ return{
titleStr:'节假日活动对比', titleStr:'节假日活动对比',
leftImg:backArrow, leftImg:backArrow,
accountIds:'',
rightImg:other, rightImg:other,
atoken:'', atoken:'',
keyArr:[], keyArr:[],
...@@ -41,6 +42,12 @@ ...@@ -41,6 +42,12 @@
if(option.types){ if(option.types){
this.reportType=option.types; this.reportType=option.types;
} }
uni.getStorage({
key:'accountId',
success:(res)=>{
this.accountIds=res.data;
}
})
uni.getStorage({ uni.getStorage({
key:'atoken', key:'atoken',
success:(res)=>{ success:(res)=>{
...@@ -256,6 +263,7 @@ ...@@ -256,6 +263,7 @@
uni.request({ uni.request({
url:window.url+'/events/getEvent', url:window.url+'/events/getEvent',
data:{ data:{
accountId:this.accountIds,
mallId: this.accountId[0], mallId: this.accountId[0],
year: this.date.split(',')[0], year: this.date.split(',')[0],
_t:Date.parse(new Date())/1000 _t:Date.parse(new Date())/1000
......
...@@ -377,7 +377,6 @@ ...@@ -377,7 +377,6 @@
uni.getStorage({ uni.getStorage({
key:'eventIdArr', key:'eventIdArr',
success:(res)=> { success:(res)=> {
console.log('aaa',res)
this.eventidArr=JSON.parse(res.data)[0]; this.eventidArr=JSON.parse(res.data)[0];
}, },
complete: (res) => { complete: (res) => {
...@@ -587,6 +586,7 @@ ...@@ -587,6 +586,7 @@
uni.request({ uni.request({
url:window.url+'/events/getEvent', url:window.url+'/events/getEvent',
data:{ data:{
accountId: this.id,
mallId: this.oneAccountId, mallId: this.oneAccountId,
year: date, year: date,
_t:Date.parse(new Date())/1000 _t:Date.parse(new Date())/1000
...@@ -602,7 +602,7 @@ ...@@ -602,7 +602,7 @@
this.eventidArr.push(res.data.data[0].id) this.eventidArr.push(res.data.data[0].id)
uni.setStorage({ uni.setStorage({
key:'eventIdArr', key:'eventIdArr',
data:JSON.stringify(eventidArr) data:JSON.stringify(this.eventidArr)
}) })
}else{ }else{
this.eventText=''; this.eventText='';
......
...@@ -293,7 +293,7 @@ ...@@ -293,7 +293,7 @@
linechart,toast,stackbarchart,rankchart,agechart linechart,toast,stackbarchart,rankchart,agechart
}, },
created(){ created(){
this.getDateList(); this.getDateData();
uni.getStorage({ uni.getStorage({
key:'atoken', key:'atoken',
success:(res)=>{ success:(res)=>{
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
}, },
onLoad: function (option) { //option为object类型,会序列化上个页面传递的参数 onLoad: function (option) { //option为object类型,会序列化上个页面传递的参数
// this.atoken=option.atoken; // this.atoken=option.atoken;
// this.id=option.accountId; this.id=option.accountId;
uni.getStorage({ uni.getStorage({
key:"selectAccountIdArr", key:"selectAccountIdArr",
success: (res) => { success: (res) => {
...@@ -128,6 +128,7 @@ ...@@ -128,6 +128,7 @@
uni.request({ uni.request({
url:window.url+'/events/getEvent', url:window.url+'/events/getEvent',
data:{ data:{
accountId:this.id,
mallId:this.mallId, mallId:this.mallId,
year:year, year:year,
_t:Date.parse(new Date())/1000 _t:Date.parse(new Date())/1000
......
...@@ -256,8 +256,9 @@ ...@@ -256,8 +256,9 @@
uni.hideLoading(); uni.hideLoading();
var data=res.data; var data=res.data;
if(data.code==200){ if(data.code==200){
console.log('aaaa')
Object.keys(window.localStorage).forEach(item => { Object.keys(window.localStorage).forEach(item => {
if(item!='user' && item!='pwd' && item != 'statusBarH'){ if(item!='user' && item!='pwd' && item != 'statusBarH'&&item!='url'){
uni.removeStorage({ uni.removeStorage({
key: item, key: item,
success: function (res) { success: function (res) {
...@@ -309,8 +310,32 @@ ...@@ -309,8 +310,32 @@
success:(res) =>{ success:(res) =>{
this.constructorData(res.data.menu_tree) this.constructorData(res.data.menu_tree)
localStorage.setItem('menus',JSON.stringify(this.list)) localStorage.setItem('menus',JSON.stringify(this.list))
uni.switchTab({ uni.request({
url:'../index/index', url: window.url + "/accounts",
data:{
id:this.id,
_t:Date.parse(new Date())/1000
},
header: {
'Authorization': this.atoken //自定义请求头信息
},
method:'GET',
success(res){
if(res.data.code==200){
var datas=res.data.data;
uni.setStorage({
key:'orgName',
data:datas[0].name
})
uni.setStorage({
key:'accountName',
data:datas[0].name
})
}
uni.switchTab({
url:'../index/index',
})
}
}) })
} }
}) })
...@@ -334,30 +359,7 @@ ...@@ -334,30 +359,7 @@
}) })
} }
}) })
uni.request({
url: window.url + "/accounts",
data:{
id:this.id,
_t:Date.parse(new Date())/1000
},
header: {
'Authorization': this.atoken //自定义请求头信息
},
method:'GET',
success(res){
if(res.data.code==200){
var datas=res.data.data;
uni.setStorage({
key:'orgName',
data:datas[0].name
})
uni.setStorage({
key:'accountName',
data:datas[0].name
})
}
}
})
uni.setStorage({ uni.setStorage({
key:'atoken', key:'atoken',
......
...@@ -168,8 +168,7 @@ ...@@ -168,8 +168,7 @@
uni.request({ uni.request({
url: window.url + '/faceRecognitions', url: window.url + '/faceRecognitions',
data: { data: {
counttime_gte: `${this.selectedStartTime} 00:00:00`, countdate: `${this.selectedStartTime}`,
counttime_lte: `${this.selectedEndTime} 23:59:59`,
accountId: this.getStorage('accountId'), accountId: this.getStorage('accountId'),
mallId: this.checkedMallId.id, mallId: this.checkedMallId.id,
gateId: this.canLoadGateId gateId: this.canLoadGateId
...@@ -198,9 +197,12 @@ ...@@ -198,9 +197,12 @@
// let dateStr = item.counttime.match(/^\d{4}\-\d{2}\-\d{2}/)[0].replace('-', ''); // let dateStr = item.counttime.match(/^\d{4}\-\d{2}\-\d{2}/)[0].replace('-', '');
item.show = false; item.show = false;
item.loaded = false; item.loaded = false;
item.pic = window.picUrl+'/picture/'+ (item.facePath && item.facePic if(!item.facePath && !item.facePic&&!item.bodyPath && !item.bodyPic){
? item.facePath + item.facePic }else{
: item.bodyPath + item.bodyPic); item.pic = window.picUrl+'/picture/'+ (item.facePath && item.facePic
? item.facePath + item.facePic
: item.bodyPath + item.bodyPic);
}
item.orderIdx = ++index; item.orderIdx = ++index;
item.faceImagePath = item.pic || this.dealDefaultImg(item.gender); item.faceImagePath = item.pic || this.dealDefaultImg(item.gender);
item.age = item.age && item.age >= 0 ? item.age : 'unknown'; item.age = item.age && item.age >= 0 ? item.age : 'unknown';
......
...@@ -21,15 +21,15 @@ ...@@ -21,15 +21,15 @@
<image class="rarrow" :src="rArrowImg" mode="widthFix"></image> <image class="rarrow" :src="rArrowImg" mode="widthFix"></image>
</view> </view>
<view class="condition-item" @tap="startDateHandle"> <view class="condition-item" @tap="startDateHandle">
<span class="ctitle">开始日期</span> <span class="ctitle">选择日期</span>
<span class="select-item">{{ dateStartText || '' }}</span> <span class="select-item">{{ dateStartText || '' }}</span>
<image class="rarrow" :src="rArrowImg" mode="widthFix"></image> <image class="rarrow" :src="rArrowImg" mode="widthFix"></image>
</view> </view>
<view class="condition-item" @tap="endDateHandle"> <!-- <view class="condition-item" @tap="endDateHandle">
<span class="ctitle">结束日期</span> <span class="ctitle">结束日期</span>
<span class="select-item">{{ dateEndText || '' }}</span> <span class="select-item">{{ dateEndText || '' }}</span>
<image class="rarrow" :src="rArrowImg" mode="widthFix"></image> <image class="rarrow" :src="rArrowImg" mode="widthFix"></image>
</view> </view> -->
</view> </view>
<awesome-picker <awesome-picker
ref="pickerStart" ref="pickerStart"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view> <view>
<headerComp :title="titleStr"></headerComp> <headerComp :title="titleStr"></headerComp>
<view class="prefix-elem"></view> <view class="prefix-elem"></view>
<view class="profile-item" @tap="goVideo"> <view class="profile-item" @tap="goVideo" v-if="accountId!=18">
<span class="texts">视频巡店</span> <span class="texts">视频巡店</span>
<img class="arrows" :src="rArrow" alt=""/> <img class="arrows" :src="rArrow" alt=""/>
</view> </view>
...@@ -27,6 +27,13 @@ ...@@ -27,6 +27,13 @@
export default { export default {
onLoad(option) { onLoad(option) {
uni.getStorage({
key:'accountId',
success:(res)=>{
this.accountId=res.data;
console.log(this.accountId)
}
})
console.log(option) console.log(option)
}, },
components: { components: {
...@@ -36,7 +43,8 @@ ...@@ -36,7 +43,8 @@
return { return {
titleStr: '我的', titleStr: '我的',
backArrow: backArrow, backArrow: backArrow,
rArrow: rArrow rArrow: rArrow,
accountId:''
} }
}, },
methods: { methods: {
...@@ -93,7 +101,7 @@ ...@@ -93,7 +101,7 @@
} }
}); });
} else { } else {
if(item!='user'&&item!='pwd'&&item!='statusBarH'){ if(item!='user'&&item!='pwd'&&item!='statusBarH'&&item!='url'){
uni.removeStorage({ uni.removeStorage({
key: item, key: item,
success: function (res) { success: function (res) {
......
This diff could not be displayed because it is too large.
...@@ -179,11 +179,11 @@ ...@@ -179,11 +179,11 @@
ajaxPost(localStorage.getItem('url')+"../../../../webapi/v4/preview/view?tk="+tk,param,function(res){ ajaxPost(localStorage.getItem('url')+"../../../../webapi/v4/preview/view?tk="+tk,param,function(res){
console.log(JSON.stringify(res)); console.log(JSON.stringify(res));
if (res.ret == 0) { if (res.ret == 0) {
if(location.protocol=='https:'){ // if(location.protocol=='https:'){
liveUrl = res.view_context.replace("ws://","wss://").replace('47.94.37.10:39401/live/ws','store.keliuyun.com/wss') liveUrl = res.view_context.replace("ws://","wss://").replace('47.94.37.10:39401/live/ws','store.keliuyun.com/wss')
}else { // }else {
liveUrl = res.view_context.replace('47.94.37.10:39401/live/ws','store.keliuyun.com/wss') // liveUrl = res.view_context.replace("ws://","wss://").replace('47.94.37.10:39401/live/ws','store.keliuyun.com/wss')
} // }
player.start(liveUrl) player.start(liveUrl)
} else{ } else{
console.log(res.msg) console.log(res.msg)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!