diff --git a/api/mine.js b/api/mine.js new file mode 100644 index 0000000..7a536f3 --- /dev/null +++ b/api/mine.js @@ -0,0 +1,20 @@ +import fetch from '@/common/fetch.js'; +import BASE_URL from './base.js'; + +const USER_REGISTER = BASE_URL + '/webserver/userInfo/saveUserRegInfo.do' +const USER_LOGIN = BASE_URL + '/webserver/userInfo/verifyUserLoginInfo.do' +const USER_UPDATE = BASE_URL + '/webserver/userInfo/modifyPersonPassword.do' +// 用户注册 +export function registerUser(data) { + return fetch.post(USER_REGISTER, data, {}, {'content-type': 'application/x-www-form-urlencoded'}).then(res => res); +} +// 用户登录 +export function loginUser(data) { + return fetch.post(USER_LOGIN, data, {}, {'content-type': 'application/x-www-form-urlencoded'}).then(res => res); +} +// 用户修改密码 +export function updateUser(data) { + return fetch.post(USER_UPDATE, data, {}, {'content-type': 'application/x-www-form-urlencoded'}).then(res => res); +} + + diff --git a/api/mine.js b/api/mine.js new file mode 100644 index 0000000..7a536f3 --- /dev/null +++ b/api/mine.js @@ -0,0 +1,20 @@ +import fetch from '@/common/fetch.js'; +import BASE_URL from './base.js'; + +const USER_REGISTER = BASE_URL + '/webserver/userInfo/saveUserRegInfo.do' +const USER_LOGIN = BASE_URL + '/webserver/userInfo/verifyUserLoginInfo.do' +const USER_UPDATE = BASE_URL + '/webserver/userInfo/modifyPersonPassword.do' +// 用户注册 +export function registerUser(data) { + return fetch.post(USER_REGISTER, data, {}, {'content-type': 'application/x-www-form-urlencoded'}).then(res => res); +} +// 用户登录 +export function loginUser(data) { + return fetch.post(USER_LOGIN, data, {}, {'content-type': 'application/x-www-form-urlencoded'}).then(res => res); +} +// 用户修改密码 +export function updateUser(data) { + return fetch.post(USER_UPDATE, data, {}, {'content-type': 'application/x-www-form-urlencoded'}).then(res => res); +} + + diff --git a/components/card.vue b/components/card.vue index 0075ba6..220556e 100644 --- a/components/card.vue +++ b/components/card.vue @@ -113,10 +113,11 @@ deep:true, handler(newVal){ if (this.currentShow) { + const userinfo = wx.getStorageSync('userInfoxj') // this.isVoteFlag = false const params = { rumorId:this.currentShow.id, // id - votePerson:localStorage.getItem('userIdentifying') // 用户唯一标识 + votePerson:userinfo.phone ?userinfo.phone : '123' // 用户唯一标识 } // 查询用户是否投票 isVote(params).then(res => { @@ -131,9 +132,10 @@ methods: { // 投票 vote(flag) { + const userinfo = wx.getStorageSync('userInfoxj') const params = { rumorId:this.currentShow.id, - votePerson:localStorage.getItem('userIdentifying'), // 用户唯一标识 + votePerson:userinfo.phone ?userinfo.phone : '123', // 用户唯一标识 status: flag ? '1' : '0' } addVote(params).then(res => { diff --git a/api/mine.js b/api/mine.js new file mode 100644 index 0000000..7a536f3 --- /dev/null +++ b/api/mine.js @@ -0,0 +1,20 @@ +import fetch from '@/common/fetch.js'; +import BASE_URL from './base.js'; + +const USER_REGISTER = BASE_URL + '/webserver/userInfo/saveUserRegInfo.do' +const USER_LOGIN = BASE_URL + '/webserver/userInfo/verifyUserLoginInfo.do' +const USER_UPDATE = BASE_URL + '/webserver/userInfo/modifyPersonPassword.do' +// 用户注册 +export function registerUser(data) { + return fetch.post(USER_REGISTER, data, {}, {'content-type': 'application/x-www-form-urlencoded'}).then(res => res); +} +// 用户登录 +export function loginUser(data) { + return fetch.post(USER_LOGIN, data, {}, {'content-type': 'application/x-www-form-urlencoded'}).then(res => res); +} +// 用户修改密码 +export function updateUser(data) { + return fetch.post(USER_UPDATE, data, {}, {'content-type': 'application/x-www-form-urlencoded'}).then(res => res); +} + + diff --git a/components/card.vue b/components/card.vue index 0075ba6..220556e 100644 --- a/components/card.vue +++ b/components/card.vue @@ -113,10 +113,11 @@ deep:true, handler(newVal){ if (this.currentShow) { + const userinfo = wx.getStorageSync('userInfoxj') // this.isVoteFlag = false const params = { rumorId:this.currentShow.id, // id - votePerson:localStorage.getItem('userIdentifying') // 用户唯一标识 + votePerson:userinfo.phone ?userinfo.phone : '123' // 用户唯一标识 } // 查询用户是否投票 isVote(params).then(res => { @@ -131,9 +132,10 @@ methods: { // 投票 vote(flag) { + const userinfo = wx.getStorageSync('userInfoxj') const params = { rumorId:this.currentShow.id, - votePerson:localStorage.getItem('userIdentifying'), // 用户唯一标识 + votePerson:userinfo.phone ?userinfo.phone : '123', // 用户唯一标识 status: flag ? '1' : '0' } addVote(params).then(res => { diff --git a/packageA/accountBound/accountBound.vue b/packageA/accountBound/accountBound.vue index 0c822b3..c856add 100644 --- a/packageA/accountBound/accountBound.vue +++ b/packageA/accountBound/accountBound.vue @@ -33,20 +33,30 @@ border="none" > - + + 确定 + + + + 还没账号?去注册 + +