Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
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
8b97b417
Commit
8b97b417
authored
Mar 24, 2020
by
xd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
侧边栏问题
parent
4af8a81c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
78 additions
and
19 deletions
+78
-19
WW_verify_NdQI4DAtoC9jyfXm.txt
wx_application/WW_verify_NdQI4DAtoC9jyfXm.txt
+0
-1
WW_verify_ovlGwUtiSAgGUQLs.txt
wx_application/WW_verify_ovlGwUtiSAgGUQLs.txt
+1
-0
index.html
ybf_wx/public/register/index.html
+3
-2
aCommon.js
ybf_wx/src/utils/aCommon.js
+5
-6
home.vue
ybf_wx/src/views/home.vue
+22
-6
index.vue
ybf_wx/src/views/sideNav/discount/index.vue
+3
-3
index.vue
ybf_wx/src/views/sideNav/register/index.vue
+44
-1
No files found.
wx_application/WW_verify_NdQI4DAtoC9jyfXm.txt
deleted
100644 → 0
View file @
4af8a81c
NdQI4DAtoC9jyfXm
\ No newline at end of file
wx_application/WW_verify_ovlGwUtiSAgGUQLs.txt
0 → 100644
View file @
8b97b417
ovlGwUtiSAgGUQLs
\ No newline at end of file
ybf_wx/public/register/index.html
View file @
8b97b417
...
...
@@ -48,14 +48,15 @@
</div>
</div>
<script>
getAgentAuth
()
$
(
function
()
{
showQRInfo
()
});
const
showQRInfo
=
()
=>
{
// let pageUri = `${nowUrl}&detailid=${voucherId}&actionid=${activeId}&unionid=${unionId}`;
let
storecode
=
"181"
let
pageUri
=
`pages/user/register/register?storeCode=
${
storecode
}
`
;
let
pageUri
=
`pages/user/register/register?storeCode=
${
storecode
}
`
;
let
pageUrl
=
`http://139.155.48.151:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=
${
pageUri
}
`
;
$
.
ajax
({
...
...
ybf_wx/src/utils/aCommon.js
View file @
8b97b417
...
...
@@ -84,7 +84,7 @@ Vue.prototype.getAgentAuth = function () {
let
config
=
res
.
data
wx
.
config
({
beta
:
true
,
debug
:
fals
e
,
//调试的时候可以开启
debug
:
tru
e
,
//调试的时候可以开启
appId
:
config
.
jsApiSignature
.
appId
,
// 必填,公众号的唯一标识
timestamp
:
config
.
jsApiSignature
.
timestamp
,
// 必填,生成签名的时间戳
nonceStr
:
config
.
jsApiSignature
.
nonceStr
,
// 必填,生成签名的随机串
...
...
@@ -96,11 +96,11 @@ Vue.prototype.getAgentAuth = function () {
// alert(`--->zCommon.js: getJsSdkSignature: then: wx.config: end.`)
wx
.
ready
(
function
()
{
zlog
(
'%c--->getAgentAuth: getJsSdkSignature: Ready.'
,
'color: red;'
)
//
alert(`--->zCommon.js: getJsSdkSignature: then: wx.ready: IN.`)
alert
(
`--->zCommon.js: getJsSdkSignature: then: wx.ready: IN.`
)
// JS-SDK配置信息验证失败时会进入此方法
wx
.
error
(
function
(
res
)
{
//
alert("JS-SDK配置信息验证失败 \r\n" + JSON.stringify(res));
alert
(
"JS-SDK配置信息验证失败
\
r
\n
"
+
JSON
.
stringify
(
res
));
})
// 配置成功后验证API接口在当前客户端是否支持:判断当前客户端版本是否支持指定JS接口
...
...
@@ -109,7 +109,7 @@ Vue.prototype.getAgentAuth = function () {
jsApiList
:
[
'agentConfig'
,
'sendChatMessage'
],
success
:
function
(
res
)
{
if
(
res
.
errMsg
!=
"checkJsApi:ok"
)
{
//
alert("JS-SDK接口检测失败:" + JSON.stringify(res));
alert
(
"JS-SDK接口检测失败:"
+
JSON
.
stringify
(
res
));
return
false
;
}
else
{
wxRequest
(
'/workWx/auth/base/getAgentJsSdkSignature'
,
qs
.
stringify
(
postData
),
header
)
...
...
@@ -135,7 +135,7 @@ Vue.prototype.getAgentAuth = function () {
// 回调
//1、发起申请申请时后,审批状态发生变化时
//2、发起申请申请时后,在“审批中”状态,有任意审批人进行审批操作时
//
alert('wx.agentConfig 回调'+res.errMsg);
alert
(
'wx.agentConfig 回调'
+
res
.
errMsg
);
},
fail
:
function
(
res
)
{
// alert('回调失败:'+res.errMsg)
...
...
@@ -144,7 +144,6 @@ Vue.prototype.getAgentAuth = function () {
}
}
})
}
})
.
catch
(
err
=>
{
...
...
ybf_wx/src/views/home.vue
View file @
8b97b417
...
...
@@ -2,7 +2,7 @@
<div
class=
"main"
>
<div
class=
"lists"
>
<div
v-for=
"(item, index) of list.main"
:key=
"index"
>
<div
class=
"list"
@
click=
"listClick(item.redirect)"
>
<div
class=
"list"
@
click=
"listClick(item
,item
.redirect)"
>
<div>
<img
class=
"list-logo"
:src=
"item.logoUrl"
alt
/>
</div>
...
...
@@ -12,6 +12,11 @@
</div>
</div>
</div>
<div>
<span>
店员id
</span>
<span>
{{
zcache
.
userId
}}
</span>
<span>
{{
info
}}
</span>
</div>
</div>
</div>
</
template
>
...
...
@@ -63,12 +68,13 @@
logoUrl
:
"/mainSale/4.png"
}
]
}
};
},
info
:
''
}
},
mounted
()
{
this
.
zReadyUserId
();
this
.
zTestGetNowUrlInfo
()
;
this
.
zTestGetNowUrlInfo
()
},
created
()
{
},
...
...
@@ -124,10 +130,11 @@
zlog
(
"%c--->zTestPreAuthCode: Url ="
,
"background: orange"
,
url
);
this
.
zcache
.
preAuthCodeUrl
=
url
;
window
.
location
.
href
=
url
;
//
window.location.href = url;
},
// 测试-获取用户信息
zTestGetUserInfoByOldToken
()
{
alert
(
'获取用户信息'
)
let
postData
=
{
code
:
this
.
zcache
.
code
,
};
...
...
@@ -142,15 +149,24 @@
headers
:
headerData
,
})
.
then
(
res
=>
{
console
.
log
(
res
,
'用户信息'
);
this
.
info
=
res
.
data
+
''
alert
(
'获取用户信息接口成功'
)
this
.
zcache
.
userInfoResNew
=
"RESOK:"
+
res
.
data
.
data
.
userId
;
sessionStorage
.
setItem
(
"userId"
,
String
(
res
.
data
.
data
.
userId
));
this
.
zcache
.
userId
=
String
(
res
.
data
.
data
.
userId
);
alert
(
this
.
zcache
.
userId
)
alert
(
'获取到了用户信息'
)
})
.
catch
(
err
=>
{
this
.
zcache
.
userInfoResNew
=
"RESERR."
;
});
},
listClick
(
inData
)
{
listClick
(
item
,
inData
)
{
console
.
log
(
item
,
'item'
);
console
.
log
(
inData
,
'inData'
);
this
.
$router
.
push
({
name
:
inData
,
params
:
{
userId
:
this
.
zcache
.
userId
}
...
...
ybf_wx/src/views/sideNav/discount/index.vue
View file @
8b97b417
...
...
@@ -88,9 +88,9 @@ export default {
};
},
created
()
{
this
.
zcache
.
userId
=
this
.
$route
.
params
.
userId
;
this
.
zReadyGetUserFromId
();
this
.
getAgentAuth
();
this
.
zcache
.
userId
=
this
.
$route
.
params
.
userId
;
this
.
zReadyGetUserFromId
()
},
mounted
()
{
},
...
...
@@ -122,7 +122,7 @@ export default {
basicInfo
.
state
+
basicInfo
.
tail
;
zlog
(
"%c--->zTestPreAuthCode: Url ="
,
"background: orange"
,
url
);
//
window.location.href = url
window
.
location
.
href
=
url
},
zReadyGetUserFromId
()
{
let
postData
=
{
...
...
ybf_wx/src/views/sideNav/register/index.vue
View file @
8b97b417
...
...
@@ -11,10 +11,15 @@
</div>
<button
class=
"button-send"
@
click=
"sendMessage"
>
邀请
</button>
</div>
<div>
<span>
顾客id
</span>
<span>
{{
userId
}}
</span>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
getUserInfoByUserId
}
from
"@/api/sidebar/voucher"
;
export
default
{
name
:
'register'
,
data
()
{
...
...
@@ -25,16 +30,54 @@
dsc
:
"推荐完成注册,完成会员拉新"
,
logoUrl
:
"/mainSale/4.png"
}
]
],
storeId
:
''
,
userId
:
''
}
},
created
()
{
this
.
getAgentAuth
();
this
.
zReadyGetUserFromId
();
this
.
getCustomerId
()
},
mounted
(){
},
methods
:{
// 获取客户Id
getCustomerId
()
{
alert
(
'获取顾客信息'
)
wx
.
invoke
(
'getCurExternalContact'
,
{
},
function
(
res
){
if
(
res
.
err_msg
==
"getCurExternalContact:ok"
){
console
.
log
(
res
,
'顾客信息'
);
alert
(
'成功获取顾客信息'
)
this
.
userId
=
res
.
userId
;
//返回当前外部联系人userId
}
else
{
//错误处理
alert
(
'获取用户信息失败'
)
}
})
},
// 获取店铺Id
zReadyGetUserFromId
()
{
alert
(
'获取店铺信息'
)
let
postData
=
{
param
:
this
.
$route
.
params
.
userId
// param: 'ZhouHeQiang'
};
// alert(`--->userInfoFromId: postData = ${JSON.stringify(postData)}`);
getUserInfoByUserId
(
postData
)
.
then
(
res
=>
{
console
.
log
(
res
,
'店铺信息'
);
res
=
JSON
.
stringify
(
res
)
alert
(
res
)
})
.
catch
(
err
=>
{
alert
(
'获取店铺信息失败'
)
});
},
sendMessage
(){
wx
.
invoke
(
"sendChatMessage"
,
...
...
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