Commit d2ed8a2b by ArronYR

modify api request

parent 211df7f9
...@@ -12,33 +12,6 @@ page{ ...@@ -12,33 +12,6 @@ page{
box-sizing: border-box; box-sizing: border-box;
} }
/* 用于收集 formid 的 button 样式 */
button.form-button {
background-color: transparent;
padding: 0;
margin: 0;
display: inline;
position: static;
border: 0;
padding-left: 0;
padding-right: 0;
border-radius: 0;
font-size: 0;
text-align: left;
line-height: normal;
}
button.form-button::after {
content: '';
width: 0;
height: 0;
-webkit-transform: scale(1);
transform: scale(1);
display: none;
background-color: transparent;
}
.text-gray { .text-gray {
color: rgb(191, 191, 191); color: rgb(191, 191, 191);
} }
......
{} {
\ No newline at end of file "navigationBarTitleText": "微信授权"
}
\ No newline at end of file
<!--pages/auth/index.wxml--> <!--pages/auth/index.wxml-->
<text>pages/auth/index.wxml</text>
<view class='v-page'>
</view>
\ No newline at end of file
...@@ -75,9 +75,7 @@ Page({ ...@@ -75,9 +75,7 @@ Page({
}, },
getHomeData: function(callback) { getHomeData: function(callback) {
api.home.all({ api.home.all().then(res => {
token: app.globalData.token
}).then(res => {
this.setData({ this.setData({
news: res.data.newProjects, news: res.data.newProjects,
heats: res.data.heatProjects, heats: res.data.heatProjects,
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"current": 3, "current": 4,
"list": [ "list": [
{ {
"id": 0, "id": 0,
...@@ -60,7 +60,14 @@ ...@@ -60,7 +60,14 @@
{ {
"id": -1, "id": -1,
"name": "搜索", "name": "搜索",
"pathName": "pages/search/index" "pathName": "pages/search/index",
"query": ""
},
{
"id": 4,
"name": "授权",
"pathName": "pages/auth/index",
"query": ""
} }
] ]
} }
......
...@@ -50,9 +50,19 @@ export const me = { ...@@ -50,9 +50,19 @@ export const me = {
} }
} }
export const search = {
index: params => {
return req.post('project/index', params).then(res => res.data)
},
filter: params => {
return req.post('project/searchCondition', params).then(res => res.data)
}
}
export default { export default {
login, login,
shareTicket, shareTicket,
home, home,
guide guide,
search
} }
\ No newline at end of file
...@@ -38,7 +38,10 @@ class Request { ...@@ -38,7 +38,10 @@ class Request {
wx.request({ wx.request({
url: (this._baseUrl || '') + url, url: (this._baseUrl || '') + url,
method: method || METHOD.GET, method: method || METHOD.GET,
data: data, data: {
token: wx.getStorageSync('token'),
...data
},
header: { header: {
...this._header, ...this._header,
...header ...header
......
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