Commit 7741b889 authored by lizhan's avatar lizhan

📝 【TASK-20240806-01】TASK:APP个人信息国家城市增加

parent 831b3483
NODE_ENV = development NODE_ENV = development
# 捷道管理系统/本地开发环境 # 捷道管理系统/本地开发环境
VUE_APP_BASE_API = 'https://api.jd.jdshangmen.com' VUE_APP_BASE_API = 'https://apitest.groupage.cn'
This diff is collapsed.
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
for(let i in res.data){ for(let i in res.data){
this.areaData.push(res.data[i].tel) this.areaData.push(res.data[i].tel)
if(this.$lang.locale=='zh'){ if(this.$lang.locale=='zh'){
this.areaName.push('+'+res.data[i].tel + ' ' + res.data[i].nameZh) this.areaName.push('+'+res.data[i].tel + ' ' + res.data[i].nameZh)
}else{ }else{
this.areaName.push('+'+res.data[i].tel + ' ' + res.data[i].nameEn) this.areaName.push('+'+res.data[i].tel + ' ' + res.data[i].nameEn)
} }
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
return false return false
} }
this.ismobile(this.areaData[this.areaIndex],this.mobile) this.ismobile(this.areaData[this.areaIndex],this.mobile)
}, },
countDown() { countDown() {
this.leftTime-- this.leftTime--
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
let params = { let params = {
areaCode: this.areaData[this.areaIndex], areaCode: this.areaData[this.areaIndex],
code: this.code, code: this.code,
englishName: 'Nick', englishName: '',
mobile: this.mobile, mobile: this.mobile,
password: this.password, password: this.password,
} }
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
icon: 'none', icon: 'none',
}) })
} }
this.$request.post('/app-api/member/reg', params).then(res => { this.$request.post('/app-api/member/reg', params).then(res => {
if(res.code == 0&&res.data){ if(res.code == 0&&res.data){
uni.setStorageSync('Authorization', res.data.token) uni.setStorageSync('Authorization', res.data.token)
......
This diff is collapsed.
This diff is collapsed.
// const domain = 'https://api2.groupage.cn' const domain = 'https://api2.groupage.cn'
// const domain = 'https://api.jd.jdshangmen.com' // const domain = 'https://api.jd.jdshangmen.com'
// const domain = 'https://api.sit.jdshangmen.com' // const domain = 'https://api.sit.jdshangmen.com'
// const domain = 'https://api2.groupage.cn' // const domain = 'https://api2.groupage.cn'
const domain = 'https://apitest.groupage.cn'
const config = { const config = {
CDN_DOMAIN: domain, CDN_DOMAIN: domain,
API: domain API: domain,
} }
export default config export default config
...@@ -69,18 +69,10 @@ function callback(resolve, reject, response) { ...@@ -69,18 +69,10 @@ function callback(resolve, reject, response) {
}) })
} }
if (data.code == 401) { if (data.code == 401) {
let pages = getCurrentPages() // 获取栈实例 store.commit('logout')
uni.reLaunch({
if(pages.length>1){ url: '/pages/login/login'
let prevPage = pages[pages.length - 2] })
if(!prevPage||prevPage.route!='pages/login/login'){
store.commit('logout')
uni.reLaunch({
url: '/pages/login/login'
})
}
}
} }
resolve(data) resolve(data)
} else { } else {
...@@ -157,7 +149,7 @@ const deleted = (url, param) => { ...@@ -157,7 +149,7 @@ const deleted = (url, param) => {
}) })
} }
const goPage = (url, type = 1) => { const goPage = (url, type = 1) => {
if(type == 1){ if(type == 1){
uni.navigateTo({ uni.navigateTo({
url: url, url: url,
...@@ -179,7 +171,7 @@ const backGo = () => { ...@@ -179,7 +171,7 @@ const backGo = () => {
uni.navigateBack() uni.navigateBack()
} }
const getLocalTime = (nS) => { const getLocalTime = (nS) => {
if(!nS){ if(!nS){
return '' return ''
} }
...@@ -195,18 +187,18 @@ const getLocalTime = (nS) => { ...@@ -195,18 +187,18 @@ const getLocalTime = (nS) => {
day = day > 9 ? day : '0' + day; day = day > 9 ? day : '0' + day;
min = min > 9 ? min : '0' + min; min = min > 9 ? min : '0' + min;
sec = sec > 9 ? sec : '0' + sec; sec = sec > 9 ? sec : '0' + sec;
return `${year}-${month}-${day} ${hour}:${min}:${sec}`; return `${year}-${month}-${day} ${hour}:${min}:${sec}`;
} }
const getDate = (nS) => { const getDate = (nS) => {
const date = new Date(nS); const date = new Date(nS);
let year = date.getFullYear(); let year = date.getFullYear();
let month = date.getMonth() + 1; let month = date.getMonth() + 1;
let day = date.getDate(); let day = date.getDate();
month = month > 9 ? month : '0' + month; month = month > 9 ? month : '0' + month;
return `${year}-${month}-${day}`; return `${year}-${month}-${day}`;
} }
const checkFormData = (params, rules) => { const checkFormData = (params, rules) => {
for(let i in params){ for(let i in params){
if(params[i] == '' || params[i] == 0){ if(params[i] == '' || params[i] == 0){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment