Browse Source

添加科目一签到

master
unknown 3 weeks ago
parent
commit
1f66c8c6ce
  1. 2
      config/site.config.js
  2. 2
      pages/indexEntry/signIn/signAndOut/signAndOut.vue
  3. 2
      pages/indexEntry/signIn/signAndOut/signAndOutSubjiect1.vue
  4. 14
      pages/indexEntry/signIn/signIn.vue
  5. 24
      pages/tabbar/index/index.vue
  6. 1
      store/modules/user.js

2
config/site.config.js

@ -2,7 +2,7 @@ const VUE_APP_PLATFORM = process.env.VUE_APP_PLATFORM;
// localIp = false
module.exports = {
H5_API: VUE_APP_PLATFORM === 'h5' ? '/api' : '',//h5代理
WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://192.168.1.106:8318/',//非代理地址 不要忘记加/
WX_API: VUE_APP_PLATFORM === 'h5' ? '/' : 'http://www.lyjppt.com/',//非代理地址 不要忘记加/
website: 'http://192.168.1.37',
httpPrefix: 'app-api/',
imgUrl: 'https://jiangxijiakao-1.oss-cn-hangzhou.aliyuncs.com/defaultImages/app/bigImg/',

2
pages/indexEntry/signIn/signAndOut/signAndOut.vue

@ -69,7 +69,7 @@
data() {
return {
deviceCode: 0,
stepFailureReason: '未通过',
stepFailureReason: '',
step1: false,
step2: false,
step3: false,

2
pages/indexEntry/signIn/signAndOut/signAndOutSubjiect1.vue

@ -69,7 +69,7 @@
data() {
return {
deviceCode: 0,
stepFailureReason: '未通过',
stepFailureReason: '',
step1: false,
step2: false,
step3: false,

14
pages/indexEntry/signIn/signIn.vue

@ -17,7 +17,7 @@
<script>
import zengCalen from '@/uni_modules/zeng-calen/components/zeng-calen/zeng-calen'
import { scanCodeFn } from '@/config/utils.js'
import { monthSignRecord, signDetail, monthSignRecordSubjiect1 } from '@/config/api.js'
import { monthSignRecord, signDetail, monthSignRecordSubjiect1, signDetailSubjiect1 } from '@/config/api.js'
export default {
components: {zengCalen},
data() {
@ -26,7 +26,8 @@
chooseDay: [], //
chooseDayLack: [], //
list: [],
signMonth: ''
signMonth: '',
tmpSubjiect1: []
}
},
onLoad() {
@ -47,7 +48,8 @@
},
async monthSignRecordSubjiect1Fn() {
const {data: res} = await monthSignRecordSubjiect1({signMonth: this.signMonth})
this.chooseDay = res
this.chooseDay.unshift(...res)
this.tmpSubjiect1 = res
if(res&&res.length&&!this.actDay.length) {
let day = res[res.length-1]
this.actDay = [day]
@ -63,7 +65,11 @@
//
async onDayClick(data) {
this.actDay = [data]
const {data: res} = await signDetail({signDate: data})
let apiFn = signDetail
if(this.tmpSubjiect1.includes(data)) {
apiFn = signDetailSubjiect1
}
const {data: res} = await apiFn({signDate: data})
this.list = res || []
},

24
pages/tabbar/index/index.vue

@ -4,7 +4,7 @@
<view class="TopCon pad" >
<!-- 地址 -->
<view class="adrsCon">
<view class="adr" v-if="vuex_cityInfo.city" @click="getLatLngFn">{{ vuex_cityInfo.city }} </view>
<view class="adr oneRowText" v-if="vuex_cityInfo.city" @click="getLatLngFn">{{vuex_cityInfo.city}} <text v-if="vuex_cityInfo.name"> / {{vuex_cityInfo.name}}</text></view>
<view class="adr" v-else @click="getLatLngFn" style="display: flex;align-items: center;">
<text>获取定位信息</text>
<!-- <image src="@/static/images/icon/down.png" mode="" style="width: 18rpx;height: 18rpx;margin-left: 6rpx;"></image> -->
@ -251,13 +251,19 @@
this.$goPage('/pages/indexEntry/webView/webView')
},
async initApi() {
uni.showLoading({
title: '正在加载...'
})
await this.getarticleListFn()
await this.getRecommendList()
await this.recommendSchoolList()
this.$nextTick(()=>{uni.hideLoading()})
try{
uni.showLoading({
title: '正在加载...'
})
await this.getarticleListFn()
await this.getRecommendList()
await this.recommendSchoolList()
this.$nextTick(()=>{uni.hideLoading()})
}catch(e){
this.$nextTick(()=>{uni.hideLoading()})
}
},
goCoachDetail(item) {
let objStr = encodeURIComponent(JSON.stringify(item))
@ -295,7 +301,7 @@
this.$store.commit('updateSchool', {})
return this.$u.utils.clickSignUp()
}else if(item.text=='签到签退') {
if(this.vuex_userInfo.applyStep<6) return this.$u.toast('先报名学员')
// if(this.vuex_userInfo.applyStep<6) return this.$u.toast('')
}
this.$goPage(item.url)
},

1
store/modules/user.js

@ -206,6 +206,7 @@ function getCityInfo(resolve, reject, commit) {
// cityCode: result.code||result.cityCode,
province: result.province,
district: result.district,
name: result.name
}
commit('update_vuex_cityInfo', obj)
resolve(obj)

Loading…
Cancel
Save