Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
dev
/
zhiliang-light-mp
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
cbf060d5
authored
2019-08-16 16:09:07 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
no message
1 parent
c5e7bb74
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
72 additions
and
11 deletions
src/app.json
src/pages/address-edit/address-edit.scss
src/pages/my-qrcode/my-qrcode.js
src/pages/my-qrcode/my-qrcode.wxml
src/pages/rank/rank.scss
src/pages/scan-result/scan-result.scss
src/pages/sign-in-record/sign-in-record.scss
src/pages/user-center/user-center.wxml
src/pages/vip-login/vip-login.js
src/app.json
View file @
cbf060d
{
"pages"
:
[
"pages/index/index"
,
"pages/scan-result/scan-result"
,
"pages/user-center/user-center"
,
"pages/scan-result/scan-result"
,
"pages/gift-shop/gift-shop"
,
"pages/gift-detail/gift-detail"
,
"pages/contact/contact"
,
...
...
src/pages/address-edit/address-edit.scss
View file @
cbf060d
...
...
@@ -37,7 +37,7 @@ $contentWidth:690px;
.cont
{
flex
:
1
;
@extend
.bb
;
padding-left
:
20px
;
//
padding-left: 20px;
}
}
...
...
src/pages/my-qrcode/my-qrcode.js
View file @
cbf060d
...
...
@@ -6,6 +6,7 @@ Page({
authorizeVisible
:
false
,
userInfo
:
{},
qrImagePath
:
""
,
imageUrl
:
""
,
},
onShareAppMessage
()
{},
showAuth
()
{
...
...
@@ -25,17 +26,29 @@ Page({
* 获取会员信息
*/
queryMember
()
{
let
_this
=
this
;
return
new
Promise
((
resolve
,
reject
)
=>
{
app
.
post
({
url
:
app
.
api
.
member
,
data
:
{}
}).
then
((
result
)
=>
{
let
userInfo
=
result
this
.
setData
({
_
this
.
setData
({
userInfo
:
userInfo
,
qrImagePath
:
userInfo
.
memberUrl
,
})
wx
.
downloadFile
({
url
:
userInfo
.
memberUrl
,
success
(
res
)
{
if
(
res
.
statusCode
===
200
)
{
_this
.
setData
({
imageUrl
:
res
.
tempFilePath
})
}
}
})
// 生成个人二维码
// let tlMemberCode = userInfo.memberCode;
// let qrSize = this.setCanvasSize(440);
...
...
@@ -86,4 +99,48 @@ Page({
return
size
;
},
/**
* 保存图片到本地
*/
saveImageToPhotosAlbum
()
{
console
.
log
(
"saveImageToPhotosAlbum"
);
let
_this
=
this
;
if
(
!
_this
.
data
.
imageUrl
)
{
wx
.
showToast
({
title
:
"图片加载中,请重试"
,
icon
:
"none"
})
return
;
}
wx
.
saveImageToPhotosAlbum
({
filePath
:
_this
.
data
.
imageUrl
,
success
(
res
)
{
wx
.
showToast
({
title
:
'保存成功'
,
icon
:
'success'
});
},
fail
(
err
)
{
wx
.
getSetting
({
success
:
(
res
)
=>
{
if
(
!
res
.
authSetting
[
'scope.writePhotosAlbum'
])
{
// 未授权
wx
.
showModal
({
title
:
'提示'
,
content
:
'小程序请求访问相册权限'
,
confirmText
:
'前往授权'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
wx
.
openSetting
({
success
(
res
)
{}
})
}
else
if
(
res
.
cancel
)
{}
}
})
}
}
})
}
})
},
})
...
...
src/pages/my-qrcode/my-qrcode.wxml
View file @
cbf060d
...
...
@@ -15,7 +15,7 @@
</view>
<view class="tips">分享邀请好友加入,赢取推广积分</view>
<view class="btn-wrap">
<view class="btn">保存图片</view>
<view
bindtap="saveImageToPhotosAlbum"
class="btn">保存图片</view>
</view>
</view>
</view>
...
...
src/pages/rank/rank.scss
View file @
cbf060d
...
...
@@ -195,7 +195,7 @@ $contentWidth:690px;
// 排行item
.rank-item
{
display
:
flex
;
justify-content
:
space-between
;
//
justify-content: space-between;
border-bottom
:
solid
1px
#dddddd
;
$itemHeight
:
104px
;
height
:
$itemHeight
;
...
...
@@ -217,8 +217,8 @@ $contentWidth:690px;
.user
{
display
:
flex
;
align-items
:
center
;
font-size
:
32
px
;
width
:
3
0
0px
;
font-size
:
28
px
;
width
:
3
6
0px
;
// background-color: wheat;
@include
no-wrap
();
overflow-x
:
hidden
;
...
...
src/pages/scan-result/scan-result.scss
View file @
cbf060d
...
...
@@ -41,7 +41,7 @@
.btn2
{
background
:
transparent
;
border
:
solid
1
px
#3680EB
;
border
:
solid
1
PX
#3680EB
;
color
:
#3680EB
;
}
}
...
...
src/pages/sign-in-record/sign-in-record.scss
View file @
cbf060d
...
...
@@ -24,11 +24,14 @@ $contentWidth:690px;
.func-wrap
{
}
.func
{
@extend
.fcc
;
// @extend .fcc;
display
:
flex
;
align-items
:
center
;
height
:
80px
;
// border-bottom: solid 1px #DDDDDD;
font-size
:
32px
;
color
:
#3680EB
;
@extend
.bb
;
padding-left
:
150px
;
.icon
{
width
:
32px
;
...
...
src/pages/user-center/user-center.wxml
View file @
cbf060d
...
...
@@ -123,7 +123,7 @@
</view>
<view bindtap="onContactUsHandler" class="func-wrap-item">
<view class="icon-wrap">
<image class="icon" mode="aspectFit" src="../../image/icon/
/
icon-concat-us.png" />
<image class="icon" mode="aspectFit" src="../../image/icon/icon-concat-us.png" />
</view>
<view class="txt">联系我们</view>
</view>
...
...
src/pages/vip-login/vip-login.js
View file @
cbf060d
...
...
@@ -397,6 +397,7 @@ Page({
this
.
setData
({
membersShipIndex
:
index
,
memberTypeName
:
this
.
data
.
membersShipList
[
index
].
memberTypeName
,
memberTypeCode
:
this
.
data
.
membersShipList
[
index
].
memberTypeCode
,
})
},
...
...
Please
register
or
sign in
to post a comment