申请关注 内容迭代

cyl/job_im
jscyl13849007907 3 weeks ago
parent 473389b519
commit fa42f78dbe

@ -21,52 +21,49 @@
<div style="margin: 24px auto 0;width: calc(100% - 20px);"> <div style="margin: 24px auto 0;width: calc(100% - 20px);">
<div style="color:#999;font-size: 12px;padding-left: 10px;margin-bottom: 4px;">申请人基本信息</div> <div style="color:#999;font-size: 12px;padding-left: 10px;margin-bottom: 4px;">申请人基本信息</div>
<div class="apply-item g_flex_row_between" style="height: 56px;background-color: #fff;border-radius: 8px;"> <div class="apply-item g_flex_row_between" style="height: 56px;background-color: #fff;border-radius: 8px;">
<div class="g_flex_none g_h_all g_flex_column_center" style="color:#000;font-size: 17px;padding-left: 10px;"> <div class="g_flex_row_between" style="border-bottom: 1px solid #eee;height: 100%;width: 100%;">
申请人 <div class="g_flex_none g_h_all g_flex_column_center" style="color:#333;font-size: 17px;padding-left: 5px;">
</div> 申请人
<!-- <div class="g_flex_1 g_h_all g_flex_column_center" style="margin-left: 12px;padding-right: 10px;position: relative;">
<div class="g_flex_row_end">
<div class="g_flex_column_center g_flex_1">
<div class="g_flex_row_end">
<img :src="newForm.wxavatar" alt="" style="width: 24px; height: 24px;border-radius: 50%;" />
</div>
</div>
<div class="g_flex_column_center g_flex_none" style="margin: 0 4px;">
<div style="color: #999;font-size: 17px;max-width: calc(100vw - 160px);" class="g_ell_1"
:style="{
'color':!newForm.wxname ? '#333' : '#666'
}"
>
{{ newForm.wxname || '点击获取微信昵称' }}
</div>
</div>
<div class="g_flex_column_center g_flex_none" v-if="!newForm.wxname">
<i class="iconfont icon-gengduo11 g_c_c"></i>
</div>
</div> </div>
<view v-if="!newForm.wxname" <div class="g_flex_1 g_h_all g_flex_column_center" style="margin-left: 12px;padding-right: 10px;">
@click="getUserProfile"
style="position: absolute;left: 0;top: 0;width: 100%;height: 100%;z-index: 10;"></view>
</div> -->
<div class="g_flex_1 g_h_all g_flex_column_center" style="margin-left: 12px;padding-right: 10px;">
<u-input :custom-style="{ fontSize: '17px' }" <u-input :custom-style="{ fontSize: '17px' }"
:clearable="false" :clearable="false"
:password-icon="false" :password-icon="false"
placeholder="申请人昵称" placeholder="申请人名字"
input-align="right" input-align="right"
class="g_text_r" class="g_text_r"
placeholder-style="color:#999;font-size:17px;" placeholder-style="color:#999;font-size:17px;"
v-model="newForm.wxname" v-model="newForm.wxname"
type="nickname"
v-if="info.recordStatus != 1" v-if="info.recordStatus != 1"
maxlength='30'
/> />
<div v-if="info.recordStatus == 1" style="color: #666;font-size: 17px;text-align: right;">{{ newForm.wxname }}</div> <div v-if="info.recordStatus == 1" style="color: #666;font-size: 17px;text-align: right;">{{ newForm.wxname }}</div>
</div> </div>
</div>
</div> </div>
</div> </div>
<div style="margin: 10px auto 0;width: calc(100% - 20px);"> <div style="margin: 10px auto 0;width: calc(100% - 20px);">
<div class="apply-item" style="height: 56px;background-color: #fff;border-radius: 8px 8px 0 0;padding: 0 5px;"> <div class="apply-item" style="height: 56px;background-color: #fff;border-radius: 8px 8px 0 0;padding: 0 5px;">
<div class="g_flex_row_between" style="border-bottom: 1px solid #eee;height: 100%;">
<div class="g_flex_none g_h_all g_flex_column_center" style="color:#333;font-size: 17px;padding-left: 5px;">
企业logo
</div>
<div class="g_flex_1 g_h_all g_flex_column_center" style="margin-left: 12px;padding-right: 10px;">
<div class="g_flex_row_end" style="width: 100%;" v-if="info.recordStatus != 1">
<button class="avatar-wrapper-btn g_flex_row_end" open-type="chooseAvatar" @chooseavatar="onChooseAvatar"
style="width:100%;height:28px;position: relative;"
>
<img :src="newForm.wxavatar" alt="" style="width: 28px; height: 28px; border-radius: 50%;position: absolute;right: 0;top:50%;transform: translateY(-50%)" />
</button>
</div>
<div class="g_flex_row_end" style="width: 100%;" v-if="info.recordStatus == 1">
<img :src="newForm.wxavatar" alt="" style="width: 28px; height: 28px; border-radius: 50%;" />
</div>
</div>
</div>
</div>
<div class="apply-item" style="height: 56px;background-color: #fff;padding: 0 5px;">
<div class="g_flex_row_between" style="border-bottom: 1px solid #eee;height: 100%;"> <div class="g_flex_row_between" style="border-bottom: 1px solid #eee;height: 100%;">
<div class="g_flex_none g_h_all g_flex_column_center" style="color:#333;font-size: 17px;padding-left: 5px;"> <div class="g_flex_none g_h_all g_flex_column_center" style="color:#333;font-size: 17px;padding-left: 5px;">
企业简称 企业简称
@ -115,7 +112,7 @@
class="g_flex_1 g_ml_10" class="g_flex_1 g_ml_10"
maxlength="30" maxlength="30"
type="textarea" type="textarea"
placeholder="申请备注…" placeholder="申请关注说明…"
placeholder-style="color:#999;font-size:16px;" placeholder-style="color:#999;font-size:16px;"
:clearable="false" :clearable="false"
:customStyle="{ fontSize: '16px' }" :customStyle="{ fontSize: '16px' }"
@ -142,7 +139,14 @@
hover-class="thover" hover-class="thover"
@click="handleSubmit" @click="handleSubmit"
> >
{{ info.recordStatus == 1 ? "已提交" : info.recordStatus == 2 ? "已关注" : "申请关注" }} <div class="g_flex_row_center">
<view class="g_flex_column_center g_mr_4" v-if="btnloading">
<u-loading mode="flower"></u-loading>
</view>
<div class="">
{{ info.recordStatus == 1 ? "已提交" : info.recordStatus == 2 ? "已关注" : "申请关注" }}
</div>
</div>
</view> </view>
</view> </view>
</view> </view>
@ -159,6 +163,7 @@ export default {
}, },
data() { data() {
return { return {
btnloading:false,
newForm:{ newForm:{
wxname:'', wxname:'',
wxavatar:'https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/pugongying/default.svg', wxavatar:'https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/pugongying/default.svg',
@ -187,6 +192,7 @@ export default {
btnSpeed: -1, // -1 0 1 2 btnSpeed: -1, // -1 0 1 2
foa:2, foa:2,
chooseAvatarLoading: false,
}; };
}, },
onLoad(options) { onLoad(options) {
@ -214,7 +220,7 @@ export default {
wxavatar:_datas.avatar || 'https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/pugongying/default.svg', wxavatar:_datas.avatar || 'https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/pugongying/default.svg',
companyName: _datas.applyFullName, companyName: _datas.applyFullName,
phone: _datas.tel, phone: _datas.tel,
remark:_datas.remark || '无备注', remark:_datas.remark || '无申请说明',
}; };
that.info.logo = _datas.logo; that.info.logo = _datas.logo;
that.info.recordStatus = 1; that.info.recordStatus = 1;
@ -238,37 +244,15 @@ export default {
} }
}, },
methods: { methods: {
// 使getUserProfile API onChooseAvatar(e) {
getUserProfile() { console.log("onChooseAvatar", e);
let that = this; if (this.chooseAvatarLoading) return;
// this.chooseAvatarLoading = true;
if (that.newForm.wxname && that.newForm.wxname !== '微信昵称') { this.newForm.wxavatar = e.detail.avatarUrl;
return; //
} setTimeout(() => {
this.chooseAvatarLoading = false;
uni.getUserProfile({ }, 1000);
desc: '用于完善用户资料', //
success: (res) => {
console.log("获取用户信息成功:", res);
if (res.userInfo) {
that.newForm.wxname = res.userInfo.nickName;
that.newForm.wxavatar = res.userInfo.avatarUrl || 'https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/pugongying/default.svg';
uni.showToast({
title: '获取成功',
icon: 'success'
});
}
},
fail: (err) => {
console.log("获取用户信息失败:", err);
uni.showModal({
title: '提示',
content: '您取消了授权,将无法获取微信昵称信息',
showCancel: false,
confirmText: '知道了'
});
}
});
}, },
init() { init() {
let that = this; let that = this;
@ -314,7 +298,14 @@ export default {
if(!that.newForm.wxname){ if(!that.newForm.wxname){
uni.showToast({ uni.showToast({
title: '请输入申请人昵称', title: '请授权微信名字',
icon: 'none'
});
return false;
}
if(!that.newForm.wxavatar || that.newForm.wxavatar == 'https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/pugongying/default.svg'){
uni.showToast({
title: '请上传企业logo',
icon: 'none' icon: 'none'
}); });
return false; return false;
@ -326,9 +317,9 @@ export default {
}); });
return false; return false;
} }
if(!that.newForm.phone){ if(!/^1[3-9]\d{9}$/.test(that.newForm.phone)){
uni.showToast({ uni.showToast({
title: '请输入联系电话', title: '请输入正确的手机号',
icon: 'none' icon: 'none'
}); });
return false; return false;
@ -350,22 +341,25 @@ export default {
uni.showLoading({ uni.showLoading({
title: "正在发送", title: "正在发送",
}); });
that.btnloading = true;
setTimeout(() => { setTimeout(() => {
uni.hideLoading(); uni.hideLoading();
that.G.Get( // that.G.Get(
that.api.bind_subscribeSubmit + "/" + that.info.agencyId, // that.api.bind_subscribeSubmit + "/" + that.info.agencyId,
params, // params,
(res) => { // (res) => {
// //
that.btnSpeed = 2; that.btnSpeed = 2;
uni.showToast({ uni.showToast({
title: "提交成功", title: "提交成功",
}); });
setTimeout(() => { setTimeout(() => {
that.newForm.remark = '无申请说明'
that.info.recordStatus = 1; that.info.recordStatus = 1;
that.btnloading = false;
}, 1500); }, 1500);
} // }
); // );
}, 500); }, 500);
}, },
goPage($path) { goPage($path) {
@ -378,6 +372,20 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.avatar-wrapper-btn {
background: transparent;
border: none;
padding: 0;
margin: 0;
line-height: 1;
min-height: auto;
display: flex;
align-items: center;
justify-content: center;
}
.avatar-wrapper-btn::after {
border: none;
}
.custom-button { .custom-button {
width: 184px; width: 184px;
height: 40px; height: 40px;

@ -20,9 +20,9 @@
</div> </div>
<div <div
style="background-color: #fff;border-radius: 8px;width: calc(100% - 20px);margin: 10px auto 0;padding: 14px 10px;color: #666;font-size: 16px;min-height: 88px;position: relative;"> style="background-color: #fff;border-radius: 8px;width: calc(100% - 20px);margin: 10px auto 0;padding: 14px 10px;color: #666;font-size: 16px;min-height: 88px;position: relative;">
{{ info.remark.trim() || '无备注' }} {{ info.remark.trim() || '无申请说明' }}
<div style="position: absolute;right: 16px;bottom: 16px;color: #333;font-size: 12px;"> <div style="position: absolute;right: 16px;bottom: 16px;color: #333;font-size: 12px;">
{{ info.remark.trim() ? (info.remark.length) : 3 }}/ 30 {{ info.remark.trim() ? (info.remark.length) : 5 }}/ 30
</div> </div>
</div> </div>
<view class="g_mt_10 g_bg_f g_p_16 g_ml_10 g_mr_10 g_radius_8 g_flex_row_start" v-if="type == 2 && title != '三天前'"> <view class="g_mt_10 g_bg_f g_p_16 g_ml_10 g_mr_10 g_radius_8 g_flex_row_start" v-if="type == 2 && title != '三天前'">

@ -20,9 +20,9 @@
</div> </div>
<div <div
style="background-color: #fff;border-radius: 8px;width: calc(100% - 20px);margin: 10px auto 0;padding: 14px 10px;color: #666;font-size: 16px;min-height: 88px;position: relative;"> style="background-color: #fff;border-radius: 8px;width: calc(100% - 20px);margin: 10px auto 0;padding: 14px 10px;color: #666;font-size: 16px;min-height: 88px;position: relative;">
{{ info.remark.trim() || '无备注' }} {{ info.remark.trim() || '无申请说明' }}
<div style="position: absolute;right: 16px;bottom: 16px;color: #333;font-size: 12px;"> <div style="position: absolute;right: 16px;bottom: 16px;color: #333;font-size: 12px;">
{{ info.remark.trim() ? (info.remark.length) : 3 }}/ 30 {{ info.remark.trim() ? (info.remark.length) : 5 }}/ 30
</div> </div>
</div> </div>
<view class="g_mt_10 g_bg_f g_p_16 g_ml_10 g_mr_10 g_radius_8 g_flex_row_start" > <view class="g_mt_10 g_bg_f g_p_16 g_ml_10 g_mr_10 g_radius_8 g_flex_row_start" >

Loading…
Cancel
Save