Commit 5d5650e8 by 张立顺

逻辑修改

1 parent f5e6d4e8
......@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布
* 5cdptest
*/
let index = 1
let index = 2
const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync()
......
......@@ -18,6 +18,7 @@ Page({
autoplay: false,
interval: 2000,
duration: 500,
current: 0,
ImgUrl: ImgUrl + '/miniProgram/',
isStaff: true,
forbid: true,
......@@ -52,6 +53,9 @@ Page({
}
]
},
bindchange(e) {
this.setData({ current: e.detail.current })
},
remarkConfirm() {
this.setData({
hasStaffPassword: true
......@@ -92,13 +96,14 @@ Page({
// console.log(performanceMonth, 'performanceMonth')
orderPerformanceDetail({ performanceMonth })
.then(res => {
// console.log(res)
console.log(res)
let { code, data } = res
if (code == 0 && data.performanceMonth) {
let [year, month] = data.performanceMonth.split('-')
data.year = year
data.month = month
data.orderList = data.orderList || []
data.orderList = data.orderList.map(item => {
item.orderGoodsName = item.orderGoodsName.split(',')
// console.log(orderTime, paySuccessTime, 'orderTime')
......@@ -127,11 +132,18 @@ Page({
let { userInfo } = this.data
let { code, data } = res
if (code == 0) {
if (userInfo.isSuper) {
data.staffInfo = {
entryDate: userInfo.createdDate,
staffName: userInfo.name
}
}
if (data.staffInfo?.entryDate) {
data.staffInfo.entryDate = wx.$util.tsFormatTime(data.staffInfo.entryDate, 'Y年M月D日')
}
data.monthPerformanceList = data.monthPerformanceList.map(item => {
item.performanceMonthLabel = this.extractMonth(item.performanceMonth)
item.height = item.staffDataList.length > 3 ? (item.staffDataList.length * 70 + 120) : '300'
// let [year, month] = item.performanceMonth.split('-')
// item.year = year
// item.month = month
......@@ -213,6 +225,17 @@ Page({
// wx.$router.go(reLaunchPath)
wx.$router.back()
},
init(userInfo) {
const isStaff = app.globalData.isStaff
// let { userInfo } = this.data
console.log(this.data, userInfo, 'userInfo');
this.setData({
isStaff: userInfo.isSuper ? false : isStaff,
hasStaffPassword: !isStaff ? true : false
})
this.getDetailInfo()
},
onRoute(options) {
// let { reLaunchPath, tabIndex } = options
// this.setData({
......@@ -220,20 +243,13 @@ Page({
// tabIndex
// })
// console.log(options, 'options');
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
const isStaff = app.globalData.isStaff
let { userInfo } = this.data
// console.log(userInfo?.isSuper ? true : false, 'userInfo?.isSuper ? true : false');
this.setData({
isStaff,
hasStaffPassword: !isStaff ? true : false
})
this.getDetailInfo()
},
/**
......
......@@ -82,7 +82,7 @@
<text class="num">{{staffInfoObj.finalWage || 0}}</text>
<image class="eyesIcon" src="{{ ImgUrl+'openeyesIcon.png' }}"></image>
</view>
<swiper class="swiper" indicator-dots="{{ indicatorDots }}" autoplay="{{ autoplay }}" interval="{{ interval }}" duration="{{ duration }}">
<swiper class="swiper" bindchange="bindchange" indicator-dots="{{ indicatorDots }}" autoplay="{{ autoplay }}" interval="{{ interval }}" duration="{{ duration }}" style="height:{{staffInfoObj.monthPerformanceList[current].height||300}}rpx;">
<!-- <block wx:for="{{background}}" wx:key="*this"> -->
<swiper-item wx:for="{{ staffInfoObj.monthPerformanceList }}" wx:for-item="monthPerformanceList" wx:for-index="monthPerformanceListIndex" wx:key="monthPerformanceListIndex">
<view class="wagesCon">
......
......@@ -10,6 +10,7 @@ import {
updateOrderStatus,
merchantMode
} from '../../api'
const app = getApp()
Component({
/**
* 组件的属性列表
......@@ -104,17 +105,19 @@ Component({
*/
methods: {
onLoad() {
const isStaff = app.globalData.isStaff
let userInfo = wx.$util.getUserInfo() || {}
this.setData({
storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo || {},
userInfo
})
// let issta
let { menuList } = this.data
getBusinessSchoolScene({})
.then(res => {
console.log(res, 'res')
if ((res || userInfo?.isSuper) && menuList.every(item => item.menuText != '商学院')) {
menuList.push(
menuList.unshift(
{
menuText: '商学院',
icon: 'businessschoo',
......
......@@ -13,39 +13,39 @@
<view class="content_box">
<view class="headerCon">
<view class="tips-text text-hide">
你好,
<text>{{loginRoleLabel[loginRole]|| ''}}{{userInfo.name || ''}}</text>
</view>
<view class="dataCon">
<view class="today item {{dataActive=='today'?'active':''}}" bindtap="changeDataSelect" data-name="today">
本日
</view>
<view class="month item {{dataActive=='month'?'active':''}}" bindtap="changeDataSelect" data-name="month">
本月
你好,
<text>{{loginRoleLabel[loginRole]|| ''}}{{userInfo.name || ''}}</text>
</view>
<view class="total item {{dataActive=='total'?'active':''}}" bindtap="changeDataSelect" data-name="total">
累计
<view class="dataCon">
<view class="today item {{dataActive=='today'?'active':''}}" bindtap="changeDataSelect" data-name="today">
本日
</view>
<view class="month item {{dataActive=='month'?'active':''}}" bindtap="changeDataSelect" data-name="month">
本月
</view>
<view class="total item {{dataActive=='total'?'active':''}}" bindtap="changeDataSelect" data-name="total">
累计
</view>
</view>
</view>
</view>
<view class="totalCon">
<view class="item">
<view class="label">个人产值</view>
<veiw class="number">
<text class="unit">¥ </text>
{{staticData.totalOutputValue||0}}
</veiw>
</view>
<view class="item">
<view class="label">转化率</view>
<veiw class="number">{{staticData.conversionRate > 100 ? 100 : staticData.conversionRate ||0}}%</veiw>
</view>
</view>
<view class="item">
<view class="label">个人产值</view>
<veiw class="number">
<text class="unit">¥ </text>
{{staticData.totalOutputValue||0}}
</veiw>
</view>
<view class="item">
<view class="label">转化率</view>
<veiw class="number">{{staticData.conversionRate > 100 ? 100 : staticData.conversionRate ||0}}%</veiw>
</view>
</view>
<view class="static_box">
<view class="static_item" wx:for="{{itemDataList}}" wx:key="index" wx:for-index="index">
<view class="label">
<image src="{{IMG_URL}}staticIcon/{{item.icon}}.png" mode=""/>
<image src="{{IMG_URL}}staticIcon/{{item.icon}}.png" mode="" />
<view class="label_text">{{item.label}}</view>
</view>
<view class="value"><text wx:if="{{item.unit}}" style="font-size: 24rpx;margin-right: 4rpx;">¥</text>{{staticData[item.value]||0}}</view>
......@@ -54,11 +54,19 @@
<view class="title">展业工具</view>
<view class="menu_box">
<view class="menu_item" wx:for="{{menuList}}" wx:key="index" bindtap="navGo" data-item="{{item}}">
<block wx:if="{{!userInfo.isSuper && userInfo.userType == 2&&mode!=-1}}">
<view class="icon"><image src="{{IMG_URL}}crowdFunding/{{item.icon}}.png" mode="widthFix"/></view>
<view class="text">{{item.menuText}}</view>
</block>
<block wx:if="{{!userInfo.isSuper && userInfo.userType == 2 && mode!=-1 && item.menuText != '商学院'}}">
<view class="icon">
<image src="{{IMG_URL}}crowdFunding/{{item.icon}}.png" mode="widthFix" />
</view>
<view class="text">{{item.menuText}}</view>
</block>
<block wx:if="{{item.menuText == '商学院'}}">
<view class="icon">
<image src="{{IMG_URL}}crowdFunding/{{item.icon}}.png" mode="widthFix" />
</view>
<view class="text">{{item.menuText}}</view>
</block>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
......@@ -4,6 +4,13 @@
"miniprogram": {
"list": [
{
"name": "场景",
"pathName": "pages/sceneIndex/sceneIndex",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "商学院",
"pathName": "packageEquity/pages/collegeScene/collegeScene",
"query": "",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!