Commit d2ed8a2b by ArronYR

modify api request

parent 211df7f9
......@@ -12,33 +12,6 @@ page{
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 {
color: rgb(191, 191, 191);
}
......
{}
\ No newline at end of file
{
"navigationBarTitleText": "微信授权"
}
\ No newline at end of file
<!--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({
},
getHomeData: function(callback) {
api.home.all({
token: app.globalData.token
}).then(res => {
api.home.all().then(res => {
this.setData({
news: res.data.newProjects,
heats: res.data.heatProjects,
......
......@@ -37,7 +37,7 @@
"list": []
},
"miniprogram": {
"current": 3,
"current": 4,
"list": [
{
"id": 0,
......@@ -60,7 +60,14 @@
{
"id": -1,
"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 = {
}
}
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 {
login,
shareTicket,
home,
guide
guide,
search
}
\ No newline at end of file
......@@ -38,7 +38,10 @@ class Request {
wx.request({
url: (this._baseUrl || '') + url,
method: method || METHOD.GET,
data: data,
data: {
token: wx.getStorageSync('token'),
...data
},
header: {
...this._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