Commit 5051ea4f by sunerhu

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

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