From 4c32c837290daa0a0ce8aac6a1472942e5876f29 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 18 七月 2025 09:13:10 +0800
Subject: [PATCH] Remove logs folder from version control
---
small-program/pages/employment-certification/employment-certification.vue | 435 ++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 407 insertions(+), 28 deletions(-)
diff --git a/small-program/pages/employment-certification/employment-certification.vue b/small-program/pages/employment-certification/employment-certification.vue
index 5d50fd5..d9a0717 100644
--- a/small-program/pages/employment-certification/employment-certification.vue
+++ b/small-program/pages/employment-certification/employment-certification.vue
@@ -2,7 +2,7 @@
<view class="box">
<view class="box-head" :style="{ backgroundImage: 'url(' + bgImg + ')' }">
<view class="box-head-info">
- <text>鐢ㄥ伐璁よ瘉</text>
+ <text>{{title}}</text>
<text>璇锋寜瑕佹眰濉啓璁よ瘉淇℃伅</text>
</view>
<view class="box-head-content">
@@ -12,8 +12,8 @@
<text>*</text>
</view>
<view class="item-cate">
- <view class="item-cate-row active">涓汉</view>
- <view class="item-cate-row">浼佷笟</view>
+ <view :class="'item-cate-row '+ (!isCompany?'active':'')" @click="changeIsCompany">涓汉</view>
+ <view :class="'item-cate-row '+(isCompany?'active':'')" @click="changeIsCompany">浼佷笟</view>
</view>
</view>
<view class="item">
@@ -22,16 +22,16 @@
<text>*</text>
</view>
<view class="item-val">
- <input type="text" placeholder="璇疯緭鍏ョ湡瀹炲鍚�" />
+ <input type="text" v-model="form.linkName" placeholder="璇疯緭鍏ョ湡瀹炲鍚�" />
</view>
</view>
- <view class="item">
+ <view class="item" v-if="isCompany">
<view class="item-label">
<text>鍗曚綅鍚嶇О</text>
<text>*</text>
</view>
<view class="item-val">
- <input type="text" placeholder="璇疯緭鍏ュ崟浣嶅悕绉�" />
+ <input type="text" v-model="form.companyName" placeholder="璇疯緭鍏ュ崟浣嶅悕绉�" />
</view>
</view>
<view class="item">
@@ -40,74 +40,444 @@
<text>*</text>
</view>
<view class="item-val">
- <text>鐐瑰嚮鑾峰彇</text>
- <button open-type="getPhoneNumber">鑾峰彇鎵嬫満鍙�</button>
+ <input type="text" v-model="form.telephone" placeholder="璇疯緭鍏ュ崟浣嶅悕绉�" />
</view>
</view>
- <view class="item">
- <view class="item-label">
+ <view class="item" @click="chooseMPLoaction">
+ <view class="item-label" >
<text>鎺ュ崟浣嶇疆</text>
<text>*</text>
</view>
- <view class="item-val">
- <text>璇烽�夋嫨</text>
+ <view class="item-val" >
+ <text>{{form.location || '鍘婚�夋嫨'}}</text>
<u-icon name="arrow-right" color="#111111" size="18"></u-icon>
</view>
</view>
- <view class="item">
+ <view class="item" v-if="!isCompany">
<view class="item-label">
<text>韬唤璇佷俊鎭�</text>
<text>*</text>
</view>
<view class="item-upload">
- <view class="item-upload-item">
- <image src="/static/image/btn_renxiang@2x.png" mode="widthFix"></image>
+ <view class="item-upload-item" @click="uploadImg(11)">
+ <image v-if="form.img11Full && form.img11Full !=''" :src="form.img11Full" mode="widthFix"></image>
+ <image v-else src="/static/image/btn_renxiang@2x.png" mode="widthFix"></image>
</view>
- <view class="item-upload-item">
- <image src="/static/image/btn_guohui@2x.png" mode="widthFix"></image>
+ <view class="item-upload-item" @click="uploadImg(21)">
+ <image v-if="form.img21Full && form.img21Full !=''" :src="form.img21Full" mode="widthFix"></image>
+ <image v-else src="/static/image/btn_guohui@2x.png" mode="widthFix"></image>
</view>
</view>
</view>
- <view class="item">
+ <view class="item" v-if="isCompany">
<view class="item-label">
<text>璁よ瘉璧勬枡</text>
<text>*</text>
</view>
- <view class="item-upload">
- <view class="item-upload-item1">
+ <view class="item-upload" v-if="flag==0">
+ <view class="item-upload-item1" @click="uploadImg(1)">
<view class="image">
- <image src="/static/icon/ic_camera@2x.png" mode="widthFix"></image>
+ <image v-if="form.img1Full && form.img1Full !=''" :src=" form.img1Full" mode="widthFix"></image>
+ <image v-else src="/static/icon/ic_camera@2x.png" mode="widthFix"></image>
<text>鐐瑰嚮涓婁紶</text>
</view>
<view class="info">
- <text>钀ヤ笟鎵х収</text>
+ <text>1.钀ヤ笟鎵х収</text>
<text>*</text>
</view>
</view>
- <view class="item-upload-item1">
+ <view class="item-upload-item1" @click="uploadImg(2)">
<view class="image">
- <image src="/static/icon/ic_camera@2x.png" mode="widthFix"></image>
+ <image v-if="form.img2Full && form.img2Full !=''" :src=" form.img2Full" mode="widthFix"></image>
+ <image v-else src="/static/icon/ic_camera@2x.png" mode="widthFix"></image>
<text>鐐瑰嚮涓婁紶</text>
</view>
<view class="info">
- <text>鍏跺畠璁よ瘉璧勬枡</text>
+ <text>2.鍏跺畠璁よ瘉璧勬枡</text>
+ </view>
+ </view>
+ </view>
+ <view class="item-upload" v-if="flag==1">
+ <view class="item-upload-item1" @click="uploadImg(1)">
+ <view class="image">
+ <image v-if="form.img1Full && form.img1Full !=''" :src=" form.img1Full" mode="widthFix"></image>
+ <image v-else src="/static/icon/ic_camera@2x.png" mode="widthFix"></image>
+ <text>鐐瑰嚮涓婁紶</text>
+ </view>
+ <view class="info">
+ <text>1.钀ヤ笟鎵х収</text>
+ <text>*</text>
+ </view>
+ </view>
+ <view class="item-upload-item1" @click="uploadImg(2)">
+ <view class="image">
+ <image v-if="form.img2Full && form.img2Full !=''" :src=" form.img2Full" mode="widthFix"></image>
+ <image v-else src="/static/icon/ic_camera@2x.png" mode="widthFix"></image>
+ <text>鐐瑰嚮涓婁紶</text>
+ </view>
+ <view class="info">
+ <text>2.閬撹矾杩愯緭缁忚惀璁稿彲璇�</text>
+ <text>*</text>
+ </view>
+ </view>
+ <view class="item-upload-item1" @click="uploadImg(3)">
+ <view class="image">
+ <image v-if="form.img3Full && form.img3Full !=''" :src=" form.img3Full" mode="widthFix"></image>
+ <image v-else src="/static/icon/ic_camera@2x.png" mode="widthFix"></image>
+ <text>鐐瑰嚮涓婁紶</text>
+ </view>
+ <view class="info">
+ <text>3.鍏跺畠璁よ瘉璧勬枡</text>
+ </view>
+ </view>
+ </view>
+ <view class="item-upload" v-if="flag==2">
+ <view class="item-upload-item1" @click="uploadImg(1)">
+ <view class="image">
+ <image v-if="form.img1Full && form.img1Full !=''" :src=" form.img1Full" mode="widthFix"></image>
+ <image v-else src="/static/icon/ic_camera@2x.png" mode="widthFix"></image>
+ <text>鐐瑰嚮涓婁紶</text>
+ </view>
+ <view class="info">
+ <text>1.钀ヤ笟鎵х収</text>
+ <text>*</text>
+ </view>
+ </view>
+ <view class="item-upload-item1" @click="uploadImg(2)">
+ <view class="image">
+ <image v-if="form.img2Full && form.img2Full !=''" :src=" form.img2Full" mode="widthFix"></image>
+ <image v-else src="/static/icon/ic_camera@2x.png" mode="widthFix"></image>
+ <text>鐐瑰嚮涓婁紶</text>
+ </view>
+ <view class="info">
+ <text>2.椋熷搧缁忚惀璁稿彲璇�</text>
+ <text>*</text>
+ </view>
+ </view>
+ <view class="item-upload-item1" @click="uploadImg(3)">
+ <view class="image">
+ <image v-if="form.img3Full && form.img3Full !=''" :src=" form.img3Full" mode="widthFix"></image>
+ <image v-else src="/static/icon/ic_camera@2x.png" mode="widthFix"></image>
+ <text>鐐瑰嚮涓婁紶</text>
+ </view>
+ <view class="info">
+ <text>3.浠庝笟浜哄憳鍋ュ悍璇�</text>
+ <text>*</text>
+ </view>
+ </view>
+ <view class="item-upload-item1" @click="uploadImg(4)">
+ <view class="image">
+ <image v-if="form.img4Full && form.img4Full !=''" :src=" form.img4Full" mode="widthFix"></image>
+ <image v-else src="/static/icon/ic_camera@2x.png" mode="widthFix"></image>
+ <text>鐐瑰嚮涓婁紶</text>
+ </view>
+ <view class="info">
+ <text>4.鍏跺畠璁よ瘉璧勬枡</text>
</view>
</view>
</view>
</view>
</view>
- <view class="box-head-botton">鎻愪氦璁よ瘉</view>
+ <view class="box-head-botton" @click="applySubmit">鎻愪氦璁よ瘉</view>
<view style="width: 100%; height: calc(30rpx + env(safe-area-inset-bottom));"></view>
</view>
</view>
</template>
<script>
+ import { mapState } from 'vuex'
export default {
+ computed: {
+ ...mapState( ['userInfo'])
+ },
data() {
return {
- bgImg: require('@/static/image/bg_renzheng_yonggong@2x.png')
+ bgImg: require('@/static/image/bg_renzheng_yonggong@2x.png'),
+ title: '鐢ㄦ埛璁よ瘉',
+ flag: null,
+ isCompany:false,
+ loading:false,
+ form: {
+ "companyName": "",
+ authType:0,
+ "img1": "",
+ "img2": "",
+ "img11": "",
+ "img21": "",
+ "img3": "",
+ "img4": "",
+ "img1Full": "",
+ "img2Full": "",
+ "img11Full": "",
+ "img21Full": "",
+ "img3Full": "",
+ "img4Full": "",
+ "location": "",
+ "lat": null,
+ "lgt": null,
+ "linkName": "",
+ "location": "",
+ "telephone": "",
+ "type": 1
+ }
};
+ },
+ onLoad(options) {
+ console.log(options)
+ var flag = options.flag
+ this.flag = flag
+ this.initFormData()
+ switch(flag){
+ case '1':
+ this.title = '璐ц繍璁よ瘉'
+ this.bgImg = require('@/static/image/bg_renzheng_huoyun@2x.png')
+ break;
+ case '2':
+ this.title = '渚涢璁よ瘉'
+ this.bgImg = require('@/static/image/bg_renzheng_gongcan@2x.png')
+ break;
+ default:
+ this.bgImg = require('@/static/image/bg_renzheng_yonggong@2x.png'),
+ this.title = '鐢ㄥ伐璁よ瘉'
+ break;
+ }
+ uni.setNavigationBarTitle({
+ title:this.title
+ })
+ },
+ methods:{
+ changeIsCompany(){
+ this.isCompany =!this.isCompany
+ this.form.authType = this.isCompany?1:0
+ },
+ inNullParam(param){
+ if(!param){
+ return true
+ }
+ if(param == ''){
+ return true
+ }
+ return false
+ },
+ applySubmit() {
+ if(this.loading){
+ return
+ }
+ console.log('琛ㄥ崟鍙傛暟锛�',this.form)
+ this.loading =true
+ if(this.inNullParam(this.form.linkName)
+ ||this.inNullParam(this.form.lat)
+ ||this.inNullParam(this.form.lgt)
+ ||this.inNullParam(this.form.location)
+ ||this.inNullParam(this.form.telephone)){
+ uni.showToast({title: '瀵逛笉璧凤紝璇锋寜瑕佹眰濉啓鐢宠淇℃伅1锛�',icon: "none",duration: 2000});
+ this.loading =false
+ return
+ }
+ if( this.form.authType == 0){
+ if(this.inNullParam(this.form.img11)||this.inNullParam(this.form.img21)){
+ uni.showToast({title: '瀵逛笉璧凤紝璇锋寜瑕佹眰濉啓鐢宠淇℃伅3锛�',icon: "none",duration: 2000});
+ this.loading =false
+ return
+ }
+ }else{
+ if(this.inNullParam(this.form.img1) || this.inNullParam(this.form.companyName)){
+ uni.showToast({title: '瀵逛笉璧凤紝璇锋寜瑕佹眰濉啓鐢宠淇℃伅4锛�',icon: "none",duration: 2000});
+ this.loading =false
+ return
+ }
+ }
+ if(this.form.type != 0 && this.form.authType == 1 && this.inNullParam(this.form.img2)){
+ uni.showToast({title: '瀵逛笉璧凤紝璇锋寜瑕佹眰濉啓鐢宠淇℃伅锛�',icon: "none",duration: 2000});
+ this.loading =false
+ return
+ }
+ if(this.form.type == 1 && this.form.authType == 1 && this.inNullParam(this.form.img2)){
+ uni.showToast({title: '瀵逛笉璧凤紝璇锋寜瑕佹眰濉啓鐢宠淇℃伅5锛�',icon: "none",duration: 2000});
+ this.loading =false
+ return
+ }
+
+ var that = this
+ var param =this.form;
+ if(this.form.authType == 0){
+ param.img1 = this.form.img11,
+ param.img2 = this.form.img21
+ }
+ console.log('鎻愪氦鍙傛暟锛�',param)
+ this.$u.api.applyForIdentity(param).then(res =>{
+ if(res.code ===200){
+ uni.showToast({
+ title: res.message||'鐢宠鎴愬姛 ',
+ icon: "none",
+ duration: 2000
+ });
+ uni.navigateBack({ delta: 1 });
+ }
+ }).finally(()=>{
+ that.loading =false
+ })
+ } ,
+ chooseMPLoaction(){
+ var that =this
+ uni.chooseLocation({
+ success:(res)=> {
+ console.log(res);
+ this.form.location=res.address
+ this.form.lat=res.latitude
+ this.form.lgt=res.longitude
+ },
+ fail:()=>{
+ // 濡傛灉鐢╱ni.chooseLocation娌℃湁鑾峰彇鍒板湴鐞嗕綅缃紝鍒欓渶瑕佽幏鍙栧綋鍓嶇殑鎺堟潈淇℃伅锛屽垽鏂槸鍚︽湁鍦扮悊鎺堟潈淇℃伅
+ uni.getSetting({
+ success: (res) => {
+ console.log(res);
+ var status = res.authSetting;
+ if(!status['scope.userLocation']){
+ // 濡傛灉鎺堟潈淇℃伅涓病鏈夊湴鐞嗕綅缃殑鎺堟潈锛屽垯闇�瑕佸脊绐楁彁绀虹敤鎴烽渶瑕佹巿鏉冨湴鐞嗕俊鎭�
+ uni.showModal({
+ title:"鏄惁鎺堟潈褰撳墠浣嶇疆",
+ content:"闇�瑕佽幏鍙栨偍鐨勫湴鐞嗕綅缃紝璇风‘璁ゆ巿鏉冿紝鍚﹀垯鍦板浘鍔熻兘灏嗘棤娉曚娇鐢�",
+ success:(tip)=>{
+ if(tip.confirm){
+ // 濡傛灉鐢ㄦ埛鍚屾剰鎺堟潈鍦扮悊淇℃伅锛屽垯鎵撳紑鎺堟潈璁剧疆椤甸潰锛屽垽鏂敤鎴风殑鎿嶄綔
+ uni.openSetting({
+ success:(data)=>{
+ // 濡傛灉鐢ㄦ埛鎺堟潈浜嗗湴鐞嗕俊鎭湪锛屽垯鎻愮ず鎺堟潈鎴愬姛
+ if(data.authSetting['scope.userLocation']===true){
+ uni.showToast({
+ title:"鎺堟潈鎴愬姛",
+ icon:"success",
+ duration:1000
+ })
+ // 鎺堟潈鎴愬姛鍚庯紝鐒跺悗鍐嶆chooseLocation鑾峰彇淇℃伅
+ uni.chooseLocation({
+ success: (res) => {
+ console.log("璇︾粏鍦板潃",res);
+ // this.getRegionFn(res);
+ }
+ })
+ }else{
+ uni.showToast({
+ title:"鎺堟潈澶辫触",
+ icon:"none",
+ duration:1000
+ })
+ }
+ }
+ })
+ }
+ }
+ })
+ }
+ },
+ fail: (res) => {
+ uni.showToast({
+ title:"璋冪敤鎺堟潈绐楀彛澶辫触",
+ icon:"none",
+ duration:1000
+ })
+ }
+ })
+ }
+ })
+ },
+ uploadImg(index){
+ var that =this
+ uni.chooseImage({
+ count: 1, // 榛樿9
+ sizeType: ['original', 'compressed'],
+ sourceType: ['album','camera'],//['album','camera'],
+ mediaType: ['image'],//['image', 'video'],
+ success: function (res1) {
+ const tempFiles = res1.tempFiles //鍖呭惈鍥剧墖澶у皬鐨勬暟缁�
+ if (tempFiles[0].size > 20*1024*1024) {
+ uni.showToast({
+ title: '涓婁紶鍥剧墖涓嶈兘澶т簬20M!',
+ duration: 2000,
+ icon: "none"
+ });
+ return
+ }
+
+ uni.uploadFile({
+ url: that.$baseUrl + 'web/public/upload',
+ filePath: res1.tempFilePaths[0],
+ name: 'file',
+ formData: {
+ 'folder': 'identity',
+ 'flag':index
+ },
+ success:(data)=>{
+ uni.showToast({
+ title: '涓婁紶鎴愬姛',
+ duration: 2000,
+ icon: "none"
+ });
+ const res = JSON.parse(data.data)
+
+ console.log(res)
+ if(res.data.flag == '11'){
+ that.form.img11=res.data.imgaddr
+ that.form.img11Full=res.data.url
+ }else if(res.data.flag == '21'){
+ that.form.img21=res.data.imgaddr
+ that.form.img21Full=res.data.url
+ console.log(21,that.form.img21Full)
+ }else if(res.data.flag == '1'){
+ that.form.img1=res.data.imgaddr
+ that.form.img1Full=res.data.url
+ }else if(res.data.flag == '2'){
+ that.form.img2=res.data.imgaddr
+ that.form.img2Full=res.data.url
+ }else if(res.data.flag == '3'){
+ that.form.img3=res.data.imgaddr
+ that.form.img3Full=res.data.url
+ }else if(res.data.flag == '4'){
+ that.form.img4=res.data.imgaddr
+ that.form.img4Full=res.data.url
+ }
+ },
+ fail:(e)=>{
+ uni.showToast({
+ title: '涓婁紶澶辫触',
+ duration: 2000,
+ icon: "none"
+ });
+ }
+ })
+ },
+ fail:function(err){
+ hideLoading()
+ reject("閫夋嫨鏂囦欢澶辫触",err)
+ }
+ })
+ },
+ initFormData(){
+ this.form = {
+ "companyName": "",
+ authType:0,
+ "img1": "",
+ "img2": "",
+ "img11": "",
+ "img21": "",
+ "img3": "",
+ "img4": "",
+ "img1Full": "",
+ "img2Full": "",
+ "img11Full": "",
+ "img21Full": "",
+ "img3Full": "",
+ "img4Full": "",
+ "location": "",
+ "lat": null,
+ "lgt": null,
+ "linkName": this.userInfo.name,
+ "location": "",
+ "telephone": this.userInfo.telephone,
+ "type": this.flag
+ }
+ }
}
}
</script>
@@ -223,18 +593,27 @@
flex-wrap: wrap;
.item-upload-item {
width: 300rpx;
+ border-radius: 10px;
height: 196rpx;
+ display: flex;
+ align-items: center;
+ justify-content: content;
+ overflow: hidden;
+ border:1px solid #c2c2c2;
image {
width: 100%;
height: 100%;
}
}
.item-upload-item1 {
- width: 300rpx;
+ width: 45%;
+ padding-bottom: 40px;
+ border-radius: 10px;
.image {
width: 100%;
height: 196rpx;
background: #F7F7F7;
+ border:1px solid #c2c2c2;
border-radius: 16rpx;
display: flex;
align-items: center;
--
Gitblit v1.9.3