Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
walk_daka_h5
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
穆启卓
walk_daka_h5
Commits
af1b30e2
Commit
af1b30e2
authored
Mar 29, 2019
by
穆启卓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小细节
parent
e1496465
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
46 additions
and
81 deletions
+46
-81
Free.vue
src/components/Free.vue
+1
-1
Reborn.vue
src/components/Reborn.vue
+1
-1
api.js
src/components/axios/api.js
+30
-61
fetch.js
src/components/axios/fetch.js
+2
-2
url.js
src/components/axios/url.js
+1
-1
main.js
src/main.js
+1
-1
Author.vue
src/views/Author.vue
+9
-13
UserCenter.vue
src/views/UserCenter.vue
+1
-1
No files found.
src/components/Free.vue
View file @
af1b30e2
...
@@ -342,7 +342,7 @@
...
@@ -342,7 +342,7 @@
if
(
window
[
"userData"
])
{
if
(
window
[
"userData"
])
{
this
.
userData
=
window
[
"userData"
];
this
.
userData
=
window
[
"userData"
];
}
else
{
}
else
{
let
localUserData
=
localStorage
.
getItem
(
"
read
_userData"
);
let
localUserData
=
localStorage
.
getItem
(
"
walk
_userData"
);
if
(
localUserData
)
{
if
(
localUserData
)
{
window
[
"userData"
]
=
JSON
.
parse
(
localUserData
);
window
[
"userData"
]
=
JSON
.
parse
(
localUserData
);
this
.
userData
=
window
[
"userData"
];
this
.
userData
=
window
[
"userData"
];
...
...
src/components/Reborn.vue
View file @
af1b30e2
...
@@ -270,7 +270,7 @@
...
@@ -270,7 +270,7 @@
if
(
window
[
"userData"
])
{
if
(
window
[
"userData"
])
{
this
.
userData
=
window
[
"userData"
];
this
.
userData
=
window
[
"userData"
];
}
else
{
}
else
{
let
localUserData
=
localStorage
.
getItem
(
"
read
_userData"
);
let
localUserData
=
localStorage
.
getItem
(
"
walk
_userData"
);
if
(
localUserData
)
{
if
(
localUserData
)
{
window
[
"userData"
]
=
JSON
.
parse
(
localUserData
);
window
[
"userData"
]
=
JSON
.
parse
(
localUserData
);
this
.
userData
=
window
[
"userData"
];
this
.
userData
=
window
[
"userData"
];
...
...
src/components/axios/api.js
View file @
af1b30e2
...
@@ -17,9 +17,8 @@ function getPlatform() {
...
@@ -17,9 +17,8 @@ function getPlatform() {
//打卡查询
//打卡查询
export
function
dakaStatus
()
{
//lookOption是你要调用接口的名字,issuer,userId是传进来的参数
export
function
dakaStatus
()
{
//lookOption是你要调用接口的名字,issuer,userId是传进来的参数
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
dakaStatusPath
,
url
:
api
.
dakaStatusPath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
}
}
...
@@ -28,15 +27,12 @@ export function dakaStatus() { //lookOption是你要调用接口的名字,issu
...
@@ -28,15 +27,12 @@ export function dakaStatus() { //lookOption是你要调用接口的名字,issu
// 打卡操作
// 打卡操作
export
function
daka
(
use_rebirth
)
{
//lookOption是你要调用接口的名字,issuer,userId是传进来的参数
export
function
daka
(
use_rebirth
)
{
//lookOption是你要调用接口的名字,issuer,userId是传进来的参数
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
dakaPath
,
url
:
api
.
dakaPath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
use_rebirth
:
use_rebirth
||
0
,
use_rebirth
:
use_rebirth
||
0
,
}
}
})
})
}
}
...
@@ -44,9 +40,8 @@ export function daka(use_rebirth) { //lookOption是你要调用接口的名字
...
@@ -44,9 +40,8 @@ export function daka(use_rebirth) { //lookOption是你要调用接口的名字
// 打卡总计
// 打卡总计
export
function
dakaRecordTotal
()
{
export
function
dakaRecordTotal
()
{
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
dakaRecordsTotalPath
,
url
:
api
.
dakaRecordsTotalPath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
}
}
...
@@ -56,9 +51,8 @@ export function dakaRecordTotal() {
...
@@ -56,9 +51,8 @@ export function dakaRecordTotal() {
// 打卡记录列表
// 打卡记录列表
export
function
dakaRecordList
(
page
,
perpage
)
{
export
function
dakaRecordList
(
page
,
perpage
)
{
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
dakaRecordsListPath
,
url
:
api
.
dakaRecordsListPath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
// 第几页(从1开始)
// 第几页(从1开始)
...
@@ -72,9 +66,8 @@ export function dakaRecordList(page, perpage) {
...
@@ -72,9 +66,8 @@ export function dakaRecordList(page, perpage) {
// 打卡总计
// 打卡总计
export
function
dakaRecordDetail
(
page
,
perpage
,
period
,
daka
)
{
export
function
dakaRecordDetail
(
page
,
perpage
,
period
,
daka
)
{
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
dakaRecordsDetailPath
,
url
:
api
.
dakaRecordsDetailPath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
// 第几页(从1开始)
// 第几页(从1开始)
...
@@ -90,9 +83,8 @@ export function dakaRecordDetail(page, perpage, period, daka) {
...
@@ -90,9 +83,8 @@ export function dakaRecordDetail(page, perpage, period, daka) {
// 走马灯,玩法
// 走马灯,玩法
export
function
gameInfo
()
{
export
function
gameInfo
()
{
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
gameInfoPath
,
url
:
api
.
gameInfoPath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
}
}
...
@@ -102,9 +94,8 @@ export function gameInfo() {
...
@@ -102,9 +94,8 @@ export function gameInfo() {
// 余额查询
// 余额查询
export
function
balanceQuery
()
{
export
function
balanceQuery
()
{
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
balanceQueryPath
,
url
:
api
.
balanceQueryPath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
}
}
...
@@ -120,9 +111,8 @@ export function balanceWithdraw(money, code) {
...
@@ -120,9 +111,8 @@ export function balanceWithdraw(money, code) {
params
[
"money"
]
=
money
params
[
"money"
]
=
money
}
}
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
balanceWithdrawPath
,
url
:
api
.
balanceWithdrawPath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
params
params
:
params
})
})
}
}
...
@@ -130,9 +120,8 @@ export function balanceWithdraw(money, code) {
...
@@ -130,9 +120,8 @@ export function balanceWithdraw(money, code) {
// 常见问题
// 常见问题
export
function
faq
()
{
//lookOption是你要调用接口的名字,issuer,userId是传进来的参数
export
function
faq
()
{
//lookOption是你要调用接口的名字,issuer,userId是传进来的参数
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
faqPath
,
url
:
api
.
faqPath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
}
}
...
@@ -142,9 +131,8 @@ export function faq() { //lookOption是你要调用接口的名字,issuer,user
...
@@ -142,9 +131,8 @@ export function faq() { //lookOption是你要调用接口的名字,issuer,user
// 客服
// 客服
export
function
kefu
()
{
//lookOption是你要调用接口的名字,issuer,userId是传进来的参数
export
function
kefu
()
{
//lookOption是你要调用接口的名字,issuer,userId是传进来的参数
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
kefuPath
,
url
:
api
.
kefuPath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
}
}
...
@@ -154,9 +142,8 @@ export function kefu() { //lookOption是你要调用接口的名字,issuer,use
...
@@ -154,9 +142,8 @@ export function kefu() { //lookOption是你要调用接口的名字,issuer,use
// 关注公众号
// 关注公众号
export
function
ocFollow
()
{
//lookOption是你要调用接口的名字,issuer,userId是传进来的参数
export
function
ocFollow
()
{
//lookOption是你要调用接口的名字,issuer,userId是传进来的参数
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
ocFollowPath
,
url
:
api
.
ocFollowPath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
}
}
...
@@ -177,9 +164,8 @@ export function dakaPay(days,use_contract) {
...
@@ -177,9 +164,8 @@ export function dakaPay(days,use_contract) {
from_type
=
localStorage
.
getItem
(
'from_type'
);
from_type
=
localStorage
.
getItem
(
'from_type'
);
}
}
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
dakaPayPath
,
url
:
api
.
dakaPayPath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
// platform: ios, android, other
// platform: ios, android, other
...
@@ -195,9 +181,8 @@ export function dakaPay(days,use_contract) {
...
@@ -195,9 +181,8 @@ export function dakaPay(days,use_contract) {
// jssdk注入
// jssdk注入
export
function
jssdk
(
url
)
{
export
function
jssdk
(
url
)
{
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
jssdkPath
,
url
:
api
.
jssdkPath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
// platform: ios, android, other
// platform: ios, android, other
...
@@ -209,9 +194,8 @@ export function jssdk(url) {
...
@@ -209,9 +194,8 @@ export function jssdk(url) {
// 用户复活卡,免契约金卡信息
// 用户复活卡,免契约金卡信息
export
function
userCards
()
{
export
function
userCards
()
{
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
userCardPath
,
url
:
api
.
userCardPath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
}
}
...
@@ -221,9 +205,8 @@ export function userCards() {
...
@@ -221,9 +205,8 @@ export function userCards() {
// 获取分享内容
// 获取分享内容
export
function
shareContent
(
from_type
)
{
export
function
shareContent
(
from_type
)
{
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
shareContentPath
,
url
:
api
.
shareContentPath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
from_type
:
from_type
||
''
from_type
:
from_type
||
''
...
@@ -234,9 +217,8 @@ export function shareContent(from_type) {
...
@@ -234,9 +217,8 @@ export function shareContent(from_type) {
// 获取规则内容
// 获取规则内容
export
function
getRule
()
{
export
function
getRule
()
{
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
getRulePath
,
url
:
api
.
getRulePath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
from_type
:
from_type
||
''
from_type
:
from_type
||
''
...
@@ -248,9 +230,8 @@ export function getRule() {
...
@@ -248,9 +230,8 @@ export function getRule() {
// 数据埋点
// 数据埋点
export
function
track
(
key
)
{
export
function
track
(
key
)
{
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
trackingPath
,
url
:
api
.
trackingPath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
p
:
`study`
,
p
:
`study`
,
...
@@ -264,9 +245,8 @@ export function track(key) {
...
@@ -264,9 +245,8 @@ export function track(key) {
export
function
liinShare
(
key
)
{
export
function
liinShare
(
key
)
{
var
new_user
=
sessionStorage
.
getItem
(
'new_user'
)
?
1
:
0
;
var
new_user
=
sessionStorage
.
getItem
(
'new_user'
)
?
1
:
0
;
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
liinShareImagePath
,
url
:
api
.
liinShareImagePath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
new_user
:
new_user
new_user
:
new_user
...
@@ -277,9 +257,8 @@ export function liinShare(key) {
...
@@ -277,9 +257,8 @@ export function liinShare(key) {
// 每日分享图
// 每日分享图
export
function
dailyShare
(
from_type
)
{
export
function
dailyShare
(
from_type
)
{
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
dailyShareImagePath
,
url
:
api
.
dailyShareImagePath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
from_type
:
from_type
||
"daily_share"
from_type
:
from_type
||
"daily_share"
...
@@ -290,9 +269,8 @@ export function dailyShare(from_type) {
...
@@ -290,9 +269,8 @@ export function dailyShare(from_type) {
// 打卡排行榜
// 打卡排行榜
export
function
dakaRank
(
page
,
per_page
,
period
)
{
export
function
dakaRank
(
page
,
per_page
,
period
)
{
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
dakaRankPath
,
url
:
api
.
dakaRankPath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
page
:
page
||
1
,
page
:
page
||
1
,
...
@@ -305,9 +283,8 @@ export function dakaRank(page, per_page, period) {
...
@@ -305,9 +283,8 @@ export function dakaRank(page, per_page, period) {
// 新用户
// 新用户
export
function
firstDaka
()
{
export
function
firstDaka
()
{
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
firstDakaPath
,
url
:
api
.
firstDakaPath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{}
params
:
{}
})
})
}
}
...
@@ -315,9 +292,8 @@ export function firstDaka() {
...
@@ -315,9 +292,8 @@ export function firstDaka() {
// 个人排名
// 个人排名
export
function
personRank
(
period
)
{
export
function
personRank
(
period
)
{
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
personRankInfoPath
,
url
:
api
.
personRankInfoPath
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
period
:
period
period
:
period
}
}
...
@@ -327,9 +303,8 @@ export function personRank(period) {
...
@@ -327,9 +303,8 @@ export function personRank(period) {
// 用户当月打卡状态查询
// 用户当月打卡状态查询
export
function
daka_status_list
(
year_month
)
{
export
function
daka_status_list
(
year_month
)
{
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
daka_status_list
,
url
:
api
.
daka_status_list
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
year_month
:
year_month
||
""
year_month
:
year_month
||
""
}
}
...
@@ -339,9 +314,8 @@ export function daka_status_list(year_month) {
...
@@ -339,9 +314,8 @@ export function daka_status_list(year_month) {
// 每日故事详情
// 每日故事详情
export
function
story_detail
(
story_id
,
story_index
)
{
export
function
story_detail
(
story_id
,
story_index
)
{
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
story_detail
,
url
:
api
.
story_detail
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
story_id
:
story_id
,
story_id
:
story_id
,
story_index
:
story_index
,
story_index
:
story_index
,
...
@@ -352,9 +326,8 @@ export function story_detail(story_id, story_index) {
...
@@ -352,9 +326,8 @@ export function story_detail(story_id, story_index) {
// 每日故事列表
// 每日故事列表
export
function
story_list
()
{
export
function
story_list
()
{
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
story_list
,
url
:
api
.
story_list
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{}
params
:
{}
})
})
}
}
...
@@ -363,9 +336,8 @@ export function story_list() {
...
@@ -363,9 +336,8 @@ export function story_list() {
// 记录详情
// 记录详情
export
function
daka_records_detail
(
course_id
)
{
export
function
daka_records_detail
(
course_id
)
{
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
daka_records_detail
,
url
:
api
.
daka_records_detail
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
course_id
:
course_id
,
course_id
:
course_id
,
...
@@ -376,9 +348,8 @@ export function daka_records_detail(course_id) {
...
@@ -376,9 +348,8 @@ export function daka_records_detail(course_id) {
// 记录详情
// 记录详情
export
function
daka_rule
()
{
export
function
daka_rule
()
{
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
daka_rule
,
url
:
api
.
daka_rule
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
//传过去的参数
//传过去的参数
}
}
...
@@ -389,9 +360,8 @@ export function daka_rule() {
...
@@ -389,9 +360,8 @@ export function daka_rule() {
// 红包图片
// 红包图片
export
function
withdraw_img
(
position
)
{
export
function
withdraw_img
(
position
)
{
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
withdraw_img
,
url
:
api
.
withdraw_img
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
position
:
position
||
""
position
:
position
||
""
}
}
...
@@ -401,9 +371,8 @@ export function withdraw_img(position) {
...
@@ -401,9 +371,8 @@ export function withdraw_img(position) {
// 资金明细
// 资金明细
export
function
withdraw_log
(
page
)
{
export
function
withdraw_log
(
page
)
{
return
fetch
({
return
fetch
({
//api.Hallowmas 引用url.js里面的数据
url
:
api
.
withdraw_log
,
url
:
api
.
withdraw_log
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
page
:
page
,
page
:
page
,
per_page
:
10
per_page
:
10
...
@@ -415,7 +384,7 @@ export function withdraw_log(page) {
...
@@ -415,7 +384,7 @@ export function withdraw_log(page) {
export
function
daka_index
(
grade
)
{
export
function
daka_index
(
grade
)
{
return
fetch
({
return
fetch
({
url
:
api
.
daka_index
,
url
:
api
.
daka_index
,
method
:
'GET'
,
//请求方法
method
:
'GET'
,
params
:
{
params
:
{
grade
:
grade
grade
:
grade
}
}
...
...
src/components/axios/fetch.js
View file @
af1b30e2
...
@@ -2,7 +2,7 @@ import axios from 'axios';//引入axios
...
@@ -2,7 +2,7 @@ import axios from 'axios';//引入axios
export
function
fetch
(
options
)
{
export
function
fetch
(
options
)
{
// if (!window['userData']) {
// if (!window['userData']) {
// let user_data_str = localStorage.getItem('
read
_userData');
// let user_data_str = localStorage.getItem('
walk
_userData');
// if (user_data_str) {
// if (user_data_str) {
// window['userData'] = JSON.parse(user_data_str);
// window['userData'] = JSON.parse(user_data_str);
// }
// }
...
@@ -34,7 +34,7 @@ export function fetch(options) {
...
@@ -34,7 +34,7 @@ export function fetch(options) {
// console.log(error);
// console.log(error);
// if (error.response.status == 401) {
// if (error.response.status == 401) {
// localStorage.setItem('last_url', location.hash.slice(1));
// localStorage.setItem('last_url', location.hash.slice(1));
// localStorage.setItem('
read
_userData', '');
// localStorage.setItem('
walk
_userData', '');
// location.replace('#/Author');
// location.replace('#/Author');
// // this.$router.push({name:"Author"})
// // this.$router.push({name:"Author"})
// } else {
// } else {
...
...
src/components/axios/url.js
View file @
af1b30e2
...
@@ -77,7 +77,7 @@ export default {
...
@@ -77,7 +77,7 @@ export default {
daka_records_detail
:
`
${
api
}
/api/v1/daka_records/detail`
,
daka_records_detail
:
`
${
api
}
/api/v1/daka_records/detail`
,
// 25 规则详情
// 25 规则详情
daka_rule
:
`
${
api
}
/api/v1/daka_rule`
,
daka_rule
:
`
${
api
}
/api/v1/daka_rule`
,
// 26 红包 /api/v1/withdraw_img
// 26 红包 /api/v1/withdraw_img
withdraw_img
:
`
${
api
}
/api/v1/withdraw_img`
,
withdraw_img
:
`
${
api
}
/api/v1/withdraw_img`
,
// 27 提现明细 /api/v1/withdraw_log
// 27 提现明细 /api/v1/withdraw_log
withdraw_log
:
`
${
api
}
/api/v1/withdraw_log`
,
withdraw_log
:
`
${
api
}
/api/v1/withdraw_log`
,
...
...
src/main.js
View file @
af1b30e2
...
@@ -17,7 +17,7 @@ window.wx = wx;
...
@@ -17,7 +17,7 @@ window.wx = wx;
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
// document.title = to.meta.title //修改各个页面的title
// document.title = to.meta.title //修改各个页面的title
var
uid
=
localStorage
.
getItem
(
'
read
_userData'
);
var
uid
=
localStorage
.
getItem
(
'
walk
_userData'
);
if
(
location
.
search
.
match
(
/inviter/
))
{
if
(
location
.
search
.
match
(
/inviter/
))
{
let
searchs
=
location
.
search
.
split
(
'&'
);
let
searchs
=
location
.
search
.
split
(
'&'
);
let
search_obj
=
{};
let
search_obj
=
{};
...
...
src/views/Author.vue
View file @
af1b30e2
...
@@ -7,6 +7,11 @@
...
@@ -7,6 +7,11 @@
// var url = getToUrl();
// var url = getToUrl();
export
default
{
export
default
{
name
:
"Author"
,
name
:
"Author"
,
data
()
{
return
{
uid
:
""
};
},
created
()
{
created
()
{
document
.
title
=
"微信授权中"
;
document
.
title
=
"微信授权中"
;
var
code
=
this
.
GetUrlParame
(
"code"
);
// 截取code
var
code
=
this
.
GetUrlParame
(
"code"
);
// 截取code
...
@@ -14,18 +19,14 @@
...
@@ -14,18 +19,14 @@
if
(
!
code
)
{
if
(
!
code
)
{
let
local_hash
=
location
.
hash
;
let
local_hash
=
location
.
hash
;
window
.
localStorage
.
setItem
(
"local_hash"
,
local_hash
);
window
.
localStorage
.
setItem
(
"local_hash"
,
local_hash
);
let
redirect_uri
=
encodeURIComponent
(
let
redirect_uri
=
encodeURIComponent
(
`
${
location
.
origin
}${
location
.
pathname
}
`
);
`
${
location
.
origin
}${
location
.
pathname
}
`
location
.
replace
(
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx9af64967a0d40159&redirect_uri=
${
redirect_uri
}
&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
);
);
location
.
replace
(
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx9af64967a0d40159&redirect_uri=
${
redirect_uri
}
&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
);
}
else
{
}
else
{
console
.
log
(
"拿到code"
,
code
);
console
.
log
(
"拿到code"
,
code
);
console
.
log
(
"请求登录"
);
console
.
log
(
"请求登录"
);
let
inviter
=
localStorage
.
getItem
(
"inviter"
);
let
inviter
=
localStorage
.
getItem
(
"inviter"
);
var
uid
=
localStorage
.
getItem
(
'
read
_userData'
);
var
uid
=
localStorage
.
getItem
(
'
walk
_userData'
);
if
(
uid
&&
inviter
==
JSON
.
parse
(
uid
).
id
)
{
if
(
uid
&&
inviter
==
JSON
.
parse
(
uid
).
id
)
{
inviter
=
""
;
inviter
=
""
;
}
}
...
@@ -46,7 +47,7 @@
...
@@ -46,7 +47,7 @@
}
}
let
result
=
res
.
data
;
let
result
=
res
.
data
;
if
(
result
.
code
==
0
)
{
if
(
result
.
code
==
0
)
{
localStorage
.
setItem
(
"
read
_userData"
,
JSON
.
stringify
(
result
.
data
));
localStorage
.
setItem
(
"
walk
_userData"
,
JSON
.
stringify
(
result
.
data
));
sessionStorage
.
setItem
(
"new_user"
,
result
.
data
.
new_user
);
sessionStorage
.
setItem
(
"new_user"
,
result
.
data
.
new_user
);
let
last_url
=
localStorage
.
getItem
(
"last_url"
)
||
"/"
;
let
last_url
=
localStorage
.
getItem
(
"last_url"
)
||
"/"
;
let
url
=
location
.
href
.
split
(
"#"
)[
0
];
let
url
=
location
.
href
.
split
(
"#"
)[
0
];
...
@@ -65,11 +66,6 @@
...
@@ -65,11 +66,6 @@
});
});
}
}
},
},
data
()
{
return
{
uid
:
""
};
},
methods
:
{
methods
:
{
// 截取code
// 截取code
GetUrlParame
(
parameName
)
{
GetUrlParame
(
parameName
)
{
...
...
src/views/UserCenter.vue
View file @
af1b30e2
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
Title
Title
},
},
created
()
{
created
()
{
let
userData
=
localStorage
.
getItem
(
"
read
_userData"
)
let
userData
=
localStorage
.
getItem
(
"
walk
_userData"
)
if
(
userData
)
{
if
(
userData
)
{
this
.
userData
=
JSON
.
parse
(
userData
)
this
.
userData
=
JSON
.
parse
(
userData
)
}
}
...
...
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