Commit 5b915de3 by 前端

fixed

1 parent cdd9f546
<!--packageOutput/components/staff/staff.wxml--> <!--packageOutput/components/staff/staff.wxml-->
<wxs src="staff.wxs" module="filter" />
<view class="box staff-box"> <view class="box staff-box">
<view class="box-title"> <view class="box-title">
<text>员工排行榜</text> <text>员工排行榜</text>
...@@ -33,7 +34,7 @@ ...@@ -33,7 +34,7 @@
<image wx:if="{{item.name == '员工'&& litem.avatarUrl}}" src="{{ litem.avatarUrl? litem.avatarUrl:''}}"></image> <image wx:if="{{item.name == '员工'&& litem.avatarUrl}}" src="{{ litem.avatarUrl? litem.avatarUrl:''}}"></image>
<block wx:if="{{item.name == '转化率'}}">{{litem?litem+'%': '--'}}</block> <block wx:if="{{item.name == '转化率'}}">{{litem?litem+'%': '--'}}</block>
<block wx:elif="{{item.name == '员工'}}">{{litem.transferName?litem.transferName:'--'}}</block> <block wx:elif="{{item.name == '员工'}}">{{litem.transferName?litem.transferName:'--'}}</block>
<block wx:else>{{litem||'--'}}</block> <block wx:else>{{filter.thousand(litem)||'--'}}</block>
</view> </view>
</view> </view>
</view> </view>
......
function thousand(n) {
if(!n || isNaN(n)) return n
var r = getRegExp('\B(?=(\d{3})+(?!\d))', 'g')
var p = (n+'').replace(r, ',')
return p
}
module.exports = {thousand:thousand}
\ No newline at end of file \ No newline at end of file
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
} }
.temporal { .temporal {
font-size: 24rpx; font-size: 22rpx;
color: #A6A6A6; color: #A6A6A6;
margin: 0 8rpx; margin: 0 8rpx;
} }
......
import ActivityApi from '~/api/activityApi/index' import ActivityApi from '~/api/activityApi/index'
let thisPage; let thisPage;
import {thousand} from '~/utils/format'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -9,8 +10,7 @@ Component({ ...@@ -9,8 +10,7 @@ Component({
type: Number, type: Number,
observer: function (val) { observer: function (val) {
console.log(val, 'index') console.log(val, 'index')
console.log(Date.now()) this.control && this.initLocal(val)
this.initLocal(val)
} }
} }
}, },
...@@ -139,9 +139,10 @@ Component({ ...@@ -139,9 +139,10 @@ Component({
sfaffList: [], sfaffList: [],
tabelTh: [] tabelTh: []
}, () => { }, () => {
})
thisPage = wx.$router.getPageInstance() thisPage = wx.$router.getPageInstance()
this.getActivityInfo() this.getActivityInfo()
})
}, },
getActivityInfo() { getActivityInfo() {
console.log(Date.now()) console.log(Date.now())
...@@ -423,11 +424,11 @@ Component({ ...@@ -423,11 +424,11 @@ Component({
}) })
} }
}, },
// lifetimes: { lifetimes: {
// attached() { attached() {
// if(this.control)return if(this.control)return
// this.control = true this.control = true
// this.initLocal(this.data.entranceType) this.initLocal(this.data.entranceType)
// } }
// }, },
}) })
\ No newline at end of file \ No newline at end of file
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
margin: 48rpx 0; margin: 48rpx 0;
padding-bottom: 30rpx;
.btn-box { .btn-box {
width: 316rpx; width: 316rpx;
......
...@@ -28,4 +28,4 @@ ...@@ -28,4 +28,4 @@
</view> </view>
</scroll-view > </scroll-view >
<van-calendar max-range="{{ 30 }}" show="{{ isShow }}" type="range" color="#4466F0" bind:confirm="onConfirm" bind:close="onClose" min-date="{{ minDate }}" max-date="{{ maxDate }}"/>
\ No newline at end of file \ No newline at end of file
<van-calendar max-range="{{ 30 }}" show="{{ isShow }}" type="range" color="#4466F0" bind:confirm="onConfirm" bind:close="onClose"/>
\ No newline at end of file \ No newline at end of file
...@@ -5,7 +5,7 @@ Component({ ...@@ -5,7 +5,7 @@ Component({
behaviors: [imgUrlMixin], behaviors: [imgUrlMixin],
properties: {}, properties: {},
data: { data: {
loading:true, loading: true,
navStyle, navStyle,
tab: [], tab: [],
roadTodayNum: 0, roadTodayNum: 0,
...@@ -35,7 +35,7 @@ Component({ ...@@ -35,7 +35,7 @@ Component({
// 点击菜单按钮切换到对应的tab // 点击菜单按钮切换到对应的tab
getCurrentMenu(e) { getCurrentMenu(e) {
let { tab } = this.data let { tab } = this.data
const index = tab.findIndex(item=>item.serviceType == e.detail) const index = tab.findIndex(item => item.serviceType == e.detail)
this.setData({ this.setData({
tabIndex: index, tabIndex: index,
to: `to-${index}`, to: `to-${index}`,
...@@ -69,8 +69,8 @@ Component({ ...@@ -69,8 +69,8 @@ Component({
}, },
onLoad(options) { onLoad(options) {
const {merchantId,merchantName} = options; const { merchantId, merchantName } = options;
this.setData({merchantId,merchantName}) this.setData({ merchantId, merchantName })
this.getSubscribeConfig(options) this.getSubscribeConfig(options)
console.log(Date.now()) console.log(Date.now())
this.addEvent() this.addEvent()
...@@ -84,8 +84,9 @@ Component({ ...@@ -84,8 +84,9 @@ Component({
this.setData({ this.setData({
tab, tab,
fresh: obj && obj.fresh, fresh: obj && obj.fresh,
currentServiceType:obj.type currentServiceType: obj.type
}) })
console.log(Date.now())
setTimeout(() => { setTimeout(() => {
this.configHttpCount = false this.configHttpCount = false
this.setData({ this.setData({
......
<!-- pages/index/index.wxml 引入模板 --> <!-- pages/index/index.wxml 引入模板 -->
<import src="index.skeleton.wxml"/> <!-- <import src="index.skeleton.wxml" />
<template is="skeleton" wx:if="{{loading}}"/> <template is="skeleton" wx:if="{{loading}}" /> -->
<wxs src="./index.wxs" module="fn"></wxs> <wxs src="./index.wxs" module="fn"></wxs>
<view class="navigation-bar"> <view class="navigation-bar">
<navigation-bar showBack="{{true}}" navStyle="{{navStyle}}" bindnavbarReady="navbarReady" page-title="工作台"> <navigation-bar showBack="{{true}}" navStyle="{{navStyle}}" bindnavbarReady="navbarReady" page-title="工作台">
...@@ -36,14 +36,14 @@ ...@@ -36,14 +36,14 @@
</view> </view>
<!-- currentServiceType 0售后众筹 1续保膨胀金 2定保招揽 3私域运营 4精品礼券 5续保招揽 6节假日关怀 --> <!-- currentServiceType 0售后众筹 1续保膨胀金 2定保招揽 3私域运营 4精品礼券 5续保招揽 6节假日关怀 -->
<view class="pannel" style="height:calc(100% - 30rpx)" bindtap="hideEmpSelect"> <view class="pannel" style="height:calc(100%)" bindtap="hideEmpSelect">
<!-- 售后众筹 --> <!-- 售后众筹 -->
<view wx:if="{{fn.arrInclues(currentServiceType,[0])}}" style="height: calc(100% - 30rpx);"> <view wx:if="{{fn.arrInclues(currentServiceType,[0])}}" style="height: calc(100%);">
<workertableEntrance entranceType="{{currentServiceType}}" ids="{{ids}}" fresh="{{fresh}}" isHaveSubcribe="{{isHaveSubcribe}}" bind:total="getTotal" /> <workertableEntrance entranceType="{{currentServiceType}}" ids="{{ids}}" fresh="{{fresh}}" isHaveSubcribe="{{isHaveSubcribe}}" bind:total="getTotal" />
</view> </view>
<!-- 精品升级 会员权益 --> <!-- 精品升级 会员权益 -->
<view wx:if="{{fn.arrInclues(currentServiceType,[1,2,3,4])}}" style="height: calc(100% - 30rpx);"> <view wx:if="{{fn.arrInclues(currentServiceType,[1,2,3,4])}}" style="height: calc(100%);">
<OutputWork entranceType="{{currentServiceType}}"/> <OutputWork entranceType="{{currentServiceType}}" />
</view> </view>
</view> </view>
</view> </view>
......
/* pages/tab/output/components/client/client.wxss */ /* pages/tab/output/components/client/client.wxss */
.client { .client {
box-sizing: border-box; box-sizing: border-box;
height: calc(100% - 92rpx); height: calc(100% - 280rpx);
color: #323436; color: #323436;
} }
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
.sort-fix { .sort-fix {
box-sizing: border-box; box-sizing: border-box;
position: absolute; position: sticky;
top: 0; top: 0;
left: 16rpx; left: 16rpx;
} }
......
...@@ -208,3 +208,6 @@ export function deleteSecond(time) { ...@@ -208,3 +208,6 @@ export function deleteSecond(time) {
hour = hour.join(':') hour = hour.join(':')
return `${moth} ${hour}` return `${moth} ${hour}`
} }
export function thousand(num) {
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")
}
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!