加入团队迁移过来

dev_202412
yujialong 11 months ago
parent 9197292305
commit a98ebce307
  1. 2
      public/index.html
  2. 3
      src/api/index.js
  3. BIN
      src/assets/img/house.png
  4. BIN
      src/assets/img/mini.jpg
  5. 5
      src/libs/util.js
  6. 308
      src/pages/join/index.vue
  7. 68
      src/pages/join/success.vue
  8. 12
      src/router/routes.js
  9. 5
      src/setting.js
  10. 2
      src/styles/layout/index.scss

@ -9,7 +9,7 @@
content="职站是一款辅助院校教师开展虚拟仿真实验教学的智能云实践平台。平台采用了大数据,云计算等技术,为学校搭建信息化平台提供了基础,可助力院校实现教学智能化升级。职站平台设计遵循着极简、高效的理念,可帮助老师轻松开展实验教学,并支持自定义发布考核和练习,智能统计和检验学生的日常实训练习效果;老师还可以通过可视化图表报告直观查看学生实训成绩,评估教学成果。"
/>
<meta name="baidu-site-verification" content="code-TRfXe8xIkJ" />
<meta name="viewport" content="width=device-width, user-scalable=yes, shrink-to-fit=no" />
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<link rel="stylesheet" href="//at.alicdn.com/t/font_830376_qzecyukz0s.css" />
<title>职站——为院校打造一站式虚拟仿真实训教学数智云平台</title>
<script>

@ -11,6 +11,9 @@ export default {
isClient: `${host}users/users/user/isClient`,
sendPhoneVerificationCode: `users/users/user/sendPhoneVerificationCode`,
sendPhoneOrEmailCode: `users/users/userAccount/sendPhoneOrEmailCode`,
queryUserInfoByPhone: `nakadai/nakadai/partner-team/queryUserInfoByPhone`,
transferAdmin: `nakadai/nakadai/partnerAccount/transferAdmin`,
savePartnerAccount: `nakadai/nakadai/partnerAccount/savePartnerAccount`,
getToken: `users/users/user/getToken`,
getOtherAccountByPhone: `users/users/user/getOtherAccountByPhone`,
unbindAccounts: `users/users/user/unbindAccounts`,

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

@ -193,6 +193,11 @@ const util = {
resolve(new Date(data.currentTime))
})
},
// 判断是否是移动端
isMobile() {
if(window.navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)) return true
return false
},
};
export default util;

@ -0,0 +1,308 @@
<template>
<div class="wrap">
<div class="join">
<h6>欢迎加入</h6>
<div class="wel">
<div class="icon">
<img src="@/assets/img/house.png"
alt="">
</div>
<p class="text"
style="font-size: 16px">城市合伙人计划</p>
<p class="text">{{ teamName ? (teamName + '邀请你加入他的团队') : '加入并自动为你创建一个团队群组' }}</p>
</div>
<div class="inner">
<el-form class="form"
ref="form"
:model="form"
:rules="rules">
<el-form-item prop="provinceId">
<el-select style="width: 100%"
v-model="form.provinceId"
placeholder="请选择省份"
:disabled="provinceId"
@change="getCity">
<el-option v-for="(item,index) in provinces"
:key="index"
:label="item.provinceName"
:value="item.provinceId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="cityId">
<el-select style="width: 100%"
v-model="form.cityId"
placeholder="请选择城市"
:disabled="provinceId || (form.provinceId ? false : true)">
<el-option v-for="(item,index) in cities"
:key="index"
:label="item.cityName"
:value="item.cityId"></el-option>
</el-select>
</el-form-item>
<el-form-item prop="phone">
<el-input v-model.trim="form.phone"
placeholder="请输入手机号"
maxlength="11"
@change="phoneChange"></el-input>
</el-form-item>
<el-form-item prop="userName">
<el-input v-model.trim="form.userName"
placeholder="请输入姓名"
:disabled="repeat"></el-input>
</el-form-item>
<el-form-item prop="code">
<div class="ver-code">
<el-input v-model="form.code"
placeholder="请输入验证码"
maxlength="6"></el-input>
<el-button class="send"
type="text"
@click="sendPhoneCode"
:disabled="phoneDisabled">{{ phoneBtnText }}</el-button>
</div>
</el-form-item>
</el-form>
<el-button class="submit"
type="primary"
@click="submit">立即加入</el-button>
</div>
</div>
</div>
</template>
<script>
import util from "@/libs/util"
import Setting from "@/setting"
export default {
data () {
return {
provinceId: this.$route.query.provinceId,
provinces: [],
cities: [],
isMobile: util.isMobile(),
userName: this.$route.query.userName,
teamName: this.$route.query.teamName,
admin: this.$route.query.admin, //
form: {
id: this.$route.query.accountId,
partnerClassificationId: this.$route.query.id,
isTeam: this.$route.query.isTeam, // (0)pc(1)
phone: '',
code: '',
userName: '',
provinceId: +this.$route.query.provinceId || '',
cityId: +this.$route.query.cityId || ''
},
rules: {
provinceId: [
{ required: true, message: '请选择省份', trigger: "change" }
],
cityId: [
{ required: true, message: '请选择城市', trigger: "change" }
],
userName: [
{ required: true, message: '请输入用户名', trigger: "blur" }
],
phone: [
{ required: true, message: '请输入手机号', trigger: 'blur' }
],
code: [
{ required: true, message: "请输入验证码", trigger: 'blur' }
]
},
repeat: false, //
phoneDisabled: false,
phoneTimer: null,
phoneOpener: '',
phoneBtnText: '发送验证码',
submiting: false //
};
},
mounted () {
// document.body.style.minWidth = 'none'
this.getProvince()
this.form.cityId && this.getCity()
},
methods: {
//
getProvince () {
this.$get(this.api.queryProvince).then(res => {
this.provinces = res.list
}).catch(res => { })
},
//
getCity (val) {
this.$get(this.api.queryCity, {
provinceId: this.form.provinceId
}).then(res => {
this.cities = res.list
if (val) this.form.cityId = ''
}).catch(res => { })
},
//
verifyPhone (phone) {
if (!phone) {
util.warningMsg("请输入手机号")
return false
}
if (!/^1[3456789]\d{9}$/.test(phone) && !/^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/.test(phone)) {
util.warningMsg("请输入正确的手机号")
return false
}
return true
},
//
phoneCountdown () {
let count = 60
if (!this.phoneTimer) {
this.phoneDisabled = true
this.phoneTimer = setInterval(() => {
if (count > 0) {
count--
this.phoneBtnText = `${count}秒后重试`
} else {
this.phoneDisabled = false
clearInterval(this.phoneTimer)
this.phoneTimer = null
this.phoneBtnText = `发送验证码`
}
}, 1000)
}
},
//
sendPhoneCode () {
const { phone } = this.form
if (!this.verifyPhone(phone)) return false
this.$post(this.api.sendPhoneOrEmailCode, {
platform: Setting.platformId,
phone,
types: 2
}).then(({ message }) => {
if (message.opener) {
this.phoneCountdown()
this.phoneOpener = message.opener
} else {
util.errorMsg(message)
}
}).catch(res => { })
},
//
phoneChange () {
const { form } = this
this.$get(this.api.queryUserInfoByPhone, {
phone: form.phone
}).then(({ info }) => {
//
if (info) {
this.repeat = true
form.account = info.account
form.userName = info.userName
} else {
this.repeat = false
}
}).catch(res => { })
},
//
submit () {
this.$refs.form.validate((valid) => {
if (valid) {
if (this.submiting) return false
if (this.phoneRepeat) return util.warningMsg("该手机号已存在")
if (this.emailRepeat) return util.warningMsg("该邮箱已存在")
const { form } = this
form.uniqueIdentification = Date.now()
this.submiting = true
this.$post(this.api[this.admin ? 'transferAdmin' : 'savePartnerAccount'], form).then(res => {
this.$router.push('/join/success')
}).catch(res => {
this.submiting = false
})
}
})
},
}
};
</script>
<style lang="scss" scoped>
body {
min-width: none;
}
.wrap {
height: 100%;
padding-top: 100px;
background-color: #f3f6fa;
}
.ver-code {
position: relative;
.el-button {
position: absolute;
top: 11px;
right: 10px;
color: #319bf7;
}
}
.join {
width: 436px;
margin: 0 auto;
text-align: center;
border-radius: 6px;
background-color: #fff;
border-radius: 6px;
overflow: hidden;
h6 {
padding: 0 15px;
font-size: 18px;
line-height: 48px;
color: #fff;
background-color: #319bf7;
}
.icon {
display: flex;
justify-content: center;
align-items: center;
width: 70px;
height: 70px;
margin: 20px auto;
border-radius: 4px;
background-color: #007eff;
}
.text {
margin-bottom: 10px;
color: #565656;
}
.inner {
padding: 20px;
}
/deep/.el-form-item {
margin-bottom: 25px;
}
/deep/.el-input__inner {
position: relative;
height: 52px;
line-height: 50px;
background-color: #fbfbfb;
border: 1px solid #e1e6f2;
border-radius: 4px !important;
}
.submit {
width: 100%;
padding: 0;
margin-top: 20px;
font-size: 18px;
line-height: 44px;
background-color: #007eff;
border-color: #007eff;
border-radius: 30px;
}
}
@media (max-width: 720px) {
.join {
width: 90%;
margin: 20px auto 0;
.submit {
margin-top: 0;
}
}
}
</style>

@ -0,0 +1,68 @@
<template>
<div class="wrap">
<div class="inner">
<div class="icon">
<i class="el-icon-success icon"></i>
<p class="tips">加入成功</p>
</div>
<p class="text">你已加入城市合伙人计划</p>
<p class="text">请保存并用微信扫以下二维码打开城市合伙人小程序</p>
<img class="qrcode" src="@/assets/img/mini.jpg" alt="">
</div>
</div>
</template>
<script>
export default {
data() {
return {
};
},
mounted() {
},
methods: {
}
};
</script>
<style lang="scss" scoped>
.wrap {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
background-color: #f3f6fa;
}
.inner {
width: 436px;
padding: 50px 0;
text-align: center;
border-radius: 6px;
background-color: #fff;
border-radius: 10px;
overflow: hidden;
.icon {
font-size: 40px;
color: #007eff;
}
.tips {
margin: 10px 0;
font-size: 20px;
}
.text {
margin-bottom: 15px;
font-size: 14px;
}
.qrcode {
width: 200px;
}
}
@media (max-width: 720px) {
.inner {
width: 90%;
}
}
</style>

@ -27,7 +27,17 @@ const frameOut = [
title: "登录"
},
component: () => import("@/pages/account/login")
}
},
{
path: '/join',
component: () => import('@/pages/join'),
meta: { title: '城市合伙人运营管理平台' }
},
{
path: '/join/success',
component: () => import('@/pages/join/success'),
meta: { title: '城市合伙人运营管理平台' }
},
];
/**

@ -27,7 +27,6 @@ let title = isZxy ?
if (isPro) {
// 职站生产
uploadURL = `https://www.huorantech.cn/`
systemPath = `https://www.huorantech.cn/banksystem`
} else if (isDev) {
// 本地
systemPath = `http://${location.hostname}:8093`
@ -35,7 +34,7 @@ if (isPro) {
uploadURL = `http://121.37.12.51/`
host = "http://121.37.12.51/"; // 测试服
// host = 'https://www.occupationlab.com/' // 正式服
host = "http://192.168.31.217:9000/";
host = "http://192.168.31.51:9000/";
} else if (isSq) {
zcPath = `10.20.100.204:8883`
}
@ -70,7 +69,7 @@ const Setting = {
/**
* 路由白名单
* */
whiteList: ['/login', '/index/list', '/index/zxy', '/product', '/cityPartner/list', '/devPlatform/list', '/log/list', '/touristMatch/list', '/touristMatch/details', '/touristMatch/noticeDetail', '/preCourse/list', '/preCourse/details', '/preInfo/list', '/preInfo/details', '/screen', '/screenShow', '/screenShowPro'],
whiteList: ['/login', '/index/list', '/index/zxy', '/product', '/cityPartner/list', '/devPlatform/list', '/log/list', '/touristMatch/list', '/touristMatch/details', '/touristMatch/noticeDetail', '/preCourse/list', '/preCourse/details', '/preInfo/list', '/preInfo/details', '/screen', '/screenShow', '/screenShowPro', '/join', '/join/success'],
/**
* 平台列表
* */

@ -10,7 +10,7 @@ body,
}
body {
min-width: 1280px;
// min-width: 1280px;
font-family: PingFangSC-Regular, PingFang SC;
font-size: 14px;
background: rgba(0, 0, 0, 0.02);

Loading…
Cancel
Save