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
cf4c6bf5
Commit
cf4c6bf5
authored
5 years ago
by
leiqingsong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://114.67.93.201/xulili/ybf
parents
d5673640
bb7cb24a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
236 deletions
+50
-236
index.html
ybf_wx/public/qrCode/index.html
+27
-198
home.vue
ybf_wx/src/views/home.vue
+2
-1
index.vue
ybf_wx/src/views/sideNav/discount/index.vue
+0
-17
index.vue
ybf_wx/src/views/sideNav/register/index.vue
+21
-20
No files found.
ybf_wx/public/qrCode/index.html
View file @
cf4c6bf5
...
@@ -3,216 +3,56 @@
...
@@ -3,216 +3,56 @@
<head>
<head>
<meta
lang=
"zh-cn"
>
<meta
lang=
"zh-cn"
>
<title>
优惠券详情
</title>
<title>
领取优惠券
</title>
<script
src=
"https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"
></script>
<script
src=
"https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"
></script>
<script
src=
'https://code.jquery.com/jquery-3.2.1.min.js'
></script>
<script
src=
'https://code.jquery.com/jquery-3.2.1.min.js'
></script>
<style>
<style>
body
{
html
,
body
{
background-color
:
rgba
(
15
,
106
,
184
,
0.99
);
font-size
:
10px
;
margin
:
0
;
padding
:
0
;
}
.main
{
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
margin
:
0
;
margin
:
0
;
padding
:
0
;
padding
:
0
;
font-size
:
16px
;
display
:
flex
;
color
:
#ffffff
;
flex-direction
:
column
;
justify-content
:
flex-start
;
align-items
:
center
;
overflow
:
hidden
;
}
.main
>
.titles
{
/*border: 2px solid cyan;*/
width
:
100%
;
height
:
8rem
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
}
.main
>
.titles
>
.title
{
.register_container
{
font-size
:
3rem
;
height
:
100%
;
color
:
white
;
background-color
:
rgba
(
15
,
106
,
184
,
0.99
);
margin
:
0
;
padding
:
2.5rem
2rem
;
box-sizing
:
border-box
;
text-align
:
center
;
text-align
:
center
;
}
}
.main
>
.cards
{
.register_titles
.title
{
/*border: 2px solid red;*/
/*background-color: whitesmoke;*/
width
:
76%
;
height
:
auto
;
/*padding: 0 2rem;*/
display
:
flex
;
flex-direction
:
column
;
justify-content
:
flex-start
;
align-items
:
center
;
}
.main
>
.cards
>
.card
{
/*border: 2px solid orange;*/
/*background-color: white;*/
width
:
100%
;
/*padding: 4rem 2rem;*/
}
.main
>
.cards
>
.card01
{
/*border-radius: 1rem 1rem 0 0;*/
border-top-left-radius
:
1rem
;
border-top-right-radius
:
1rem
;
background
:
white
;
background
:
linear-gradient
(
135deg
,
transparent
0
,
white
0
)
top
left
,
linear-gradient
(
-135deg
,
transparent
0
,
white
0
)
top
right
,
radial-gradient
(
circle
at
bottom
right
,
transparent
2rem
,
white
0
)
bottom
right
,
radial-gradient
(
circle
at
bottom
left
,
transparent
2rem
,
white
0
)
bottom
left
;
background-size
:
50%
50%
;
background-repeat
:
no-repeat
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
flex-start
;
align-items
:
center
;
}
.main
>
.cards
>
.card01
>
.titles
{
margin
:
4rem
2rem
0
2rem
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
.main
>
.cards
>
.card01
>
.titles
>
.title
{
font-size
:
3rem
;
margin-bottom
:
2rem
;
}
.main
>
.cards
>
.card01
>
.titles
>
.discount
{
font-size
:
3rem
;
font-size
:
3rem
;
display
:
flex
;
line-height
:
5rem
;
flex-direction
:
row
;
justify-content
:
center
;
align-items
:
center
;
}
.main
>
.cards
>
.card01
>
.titles
>
.discount
>
.number
{
margin-right
:
1rem
;
color
:
orangered
;
font-size
:
4rem
;
}
.main
>
.cards
>
.card01
>
.titles
>
.description
{
/*font-size: 2rem;*/
font-size
:
1rem
;
color
:
grey
;
}
.main
>
.cards
>
.card01
>
.rules
{
margin
:
2rem
2rem
4rem
2rem
;
}
.main
>
.cards
>
.card01
>
.rules
>
.rule
{
font-size
:
2rem
;
}
.main
>
.cards
>
.line
{
background-color
:
white
;
width
:
90%
;
border-bottom
:
4px
dotted
rgba
(
15
,
106
,
184
,
0.99
);
}
.main
>
.cards
>
.card02
{
/*border-radius: 0 0 1rem 1rem;*/
border-bottom-left-radius
:
1rem
;
border-bottom-right-radius
:
1rem
;
background
:
white
;
background
:
radial-gradient
(
circle
at
top
left
,
transparent
2rem
,
white
0
)
top
left
,
radial-gradient
(
circle
at
top
right
,
transparent
2rem
,
white
0
)
top
right
,
linear-gradient
(
45deg
,
transparent
1px
,
white
0
)
bottom
right
,
linear-gradient
(
-45deg
,
transparent
1px
,
white
0
)
bottom
left
;
background-size
:
50%
50%
;
background-repeat
:
no-repeat
;
}
.main
>
.cards
>
.card02
>
.tips
{
margin
:
4rem
2rem
;
}
}
.main
>
.cards
>
.card02
>
.tips
>
.tip
{
.register_qrcode
#image
{
font-size
:
2rem
;
display
:
inline-block
;
font-weight
:
bold
;
width
:
60%
;
height
:
auto
;
margin
:
3rem
0
;
}
}
.
main
>
.cards
>
.card02
>
.tips
>
.rules
>
.rule
{
.
register_qrcode
.qrcodeTip
{
font-size
:
2rem
;
font-size
:
2rem
;
}
}
.main
>
.cards
>
.card02
>
.tips
>
.qrcodes
{
display
:
flex
;
flex-direction
:
column
;
justify-content
:
flex-start
;
align-items
:
center
;
}
.main
>
.cards
>
.card02
>
.tips
>
.qrcodes
>
.qrcode
{
width
:
50%
;
}
.main
>
.cards
>
.card02
>
.tips
>
.qrcodes
>
.qrcodeTip
{
font-size
:
1rem
;
color
:
grey
;
}
</style>
</style>
</head>
</head>
<body>
<body>
<div
class=
"
main
"
>
<div
class=
"
register_container
"
>
<div
class=
"titles"
>
<div
class=
"
register_
titles"
>
<
!--<div class="title">优惠券详情</div>--
>
<
div
class=
"title"
>
扫码领券
</div
>
</div>
</div>
<div
class=
"cards"
>
<div
class=
"register_qrcode"
>
<div
class=
"card card01"
id=
"card01"
>
<div
class=
"titles"
>
<div
class=
"title"
>
惊喜满减券
</div>
<div
class=
"discount"
><div
class=
"number"
>
20
</div>
元
</div>
<div
class=
"description"
>
满 50 元可用
</div>
</div>
<ul
class=
"rules"
>
<li
class=
"rule"
>
满 50 元可用
</li>
<li
class=
"rule"
>
有效期 2019-10-15 04:00:00 至 2019-10-15 04:01:00
</li>
</ul>
</div>
<div
class=
"line"
></div>
<div
class=
"card card02"
id=
"card02"
>
<div
class=
"tips"
>
<div
class=
"tip"
>
使用说明
</div>
<ul
class=
"rules"
>
<li
class=
"rule"
>
单次结算时候仅能使用一张优惠券折扣
</li>
<li
class=
"rule"
>
单张优惠券不可叠加、找零、续用、残缺
</li>
<li
class=
"rule"
>
该优惠券有效时间为 2019-10-15 04:00:00 至 2019-10-15 04:01:00 ,过期/提前均不可使用
</li>
</ul>
<div
class=
"qrcodes"
>
<!--<img class="qrcode" src="qrcodeBuy.png" alt />-->
<!--<img class="qrcode" id="image" src="QRCodeOY.png" alt />-->
<img
class=
"qrcode"
id=
"image"
src=
""
alt
/>
<img
class=
"qrcode"
id=
"image"
src=
""
alt
/>
<div
class=
"qrcodeTip"
>
长按识别二维码
</div>
<div
class=
"qrcodeTip"
>
长按识别二维码
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
<script>
const
cleanUrlAndPostQRInfo
=
()
=>
{
const
cleanUrlAndPostQRInfo
=
()
=>
{
// alert(`--->qrCode: cleanUrlAndPostQRInfo: IN.`)
// 获取参数
// let nowUrl = ''
// let id = ''
// let actionid = ''
// let activeId = ''
// let voucherId = ''
// let unionId = ''
// nowUrl = document.location.toString().slice(42)
// id = String(nowUrl.split("?")[1].slice(3).split("&")[0])
// actionid = String(nowUrl.split("?")[1].slice(3).split("&")[1].split("=")[1])
// activeId = String(nowUrl.split("?")[1].slice(3).split("&")[2].split("=")[1])
// voucherId = String(nowUrl.split("?")[1].slice(3).split("&")[3].split("=")[1])
// unionId = String(nowUrl.split("?")[1].slice(3).split("&")[4].split("=")[1])
// let pageUri = `${nowUrl}&detailid=${voucherId}&actionid=${activeId}&unionid=${unionId}`;
function
GetQueryString
(
name
)
{
function
GetQueryString
(
name
)
{
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
,
"i"
);
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
,
"i"
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
)
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
)
...
@@ -225,12 +65,7 @@
...
@@ -225,12 +65,7 @@
}
}
const
nowUrl
=
GetQueryString
(
'Url'
)
const
nowUrl
=
GetQueryString
(
'Url'
)
alert
(
`nowurl--->
${
nowUrl
}
`
)
alert
(
`nowurl--->
${
nowUrl
}
`
)
let
pageUrl
=
`http://139.155.48.151:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=
${
nowUrl
}
`
;
let
pageUrl
=
`http://139.155.48.151:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=
${
nowUrl
}
`
// document.getElementById('uri').innerHTML = 'Uri=' + String(pageUri)
// alert(`--->qrCode: Ajax: POST: pageUrl = ${pageUrl}`)
// document.location = pageUri
$
.
ajax
({
$
.
ajax
({
type
:
"POST"
,
type
:
"POST"
,
...
@@ -238,24 +73,18 @@
...
@@ -238,24 +73,18 @@
// data: JSON.stringify({ path: "pages/signIn/signIn" }),
// data: JSON.stringify({ path: "pages/signIn/signIn" }),
data
:
{},
data
:
{},
success
:
function
(
res
)
{
success
:
function
(
res
)
{
// alert(`--->qrCode: ajax: res.`)
// alert(`--->qrCode: ajax: res: res =${JSON.stringify(res)}`)
$
(
'#image'
).
attr
(
'src'
,
res
.
data
)
$
(
'#image'
).
attr
(
'src'
,
res
.
data
)
// $('#image').attr('src', 'http://qywx2.100smartdata.com/qrCode/1584512690487.jpeg')
},
},
error
:
function
(
data
)
{
error
:
function
(
data
)
{
alert
(
`--->qrCode: ajax: err.`
)
alert
(
`--->qrCode: ajax: err: err =
${
JSON
.
stringify
(
err
)}
`
)
alert
(
`--->qrCode: ajax: err: err =
${
JSON
.
stringify
(
err
)}
`
)
alert
(
'error'
+
JSON
.
stringify
(
data
))
alert
(
'error'
+
JSON
.
stringify
(
data
))
console
.
log
(
data
);
}
}
})
;
})
}
}
const
__main
=
()
=>
{
const
__main
=
()
=>
{
cleanUrlAndPostQRInfo
()
cleanUrlAndPostQRInfo
()
}
}
__main
()
__main
()
function
onBridgeReady
()
{
function
onBridgeReady
()
{
WeixinJSBridge
.
call
(
'hideOptionMenu'
);
WeixinJSBridge
.
call
(
'hideOptionMenu'
);
...
...
This diff is collapsed.
Click to expand it.
ybf_wx/src/views/home.vue
View file @
cf4c6bf5
...
@@ -62,7 +62,8 @@
...
@@ -62,7 +62,8 @@
redirect
:
"register"
,
redirect
:
"register"
,
logoUrl
:
"/mainSale/4.png"
logoUrl
:
"/mainSale/4.png"
}
}
]
],
logoUrl
:
"/mainSale/1.png"
}
}
};
};
},
},
...
...
This diff is collapsed.
Click to expand it.
ybf_wx/src/views/sideNav/discount/index.vue
View file @
cf4c6bf5
...
@@ -196,23 +196,6 @@ export default {
...
@@ -196,23 +196,6 @@ export default {
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
/* #mask{
width: 100%;
opacity: 0.6;
background-color: black;
bottom: 0;
left: 0;
position: fixed;
z-index: 998;
}
.mask_img{
width: 316px;
height: 200px;
z-index: 999;
position: fixed;
right: 0px;
} */
.no
{
.no
{
font-size
:
20px
;
font-size
:
20px
;
margin-top
:
40px
;
margin-top
:
40px
;
...
...
This diff is collapsed.
Click to expand it.
ybf_wx/src/views/sideNav/register/index.vue
View file @
cf4c6bf5
...
@@ -6,10 +6,10 @@
...
@@ -6,10 +6,10 @@
<img
class=
"list-logo"
:src=
"item.logoUrl"
alt
/>
<img
class=
"list-logo"
:src=
"item.logoUrl"
alt
/>
</div>
</div>
<div
class=
"list-infos"
>
<div
class=
"list-infos"
>
<div
class=
"list-info-title"
>
{{
item
.
n
ame
}}
</div>
<div
class=
"list-info-title"
>
{{
item
.
oyStallN
ame
}}
</div>
<div
class=
"list-info-dsc"
>
{{
item
.
dsc
}}
</div>
<div
class=
"list-info-dsc"
>
{{
item
.
dsc
}}
</div>
</div>
</div>
<button
class=
"button-send"
@
click=
"sendMessage"
>
邀请
</button>
<button
class=
"button-send"
@
click=
"sendMessage
(item.oyStallMemberId)
"
>
邀请
</button>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -22,16 +22,12 @@ import { getUserInfoByUserId } from "@/api/sidebar/voucher";
...
@@ -22,16 +22,12 @@ import { getUserInfoByUserId } from "@/api/sidebar/voucher";
name
:
'register'
,
name
:
'register'
,
data
()
{
data
()
{
return
{
return
{
list
:[
list
:[],
{
name
:
"会员拉新"
,
dsc
:
"推荐完成注册,完成会员拉新"
,
logoUrl
:
"/mainSale/4.png"
}
],
storeCode
:
''
,
storeCode
:
''
,
oyStallCode
:
''
,
oyStallCode
:
''
,
userId
:
''
userId
:
''
,
logoUrl
:
"/mainSale/4.png"
,
dsc
:
"推荐完成注册,完成会员拉新"
}
}
},
},
created
()
{
created
()
{
...
@@ -46,18 +42,24 @@ import { getUserInfoByUserId } from "@/api/sidebar/voucher";
...
@@ -46,18 +42,24 @@ import { getUserInfoByUserId } from "@/api/sidebar/voucher";
methods
:{
methods
:{
zReadyGetUserFromId
()
{
zReadyGetUserFromId
()
{
let
userName
=
this
.
userId
let
userName
=
this
.
userId
// let userName = 'ShanDian'
getUserInfoByUserId
({
userName
}).
then
(
res
=>
{
getUserInfoByUserId
({
userName
}).
then
(
res
=>
{
// alert('获取成功')
if
(
res
.
data
.
length
==
0
)
{
this
.
storeCode
=
res
.
data
[
0
].
oyStallMemberId
alert
(
'您当前没有绑定店铺'
)
}
else
{
res
.
data
.
forEach
(
item
=>
{
item
.
logoUrl
=
this
.
logoUrl
item
.
dsc
=
this
.
dsc
})
this
.
list
=
res
.
data
}
// this.storeCode = res.data[0].oyStallMemberId
})
})
.
catch
(
err
=>
{
.
catch
(
err
=>
{
})
})
},
},
sendMessage
(){
sendMessage
(
oyStallMemberId
){
if
(
this
.
storeCode
==
''
)
{
let
url
=
`http://oysales.oywanhao.com/register?storeCode=
${
oyStallMemberId
}
`
alert
(
'您当前没有绑定店铺'
)
}
else
{
let
url
=
`http://oysales.oywanhao.com/register?storeCode=
${
this
.
storeCode
}
`
wx
.
invoke
(
wx
.
invoke
(
"sendChatMessage"
,
"sendChatMessage"
,
{
{
...
@@ -76,7 +78,6 @@ import { getUserInfoByUserId } from "@/api/sidebar/voucher";
...
@@ -76,7 +78,6 @@ import { getUserInfoByUserId } from "@/api/sidebar/voucher";
}
}
}
}
)
)
}
},
},
}
}
...
...
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