Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wxapp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
亲子游项目
wxapp
Commits
d2ed8a2b
Commit
d2ed8a2b
authored
Sep 26, 2018
by
ArronYR
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify api request
parent
211df7f9
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
37 deletions
+35
-37
app.wxss
+0
-27
pages/auth/index.json
+4
-2
pages/auth/index.wxml
+5
-1
pages/index/index.js
+1
-3
project.config.json
+9
-2
utils/Api.js
+12
-1
utils/Request.js
+4
-1
No files found.
app.wxss
View file @
d2ed8a2b
...
@@ -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);
}
}
...
...
pages/auth/index.json
View file @
d2ed8a2b
{}
{
\ No newline at end of file
"navigationBarTitleText"
:
"微信授权"
}
\ No newline at end of file
pages/auth/index.wxml
View file @
d2ed8a2b
<!--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
pages/index/index.js
View file @
d2ed8a2b
...
@@ -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
,
...
...
project.config.json
View file @
d2ed8a2b
...
@@ -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"
:
""
}
}
]
]
}
}
...
...
utils/Api.js
View file @
d2ed8a2b
...
@@ -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
utils/Request.js
View file @
d2ed8a2b
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment