Commit 5d5650e8 by 张立顺

逻辑修改

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