cyl/master-0804
wangxia 8 months ago
parent 9bfd968beb
commit 217e411697

@ -17,7 +17,7 @@
<g-button btnText="去登录" size="small" class="g_mt_32" @clickBtn="goLogin" />
</view>
</view>
<scroll-view v-if="speed > 0" :style="{ height: `calc(100vh - ${navInfo.statusBarHeight + 62}px)` }" :scroll-y="true" @scrolltolower="reachBottom" :lower-threshold="100">
<scroll-view v-if="speed > 0" :style="{ height: `calc(100vh - ${navInfo.statusBarHeight + 52}px)` }" :scroll-y="true" @scrolltolower="reachBottom" :lower-threshold="100">
<view class="" style="min-height: calc(100% - 90px)">
<view class="item g_pt_18 g_pl_10 g_pr_10 g_bg_f" hover-class="g_bg_f_5" v-for="(item, index) in query.list" :key="index" @click="goDetail(item, index)">
<view class="g_border_e_b g_flex_row_start g_pb_18">

@ -66,20 +66,20 @@
class="form-code"
v-if="item.tip && item.tip.indexOf('slot') > -1"
>
<!-- 验证码 -->
<!-- 验证码() -->
<div class="g_flex_column_center" v-if="item.tip == 'slot-code'">
<div class="g_flex_row_end">
<div class="g_flex_1 g_mr_16">
<u-input maxlength="4" type="number" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :clearable="false" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r" placeholder-style="color:#999;font-size:16px;" v-model="item.code" @input="(e) => handleCode(e, item, index)" />
<u-input maxlength="4" type="number" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :clearable="false" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r" placeholder-style="color:#999;font-size:16px;" v-model="item.value" @input="(e) => handleCode(e, item, index)" />
</div>
<div class="btn-text g_flex_c g_flex_none" @click="handleSendMsg">
<button class="btn-con g_fs_14 g_c_9 g_flex_row_center" style="width: 100px;">{{ msgCode.btnText }}</button>
<div class="btn-text g_flex_c g_flex_none" @click="handleSendMsg(item.tel, item.verifyTel)">
<button class="btn-con g_fs_14 g_c_9 g_flex_row_center" style="width: 100px">{{ msgCode.btnText }}</button>
</div>
</div>
</div>
<!-- 新密码 -->
<div class="form-new-pwd g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-new-pwd'">
<u-input type="password" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :clearable="false" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @input="(e) => handleNewPwd(e, item, index)" />
<u-input type="password" :custom-style="{ fontSize: item.fontSize || ' 16px' }" :clearable="false" :password-icon="false" :placeholder="item.placeholder" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999;font-size:16px;line-height:1" v-model="item.value" @input="(e) => handleNewPwd(e, item, index)" />
</div>
<!-- 确认密码 -->
<div class="form-new-conpwd g_flex_rowRight_columnCenter g_w_all" v-if="item.tip == 'slot-confirm-pwd'">
@ -427,15 +427,28 @@ export default {
},
//
handleSendMsg() {
handleSendMsg(tel, verifyTel) {
let that = this;
if (this.msgCode.countdown > 0) {
if (this.msgCode.countdown > 0 || !that.G.setReg(tel, "tel")) {
if (!that.G.setReg(tel, "tel")) {
uni.showToast({
icon: "none",
title: "请输入正确的手机号",
});
}
return;
}
if (verifyTel && verifyTel != tel) {
uni.showToast({
icon: "none",
title: "请输入对应的手机号",
});
return;
}
that.G.Get(
that.api.login_sendMsg,
{
tel: uni.getStorageSync("apply-tel"),
tel: tel,
},
(res) => {
that.msgCode.countdown = 60;
@ -728,8 +741,8 @@ export default {
.btn-text {
background-color: #ededed;
text-align: center;
border-radius: 126px;
text-align: center;
border-radius: 126px;
.btn-con {
// border-left: 1rpx solid #eee;
// padding: 0 0 0 16px;

@ -334,7 +334,7 @@
{
"path": "user",
"style": {
"navigationBarTitleText": "详情", //
"navigationBarTitleText": "绑定", //
"backgroundColor": "#ededed",
"backgroundColorBottom": "#ededed"
}

@ -12,7 +12,7 @@
<view class="g_h_all">
<!-- #ifdef APP-PLUS || H5 || MP-KUAISHOU || MP-WEIXIN -->
<view class="" style="height: calc(58px + 50px)"></view>
<view class="" style="height: calc(58px + 40px)"></view>
<!-- #endif -->
<view class="">
<view class="m-box-fixed" :style="{ top: 0 }" v-if="isLogin">
@ -25,7 +25,7 @@
</view>
</view>
</view>
<view class="g_h_10 g_bg_f_5"></view>
<!-- <view class="g_h_10 g_bg_f_5"></view> -->
</view>
<view style="width: 100vw" class="g_border_e_b" v-if="isLogin">
<u-tabs :list="menuList" item-width="126" v-model="menuActive" active-color="#00b666" bar-width="60" bar-height="6" font-size="32" @change="handleUpdateMenu" :gutter="22" duration="0.1" itemWidth="auto" height="84"></u-tabs>

@ -0,0 +1,649 @@
<template>
<div class="p-root-detail-user g_w_all g_bg_f_5 g_kuaishou">
<div class="g_h_10"></div>
<!-- 基本信息 -->
<div class="" style="position: relative">
<div class="" style="position: relative; z-index: 1">
<g-panel-card-info
:info="{
avatar: info.logo,
title: info.fullName || info.agencyName,
num: info.supplierAccount == 1 ? (info.agencyDesp ? info.agencyDesp : '该发单号还未填写简介') : info.tel ? info.tel : '-',
isHaveOrder: info.supplierAccount == 1 ? true : false,
}"
:radius="8"
:isShowMore="isShowMore == 'true' ? 1 : 0"
@clickCard="goMore"
/>
</div>
<div v-if="info.supplierAccount == 1" style="position: absolute; left: 50%; transform: translateX(-50%); bottom: -40px; width: calc(100% - 20px); margin: 0 auto; height: 48px">
<div class="g_radius_8" style="background-color: #e5e5e5; height: 100%">
<div class="g_h_16"></div>
<div class="g_flex_row_center">
<div v-for="(item, index) in numSlot" :key="index" class="g_flex_row_center g_w_three g_position_rela">
<div class="g_flex_row_center">
<div class="g_fs_14 g_c_6 g_flex_column_end">{{ item.name }}</div>
<div class="g_fs_16 g_c_3 g_fw_600 g_ml_4">{{ item.num }}</div>
</div>
<div class="bor" v-if="index < 2" style="position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 1rpx; height: 8px; background-color: #333"></div>
</div>
</div>
</div>
</div>
</div>
<div v-if="info.supplierAccount == 1">
<div class="g_h_40" v-if="info.supplierAccount == 1"></div>
<div v-if="!isSelf">
<div class="g_flex_row_center" v-if="info.recordStatus == 1">
<!-- 已关注 -->
<div style="width: 520rpx; height: 80rpx" class="g_bg_c g_c_f g_radius_22 g_fs_18 g_fw_600 g_mt_6 g_flex_c" hover-class="thover" @click="handleCancel"></div>
</div>
<div class="g_flex_row_center" v-if="info.recordStatus == 2">
<!-- 互相关注 -->
<div style="width: 520rpx; height: 80rpx" class="g_bg_c g_c_f g_radius_22 g_fs_18 g_fw_600 g_mt_6 g_flex_c" @click="handleCancel"></div>
</div>
<div class="g_flex_row_center" v-if="(info.recordStatus == 4 || info.recordStatus == 3) && !isSelf">
<!-- 判断是否已关注 -->
<div style="width: 520rpx; height: 80rpx" class="g_bg_main g_c_f g_radius_22 g_fs_18 g_fw_600 g_mt_6 g_flex_c" hover-class="thover" @click="handleSubmit"></div>
</div>
<div class="g_flex_row_center" v-if="info.recordStatus == 5">
<!-- 提交申请等待中 -->
<div style="width: 520rpx; height: 80rpx; background-color: #ccc" class="g_c_f g_radius_22 g_fs_18 g_fw_600 g_mt_6 g_flex_c">等待通过</div>
</div>
<div class="g_flex_row_center" v-if="info.recordStatus == 6 && !isSelf">
<!-- 已过期 -->
<div style="width: 520rpx; height: 80rpx" class="g_bg_main g_c_f g_radius_22 g_fs_18 g_fw_600 g_mt_6 g_flex_c" hover-class="thover" @click="handleSubmit"></div>
</div>
<div class="g_flex_row_center" v-if="info.recordStatus == 7">
<!-- 邀请关注的申请关注 -->
<div style="width: 520rpx; height: 80rpx" class="g_bg_main g_c_f g_radius_22 g_fs_18 g_fw_600 g_mt_6 g_flex_c" hover-class="thover" @click="inviteSubmit"></div>
</div>
</div>
<div class="g_h_16"></div>
<div v-if="jobDetailShow || jobDetailShow == 'true'">
<!-- 正常职位 -->
<div class="m-detail" v-if="(info.recordStatus == 1 || info.recordStatus == 2) && info.himSeeBtn == 1">
<div class="g_ml_10 g_mr_10 g_pb_10 g_pt_10">
<u-search v-model="keyword" class="g_flex_1" placeholder="搜索职位名称" bg-color="#fff" :show-action="false" placeholder-class="g_c_c" :input-style="{ fontSize: '16px' }" height="80" search-icon-color="#999999" :maxlength="20" @input="checkLength" @clear="getList('init')" @search="getList('init')"></u-search>
</div>
<g-list-job @uploadList="getList" :recordStatus="info.recordStatus" :showShare="false" :list="query.list" :loading="loading" :speed="speed" :query="query" @clickTop="goDetailJob" @clickBottom="goDetailUser" emptyText="暂无职位" emptySubText=" " />
</div>
<!-- 未关注 -->
<div class="m-detail" v-if="(info.recordStatus == 4 || info.recordStatus == 3 || info.recordStatus == 5 || info.recordStatus == 6 || info.recordStatus == 7) && info.himSeeBtn == 1">
<g-list-job @uploadList="getList" from="user" :isSelf="isSelf" :recordStatus="info.recordStatus" :showShare="false" :list="query.list" :loading="loading" :speed="speed" :query="query" @clickTop="goDetailJob" @clickBottom="goDetailUser" :emptyText="isSelf ? speed + '个职位' : '未关注用户仅展示预览职位'" emptySubText=" " />
</div>
<div v-if="info.himSeeBtn == 0" style="padding-top: 260rpx">
<g-empty text="您关注的发单号暂未发布职位" />
</div>
</div>
</div>
<div v-if="info.supplierAccount == 0" style="width: calc(100% - 20px); margin: 0 auto">
<div class="g_bg_f g_pl_16 g_pr_16 g_radius_8">
<div class="g_flex_row_between g_h_56">
<div class="g_flex_column_center g_fs_16 g_c_3">不让他看我的职位</div>
<div class="g_flex_column_center">
<u-switch v-model="mLook" activeColor="#00B666" @change="handleSee"></u-switch>
</div>
</div>
</div>
<div class="g_w_260 g_h_42 g_radius_25 g_bg_f g_fs_18 g_flex_c g_mt_90" style="color: #fa5151; margin: 90px auto 0" hover-class="thover" @click="goReturn"></div>
</div>
</div>
</template>
<script>
export default {
onReady() {
this.G.setNavStyle();
},
// onShareAppMessage(){
// return this.G.shareFun();
// },
data() {
return {
numSlot: [],
isLogin: null,
pageSpeed: 0,
isShowMore: true,
isShowJob: true,
agencyId: 0,
loading: true,
keyword: "", //
speed: -1,
query: {
page: 1,
size: 50,
list: [],
isFinish: -1,
},
info: {
avatar: "",
agencyName: "",
jobUpdateNum: 0,
},
uid: 0,
type: 0,
bindid: 0,
dataArray: [
{
name: "职位",
num: 120,
},
{
name: "关注",
num: 108,
},
{
name: "粉丝",
num: 250,
},
],
mLook: false,
from: "",
jobDetailShow: true,
loginInfo: {},
isSelf: false, //
scene: "",
};
},
onLoad(options) {
console.log("用户详情页:", options, " version:", 1);
this.loginId = uni.getStorageSync("apply-agencyId");
if (this.loginId == options.id && options.id) {
this.isSelf = true;
}
this.scene = options.scene;
if (this.scene) {
let _str = decodeURIComponent(this.scene);
this.uid = _str.split("=")[1];
} else {
this.uid = options.id;
}
this.type = options.type ? options.type : "";
this.isShowMore = options.isShowMore;
this.isShowJob = options.isShowJob;
this.jobDetailShow = options.jobDetailShow || true;
this.from = options.shareForm;
if (options.bindid) {
this.bindid = options.bindid;
}
this.getDetail();
},
onShow() {
let that = this;
that.isLogin = ""; // uni.getStorageSync("apply-token");
this.loginInfo = uni.getStorageSync("apply-userinfo");
// if (!that.isLogin) {
// that.loading = false;
// that.speed = 0;
// } else {
// }
},
onReachBottom() {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
if (that.query.isFinish == -1 || that.query.isFinish == that.query.size) {
that.query.page++;
that.getList("concat");
}
}
},
methods: {
getDetail() {
let that = this;
// this.G.isLogin();
// if (this.G.isLogin()) {
that.pageSpeed = 0;
that.G.Get(
that.api.bind_enterpriseDetail + "/" + that.uid,
{
agencyId: that.uid,
type: that.type,
},
(res) => {
console.log("获取详情:", res, " -- ", that.uid);
that.pageSpeed = 1;
that.info = res;
if (!that.uid) {
if (that.loginInfo.agencyId == that.info.agencyId) {
that.isSelf = true;
}
}
if (that.info.supplierAccount == 0) {
that.isShowMore = false;
}
that.agencyId = res.agencyId;
that.mLook = that.info.himSee == 1 ? false : true;
that.numSlot = [
{
name: "职位数",
num: that.info.himSee == 0 ? 0 : that.info.jobNum,
},
{
name: "今日更新",
num: that.info.jobUpdateNum,
},
{
name: "粉丝数",
num: that.info.downNum,
},
];
that.getList();
}
);
// }
},
goDetailUser() {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
if (this.info.recordStatus == 1 || this.info.recordStatus == 2) {
let params = {
id: that.info.agencyId,
type: that.type,
bindid: that.info.id,
isShowMore: true,
isShowJob: true,
};
uni.navigateTo({
url: "/root/detail/user?" + that.G.objToStr(params),
});
} else {
if (that.isSelf) {
} else {
uni.showToast({
title: "关注发单号后才可查看详情",
icon: "none",
});
}
}
}
},
getDefault($type) {
let that = this;
console.log('$type',$type);
this.G.isLogin();
if (this.G.isLogin()) {
that.G.Post(
that.api.job_list,
{
pageNum: that.query.page,
pageSize: that.query.size,
agencyId: that.agencyId,
keys: that.keyword,
},
(res) => {
console.log("resresresresresres", res);
if (res.recordCount == 0) {
that.loading = false;
} else {
that.loading = true;
}
that.speed = res.recordCount;
that.query.isFinish = res.recordList.length;
res.recordList = that.G.toGetAddressv3(res.recordList);
res.recordList = that.G.toGetAge(res.recordList);
res.recordList = that.G.yijobCopy(res.recordList);
if ($type == "init") {
that.query.list = [];
that.query.list =
res.recordList.length > 0
? res.recordList.map((item, index) => {
return {
...item,
title: item.jobName,
address: item.district + item.age,
price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : that.G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay),
fuWuFei: that.G.setReturnFee(item.returnFee, item.returnFeeType),
cus_price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValueHtml(item.salaryClassify, item.salaryClassifyValue) : "月薪",
gender: that.G.getGenderByMinAge(item),
logo: item.agencyLogo,
time: that.G.setDeadLine(item.updateTime, "jiaofu"),
leafCateId: item.id,
// serverPrice: that.G.setReturnFee(item.returnFee, item.returnFeeType),
serverPrice: that.G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType),
recruitmentSwitch: item.recruitment == 1 ? true : false,
recruitmentImage: item.recruitment,
isToday: item.today == 0 ? false : true,
active: 0,
};
})
: [];
} else {
that.query.list = that.query.list.concat(
res.recordList.length > 0
? res.recordList.map((item, index) => {
return {
...item,
title: item.jobName,
address: item.district + item.age,
price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : that.G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay),
fuWuFei: that.G.setReturnFee(item.returnFee, item.returnFeeType),
gender: that.G.getGenderByMinAge(item),
logo: item.agencyLogo,
time: that.G.setDeadLine(item.updateTime, "jiaofu"),
leafCateId: item.id,
// serverPrice: that.G.setReturnFee(item.returnFee, item.returnFeeType),
serverPrice: that.G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType),
recruitmentSwitch: item.recruitment == 1 ? true : false,
recruitmentImage: item.recruitment,
isToday: item.today == 0 ? false : true,
active: 0,
};
})
: []
);
}
console.log("query.list", that.query.list);
}
);
}
},
getHot($type) {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
that.G.Post(
that.api.job_hotList + "/" + that.agencyId,
{
pageNum: that.query.page,
pageSize: that.query.size,
agencyId: that.agencyId,
keys: "",
},
(res) => {
console.log("推荐列表:", res);
if (res.length == 0) {
that.loading = false;
} else {
that.loading = true;
}
that.speed = res.length;
that.query.isFinish = res.length;
res = that.G.toGetAddressv3(res);
res = that.G.toGetAge(res);
res = that.G.yijobCopy(res);
if ($type == "init") {
that.query.list = [];
that.query.list =
res.length > 0
? res.map((item, index) => {
return {
...item,
title: item.jobName,
address: item.district + item.age,
price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : that.G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay),
fuWuFei: that.G.setReturnFee(item.returnFee, item.returnFeeType),
gender: that.G.getGenderByMinAge(item),
logo: item.agencyLogo,
time: that.G.setDeadLine(item.updateTime, "jiaofu"),
leafCateId: item.id,
// serverPrice: that.G.setReturnFee(item.returnFee, item.returnFeeType),
serverPrice: that.G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType),
agencyId: item.agencyId,
recruitmentSwitch: item.recruitment == 1 ? true : false,
recruitmentImage: item.recruitment,
teamType: item.teamType,
creatorName: item.creatorName,
isToday: item.isToday,
active: 0,
};
})
: [];
} else {
that.query.list = that.query.list.concat(
res.length > 0
? res.map((item, index) => {
return {
...item,
title: item.jobName,
address: item.district + item.age,
price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : that.G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay),
fuWuFei: that.G.setReturnFee(item.returnFee, item.returnFeeType),
gender: that.G.getGenderByMinAge(item),
logo: item.agencyLogo,
time: that.G.setDeadLine(item.updateTime, "jiaofu"),
leafCateId: item.id,
// serverPrice: that.G.setReturnFee(item.returnFee, item.returnFeeType),
serverPrice: that.G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType),
recruitmentSwitch: item.recruitment == 1 ? true : false,
recruitmentImage: item.recruitment,
active: 0,
};
})
: []
);
}
}
);
}
},
checkLength(e) {
if (e.length == 0) {
this.keyword = "";
this.getList();
}
},
getList($type = "init") {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
if (this.info.recordStatus == 1 || this.info.recordStatus == 2) {
that.getDefault($type);
} else {
that.getHot($type);
}
} else {
that.getHot($type);
}
},
goMore() {
let that = this,
str = "";
this.G.isLogin();
if (this.G.isLogin()) {
if (that.info.supplierAccount == 1) {
if (that.isShowMore == "true") {
if (that.info.recordStatus == 2) {
str = 3;
} else {
str = that.info.up;
}
console.log("that.type", that.type);
uni.navigateTo({
url: "/root/bind/more?delta=2&id=" + that.agencyId + "&himSee=" + that.info.himSee + "&lookHim=" + that.info.lookHim + "&type=" + str + "&from=" + that.type + "&lid=" + that.info.lookHimOperateId + "&hid=" + that.info.himSeeOperateId,
});
}
}
}
},
goDetailJob($item) {
let that = this;
console.log("that.isSelf1", that.isSelf);
this.G.isLogin();
console.log("that.isSelf2", that.isSelf);
if (this.G.isLogin()) {
if (that.isSelf) {
uni.navigateTo({
url: "/root/detail/job?id=" + $item.leafCateId,
});
} else if (this.info.recordStatus == 1 || this.info.recordStatus == 2) {
uni.navigateTo({
url: "/root/detail/job?id=" + $item.leafCateId,
});
} else {
uni.showToast({
title: "关注发单号后才可查看详情",
icon: "none",
});
}
}
},
inviteSubmit() {
let that = this;
console.log("info", that.info);
// return;
uni.showModal({
title: "关注发单号",
content: "关注发单号后,您可以查看该账号职位的更新,确定要关注吗?",
confirmColor: "#576B95",
success(modalRes) {
if (modalRes.confirm) {
that.G.Post(
that.api.user_updateInviteId,
{
agencyIds: that.info.agencyId,
},
(res) => {
uni.showToast({
title: "关注成功",
});
setTimeout(() => {
that.getDetail();
}, 800);
}
);
} else if (modalRes.cancel) {
console.log("用户点击取消");
}
},
fail() {},
});
},
handleSubmit() {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
//
let _code = 1; //
if (this.from == "friend") {
_code = 2; //
} else {
if (this.scene) {
_code = 3; //
} else {
_code = 1; //
}
}
uni.showModal({
title: "关注发单号",
content: "关注发单号后,您可以查看该账号职位的更新,确定要关注吗?",
confirmColor: "#576B95",
success(modalRes) {
if (modalRes.confirm) {
that.G.Get(
that.api.bind_subscribeSubmit + "/" + that.info.agencyId,
{
agencyId: that.agencyId,
source: _code,
remark: "",
},
(res) => {
uni.showToast({
title: "提交成功",
});
setTimeout(() => {
that.getDetail();
}, 800);
}
);
} else if (modalRes.cancel) {
console.log("用户点击取消");
}
},
fail() {},
});
}
},
handleSee(e) {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
that.G.Get(
that.api.bind_isSee + "/" + that.info.himSeeOperateId,
{
id: that.info.himSeeOperateId,
himSee: e ? 0 : 1,
},
() => {
uni.showToast({
icon: "success",
title: "更新成功",
});
}
);
}
},
goReturn() {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
that.G.handleConfirm({
content: "确认删除粉丝吗?",
success: (res) => {
if (res.confirm) {
that.G.Get(
that.api.bind_delApply + "/" + that.agencyId,
{
agencyId: that.agencyId,
},
() => {
uni.showToast({
icon: "success",
title: "删除粉丝成功",
});
setTimeout(() => {
uni.navigateBack();
}, 1500);
}
);
}
},
});
}
},
handleCancel() {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
that.G.handleConfirm({
content: "是否取消关注该发单号?",
success: (res) => {
if (res.confirm) {
that.G.Get(
that.api.bind_cancelApply + "/" + that.agencyId,
{
agencyId: that.agencyId,
},
() => {
uni.showToast({
icon: "success",
title: "取消关注成功",
});
setTimeout(() => {
that.getDetail();
that.getList();
}, 1500);
}
);
}
},
});
}
},
},
};
</script>
<style lang="scss">
.p-root-detail-user {
min-height: 100%;
}
</style>

@ -1,649 +1,172 @@
<template>
<div class="p-root-detail-user g_w_all g_bg_f_5 g_kuaishou">
<div class="g_h_10"></div>
<!-- 基本信息 -->
<div class="" style="position: relative">
<div class="" style="position: relative; z-index: 1">
<g-panel-card-info
:info="{
avatar: info.logo,
title: info.fullName || info.agencyName,
num: info.supplierAccount == 1 ? (info.agencyDesp ? info.agencyDesp : '该发单号还未填写简介') : info.tel ? info.tel : '-',
isHaveOrder: info.supplierAccount == 1 ? true : false,
}"
:radius="8"
:isShowMore="isShowMore == 'true' ? 1 : 0"
@clickCard="goMore"
/>
</div>
<div v-if="info.supplierAccount == 1" style="position: absolute; left: 50%; transform: translateX(-50%); bottom: -40px; width: calc(100% - 20px); margin: 0 auto; height: 48px">
<div class="g_radius_8" style="background-color: #e5e5e5; height: 100%">
<div class="g_h_16"></div>
<div class="g_flex_row_center">
<div v-for="(item, index) in numSlot" :key="index" class="g_flex_row_center g_w_three g_position_rela">
<div class="g_flex_row_center">
<div class="g_fs_14 g_c_6 g_flex_column_end">{{ item.name }}</div>
<div class="g_fs_16 g_c_3 g_fw_600 g_ml_4">{{ item.num }}</div>
</div>
<div class="bor" v-if="index < 2" style="position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 1rpx; height: 8px; background-color: #333"></div>
</div>
</div>
</div>
</div>
<div class="g_bg_page g_text_c">
<div class="g_fs_20 g_pt_24 g_fw_600">
{{ agencyInfo.inviteAgencyFullName }}
</div>
<div v-if="info.supplierAccount == 1">
<div class="g_h_40" v-if="info.supplierAccount == 1"></div>
<div v-if="!isSelf">
<div class="g_flex_row_center" v-if="info.recordStatus == 1">
<!-- 已关注 -->
<div style="width: 520rpx; height: 80rpx" class="g_bg_c g_c_f g_radius_22 g_fs_18 g_fw_600 g_mt_6 g_flex_c" hover-class="thover" @click="handleCancel"></div>
</div>
<div class="g_flex_row_center" v-if="info.recordStatus == 2">
<!-- 互相关注 -->
<div style="width: 520rpx; height: 80rpx" class="g_bg_c g_c_f g_radius_22 g_fs_18 g_fw_600 g_mt_6 g_flex_c" @click="handleCancel"></div>
</div>
<div class="g_flex_row_center" v-if="(info.recordStatus == 4 || info.recordStatus == 3) && !isSelf">
<!-- 判断是否已关注 -->
<div style="width: 520rpx; height: 80rpx" class="g_bg_main g_c_f g_radius_22 g_fs_18 g_fw_600 g_mt_6 g_flex_c" hover-class="thover" @click="handleSubmit"></div>
</div>
<div class="g_flex_row_center" v-if="info.recordStatus == 5">
<!-- 提交申请等待中 -->
<div style="width: 520rpx; height: 80rpx; background-color: #ccc" class="g_c_f g_radius_22 g_fs_18 g_fw_600 g_mt_6 g_flex_c">等待通过</div>
</div>
<div class="g_flex_row_center" v-if="info.recordStatus == 6 && !isSelf">
<!-- 已过期 -->
<div style="width: 520rpx; height: 80rpx" class="g_bg_main g_c_f g_radius_22 g_fs_18 g_fw_600 g_mt_6 g_flex_c" hover-class="thover" @click="handleSubmit"></div>
</div>
<div class="g_flex_row_center" v-if="info.recordStatus == 7">
<!-- 邀请关注的申请关注 -->
<div style="width: 520rpx; height: 80rpx" class="g_bg_main g_c_f g_radius_22 g_fs_18 g_fw_600 g_mt_6 g_flex_c" hover-class="thover" @click="inviteSubmit"></div>
</div>
</div>
<div class="g_h_16"></div>
<div v-if="jobDetailShow || jobDetailShow == 'true'">
<!-- 正常职位 -->
<div class="m-detail" v-if="(info.recordStatus == 1 || info.recordStatus == 2) && info.himSeeBtn == 1">
<div class="g_ml_10 g_mr_10 g_pb_10 g_pt_10">
<u-search v-model="keyword" class="g_flex_1" placeholder="搜索职位名称" bg-color="#fff" :show-action="false" placeholder-class="g_c_c" :input-style="{ fontSize: '16px' }" height="80" search-icon-color="#999999" :maxlength="20" @input="checkLength" @clear="getList('init')" @search="getList('init')"></u-search>
</div>
<g-list-job @uploadList="getList" :recordStatus="info.recordStatus" :showShare="false" :list="query.list" :loading="loading" :speed="speed" :query="query" @clickTop="goDetailJob" @clickBottom="goDetailUser" emptyText="暂无职位" emptySubText=" " />
</div>
<!-- 未关注 -->
<div class="m-detail" v-if="(info.recordStatus == 4 || info.recordStatus == 3 || info.recordStatus == 5 || info.recordStatus == 6 || info.recordStatus == 7) && info.himSeeBtn == 1">
<g-list-job @uploadList="getList" from="user" :isSelf="isSelf" :recordStatus="info.recordStatus" :showShare="false" :list="query.list" :loading="loading" :speed="speed" :query="query" @clickTop="goDetailJob" @clickBottom="goDetailUser" :emptyText="isSelf ? speed + '个职位' : '未关注用户仅展示预览职位'" emptySubText=" " />
</div>
<div v-if="info.himSeeBtn == 0" style="padding-top: 260rpx">
<g-empty text="您关注的发单号暂未发布职位" />
</div>
<div class="">
<div class="g_mt_24 g_mb_24">
请输入尾号为<span class="g_c_f40">{{ agencyInfo.newTel }}</span
>的手机号以获取验证码
</div>
</div>
<div v-if="info.supplierAccount == 0" style="width: calc(100% - 20px); margin: 0 auto">
<div class="g_bg_f g_pl_16 g_pr_16 g_radius_8">
<div class="g_flex_row_between g_h_56">
<div class="g_flex_column_center g_fs_16 g_c_3">不让他看我的职位</div>
<div class="g_flex_column_center">
<u-switch v-model="mLook" activeColor="#00B666" @change="handleSee"></u-switch>
</div>
</div>
<g-panel-form-slot
:list="[
{
icon: '',
label: '手机号',
result: '',
path: '',
value: info.tel,
tip: 'slot-mobile',
placeholder: '请输入联系电话',
type: 'slot',
pColumn: 8,
require: false,
},
{
icon: '',
label: '验证码',
result: '',
path: '',
value: info.code,
tel: info.tel,
verifyTel: agencyInfo.contactsTel,
tip: 'slot-code',
placeholder: '请输入验证码',
type: 'slot',
pColumn: 8,
require: false,
},
]"
@changeMobile="(val) => (info.tel = val)"
@changeCode="(val) => (info.code = val)"
>
</g-panel-form-slot>
<div class="" style="margin-top: 48px">
<quickLogin @successLogin="successLogin" v-if="!isLogin">
<g-button btnText="绑定代理" type="primary" class></g-button>
</quickLogin>
<g-button v-else btnText="绑定代理" type="primary" @clickBtn="bindAgency" />
</div>
<div class="g_w_260 g_h_42 g_radius_25 g_bg_f g_fs_18 g_flex_c g_mt_90" style="color: #fa5151; margin: 90px auto 0" hover-class="thover" @click="goReturn"></div>
</div>
</div>
</template>
<script>
import quickLogin from "../../components/quickLogin.vue";
export default {
onReady() {
this.G.setNavStyle();
//
name: "",
//
components: {
quickLogin,
},
// onShareAppMessage(){
// return this.G.shareFun();
// },
//
props: {},
//
data() {
return {
numSlot: [],
isLogin: null,
pageSpeed: 0,
isShowMore: true,
isShowJob: true,
agencyId: 0,
loading: true,
keyword: "", //
speed: -1,
query: {
page: 1,
size: 50,
list: [],
isFinish: -1,
},
info: {
avatar: "",
agencyName: "",
jobUpdateNum: 0,
tel: "",
code: "",
},
uid: 0,
type: 0,
bindid: 0,
dataArray: [
{
name: "职位",
num: 120,
},
{
name: "关注",
num: 108,
},
{
name: "粉丝",
num: 250,
},
],
mLook: false,
from: "",
jobDetailShow: true,
loginInfo: {},
isSelf: false, //
scene: "",
agencyInfo: {},
scene: {
agencyId: "",
providerId: "",
},
isLogin: false,
};
},
onLoad(options) {
console.log("用户详情页:", options, " version:", 1);
this.loginId = uni.getStorageSync("apply-agencyId");
if (this.loginId == options.id && options.id) {
this.isSelf = true;
}
this.scene = options.scene;
if (this.scene) {
let _str = decodeURIComponent(this.scene);
this.uid = _str.split("=")[1];
} else {
this.uid = options.id;
}
this.type = options.type ? options.type : "";
this.isShowMore = options.isShowMore;
this.isShowJob = options.isShowJob;
this.jobDetailShow = options.jobDetailShow || true;
this.from = options.shareForm;
if (options.bindid) {
this.bindid = options.bindid;
console.log(options);
if (options.scene) {
var sceneStr = decodeURIComponent(options.scene);
var sceneJson = this.G.sceneToJson(sceneStr);
this.scene.providerId = sceneJson.id.split("_")[1]; //id
this.scene.agencyId = sceneJson.id.split("_")[0]; // id
console.log(this.scene);
}
this.getDetail();
},
onShow() {
let that = this;
that.isLogin = ""; // uni.getStorageSync("apply-token");
this.loginInfo = uni.getStorageSync("apply-userinfo");
// if (!that.isLogin) {
// that.loading = false;
// that.speed = 0;
// } else {
// }
},
onReachBottom() {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
if (that.query.isFinish == -1 || that.query.isFinish == that.query.size) {
that.query.page++;
that.getList("concat");
}
}
this.isLogin = uni.getStorageSync("apply-token") ? true : false; // uni.getStorageSync("apply-token");
},
//
computed: {},
//
watch: {},
created() {},
mounted() {},
//
methods: {
getDetail() {
successLogin(e) {
let that = this;
// this.G.isLogin();
// if (this.G.isLogin()) {
that.pageSpeed = 0;
that.G.Get(
that.api.bind_enterpriseDetail + "/" + that.uid,
{
agencyId: that.uid,
type: that.type,
},
(res) => {
console.log("获取详情:", res, " -- ", that.uid);
that.pageSpeed = 1;
that.info = res;
if (!that.uid) {
if (that.loginInfo.agencyId == that.info.agencyId) {
that.isSelf = true;
}
}
if (that.info.supplierAccount == 0) {
that.isShowMore = false;
}
that.agencyId = res.agencyId;
that.mLook = that.info.himSee == 1 ? false : true;
that.numSlot = [
{
name: "职位数",
num: that.info.himSee == 0 ? 0 : that.info.jobNum,
},
{
name: "今日更新",
num: that.info.jobUpdateNum,
},
{
name: "粉丝数",
num: that.info.downNum,
},
];
that.getList();
}
);
// }
},
goDetailUser() {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
if (this.info.recordStatus == 1 || this.info.recordStatus == 2) {
let params = {
id: that.info.agencyId,
type: that.type,
bindid: that.info.id,
isShowMore: true,
isShowJob: true,
};
uni.navigateTo({
url: "/root/detail/user?" + that.G.objToStr(params),
});
} else {
if (that.isSelf) {
} else {
uni.showToast({
title: "关注发单号后才可查看详情",
icon: "none",
});
}
}
}
},
getDefault($type) {
let that = this;
console.log('$type',$type);
this.G.isLogin();
if (this.G.isLogin()) {
that.G.Post(
that.api.job_list,
{
pageNum: that.query.page,
pageSize: that.query.size,
agencyId: that.agencyId,
keys: that.keyword,
},
(res) => {
console.log("resresresresresres", res);
if (res.recordCount == 0) {
that.loading = false;
} else {
that.loading = true;
}
that.speed = res.recordCount;
that.query.isFinish = res.recordList.length;
res.recordList = that.G.toGetAddressv3(res.recordList);
res.recordList = that.G.toGetAge(res.recordList);
res.recordList = that.G.yijobCopy(res.recordList);
if ($type == "init") {
that.query.list = [];
that.query.list =
res.recordList.length > 0
? res.recordList.map((item, index) => {
return {
...item,
title: item.jobName,
address: item.district + item.age,
price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : that.G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay),
fuWuFei: that.G.setReturnFee(item.returnFee, item.returnFeeType),
cus_price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValueHtml(item.salaryClassify, item.salaryClassifyValue) : "月薪",
gender: that.G.getGenderByMinAge(item),
logo: item.agencyLogo,
time: that.G.setDeadLine(item.updateTime, "jiaofu"),
leafCateId: item.id,
// serverPrice: that.G.setReturnFee(item.returnFee, item.returnFeeType),
serverPrice: that.G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType),
recruitmentSwitch: item.recruitment == 1 ? true : false,
recruitmentImage: item.recruitment,
isToday: item.today == 0 ? false : true,
active: 0,
};
})
: [];
} else {
that.query.list = that.query.list.concat(
res.recordList.length > 0
? res.recordList.map((item, index) => {
return {
...item,
title: item.jobName,
address: item.district + item.age,
price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : that.G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay),
fuWuFei: that.G.setReturnFee(item.returnFee, item.returnFeeType),
gender: that.G.getGenderByMinAge(item),
logo: item.agencyLogo,
time: that.G.setDeadLine(item.updateTime, "jiaofu"),
leafCateId: item.id,
// serverPrice: that.G.setReturnFee(item.returnFee, item.returnFeeType),
serverPrice: that.G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType),
recruitmentSwitch: item.recruitment == 1 ? true : false,
recruitmentImage: item.recruitment,
isToday: item.today == 0 ? false : true,
active: 0,
};
})
: []
);
}
console.log("query.list", that.query.list);
}
);
}
},
getHot($type) {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
that.G.Post(
that.api.job_hotList + "/" + that.agencyId,
{
pageNum: that.query.page,
pageSize: that.query.size,
agencyId: that.agencyId,
keys: "",
},
(res) => {
console.log("推荐列表:", res);
if (res.length == 0) {
that.loading = false;
} else {
that.loading = true;
}
that.speed = res.length;
that.query.isFinish = res.length;
res = that.G.toGetAddressv3(res);
res = that.G.toGetAge(res);
res = that.G.yijobCopy(res);
if ($type == "init") {
that.query.list = [];
that.query.list =
res.length > 0
? res.map((item, index) => {
return {
...item,
title: item.jobName,
address: item.district + item.age,
price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : that.G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay),
fuWuFei: that.G.setReturnFee(item.returnFee, item.returnFeeType),
gender: that.G.getGenderByMinAge(item),
logo: item.agencyLogo,
time: that.G.setDeadLine(item.updateTime, "jiaofu"),
leafCateId: item.id,
// serverPrice: that.G.setReturnFee(item.returnFee, item.returnFeeType),
serverPrice: that.G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType),
agencyId: item.agencyId,
recruitmentSwitch: item.recruitment == 1 ? true : false,
recruitmentImage: item.recruitment,
teamType: item.teamType,
creatorName: item.creatorName,
isToday: item.isToday,
active: 0,
};
})
: [];
} else {
that.query.list = that.query.list.concat(
res.length > 0
? res.map((item, index) => {
return {
...item,
title: item.jobName,
address: item.district + item.age,
price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : that.G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay),
fuWuFei: that.G.setReturnFee(item.returnFee, item.returnFeeType),
gender: that.G.getGenderByMinAge(item),
logo: item.agencyLogo,
time: that.G.setDeadLine(item.updateTime, "jiaofu"),
leafCateId: item.id,
// serverPrice: that.G.setReturnFee(item.returnFee, item.returnFeeType),
serverPrice: that.G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType),
recruitmentSwitch: item.recruitment == 1 ? true : false,
recruitmentImage: item.recruitment,
active: 0,
};
})
: []
);
}
}
);
}
},
checkLength(e) {
if (e.length == 0) {
this.keyword = "";
this.getList();
}
},
getList($type = "init") {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
if (this.info.recordStatus == 1 || this.info.recordStatus == 2) {
that.getDefault($type);
} else {
that.getHot($type);
}
this.isLogin = uni.getStorageSync("apply-token") ? true : false;
if (!that.info.tel || !that.info.code) {
uni.showToast({
title: "请输入手机号和验证码",
icon: "none",
});
} else {
that.getHot($type);
}
},
goMore() {
let that = this,
str = "";
this.G.isLogin();
if (this.G.isLogin()) {
if (that.info.supplierAccount == 1) {
if (that.isShowMore == "true") {
if (that.info.recordStatus == 2) {
str = 3;
} else {
str = that.info.up;
}
console.log("that.type", that.type);
uni.navigateTo({
url: "/root/bind/more?delta=2&id=" + that.agencyId + "&himSee=" + that.info.himSee + "&lookHim=" + that.info.lookHim + "&type=" + str + "&from=" + that.type + "&lid=" + that.info.lookHimOperateId + "&hid=" + that.info.himSeeOperateId,
});
}
}
this.bindAgency();
}
},
goDetailJob($item) {
bindAgency() {
let that = this;
console.log("that.isSelf1", that.isSelf);
this.G.isLogin();
console.log("that.isSelf2", that.isSelf);
if (this.G.isLogin()) {
if (that.isSelf) {
uni.navigateTo({
url: "/root/detail/job?id=" + $item.leafCateId,
});
} else if (this.info.recordStatus == 1 || this.info.recordStatus == 2) {
uni.navigateTo({
url: "/root/detail/job?id=" + $item.leafCateId,
});
} else {
uni.showToast({
title: "关注发单号后才可查看详情",
icon: "none",
});
}
if (!that.info.tel || !that.info.code) {
uni.showToast({
title: "请输入手机号和验证码",
icon: "none",
});
return;
}
},
inviteSubmit() {
let that = this;
console.log("info", that.info);
// return;
uni.showModal({
title: "关注发单号",
content: "关注发单号后,您可以查看该账号职位的更新,确定要关注吗?",
confirmColor: "#576B95",
success(modalRes) {
if (modalRes.confirm) {
that.G.handleConfirm({
content: "绑定后将关注该代理, 是否确认?",
success: (res) => {
if (res.confirm) {
that.G.Post(
that.api.user_updateInviteId,
"/yishoudan/store/provider/downAgencyBindUpAgency",
{
agencyIds: that.info.agencyId,
providerId: that.scene.providerId,
upAgencyId: that.scene.agencyId,
tel: that.info.tel,
code: that.info.code,
},
(res) => {
uni.showToast({
title: "关注成功",
console.log(res);
that.G.handleConfirm({
content: "绑定成功, 请回到首页",
showCancel: false,
success: (res) => {
if (res.confirm) {
uni.switchTab({
url: '/pages/home/index',
});
}
},
});
setTimeout(() => {
that.getDetail();
}, 800);
}
);
} else if (modalRes.cancel) {
console.log("用户点击取消");
}
},
fail() {},
});
},
handleSubmit() {
getDetail() {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
//
let _code = 1; //
if (this.from == "friend") {
_code = 2; //
} else {
if (this.scene) {
_code = 3; //
} else {
_code = 1; //
}
that.G.Get(
"/yishoudan/store/provider/getInviteRelationDetails",
{
providerId: that.scene.providerId,
},
(res) => {
console.log(res);
res.newTel = res.contactsTel.slice(-4);
that.agencyInfo = res;
}
uni.showModal({
title: "关注发单号",
content: "关注发单号后,您可以查看该账号职位的更新,确定要关注吗?",
confirmColor: "#576B95",
success(modalRes) {
if (modalRes.confirm) {
that.G.Get(
that.api.bind_subscribeSubmit + "/" + that.info.agencyId,
{
agencyId: that.agencyId,
source: _code,
remark: "",
},
(res) => {
uni.showToast({
title: "提交成功",
});
setTimeout(() => {
that.getDetail();
}, 800);
}
);
} else if (modalRes.cancel) {
console.log("用户点击取消");
}
},
fail() {},
});
}
},
handleSee(e) {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
that.G.Get(
that.api.bind_isSee + "/" + that.info.himSeeOperateId,
{
id: that.info.himSeeOperateId,
himSee: e ? 0 : 1,
},
() => {
uni.showToast({
icon: "success",
title: "更新成功",
});
}
);
}
},
goReturn() {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
that.G.handleConfirm({
content: "确认删除粉丝吗?",
success: (res) => {
if (res.confirm) {
that.G.Get(
that.api.bind_delApply + "/" + that.agencyId,
{
agencyId: that.agencyId,
},
() => {
uni.showToast({
icon: "success",
title: "删除粉丝成功",
});
setTimeout(() => {
uni.navigateBack();
}, 1500);
}
);
}
},
});
}
},
handleCancel() {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
that.G.handleConfirm({
content: "是否取消关注该发单号?",
success: (res) => {
if (res.confirm) {
that.G.Get(
that.api.bind_cancelApply + "/" + that.agencyId,
{
agencyId: that.agencyId,
},
() => {
uni.showToast({
icon: "success",
title: "取消关注成功",
});
setTimeout(() => {
that.getDetail();
that.getList();
}, 1500);
}
);
}
},
});
}
);
},
},
};
</script>
<style lang="scss">
.p-root-detail-user {
min-height: 100%;
}
</style>
<style scoped lang="less"></style>

@ -1,154 +1,161 @@
<template>
<view class="p-root-person-pwdForget g_w_all g_h_all g_bg_f_5 g_kuaishou">
<view class="g_pt_16 g_mb_24">
<g-panel-form-slot :list='[
<g-panel-form-slot
:list="[
{
icon:"",
label:"手机号",
result:tel,
path:"",
tip:"mobile",
type:"slot",
icon: '',
label: '手机号',
result: tel,
path: '',
tip: 'mobile',
type: 'slot',
},
{
icon:"",
label:"验证码",
result:"",
path:"",
tip:"slot-code",
value:code,
type:"slot",
placeholder:"输入验证码",
pColumn:12
icon: '',
label: '验证码',
result: '',
path: '',
tip: 'slot-code',
value: code,
tel: tel,
type: 'slot',
placeholder: '输入验证码',
pColumn: 12,
},
]'
]"
@changeCode="getCode"
>
</g-panel-form-slot>
</view>
<view class="">
<g-panel-form-slot :list='[
<g-panel-form-slot
:list="[
{
icon:"",
label:"新密码",
result:"",
path:"",
tip:"slot-new-pwd",
value:newPwd,
type:"slot",
placeholder:"请输入新密码",
pColumn:12
icon: '',
label: '新密码',
result: '',
path: '',
tip: 'slot-new-pwd',
value: newPwd,
type: 'slot',
placeholder: '请输入新密码',
pColumn: 12,
},
{
icon:"",
label:"确认密码",
result:"",
path:"",
tip:"slot-confirm-pwd",
value:confirmPwd,
type:"slot",
placeholder:"再次输入新密码",
pColumn:12
icon: '',
label: '确认密码',
result: '',
path: '',
tip: 'slot-confirm-pwd',
value: confirmPwd,
type: 'slot',
placeholder: '再次输入新密码',
pColumn: 12,
},
]'
]"
@changeNewPwd="getNewPwd"
@changeConfirmPwd="getConfirmPwd"
>
</g-panel-form-slot>
</view>
</view>
<view class="g_pt_90 g_flex_row_center">
<g-button btnText='修改密码' type='primary' @clickBtn='submitForm' />
<g-button btnText="修改密码" type="primary" @clickBtn="submitForm" />
</view>
</view>
</view>
</template>
<script>
export default{
onReady() {
this.G.setNavStyle();
export default {
onReady() {
this.G.setNavStyle();
},
onShareAppMessage() {
return this.G.shareFun();
},
data() {
return {
tel: uni.getStorageSync("apply-tel"),
code: "",
newPwd: "",
confirmPwd: "",
};
},
methods: {
getCode(e) {
this.code = e;
console.log(e);
},
onShareAppMessage(){
return this.G.shareFun();
getNewPwd(e) {
this.newPwd = e;
},
data(){
return{
tel:uni.getStorageSync("apply-tel"),
code:"",
newPwd:"",
confirmPwd:"",
}
getConfirmPwd(e) {
this.confirmPwd = e;
},
methods:{
getCode(e){
this.code = e;
},
getNewPwd(e){
this.newPwd = e;
},
getConfirmPwd(e){
this.confirmPwd = e;
},
submitForm(){
let that = this;
if(that.code == ''){
uni.showToast({
title:'请输入验证码',
icon:'none'
})
return false;
};
if(that.newPwd == ''){
uni.showToast({
title:'请输入新密码',
icon:'none'
})
return false;
};
if(that.confirmPwd == ''){
uni.showToast({
title:'请再次输入新密码',
icon:'none'
})
return false;
};
if(that.confirmPwd != that.newPwd){
uni.showToast({
title:'前后密码不一致',
icon:'none'
})
return false;
};
that.G.Get(that.api.user_changeForgetPwd,{
submitForm() {
let that = this;
if (that.code == "") {
uni.showToast({
title: "请输入验证码",
icon: "none",
});
return false;
}
if (that.newPwd == "") {
uni.showToast({
title: "请输入新密码",
icon: "none",
});
return false;
}
if (that.confirmPwd == "") {
uni.showToast({
title: "请再次输入新密码",
icon: "none",
});
return false;
}
if (that.confirmPwd != that.newPwd) {
uni.showToast({
title: "前后密码不一致",
icon: "none",
});
return false;
}
that.G.Get(
that.api.user_changeForgetPwd,
{
tel: uni.getStorageSync("apply-tel"),
code: that.code,
password: that.newPwd
},()=>{
password: that.newPwd,
},
() => {
uni.showToast({
title:'修改成功',
icon:'success'
})
setTimeout(()=>{
that.G.Get(that.api.login_out,{},()=>{
title: "修改成功",
icon: "success",
});
setTimeout(() => {
that.G.Get(that.api.login_out, {}, () => {
that.G.clearLocalStorage();
let params = {
path:'',
level:"",
}
path: "",
level: "",
};
uni.reLaunch({
url: '/root/person/loginIndex?' + that.G.objToStr(params)
url: "/root/person/loginIndex?" + that.G.objToStr(params),
});
})
},1500)
})
},
goPage(){
uni.navigateTo({
url:'/root/person/pwdForget'
})
}
}
}
});
}, 1500);
}
);
},
goPage() {
uni.navigateTo({
url: "/root/person/pwdForget",
});
},
},
};
</script>
<style>
</style>
<style></style>

Loading…
Cancel
Save