Commit db354d8a by 李君

优化

1 parent 4b3204fd
<view class="container" style="padding-top: {{navHeight}}px;height:{{windowHeight}}px;">
<view class="container" style="padding-top: {{navHeight}}px;height:{{windowHeight-navHeight}}px;">
<navbar page-name="综合分析" bg-color="#fff" navbar-color="rgba(0, 0, 0, .85)" />
<scroll-view class="part-list" scroll-y>
<view class="part-list" scroll-y>
<!-- 我的 S -->
<!-- <view class="my part">
......@@ -41,7 +41,7 @@
</view> -->
<!-- 员工管理 E -->
</scroll-view>
</view>
<!-- <view class="zong-content">
<view wx:for="{{menuItems}}" wx:for-index="index" wx:for-item="n" wx:key="index" class="item" bindtap="goOtherPage" data-value="{{n}}">
<image src="{{ '../../images/icon/' + n.icon + '.png' }}" class="img" />
......
......@@ -69,7 +69,7 @@
<view>{{ deploymentType === 'store' ? '门店排名' : '商场排名' }}</view>
</view>
<view class="~tablist" style="width:73%;margin-top:10rpx;">
<van-tabs bindclick="changeRank" active="{{rankVal}}">
<van-tabs tab-class='tab-box' bindclick="changeRank" active="{{rankVal}}">
<van-tab title="客流量" name="total_passenger"></van-tab>
<van-tab title="进店率" name="avg_entry_rate"></van-tab>
<van-tab title="停留时长" name="custom_residence_time"></van-tab>
......
......@@ -71,7 +71,7 @@
<view class="select-item">
<view>日期</view>
<view class="select-item-one">
<view>{{date.startDate}} {{date.endDate && date.endDate !== '' ? (' / ' + date.endDate) : date.endDate}}</view>
<!-- <view>{{date.startDate}} {{date.endDate && date.endDate !== '' ? (' / ' + date.endDate) : date.endDate}}</view> -->
<time-picker
class="picker"
placeholder="请选择时间"
......
// pages/zong/condition/index.js
const App = getApp();
import { getIndexInfo } from '../../../api/index';
Page({
/**
......@@ -12,7 +12,9 @@ Page({
windowWidth: App.globalData.windowWidth,
accountList: [],
gateList: [],
selectGate:'',
gateId:'',
selectData: [],
},
......@@ -55,17 +57,40 @@ Page({
radioChange: function(e) {
const { value } = e.detail
this.setData({ selectData: [parseInt(value)] })
this.setData({ selectData: [parseInt(value)] },()=>{
this.getGateList(value)
})
},
checkboxChange: function(e) {
const { value } = e.detail
this.setData({ selectData: value })
},
// 获取出入口列表
getGateList: function(e) {
const atoken = wx.getStorageSync('atoken');
const id = wx.getStorageSync('accountId');
const data = {
accountId: id,
mallId: e,
status: 1,
type_arr: '1,3'
}
getIndexInfo('/report/gates', data, { 'Authorization': atoken }).then(res => {
console.log(res.data)
if (res.data.length > 0) {
this.setData({
gateList: res.data,
gateId: [res.data[0].id],
selectGate: res.data[0].name
})
}
})
},
// 返回上一页
queding: function(e) {
const { selectData, accountList, reportType } = this.data
const { selectData, accountList, reportType,gateList,gateId,selectGate } = this.data
let pages = getCurrentPages();
let prevPage = pages[ pages.length - 2 ];
let selectMall = ''
......@@ -80,8 +105,11 @@ Page({
}
prevPage.setData({
accountId: selectData,
selectMall: selectMall
accountId: selectData,
selectMall: selectMall,
gateList: gateList,
gateId: gateId,
selectGate: selectGate
})
wx.navigateBack({ delta: 1 })
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!