作者 张侠英

提交5.27

... ... @@ -9539,10 +9539,9 @@
"dev": true
},
"qs": {
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
"dev": true
"version": "6.9.4",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz",
"integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ=="
},
"query-string": {
"version": "4.3.4",
... ... @@ -9930,6 +9929,14 @@
"tough-cookie": "~2.5.0",
"tunnel-agent": "^0.6.0",
"uuid": "^3.3.2"
},
"dependencies": {
"qs": {
"version": "6.5.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
"dev": true
}
}
},
"request-promise-core": {
... ...
... ... @@ -11,6 +11,7 @@
"axios": "^0.19.2",
"core-js": "^2.6.5",
"element-ui": "^2.13.1",
"qs": "^6.9.4",
"vant": "^2.8.2",
"vue": "^2.6.10",
"vue-router": "^3.0.3",
... ...
... ... @@ -8,6 +8,7 @@
<p>{{item.nickname}}</p>
<div class="block">{{item.about_me}}</div>
<!-- {{item.nickname}} -->
<!-- </div> -->
</router-link>
</div>
... ... @@ -40,7 +41,7 @@ export default {
this.$axios.post('api/Index/shouye', {
city: ''
}).then(res => {
// this.msg=res.data.msg
that.arr = res.data
console.log(res)
... ... @@ -68,7 +69,7 @@ export default {
height:1.4rem;
background:#fff;
border-radius:.25rem;
margin:0rem 0.03rem 0.03rem 0.11rem;
margin:0.1rem 0.03rem 0.03rem 0.11rem;
padding:5%;
.details2{
width:.4rem;
... ...
... ... @@ -4,7 +4,7 @@
<van-popup v-model="showHidden" round position="bottom" :style="{ height: '20%' }" close-on-click-overlay @hide="show" >
<button class="btn" >相机</button>
<button class="btn" @click="go">相册</button>
<button class="btn">取消</button>
<button class="btn" @click="hide">取消</button>
</van-popup>
... ... @@ -20,14 +20,18 @@ export default {
},
data () {
return {
showHidden:""
showHidden : ''
}
},
methods :{
go () {
this.$router.push("/photo");
this.$router.push('/myAlbum')
},
hide () {
this.showHidden = false
}
}
}
... ...
... ... @@ -4,6 +4,7 @@ import router from './router'
import store from './store'
import ElementUI from 'element-ui'
import Axios from 'axios'
import qs from 'qs'
import 'element-ui/lib/theme-chalk/index.css'
import './assets/font/iconfont.css'
import './assets/style/reset.css'
... ... @@ -14,30 +15,31 @@ import 'vant/lib/index.css'
Vue.config.productionTip = false
Axios.defaults.baseURL = '/api/'
Vue.prototype.$axios = Axios
// let getCookie=funtion(cookie){
// let reg = /csrftoken=([\w]+)[;]?/g
// return reg.exec(cookie)[1]
// }
Vue.prototype.$qs=qs
//添加请求拦截器,在请求头中加token
Axios.interceptors.request.use(function (config) {
  // 在发送请求之前做些什么
config=>{
if(localStorage.getItem('Authorization')){
config.headers.Authorization=localstorage.getItem('Authorization');
}
}
  return config
// config=>{
config.headers = {
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
}
// if(localStorage.getItem('Authorization')){
// config.headers = {
// 'Authorization': localstorage.getItem('Authorization')
// }
// }
// }
  return config;
}, function (error) {
  // 对请求错误做些什么
return Promise.reject(error)
});
})
//添加响应拦截器
Axios.interceptors.response.use(function(response){
return response;
return response
},function(erros){
return Promise.reject(error);
});
return Promise.reject(error)
})
Vue.use(ElementUI)
Vue.use(Vant)
new Vue({
... ...
... ... @@ -3,7 +3,7 @@
<div class="header">
<h2 @click="back1"><</h2><h1>心仪我的</h1>
</div>
<router-link to='/xiangQing' class="details1" v-for="item in arr" :key="item.id">
<router-link to='/xiangQing' class="details1" v-for="item in arr" :key="item.id">
<!-- <div class="details1" v-for="item in arr" :key="item.id" > -->
<div class="details2">
<img :src="item.avatar" alt="" @click="goFangDa">
... ... @@ -22,8 +22,13 @@ export default {
components: {
},
data () {
return {
arr:[]
}
},
mounted: function(){
this.getData()
},
created () {
... ... @@ -35,17 +40,32 @@ export default {
},
back1 () {
this.$router.go(-1);
},
getData () {
let that = this
this.$axios.post('/api/Center/like_me', {}).then((res) => {
that.arr = res.data
console.log(res.data)
}).catch((error) => {
console.log(error)
})
}
}
}
</script>
<style lang="scss" scoped>
.home{
.home{
width:100%;
height:100%;
// height:100%;
background:#11A7FC;
padding-top:10%;
padding-left:8%;
padding-left:5%;
flex-wrap:wrap;
// min-height:0rem;
overflow-y:scroll;
display:flex;
// flex: 1;
.header{
width:90%;
height:.3rem;
... ... @@ -55,12 +75,13 @@ export default {
font-size:.2rem;
line-height:.3rem;
color:#fff;
text-align:center;
// text-align:center;
margin-left:35%;
}
h2{
font-size:.2rem;
color:#fff;
margin-bottom:.5rem;
// margin-bottom:.5rem;
line-height:.3rem;
float:left;
}
... ... @@ -71,8 +92,9 @@ export default {
height:1.4rem;
background:#fff;
border-radius:.25rem;
margin:0rem 0.03rem 0.03rem 0.11rem;
margin:0.04rem 0.08rem 0.03rem 0rem;
padding:5%;
display:block;
.details2{
width:.4rem;
height:.4rem;
... ...
... ... @@ -3,7 +3,7 @@
<h2 @click="back"><</h2>
<h1>择偶条件</h1>
<van-field
v-model="message"
v-model="choose"
rows="6"
autosize
... ... @@ -11,6 +11,7 @@
maxlength="100"
placeholder="填写择偶条件,找到那个TA~"
show-word-limit
@input="getCondition"
/>
<div class="btn" @click="go">下一步</div>
</div>
... ... @@ -24,15 +25,28 @@ export default {
},
data () {
return {
message:''
choose: ''
}
},
methods:{
methods: {
back () {
this.$router.go(-1);
this.$router.go(-1)
},
go () {
this.$router.push('photo')
},
getCondition () {
let that = this
let params = {
'choose': that.choose
}
that.$axios.post('/api/Register/register_is_fifth', params).then((res) => {
that.choose = res.data
console.log(that.choose)
}).catch((err) => {
console.log(err)
})
}
}
}
... ...
... ... @@ -4,7 +4,8 @@
<h2 @click="back1"><</h2><h1>详细资料</h1>
</div>
<div class="nav">
<img src="" alt="">
<img src="../assets/1.png" alt="">
<img src="../assets/13.png" alt="" class="img" @click="goPhoto">
</div>
<div class="center">
... ... @@ -99,6 +100,8 @@ export default {
value6:0,
value7:0,
value8:0,
value9:0,
value10:0,
option1: [
{ text: '不限', value: 0 },
{ text: '男', value: 1 },
... ... @@ -185,11 +188,15 @@ export default {
],
option9: [
{ text: '北京', value: 0 }
],
option10: [
{ text: '未婚', value: 0 },
{ text: '离异', value: 1 },
{ text: '丧偶', value: 2 }
],
option10: [
option11: [
{ text: '北京', value: 0 }
],
... ... @@ -202,6 +209,9 @@ export default {
},
goBu (){
this.$router.push('/introduction');
},
goPhoto () {
this.$router.push('/photo');
}
}
}
... ... @@ -236,11 +246,25 @@ export default {
}
.nav{
width:22%;
height:6%;
height:7%;
border-radius:50%;
margin-left:33%;
margin-left:35%;
background:#fff;
margin-bottom:.2rem;
position:relative;
img{
width:100%;
height:100%;
margin-bottom:.3rem;
}
.img{
width:.24rem;
height:.24rem;
position:absolute;
right:0;
top:75%;
}
}
.center{
width:88%;
... ... @@ -302,7 +326,7 @@ export default {
color:#fff;
.van-dropdown-item{
height:.5rem;
width:90%;
width:80%;
font-size:.16rem;
background-color:#11A7FC;
background:red;
... ... @@ -659,17 +683,20 @@ export default {
border:none;
color:#fff;
padding-left:4%;
border-bottom:1px solid #fff;
float:left;
}
.el-dropdown-menu__item--divided:before{
border: 1px solid #11A7FC;
background-color:#11A7FC;
border-bottom:1px solid #fff;
}
.van-dropdown-menu{
// width:20%;
height:100%;
background-color:#11A7FC;
border: 1px solid #11A7FC;
// border: 1px solid #11A7FC;
border-bottom:1px solid #fff;
// background:red;
color:#fff;
... ...
... ... @@ -2,12 +2,13 @@
<div class="forget">
<h2 @click="back"><</h2>
<h1>重置密码</h1>
<input type="tel" v-model=" phone"
<input type="tel" v-model="mobile"
pattern="^1[3456789]\d{9}$" required placeholder="请输入手机号"><hr />
<input type="number" placeholder="请输入验证码"><hr />
<input type="number" placeholder="请输入新密码"><hr />
<input type="number" v-model="newpassword" placeholder="请输入新密码"><hr />
<input type="number" placeholder="请输入验证码" ><hr />
<p @click="goRegister">去注册</p>
<div class="footer" >保存</div>
<div class="footer" @click="login">保存</div>
</div>
</template>
... ... @@ -20,7 +21,8 @@ export default {
},
data () {
return {
phone:''
mobile:'',
newpassword:''
}
},
methods: {
... ... @@ -29,13 +31,28 @@ export default {
},
goRegister () {
this.$router.push('/register');
},
login(){
var params={
'mobile':this.mobile
};
this.axios.post('/api/user/resetpwd',params).then((res)=>{
if(this.mobile=true){
localStorage.setItem('mobile',this.mobile);
}else{
this.mobile=res.data
}
}).catch((error)=>{
console.log(error)
})
}
},
watch: {
' phone': function (newValue, oldValue) {
this.phone = newValue.replace(/[^\d]/g, '').substring(0, 11)
}
// ' phone': function (newValue, oldValue) {
// this.phone = newValue.replace(/[^\d]/g, '').substring(0, 11)
// }
}
}
... ...
... ... @@ -11,6 +11,7 @@
maxlength="100"
placeholder="介绍自己,讲述您的故事~"
show-word-limit
@input="getIntroduction"
/>
<div class="btn" @click="go">下一步</div>
</div>
... ... @@ -24,16 +25,31 @@ export default {
},
data () {
return {
message:''
message: ''
}
},
methods:{
back () {
this.$router.go(-1);
this.$router.go(-1)
},
go () {
this.$router.push('condition')
},
getIntroduction () {
let that = this
let params = {
'about_me': that.message
}
let qs = require('qs')
let data = qs.stringify(params)
that.$axios.post('/api/Register/register_is_fourth', data).then((res) => {
that.message = res.data
console.log(that.message)
}).catch((err) => {
console.log(err)
})
}
}
}
</script>
... ...
... ... @@ -23,9 +23,9 @@
</div>
</template>
<script>
import { mapMutations } from 'vuex';
import { mapMutations } from 'vuex'
export default {
name: 'home',
name: 'register',
components: {
},
... ... @@ -40,14 +40,7 @@ export default {
}
},
mounted: function () {
this.$axios({
method: 'post',
url: '/login/index'
}).then(r => {
console.log(111)
}).catch(e => {
console.log(2222)
})
},
methods: {
back1 () {
... ... @@ -62,16 +55,17 @@ export default {
},
...mapMutations(['changeLogin']),
goLoginSuccessful () {
let _this = this
if (this.loginForm.mebile === '' || this.loginForm.passeord === '') {
this.$router.push('/loginSuccessful')
let _this = this
if (this.loginForm.mebile === '' || this.loginForm.passeord === '') {
alert('手机号和密码不能为空')
} else {
} else {
_this.$axios({
method: 'post',
url: '/Login/login',
url: 'api/Login/login',
data: _this.loginForm
}).then(res => {
console.log('----')
console.log(res.data)
_this.userToken = 'token' + res.data.data.body.token
_this.changeLogin({ Authorization: _this.userToken })
... ... @@ -83,13 +77,9 @@ export default {
console.log(error)
})
}
}
}
}
}
}
</script>
<style lang="scss" scoped>
.register{
... ...
... ... @@ -6,8 +6,8 @@
<div class="header2"><p>名字</p><img src="../assets/6.png" alt=""><span>普通会员</span></div>
</div>
<div class="num">
<li><p>0</p><span>我心仪</span></li>
<li><p>0</p><span>心仪我</span></li>
<li @click="goMeAdmire"><p>0</p><span>我心仪</span></li>
<li @click="goAdminMe"><p>0</p><span>心仪我</span></li>
</div>
<div class="banner">
<div class="banner1">
... ... @@ -64,6 +64,12 @@ export default {
},
goSeniorMember (){
this.$router.push('/seniorMember')
},
goMeAdmire () {
this.$router.push('/meAdmire')
},
goAdminMe () {
this.$router.push('/admireMe')
}
}
}
... ...
... ... @@ -22,8 +22,13 @@ export default {
components: {
},
data () {
return {
arr: []
}
},
mounted: function(){
this.getData();
this.getData()
},
created () {
... ... @@ -32,7 +37,26 @@ export default {
methods : {
back1 () {
this.$router.go(-1)
},
goFangDa () {
this.$router.push('/fangDa')
},
getData () {
let that = this
this.$axios.post('/api/Center/like',{
// headers: {
// "Authorization": this.Cookies.get('token')
// }
}).then((res) => {
that.arr = res.data
console.log(res.data)
}).catch((error) => {
console.log(error)
})
}
}
}
... ... @@ -40,10 +64,15 @@ export default {
<style lang="scss" scoped>
.home{
width:100%;
height:100%;
// height:100%;
background:#11A7FC;
padding-top:10%;
padding-left:5%;
flex-wrap:wrap;
// min-height:0rem;
overflow-y:scroll;
display:flex;
// flex: 1;
.header{
width:90%;
height:.3rem;
... ... @@ -53,12 +82,13 @@ export default {
font-size:.2rem;
line-height:.3rem;
color:#fff;
text-align:center;
// text-align:center;
margin-left:35%;
}
h2{
font-size:.2rem;
color:#fff;
margin-bottom:.5rem;
// margin-bottom:.5rem;
line-height:.3rem;
float:left;
}
... ... @@ -69,8 +99,9 @@ export default {
height:1.4rem;
background:#fff;
border-radius:.25rem;
margin:0rem 0.03rem 0.03rem 0.11rem;
margin:0.02rem 0.08rem 0.03rem 0rem;
padding:5%;
display:block;
.details2{
width:.4rem;
height:.4rem;
... ...
... ... @@ -28,11 +28,23 @@ export default {
},
go () {
this.$router.push('/photoz')
}
// add () {
},
add () {
let that=this
let params={
'fileList':that.fileList
}
that.$axios.post('/api/Center/photo_sel',params).then((res)=>{
this.fileList = res.data
console.log(res)
}
// this.showHidden=true;
// }
).catch((err)=>{
console.log(err)
})
}
}
}
</script>
... ...
... ... @@ -3,15 +3,15 @@
<div class="header">
<h2 @click="back1"><</h2><h1>我的资料</h1>
</div>
<div class="banner" @click="goMyAlbum"></div>
<div class="banner" @click="goMyAlbum" ></div>
<p>点击修改头像</p>
<div class="nav">
<p>确保头像照片为本人清晰正脸照,一个良好的头像更能吸引到别人哦~</p>
<span>确保头像照片为本人清晰正脸照,一个良好的头像更能吸引到别人哦~</span>
</div>
<div class="main">
<div class="main1">
<div class="left">自我介绍</div>
<div class="right">去修改 ></div>
<div class="right" @click="goIntroduction" >去修改> </div>
</div>
<div class="main2">
在百忙之于还会想念着他心爱的女人那才是真正的好男人。被风吹到眼睛想你看到闪烁的路灯想你。
... ... @@ -20,7 +20,7 @@
<div class="data">
<div class="data1">
<div class="left">详细资料</div>
<div class="right">去修改></div>
<div class="right" @click="goData">去修改></div>
</div>
<div class="data2">
<div class="x1">女</div><div class="x2">23岁</div>
... ... @@ -56,7 +56,7 @@
<div class="photo">
<div class="photo1">
<div class="left">我的证件</div>
<div class="right">去修改></div>
<div class="right" @click="goPhotoz">去修改></div>
</div>
<div class="photo2">
<li></li>
... ... @@ -68,7 +68,7 @@
<div class="footer">
<div class="footer1">
<div class="left">择偶条件</div>
<div class="right">去修改></div>
<div class="right" @click="goCondition">去修改></div>
</div>
<div class="footer2">年龄和我同岁或者比我小,在加拿大这边或者国内的愿意来加拿大生活的,性格内向和外向都好,偏内向的话,两个人一样,偏外向的话两个人互补,主要看感觉。</div>
</div>
... ... @@ -81,12 +81,82 @@ export default {
components: {
},
methods:{
mounted: function () {
// this. goIntroduction()
},
methods: {
goMyAlbum () {
this.$router.push('/myAlbum')
this.$router.push('/myAlbum')
},
back1 () {
this.$router.go(-1)
this.$router.go(-1)
},
goIntroduction () {
let that = this
let params = {
about_me: that.about_me
}
that.$axios.post('/api/Center/up_about', params).then((res) =>{
that. about_me = res.data
console.log(that. about_me)
this.$router.push('/introduction')
}).catch((err) =>{
console.log(err)
})
},
goData () {
let that= this
let params = {
sex: that.sex,
age: that.age,
born: that.born,
star: that.star,
minzu: that.minzu,
height: that.height,
weight: that.wieght,
education: that.education,
school: that.school,
specialities: that.specialities,
old_city: that.old_city,
marriage: that.marriage,
work_address: that.work_address,
work: that.work,
year_money: that.year_money,
wechat: that.wechat
}
that.$axios.post('/api/Center/up_ziliao', params).then((res) => {
that.sex = res.data
console.log(that.sex)
this.$router.push('/data')
}).catch((err) => {
console.log(err)
})
},
goPhotoz () {
let that = this
let params = {
card_zheng_avatar: that.card_zheng_avatar,
card_fan_avatar: that.card_fan_avatar,
card_school_avatar: that.card_school_avatar,
card_marriage_avatar: that.card_marriage_avatar
}
that.$axios.post('/api/Center/user_card_up',params,{
headers: {
'token': 'e1a824615a889772dc554ab5a44e5f7c'
}
}).then((res) => {
that.card_zheng_avatar = res.data
this.$router.push('/photoz')
console.log(that.card_zheng_avatar)
}).catch((err) => {
console.log(err)
})
},
goCondition () {
this.$router.push('/condition')
}
}
}
... ... @@ -94,7 +164,7 @@ export default {
<style lang="scss" scoped>
.home{
width:100%;
height:180%;
height:185%;
background:#11A7FC;
padding-top:10%;
// padding-left:5%;
... ... @@ -142,12 +212,13 @@ export default {
background:rgba(255,255,255,0.3);
margin-left:5%;
border-radius:.2rem;
p{
padding:0.2rem 0rem;
span{
color:#fff;
font-size:.15rem;
line-height:.2rem;
margin:0px;
padding:0px;
line-height:.3rem;
margin-left:.1rem;
display:block;
}
}
... ...
... ... @@ -3,7 +3,7 @@
<h2 @click="back"><</h2>
<p>支付</p>
<span>¥100.00</span>
<p>高级会员费</p>
<span class="span">高级会员费</span>
<div class="nav">
<div class="nav1"><img src="../assets/8.png" alt=""><h4>微信支付</h4><div class="b1"></div></div>
<div class="nav2"><img src="../assets/9.png" alt=""><h4>支付宝支付</h4><div class="b2"></div></div>
... ... @@ -58,6 +58,14 @@ export default {
display:block;
}
.span{
font-size:.2rem;
color:#fff;
// line-height:.2rem;
text-align:center;
margin-top:.2rem;
display:block;
}
.nav{
width:94%;
height:2rem;
... ...
... ... @@ -2,13 +2,13 @@
<div class="introduction">
<h2 @click="back"><</h2>
<h1>上传相册</h1>
<van-uploader v-model="fileList" multiple :max-count="2" @click="add" upload-text="添加照片" />
<van-uploader v-model="fileList" multiple :max-count="6" @click="add" upload-text="添加照片" />
<div class="btn" @click="go">下一步</div>
<ShowHidden :isvisibleadd="showHidden"></ShowHidden>
</div>
</template>
<script>
import ShowHidden from '../components/ShowHide.vue';
import ShowHidden from '../components/ShowHide.vue'
export default {
name: 'introduction',
components: {
... ... @@ -16,21 +16,36 @@ export default {
},
data () {
return {
message:'',
fileList:[],
message: '',
fileList: [],
showHidden:false
}
},
methods:{
back () {
this.$router.go(-1);
this.$router.go(-1)
},
go () {
this.$router.push('/photoz')
},
add () {
this. showHidden = true
let that = this
let params = {
avatar1: that.fileList,
avatar2: that.fileList,
avatar3: that.fileList,
avatar4: that.fileList,
avatar5: that.fileList,
avatar6: that.fileList
this.showHidden=true;
}
that.$axios.post(' /api/Register/register_is_sixth', params).then((res) => {
that.fileList = res.data
console.log(that.fileList)
}).catch((err) => {
console.log(err)
})
}
}
}
... ...
... ... @@ -5,7 +5,7 @@
</div>
<p><span>*</span>身份证上传(正面)</p>
<div class="nav1">
<van-uploader v-model="fileList" multiple :max-count="1" upload-text="添加照片" preview-full-image/>
<van-uploader v-model="fileList" multiple :max-count="1" upload-text="添加照片" preview-full-image preview-size="width:100%;height:100%;" />
</div>
<p><span>*</span>身份证上传(反面)</p>
<div class="nav2">
... ... @@ -19,7 +19,7 @@
<div class="nav2">
<van-uploader v-model="fileList3" multiple :max-count="1" upload-text="添加照片" preview-full-image/>
</div>
<button class="btn">提交</button>
<button class="btn" @click="getSubmit">提交</button>
</div>
</template>
... ... @@ -35,16 +35,31 @@ export default {
fileList: [],
fileList1: [],
fileList2: [],
fileList3: [],
fileList3: []
}
},
mounted: function () {
// this.getSubmit()
},
methods: {
// afterRead(file) {
// // 此时可以自行将文件上传至服务器
// console.log(file);
// },
back1 () {
this.$router.go(-1);
back1 () {
this.$router.go(-1)
},
getSubmit () {
let that = this
let params = {
card_zheng_avatar: that.fileList,
card_fan_avatar: that.fileList1,
card_school_avatar: that.fileList2,
card_marriage_avata: that.fileList3
}
that.$axios.post('/api/Register/register_is_seventh', params).then((res) => {
that.card_zheng_avatar = res.data
console.log(that.card_zheng_avatar)
}).catch((err) => {
console.log(err)
})
}
}
}
... ... @@ -97,7 +112,7 @@ export default {
align-items:center;
border-radius:0.2rem;
margin-bottom:.4rem;
margin-left:3%;
margin-left:0%;
}
.nav2{
width:90%;
... ... @@ -108,7 +123,7 @@ export default {
align-items:center;
border-radius:0.2rem;
margin-bottom:.4rem;
margin-left:3%;
}
.btn{
width:90%;
... ...
<template>
<div class="home"></div>
<div class="home">profile</div>
</template>
<script>
... ...
... ... @@ -12,15 +12,21 @@
<div class="header">
<img src="../assets/01.png" alt="">
</div>
<div class="center" type=">
<div class="center" type=" ">
<form action="" method="post" onsubmit="return checkForm(this)">
<input type="text" placeholder="请选择征婚城市" /><hr/>
<input type="number" placeholder="请输入身份证号码" /><hr/>
<input id="p_tel" type="text" name="p_tel" placeholder="请输入手机号"/><hr/>
<input type="text" placeholder="请选择征婚城市" v-model="city" @change="getCity"/><hr/>
<input type="number" placeholder="请输入身份证号码" v-model="cards" @change="getCheckCode"/><hr/>
<input id="p_tel" type="text" name="p_tel" placeholder="请输入手机号" v-model="phone"/><hr/>
<input id="p_cardid" type="text" name="p_cardid" placeholder="请输入验证码" /><hr/>
<input id="p_cardid" type="text" name="p_cardid" placeholder="请输入验证码" /><hr/>
<button type="submit" @click="goMi"> 设置密码</button>
<div style="font-size: 0.2rem" @click='getCode' class="code2">{{codeFont}}({{60}})</div>
<input type="password" name="password" id="p1" placeholder="请输入登录密码"><hr/>
<p>密码需为8~20位数字 字母和符合的组合</p>
<input type="password" name="password1" id="p2" placeholder="请再次输入密码"><hr>
<button type="submit" @click="goMi">完善资料</button>
</form>
</div>
... ... @@ -35,15 +41,19 @@ export default {
},
data() {
return {
show: true
show: true,
city:'',
cards:'',
codeFont: '获取验证码',
phone: ''
}
},
methods: {
back1 () {
this.$router.go(-1);
this.$router.go(-1)
},
goMi () {
this.$router.push('/sheZhi');
this.$router.push('/data')
},
checkForm () {
var phone = document.getElementById('p_tel').value;
... ... @@ -64,7 +74,93 @@ export default {
if(!(/^[1-9]{1}[0-9]{14}$|^[1-9]{1}[0-9]{16}([0-9]|[xX])$/.test(cardid))){
alert("身份证号有误,请重新输入");return false;
}
}
},
getCity(){
},
getCheckCode() {
let that=this;
let reg=/^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
if(that.checkCode == ''){
if(reg.test(that.checkCode)){
this.$message({
title:"提示",
message:"身份证正确",
type:"success"
})
return
}else{
this.$message({
title:"提示",
message:"身份证输入错误",
type:"warning"
})
return
}
let params = {
'cards': that.cards
}
let qs=require('qs')
let data=qs.stringify(params)
that.$axios.post('/api/Register/register_is_first',data).then(
res=>{
console.log(res);
let data=res.data.data;
}
).catch(error=>{
console.log(error)
})
}
},
getCode () {
let that = this
let reg = /^1[1,3,4,5,6,7,8,9]\d{9}$/
if(that.codeFont=='获取验证码'||that.codeFont=='重新获取'){
if(!that.phone) {
this.$message ({
message: '请输入手机号',
type: 'warning'
})
return
}else if (!reg.test(that.phone)) {
this.$message ({
message: '请输入合法的手机号',
type: 'warning'
})
return
}
let params = {
mobile: that.phone,
event: 'register'
}
let qs = require('qs')
let data = qs.stringify(params)
that.$axios.post('/api/sms/send',data).then(r=>{
console.log(r)
if(r.data.code==1){
console.log('发送成功')
let codeFont = that.codeFont
let count = 3
that.codeFont = count + 's'
let st= setInterval(function(){
if(count>0){
count--
that.codeFont = count + 's'
}else {
clearInterval(st)
that.codeFont = '重新获取'
}
},1000)
}else{
this.$message ({
message: r.data.msg,
type: 'warning'
})
}
}).catch()
}
},
}
}
</script>
... ... @@ -127,6 +223,60 @@ export default {
padding-left:4%;
}
#p_cardid{
position:relative;
width:100%;
height:.5rem;
font-size:.2rem;
display:block;
background-color:#11A7FC;
border:none;
color:#fff;
padding-left:4%;
}
.code2{
width:1.4rem;
height:.4rem;
font-size:.08rem;
color:#fff;
line-height:.4rem;
position:absolute;
right:.35rem;
top:3.65rem;
}
input{
width:86%;
height:.5rem;
font-size:.2rem;
display:block;
background-color:#11A7FC;
border:none;
color:#fff;
padding-left:4%;
}
hr{
color:#fff;
opacity:.3;
width:92%;
}
p{
color:#fff;
font-size:.1rem;
opacity:.4;
margin-top:0.1rem;
margin-right:.55rem;
}
hr{
color:#fff;
opacity:0.3;
... ... @@ -138,6 +288,7 @@ export default {
border-radius:.2rem;
color:#11A7FC;
font-weight:bold;
border:none;
}
}
}
... ...
... ... @@ -20,13 +20,19 @@ export default {
},
methods: {
goPay () {
this.$router.push('/pay')
},
goBack () {
goBack () {
this.$router.go(-1)
}
},
goPay () {
this.$axios.post('/api/Center/center_vip',{}).then((res) => {
this.data = res.data
this.$router.push('/pay')
console.log(this.data)
}).catch((err) =>{
console.log(err)
})
}
}
}
</script>
... ...