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
332b1be5
Commit
332b1be5
authored
Mar 27, 2020
by
xd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
侧边栏注册完成,推券待确定
parent
383789d9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
110 additions
and
108 deletions
+110
-108
mail.js
ybf_admin/src/api/in/mail.js
+9
-11
mail.vue
ybf_admin/src/pages/in/contact/mail.vue
+3
-2
index.html
ybf_wx/public/register/index.html
+57
-36
index.vue
ybf_wx/src/views/sideNav/discount/index.vue
+9
-44
index.vue
ybf_wx/src/views/sideNav/register/index.vue
+32
-15
No files found.
ybf_admin/src/api/in/mail.js
View file @
332b1be5
...
...
@@ -90,16 +90,6 @@ export function getHistoryList(data) {
params
:
data
})
}
// 模糊查询
export
function
search
(
data
)
{
return
request
({
url
:
'/admin/auth/addressbook/clerk/getByUserIdOrUserName'
,
method
:
'get'
,
params
:
data
})
}
// 添加子部门
export
function
addGroup
(
params
)
{
return
request
({
...
...
@@ -149,4 +139,12 @@ export function getHistoryList(data) {
method
:
'put'
,
params
})
}
\ No newline at end of file
}
export
function
search
(
params
)
{
return
request
({
url
:
'/admin/auth/addressbook/clerk/getByUserName'
,
method
:
'get'
,
params
})
}
\ No newline at end of file
ybf_admin/src/pages/in/contact/mail.vue
View file @
332b1be5
...
...
@@ -328,10 +328,11 @@ export default {
this
.
counterId
=
this
.
groupId
;
}
let
params
=
{
param
:
this
.
formData
.
keywords
param
:
this
.
formData
.
keywords
,
departmentId
:
this
.
groupId
}
search
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
,
'搜索数据'
)
this
.
tableData
=
res
.
data
// this.page.total = Number(res.data.total);
})
...
...
ybf_wx/public/register/index.html
View file @
332b1be5
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
会员拉新
</title>
<script
src=
"../js/jquery-3.4.1.min.js"
></script>
<style>
html
,
body
{
html
,
body
{
width
:
100%
;
height
:
100%
;
margin
:
0
;
...
...
@@ -13,7 +15,8 @@
font-size
:
16px
;
color
:
#ffffff
;
}
.register_container
{
.register_container
{
height
:
100%
;
background-color
:
rgba
(
15
,
106
,
184
,
0.99
);
margin
:
0
;
...
...
@@ -21,55 +24,73 @@
box-sizing
:
border-box
;
text-align
:
center
;
}
.register_titles
.title
{
.register_titles
.title
{
font-size
:
3rem
;
line-height
:
5rem
;
}
.register_qrcode
#image
{
.register_qrcode
#image
{
display
:
inline-block
;
width
:
60%
;
height
:
auto
;
margin
:
3rem
0
;
}
.register_qrcode
.qrcodeTip
{
.register_qrcode
.qrcodeTip
{
font-size
:
2rem
;
}
</style>
</head>
<body>
<div
class=
"register_container"
>
<div
class=
"register_titles"
>
<div
class=
"title"
>
扫码注册成为会员
</div>
</div>
<div
class=
"register_qrcode"
>
<img
class=
"qrcode"
id=
"image"
src=
""
alt
/>
<div
class=
"qrcodeTip"
>
长按识别二维码
</div>
<div
class=
"register_container"
>
<div
class=
"register_titles"
>
<div
class=
"title"
>
扫码注册成为会员
</div>
</div>
<div
class=
"register_qrcode"
>
<img
class=
"qrcode"
id=
"image"
src=
""
alt
/>
<div
class=
"qrcodeTip"
>
长按识别二维码
</div>
</div>
</div>
</div>
<script>
$
(
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
pageUrl
=
`http://139.155.48.151:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=
${
pageUri
}
`
;
<script>
alert
(
window
.
location
.
href
)
function
GetQueryString
(
name
)
{
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
,
"i"
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
)
var
context
=
""
if
(
r
!=
null
)
context
=
r
[
2
]
reg
=
null
r
=
null
return
context
==
null
||
context
==
""
||
context
==
"undefined"
?
""
:
context
;
}
// alert(GetQueryString("storeCode"))
const
storecode
=
GetQueryString
(
"storeCode"
)
$
(
function
()
{
showQRInfo
()
});
const
showQRInfo
=
()
=>
{
// let pageUri = `${nowUrl}&detailid=${voucherId}&actionid=${activeId}&unionid=${unionId}`;
// let storecode = "181"
alert
(
storecode
)
let
pageUri
=
`pages/user/register/register?storeCode=
${
storecode
}
`
let
pageUrl
=
`http://139.155.48.151:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=
${
pageUri
}
`
;
$
.
ajax
({
type
:
"POST"
,
url
:
pageUrl
,
data
:
{},
success
:
function
(
res
)
{
$
(
'#image'
).
attr
(
'src'
,
res
.
data
)
},
error
:
function
(
data
)
{
$
.
ajax
({
type
:
"POST"
,
url
:
pageUrl
,
data
:
{},
success
:
function
(
res
)
{
$
(
'#image'
).
attr
(
'src'
,
res
.
data
)
},
error
:
function
(
data
)
{
}
});
}
</script>
}
});
}
</script>
</body>
</html>
</html>
\ No newline at end of file
ybf_wx/src/views/sideNav/discount/index.vue
View file @
332b1be5
...
...
@@ -91,7 +91,7 @@ export default {
this
.
zcache
.
userId
=
this
.
$route
.
params
.
userId
;
this
.
zReadyGetUserFromId
();
this
.
getAgentAuth
();
this
.
zReadySetVoucherList
()
//
this.zReadySetVoucherList()
},
mounted
()
{
},
...
...
@@ -127,15 +127,15 @@ export default {
},
zReadyGetUserFromId
()
{
let
postData
=
{
param
:
this
.
zcache
.
userId
// param: 'ZhouHeQiang'
userId
:
this
.
zcache
.
userId
}
getUserInfoByUserId
(
postData
)
.
then
(
res
=>
{
// alert(`--->userInfoFromId: res = ${JSON.stringify(res.data
[0]
)}`);
this
.
zcache
.
userInfo
=
String
(
res
.
data
[
0
].
departmentId
);
// alert(`--->userInfoFromId: res = ${JSON.stringify(res.data)}`);
//
this.zcache.userInfo = String(res.data[0].departmentId);
// storeId 暂时写死
this
.
zcache
.
storeId
=
1
;
alert
(
res
.
data
[
0
])
this
.
zcache
.
storeId
=
res
.
data
[
0
]
// this.zcache.storeId = Number(res.data[0].stall);
this
.
zReadySetVoucherList
();
})
...
...
@@ -143,16 +143,12 @@ export default {
},
// 获取优惠券列表
zReadySetVoucherList
()
{
// alert('获取优惠券')
this
.
zReadyDelVoucherList
();
const
postData
=
{
appCode
:
"0696"
,
// j接口编码
// mdid: this.zcache.storeId
mdid
:
1
mdid
:
this
.
zcache
.
storeId
}
getVoucherList
(
postData
).
then
(
res
=>
{
// alert('getVoucherList')
zlog
(
"%c--->VoucherList: RD ="
,
"background: limegreen;"
,
res
);
this
.
zVoucherSet
(
res
.
result
.
coupons
);
})
.
catch
(
err
=>
{
...
...
@@ -167,7 +163,7 @@ export default {
this
.
zcache
.
now
.
activeId
=
String
(
inActiveId
)
this
.
zcache
.
now
.
voucherId
=
String
(
inVoucherId
)
this
.
zVoucherUrlDel
()
;
this
.
zVoucherUrlDel
()
const
postData
=
{
appCode
:
"0697"
,
...
...
@@ -179,7 +175,7 @@ export default {
getVoucherWxUrl
(
postData
).
then
(
res
=>
{
this
.
zVoucherUrlSet
(
res
.
result
.
link
)
//
alert('获取列表成功')
alert
(
'获取列表成功'
)
});
},
...
...
@@ -250,26 +246,6 @@ export default {
zVoucherUrlDel
()
{
this
.
zlist
.
voucherUrl
=
""
;
},
// testEaPost() {
// let postData = {
// appCode: '0603',
// condType: 1,
// condValue: '138069094',
// };
// ApiEaPost(postData).then(res => {
// console.log(res);
// });
// },
// testEaPost() {
// let postData = {
// appCode: '0606',
// crmActionDate: '2019-12-12'
// };
// ApiEaPost(postData).then(res => {
// // console.log(res);
// });
// },
testEaPost
()
{
let
postData
=
{
...
...
@@ -281,17 +257,6 @@ export default {
});
},
// testEaPost() {
// let postData = {
// appCode: '0608',
// content: 'text',
// phone: '18801342762',
// };
// ApiEaPost(postData).then(res => {
// // console.log(res);
// });
// },
buttonSingleMarketingClick
()
{
// this.$router.push("");
},
...
...
ybf_wx/src/views/sideNav/register/index.vue
View file @
332b1be5
...
...
@@ -15,6 +15,9 @@
</div>
</
template
>
<
script
>
import
{
getUserInfoByUserId
}
from
"@/api/sidebar/voucher"
;
export
default
{
name
:
'register'
,
data
()
{
...
...
@@ -25,44 +28,58 @@
dsc
:
"推荐完成注册,完成会员拉新"
,
logoUrl
:
"/mainSale/4.png"
}
]
],
storeCode
:
''
}
},
created
()
{
this
.
getAgentAuth
();
},
mounted
(){
this
.
zReadyGetUserFromId
()
this
.
getAgentAuth
()
},
methods
:{
zReadyGetUserFromId
()
{
alert
(
'获取店铺'
)
alert
(
this
.
$route
.
params
.
userId
)
// let postData = {
// userId: this.$route.params.userId
// }
let
userId
=
this
.
$route
.
params
.
userId
alert
(
'请求'
)
getUserInfoByUserId
({
userId
}).
then
(
res
=>
{
alert
(
'获取成功'
)
alert
(
res
.
data
[
0
])
this
.
storeCode
=
res
.
data
[
0
]
})
.
catch
(
err
=>
{
alert
(
'获取店铺失败'
)
})
alert
(
'what?'
)
},
sendMessage
(){
const
url
=
'http://www.baidu.com'
alert
(
'发消息'
)
let
url
=
`http://oysales.oywanhao.com/register?storeCode=
${
this
.
storeCode
}
`
alert
(
url
)
wx
.
invoke
(
"sendChatMessage"
,
{
msgtype
:
"news"
,
//消息类型,必填
news
:
{
link
:
"http://oysales.oywanhao.com/register"
,
//H5消息页面url 必填
link
:
url
,
//H5消息页面url 必填
title
:
"注册邀请"
,
//H5消息标题
desc
:
"注册成为欧亚会员"
,
//H5消息摘要
imgUrl
:
""
//H5消息封面图片URL
}
/* news:
{
link: url, //H5消息页面url 必填
title: "", //H5消息标题
desc: "", //H5消息摘要
imgUrl: "", //H5消息封面图片URL
} */
},
function
(
res
)
{
alert
(
'进入发送'
)
// alert('sendChatMessage')
if
(
res
.
err_msg
==
"sendChatMessage:ok"
)
{
}
else
if
(
res
.
err_msg
!=
"sendChatMessage:ok"
)
{
}
}
);
}
},
}
}
</
script
>
...
...
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