feat: 5.21 update
This commit is contained in:
parent
7047232930
commit
736adae554
@ -1,2 +1,2 @@
|
|||||||
VITE_API_URL = "https://m.taigurun.cn"
|
VITE_API_URL = "https://m.taigurun.cn"
|
||||||
VITE_OSS_URL = "https://m.taigurun.cn"
|
VITE_OSS_URL = "https://m.taigurun.cn/uploads"
|
||||||
@ -1,2 +1,2 @@
|
|||||||
VITE_API_URL = "https://m.taigurun.cn"
|
VITE_API_URL = "https://m.taigurun.cn"
|
||||||
VITE_OSS_URL = "https://m.taigurun.cn"
|
VITE_OSS_URL = "https://m.taigurun.cn/uploads"
|
||||||
@ -101,7 +101,7 @@ export default {
|
|||||||
this.$showConfirmDialog({
|
this.$showConfirmDialog({
|
||||||
title: "确认退出?",
|
title: "确认退出?",
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$ls.remove('token');
|
this.$ls.remove('member_token');
|
||||||
location.replace('#/Login');
|
location.replace('#/Login');
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
location.reload();
|
location.reload();
|
||||||
|
|||||||
19
src/main.js
19
src/main.js
@ -53,9 +53,24 @@ datadicStore.init()
|
|||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
|
|
||||||
|
// 全局前置守卫
|
||||||
|
router.beforeEach((to, from, next) => {
|
||||||
|
if (to.meta.title) {
|
||||||
|
document.title = to.meta.title;
|
||||||
|
}
|
||||||
|
if (to.meta.noLogin) {
|
||||||
|
return next();
|
||||||
|
}
|
||||||
|
const isLogin = userStore.isLogin;
|
||||||
|
if (!isLogin) {
|
||||||
|
return next({ name: 'Login', query: { redirect: to.fullPath } });
|
||||||
|
}
|
||||||
|
next();
|
||||||
|
});
|
||||||
|
|
||||||
app.config.globalProperties.$datadic = {
|
app.config.globalProperties.$datadic = {
|
||||||
get: (code) => dictCache[code] || null,
|
get: (code) => dictCache[code] || null,
|
||||||
getContent: (code) => dictCache[code] ? dictCache[code].contents : '',
|
getContent: (code) => dictCache[code] ? dictCache[code].contents : '',
|
||||||
}
|
}
|
||||||
|
|
||||||
app.config.globalProperties.$userInfo = userStore.getUserInfo;
|
app.config.globalProperties.$userInfo = userStore.getUserInfo;
|
||||||
|
|||||||
@ -30,7 +30,7 @@ const routes = [
|
|||||||
path: '/My',
|
path: '/My',
|
||||||
name: 'My',
|
name: 'My',
|
||||||
component: () => import('./views/User/My.vue'),
|
component: () => import('./views/User/My.vue'),
|
||||||
meta: { title: '我的' }
|
meta: { title: '我的', cache: true }
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
meta: { noLogin: true }
|
meta: { noLogin: true }
|
||||||
@ -176,31 +176,31 @@ const routes = [
|
|||||||
path: '/Business_School',
|
path: '/Business_School',
|
||||||
name: 'Business_School',
|
name: 'Business_School',
|
||||||
component: () => import('./views/Platform/Business_School.vue'),
|
component: () => import('./views/Platform/Business_School.vue'),
|
||||||
meta: { title: '商学院' }
|
meta: { title: '商学院', noLogin: true, }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/School_detail',
|
path: '/School_detail',
|
||||||
name: 'School_detail',
|
name: 'School_detail',
|
||||||
component: () => import('./views/Platform/School_Detail.vue'),
|
component: () => import('./views/Platform/School_Detail.vue'),
|
||||||
meta: { title: '商学院详情' }
|
meta: { title: '商学院详情', noLogin: true, }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/School_Category',
|
path: '/School_Category',
|
||||||
name: 'School_Category',
|
name: 'School_Category',
|
||||||
component: () => import('./views/Platform/School_Category.vue'),
|
component: () => import('./views/Platform/School_Category.vue'),
|
||||||
meta: { title: '商学院分类' }
|
meta: { title: '商学院分类', noLogin: true, }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/Column',
|
path: '/Column',
|
||||||
name: 'Column',
|
name: 'Column',
|
||||||
component: () => import('./views/Platform/Column.vue'),
|
component: () => import('./views/Platform/Column.vue'),
|
||||||
meta: { title: '栏目列表' }
|
meta: { title: '栏目列表', noLogin: true, }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/ColumnDetail',
|
path: '/ColumnDetail',
|
||||||
name: 'ColumnDetail',
|
name: 'ColumnDetail',
|
||||||
component: () => import('./views/Platform/ColumnDetail.vue'),
|
component: () => import('./views/Platform/ColumnDetail.vue'),
|
||||||
meta: { title: '栏目详情' }
|
meta: { title: '栏目详情', noLogin: true, }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/GoodsDetail',
|
path: '/GoodsDetail',
|
||||||
@ -212,7 +212,7 @@ const routes = [
|
|||||||
path: '/Category',
|
path: '/Category',
|
||||||
name: 'Category',
|
name: 'Category',
|
||||||
component: () => import('./views/Goods/Category.vue'),
|
component: () => import('./views/Goods/Category.vue'),
|
||||||
meta: { title: '全部分类' }
|
meta: { title: '全部分类', noLogin: true, }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/Operations',
|
path: '/Operations',
|
||||||
@ -340,19 +340,3 @@ const router = createRouter({
|
|||||||
})
|
})
|
||||||
|
|
||||||
export default router
|
export default router
|
||||||
|
|
||||||
// 全局前置守卫
|
|
||||||
router.beforeEach((to, from, next) => {
|
|
||||||
const userStore = useUserStore();
|
|
||||||
if (to.meta.title) {
|
|
||||||
document.title = to.meta.title;
|
|
||||||
}
|
|
||||||
if (to.meta.noLogin) {
|
|
||||||
return next();
|
|
||||||
}
|
|
||||||
const isLogin = userStore.isLogin;
|
|
||||||
if (!isLogin) {
|
|
||||||
return next({ name: 'Login', query: { redirect: to.fullPath } });
|
|
||||||
}
|
|
||||||
next();
|
|
||||||
});
|
|
||||||
|
|||||||
@ -134,6 +134,10 @@
|
|||||||
.box-center-center;
|
.box-center-center;
|
||||||
margin-top: 5.6vw;
|
margin-top: 5.6vw;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #f00;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.toLogin {
|
.toLogin {
|
||||||
@ -5058,12 +5062,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.list {
|
.list {
|
||||||
|
.box;
|
||||||
|
.box-tb;
|
||||||
|
.box-align-center;
|
||||||
|
width: 100%;
|
||||||
margin-top: 4vw;
|
margin-top: 4vw;
|
||||||
padding: 0 4vw;
|
padding: 0 4vw;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
.box;
|
.box;
|
||||||
.box-align-center;
|
.box-align-center;
|
||||||
|
width: 100%;
|
||||||
margin-bottom: 4vw;
|
margin-bottom: 4vw;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
|||||||
@ -2303,14 +2303,11 @@ img {
|
|||||||
max-width: 80vw;
|
max-width: 80vw;
|
||||||
max-height: 90vh;
|
max-height: 90vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|
||||||
border-radius: 2.67vw;
|
border-radius: 2.67vw;
|
||||||
|
|
||||||
.share_box {
|
.share_box {
|
||||||
.box;
|
.box;
|
||||||
.box-tb;
|
.box-tb;
|
||||||
.box-align-center;
|
|
||||||
.box-pack-center;
|
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 6.8vw 9.2vw;
|
padding: 6.8vw 9.2vw;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -2321,21 +2318,35 @@ img {
|
|||||||
border-radius: 2.67vw;
|
border-radius: 2.67vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
.logo {
|
|
||||||
width: 18.93vw;
|
|
||||||
height: 22.27vw;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bottom_box {
|
.bottom_box {
|
||||||
.box;
|
.box;
|
||||||
.box-align-center;
|
.box-align-center;
|
||||||
.box-pack-around;
|
.box-pack-around;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
padding: 3.33vw 0;
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
width: 18.93vw;
|
||||||
|
height: 22.27vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qrcode {
|
||||||
|
.box;
|
||||||
|
.box-tb;
|
||||||
|
.box-align-center;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 17.07vw;
|
||||||
|
height: 17.07vw;
|
||||||
|
margin-bottom: 1.2vw;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.share_userinfo {
|
.share_userinfo {
|
||||||
.box;
|
.box;
|
||||||
.box-align-center;
|
.box-align-center;
|
||||||
|
margin: 0 auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
@ -2357,7 +2368,7 @@ img {
|
|||||||
// padding: 1.2vw 4vw 6vw;
|
// padding: 1.2vw 4vw 6vw;
|
||||||
padding-left: 6vw;
|
padding-left: 6vw;
|
||||||
padding-right: 4vw;
|
padding-right: 4vw;
|
||||||
margin-left: -3.33vw;
|
margin-left: -4.33vw;
|
||||||
height: 8vw;
|
height: 8vw;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
@ -2412,20 +2423,6 @@ img {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.qrcode {
|
|
||||||
.box;
|
|
||||||
.box-tb;
|
|
||||||
.box-align-center;
|
|
||||||
margin-top: 3.33vw;
|
|
||||||
padding-bottom: 3vw;
|
|
||||||
|
|
||||||
img {
|
|
||||||
width: 17.07vw;
|
|
||||||
height: 17.07vw;
|
|
||||||
margin-bottom: 1.2vw;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.share_result {
|
.share_result {
|
||||||
// margin-top: 4vw;
|
// margin-top: 4vw;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@ -161,7 +161,7 @@ a {
|
|||||||
.box {
|
.box {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
flex-shrink: 0;
|
// flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*从左至右*/
|
/*从左至右*/
|
||||||
|
|||||||
@ -83,7 +83,7 @@
|
|||||||
<span>邀请人</span>
|
<span>邀请人</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="input_box">
|
<div class="input_box">
|
||||||
<input type="text" placeholder="请填写邀请人账号(选填)" v-model="formData.Recommend" />
|
<input type="text" maxlength="11" placeholder="请填写邀请人账号(选填)" v-model="formData.Recommend" />
|
||||||
<van-icon v-if="formData.Recommend" @click="formData.Recommend = ''" name="cross" size="5vw"></van-icon>
|
<van-icon v-if="formData.Recommend" @click="formData.Recommend = ''" name="cross" size="5vw"></van-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -314,10 +314,10 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 验证用户输入的验证码与接口返回的是否一致
|
// 验证用户输入的验证码与接口返回的是否一致
|
||||||
if (this.formData.SmsCode !== this.smsCode) {
|
// if (this.formData.SmsCode !== this.smsCode) {
|
||||||
this.$showFailToast?.('验证码错误')
|
// this.$showFailToast?.('验证码错误')
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
if (!this.formData.Password) {
|
if (!this.formData.Password) {
|
||||||
this.$showFailToast?.('请输入密码')
|
this.$showFailToast?.('请输入密码')
|
||||||
return
|
return
|
||||||
@ -335,7 +335,8 @@ export default {
|
|||||||
this.$post('/v1/client/AuthClient/register', {
|
this.$post('/v1/client/AuthClient/register', {
|
||||||
cellphone: this.formData.Phone,
|
cellphone: this.formData.Phone,
|
||||||
userpwd: this.formData.Password,
|
userpwd: this.formData.Password,
|
||||||
pcellphone: this.formData.Recommend
|
pcellphone: this.formData.Recommend,
|
||||||
|
code: this.formData.SmsCode
|
||||||
}).then(data => {
|
}).then(data => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
if (data.status !== 200) {
|
if (data.status !== 200) {
|
||||||
|
|||||||
@ -125,8 +125,6 @@
|
|||||||
|
|
||||||
<van-popup v-model:show="show" class="shareimgbox" style="max-width: 80vw;">
|
<van-popup v-model:show="show" class="shareimgbox" style="max-width: 80vw;">
|
||||||
<div class="share_box" id="bsCard">
|
<div class="share_box" id="bsCard">
|
||||||
|
|
||||||
|
|
||||||
<div class="share_userinfo">
|
<div class="share_userinfo">
|
||||||
<img :src="$file($userInfo.userimg)" alt="">
|
<img :src="$file($userInfo.userimg)" alt="">
|
||||||
<div class="name"><span>{{ $userInfo.nickname }}友情推荐</span></div>
|
<div class="name"><span>{{ $userInfo.nickname }}友情推荐</span></div>
|
||||||
|
|||||||
@ -1,9 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<router-view v-slot="{ Component, route }">
|
<router-view v-slot="{ Component, route }">
|
||||||
<keep-alive>
|
<keep-alive :include="cacheList">
|
||||||
<component :is="Component" :key="route.name" v-if="route.meta.cache" />
|
<component :is="Component" :key="route.name" />
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
<component :is="Component" :key="route.name" v-if="!route.meta.cache" />
|
|
||||||
</router-view>
|
</router-view>
|
||||||
<van-tabbar v-model="DefaultActive" placeholder @change="changeActive" active-color="#841e36" inactive-color="#1b1b1b"
|
<van-tabbar v-model="DefaultActive" placeholder @change="changeActive" active-color="#841e36" inactive-color="#1b1b1b"
|
||||||
fixed>
|
fixed>
|
||||||
@ -51,6 +50,12 @@ export default {
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
cacheList() {
|
||||||
|
const routes = this.$router.getRoutes()
|
||||||
|
return routes.filter(r => r.meta.cache).map(r => r.name)
|
||||||
|
}
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$route.path': {
|
'$route.path': {
|
||||||
handler() {
|
handler() {
|
||||||
|
|||||||
@ -91,6 +91,13 @@ export default {
|
|||||||
.content {
|
.content {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
padding: 3.333vw;
|
padding: 3.333vw;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-width: 100%;
|
||||||
|
display: block;
|
||||||
|
margin: 10px auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="index-page">
|
<div class="index-page">
|
||||||
<van-swipe v-if="data && data.Carousel" @change="onSwipe" :autoplay="3000" indicator-color="white">
|
<van-swipe v-if="data && data.Carousel" :autoplay="3000" indicator-color="white">
|
||||||
<van-swipe-item v-for="item in data.Carousel">
|
<van-swipe-item v-for="item in data.Carousel">
|
||||||
<a @click="item.link ? $openUrl(item.Url) : ''"><img :src="$file(item.img) || '/img/avatar.png'"
|
<a @click="item.link ? $openUrl(item.Url) : ''"><img :src="$file(item.img) || '/img/avatar.png'"
|
||||||
width="100%"></a>
|
width="100%"></a>
|
||||||
@ -16,10 +16,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<van-swipe vertical v-bind:touchable="false" class="notice-swipe" style="height: 12vw" :autoplay="3000"
|
<van-swipe vertical v-bind:touchable="false" class="notice-swipe" style="height: 12vw" :autoplay="3000"
|
||||||
v-bind:show-indicators="false">
|
v-bind:show-indicators="false">
|
||||||
<van-swipe-item class="v" style="height: 12vw; line-height: 6vw" v-for="item in data.Trends" :key="index">
|
<van-swipe-item class="v" style="height: 12vw; line-height: 6vw" v-for="(group, index) in trendsGrouped" :key="index">
|
||||||
<a :key="item.id" @click="$navigate(`/ColumnDetail?id=${item.id}`)">
|
<template v-for="item in group">
|
||||||
<span></span>{{ item.name }}
|
<a @click="$navigate(`/ColumnDetail?id=${item.id}`)">
|
||||||
</a>
|
<span></span>{{ item.name }}
|
||||||
|
</a>
|
||||||
|
</template>
|
||||||
</van-swipe-item>
|
</van-swipe-item>
|
||||||
</van-swipe>
|
</van-swipe>
|
||||||
</div>
|
</div>
|
||||||
@ -117,33 +119,27 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import date from "../utils/date.js";
|
|
||||||
import date from "../../utils/date.js"
|
import date from "../../utils/date.js"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Home',
|
name: 'Home',
|
||||||
mounted() {
|
mounted() {
|
||||||
this.init();
|
this.init();
|
||||||
this.data = { Carousel: [], News: [], Trends: [], Video: null };
|
|
||||||
this.options = [];
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
data: {},
|
data: {},
|
||||||
month: date.getMonth_C(),
|
month: date.getMonth_C(),
|
||||||
showcreate: false,
|
}
|
||||||
showcreateing: false,
|
},
|
||||||
checked: 0,
|
computed: {
|
||||||
tempData: {},
|
trendsGrouped() {
|
||||||
|
if (!this.data.Trends) return [];
|
||||||
showRegion: false,
|
const result = [];
|
||||||
options: [],
|
for (let i = 0; i < this.data.Trends.length; i += 2) {
|
||||||
defaultProps: {
|
result.push(this.data.Trends.slice(i, i + 2));
|
||||||
value: "id",
|
}
|
||||||
text: "name",
|
return result;
|
||||||
},
|
|
||||||
region: '',
|
|
||||||
loading: false,
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -165,94 +161,6 @@ export default {
|
|||||||
this.$showFailToast(err.message || '数据加载失败');
|
this.$showFailToast(err.message || '数据加载失败');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
create() {
|
|
||||||
// this.showcreate = true;
|
|
||||||
this.$post('Member/GetApplyAgent').then(res => {
|
|
||||||
const data = res.data || res;
|
|
||||||
if (!data.AgentCode)
|
|
||||||
this.showcreate = true;
|
|
||||||
else {
|
|
||||||
this.showcreateing = true;
|
|
||||||
}
|
|
||||||
}).catch(err => {
|
|
||||||
this.$showFailToast(err.message);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
changebox(e) {
|
|
||||||
this.checked = e;
|
|
||||||
this.tempData.AgentRegion = '';
|
|
||||||
this.tempData.AgentRegionName = '';
|
|
||||||
this.region = '';
|
|
||||||
},
|
|
||||||
onChange(e) {
|
|
||||||
if (e.selectedOptions.length > 0 && e.selectedOptions[0].level == 'province' && this.checked == 4) {
|
|
||||||
e.selectedOptions[e.tabIndex].children = null;
|
|
||||||
this.showRegion = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (e.selectedOptions.length > 1 && e.selectedOptions[1].level == 'city' && this.checked == 3) {
|
|
||||||
e.selectedOptions[e.tabIndex].children = null;
|
|
||||||
this.showRegion = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (e.selectedOptions.length > 2 && e.selectedOptions[2].level == 'district' && this.checked == 2) {
|
|
||||||
e.selectedOptions[e.tabIndex].children = null;
|
|
||||||
this.showRegion = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e.selectedOptions[e.tabIndex].leaf) {
|
|
||||||
e.selectedOptions[e.tabIndex].children = null;
|
|
||||||
this.showRegion = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (!e.selectedOptions[e.tabIndex].children || e.selectedOptions[e.tabIndex].children.length == 0) {
|
|
||||||
this.$post('Common/GetRegions', { value: e.value }).then(res => {
|
|
||||||
const data = res.data || res;
|
|
||||||
if (data.length > 0) {
|
|
||||||
data.forEach(x => { x.children = [] });
|
|
||||||
e.selectedOptions[e.tabIndex].children = data;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
e.selectedOptions[e.tabIndex].children = null;
|
|
||||||
this.showRegion = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onFinish(e) {
|
|
||||||
this.showRegion = false;
|
|
||||||
this.tempData.AgentRegion = e.selectedOptions.map(x => x.id).join(';');
|
|
||||||
this.tempData.AgentRegionName = e.selectedOptions.map(x => x.name).join('');
|
|
||||||
},
|
|
||||||
submit() {
|
|
||||||
if (!this.tempData.AgentName) {
|
|
||||||
this.$showFailToast('请输入姓名');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!this.tempData.AgentPhone) {
|
|
||||||
this.$showFailToast('请输入手机号');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!this.$validPhone(this.tempData.AgentPhone)) {
|
|
||||||
this.$showFailToast('手机号格式错误');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!this.tempData.AgentRegion) {
|
|
||||||
this.$showFailToast('请选择共创区域');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.loading = true;
|
|
||||||
this.$post('Member/ApplyAgent', this.tempData).then(res => {
|
|
||||||
this.tempData = {};
|
|
||||||
this.$showSuccessToast('提交成功');
|
|
||||||
this.showcreate = false;
|
|
||||||
}).catch(err => {
|
|
||||||
this.$showFailToast(err.message);
|
|
||||||
}).finally(() => {
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -281,7 +281,7 @@ export default {
|
|||||||
this.$showConfirmDialog({
|
this.$showConfirmDialog({
|
||||||
title: "确认退出?",
|
title: "确认退出?",
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$ls.remove('token');
|
this.$ls.remove('member_token');
|
||||||
location.replace('#/Login');
|
location.replace('#/Login');
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
location.reload();
|
location.reload();
|
||||||
@ -365,7 +365,7 @@ export default {
|
|||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
this.$ls.remove('token');
|
this.$ls.remove('member_token');
|
||||||
location.replace('#/Login');
|
location.replace('#/Login');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user