yujialong 11 months ago
parent ccf21096c2
commit 47ee20af77
  1. 3
      src/api/index.js
  2. 2
      src/pages/miniProgramMg/index/banner/add/index.vue
  3. 4
      src/pages/miniProgramMg/index/banner/list/index.vue
  4. 4
      src/pages/miniProgramMg/index/hot/add/index.vue
  5. 4
      src/pages/miniProgramMg/index/hot/list/index.vue
  6. 84
      src/pages/miniProgramMg/index/inlet/index.vue
  7. 62
      src/pages/setting/list/index.vue
  8. 245
      src/pages/setting/list/info.vue
  9. 4
      src/pages/user/detail/index.vue

@ -8,6 +8,9 @@ export default {
verification: `${host}users/users/user/captcha`, verification: `${host}users/users/user/captcha`,
sendPhoneOrEmailCode: `users/users/userAccount/sendPhoneOrEmailCode`, sendPhoneOrEmailCode: `users/users/userAccount/sendPhoneOrEmailCode`,
queryUserInfoDetails: `users/users/userAccount/queryUserInfoDetails`,
updatePersonCenter: `users/users/userAccount/updatePersonCenter`,
updateUserAvatars: `${host}users/users/userAccount/updateUserAvatars`,
queryProvince: `nakadai/nakadai/province/queryProvince`, queryProvince: `nakadai/nakadai/province/queryProvince`,
queryCity: `nakadai/nakadai/city/queryCity`, queryCity: `nakadai/nakadai/city/queryCity`,

@ -79,7 +79,7 @@
<el-button @click="save(0)">保存</el-button> <el-button @click="save(0)">保存</el-button>
<el-button type="primary" <el-button type="primary"
@click="save(1)">发布</el-button> @click="save(1)">发布</el-button>
<el-button @click="$router.back()">取消</el-button> <el-button @click="$emit('closeDia')">取消</el-button>
</div> </div>
</div> </div>
</template> </template>

@ -83,11 +83,11 @@ export default {
this.$store.commit('user/setCrumbs', [ this.$store.commit('user/setCrumbs', [
{ {
name: '小程序管理', name: '小程序管理',
path: '/miniProgramMg/index' route: '/miniProgramMg'
}, },
{ {
name: '首页设置', name: '首页设置',
path: '/miniProgramMg/banner' route: '/miniProgramMg'
}, },
{ {
name: '设置banner', name: '设置banner',

@ -93,7 +93,7 @@
<el-button @click="save(0)">保存</el-button> <el-button @click="save(0)">保存</el-button>
<el-button type="primary" <el-button type="primary"
@click="save(1)">发布</el-button> @click="save(1)">发布</el-button>
<el-button @click="$router.back()">取消</el-button> <el-button @click="$emit('closeDia')">取消</el-button>
</div> </div>
</div> </div>
</template> </template>
@ -237,7 +237,7 @@ export default {
beforeRemove (file, fileList) { beforeRemove (file, fileList) {
return this.$confirm(`确定移除 ${file.name}`); return this.$confirm(`确定移除 ${file.name}`);
}, },
handleRemove () { handleRemove (file, fileList) {
Oss.del(file.url) Oss.del(file.url)
this.pics = fileList this.pics = fileList
}, },

@ -105,11 +105,11 @@ export default {
this.$store.commit('user/setCrumbs', [ this.$store.commit('user/setCrumbs', [
{ {
name: '小程序管理', name: '小程序管理',
path: '/miniProgramMg/index' route: '/miniProgramMg'
}, },
{ {
name: '首页设置', name: '首页设置',
path: '/miniProgramMg/hot' route: '/miniProgramMg'
}, },
{ {
name: '设置爆款', name: '设置爆款',

@ -15,15 +15,67 @@
<div class="cover" <div class="cover"
@click="toSet(0)">设置爆款</div> @click="toSet(0)">设置爆款</div>
</div> </div>
<div class="activity">
<h6>活动速递</h6>
<el-tabs v-model="active">
<el-tab-pane v-for="(item, i) in tabs"
:key="i"
:label="item.name"
:name="item.id"></el-tab-pane>
</el-tabs>
<ul class="list">
<li>
<img class="pic"
src="http://124.71.79.122/images/miniProgram/supplier-banner.jpg"
alt="">
<div class="texts">
<p class="name">中国幼教年会西部峰会</p>
<p class="meta">报名时间2024-01-11 23:00</p>
<p class="meta">主办方中国幼教</p>
</div>
</li>
</ul>
</div>
</div> </div>
</template> </template>
<script> <script>
import Setting from "@/setting";
export default { export default {
data () { data () {
return { return {
tabs: [
{
id: '',
name: '全部'
},
{
id: 1,
name: '会议'
},
{
id: 2,
name: '论坛'
},
{
id: 3,
name: '讲座'
},
{
id: 4,
name: '展会'
},
// {
// id: 5,
// name: ''
// },
// {
// id: 6,
// name: ''
// },
],
active: '',
}; };
}, },
mounted () { mounted () {
@ -49,6 +101,34 @@ export default {
@import '../../../../styles/page/page.scss'; @import '../../../../styles/page/page.scss';
.page { .page {
width: 400px; width: 400px;
height: 560px;
min-height: 580px !important;
margin: 0 auto; margin: 0 auto;
} }
.activity {
margin-top: 20px;
h6 {
font-size: 20px;
}
.list {
li {
display: flex;
}
.pic {
width: 140px;
height: 90px;
margin-right: 10px;
border-radius: 8px;
}
.name {
font-size: 16px;
font-weight: 600;
}
.meta {
margin: 5px 0;
font-size: 12px;
color: #999;
}
}
}
</style> </style>

@ -3,20 +3,32 @@
<div class="left"> <div class="left">
<div class="inner"> <div class="inner">
<div class="text-center"> <div class="text-center">
<img :src="avatar" class="avatar" /> <img :src="avatar"
<el-upload :action="this.api.updateUserAvatars" name="file" :data="{ userId }" :limit="10" :show-file-list="false" :headers="headers" :on-success="changeAvatar"> class="avatar" />
<el-button type="text" size="small">点击更换头像</el-button> <el-upload :action="this.api.updateUserAvatars"
name="file"
:limit="10"
:show-file-list="false"
:headers="headers"
:on-success="changeAvatar">
<el-button type="text"
size="small">点击更换头像</el-button>
</el-upload> </el-upload>
</div> </div>
<ul class="menu"> <ul class="menu">
<li v-for="item in typeList" :key="item.index" :class="{active: item.index == active}"> <li v-for="item in typeList"
:key="item.index"
:class="{active: item.index == active}">
{{ item.title }} {{ item.title }}
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
<info class="flex-1" ref="info" @updateStatus="updateStatus" @back="back"></info> <info class="flex-1"
ref="info"
@updateStatus="updateStatus"
@back="back"></info>
</div> </div>
</template> </template>
@ -26,7 +38,7 @@ import Setting from '@/setting'
import util from '@/libs/util' import util from '@/libs/util'
import info from './info' import info from './info'
export default { export default {
data() { data () {
return { return {
headers: { headers: {
token: util.local.get(Setting.tokenKey) token: util.local.get(Setting.tokenKey)
@ -44,12 +56,12 @@ export default {
components: { info }, components: { info },
computed: { computed: {
...mapState('user', [ ...mapState('user', [
'avatar', 'userId' 'avatar'
]), ]),
}, },
// , // ,
beforeRouteLeave(to, from, next) { beforeRouteLeave (to, from, next) {
if(this.edited){ if (this.edited) {
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', { this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
@ -58,26 +70,26 @@ export default {
}).catch(() => { }).catch(() => {
next() next()
}) })
}else{ } else {
next() next()
} }
}, },
mounted() { mounted () {
}, },
methods: { methods: {
...mapMutations('user', [ ...mapMutations('user', [
'setAvatar' 'setAvatar'
]), ]),
changeAvatar(res) { changeAvatar (res) {
this.setAvatar(res.data) this.setAvatar(res.message)
}, },
updateStatus(status){ updateStatus (status) {
this.edited = status this.edited = status
}, },
// //
back() { back () {
if(this.edited){ if (this.edited) {
this.edited = false this.edited = false
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', { this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning' type: 'warning'
@ -87,7 +99,7 @@ export default {
}).catch(() => { }).catch(() => {
this.$router.back() this.$router.back()
}) })
}else{ } else {
this.$router.back() this.$router.back()
} }
} }
@ -96,31 +108,31 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.main{ .main {
display: flex; display: flex;
margin: 0 auto; margin: 0 auto;
.left{ .left {
margin-right: 12px; margin-right: 12px;
background-color: #fff; background-color: #fff;
box-shadow: 2px 0px 6px 0px #EEEEEE; box-shadow: 2px 0px 6px 0px #eeeeee;
.inner{ .inner {
width: 170px; width: 170px;
padding: 20px 0; padding: 20px 0;
} }
.avatar{ .avatar {
width: 80px; width: 80px;
height: 80px; height: 80px;
border-radius: 50%; border-radius: 50%;
} }
.menu{ .menu {
margin-top: 32px; margin-top: 32px;
li{ li {
padding: 0 20px; padding: 0 20px;
color: #303133; color: #303133;
font-size: 14px; font-size: 14px;
line-height: 38px; line-height: 38px;
cursor: pointer; cursor: pointer;
&.active{ &.active {
color: #fff; color: #fff;
background-color: $main-color; background-color: $main-color;
} }

@ -1,127 +1,195 @@
<template> <template>
<div class="relative" v-loading="loading"> <div class="relative"
v-loading="loading">
<div class="page"> <div class="page">
<h6 class="l-title"><img src="@/assets/images/info1.png" alt=""> 基本信息</h6> <h6 class="l-title"><img src="@/assets/images/info1.png"
alt=""> 基本信息</h6>
<div class="page-content"> <div class="page-content">
<ul class="list"> <ul class="list">
<li> <li>
<label>姓名</label> <label>姓名</label>
<el-input placeholder="请输入姓名" type="text" v-model="form.realName" /> <el-input placeholder="请输入姓名"
type="text"
v-model="form.hrUserInfo.userName" />
</li> </li>
<li> <li>
<label>性别</label> <label>性别</label>
<el-select size="small" v-model="form.sex"> <el-select size="small"
<el-option v-for="item in sexList" :key="item.value" :label="item.name" :value="item.value"></el-option> v-model="form.hrUserInfo.sex">
<el-option v-for="item in sexList"
:key="item.value"
:label="item.name"
:value="item.value"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>账号</label> <label>账号</label>
<el-input class="m-r-10" type="text" size="small" v-model="form.username"></el-input> <el-input class="m-r-10"
type="text"
size="small"
v-model="form.userAccount.account"></el-input>
<!-- <el-button type="text" size="small" @click="showAccount">修改</el-button> --> <!-- <el-button type="text" size="small" @click="showAccount">修改</el-button> -->
</li> </li>
<li> <li>
<label>工号</label> <label>工号</label>
<el-input size="small" v-model="form.jobNumber" clearable></el-input> <el-input size="small"
v-model="form.userAccount.workNumber"
clearable></el-input>
</li> </li>
<li> <li>
<label>邮箱</label> <label>邮箱</label>
<el-input class="m-r-10" size="small" v-model="form.email"></el-input> <el-input class="m-r-10"
size="small"
v-model="form.hrUserInfo.email"></el-input>
<!-- <el-button v-if="form.email" type="text" size="small" @click="bindEmail">更换</el-button> <!-- <el-button v-if="form.email" type="text" size="small" @click="bindEmail">更换</el-button>
<el-button v-else type="text" size="small" @click="bindEmail">添加</el-button> --> <el-button v-else type="text" size="small" @click="bindEmail">添加</el-button> -->
</li> </li>
<li> <li>
<label>手机号</label> <label>手机号</label>
<el-input class="m-r-10" type="text" size="small" maxlength="11" v-model="form.phone"></el-input> <el-input class="m-r-10"
type="text"
size="small"
maxlength="11"
v-model="form.hrUserInfo.phone"></el-input>
<!-- <el-button type="text" size="small" @click="bindPhone">{{ form.phone ? '更换' : '绑定' }}</el-button> <!-- <el-button type="text" size="small" @click="bindPhone">{{ form.phone ? '更换' : '绑定' }}</el-button>
<el-button v-if="form.phone" type="text" size="small" @click="unbind">解绑</el-button> --> <el-button v-if="form.phone" type="text" size="small" @click="unbind">解绑</el-button> -->
</li> </li>
<li> <li>
<label>密码</label> <label>密码</label>
<el-input class="m-r-10" size="small" value="******" disabled></el-input> <el-input class="m-r-10"
<el-button type="text" size="small" @click="bindPassword">修改</el-button> size="small"
value="******"
disabled></el-input>
<el-button type="text"
size="small"
@click="bindPassword">修改</el-button>
</li> </li>
</ul> </ul>
</div> </div>
<div class="btn-wrap"> <div class="btn-wrap">
<el-button size="small" v-throttle @click="$emit('back')">取消</el-button> <el-button size="small"
<el-button type="primary" size="small" v-throttle @click="submit">更新</el-button> v-throttle
@click="$emit('back')">取消</el-button>
<el-button type="primary"
size="small"
v-throttle
@click="submit">更新</el-button>
</div> </div>
</div> </div>
<el-dialog <el-dialog :title="form.email ? '更换邮箱' : '绑定邮箱'"
:title="form.email ? '更换邮箱' : '绑定邮箱'"
:visible.sync="emailVisible" :visible.sync="emailVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
@close="closeEmail" @close="closeEmail"
width="30%"> width="30%">
<el-form ref="form" :model="form" label-width="60px"> <el-form ref="form"
:model="form"
label-width="60px">
<el-form-item label="邮箱"> <el-form-item label="邮箱">
<el-input placeholder="请输入邮箱" v-model="email"></el-input> <el-input placeholder="请输入邮箱"
v-model="email"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="验证码"> <el-form-item label="验证码">
<div class="flex-between"> <div class="flex-between">
<el-input v-model="emailCode" placeholder="请输入验证码" maxlength="6"></el-input> <el-input v-model="emailCode"
<el-button style="margin-left: 10px" type="text" @click="sendEmailCode" :disabled="emailDisabled">{{ emailBtnText }}</el-button> placeholder="请输入验证码"
maxlength="6"></el-input>
<el-button style="margin-left: 10px"
type="text"
@click="sendEmailCode"
:disabled="emailDisabled">{{ emailBtnText }}</el-button>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer"
class="dialog-footer">
<el-button @click="emailVisible = false"> </el-button> <el-button @click="emailVisible = false"> </el-button>
<el-button type="primary" @click="emailSubmit"> </el-button> <el-button type="primary"
@click="emailSubmit"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog <el-dialog :title="form.phone ? '更换手机号' : '绑定手机号'"
:title="form.phone ? '更换手机号' : '绑定手机号'"
:visible.sync="phoneVisible" :visible.sync="phoneVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
@close="closePhone" @close="closePhone"
width="30%"> width="30%">
<el-form ref="form" :model="form" label-width="60px"> <el-form ref="form"
:model="form"
label-width="60px">
<el-form-item label="手机号"> <el-form-item label="手机号">
<el-input style="width: 404px;" placeholder="请输入手机号" v-model="phone" maxlength="11"></el-input> <el-input style="width: 404px;"
placeholder="请输入手机号"
v-model="phone"
maxlength="11"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="验证码"> <el-form-item label="验证码">
<div class="flex-between"> <div class="flex-between">
<el-input v-model="phoneCode" placeholder="请输入验证码" maxlength="6"></el-input> <el-input v-model="phoneCode"
<el-button style="margin-left: 10px" type="text" @click="sendPhoneCode" :disabled="phoneDisabled">{{ phoneBtnText }}</el-button> placeholder="请输入验证码"
maxlength="6"></el-input>
<el-button style="margin-left: 10px"
type="text"
@click="sendPhoneCode"
:disabled="phoneDisabled">{{ phoneBtnText }}</el-button>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer"
class="dialog-footer">
<el-button @click="phoneVisible = false"> </el-button> <el-button @click="phoneVisible = false"> </el-button>
<el-button type="primary" @click="phoneSubmit"> </el-button> <el-button type="primary"
@click="phoneSubmit"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog <el-dialog title="更换密码"
title="更换密码"
:visible.sync="pwdVisible" :visible.sync="pwdVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
@close="closePassword" @close="closePassword"
width="30%"> width="30%">
<el-form ref="pwdForm" :model="form" label-width="60px"> <el-form ref="pwdForm"
:model="form"
label-width="60px">
<el-form-item label="原密码"> <el-form-item label="原密码">
<el-input type="password" v-model="pwdForm.password" placeholder="请输入原密码"></el-input> <el-input type="password"
v-model="pwdForm.password"
placeholder="请输入原密码"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="新密码"> <el-form-item label="新密码">
<el-input type="password" v-model="pwdForm.newPassword" placeholder="请输入新密码" @keyup.enter.native="editPassword"></el-input> <el-input type="password"
v-model="pwdForm.newPassword"
placeholder="请输入新密码"
@keyup.enter.native="editPassword"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="新密码"> <el-form-item label="新密码">
<el-input type="password" v-model="pwdForm.reNewPassword" placeholder="请确认新密码" @keyup.enter.native="editPassword"></el-input> <el-input type="password"
v-model="pwdForm.reNewPassword"
placeholder="请确认新密码"
@keyup.enter.native="editPassword"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer"
class="dialog-footer">
<el-button @click="pwdVisible = false"> </el-button> <el-button @click="pwdVisible = false"> </el-button>
<el-button type="primary" @click="editPassword"> </el-button> <el-button type="primary"
@click="editPassword"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="修改账号" :visible.sync="accountVisible" :close-on-click-modal="false" width="30%"> <el-dialog title="修改账号"
:visible.sync="accountVisible"
:close-on-click-modal="false"
width="30%">
<el-form label-width="70px"> <el-form label-width="70px">
<el-form-item label="账号"> <el-form-item label="账号">
<el-input v-model="editUsername" placeholder="请输入账号"></el-input> <el-input v-model="editUsername"
placeholder="请输入账号"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer"
<el-button size="small" @click="accountVisible = false"> </el-button> class="dialog-footer">
<el-button size="small" type="primary" @click="confirmAccount"> </el-button> <el-button size="small"
@click="accountVisible = false"> </el-button>
<el-button size="small"
type="primary"
@click="confirmAccount"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -132,7 +200,7 @@ import Setting from '@/setting'
import util from '@/libs/util' import util from '@/libs/util'
import { mapState, mapMutations } from 'vuex' import { mapState, mapMutations } from 'vuex'
export default { export default {
data() { data () {
return { return {
loading: false, loading: false,
editUsername: '', editUsername: '',
@ -140,6 +208,8 @@ export default {
updateTime: 0, updateTime: 0,
token: util.local.get(Setting.tokenKey), token: util.local.get(Setting.tokenKey),
form: { form: {
hrUserInfo: {},
userAccount: {},
userName: "", userName: "",
name: "", name: "",
jobNumber: "", jobNumber: "",
@ -191,14 +261,14 @@ export default {
watch: { watch: {
// , // ,
form: { form: {
handler(){ handler () {
this.updateTime++ this.updateTime++
if(this.updateTime > 1) this.$emit('updateStatus', this.updateTime > 1) if (this.updateTime > 1) this.$emit('updateStatus', this.updateTime > 1)
}, },
deep:true deep: true
} }
}, },
mounted() { mounted () {
this.getData() this.getData()
}, },
methods: { methods: {
@ -206,19 +276,19 @@ export default {
'setUserName' 'setUserName'
]), ]),
// //
getData() { getData () {
this.loading = true this.loading = true
this.$get(`${this.api.user}/${this.userId}`).then(({ data }) => { this.$get(this.api.queryUserInfoDetails).then(({ result }) => {
this.form = data this.form = result
this.loading = false this.loading = false
}).catch(err => {}) }).catch(err => { })
}, },
// //
showAccount() { showAccount () {
this.accountVisible = true this.accountVisible = true
}, },
// //
confirmAccount() { confirmAccount () {
if (this.editUsername) { if (this.editUsername) {
form.username = this.editUsername form.username = this.editUsername
this.accountVisible = false this.accountVisible = false
@ -226,34 +296,34 @@ export default {
this.$put(this.api.user, form).then(res => { this.$put(this.api.user, form).then(res => {
this.setUserName(form.username) this.setUserName(form.username)
this.$message.success("提交成功!") this.$message.success("提交成功!")
}).catch(res => {}) }).catch(res => { })
} else { } else {
util.errorMsg('请输入账号') util.errorMsg('请输入账号')
} }
}, },
bindEmail() { bindEmail () {
this.email = this.form.email this.email = this.form.email
this.emailVisible = true this.emailVisible = true
}, },
bindPhone() { bindPhone () {
this.phone = this.form.phone this.phone = this.form.phone
this.phoneVisible = true this.phoneVisible = true
}, },
// //
unbind() { unbind () {
this.$confirm('确定要解绑该手机号吗?', '提示', { this.$confirm('确定要解绑该手机号吗?', '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$get(this.api.unbindMobilePhone).then(res => { this.$get(this.api.unbindMobilePhone).then(res => {
this.$message.success('解绑成功') this.$message.success('解绑成功')
this.getData() this.getData()
}).catch(res => {}) }).catch(res => { })
}).catch(() => {}) }).catch(() => { })
}, },
bindPassword() { bindPassword () {
this.pwdVisible = true this.pwdVisible = true
}, },
editPassword() { editPassword () {
const data = this.pwdForm const data = this.pwdForm
if (!data.password) return util.warningMsg("请输入原密码") if (!data.password) return util.warningMsg("请输入原密码")
if (!data.newPassword) return util.warningMsg("请输入新密码") if (!data.newPassword) return util.warningMsg("请输入新密码")
@ -268,32 +338,24 @@ export default {
}).then(res => { }).then(res => {
util.successMsg("更换成功") util.successMsg("更换成功")
this.pwdVisible = false this.pwdVisible = false
}).catch(err => {}) }).catch(err => { })
}, },
closePassword() { closePassword () {
this.pwdForm = { this.pwdForm = {
password: "", password: "",
newPassword: "", newPassword: "",
reNewPassword: "" reNewPassword: ""
} }
}, },
submit() { submit () {
const { form } = this const { form } = this
this.$put(this.api.user, { this.$post(this.api.updatePersonCenter, this.form).then(res => {
id: form.id,
jobNumber: form.jobNumber,
phone: form.phone,
realName: form.realName,
username: form.username,
email: form.email,
sex: form.sex,
}).then(res => {
this.$emit('updateStatus', false) this.$emit('updateStatus', false)
this.setUserName(form.realName) this.setUserName(form.hrUserInfo.userName)
this.$message.success("提交成功!") this.$message.success("提交成功!")
}).catch(res => {}) }).catch(res => { })
}, },
emailCountdown() { emailCountdown () {
let count = 60; let count = 60;
if (!this.emailTimer) { if (!this.emailTimer) {
this.emailDisabled = true; this.emailDisabled = true;
@ -311,7 +373,7 @@ export default {
}, 1000); }, 1000);
} }
}, },
phoneCountdown() { phoneCountdown () {
let count = 60; let count = 60;
if (!this.phoneTimer) { if (!this.phoneTimer) {
this.phoneDisabled = true; this.phoneDisabled = true;
@ -329,12 +391,12 @@ export default {
}, 1000); }, 1000);
} }
}, },
closeEmail() { closeEmail () {
if (!this.emailDisabled) { if (!this.emailDisabled) {
this.emailCode = ""; this.emailCode = "";
} }
}, },
sendEmailCode() { sendEmailCode () {
if (!this.email) return util.warningMsg("请输入邮箱") if (!this.email) return util.warningMsg("请输入邮箱")
if (!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return util.warningMsg("请输入正确的邮箱") if (!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return util.warningMsg("请输入正确的邮箱")
this.$post(this.api.sendPhoneOrEmailCode, { this.$post(this.api.sendPhoneOrEmailCode, {
@ -347,9 +409,9 @@ export default {
} else { } else {
util.errorMsg(res.message); util.errorMsg(res.message);
} }
}).catch(res => {}) }).catch(res => { })
}, },
emailSubmit() { emailSubmit () {
if (!this.email) return util.warningMsg("请输入邮箱") if (!this.email) return util.warningMsg("请输入邮箱")
if (!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return util.warningMsg("请输入正确的邮箱") if (!/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(this.email)) return util.warningMsg("请输入正确的邮箱")
if (!this.emailCode) return util.warningMsg("请输入验证码") if (!this.emailCode) return util.warningMsg("请输入验证码")
@ -363,14 +425,14 @@ export default {
util.successMsg("绑定成功") util.successMsg("绑定成功")
this.form.email = this.email this.form.email = this.email
this.emailVisible = false this.emailVisible = false
}).catch(res => {}) }).catch(res => { })
}, },
closePhone() { closePhone () {
if (!this.emailDisabled) { if (!this.emailDisabled) {
this.emailCode = ""; this.emailCode = "";
} }
}, },
sendPhoneCode() { sendPhoneCode () {
if (!this.phone) return util.warningMsg("请输入手机号"); if (!this.phone) return util.warningMsg("请输入手机号");
if (!/^1[3456789]\d{9}$/.test(this.phone)) return util.warningMsg("请输入正确的手机号"); if (!/^1[3456789]\d{9}$/.test(this.phone)) return util.warningMsg("请输入正确的手机号");
let data = { let data = {
@ -388,7 +450,7 @@ export default {
}).catch(res => { }).catch(res => {
}); });
}, },
phoneSubmit() { phoneSubmit () {
if (!this.phone) return util.warningMsg("请输入手机号"); if (!this.phone) return util.warningMsg("请输入手机号");
if (!/^1[3456789]\d{9}$/.test(this.phone)) return util.warningMsg("请输入正确的手机号"); if (!/^1[3456789]\d{9}$/.test(this.phone)) return util.warningMsg("请输入正确的手机号");
if (!this.phoneCode) return util.warningMsg("请输入验证码"); if (!this.phoneCode) return util.warningMsg("请输入验证码");
@ -424,22 +486,23 @@ export default {
margin-right: 5px; margin-right: 5px;
} }
} }
.list{ .list {
.line { .line {
display: flex; display: flex;
margin-bottom: 24px; margin-bottom: 24px;
} }
.el-input, .el-select { .el-input,
.el-select {
width: 220px; width: 220px;
.el-input__inner{ .el-input__inner {
border-color: #CACFDB; border-color: #cacfdb;
} }
} }
li { li {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 20px; margin-bottom: 20px;
&>label { & > label {
width: 100px; width: 100px;
margin-right: 5px; margin-right: 5px;
text-align: right; text-align: right;
@ -465,7 +528,7 @@ export default {
padding: 12px 0; padding: 12px 0;
text-align: center; text-align: center;
background-color: #fff; background-color: #fff;
.el-button{ .el-button {
width: 80px; width: 80px;
} }
} }

@ -20,7 +20,7 @@
maxlength="11"></el-input> maxlength="11"></el-input>
</el-form-item> </el-form-item>
</div> </div>
<el-form-item label="用户名称"> <el-form-item label="组织名称">
<el-input v-model="item.account" <el-input v-model="item.account"
placeholder="请输入用户名称"></el-input> placeholder="请输入用户名称"></el-input>
</el-form-item> </el-form-item>
@ -71,7 +71,7 @@
</div> </div>
<div class="page"> <div class="page">
<p class="l-title">已绑定的平台和用户信息</p> <p class="l-title">已绑定的组织信息</p>
<el-table :data="platformList" <el-table :data="platformList"
class="table" class="table"
stripe stripe

Loading…
Cancel
Save