diff --git a/components/card/index.wxml b/components/card/index.wxml index 8482000..a8ea1cd 100644 --- a/components/card/index.wxml +++ b/components/card/index.wxml @@ -1,5 +1,5 @@ - + {{title}} diff --git a/config.js b/config.js index 893d040..e2b108b 100644 --- a/config.js +++ b/config.js @@ -1,5 +1,5 @@ const config = { - // api_url: 'https://nei.netease.com/api/apimock/8290e3893033966572547b03f2ef3dbb/', // 服务器地址 + // api_url: 'http://192.168.42.44:8083/fqsb', // 服务器地址 api_url: 'http://121.42.41.42:8092/fqsb' } export { config } \ No newline at end of file diff --git a/models/auth.js b/models/auth.js index 0036232..49fd8c7 100644 --- a/models/auth.js +++ b/models/auth.js @@ -37,16 +37,18 @@ class AuthModel extends HTTP { this.request(params) } // 提交验证和注册 - register (phone, name, vscode, success) { + mobileRegister (phone, name, vscode, success) { let params = { url: AuthConst.verify_update_phone_url, method: Method.POST, data: { + isRegister: 1, phone: phone, realName: name, verificationCode: vscode, }, success: (data) => { + console.log(data) if (data) { success(data) } else { diff --git a/pages/article/index.wxml b/pages/article/index.wxml index 2b907ed..da2c9be 100644 --- a/pages/article/index.wxml +++ b/pages/article/index.wxml @@ -12,6 +12,6 @@ - + diff --git a/pages/billboards/park/park-list/index.wxml b/pages/billboards/park/park-list/index.wxml index b10ef67..8d07538 100644 --- a/pages/billboards/park/park-list/index.wxml +++ b/pages/billboards/park/park-list/index.wxml @@ -3,6 +3,7 @@ diff --git a/pages/billboards/policy/policy-list/index.js b/pages/billboards/policy/policy-list/index.js index e4a0df0..89ec41b 100644 --- a/pages/billboards/policy/policy-list/index.js +++ b/pages/billboards/policy/policy-list/index.js @@ -43,7 +43,7 @@ Page({ policy.fetchPolicyArtice(this.data.curCode, res => { console.log(res) this.setData({ - nodes: res.data.content + nodes: res.data.content || '' }) }) } diff --git a/pages/home/index.js b/pages/home/index.js index 4e10cea..2ef6cdc 100644 --- a/pages/home/index.js +++ b/pages/home/index.js @@ -98,7 +98,7 @@ Page({ console.log(item) tempBanners.push({ id: item.id, - image: 'http://m.360buyimg.com/mobilecms/s700x280_jfs/t1/45210/40/7669/143615/5d53b19dEc9559d0a/cd9eade239533517.jpg!cr_1125x445_0_171!q70.jpg.dpg' + image: item.titlePic }) }) this.setData({ @@ -134,10 +134,10 @@ Page({ }, clickListItem(e) { console.log(e.detail) - // this.gotoArticePage(e.detail.id) - wx.redirectTo({ - url: '/pages/register/index', - }) + this.gotoArticePage(e.detail.id) + // wx.redirectTo({ + // url: '/pages/register/index', + // }) }, gotoArticePage(id) { wx.navigateTo({ diff --git a/pages/register/index.js b/pages/register/index.js index d34db78..9077897 100644 --- a/pages/register/index.js +++ b/pages/register/index.js @@ -88,7 +88,8 @@ Page({ }, registerApi () { const {mobile, name, vcode} = this.data.formData - auth.register(modile, name, vcode, res => { + console.log(mobile,name, vcode) + auth.mobileRegister(mobile, name, vcode, res => { console.log(res) wx.reLaunch({ url: '/pages/home/index', diff --git a/utils/http.js b/utils/http.js index 0cb4a63..df9c871 100644 --- a/utils/http.js +++ b/utils/http.js @@ -36,7 +36,7 @@ class HTTP { let code = res.statusCode.toString() let startCode = code.charAt(0) if (startCode == '2') { - if (res.data.code == 200) { + if (res.data.code == 200 || res.data.code == 0) { params.success && params.success(res.data) } else { console.log('数据请求失败')