Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
feed6cf5
Commit
feed6cf5
authored
Apr 24, 2022
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增会员码页面
parent
d0e1fb2a
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
135 additions
and
5 deletions
+135
-5
src/app.json
+2
-1
src/main.js
+8
-1
src/pages/memberCode/index.vue
+89
-0
src/pages/memberCode/main.js
+5
-0
src/pages/memberCode/main.json
+8
-0
static/font/iconfont.css
+23
-3
No files found.
src/app.json
View file @
feed6cf5
...
@@ -14,7 +14,8 @@
...
@@ -14,7 +14,8 @@
"pages/tabBar4/main"
,
"pages/tabBar4/main"
,
"pages/changeAdr/main"
,
"pages/changeAdr/main"
,
"pages/downFile/main"
,
"pages/downFile/main"
,
"pages/wxArticle/main"
"pages/wxArticle/main"
,
"pages/memberCode/main"
],
],
"subPackages"
:
[
"subPackages"
:
[
{
{
...
...
src/main.js
View file @
feed6cf5
...
@@ -184,7 +184,14 @@ wx.onAppRoute(res => {
...
@@ -184,7 +184,14 @@ wx.onAppRoute(res => {
}
}
if
(
!
userId
)
{
// 防止多次调用
if
(
!
userId
)
{
// 防止多次调用
// 获取当前用户 id
// 获取当前用户 id
live
.
getUserInfo
().
then
(
res
=>
{
userId
=
res
.
data
.
data
?
res
.
data
.
data
.
userId
:
''
})
live
.
getUserInfo
().
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
wx
.
setStorageSync
(
'loginUserInfo'
,
res
.
data
.
data
?
res
.
data
.
data
:
{})
console
.
log
(
Store
.
state
.
loginUserInfo
.
mobilephone
,
'--------------mobilephone---1'
)
userId
=
res
.
data
.
data
?
res
.
data
.
data
.
userId
:
''
}
})
}
}
userId
&&
resolve
()
userId
&&
resolve
()
}).
then
(()
=>
{
}).
then
(()
=>
{
...
...
src/pages/memberCode/index.vue
0 → 100644
View file @
feed6cf5
// 会员码
<
template
>
<div
class=
"memberCode"
>
<div
class=
"main"
>
<div
class=
"title flex"
>
<i
class=
"iconfont icon-saomiaochenggong"
></i>
<p>
向商家展示会员码
</p>
</div>
<div
class=
"codeMain"
>
<!-- 条形码 -->
<div
class=
"barCode"
>
</div>
<!-- 二维码 -->
<div
class=
"qrCode"
>
</div>
</div>
</div>
</div>
</
template
>
<
script
type=
"text/ecmascript-6"
>
export
default
{
name
:
"memberCode"
,
data
()
{
return
{
mobilephone
:
""
,
getStep
:
0
,
};
},
components
:
{},
computed
:
{},
created
()
{
this
.
getSync
();
},
mounted
()
{},
methods
:
{
// 获取缓存用户信息
getSync
()
{
if
(
this
.
getStep
>
10
)
return
;
this
.
getStep
++
;
let
loginUserInfo
=
wx
.
getStorageSync
(
'loginUserInfo'
)
||
null
;
if
((
loginUserInfo
&&
loginUserInfo
.
mobilephone
)
&&
!
this
.
mobilephone
)
{
this
.
mobilephone
=
loginUserInfo
.
mobilephone
this
.
getStep
=
0
;
this
.
init
();
}
else
{
setTimeout
(()
=>
{
this
.
getSync
();
},
200
);
}
},
init
()
{
console
.
log
(
"开始初始化"
)
}
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.memberCode
{
width
:
100vw
;
height
:
100vh
;
background
:
#F3F3F3
;
overflow
:
auto
;
.main{
margin
:
20px
12px
;
background
:
#fff
;
}
.title
{
align-items
:
center
;
padding
:
16px
20px
;
color
:
#666
;
background
:
#FAFAFA
;
font-size
:
14px
;
.iconfont{
font-size
:
12px
;
color
:
#333
;
margin-right
:
10px
;
}
}
.codeMain
{
padding
:
20px
26px
;
background
:
#fff
;
}
}
</
style
>
src/pages/memberCode/main.js
0 → 100644
View file @
feed6cf5
import
Vue
from
'vue'
import
App
from
'./index'
const
app
=
new
Vue
(
App
)
app
.
$mount
()
src/pages/memberCode/main.json
0 → 100644
View file @
feed6cf5
{
"usingComponents"
:
{
},
"navigationBarTitleText"
:
"会员码"
,
"enablePullDownRefresh"
:
false
,
"backgroundColor"
:
"#f5f5f5"
}
static/font/iconfont.css
View file @
feed6cf5
@font-face
{
@font-face
{
font-family
:
"iconfont"
;
/* Project id 1026419 */
font-family
:
"iconfont"
;
/* Project id 1026419 */
src
:
url('//at.alicdn.com/t/font_1026419_
8w19e9hrgtx.woff2?t=1636266763463
')
format
(
'woff2'
),
src
:
url('//at.alicdn.com/t/font_1026419_
paqabdn5xg.woff2?t=1650782206586
')
format
(
'woff2'
),
url('//at.alicdn.com/t/font_1026419_
8w19e9hrgtx.woff?t=1636266763463
')
format
(
'woff'
),
url('//at.alicdn.com/t/font_1026419_
paqabdn5xg.woff?t=1650782206586
')
format
(
'woff'
),
url('//at.alicdn.com/t/font_1026419_
8w19e9hrgtx.ttf?t=1636266763463
')
format
(
'truetype'
);
url('//at.alicdn.com/t/font_1026419_
paqabdn5xg.ttf?t=1650782206586
')
format
(
'truetype'
);
}
}
.iconfont
{
.iconfont
{
...
@@ -13,6 +13,26 @@
...
@@ -13,6 +13,26 @@
-moz-osx-font-smoothing
:
grayscale
;
-moz-osx-font-smoothing
:
grayscale
;
}
}
.icon-saomiaochenggong
:before
{
content
:
"\e737"
;
}
.icon-fuzhi
:before
{
content
:
"\e6a1"
;
}
.icon-wancheng
:before
{
content
:
"\e69d"
;
}
.icon-shizhong1
:before
{
content
:
"\e69f"
;
}
.icon-quxiao1
:before
{
content
:
"\e6a0"
;
}
.icon-gantanhao
:before
{
.icon-gantanhao
:before
{
content
:
"\e69a"
;
content
:
"\e69a"
;
}
}
...
...
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