Commit 5051ea4f by sunerhu

1.修改邀请加盟原生返回按钮不刷新接口,增加广播通知,刷新queryById 解决问题。

2.增加图片放大事件。
3.对课程列表样式进行微调
parent 3a31c0ab
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
</view> </view>
<view class="courseDetailBox"> <view class="courseDetailBox">
<view class="title"> <view class="title">
<h4>{{title}}</h4> <text style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{title}}</text>
<!-- <text class="detailBtn" @click="viewDetail()" v-if="isNeedViewDetail">订单详情></text> --> <!-- <text class="detailBtn" @click="viewDetail()" v-if="isNeedViewDetail">订单详情></text> -->
</view> </view>
<view class="summaryBox" v-if="summaryBox"> <view class="summaryBox" v-if="summaryBox">
...@@ -31,57 +31,59 @@ ...@@ -31,57 +31,59 @@
<script> <script>
import api from "@/api/api"; import api from "@/api/api";
export default { export default {
name:"courseItem", name: "courseItem",
props:{ props: {
fileLecturerId:{ fileLecturerId: {
type:Number type: Number
}, },
thumbnailPath:{ thumbnailPath: {
type:String type: String
}, },
title:{ title: {
type:String type: String
}, },
summaryBox:{ summaryBox: {
type:String type: String
}, },
dataList:{ dataList: {
type:Object type: Object
}, },
isNeedViewDetail:{ isNeedViewDetail: {
type:Boolean, type: Boolean,
// 销售课程传参判断是否需要显示订单详情字段 --暂时废弃 // 销售课程传参判断是否需要显示订单详情字段 --暂时废弃
}, },
orderId:{ orderId: {
type:Number type: Number
}, },
tagList:{ tagList: {
type:Object type: Object
}, },
fileId:{ fileId: {
type: Number type: Number
} }
}, },
data() { data() {
return { return {
_tagList:{} _tagList: {}
}; };
}, },
methods:{ methods: {
tagConcat(v1,v2){ tagConcat(v1, v2) {
if(v1 && v2 && v2.indexOf(',') > 0 && v1.indexOf(',') > 0){ if (v1 && v2 && v2.indexOf(',') > 0 && v1.indexOf(',') > 0) {
return [].concat(v2.split(',').split(','),v1.split(',')) return [].concat(v2.split(',').split(','), v1.split(','))
}else if(v1 && v1.indexOf(',') > 0){ } else if (v1 && v1.indexOf(',') > 0) {
return [].concat(v2,v1.split(',')) return [].concat(v2, v1.split(','))
}else if(v2 && v2.indexOf(',') > 0){ } else if (v2 && v2.indexOf(',') > 0) {
return [].concat(v2.split(','),v1) return [].concat(v2.split(','), v1)
}else{ } else {
return [].concat(v2,v1) return [].concat(v2, v1)
} }
}, },
lecturerQuery(){ lecturerQuery() {
api.lecturerQuery({id:this.fileLecturerId}).then(res=>{ api.lecturerQuery({
if(res['success']){ id: this.fileLecturerId
}).then(res => {
if (res['success']) {
this._tagList['v1'] = res['data']['lecturerInfos'][0]['lecturerRankNames']; this._tagList['v1'] = res['data']['lecturerInfos'][0]['lecturerRankNames'];
this._tagList['v2'] = res['data']['lecturerInfos'][0]['lecturerName']; this._tagList['v2'] = res['data']['lecturerInfos'][0]['lecturerName'];
} }
...@@ -90,7 +92,7 @@ ...@@ -90,7 +92,7 @@
}, },
updated() { updated() {
if(this.fileLecturerId){ if (this.fileLecturerId) {
this.lecturerQuery() this.lecturerQuery()
} }
}, },
...@@ -99,55 +101,67 @@ ...@@ -99,55 +101,67 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.itemContent{ .itemContent {
display: flex; display: flex;
.thumbnailBox{ .thumbnailBox {
width: 300rpx; width: 300rpx;
margin-right: 26rpx; margin-right: 26rpx;
image{
image {
max-width: 100%; max-width: 100%;
height: auto; height: auto;
} }
} }
.courseDetailBox{
.courseDetailBox {
width: 100%; width: 100%;
color: #333; color: #333;
.title{
.title {
display: flex; display: flex;
max-width: 380rpx; width: 380rpx;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.detailBtn{ font-size: 36rpx;
.detailBtn {
font-size: 24rpx; font-size: 24rpx;
color: #4A4A4A; color: #4A4A4A;
white-space: nowrap; white-space: nowrap;
} }
} }
h4{
h4 {
font-size: 32rpx; font-size: 32rpx;
} }
.summaryBox{
.summaryBox {
font-size: 24rpx; font-size: 24rpx;
margin: 10rpx 0; margin: 10rpx 0;
text{
text {
margin-right: 20rpx; margin-right: 20rpx;
} }
} }
.dataBox{
strong{ .dataBox {
strong {
color: #F15A1F; color: #F15A1F;
font-size: 30rpx; font-size: 30rpx;
margin: 10rpx 20rpx 10rpx 0; margin: 10rpx 20rpx 10rpx 0;
} }
text{
text {
font-size: 28rpx; font-size: 28rpx;
} }
} }
.tagListBox{
.tagListBox {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
margin-top: 20rpx; margin-top: 20rpx;
.tagItem{
.tagItem {
color: #20279B; color: #20279B;
font-size: 24rpx; font-size: 24rpx;
border-radius: 20rpx; border-radius: 20rpx;
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<view class="title"> <view class="title">
{{curTitle}} {{curTitle}}
</view> </view>
<scroll-view scroll-y style="height: 100vh;"> <scroll-view scroll-y style="height: 100%;">
<view class="contract" v-html="curContract"></view> <view class="contract" v-html="curContract"></view>
</scroll-view> </scroll-view>
...@@ -222,7 +222,7 @@ ...@@ -222,7 +222,7 @@
position: fixed; position: fixed;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
height: 70%; height: 75%;
left: 0; left: 0;
right: 0; right: 0;
margin: 0 auto; margin: 0 auto;
......
...@@ -49,8 +49,12 @@ ...@@ -49,8 +49,12 @@
<text class="iconfont icon-weibiaoti553"></text> <text class="iconfont icon-weibiaoti553"></text>
<view style="margin-top: 10px;" >点击添加毕业证照片</view> <view style="margin-top: 10px;" >点击添加毕业证照片</view>
</view> </view>
<image :src="applyParam.lastGraduateCertificationOssPath" v-if="applyParam.lastGraduateCertificationOssPath" <!-- mode="widthFix" -->
@click="upLoadPhoto()" mode="widthFix"></image> <view class="photo_w" v-if="applyParam.lastGraduateCertificationOssPath">
<image :src="applyParam.lastGraduateCertificationOssPath"
@click="upLoadPhoto()" ></image>
</view>
<view class="tips"> <view class="tips">
<view>(jpg,png 文件大小不大于1mb)</view> <view>(jpg,png 文件大小不大于1mb)</view>
</view> </view>
...@@ -101,7 +105,11 @@ ...@@ -101,7 +105,11 @@
},500) },500)
}, },
onShow() { onShow() {
uni.$on("ckqueryById", res => {
if(res == true){
this.queryById(null, uni.getStorageSync('cffp_userId'))
}
})
}, },
methods:{ methods:{
educationLevelQuery(){ educationLevelQuery(){
...@@ -195,4 +203,14 @@ ...@@ -195,4 +203,14 @@
<style lang="scss"> <style lang="scss">
@import 'applyCommon.scss'; @import 'applyCommon.scss';
.photo_w{
height: 320rpx;
width: 80%;
margin: auto;
padding-bottom: 20rpx;
}
.photo_w image {
width: 100%;
height: 100%;
}
</style> </style>
\ No newline at end of file
...@@ -31,11 +31,10 @@ ...@@ -31,11 +31,10 @@
<text class="iconfont icon-weibiaoti553" ></text> <text class="iconfont icon-weibiaoti553" ></text>
<view class="choseBtn" >点击添加身份证正面</view> <view class="choseBtn" >点击添加身份证正面</view>
</view> </view>
<view class="content_wrapper"> <view class="content_w" v-if="applyParam.idFrontPageOssPath">
<image :src="applyParam.idFrontPageOssPath" v-if="applyParam.idFrontPageOssPath" <image :src="applyParam.idFrontPageOssPath"
@click="upLoadPhoto('front')"></image> @click="upLoadPhoto('front')"></image>
</view> </view>
<view class="tips"> <view class="tips">
<view>(正确示例:身份证正面,字体清晰)</view> <view>(正确示例:身份证正面,字体清晰)</view>
<view>(jpg,png 文件大小不大于1mb)</view> <view>(jpg,png 文件大小不大于1mb)</view>
...@@ -47,8 +46,10 @@ ...@@ -47,8 +46,10 @@
<text class="iconfont icon-weibiaoti553" ></text> <text class="iconfont icon-weibiaoti553" ></text>
<view class="choseBtn" >点击添加身份证反面</view> <view class="choseBtn" >点击添加身份证反面</view>
</view> </view>
<image :src="applyParam.idBackPageOssPath" mode="widthFix" v-if="applyParam.idBackPageOssPath" <view class="content_w" v-if="applyParam.idBackPageOssPath">
@click="upLoadPhoto('front')"></image> <image :src="applyParam.idBackPageOssPath"
@click="upLoadPhoto('back')"></image>
</view>
<view class="tips"> <view class="tips">
<view>(正确示例:身份证反面,字体清晰)</view> <view>(正确示例:身份证反面,字体清晰)</view>
<view>(jpg,png 文件大小不大于1mb)</view> <view>(jpg,png 文件大小不大于1mb)</view>
...@@ -156,6 +157,7 @@ ...@@ -156,6 +157,7 @@
// url:`id-card?id=${res['data']['id']}` // url:`id-card?id=${res['data']['id']}`
url:`education` url:`education`
}); });
uni.$emit("ckqueryById",true);
}else{ }else{
uni.showToast({ uni.showToast({
title: res['message'], title: res['message'],
...@@ -208,5 +210,15 @@ ...@@ -208,5 +210,15 @@
} }
} }
} }
.content_w{
height: 380rpx;
width: 76%;
margin: auto;
padding-bottom: 20rpx;
}
.content_w image {
width: 100%;
height: 100%;
}
</style> </style>
\ No newline at end of file
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
<view class="contentItem"> <view class="contentItem">
<text>职业类型</text> <text>职业类型</text>
<picker @change="changeIndustry" :value="industryIdx" :range="industry" <picker @change="changeIndustry" :value="industryIdx" :range="industry"
range-key="industryName" :disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2"> range-key="industryName"
:disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2">
<view class="uni-input">{{industry[industryIdx]['industryName']}} <view class="uni-input">{{industry[industryIdx]['industryName']}}
<text class="iconfont icon-youjiantou"></text> <text class="iconfont icon-youjiantou"></text>
</view> </view>
...@@ -38,26 +39,33 @@ ...@@ -38,26 +39,33 @@
</view> </view>
<view class="contentItem"> <view class="contentItem">
<text>最近一次工作单位</text> <text>最近一次工作单位</text>
<input type="text" class="form-control" placeholder="非必填" v-model="applyParam.workingCompany" <input type="text" class="form-control" placeholder="非必填"
:disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2"/> v-model="applyParam.workingCompany"
:disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2" />
</view> </view>
<view class="contentItem"> <view class="contentItem">
<text>职位</text> <text>职位</text>
<input type="text" class="form-control" placeholder="非必填" v-model="applyParam.position" <input type="text" class="form-control" placeholder="非必填" v-model="applyParam.position"
:disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2"/> :disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2" />
</view> </view>
<view class="contentItem"> <view class="contentItem">
<text>任职开始时间</text> <text>任职开始时间</text>
<picker mode="date" :value="applyParam.workingStart" @change="bindWorkingStart" :disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2"> <picker mode="date" :value="applyParam.workingStart" @change="bindWorkingStart"
<view v-if="!applyParam.workingStart">请选择<text class="iconfont icon-youjiantou"></text></view> :disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2">
<view class="uni-input" v-if="applyParam.workingStart">{{applyParam.workingStart}}<text class="iconfont icon-youjiantou"></text></view> <view v-if="!applyParam.workingStart">请选择<text class="iconfont icon-youjiantou"></text>
</view>
<view class="uni-input" v-if="applyParam.workingStart">{{applyParam.workingStart}}<text
class="iconfont icon-youjiantou"></text></view>
</picker> </picker>
</view> </view>
<view class="contentItem"> <view class="contentItem">
<text>结束时间</text> <text>结束时间</text>
<picker mode="date" :value="applyParam.workingEnd" @change="bindWorkingEnd" :disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2"> <picker mode="date" :value="applyParam.workingEnd" @change="bindWorkingEnd"
<view v-if="!applyParam.workingEnd">请选择<text class="iconfont icon-youjiantou"></text></view> :disabled="this.applyParam.approvalStatus!= 0 && this.applyParam.approvalStatus != 2">
<view class="uni-input" v-if="applyParam.workingEnd">{{applyParam.workingEnd}}<text class="iconfont icon-youjiantou"></text></view> <view v-if="!applyParam.workingEnd">请选择<text class="iconfont icon-youjiantou"></text>
</view>
<view class="uni-input" v-if="applyParam.workingEnd">{{applyParam.workingEnd}}<text
class="iconfont icon-youjiantou"></text></view>
</picker> </picker>
</view> </view>
<view class="contentItem" style="border: 0;"> <view class="contentItem" style="border: 0;">
...@@ -69,14 +77,16 @@ ...@@ -69,14 +77,16 @@
<view style="margin-top: 10px;">点击添加荣誉证书照片</view> <view style="margin-top: 10px;">点击添加荣誉证书照片</view>
</view> </view>
<view v-if="applyParam.certificate" style="width: 100%;text-align: center;"> <view v-if="applyParam.certificate" style="width: 100%;text-align: center;">
<view class="photo_wrapper" v-for="picItem in picList"> <view class="photo_w" v-for="picItem in picList">
<image style="width: 100%;" :src="picItem" mode="widthFix"></image> <image style="width: 100%;" :src="picItem" @click="clickImg(picItem)"></image>
</view> </view>
</view> </view>
<view class="tips"> <view class="tips">
<view>(jpg,png 文件大小不大于1mb)</view> <view>(jpg,png 文件大小不大于1mb)</view>
</view> </view>
<view class="upLoadMore" v-if="this.applyParam.approvalStatus== 0 || this.applyParam.approvalStatus == 2" @click="upLoadPhoto()"> <view class="upLoadMore"
v-if="this.applyParam.approvalStatus== 0 || this.applyParam.approvalStatus == 2"
@click="upLoadPhoto()">
<view class="iconfont icon-jiahao"></view> <view class="iconfont icon-jiahao"></view>
<view>上传更多</view> <view>上传更多</view>
</view> </view>
...@@ -91,22 +101,27 @@ ...@@ -91,22 +101,27 @@
<script> <script>
import api from '../../api/api'; import api from '../../api/api';
import { CommonUpload } from '@/util/uploaderFile'; import {
export default{ CommonUpload,ckbigImg
data(){ } from '@/util/uploaderFile';
export default {
data() {
return { return {
industry:[{industryName:'请选择',industryId:null}], industry: [{
industryIdx:0, industryName: '请选择',
applyParam:{ industryId: null
workingCategoryId:'', }],
workingCompany:'', industryIdx: 0,
position:'', applyParam: {
workingStart:'', workingCategoryId: '',
workingEnd:'', workingCompany: '',
certificate:'', position: '',
approvalStatus:'' workingStart: '',
workingEnd: '',
certificate: '',
approvalStatus: ''
}, },
dataForm:{ dataForm: {
loginId: uni.getStorageSync('cffp_userId'), loginId: uni.getStorageSync('cffp_userId'),
targetType: "5", targetType: "5",
targetId: '', targetId: '',
...@@ -114,53 +129,68 @@ ...@@ -114,53 +129,68 @@
targetUseFor: "12", targetUseFor: "12",
targetSeq: "0" targetSeq: "0"
}, },
picList:[] picList: []
} }
}, },
components:{}, components: {},
onLoad(options){ onLoad(options) {
this.occupationQry(); this.occupationQry();
setTimeout(()=>{ setTimeout(() => {
if(uni.getStorageSync('applyId')){ if (uni.getStorageSync('applyId')) {
this.queryById(uni.getStorageSync('applyId'),null) this.queryById(uni.getStorageSync('applyId'), null)
}else if(options.shareId){ } else if (options.shareId) {
this.queryById(options.shareId,null) this.queryById(options.shareId, null)
}else{ } else {
this.queryById(null,uni.getStorageSync('cffp_userId')) this.queryById(null, uni.getStorageSync('cffp_userId'))
} }
},500) }, 500)
},
onShow() {
uni.$on("ckqueryById", res => {
if(res == true){
this.queryById(null, uni.getStorageSync('cffp_userId'))
}
})
},
methods: {
clickImg(i) {
ckbigImg(i)
}, },
methods:{ changeIndustry: function(e) {
changeIndustry: function(e){
this.industryIdx = e.detail.value; this.industryIdx = e.detail.value;
// this.workingCategory = this.industry[this.industryIdx]['industryName']; // this.workingCategory = this.industry[this.industryIdx]['industryName'];
this.applyParam.workingCategoryId = this.industry[this.industryIdx]['industryId']; this.applyParam.workingCategoryId = this.industry[this.industryIdx]['industryId'];
}, },
bindWorkingStart:function(e){ bindWorkingStart: function(e) {
this.applyParam.workingStart = e.detail.value; this.applyParam.workingStart = e.detail.value;
}, },
bindWorkingEnd:function(e){ bindWorkingEnd: function(e) {
this.applyParam.workingEnd = e.detail.value; this.applyParam.workingEnd = e.detail.value;
}, },
occupationQry(){ occupationQry() {
api.occupationQry({insurerId:2}).then((res)=>{ api.occupationQry({
if(res['success']){ insurerId: 2
}).then((res) => {
if (res['success']) {
this.industry = this.industry.concat(res['data']['industry']); this.industry = this.industry.concat(res['data']['industry']);
}else{ } else {
this.industry = [{industryName:'请选择',industryId:null}]; this.industry = [{
industryName: '请选择',
industryId: null
}];
} }
}) })
}, },
upLoadPhoto(event){ upLoadPhoto(event) {
this.dataForm.targetId = this.applyParam.id this.dataForm.targetId = this.applyParam.id
CommonUpload(this.dataForm).then(res => { CommonUpload(this.dataForm).then(res => {
this.applyParam.certificate = res.data.filePath; this.applyParam.certificate = res.data.filePath;
this.picList.push(this.applyParam.certificate); this.picList.push(this.applyParam.certificate);
}); });
}, },
saveInfo(){ saveInfo() {
if(this.applyParam.approvalStatus== 0 || this.applyParam.approvalStatus == 2){ if (this.applyParam.approvalStatus == 0 || this.applyParam.approvalStatus == 2) {
if(!this.applyParam.workingCategoryId){ if (!this.applyParam.workingCategoryId) {
uni.showToast({ uni.showToast({
title: '请选择职业类型', title: '请选择职业类型',
duration: 2000, duration: 2000,
...@@ -170,16 +200,16 @@ ...@@ -170,16 +200,16 @@
} }
this.applyParam = { this.applyParam = {
...this.applyParam, ...this.applyParam,
operatStep:2, operatStep: 2,
certificate:this.picList.join(',') certificate: this.picList.join(',')
} }
api.saveApplyInfo(this.applyParam).then((res)=>{ api.saveApplyInfo(this.applyParam).then((res) => {
if(res['success']){ if (res['success']) {
uni.navigateTo({ uni.navigateTo({
// url:`id-card?id=${res['data']['id']}` // url:`id-card?id=${res['data']['id']}`
url:`id-card` url: `id-card`
}); });
}else{ } else {
uni.showToast({ uni.showToast({
title: res['message'], title: res['message'],
duration: 2000, duration: 2000,
...@@ -188,24 +218,27 @@ ...@@ -188,24 +218,27 @@
return; return;
} }
}) })
}else{ } else {
uni.navigateTo({ uni.navigateTo({
// url:`id-card?id=${res['data']['id']}` // url:`id-card?id=${res['data']['id']}`
url:`id-card` url: `id-card`
}); });
} }
}, },
queryById(id,userId){ queryById(id, userId) {
api.queryById({id:id,userId:userId}).then((res)=>{ api.queryById({
id: id,
userId: userId
}).then((res) => {
console.log(res) console.log(res)
if(res['success']){ if (res['success']) {
console.log(res, 144) console.log(res, 144)
this.applyParam = res['data']['data']; this.applyParam = res['data']['data'];
if(this.applyParam.certificate){ if (this.applyParam.certificate) {
this.picList = this.applyParam.certificate.split(','); this.picList = this.applyParam.certificate.split(',');
} }
for(let i=0;i<this.industry.length;i++){ for (let i = 0; i < this.industry.length; i++) {
if(this.applyParam.workingCategoryId == this.industry[i].industryId){ if (this.applyParam.workingCategoryId == this.industry[i].industryId) {
this.industryIdx = i; this.industryIdx = i;
} }
} }
...@@ -221,11 +254,15 @@ ...@@ -221,11 +254,15 @@
<style lang="scss"> <style lang="scss">
@import 'applyCommon.scss'; @import 'applyCommon.scss';
.pic_list-s{
width: 100%; .photo_w {
height: 320rpx; height: 320rpx;
width: 80%;
margin: auto;
padding-bottom: 20rpx;
} }
.pic_list-s image {
.photo_w image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
......
...@@ -84,8 +84,9 @@ ...@@ -84,8 +84,9 @@
<style lang="scss"> <style lang="scss">
.ulBox,.liBox{ .ulBox,.liBox{
padding-bottom: 30rpx;
display: flex; display: flex;
} }
.ulBox{ .ulBox{
flex-direction: column; flex-direction: column;
......
...@@ -134,10 +134,12 @@ ...@@ -134,10 +134,12 @@
onShow() { onShow() {
uni.$on("handClick", res => { uni.$on("handClick", res => {
this.customerBasicInfo = res.data this.customerBasicInfo = res.data
// 清除监听
uni.$off('handClick');
}) })
}, },
onUnload() {
// 移除监听事件
uni.$off('handClick');
},
methods: { methods: {
close(){ close(){
this.bootpage = false this.bootpage = false
......
...@@ -54,6 +54,18 @@ export function CommonUpload(psrams) { ...@@ -54,6 +54,18 @@ export function CommonUpload(psrams) {
}) })
} }
//图片放大
export function ckbigImg(params) {
wx.previewImage({
urls: [params], //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了
current: '', // 当前显示图片的http链接,默认是第一个
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
}
// 这个方法用来上传文件 // 这个方法用来上传文件
export function uploadFilepdf(params) { export function uploadFilepdf(params) {
let requestVO = params let requestVO = params
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment