企业资料 关注团队 加入团队
parent
9b94450074
commit
75e91a9dde
@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<div>
|
||||
<view class="g_flex_column_between g_flex_1" style="background-color: #ededed; height: 100%; padding-top: 100px">
|
||||
<view class="g_flex_column_start flex_center">
|
||||
<view class="iconfont icon-info-circle-fill g_c_027" style="font-size: 80px"> </view>
|
||||
<view class="g_fs_17 g_mb_16 g_mt_16"> 温馨提示 </view>
|
||||
<view class="g_fs_13 g_c_9 g_mb_32 g_text_c g_ml_20 g_mr_20"> {{ !isLogin ? "相关功能仅对注册用户开放,请注册登录后查看。" : "平台仅面向企业用户开放,您需完成企业认证后使用。" }} </view>
|
||||
</view>
|
||||
|
||||
<view class="" style="margin-bottom: 80px">
|
||||
<g-button :btnText="!isLogin ? '登录查看' : '马上认证'" type="primary" @clickBtn="goPage('/root/other/tobeAgencyChoose')" />
|
||||
<view class=""></view>
|
||||
<!-- <view class="g_c_sub g_flex_row_center flex_center g_fs_14 g_mt_32" @click="serverPopShow = true"> <i class="iconfont icon-kefu"> </i>联系客服 </view> -->
|
||||
</view>
|
||||
</view>
|
||||
<u-popup v-model="serverPopShow" mode="center" :mask-close-able="false" :closeable="true" @close="serverPopShow = false" border-radius="30">
|
||||
<view style="">
|
||||
<view style="text-align: center; font-size: 16px; color: #333; font-weight: 500; margin-bottom: 32px; padding-top: 32px">加客服微信</view>
|
||||
<view style="padding: 64px; padding-top: 0">
|
||||
<image :src="serviceInfo.qrCode" alt="" @longpress="downLoadImg" show-menu-by-longpress style="width: 184px; height: 184px" />
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
userInfo: {},
|
||||
isLogin: false,
|
||||
serverPopShow: false,
|
||||
serviceInfo: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
let that = this;
|
||||
that.userInfo = uni.getStorageSync("apply-userinfo");
|
||||
that.isLogin = uni.getStorageSync("apply-token") ? true : false;
|
||||
// this.serviceInfo = uni.getStorageSync("bc-server");
|
||||
},
|
||||
|
||||
methods: {
|
||||
goPage(url) {
|
||||
this.G.isLogin();
|
||||
if (this.G.isLogin()) {
|
||||
uni.navigateTo({
|
||||
url,
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
@ -0,0 +1,132 @@
|
||||
<template>
|
||||
<view class="p-person-avatar g_flex_column_center g_w_all g_h_all g_bg_0 g_kuaishou">
|
||||
<view>
|
||||
<view
|
||||
:style="{
|
||||
width: size.width + 'px',
|
||||
height: size.width + 'px',
|
||||
}"
|
||||
style="overflow: hidden"
|
||||
class="g_flex_c"
|
||||
>
|
||||
<img
|
||||
:src="avatar"
|
||||
:style="{
|
||||
width: size.width + 'px',
|
||||
height: size.width + 'px',
|
||||
}"
|
||||
/>
|
||||
</view>
|
||||
<view class="g_flex_row_center g_mt_30">
|
||||
<view v-if="!isEdit" class="g_flex_row_center">
|
||||
<!-- || MP-WEIXIN -->
|
||||
<!-- #ifdef APP-PLUS || H5 || MP-TOUTIAO || MP-KUAISHOU -->
|
||||
<button aria-role="button" class="g_w_110 g_h_32 g_flex_c g_radius_17 g_c_f" style="border: 1px solid #fff; background-color: transparent; font-size: 14px" @click="handleOpenAvatar">更换图片</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<!-- <button open-type="chooseAvatar" @chooseavatar="handleStartChangeAvatar" aria-role="button" class="g_w_110 g_h_32 g_flex_c g_radius_17 g_c_f" style="border: 1px solid #fff; background-color: transparent; font-size: 14px">更换图片</button> -->
|
||||
<button @click="handleOpenAvatar" aria-role="button" class="g_w_110 g_h_32 g_flex_c g_radius_17 g_c_f" style="border: 1px solid #fff; background-color: transparent; font-size: 14px">更换图片</button>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<view v-if="isEdit" class="g_flex_row_center">
|
||||
<view class="g_w_110 g_h_32 g_flex_c g_radius_17 g_c_f g_mr_16" style="border: 1px solid #fff" @click="handleCancel">取消</view>
|
||||
<view class="g_w_112 g_h_34 g_flex_c g_radius_17 g_c_f g_bg_f40" style="border: 2px solid #ff4400" @click="handleConfirm">确认</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
onReady() {
|
||||
uni.setNavigationBarColor({
|
||||
backgroundColor: "#000000",
|
||||
frontColor: "#ffffff",
|
||||
});
|
||||
},
|
||||
onLoad(options) {
|
||||
let that = this;
|
||||
console.log("options", options);
|
||||
this.info = options;
|
||||
this.avatar = options.value;
|
||||
uni.setNavigationBarTitle({
|
||||
title: `修改${options.label}`,
|
||||
});
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return this.G.shareFun();
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
avatar: '',
|
||||
isEdit: false,
|
||||
size: {
|
||||
width: uni.getSystemInfoSync().windowWidth,
|
||||
height: uni.getSystemInfoSync().windowHeight,
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleOpenAvatar() {
|
||||
let that = this;
|
||||
uni.showActionSheet({
|
||||
itemList: ["从相册选择", "使用相机"],
|
||||
success: function (res) {
|
||||
if (res.tapIndex == 0) {
|
||||
console.log("点击相册");
|
||||
// 相册
|
||||
that.setAvatar(["album"]);
|
||||
} else {
|
||||
console.log("点击拍照");
|
||||
// 拍照
|
||||
that.setAvatar(["camera"]);
|
||||
}
|
||||
},
|
||||
fail: function (res) {},
|
||||
});
|
||||
},
|
||||
setAvatar($type) {
|
||||
let that = this;
|
||||
that.G.uploadImg(
|
||||
(res) => {
|
||||
console.log("获取数据", res);
|
||||
that.avatar = res.image;
|
||||
that.isEdit = true;
|
||||
},
|
||||
"default",
|
||||
1,
|
||||
$type
|
||||
);
|
||||
},
|
||||
handleCancel() {
|
||||
let that = this;
|
||||
that.isEdit = false;
|
||||
// that.avatar = this.avatar;
|
||||
},
|
||||
handleConfirm() {
|
||||
let that = this;
|
||||
that.G.Put(
|
||||
"/yishoudan/agency/updateField",
|
||||
{
|
||||
fieldName: this.info.fieldName,
|
||||
fieldValue: that.avatar,
|
||||
},
|
||||
(res) => {
|
||||
that.isEdit = false;
|
||||
uni.showToast({
|
||||
title: "修改成功",
|
||||
icon: "success",
|
||||
});
|
||||
that.G.checkToken();
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 1500);
|
||||
}
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
@ -0,0 +1,166 @@
|
||||
<template>
|
||||
<view class="p-person-change g_w_all g_h_all g_bg_f_5 g_kuaishou">
|
||||
<view class="g_h_10"></view>
|
||||
|
||||
<view v-if="info.title == '设置用户名'">
|
||||
<g-panel-form-slot
|
||||
:list="[
|
||||
{
|
||||
icon: '',
|
||||
label: '用户名',
|
||||
result: '',
|
||||
path: '',
|
||||
tip: 'user-name',
|
||||
type: 'slot',
|
||||
pColumn: 12,
|
||||
},
|
||||
]"
|
||||
>
|
||||
<slot>
|
||||
<!-- #ifdef APP-PLUS || H5 || MP-TOUTIAO || MP-KUAISHOU -->
|
||||
<u-input type="text"
|
||||
:clearable="false"
|
||||
:password-icon="false"
|
||||
placeholder="请输入用户名" input-align="right"
|
||||
class="g_text_r g_w_all"
|
||||
placeholder-style="color:#999999;font-size:32rpx;line-height:1"
|
||||
v-model="info.value"
|
||||
style="width: calc(100vw - (106px);flex: none;"
|
||||
/>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<u-input type="text"
|
||||
:clearable="false"
|
||||
:password-icon="false"
|
||||
placeholder="请输入用户名" input-align="right"
|
||||
class="g_text_r g_w_all"
|
||||
placeholder-style="color:#999999;font-size:32rpx;line-height:1"
|
||||
v-model="info.value"
|
||||
/>
|
||||
<!-- #endif -->
|
||||
</slot>
|
||||
</g-panel-form-slot>
|
||||
<view class="g_mt_90 g_flex_row_center">
|
||||
<g-button btnText="提交" type="primary" @clickBtn="submitForm" />
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="info.type == 'order'">
|
||||
<g-panel-form-slot
|
||||
:list="[
|
||||
{
|
||||
icon: '',
|
||||
label: info.remark,
|
||||
result: '',
|
||||
path: '',
|
||||
tip: 'user-name',
|
||||
type: 'slot',
|
||||
pColumn: 12,
|
||||
},
|
||||
]"
|
||||
>
|
||||
<slot>
|
||||
<u-input type="text" :clearable="false" :password-icon="false" :placeholder="info.place" input-align="right" class="g_text_r g_w_all" placeholder-style="color:#999999;font-size:32rpx;line-height:1" v-model="info.value" />
|
||||
</slot>
|
||||
</g-panel-form-slot>
|
||||
<view class="g_mt_90 g_flex_row_center">
|
||||
<g-button btnText="提交" type="primary" @clickBtn="submitOrderForm" />
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="info.title == '设置手机号'">
|
||||
<g-panel-form-item
|
||||
:list="[
|
||||
{
|
||||
icon: '',
|
||||
label: '手机号',
|
||||
result: info.value,
|
||||
path: '',
|
||||
tip: 'user-tel',
|
||||
type: 'slot',
|
||||
},
|
||||
]"
|
||||
/>
|
||||
<view class="g_fs_14 g_c_9 g_flex_row_center g_mt_10">暂不支持修改</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
onReady() {
|
||||
this.G.setNavStyle();
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return this.G.shareFun();
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
info: {},
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log("options", options);
|
||||
this.info = options;
|
||||
uni.setNavigationBarTitle({
|
||||
title: options.title,
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
submitForm() {
|
||||
let that = this;
|
||||
if (that.info.value == "") {
|
||||
uni.showToast({
|
||||
title: "请输入用户名",
|
||||
icon: "none",
|
||||
});
|
||||
return false;
|
||||
}
|
||||
that.G.Post(
|
||||
that.api.user_changeName,
|
||||
{
|
||||
userName: that.info.value,
|
||||
formdata: true,
|
||||
},
|
||||
() => {
|
||||
uni.showToast({
|
||||
title: "修改成功",
|
||||
icon: "success",
|
||||
});
|
||||
that.G.checkToken();
|
||||
|
||||
// uni.setStorageSync('apply-username', that.info.value)
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 1500);
|
||||
}
|
||||
);
|
||||
},
|
||||
submitOrderForm(info) {
|
||||
let that = this;
|
||||
console.log(that.info.value);
|
||||
if (!this.info.value.trim()) {
|
||||
uni.showToast({
|
||||
title: "名称不能为空",
|
||||
icon: "none",
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (that.info.title == "修改账号名称") {
|
||||
if (that.info.value.length > 10) {
|
||||
uni.showToast({
|
||||
title: "账号名称最多10个字",
|
||||
icon: "none",
|
||||
});
|
||||
return;
|
||||
}
|
||||
uni.$emit("changeAccountName", { info: this.info.value });
|
||||
uni.navigateBack();
|
||||
} else if (that.info.title == "修改企业名称") {
|
||||
uni.$emit("changeStoreName", { info: this.info.value });
|
||||
uni.navigateBack();
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
@ -0,0 +1,126 @@
|
||||
<template>
|
||||
<view class="p-person-info g_w_all g_h_all g_bg_f_5 g_kuaishou">
|
||||
<view class="g_pt_16">
|
||||
<g-panel-form-item :list="list" @clickItem="handleClickItem" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
onReady() {
|
||||
this.G.setNavStyle();
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return this.G.shareFun();
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
userinfo: {},
|
||||
list: [],
|
||||
cdnBaseImg: this.G.store().cdnBaseImg,
|
||||
localBaseImg: this.G.store().localBaseImg,
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
let that = this;
|
||||
uni.$on("changePersonDesp", function (data) {
|
||||
console.log(data.info);
|
||||
console.log("监听到事件来自 update ,携带参数 msg 为:" + data.info);
|
||||
that.userinfo.desp = data.info;
|
||||
let info = {
|
||||
fieldName: "desp",
|
||||
fieldValue: that.userinfo.desp,
|
||||
};
|
||||
setTimeout(() => {
|
||||
that.editField(info);
|
||||
}, 100);
|
||||
that.$forceUpdate();
|
||||
});
|
||||
},
|
||||
onShow() {
|
||||
let that = this;
|
||||
that.init();
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
let that = this;
|
||||
that.userinfo = {
|
||||
imgSrc: uni.getStorageSync("apply-avatar") || that.localBaseImg + "default.svg",
|
||||
userName: uni.getStorageSync("apply-userinfo").userName,
|
||||
tel: uni.getStorageSync("apply-tel"),
|
||||
desp: that.userinfo.desp || "请简单介绍",
|
||||
};
|
||||
let defaultList = [
|
||||
{
|
||||
icon: "",
|
||||
label: "头像",
|
||||
result: "",
|
||||
value: that.userinfo.imgSrc,
|
||||
path: "/root/person/avatar",
|
||||
tip: "avatar",
|
||||
pColumn: 22,
|
||||
},
|
||||
{
|
||||
icon: "",
|
||||
label: "用户名",
|
||||
result: that.userinfo.userName,
|
||||
path: "/root/person/change?title=设置用户名&remark=好的花名,让团队成员更好记住你&value=" + that.userinfo.userName,
|
||||
tip: "username",
|
||||
},
|
||||
{
|
||||
icon: "",
|
||||
label: "手机号",
|
||||
result: that.userinfo.tel,
|
||||
path: "/root/person/change?title=设置手机号&remark=&value=" + that.userinfo.tel,
|
||||
tip: "mobile",
|
||||
},
|
||||
// {
|
||||
// icon: "",
|
||||
// label: "个人简介",
|
||||
// result: "",
|
||||
// value: that.userinfo.desp,
|
||||
// path: "/root/person/inputAccountInfo?from=person&val=" + that.userinfo.desp,
|
||||
// tip: "desp",
|
||||
// placeholder: "请简单介绍",
|
||||
// type: "",
|
||||
// result: that.userinfo.desp,
|
||||
// fontSize: "16px",
|
||||
// fontColor: that.userinfo.desp == "请简单介绍" ? "g_c_9" : "g_c_3",
|
||||
// pColumn: 18,
|
||||
// },
|
||||
];
|
||||
if (uni.getStorageSync("apply-supplierAccount") == 1) {
|
||||
// 有
|
||||
that.list = defaultList.concat([
|
||||
{
|
||||
icon: "",
|
||||
label: "二维码名片",
|
||||
result: "",
|
||||
path: "/root/bind/search?active=1",
|
||||
tip: "code",
|
||||
},
|
||||
]);
|
||||
} else {
|
||||
// 无
|
||||
that.list = defaultList;
|
||||
}
|
||||
},
|
||||
editField(info) {
|
||||
let that = this;
|
||||
console.log(info);
|
||||
that.G.Put(that.api.user_changeTobeSupplierField, info, (res) => {
|
||||
that.showSuccess();
|
||||
});
|
||||
},
|
||||
handleClickItem(e) {
|
||||
let that = this;
|
||||
uni.navigateTo({
|
||||
url: e.item.path,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
@ -0,0 +1,381 @@
|
||||
<template>
|
||||
<view class="" style="height: calc(100vh - 47px)" v-if="userInfo.agencyStatus != 1" hover-class="none" hover-stop-propagation="false">
|
||||
<unloginInfo></unloginInfo>
|
||||
</view>
|
||||
<div class="g_pb_32" style="min-height: calc(100vh - 47px)" v-else
|
||||
:data-admin="isAdmin"
|
||||
>
|
||||
<view class="">
|
||||
<g-panel-form-item
|
||||
:list="[
|
||||
{
|
||||
icon: '',
|
||||
label: '当前团队',
|
||||
result: userInfo.agencyName,
|
||||
path: '',
|
||||
tip: 'userAgreement',
|
||||
},
|
||||
]"
|
||||
@clickItem="teamSet"
|
||||
/>
|
||||
</view>
|
||||
<view class="g_mt_10">
|
||||
<g-panel-form-item :isDisabled="isAdmin ? 0 : 1" class="g_mb_10" :list="companyConfig" @clickItem="handleItemClick"> </g-panel-form-item>
|
||||
</view>
|
||||
<view class="g_mt_10">
|
||||
<g-panel-form-item
|
||||
class="g_mb_10"
|
||||
:isDisabled="isAdmin ? 0 : 1"
|
||||
:list="[
|
||||
{
|
||||
icon: '',
|
||||
label: '联系人',
|
||||
result: info.contactUserName || '请输入联系人姓名',
|
||||
value: info.contactUserName,
|
||||
fontColor: !info.contactUserName ? 'g_c_9' : 'g_c_3',
|
||||
path: '/root/person/change?label=联系人&fieldName=contactUserName&value=' + info.contactUserName,
|
||||
tip: 'user-name',
|
||||
placeholder: '请输入联系人姓名',
|
||||
fontSize: '16px',
|
||||
type: 'text',
|
||||
pColumn: 19,
|
||||
pRow: 12,
|
||||
require: false,
|
||||
params: {
|
||||
label: '联系人',
|
||||
fieldName: 'contactUserName',
|
||||
},
|
||||
},
|
||||
{
|
||||
icon: '',
|
||||
label: '联系电话',
|
||||
result: info.contactTel || '请输入联系电话',
|
||||
value: info.contactTel,
|
||||
fontColor: !info.contactTel ? 'g_c_9' : 'g_c_3',
|
||||
path: '/root/person/change?label=联系电话&fieldName=contactTel&value=' + info.contactTel,
|
||||
tip: 'user-name',
|
||||
placeholder: '请输入联系电话',
|
||||
fontSize: '16px',
|
||||
type: 'text',
|
||||
pColumn: 19,
|
||||
pRow: 12,
|
||||
require: false,
|
||||
params: {
|
||||
label: '联系电话',
|
||||
fieldName: 'contactTel',
|
||||
},
|
||||
},
|
||||
{
|
||||
icon: '',
|
||||
label: '联系人二维码',
|
||||
fontColor: !info.contactWechatQrcode ? 'g_c_9' : 'g_c_3',
|
||||
value: info.contactWechatQrcode,
|
||||
path: '/root/agency/agencyAvatar?label=联系人二维码&fieldName=contactWechatQrcode&value=' + info.contactWechatQrcode,
|
||||
tip: 'avatar',
|
||||
radius: 2,
|
||||
type: 'text',
|
||||
fontSize: '16px',
|
||||
pColumn: 22,
|
||||
pRow: 12,
|
||||
params: {
|
||||
fieldName: 'contactWechatQrcode',
|
||||
},
|
||||
},
|
||||
]"
|
||||
@clickItem="handleItemClick"
|
||||
>
|
||||
</g-panel-form-item>
|
||||
</view>
|
||||
<!-- <view class="g_mt_24" >
|
||||
<g-button btnText="保存" type="primary" @clickBtn="save"></g-button>
|
||||
</view> -->
|
||||
|
||||
<u-popup v-model="teamSetShow" mode="bottom" uZindex="9999" height="880" border-radius="12" :mask-close-able="true" width="694rpx">
|
||||
<view class="g_text_c g_fw_600 g_fs_18 g_border_e_b" style="line-height: 56px">切换团队</view>
|
||||
<scroll-view class="g_pb_32 g_fs_16" scroll-y="true" style="height: calc(100% - 92px)">
|
||||
<view class="g_flex_row_between g_p_16 g_border_e_b" hover-class="thover" hover-stop-propagation="true" v-for="(item, index) in teamList" :key="index" @click="toogleTeam(item)">
|
||||
<view class="g_flex_row_between">
|
||||
<view class="f17">{{ item.agencyName }}</view>
|
||||
</view>
|
||||
<view class style="color: #1890ff"> {{ item.checked ? "当前" : "" }}</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</u-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import gEmpty from "@/components/empty.vue";
|
||||
import gPanelFormItem from "@/components/panel/formItem.vue";
|
||||
import unloginInfo from "@/components/unloginInfo.vue";
|
||||
export default {
|
||||
components: {
|
||||
gEmpty,
|
||||
gPanelFormItem,
|
||||
unloginInfo,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isAdmin: uni.getStorageSync("apply-userinfo").admin,
|
||||
userInfo: uni.getStorageSync("apply-userinfo"),
|
||||
teamSetShow: false,
|
||||
teamList: [],
|
||||
companyConfig: [],
|
||||
info: {
|
||||
userName: "",
|
||||
desp: "",
|
||||
},
|
||||
shopImg: [],
|
||||
};
|
||||
},
|
||||
onLoad() {},
|
||||
onShow() {},
|
||||
created() {
|
||||
var that = this;
|
||||
console.log("createdcreatedcreatedcreatedcreatedcreatedcreatedcreatedcreatedcreatedcreatedcreated");
|
||||
uni.$on("changeCompanyDesp", function (data) {
|
||||
console.log("data", data);
|
||||
console.log("changeCompanyDespchangeCompanyDespchangeCompanyDespchangeCompanyDesp");
|
||||
that.getAgencyInfo();
|
||||
});
|
||||
that.resetInfo();
|
||||
that.getTeamList();
|
||||
if (that.userInfo.agencyStatus == 1) {
|
||||
that.getAgencyInfo();
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
save() {
|
||||
let that = this;
|
||||
let subObj = {
|
||||
recordId: that.info.id,
|
||||
fullName: that.info.fullName,
|
||||
logo: that.info.logo,
|
||||
agencyName: that.info.agencyName,
|
||||
desp: that.info.desp,
|
||||
imgs: that.shopImg.map((item) => item.url).join(","),
|
||||
aboutUs: that.info.aboutUs,
|
||||
contactUserName: that.info.contactUserName,
|
||||
contactTel: that.info.contactTel,
|
||||
contactAvatar: that.info.contactAvatar,
|
||||
contactWechatQrcode: that.info.contactWechatQrcode,
|
||||
address: that.info.address,
|
||||
lat: that.info.lat,
|
||||
lng: that.info.lng,
|
||||
district: that.info.district,
|
||||
codeUSC: that.info.codeUSC,
|
||||
registerTel: that.info.registerTel,
|
||||
storeStatus: that.info.storeStatus,
|
||||
bank: that.info.bank,
|
||||
registerAddress: that.info.registerAddress,
|
||||
bankCardNo: that.info.bankCardNo,
|
||||
slogan: that.info.slogan,
|
||||
};
|
||||
this.G.Post("/yishoudan/agency/updageAgencyInfo", subObj, (res) => {
|
||||
console.log("resresresresresres", res);
|
||||
that.getAgencyInfo();
|
||||
});
|
||||
},
|
||||
getAgencyInfo() {
|
||||
let that = this;
|
||||
this.G.Get(this.api.login_agencyInfo, {}, (res) => {
|
||||
console.log("resresres", res);
|
||||
that.info = res.agency;
|
||||
if (res.agency.imgs) {
|
||||
let imgList = res.agency.imgs.split(",");
|
||||
that.shopImg = imgList.map((item) => {
|
||||
return {
|
||||
url: item,
|
||||
};
|
||||
});
|
||||
}
|
||||
that.resetInfo();
|
||||
});
|
||||
},
|
||||
resetInfo() {
|
||||
let that = this;
|
||||
that.companyConfig = [
|
||||
{
|
||||
icon: "",
|
||||
label: "企业头像",
|
||||
value: that.info.logo,
|
||||
path: "/root/agency/agencyAvatar?label=企业头像&fieldName=logo&value=" + that.info.logo,
|
||||
tip: "avatar",
|
||||
type: "text",
|
||||
fontSize: "16px",
|
||||
radius: 2,
|
||||
pColumn: 19,
|
||||
pRow: 12,
|
||||
require: false,
|
||||
},
|
||||
{
|
||||
icon: "",
|
||||
label: "企业名称",
|
||||
result: that.info.agencyName || "请输入企业名称",
|
||||
value: that.info.agencyName,
|
||||
fontColor: !that.info.agencyName ? "g_c_9" : "g_c_3",
|
||||
path: "/root/person/change?label=企业名称&fieldName=agencyName&value=" + that.info.agencyName,
|
||||
tip: "user-name",
|
||||
placeholder: "请输入企业名称",
|
||||
fontSize: "16px",
|
||||
type: "text",
|
||||
pColumn: 19,
|
||||
pRow: 12,
|
||||
require: false,
|
||||
params: {
|
||||
label: "企业名称",
|
||||
fieldName: "agencyName",
|
||||
},
|
||||
},
|
||||
{
|
||||
icon: "",
|
||||
label: "企业简称",
|
||||
result: that.info.fullName || "请输入企业简称",
|
||||
value: that.info.fullName,
|
||||
fontColor: !that.info.fullName ? "g_c_9" : "g_c_3",
|
||||
path: "/root/person/change?label=企业简称&fieldName=fullName&value=" + that.info.fullName,
|
||||
tip: "user-name",
|
||||
placeholder: "请输入企业简称",
|
||||
fontSize: "16px",
|
||||
type: "text",
|
||||
pColumn: 19,
|
||||
pRow: 12,
|
||||
require: false,
|
||||
params: {
|
||||
label: "企业简称",
|
||||
fieldName: "fullName",
|
||||
},
|
||||
},
|
||||
{
|
||||
icon: "",
|
||||
label: "宣传口号",
|
||||
result: that.info.slogan || "请输入宣传口号",
|
||||
value: that.info.slogan,
|
||||
fontColor: !that.info.slogan ? "g_c_9" : "g_c_3",
|
||||
path: "/root/person/change?label=宣传口号&fieldName=slogan&value=" + that.info.slogan,
|
||||
tip: "user-name",
|
||||
placeholder: "请输入宣传口号",
|
||||
fontSize: "16px",
|
||||
type: "text",
|
||||
pColumn: 19,
|
||||
pRow: 12,
|
||||
require: false,
|
||||
params: {
|
||||
label: "宣传口号",
|
||||
fieldName: "slogan",
|
||||
},
|
||||
},
|
||||
{
|
||||
icon: "",
|
||||
label: "企业地址",
|
||||
result: that.info.address || "请选择企业地址",
|
||||
fontColor: !that.info.address ? "g_c_9" : "g_c_3",
|
||||
path: "/root/person/change?label=企业地址&fieldName=address&value=" + JSON.stringify({ address: that.info.address, lat: that.info.lat, lng: that.info.lng }),
|
||||
tip: "dizhi",
|
||||
placeholder: "请选择企业地址",
|
||||
type: "slot",
|
||||
fontSize: "16px",
|
||||
pColumn: 19,
|
||||
pRow: 12,
|
||||
require: false,
|
||||
suffix: "icon-dizhi1",
|
||||
},
|
||||
|
||||
{
|
||||
icon: "",
|
||||
label: "企业简介",
|
||||
result: that.info.desp || "请输入企业简介",
|
||||
fontColor: !that.info.desp ? "g_c_9" : "g_c_3",
|
||||
// value: that.info.desp || '请输入企业简介',
|
||||
path: "/root/person/change?label=企业简介&fieldName=desp&value=" + that.info.desp,
|
||||
tip: "user-more-word",
|
||||
placeholder: "请输入企业简介",
|
||||
type: "text",
|
||||
fontSize: "16px",
|
||||
pColumn: 19,
|
||||
pRow: 12,
|
||||
params: {
|
||||
label: "企业简介",
|
||||
fieldName: "desp",
|
||||
},
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
handleItemClick(e) {
|
||||
let that = this;
|
||||
uni.navigateTo({
|
||||
url: e.item.path,
|
||||
});
|
||||
// console.log("点击了", item);
|
||||
// if (item.path) {
|
||||
// let url = item.path;
|
||||
// if (item.params) {
|
||||
// let paramsStr = "";
|
||||
// for (let key in item.params) {
|
||||
// if (paramsStr) {
|
||||
// paramsStr += "&";
|
||||
// }
|
||||
// paramsStr += `${key}=${encodeURIComponent(item.params[key])}`;
|
||||
// }
|
||||
// url += `?${paramsStr}`;
|
||||
// }
|
||||
// uni.navigateTo({
|
||||
// url: url,
|
||||
// });
|
||||
// }
|
||||
},
|
||||
|
||||
teamSet() {
|
||||
this.teamSetShow = true;
|
||||
},
|
||||
getTeamList() {
|
||||
let that = this;
|
||||
this.G.Get(this.api.user_getTeamList, {}, (res) => {
|
||||
console.log(res);
|
||||
res.forEach((item) => {
|
||||
if (item.id == that.userInfo.agencyId) {
|
||||
item.checked = true;
|
||||
}
|
||||
});
|
||||
that.teamList = res;
|
||||
});
|
||||
},
|
||||
toogleTeam($item) {
|
||||
let that = this;
|
||||
if (that.userInfo.agencyId == $item.id) {
|
||||
return false;
|
||||
}
|
||||
wx.showLoading({
|
||||
title: "切换中...",
|
||||
});
|
||||
that.G.Get(that.api.user_toggleTeam + `/${$item.id}`, {}, (res) => {
|
||||
uni.setStorageSync("apply-agencyId", $item.id);
|
||||
console.log(res);
|
||||
that.G.checkTokenNew().then(() => {
|
||||
uni.showToast({
|
||||
title: "切换成功",
|
||||
icon: "success",
|
||||
duration: 2000,
|
||||
});
|
||||
that.teamSetShow = false;
|
||||
that.userInfo = uni.getStorageSync("apply-userinfo");
|
||||
uni.$emit("isGlogin", {
|
||||
uid: that.userInfo.user.id,
|
||||
});
|
||||
that.getAgencyInfo();
|
||||
that.getTeamList();
|
||||
that.isAdmin = uni.getStorageSync("apply-userinfo").admin;
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #ededed;
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,154 @@
|
||||
<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='[
|
||||
{
|
||||
icon:"",
|
||||
label:"手机号",
|
||||
result:tel,
|
||||
path:"",
|
||||
tip:"mobile",
|
||||
type:"slot",
|
||||
},
|
||||
{
|
||||
icon:"",
|
||||
label:"验证码",
|
||||
result:"",
|
||||
path:"",
|
||||
tip:"slot-code",
|
||||
value:code,
|
||||
type:"slot",
|
||||
placeholder:"输入验证码",
|
||||
pColumn:12
|
||||
},
|
||||
]'
|
||||
@changeCode="getCode"
|
||||
>
|
||||
</g-panel-form-slot>
|
||||
</view>
|
||||
<view class="">
|
||||
<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-confirm-pwd",
|
||||
value:confirmPwd,
|
||||
type:"slot",
|
||||
placeholder:"再次输入新密码",
|
||||
pColumn:12
|
||||
},
|
||||
]'
|
||||
@changeNewPwd="getNewPwd"
|
||||
@changeConfirmPwd="getConfirmPwd"
|
||||
>
|
||||
</g-panel-form-slot>
|
||||
</view>
|
||||
<view class="g_pt_90 g_flex_row_center">
|
||||
<g-button btnText='修改密码' type='primary' @clickBtn='submitForm' />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
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;
|
||||
},
|
||||
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,{
|
||||
tel: uni.getStorageSync("apply-tel"),
|
||||
code: that.code,
|
||||
password: that.newPwd
|
||||
},()=>{
|
||||
uni.showToast({
|
||||
title:'修改成功',
|
||||
icon:'success'
|
||||
})
|
||||
setTimeout(()=>{
|
||||
that.G.Get(that.api.login_out,{},()=>{
|
||||
that.G.clearLocalStorage();
|
||||
let params = {
|
||||
path:'',
|
||||
level:"",
|
||||
}
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/index?' + that.G.objToStr(params)
|
||||
});
|
||||
})
|
||||
},1500)
|
||||
})
|
||||
},
|
||||
goPage(){
|
||||
uni.navigateTo({
|
||||
url:'/root/person/pwdForget'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
Loading…
Reference in New Issue