yujialong 11 months ago
parent 8d7d86cd7e
commit 00e734913c
  1. 3
      apis/modules/activity.js
  2. 4
      config/request.js
  3. 29
      other/activityDetail/activityDetail.vue
  4. 60
      pages/index/index.vue
  5. 36
      pages/person/person.vue
  6. 12
      pages/supplier/supplier.vue

@ -24,4 +24,7 @@ export const cancelRegistration = (id) => {
}
export const categoryList = (id) => {
return post(`competition/competitionClassification/categoryList`)
}
export const explosiveList = (data) => {
return post(`nakadai/explosiveRecommendation/explosiveList`, data)
}

@ -5,8 +5,8 @@
*/
export default {
// baseURL: 'http://192.168.31.217:10010/',
baseURL: 'http://124.71.79.122/',
baseURL: 'http://192.168.31.217:10010/',
// baseURL: 'http://124.71.79.122/',
headers: {
'Content-Type': 'application/json;charset=UTF-8'
},

@ -11,7 +11,7 @@
</view>
<view class="line">
<view class="label">状态</view>
<view class="val">进行中</view>
<view class="val">{{ statusList[comStatus] }}</view>
</view>
<view class="line">
<view class="label">人数限制</view>
@ -37,7 +37,7 @@
<ul class="tab">
<li :class="{active: curTab === 0}" @click="tabChange(0)">活动详情</li>
<li :class="{active: curTab === 1}" @click="tabChange(1)">活动通知</li>
<!-- <li :class="{active: curTab === 1}" @click="tabChange(1)">活动通知</li> -->
<li v-if="form.whetherToShowApplicants === '1'" :class="{active: curTab === 2}" @click="tabChange(2)">已报名人员({{ form.applicantNum }}/{{ form.quantityLimit }})</li>
</ul>
@ -55,7 +55,7 @@
<view class="btns">
<button class="share" open-type="share">分享</button>
<view :class="['btn sign', {signed: form.signed, disabled: !form.signing}]" @click="presign">{{ form.signed ? '取消报名' : '立刻报名' }}</view>
<view :class="['btn sign', {signed, disabled: comStatus !== 1}]" @click="presign">{{ comStatus === 1 ? (signed ? '取消报名' : '立刻报名') : statusList[comStatus] }}</view>
</view>
<uni-popup ref="popup" type="dialog">
@ -73,6 +73,9 @@
return {
Common,
id: '',
statusList: ['未开始', '进行中', '已截止报名', '已结束'],
comStatus: 0,
signed: 0,
curTab: 0,
reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore
@ -151,18 +154,26 @@
//
handleStatus () {
const data = this.form
let signing = 0 //
let status = 0
let signed = 0 //
const signUpStartTime = new Date(data.signUpStartTime) //
const signUpEndTime = new Date(data.signUpEndTime) //
const playStartTime = new Date(data.playStartTime) //
const playEndTime = new Date(data.playEndTime) //
const { now } = this
// (whetherToSignUp 10)
if (now > signUpStartTime && now < signUpEndTime) {
signing = 1
if (now < signUpStartTime) {
status = 0
} else if (now > signUpStartTime && now < signUpEndTime) {
status = 1
if (data.competitionRegistration) signed = 1
} else if (now > signUpEndTime && now < playEndTime) {
status = 2
} else if (now > playEndTime) {
status = 3
}
this.$set(this.form, 'signing', signing)
this.$set(this.form, 'signed', signed)
this.comStatus = status
this.signed = signed
},
//
getRegList() {
@ -196,7 +207,7 @@
},
//
async presign() {
if (!this.form.signing) return this.$util.errMsg('现在不在报名时间!')
if (this.comStatus !== 1) return false
if (this.form.competitionRegistration) { //
this.cancelSign()
} else { //

@ -9,7 +9,14 @@
</view>
<view class="banner">
<image class="pic" src="https://occupationlab.com/images/preschoolEdu/index-banner.jpg" mode="widthFix"></image>
<uni-swiper-dot class="swiper" v-if="banners.length" :current="curBanner" :info="banners" field="id" mode="round" :dotsStyles="dotsStyles">
<swiper class="swiper-box" autoplay>
<swiper-item v-for="(item, i) in banners" :key="i">
<image class="pic" :src="item.coverUrl"></image>
</swiper-item>
</swiper>
</uni-swiper-dot>
<image v-else class="pic" src="https://occupationlab.com/images/preschoolEdu/index-banner.jpg"></image>
</view>
@ -18,7 +25,14 @@
<view class="title">爆款推荐</view>
</view>
<image class="hot" src="https://occupationlab.com/images/preschoolEdu/index-hot.jpg"></image>
<uni-swiper-dot class="swiper" v-if="hots.length" :current="curBanner" :info="hots" field="id" mode="round" :dotsStyles="dotsStyles">
<swiper class="swiper-box" autoplay>
<swiper-item v-for="(item, i) in hots" :key="i">
<image class="hot" :src="item.coverUrl"></image>
</swiper-item>
</swiper>
</uni-swiper-dot>
<image v-else class="hot" src="https://occupationlab.com/images/preschoolEdu/index-hot.jpg"></image>
</view>
<view class="module">
@ -58,13 +72,23 @@
</template>
<script>
import { postLoginActivity, individualEventRegistration, cancelRegistration, categoryList } from '@/apis/modules/activity.js'
import { postLoginActivity, individualEventRegistration, cancelRegistration, categoryList, explosiveList } from '@/apis/modules/activity.js'
import Util from '@/libs/util'
export default {
data() {
return {
per: true, //
teamId: uni.getStorageSync('teamId') || '',
curBanner: 0,
dotsStyles: {
backgroundColor: 'rgba(83, 200, 249,0.3)',
border: '1px rgba(83, 200, 249,0.3) solid',
color: '#fff',
selectedBackgroundColor: 'rgba(83, 200, 249,0.9)',
selectedBorder: '1px rgba(83, 200, 249,0.9) solid'
},
banners: [],
hots: [],
reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore
keyword: '',
@ -103,6 +127,7 @@
this.keyword = ''
this.curTab = ''
this.per = true
this.getBanner()
this.getCategory()
this.initList()
},
@ -166,6 +191,31 @@
const { page } = await categoryList()
this.tabs = page
},
// banner
getBanner() {
// banner
explosiveList({
pageNum: 1,
pageSize: 5,
enabledState: 0,
type: 1
}).then(({ data }) => {
this.banners = data.records
}).catch(e => {})
//
explosiveList({
pageNum: 1,
pageSize: 5,
enabledState: 0,
type: 0
}).then(({ data }) => {
data.records.forEach(e => {
if (e.coverUrl.includes(',')) e.coverUrl = e.coverUrl.split(',')[0]
})
this.hots = data.records
}).catch(e => {})
},
// keyword
clearKeyword() {
this.keyword = ''
@ -243,6 +293,10 @@
position: relative;
.pic {
width: 100%;
height: 420rpx;
}
swiper {
height: 420rpx;
}
}
.tab-wrap {

@ -182,7 +182,8 @@
organizationName: '',
curAccount: {
account: ''
}
},
enterDisabled: 0
}
},
computed: {
@ -227,6 +228,7 @@
return false
}
this.enterDisabled = 0
if (result.hrUserInfo) {
if (!result.hrUserInfo.userAvatars) result.hrUserInfo.userAvatars = Common.avatar //
this.info = result.hrUserInfo
@ -238,13 +240,38 @@
// userAccountList
const accountList = result.userAccountList
if (accountList && accountList.length) {
const enter = accountList.find(e => e.platformId !== '7')
const enter = accountList.find(e => e.platformId !== '7' && e.isEnable)
this.curAccount = enter || accountList[0]
//
if (!enter) {
//
if (enter) {
const platformId = +enter.platformId
uni.setStorageSync('platformId', platformId)
this.platformId = platformId
} else {
//
this.enterDisabled = 1 //
uni.setStorageSync('platformId', 7)
this.platformId = 7
}
// (isEnable=0) 退
const curRole = accountList.find(e => e.platformId == this.platformId)
if (this.platformId !== 7 && curRole && !curRole.isEnable) {
const people = accountList.find(e => e.platformId == '7') //
//
if (people && people.isEnable) {
uni.setStorageSync('platformId', 7)
this.platformId = 7
this.curAccount = people
} else {
// 退
this.$util.errMsg(`您已被当前组织移除,请重新登录!`)
setTimeout(() => {
uni.clearStorageSync()
this.$util.to('/pages/login/login')
}, 1500)
}
}
}
},
//
@ -309,6 +336,7 @@
},
//
toEnterAuth(platformId) {
if (this.enterDisabled) return this.$util.errMsg('您已认证为幼儿园,请勿重复认证!')
const { authenticationStatus, platformSource } = this.enterInfo
// (0 1.2.3.)
if (authenticationStatus === 1) {

@ -15,7 +15,7 @@
{{ item.companyName }}
</view>
<view class="info">
<view class="meta">{{ item.briefIntroduction }}</view>
<view class="meta ell">{{ item.briefIntroduction }}</view>
<view class="meta">{{ item.province }}-{{ item.city }}</view>
</view>
</view>
@ -197,6 +197,8 @@
}
.list {
flex: 1;
width: 100vw;
overflow: hidden;
.item {
padding: 24rpx;
margin: 16rpx 24rpx;
@ -207,14 +209,14 @@
display: flex;
align-items: center;
padding: 18rpx 0;
font-size: 30rpx;
font-size: 32rpx;
font-weight: 600;
color: #333;
border-bottom: 1px solid #E6E8ED;
.icon {
width: 58rpx;
min-width: 58rpx;
height: 58rpx;
width: 66rpx;
min-width: 66rpx;
height: 66rpx;
margin-right: 20rpx;
border-radius: 4px;
}

Loading…
Cancel
Save