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
bb7cb24a
Commit
bb7cb24a
authored
Apr 18, 2020
by
xd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
侧边栏修改
parent
c81c4ae3
Hide 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 @
bb7cb24a
...
...
@@ -3,216 +3,56 @@
<head>
<meta
lang=
"zh-cn"
>
<title>
优惠券详情
</title>
<title>
领取优惠券
</title>
<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>
<style>
body
{
background-color
:
rgba
(
15
,
106
,
184
,
0.99
);
font-size
:
10px
;
margin
:
0
;
padding
:
0
;
}
.main
{
html
,
body
{
width
:
100%
;
height
:
100%
;
margin
:
0
;
padding
:
0
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
flex-start
;
align-items
:
center
;
overflow
:
hidden
;
font-size
:
16px
;
color
:
#ffffff
;
}
.main
>
.titles
{
/*border: 2px solid cyan;*/
width
:
100%
;
height
:
8rem
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
align-items
:
center
;
}
.main
>
.titles
>
.title
{
font-size
:
3rem
;
color
:
white
;
.register_container
{
height
:
100%
;
background-color
:
rgba
(
15
,
106
,
184
,
0.99
);
margin
:
0
;
padding
:
2.5rem
2rem
;
box-sizing
:
border-box
;
text-align
:
center
;
}
.main
>
.cards
{
/*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
{
.register_titles
.title
{
font-size
:
3rem
;
display
:
flex
;
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
;
}
line-height
:
5rem
;
.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
{
font-size
:
2rem
;
font-weight
:
bold
;
.register_qrcode
#image
{
display
:
inline-block
;
width
:
60%
;
height
:
auto
;
margin
:
3rem
0
;
}
.
main
>
.cards
>
.card02
>
.tips
>
.rules
>
.rule
{
.
register_qrcode
.qrcodeTip
{
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>
</head>
<body>
<div
class=
"
main
"
>
<div
class=
"titles"
>
<
!--<div class="title">优惠券详情</div>--
>
<div
class=
"
register_container
"
>
<div
class=
"
register_
titles"
>
<
div
class=
"title"
>
扫码领券
</div
>
</div>
<div
class=
"cards"
>
<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
/>
<div
class=
"qrcodeTip"
>
长按识别二维码
</div>
</div>
</div>
</div>
<div
class=
"register_qrcode"
>
<img
class=
"qrcode"
id=
"image"
src=
""
alt
/>
<div
class=
"qrcodeTip"
>
长按识别二维码
</div>
</div>
</div>
<script>
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
)
{
var
reg
=
new
RegExp
(
"(^|&)"
+
name
+
"=([^&]*)(&|$)"
,
"i"
);
var
r
=
window
.
location
.
search
.
substr
(
1
).
match
(
reg
)
...
...
@@ -225,37 +65,26 @@
}
const
nowUrl
=
GetQueryString
(
'Url'
)
alert
(
`nowurl--->
${
nowUrl
}
`
)
let
pageUrl
=
`http://139.155.48.151:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=
${
nowUrl
}
`
;
// document.getElementById('uri').innerHTML = 'Uri=' + String(pageUri)
let
pageUrl
=
`http://139.155.48.151:8085/workWx/auth/oauth2/wxMiniQrCode?pageUri=
${
nowUrl
}
`
// alert(`--->qrCode: Ajax: POST: pageUrl = ${pageUrl}`)
// document.location = pageUri
$
.
ajax
({
type
:
"POST"
,
url
:
pageUrl
,
// data: JSON.stringify({ path: "pages/signIn/signIn" }),
data
:
{},
success
:
function
(
res
)
{
// alert(`--->qrCode: ajax: res.`)
// alert(`--->qrCode: ajax: res: res =${JSON.stringify(res)}`)
$
(
'#image'
).
attr
(
'src'
,
res
.
data
)
// $('#image').attr('src', 'http://qywx2.100smartdata.com/qrCode/1584512690487.jpeg')
},
error
:
function
(
data
)
{
alert
(
`--->qrCode: ajax: err.`
)
alert
(
`--->qrCode: ajax: err: err =
${
JSON
.
stringify
(
err
)}
`
)
alert
(
'error'
+
JSON
.
stringify
(
data
))
console
.
log
(
data
);
}
})
;
})
}
const
__main
=
()
=>
{
cleanUrlAndPostQRInfo
()
}
__main
()
function
onBridgeReady
()
{
WeixinJSBridge
.
call
(
'hideOptionMenu'
);
...
...
ybf_wx/src/views/home.vue
View file @
bb7cb24a
...
...
@@ -62,7 +62,8 @@
redirect
:
"register"
,
logoUrl
:
"/mainSale/4.png"
}
]
],
logoUrl
:
"/mainSale/1.png"
}
};
},
...
...
ybf_wx/src/views/sideNav/discount/index.vue
View file @
bb7cb24a
...
...
@@ -196,23 +196,6 @@ export default {
</
script
>
<
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
{
font-size
:
20px
;
margin-top
:
40px
;
...
...
ybf_wx/src/views/sideNav/register/index.vue
View file @
bb7cb24a
...
...
@@ -6,10 +6,10 @@
<img
class=
"list-logo"
:src=
"item.logoUrl"
alt
/>
</div>
<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>
<button
class=
"button-send"
@
click=
"sendMessage"
>
邀请
</button>
<button
class=
"button-send"
@
click=
"sendMessage
(item.oyStallMemberId)
"
>
邀请
</button>
</div>
</div>
</div>
...
...
@@ -22,16 +22,12 @@ import { getUserInfoByUserId } from "@/api/sidebar/voucher";
name
:
'register'
,
data
()
{
return
{
list
:[
{
name
:
"会员拉新"
,
dsc
:
"推荐完成注册,完成会员拉新"
,
logoUrl
:
"/mainSale/4.png"
}
],
list
:[],
storeCode
:
''
,
oyStallCode
:
''
,
userId
:
''
userId
:
''
,
logoUrl
:
"/mainSale/4.png"
,
dsc
:
"推荐完成注册,完成会员拉新"
}
},
created
()
{
...
...
@@ -46,18 +42,24 @@ import { getUserInfoByUserId } from "@/api/sidebar/voucher";
methods
:{
zReadyGetUserFromId
()
{
let
userName
=
this
.
userId
getUserInfoByUserId
({
userName
}).
then
(
res
=>
{
// alert('获取成功')
this
.
storeCode
=
res
.
data
[
0
].
oyStallMemberId
// let userName = 'ShanDian'
getUserInfoByUserId
({
userName
}).
then
(
res
=>
{
if
(
res
.
data
.
length
==
0
)
{
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
=>
{
})
},
sendMessage
(){
if
(
this
.
storeCode
==
''
)
{
alert
(
'您当前没有绑定店铺'
)
}
else
{
let
url
=
`http://oysales.oywanhao.com/register?storeCode=
${
this
.
storeCode
}
`
sendMessage
(
oyStallMemberId
){
let
url
=
`http://oysales.oywanhao.com/register?storeCode=
${
oyStallMemberId
}
`
wx
.
invoke
(
"sendChatMessage"
,
{
...
...
@@ -75,8 +77,7 @@ import { getUserInfoByUserId } from "@/api/sidebar/voucher";
}
else
if
(
res
.
err_msg
!=
"sendChatMessage:ok"
)
{
}
}
)
}
)
},
}
...
...
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