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

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

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

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

@ -9,7 +9,14 @@
</view> </view>
<view class="banner"> <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> </view>
@ -18,7 +25,14 @@
<view class="title">爆款推荐</view> <view class="title">爆款推荐</view>
</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>
<view class="module"> <view class="module">
@ -58,13 +72,23 @@
</template> </template>
<script> <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' import Util from '@/libs/util'
export default { export default {
data() { data() {
return { return {
per: true, // per: true, //
teamId: uni.getStorageSync('teamId') || '', 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-> reachBottom: 0, // 0->,1->,-1->
status: 'more', // more|loading|noMore status: 'more', // more|loading|noMore
keyword: '', keyword: '',
@ -103,6 +127,7 @@
this.keyword = '' this.keyword = ''
this.curTab = '' this.curTab = ''
this.per = true this.per = true
this.getBanner()
this.getCategory() this.getCategory()
this.initList() this.initList()
}, },
@ -166,6 +191,31 @@
const { page } = await categoryList() const { page } = await categoryList()
this.tabs = page 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 // keyword
clearKeyword() { clearKeyword() {
this.keyword = '' this.keyword = ''
@ -243,6 +293,10 @@
position: relative; position: relative;
.pic { .pic {
width: 100%; width: 100%;
height: 420rpx;
}
swiper {
height: 420rpx;
} }
} }
.tab-wrap { .tab-wrap {

@ -182,7 +182,8 @@
organizationName: '', organizationName: '',
curAccount: { curAccount: {
account: '' account: ''
} },
enterDisabled: 0
} }
}, },
computed: { computed: {
@ -227,6 +228,7 @@
return false return false
} }
this.enterDisabled = 0
if (result.hrUserInfo) { if (result.hrUserInfo) {
if (!result.hrUserInfo.userAvatars) result.hrUserInfo.userAvatars = Common.avatar // if (!result.hrUserInfo.userAvatars) result.hrUserInfo.userAvatars = Common.avatar //
this.info = result.hrUserInfo this.info = result.hrUserInfo
@ -238,13 +240,38 @@
// userAccountList // userAccountList
const accountList = result.userAccountList const accountList = result.userAccountList
if (accountList && accountList.length) { 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] 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) uni.setStorageSync('platformId', 7)
this.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) { toEnterAuth(platformId) {
if (this.enterDisabled) return this.$util.errMsg('您已认证为幼儿园,请勿重复认证!')
const { authenticationStatus, platformSource } = this.enterInfo const { authenticationStatus, platformSource } = this.enterInfo
// (0 1.2.3.) // (0 1.2.3.)
if (authenticationStatus === 1) { if (authenticationStatus === 1) {

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

Loading…
Cancel
Save