Skip to content

Commit

Permalink
修改
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed Jan 25, 2017
1 parent 7b1b1ed commit 953160d
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 42 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,minimal-ui"/>
<title>vue2-demo</title>
<title>寻族宝</title>
</head>
<body>
<div id="app">加载中...</div>
Expand Down
15 changes: 9 additions & 6 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div style="height: 100%">
<router-view></router-view>
<toast v-model="isShowToast" type="text">{{toastText}}</toast>
<toast v-model="isShowToast" type="text" @on-hide="onHide">{{toastText}}</toast>
<loading v-model="isShowLoading" :text="loadingText"></loading>
</div>
</template>
Expand All @@ -10,11 +10,6 @@
import { mapGetters } from 'vuex'
export default {
name: 'app',
data() {
return {
// isShowToast: true
}
},
computed: mapGetters([
'isShowToast',
'toastText',
Expand All @@ -24,6 +19,14 @@
components: {
Toast,
Loading
},
methods: {
...mapActions([
'showToast'
]),
onHide() {
this.showToast()
}
}
}
</script>
6 changes: 3 additions & 3 deletions src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import axios from 'axios'
export default {
reset(data) {
return axios
.get('/api/auth/reset_password', data)
.post('/api/auth/reset_password', data)
},
login(data) {
return axios
Expand All @@ -26,11 +26,11 @@ export default {
},
parent(data) {
return axios
.get('/api/common/parent_items', data)
.get('/api/common/parent_items', { params: data })
},
spouseList(data) {
return axios
.get('/api/common/spouse_items', data)
.get('/api/common/spouse_items', { params: data })
},
perfectInfo(data) {
return axios
Expand Down
11 changes: 7 additions & 4 deletions src/pages/base/signUp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<input type="number" class="ui-input" placeholder="请输入您的家族标识" v-model="family_sn" maxlength="11">
</div>
</div>
<div class="ui-btn max" @click="verifySms">下一步</div>
<div class="ui-btn max" v-bind:class="isNext" @click="verifySms">下一步</div>
</div>
</section>
</template>
Expand All @@ -53,6 +53,9 @@
ltHeader
},
computed: {
isNext() {
},
isGetCode() {
let isDisable = true
if (this.isRequestCode) {
Expand All @@ -74,8 +77,7 @@
...mapActions([
'postSendSms',
'postVerifySms',
'postRegister',
'showToast'
'postRegister'
]),
getCode() {
if (!this.isRequestCode) return
Expand All @@ -100,7 +102,8 @@
let self = this
self.postVerifySms({
params: {
'code': self.code
code: self.code,
mobile: self.mobile
},
success() {
self.postRegister({
Expand Down
6 changes: 1 addition & 5 deletions src/store/getters.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,5 @@ export default {
isShowToast: state => state.isShowToast,
toastText: state => state.toastText,
isShowLoading: state => state.isShowLoading,
loadingText: state => state.loadingText,
userFormName: state => state.userFormName,
userFormValue: state => state.userFormValue,
userFormType: state => state.userFormType,
userFormTitle: state => state.userFormTitle
loadingText: state => state.loadingText
}
6 changes: 1 addition & 5 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ const state = {
isShowToast: false,
toastText: '',
isShowLoading: false,
loadingText: '请稍候~~',
userFormName: '',
userFormValue: '',
userFormType: '',
userFormTitle: ''
loadingText: '请稍候~~'
}

export default new Vuex.Store({
Expand Down
13 changes: 0 additions & 13 deletions src/store/mutations.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,5 @@ export default {
},
[HIDELOADING](state) {
state.isShowLoading = false
},
/* 用户表单 */
[USERFORMTITLE](state, { title }) {
state.userFormTitle = title
},
[USERFORMTYPE](state, obj) {
state.userFormType = obj
},
[USERFORMNAME](state, { name }) {
state.userFormName = name
},
[USERFORMVALUE](state, { value }) {
state.userFormValue = value
}
}
5 changes: 0 additions & 5 deletions src/store/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,3 @@ export const HIDETOAST = 'HIDETOAST'

export const SHOWLOADING = 'SHOWLOADING'
export const HIDELOADING = 'HIDELOADING'

export const USERFORMTITLE = 'USERFORMTITLE'
export const USERFORMTYPE = 'USERFORMNAME'
export const USERFORMNAME = 'USERFORMNAME'
export const USERFORMVALUE = 'USERFORMVALUE'

0 comments on commit 953160d

Please sign in to comment.