企业简称
@@ -115,7 +112,7 @@
class="g_flex_1 g_ml_10"
maxlength="30"
type="textarea"
- placeholder="申请备注…"
+ placeholder="申请关注说明…"
placeholder-style="color:#999;font-size:16px;"
:clearable="false"
:customStyle="{ fontSize: '16px' }"
@@ -141,8 +138,15 @@
:style="info.recordStatus == 1 || info.recordStatus == 2 ? 'pointer-events: none;background-color: #999;' : ''"
hover-class="thover"
@click="handleSubmit"
- >
- {{ info.recordStatus == 1 ? "已提交" : info.recordStatus == 2 ? "已关注" : "申请关注" }}
+ >
+
+
+
+
+
+ {{ info.recordStatus == 1 ? "已提交" : info.recordStatus == 2 ? "已关注" : "申请关注" }}
+
+
@@ -159,6 +163,7 @@ export default {
},
data() {
return {
+ btnloading:false,
newForm:{
wxname:'',
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请求后
foa:2,
+ chooseAvatarLoading: false,
};
},
onLoad(options) {
@@ -214,7 +220,7 @@ export default {
wxavatar:_datas.avatar || 'https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/pugongying/default.svg',
companyName: _datas.applyFullName,
phone: _datas.tel,
- remark:_datas.remark || '无备注',
+ remark:_datas.remark || '无申请说明',
};
that.info.logo = _datas.logo;
that.info.recordStatus = 1;
@@ -238,37 +244,15 @@ export default {
}
},
methods: {
- // 使用新的getUserProfile API获取用户信息
- getUserProfile() {
- let that = this;
- // 检查是否已经授权过
- if (that.newForm.wxname && that.newForm.wxname !== '微信昵称') {
- return;
- }
-
- uni.getUserProfile({
- 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: '知道了'
- });
- }
- });
+ onChooseAvatar(e) {
+ console.log("onChooseAvatar", e);
+ if (this.chooseAvatarLoading) return;
+ this.chooseAvatarLoading = true;
+ this.newForm.wxavatar = e.detail.avatarUrl;
+ // 重置状态,防止快速重复点击导致的冲突
+ setTimeout(() => {
+ this.chooseAvatarLoading = false;
+ }, 1000);
},
init() {
let that = this;
@@ -314,7 +298,14 @@ export default {
if(!that.newForm.wxname){
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'
});
return false;
@@ -326,9 +317,9 @@ export default {
});
return false;
}
- if(!that.newForm.phone){
+ if(!/^1[3-9]\d{9}$/.test(that.newForm.phone)){
uni.showToast({
- title: '请输入联系电话',
+ title: '请输入正确的手机号',
icon: 'none'
});
return false;
@@ -350,22 +341,25 @@ export default {
uni.showLoading({
title: "正在发送",
});
+ that.btnloading = true;
setTimeout(() => {
uni.hideLoading();
- that.G.Get(
- that.api.bind_subscribeSubmit + "/" + that.info.agencyId,
- params,
- (res) => {
+ // that.G.Get(
+ // that.api.bind_subscribeSubmit + "/" + that.info.agencyId,
+ // params,
+ // (res) => {
// 请求后
that.btnSpeed = 2;
uni.showToast({
title: "提交成功",
});
setTimeout(() => {
+ that.newForm.remark = '无申请说明'
that.info.recordStatus = 1;
+ that.btnloading = false;
}, 1500);
- }
- );
+ // }
+ // );
}, 500);
},
goPage($path) {
@@ -378,6 +372,20 @@ export default {