前端-胡立永 2 weeks ago
parent
commit
ca5a226f3c
5 changed files with 99 additions and 60 deletions
  1. +3
    -1
      locale/en.json
  2. +3
    -1
      locale/zh-Hans.json
  3. +8
    -6
      pages_order/payOrder.vue
  4. +35
    -10
      pages_zlx/zlx-form.vue
  5. +50
    -42
      store/store.js

+ 3
- 1
locale/en.json View File

@ -324,7 +324,9 @@
"please_enter_contact": "Please enter contact information",
"please_enter_correct_contact": "Please enter correct contact information",
"please_enter_id_card": "Please enter ID card number",
"please_enter_correct_id_card": "Please enter correct ID card number"
"please_enter_correct_id_card": "Please enter correct ID card number",
"please_upload_wechat_qr_code": "Please upload WeChat QR code",
"reviewing": "Under Review"
}
},
"common": {


+ 3
- 1
locale/zh-Hans.json View File

@ -324,7 +324,9 @@
"please_enter_contact": "请输入联系方式",
"please_enter_correct_contact": "请输入正确的联系方式",
"please_enter_id_card": "请输入身份证号",
"please_enter_correct_id_card": "请输入正确的身份证号"
"please_enter_correct_id_card": "请输入正确的身份证号",
"please_upload_wechat_qr_code": "请上传微信二维码",
"reviewing": "审核中"
}
},
"common": {


+ 8
- 6
pages_order/payOrder.vue View File

@ -82,6 +82,7 @@ export default {
return {
orderId: '',
dataInfo: {},
detail : {},
customStyle: {
color: '#FF5858'
},
@ -128,21 +129,22 @@ export default {
},
methods: {
getTitle() {
if (!this.dataInfo) return ''
if (!this.detail) return ''
return this.dataInfo.type == 0
? this.$ot(this.dataInfo.activity, 'active', 'title')
: this.$ot(this.dataInfo.travel, 'travel', 'title')
? this.$ot(this.detail.activity, 'active', 'title')
: this.$ot(this.detail.travel, 'travel', 'title')
},
getAddress() {
if (!this.dataInfo) return ''
if (!this.detail) return ''
return this.dataInfo.type == 0
? this.$ot(this.dataInfo.activity, 'active', 'address')
: this.$ot(this.dataInfo.travel, 'travel', 'address')
? this.$ot(this.detail.activity, 'active', 'address')
: this.$ot(this.detail.travel, 'travel', 'address')
},
getorderInfo() {
this.$api('orderInfo', { orderId: this.orderId }, res => {
if (res.code == 200) {
this.dataInfo = res.result.orderDetails
this.detail = res.result
}
})
},


+ 35
- 10
pages_zlx/zlx-form.vue View File

@ -29,19 +29,19 @@
<view class="form-box-line">
<view class="label-box">{{$t('pages_zlx.zlx_form.real_name')}}</view><!-- 真实姓名 -->
<view class="value-box">
<uv-input :placeholder="$t('pages_zlx.zlx_form.enter_real_name')" v-model="info.name" border="none" color="#fff"></uv-input><!-- 请输入真实姓名 -->
<uv-input :placeholder="$t('pages_zlx.zlx_form.enter_real_name')" v-model="info.name" border="none" color="#fff" :disabled="info.state == 0"></uv-input><!-- 请输入真实姓名 -->
</view>
</view>
<view class="form-box-line">
<view class="label-box">{{$t('pages_zlx.zlx_form.contact_info')}}</view><!-- 联系方式 -->
<view class="value-box">
<uv-input :placeholder="$t('pages_zlx.zlx_form.enter_contact_info')" v-model="info.phone" type="number" border="none" color="#fff"></uv-input><!-- 请输入联系方式 -->
<uv-input :placeholder="$t('pages_zlx.zlx_form.enter_contact_info')" v-model="info.phone" type="number" border="none" color="#fff" :disabled="info.state == 0"></uv-input><!-- 请输入联系方式 -->
</view>
</view>
<view class="form-box-line">
<view class="label-box">{{$t('pages_zlx.zlx_form.id_card')}}</view><!-- 身份证号 -->
<view class="value-box">
<uv-input :placeholder="$t('pages_zlx.zlx_form.enter_id_card')" type="idcard" v-model="info.cardNo" border="none" color="#fff"></uv-input><!-- 请输入身份证号 -->
<uv-input :placeholder="$t('pages_zlx.zlx_form.enter_id_card')" type="idcard" v-model="info.cardNo" border="none" color="#fff" :disabled="info.state == 0"></uv-input><!-- 请输入身份证号 -->
</view>
</view>
<view class="form-box-line">
@ -59,7 +59,8 @@
</view>
<view class="upload-btn"
@click="uploadFile">{{$t('pages_zlx.zlx_form.upload_resume')}}</view><!-- 上传简历 -->
@click="info.state != 0 ? uploadFile() : null"
:class="{'disabled': info.state == 0}">{{$t('pages_zlx.zlx_form.upload_resume')}}</view><!-- 上传简历 -->
</view>
</view>
<view class="form-box-line">
@ -68,7 +69,9 @@
<view style="width: 80rpx;height: 80rpx;">
<uv-image v-if="info.img" :src="info.img" width="80rpx" height="80rpx" @click="bigImg"></uv-image>
</view>
<view class="upload-btn" @click="upImg">{{$t('pages_zlx.zlx_form.upload_image')}}</view><!-- 上传图片 -->
<view class="upload-btn"
@click="info.state != 0 ? upImg() : null"
:class="{'disabled': info.state == 0}">{{$t('pages_zlx.zlx_form.upload_image')}}</view><!-- 上传图片 -->
</view>
</view>
</view>
@ -83,6 +86,7 @@
:maxCount="9"
width="180rpx"
height="180rpx"
:disabled="info.state == 0"
@afterRead="afterRead"
@delete="deleteImage">
</uv-upload>
@ -97,7 +101,9 @@
<view class="xieyi-val"
@click="$utils.navigateTo('/pages_login/yinsixieyi?key=vip_text')">{{$t('pages_zlx.zlx_form.agreement_link')}}</view><!-- 主理人协议 -->
</view>
<view class="choose-box" @click="isAgree = !isAgree">
<view class="choose-box"
@click="info.state != 0 ? (isAgree = !isAgree) : null"
:class="{'disabled': info.state == 0}">
<view class="normol-box" v-if="!isAgree"></view>
<image src="./static/choose-icon.png" mode="widthFix" v-else></image>
</view>
@ -105,13 +111,20 @@
</view>
</view>
<view class="btn-box" v-if="info.state != 1">
<uv-button :text="$t('pages_zlx.zlx_form.save')" color="#381615" shape="circle" :customStyle="btnCustomStyle" @click="confrim"></uv-button><!-- 保存 -->
<!-- 审核中状态 -->
<view class="btn-box" v-if="info.state == 0">
<uv-button :text="$t('pages_zlx.zlx_form.reviewing')" color="#999999" shape="circle" :customStyle="reviewingBtnStyle"></uv-button><!-- -->
</view>
<view class="btn-box" v-else>
<!-- 已审核通过状态 -->
<view class="btn-box" v-else-if="info.state == 1">
<uv-button :text="$t('pages_zlx.zlx_form.approved')" color="#381615" shape="circle" :customStyle="btnCustomStyle"></uv-button><!-- -->
</view>
<!-- 驳回状态或初始状态可以提交 -->
<view class="btn-box" v-else>
<uv-button :text="$t('pages_zlx.zlx_form.save')" color="#381615" shape="circle" :customStyle="btnCustomStyle" @click="confrim"></uv-button><!-- 保存 -->
</view>
</view>
</template>
@ -123,6 +136,9 @@
btnCustomStyle:{
color:'#FF5858'
},
reviewingBtnStyle:{
color:'#999999'
},
info:{
name:'',
phone:'',
@ -245,6 +261,7 @@
if(!this.$utils.verificationPhone(this.info.phone)) return this.$Toast(this.$t('pages_zlx.zlx_form.please_enter_correct_contact')) //
if(!this.info.cardNo) return this.$Toast(this.$t('pages_zlx.zlx_form.please_enter_id_card')) //
if(this.info.cardNo.length != 18) return this.$Toast(this.$t('pages_zlx.zlx_form.please_enter_correct_id_card')) //
if(!this.info.img) return this.$Toast(this.$t('pages_zlx.zlx_form.please_upload_wechat_qr_code')) //
let params = {
name:this.info.name,
phone:this.info.phone,
@ -390,6 +407,10 @@
font-weight: 400;
font-size: 28rpx;
color: #FF5858;
&.disabled {
color: #999999;
cursor: not-allowed;
}
}
}
.docx-title{
@ -435,6 +456,10 @@
width: 31rpx;
height: 31rpx;
}
&.disabled {
opacity: 0.5;
cursor: not-allowed;
}
}
}
}


+ 50
- 42
store/store.js View File

@ -9,29 +9,29 @@ import i18n from '@/locale/index.js'
//Vuex.Store 构造器选项
const store = new Vuex.Store({
state: {
token:uni.getStorageSync('token') || '',
token: uni.getStorageSync('token') || '',
configList: {}, //配置列表
userInfo : uni.getStorageSync('userInfo') ? JSON.parse(uni.getStorageSync('userInfo')) : {}, //用户信息
userInfo: uni.getStorageSync('userInfo') ? JSON.parse(uni.getStorageSync('userInfo')) : {}, //用户信息
// riceInfo : {},//用户相关信息
areaList : [],//地区列表信息
selectArea : {},//当前选择的地区
areaList: [], //地区列表信息
selectArea: {}, //当前选择的地区
},
getters: {
userInfo:state => state.userInfo,
isLogin:state => state.token ? true : false
userInfo: state => state.userInfo,
isLogin: state => state.token ? true : false
},
mutations: {
// 初始化配置
initConfig(state){
initConfig(state) {
api('getConfig', res => {
if(res.code == 200){
if (res.code == 200) {
res.result.forEach(n => {
state.configList[n.keyName] = n.keyContent
})
}
console.log("initConfig===============", res);
})
// let config = ['getPrivacyPolicy', 'getUserAgreement']
// config.forEach(k => {
// api(k, res => {
@ -41,59 +41,60 @@ const store = new Vuex.Store({
// })
// })
},
login(state,commit){
login(state, commit) {
uni.showLoading({
title: i18n.t('common.logging_in') // 登录中...
})
uni.login({
success(res) {
if(res.errMsg != "login:ok"){
if (res.errMsg != "login:ok") {
return
}
let data = {
code : res.code
code: res.code
}
if(uni.getStorageSync('shareId')){
if (uni.getStorageSync('shareId')) {
data.shareId = uni.getStorageSync('shareId')
}
api('wxLogin', data, res => {
uni.hideLoading()
if(res.code != 200){
if (res.code != 200) {
return
}
state.userInfo = res.result.userInfo
state.token = res.result.token
uni.setStorageSync('token', res.result.token)
if(!state.userInfo.nickName || !state.userInfo.headImage){
if (!state.userInfo.nickName || !state.userInfo.headImage) {
uni.navigateTo({
url: '/pages_login/wxUserInfo'
})
}else{
} else {
uni.switchTab({
url:'/pages/index/index'
url: '/pages/index/index'
})
}
})
}
})
},
getUserInfo(state){
getUserInfo(state) {
api('getInfo', res => {
if(res.code == 200){
uni.setStorageSync('userInfo',JSON.stringify(res.result))
if (res.code == 200) {
uni.setStorageSync('userInfo', JSON.stringify(res.result))
state.userInfo = res.result
if(!state.userInfo.nickName ||
!state.userInfo.headImage ||
!state.userInfo.phone ||
!state.userInfo.sex){
if (!state.userInfo.nickName ||
!state.userInfo.headImage ||
!state.userInfo.phone ||
!state.userInfo.sex) {
uni.showToast({
title: i18n.t('pages_order.huodong_detail.complete_info_required') // 请您先完善必要信息
title: i18n.t(
'pages_order.huodong_detail.complete_info_required') // 请您先完善必要信息
})
uni.navigateTo({
url: '/pages_login/wxUserInfo'
@ -112,7 +113,7 @@ const store = new Vuex.Store({
// })
// },
// 退出登录
logout(state){
logout(state) {
uni.showModal({
title: i18n.t('common.confirm_logout'), // 确认退出登录吗
success(r) {
@ -128,25 +129,32 @@ const store = new Vuex.Store({
})
},
// 查询地区
getArea(state, fn){
getArea(state, fn) {
api('getArea', res => {
if(res.code == 200){
res.result.unshift({
city : i18n.t('common.all'), // 全部
id : '',
})
if (res.code == 200) {
res.result.unshift({
city: i18n.t('common.all'), // 全部
id: '',
})
state.areaList = res.result
fn && fn(res.result)
}
})
},
setArea(state, index){
setArea(state, index) {
state.selectArea = state.areaList[index]
},
hanlderManager(state, fn){
api('joinRecruitInfo')
.then(res => {
fn && fn(res)
})
},
},
actions: {
},
actions: {},
})
export default store

Loading…
Cancel
Save