Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
ybf
Project
Project
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
xulili
ybf
Commits
b1beab30
Commit
b1beab30
authored
5 years ago
by
xd
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突4。8
parents
9b0dbe03
305c6a7e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
44 deletions
+91
-44
activeDetail.vue
wx_application/src/views/active/activeDetail.vue
+44
-0
index.vue
wx_application/src/views/mainSale/active/main/index.vue
+47
-44
No files found.
wx_application/src/views/active/activeDetail.vue
View file @
b1beab30
...
...
@@ -78,6 +78,7 @@ export default {
components
:
{},
data
()
{
return
{
code
:
''
,
type
:
"coupon"
,
freeze
:
false
,
rolling
:
false
,
...
...
@@ -119,6 +120,9 @@ export default {
},
created
()
{
this
.
type
=
this
.
$route
.
query
.
type
;
// 检测用户身份
// 获取code
this
.
zReadyUserId
()
},
watch
:
{
prizeNumber
()
{
...
...
@@ -136,6 +140,46 @@ export default {
}
},
methods
:
{
zReadyUserId
()
{
if
(
this
.
$route
.
query
.
code
===
undefined
)
{
alert
(
"没code"
);
console
.
log
(
'code'
,
this
.
$route
.
query
.
code
);
this
.
zTestPreAuthCode
();
}
else
{
alert
(
"有code"
);
// this.zTestGetNowUrlInfo();
// this.zTestGetUserInfoByOldToken();
}
},
// 获取code
zTestPreAuthCode
()
{
// alert('获取code')
const
basicInfo
=
{
head
:
"https://open.weixin.qq.com/connect/oauth2/authorize?"
,
// appId: "wwd1cdbca7b8b2b6c4",
appId
:
"ww4df265003b43fa0d"
,
redirectUrI
:
encodeURIComponent
(
"oysales.oywanhao.com:8087/activeDetail?id=2&type=wheel"
),
responseType
:
"code"
,
scope
:
"snsapi_base"
,
state
:
"ztest"
,
tail
:
"#wechat_redirect"
};
let
url
=
basicInfo
.
head
+
"appid="
+
basicInfo
.
appId
+
"&redirect_uri="
+
basicInfo
.
redirectUrI
+
"&response_type="
+
basicInfo
.
responseType
+
"&scope="
+
basicInfo
.
scope
+
"&state="
+
basicInfo
.
state
+
basicInfo
.
tail
;
window
.
location
.
href
=
url
;
},
Start_Game
()
{
this
.
rolling
=
true
;
const
{
wheelDeg
,
prizeList
}
=
this
;
...
...
This diff is collapsed.
Click to expand it.
wx_application/src/views/mainSale/active/main/index.vue
View file @
b1beab30
...
...
@@ -23,7 +23,7 @@
<!--
<div
class=
"menu"
>
<img
class=
"menu-logo"
:src=
"test.menuInfo.icon['1']"
/>
<div
class=
"menu-text"
>
优惠券核销
</div>
</div>
-->
</div>
-->
<div
class=
"menu"
@
click=
"menu02Click"
>
<img
class=
"menu-logo"
:src=
"test.menuInfo.icon['2']"
/>
<div
class=
"menu-text"
>
任务列表
</div>
...
...
@@ -111,9 +111,9 @@
</
template
>
<
script
>
import
axios
from
"axios"
import
axios
from
"axios"
;
import
{
getStoreDetail
}
from
"@/api/sidebar/voucher"
;
import
{
configWx
,
getUserInfo
}
from
"@/utils/aCommon"
import
{
configWx
,
getUserInfo
}
from
"@/utils/aCommon"
;
import
{
getUserInfoByUserId
}
from
"@/api/sidebar/voucher"
;
export
default
{
name
:
"discountIndex"
,
...
...
@@ -191,12 +191,11 @@ export default {
"5"
:
"/mainSale/icon-menuBar-5-ac.png"
}
}
},
}
},
dis
:
{},
oyStallCode
:
''
,
userId
:
''
,
oyStallCode
:
""
,
userId
:
""
,
zcache
:
{
nowUrl
:
""
,
preAuthCodeUrl
:
""
,
...
...
@@ -205,7 +204,7 @@ export default {
userInfoResOld
:
""
,
userInfoResNew
:
""
}
}
}
;
},
created
()
{
if
(
sessionStorage
.
getItem
(
'personalFan'
))
{
...
...
@@ -225,8 +224,6 @@ export default {
this
.
zTestGetNowUrlInfo
()
// this.oyStallCode = sessionStorage.getItem('oyStallCode')
// this.userId = sessionStorage.getItem('userId')
},
methods
:
{
// 获取用户信息
...
...
@@ -237,7 +234,9 @@ export default {
};
axios
({
url
:
"http://139.155.48.151:8085/workWx/auth/user/get?userId="
+
this
.
zcache
.
userId
,
url
:
"http://139.155.48.151:8085/workWx/auth/user/get?userId="
+
this
.
zcache
.
userId
,
method
:
"get"
,
headers
:
headerData
})
...
...
@@ -248,17 +247,19 @@ export default {
sessionStorage
.
setItem
(
"avatar"
,
res
.
data
.
data
.
avatar
)
})
.
catch
(
err
=>
{
console
.
log
(
err
)
console
.
log
(
err
)
;
});
},
getFans
()
{
let
headerData
=
{
let
headerData
=
{
agentId
:
"1000033"
,
corpId
:
"ww4df265003b43fa0d"
};
axios
({
url
:
"http://139.155.48.151:8085/workWx/auth/contact/listExternalContacts?userId="
+
this
.
zcache
.
userId
,
url
:
"http://139.155.48.151:8085/workWx/auth/contact/listExternalContacts?userId="
+
this
.
zcache
.
userId
,
method
:
"get"
,
headers
:
headerData
})
...
...
@@ -268,19 +269,19 @@ export default {
})
.
catch
(
err
=>
{
console
.
log
(
err
);
});
});
},
// 获取店铺信息
getStore
()
{
let
params
=
{
oyStallCode
:
this
.
oyStallCode
}
}
;
getStoreDetail
(
params
).
then
(
res
=>
{
if
(
res
.
data
.
stallInfo
!=
null
)
{
this
.
test
.
manInfo
.
barName
=
res
.
data
.
stallInfo
.
name
sessionStorage
.
setItem
(
"barName"
,
res
.
data
.
stallInfo
.
name
)
}
})
})
;
},
checkNowMenuBar
()
{
let
inData
=
"1"
;
...
...
@@ -290,13 +291,13 @@ export default {
manInfoClick
()
{
this
.
$router
.
push
(
"counterInfo"
);
},
switchBarClick
()
{
switchBarClick
()
{
this
.
$router
.
push
({
path
:
'ChangeCounter'
,
query
:{
path
:
"ChangeCounter"
,
query
:
{
userId
:
this
.
zcache
.
userId
}
})
})
;
},
testButtonClick
()
{},
menu01Click
()
{},
...
...
@@ -332,9 +333,9 @@ export default {
},
// 获取code
zReadyUserId
()
{
if
(
this
.
$route
.
query
.
code
===
undefined
){
if
(
this
.
$route
.
query
.
code
===
undefined
)
{
// alert('没code')
this
.
zTestPreAuthCode
()
this
.
zTestPreAuthCode
()
;
}
else
{
// alert('有code')
this
.
zTestGetNowUrlInfo
();
...
...
@@ -345,9 +346,9 @@ export default {
zTestGetNowUrlInfo
()
{
this
.
zcache
.
nowUrl
=
JSON
.
stringify
(
this
.
$route
.
query
);
this
.
zcache
.
code
=
String
(
this
.
$route
.
query
.
code
);
this
.
url
=
this
.
zcache
.
nowUrl
this
.
url
=
this
.
zcache
.
nowUrl
;
},
zTestPreAuthCode
()
{
zTestPreAuthCode
()
{
// alert('获取code')
const
basicInfo
=
{
head
:
"https://open.weixin.qq.com/connect/oauth2/authorize?"
,
...
...
@@ -379,39 +380,41 @@ export default {
// 测试-获取用户信息
zTestGetUserInfoByOldToken
()
{
let
postData
=
{
code
:
this
.
zcache
.
code
,
code
:
this
.
zcache
.
code
};
let
headerData
=
{
agentId
:
"1000033"
,
corpId
:
"ww4df265003b43fa0d"
};
this
.
zcache
.
userInfoResOld
=
"PostData:"
+
JSON
.
stringify
(
postData
)
this
.
zcache
.
userInfoResOld
=
"PostData:"
+
JSON
.
stringify
(
postData
)
;
axios
({
url
:
"http://139.155.48.151:8085/workWx/auth/oauth2/getUserInfo?code="
+
this
.
zcache
.
code
,
url
:
"http://139.155.48.151:8085/workWx/auth/oauth2/getUserInfo?code="
+
this
.
zcache
.
code
,
method
:
"post"
,
headers
:
headerData
,
headers
:
headerData
})
.
then
(
res
=>
{
// alert('获取用户信息接口成功')
sessionStorage
.
setItem
(
"userId"
,
String
(
res
.
data
.
data
.
userId
))
this
.
zcache
.
userId
=
String
(
res
.
data
.
data
.
userId
)
this
.
getUserFromId
(
this
.
zcache
.
userId
)
this
.
getUserInfo
()
// alert('获取用户信息接口成功')
sessionStorage
.
setItem
(
"userId"
,
String
(
res
.
data
.
data
.
userId
))
;
this
.
zcache
.
userId
=
String
(
res
.
data
.
data
.
userId
)
;
this
.
getUserFromId
(
this
.
zcache
.
userId
)
;
this
.
getUserInfo
()
;
})
.
catch
(
err
=>
{
console
.
log
(
err
)
console
.
log
(
err
)
;
});
},
getUserFromId
(
id
)
{
let
userName
=
id
getUserInfoByUserId
({
userName
})
.
then
(
res
=>
{
sessionStorage
.
setItem
(
"oyStallCode"
,
res
.
data
[
0
].
oyStallCode
)
this
.
oyStallCode
=
res
.
data
[
0
].
oyStallCode
this
.
getStore
()
this
.
getFans
()
})
.
catch
(
err
=>
{
})
let
userName
=
id
;
getUserInfoByUserId
({
userName
})
.
then
(
res
=>
{
sessionStorage
.
setItem
(
"oyStallCode"
,
res
.
data
[
0
].
oyStallCode
);
this
.
oyStallCode
=
res
.
data
[
0
].
oyStallCode
;
this
.
getStore
();
this
.
getFans
();
})
.
catch
(
err
=>
{});
}
}
};
...
...
This diff is collapsed.
Click to expand it.
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