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
eafb8c60
Commit
eafb8c60
authored
5 years ago
by
xd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改侧边栏 精准营销
parent
12d9d55e
master
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
215 deletions
+59
-215
index.vue
wx_application/src/views/mainSale/active/main/index.vue
+2
-0
home.vue
ybf_wx/src/views/home.vue
+2
-2
index.vue
ybf_wx/src/views/sideNav/discount/index.vue
+1
-20
index.vue
ybf_wx/src/views/sideNav/register/index.vue
+54
-9
index1.vue
ybf_wx/src/views/sideNav/register/index1.vue
+0
-184
No files found.
wx_application/src/views/mainSale/active/main/index.vue
View file @
eafb8c60
...
...
@@ -446,6 +446,8 @@ export default {
if
(
res
.
data
.
stallInfo
!=
null
)
{
sessionStorage
.
setItem
(
"barName"
,
res
.
data
.
stallInfo
.
name
)
resolve
(
res
.
data
.
stallInfo
.
name
)
}
else
{
resolve
(
''
)
}
}).
catch
(
err
=>
{
reject
(
err
)
...
...
This diff is collapsed.
Click to expand it.
ybf_wx/src/views/home.vue
View file @
eafb8c60
...
...
@@ -71,8 +71,8 @@
if
(
sessionStorage
.
getItem
(
"userId"
))
{
this
.
zcache
.
userId
=
sessionStorage
.
getItem
(
"userId"
)
}
else
{
this
.
zReadyUserId
()
;
this
.
zTestGetNowUrlInfo
()
;
this
.
zReadyUserId
()
this
.
zTestGetNowUrlInfo
()
}
},
...
...
This diff is collapsed.
Click to expand it.
ybf_wx/src/views/sideNav/discount/index.vue
View file @
eafb8c60
...
...
@@ -107,7 +107,6 @@ export default {
alert
(
'您当前没有绑定店铺'
)
this
.
isShow
=
false
}
else
{
// this.memberIdJudge('BH01','181')
let
list
=
[]
res
.
data
.
forEach
(
item
=>
{
let
obj
=
this
.
getVoucherList
(
item
.
oyStallCode
)
...
...
@@ -172,25 +171,7 @@ export default {
}
)
},
///
// memberIdJudge(oyStallMemberId,oyStallCode) {
// const postData = {
// appCode: "0728", // j接口编码
// wxmpcode: oyStallMemberId,
// crmcode: oyStallCode
// }
// judgeMemberId(postData).then(res => {
// if(res.errCode == 0) {
// console.log(res,'res')
// }else {
// console.log(res,'?')
// }
// })
// .catch(err => {
// console.log(err)
// })
// },
}
};
</
script
>
...
...
This diff is collapsed.
Click to expand it.
ybf_wx/src/views/sideNav/register/index.vue
View file @
eafb8c60
<
template
>
<div
class=
"register_container"
>
<div
v-for=
"(item, index) of list"
:key=
"index"
>
<div
v-for=
"(item, index) of list"
:key=
"index"
v-show=
"isShow"
>
<div
class=
"list"
>
<div>
<img
class=
"list-logo"
:src=
"item.logoUrl"
alt
/>
...
...
@@ -12,12 +12,13 @@
<button
class=
"button-send"
@
click=
"sendMessage(item.oyStallMemberId)"
>
邀请
</button>
</div>
</div>
<div
class=
"no"
v-show=
"!isShow"
>
暂无门店信息...
</div>
</div>
</
template
>
<
script
>
import
{
getUserInfoByUserId
}
from
"@/api/sidebar/voucher"
;
import
{
judgeMemberId
}
from
"@/api/sidebar/ea"
export
default
{
name
:
'register'
,
data
()
{
...
...
@@ -27,7 +28,9 @@ import { getUserInfoByUserId } from "@/api/sidebar/voucher";
oyStallCode
:
''
,
userId
:
''
,
logoUrl
:
"/mainSale/4.png"
,
dsc
:
"推荐完成注册,完成会员拉新"
dsc
:
"推荐完成注册,完成会员拉新"
,
storeList
:
[],
isShow
:
true
}
},
created
()
{
...
...
@@ -46,17 +49,54 @@ import { getUserInfoByUserId } from "@/api/sidebar/voucher";
getUserInfoByUserId
({
userName
}).
then
(
res
=>
{
if
(
res
.
data
.
length
==
0
)
{
alert
(
'您当前没有绑定店铺'
)
this
.
isShow
=
false
}
else
{
console
.
log
(
res
,
'店铺'
);
this
.
storeList
=
res
.
data
let
ary
=
[]
res
.
data
.
forEach
(
item
=>
{
item
.
logoUrl
=
this
.
logoUrl
item
.
dsc
=
this
.
dsc
let
obj
=
this
.
memberIdJudge
(
item
.
oyStallMemberId
,
item
.
oyStallCode
)
ary
.
push
(
obj
)
})
let
promiseAll
=
Promise
.
all
([
...
ary
]).
then
(
res
=>
{
res
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
check
==
1
||
item
.
check
==
3
)
{
this
.
storeList
[
index
].
logoUrl
=
this
.
logoUrl
this
.
storeList
[
index
].
dsc
=
this
.
dsc
this
.
list
.
push
(
this
.
storeList
[
index
])
}
})
if
(
this
.
list
.
length
>
0
)
{
this
.
isShow
=
true
}
else
{
this
.
isShow
=
false
}
})
}
})
this
.
list
=
res
.
data
.
catch
(
err
=>
{
})
},
memberIdJudge
(
oyStallMemberId
,
oyStallCode
)
{
const
postData
=
{
appCode
:
"0728"
,
// j接口编码
crmcode
:
oyStallCode
,
wxmpcode
:
oyStallMemberId
}
return
new
Promise
(
function
(
resolve
,
reject
)
{
judgeMemberId
(
postData
).
then
(
res
=>
{
if
(
res
.
errCode
==
0
)
{
resolve
(
res
.
result
)
console
.
log
(
res
.
result
,
'res'
)
}
else
{
console
.
log
(
res
)
}
// this.storeCode = res.data[0].oyStallMemberId
})
.
catch
(
err
=>
{
reject
(
err
)
})
})
},
sendMessage
(
oyStallMemberId
){
let
url
=
`http://oysales.oywanhao.com/register?storeCode=
${
oyStallMemberId
}
`
...
...
@@ -84,6 +124,11 @@ import { getUserInfoByUserId } from "@/api/sidebar/voucher";
}
</
script
>
<
style
lang=
"scss"
scoped
>
.no
{
font-size
:
20px
;
margin-top
:
40px
;
text-align
:
center
;
}
.register_container
{
padding
:
4px
12px
40px
12px
;
.list
{
...
...
This diff is collapsed.
Click to expand it.
ybf_wx/src/views/sideNav/register/index1.vue
deleted
100644 → 0
View file @
12d9d55e
<
template
>
<div
class=
"register_container"
>
<div
v-for=
"(item, index) of list"
:key=
"index"
>
<div
class=
"list"
>
<div>
<img
class=
"list-logo"
:src=
"item.logoUrl"
alt
/>
</div>
<div
class=
"list-infos"
>
<div
class=
"list-info-title"
>
{{
item
.
name
}}
</div>
<div
class=
"list-info-dsc"
>
{{
item
.
dsc
}}
</div>
</div>
<button
class=
"button-send"
@
click=
"sendMessage"
>
邀请
</button>
</div>
</div>
</div>
</
template
>
<
script
>
import
{
configWx
,
getUserInfo
}
from
"@/utils/aCommon"
import
{
getUserInfoByUserId
}
from
"@/api/sidebar/voucher"
;
import
{
judgeMemberId
}
from
"@/api/sidebar/ea"
export
default
{
name
:
'register'
,
data
()
{
return
{
list
:[
{
name
:
"会员拉新"
,
dsc
:
"推荐完成注册,完成会员拉新"
,
logoUrl
:
"/mainSale/4.png"
}
],
storeCode
:
''
,
oyStallCode
:
''
,
userId
:
''
}
},
created
()
{
if
(
this
.
$route
.
params
.
userId
)
{
this
.
userId
=
this
.
$route
.
params
.
userId
;
}
else
{
this
.
userId
=
sessionStorage
.
getItem
(
"userId"
)
}
this
.
userId
=
"ShanDian"
// this.zReadyGetUserFromId()
this
.
getAgentAuth
()
this
.
memberIdJudge
(
'BH03'
,
181
)
this
.
getVoucherList
()
},
methods
:{
zReadyGetUserFromId
()
{
let
userName
=
this
.
userId
getUserInfoByUserId
({
userName
}).
then
(
res
=>
{
this
.
storeCode
=
res
.
data
[
0
].
oyStallMemberId
})
.
catch
(
err
=>
{
})
},
memberIdJudge
(
oyStallMemberId
,
oyStallCode
)
{
const
postData
=
{
appCode
:
"0728"
,
// j接口编码
wxmpcode
:
oyStallMemberId
,
crmcode
:
oyStallCode
}
judgeMemberId
(
postData
).
then
(
res
=>
{
if
(
res
.
errCode
==
0
)
{
console
.
log
(
res
,
'res'
);
}
else
{
console
.
log
(
res
,
'?'
);
}
})
.
catch
(
err
=>
{
console
.
log
(
err
)
})
},
// memberIdJudge(oyStallMemberId,oyStallCode) {
// const postData = {
// appCode: "0728", // j接口编码
// wxmpcode: oyStallMemberId,
// crmcode: oyStallCode
// }
// return new Promise(function(resolve, reject) {
// judgeMemberId(postData).then(res => {
// if(res.errCode == 0) {
// resolve(res.result.check)
// }else {
// resolve('')
// }
// })
// .catch(err => {
// reject(err)
// })
// })
// },
sendMessage
(){
if
(
this
.
storeCode
==
''
)
{
alert
(
'您当前没有绑定店铺'
)
}
else
{
let
url
=
`http://oysales.oywanhao.com/register?storeCode=
${
this
.
storeCode
}
`
wx
.
invoke
(
"sendChatMessage"
,
{
msgtype
:
"news"
,
//消息类型,必填
news
:
{
link
:
url
,
//H5消息页面url 必填
title
:
"注册邀请"
,
//H5消息标题
desc
:
"注册成为欧亚会员"
,
//H5消息摘要
imgUrl
:
""
//H5消息封面图片URL
}
},
function
(
res
)
{
// alert('sendChatMessage')
if
(
res
.
err_msg
==
"sendChatMessage:ok"
)
{
}
else
if
(
res
.
err_msg
!=
"sendChatMessage:ok"
)
{
}
}
)
}
},
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.register_container
{
padding
:
4px
12px
40px
12px
;
.list
{
height
:
140px
;
box-shadow
:
0px
2px
4px
0px
rgb
(
187
,
187
,
187
);
margin
:
6px
0px
;
padding
:
0px
12px
;
border-radius
:
6px
;
display
:
flex
;
flex-direction
:
row
;
justify-content
:
flex-start
;
align-items
:
center
;
.list-logo
{
width
:
80px
;
height
:
80px
;
border-radius
:
6px
;
}
.list-infos
{
height
:
80px
;
padding-left
:
12px
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
flex-start
;
align-items
:
flex-start
;
}
.list-info-title
{
width
:
100%
;
height
:
18px
;
font-size
:
16px
;
font-weight
:
bold
;
line-height
:
18px
;
}
.list-info-dsc
{
margin-top
:
6px
;
width
:
100%
;
height
:
16px
;
font-size
:
12px
;
font-weight
:
normal
;
line-height
:
18px
;
}
.button-send
{
border
:
0px
solid
blue
;
margin-left
:
5px
;
height
:
40px
;
width
:
84px
;
border-radius
:
4px
;
background-color
:
rgba
(
68
,
93
,
251
,
1
);
color
:
white
;
font-size
:
16px
;
}
}
}
</
style
>
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