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
7d0792fc
authored
2019-10-15 16:50:41 +0800
by
simon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
默认提交
1 parent
5e7fefff
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
177 additions
and
111 deletions
src/pages/contact/contact.scss
src/pages/contact/contact.wxml
src/pages/index/index.js
src/pages/index/index.scss
src/pages/index/index.wxml
src/pages/my-qrcode/my-qrcode.js
src/pages/my-qrcode/my-qrcode.wxml
src/pages/rank/rank.js
src/pages/rank/rank.scss
src/pages/rank/rank.wxml
src/pages/user-center/user-center.wxml
src/pages/vip-login/vip-login.scss
src/pages/vip-login/vip-login.wxml
src/pages/contact/contact.scss
View file @
7d0792f
...
...
@@ -4,7 +4,7 @@
$contentWidth
:
690px
;
.page
{
border
-bottom
:
$pageBottom
;
padding
-bottom
:
$pageBottom
;
.bgc
{}
...
...
@@ -91,8 +91,6 @@ $contentWidth:690px;
}
}
.border
{
width
:
$contentWidth
;
@extend
.shadow
;
...
...
@@ -101,3 +99,10 @@ $contentWidth:690px;
padding
:
24px
30px
;
margin
:
0
auto
20px
;
}
.official-account-wrap
{
width
:
$contentWidth
;
margin
:
24px
auto
;
.official-account
{}
}
...
...
src/pages/contact/contact.wxml
View file @
7d0792f
...
...
@@ -41,14 +41,17 @@
</view>
<!-- 关注 -->
<view class="border focus">
<image bindtap="onPreviewImageHandler"
class="qrcode" mode="widthFix" src="{{qrcodeUrl}}" />
<image bindtap="onPreviewImageHandler" class="qrcode" mode="widthFix" src="{{qrcodeUrl}}" />
<view class="tips">更多讯息,欢迎关注我们的公众号</view>
<!-- <view bindtap="onPreviewImageHandler" class="btn">一键关注</view> -->
</view>
<!-- 一键关注 -->
<view class="official-account-wrap">
<official-account class="official-account" bindload="officialAccountLoadFuc" binderror="officialAccountErrorFuc"></official-account>
</view>
</view>
</view>
</view>
<van-popup show="{{ authorizeVisible }}">
<authorize-comp bind:evtcomp="evtcomp"></authorize-comp>
</van-popup>
...
...
src/pages/index/index.js
View file @
7d0792f
...
...
@@ -93,6 +93,14 @@ Page({
productList
:
[]
})
},
officialAccountLoadFuc
(
evt
)
{
console
.
log
(
"officialAccountLoadFuc:"
,
evt
)
},
officialAccountErrorFuc
(
evt
)
{
console
.
log
(
"officialAccountErrorFuc:"
,
evt
)
},
/**
* 请求产品
*/
...
...
src/pages/index/index.scss
View file @
7d0792f
...
...
@@ -24,7 +24,7 @@ $contentWidth:670px;
height
:
300px
;
}
.space1
{
.space1
{
height
:
222px
;
}
...
...
@@ -43,8 +43,7 @@ $contentWidth:670px;
&
-ipt-wrap
{
@extend
.bb
;
padding-left
:
30px
;
width
:
568px
;
flex
:
1
;
width
:
320px
;
.ipt
{
font-size
:
28px
;
...
...
@@ -61,12 +60,38 @@ $contentWidth:670px;
&
-scan
{
@extend
.fcc
;
width
:
100px
;
height
:
100px
;
.icon
{
width
:
40px
;
height
:
40px
;
}
.icon-search
{
width
:
36px
;
height
:
36px
;
opacity
:
.6
;
}
.icon2
{
width
:
60px
;
height
:
60px
;
margin-left
:
4px
;
}
.t1
{
font-size
:
22px
;
margin
:
0
12px
0
;
color
:
#333333
;
text-align
:
center
;
}
}
&
-scan2
{
flex-wrap
:
wrap
;
flex
:
1
;
}
}
}
...
...
src/pages/index/index.wxml
View file @
7d0792f
...
...
@@ -11,12 +11,13 @@
<input value="{{code}}" bindinput="bindCodeInput" class="ipt" placeholder="请输入串码" />
</view>
<view bindtap="onSearchHandler" class="search-scan">
<image class="icon" mode="aspectFit" src="../../image/icon/icon-search.png" />
<image class="icon
icon-search
" mode="aspectFit" src="../../image/icon/icon-search.png" />
</view>
<!-- 隐藏扫描二维码 -->
<view class="search-line"></view>
<view bindtap="onScanHandler" class="search-scan">
<image class="icon" mode="aspectFit" src="../../image/icon/icon-scan.png" />
<!-- 隐藏扫描二维码 -->
<view bindtap="onScanHandler" class="search-scan search-scan2">
<text class="t1">扫码得积分</text>
<image class="icon icon2" mode="aspectFit" src="../../image/icon/icon-scan.png" />
</view>
</view>
</view>
...
...
src/pages/my-qrcode/my-qrcode.js
View file @
7d0792f
...
...
@@ -152,6 +152,22 @@ Page({
},
/**
* 图片查看
*/
onPreviewImageHandler
(
evt
)
{
// let curItem = getBindtapData(evt);
// let index = getBindtapData(evt, "index");
// let current = curItem[index] || '';
console
.
log
(
"onPreviewImageHandler"
)
let
current
=
this
.
data
.
imageUrl
;
let
urls
=
[
current
];
wx
.
previewImage
({
current
:
current
,
urls
:
urls
})
},
/**
* 保存图片到本地
*/
saveImageToPhotosAlbum
()
{
...
...
@@ -196,11 +212,6 @@ Page({
},
// 创建二维码
createQrCode
(
content
,
canvasId
,
cavW
,
cavH
)
{
//调用插件中的draw方法,绘制二维码图片
...
...
@@ -241,28 +252,28 @@ Page({
return
size
;
},
// 隐藏蒙层
hideMask
()
{
this
.
setData
({
authorizeVisible
:
false
,
})
},
// 子组件事件
evtcomp
(
evt
)
{
let
{
name
,
data
}
=
evt
.
detail
;
switch
(
name
)
{
// 隐藏蒙层
hideMask
()
{
this
.
setData
({
authorizeVisible
:
false
,
})
},
// 子组件事件
evtcomp
(
evt
)
{
let
{
name
,
data
}
=
evt
.
detail
;
switch
(
name
)
{
// 隐藏弹窗
case
"_evt_hide_mask"
:
this
.
hideMask
();
break
;
// 隐藏弹窗
case
"_evt_hide_mask"
:
this
.
hideMask
();
break
;
default
:
break
;
}
},
default
:
break
;
}
},
})
...
...
src/pages/my-qrcode/my-qrcode.wxml
View file @
7d0792f
...
...
@@ -6,7 +6,7 @@
<view class="top-space"></view>
<view class="content">
<view class="card">
<image class="my-card" mode="widthFix" src="{{imageUrl}}" />
<image
bindtap="onPreviewImageHandler"
class="my-card" mode="widthFix" src="{{imageUrl}}" />
<!-- <image class="avatar" mode="widthFix" src="{{userInfo.avatar}}" />
<view class="nickname">{{userInfo.nickname}}</view>
<image class="qrcode" mode="widthFix" src="{{qrImagePath}}" />
...
...
src/pages/rank/rank.js
View file @
7d0792f
...
...
@@ -88,6 +88,7 @@ Page({
formatRankInfo
(
val
,
status
)
{
let
rankInfo
=
val
;
if
(
!
rankInfo
)
return
;
if
(
status
==
"promotion"
)
{
rankInfo
.
myMember
.
rank
=
rankInfo
.
myMember
.
promotionNo
;
rankInfo
.
myMember
.
points
=
rankInfo
.
myMember
.
promotionPoints
;
...
...
src/pages/rank/rank.scss
View file @
7d0792f
...
...
@@ -284,3 +284,9 @@ $contentWidth:690px;
}
}
}
.empty-tips
{
text-align
:
center
;
padding-top
:
400px
;
font-size
:
28px
;
}
...
...
src/pages/rank/rank.wxml
View file @
7d0792f
...
...
@@ -17,79 +17,85 @@
</view>
<!-- 排行 -->
<view class="border rank">
<!-- 功能区 -->
<view class="rank-func">
<view class="rank-func-item">
<view wx:if="{{turnsIndex == 0}}" class="pubish">
<view class="t1">
本轮周期:
<span>{{rankInfo.activityName}}</span>
</view>
<view wx:if="{{status == 'promotion'}}" class="t1 t2">
本轮奖品:
<span class="c1">{{rankInfo.prizeName}}</span>
<block wx:if="{{rankInfo && rankInfo.memberList > 0}}">
<!-- 功能区 -->
<view class="rank-func">
<view class="rank-func-item">
<view wx:if="{{turnsIndex == 0}}" class="pubish">
<view class="t1">
本轮周期:
<span>{{rankInfo.activityName}}</span>
</view>
<view wx:if="{{status == 'promotion'}}" class="t1 t2">
本轮奖品:
<span class="c1">{{rankInfo.prizeName}}</span>
</view>
<view wx:if="{{status == 'rank'}}" class="t1 t2">
我的名次:
<span class="c2">{{rankInfo.myMember.rank || '-'}}</span>
名
</view>
</view>
<view wx:if="{{status == 'rank'}}" class="t1 t2">
我的名次:
<span class="c2">{{rankInfo.myMember.rank || '-'}}</span>
名
<view wx:else class="pubish">
<picker value="{{historyIndex}}" range="{{historyRankInfoList}}" range-key="activityName" bindchange="bindHistoryChange">
<view class="func">
<image class="icon" mode="aspectFit" src="../../image/icon/icon-sign-record.png" />
{{rankInfo.activityName}}
<image class="arrow" mode="aspectFit" src="../../image/icon/icon-filter-down-on.png" />
{{dateStart}}
</view>
</picker>
</view>
</view>
<view wx:else class="pubish">
<picker value="{{historyIndex}}" range="{{historyRankInfoList}}" range-key="activityName" bindchange="bindHistoryChange">
<view class="func">
<image class="icon" mode="aspectFit" src="../../image/icon/icon-sign-record.png" />
{{rankInfo.activityName}}
<image class="arrow" mode="aspectFit" src="../../image/icon/icon-filter-down-on.png" />
{{dateStart}}
</view>
</picker>
</view>
</view>
<view class="rank-func-item rank-func-item2 pubish fje">
<view wx:if="{{turnsIndex == 0}}" data-index="1" bindtap="onChangeTurnsHandler" class="mode">
查看历史排行
</view>
<view wx:if="{{turnsIndex == 1}}" data-index="0" bindtap="onChangeTurnsHandler" class="mode">
返回本轮排行
<view class="rank-func-item rank-func-item2 pubish fje">
<view wx:if="{{turnsIndex == 0}}" data-index="1" bindtap="onChangeTurnsHandler" class="mode">
查看历史排行
</view>
<view wx:if="{{turnsIndex == 1}}" data-index="0" bindtap="onChangeTurnsHandler" class="mode">
返回本轮排行
</view>
</view>
</view>
</view>
<!-- 标题 -->
<view class="tit">
<view class="tt t1">名次</view>
<view class="tt t2">名称</view>
<view class="tt t3">积分</view>
</view>
<!-- 排行item -->
<scroll-view bindscrolltolower="onRankScrolltolower" scroll-y="{{true}}" class="item-wrap">
<view wx:for="{{rankInfo.memberList}}" wx:key="{{index}}" class="rank-item {{item.rank == '1' ? 'rank-item-first':''}}">
<view class="no">
<image wx:if="{{item.rank == '1'}}" class="medal" mode="aspectFit" src="../../image/icon/icon-medal.png" />
<span wx:else>{{item.rank}}</span>
</view>
<view class="user">
<image class="avatar" mode="widthFix" src="{{item.avatar}}" />
{{item.nickname}}
</view>
<view class="integral">{{item.points}}</view>
<!-- 标题 -->
<view class="tit">
<view class="tt t1">名次</view>
<view class="tt t2">名称</view>
<view class="tt t3">积分</view>
</view>
</scroll-view>
<!-- 省略号 -->
<view class="etc">...</view>
<!-- 我的排名 -->
<view class="my-rank" wx:if="{{rankInfo.myMember}}">
<view class="rank-item">
<view class="no">
<image wx:if="{{rankInfo.myMember.rank == 1}}" class="medal" mode="aspectFit" src="../../image/icon/icon-medal.png" />
<span wx:else>{{rankInfo.myMember.rank || '-'}}</span>
<!-- 排行item -->
<scroll-view bindscrolltolower="onRankScrolltolower" scroll-y="{{true}}" class="item-wrap">
<view wx:for="{{rankInfo.memberList}}" wx:key="{{index}}" class="rank-item {{item.rank == '1' ? 'rank-item-first':''}}">
<view class="no">
<image wx:if="{{item.rank == '1'}}" class="medal" mode="aspectFit" src="../../image/icon/icon-medal.png" />
<span wx:else>{{item.rank}}</span>
</view>
<view class="user">
<image class="avatar" mode="widthFix" src="{{item.avatar}}" />
{{item.nickname}}
</view>
<view class="integral">{{item.points}}</view>
</view>
<view class="user">
<image class="avatar" mode="widthFix" src="{{rankInfo.myMember.avatar}}" />
{{rankInfo.myMember.nickname}}
</scroll-view>
<!-- 省略号 -->
<view class="etc">...</view>
<!-- 我的排名 -->
<view class="my-rank" wx:if="{{rankInfo.myMember}}">
<view class="rank-item">
<view class="no">
<image wx:if="{{rankInfo.myMember.rank == 1}}" class="medal" mode="aspectFit" src="../../image/icon/icon-medal.png" />
<span wx:else>{{rankInfo.myMember.rank || '-'}}</span>
</view>
<view class="user">
<image class="avatar" mode="widthFix" src="{{rankInfo.myMember.avatar}}" />
{{rankInfo.myMember.nickname}}
</view>
<view class="integral">{{rankInfo.myMember.points}}</view>
</view>
<view class="integral">{{rankInfo.myMember.points}}</view>
</view>
</block>
<view class="empty-tips">
<!-- <span class="iconfont iconempty"></span> -->
<view class="tips">暂未开启积分排行,敬请期待</view>
</view>
</view>
<!-- 我的奖励按钮 -->
...
...
src/pages/user-center/user-center.wxml
View file @
7d0792f
...
...
@@ -7,14 +7,14 @@
<!-- 用户信息 -->
<view class="user">
<!-- 左边栏 -->
<view class="user-info">
<view class="user-info"
bindtap="toVipVerifyHandler"
>
<image class="avatar" mode="aspectFill" src="{{userInfo.avatar}}" />
<view class="wrap1">
<view class="name">{{userInfo.realName ? userInfo.realName : userInfo.nickname}}</view>
<view wx:if="{{userInfo.auditStatus == 'authorization'}}" class="vip vip-check">
积分会员
</view>
<view wx:elif="{{userInfo.auditStatus == 'unauthorized'}}" class="vip"
bindtap="toVipVerifyHandler"
>
<view wx:elif="{{userInfo.auditStatus == 'unauthorized'}}" class="vip" >
审核中 >
</view>
<view wx:else class="vip" bindtap="toVipLoginHandler">未验证 ></view>
...
...
src/pages/vip-login/vip-login.scss
View file @
7d0792f
...
...
@@ -100,7 +100,7 @@
display
:
flex
;
justify-content
:
space-between
;
@extend
.bb
;
padding
:
32px
66px
66
px
;
padding
:
48px
66px
24
px
;
&
-item
{
text-align
:
center
;
...
...
@@ -127,7 +127,7 @@
}
.submit-tips
{
margin
:
12
px
0
;
padding
:
24
px
0
;
width
:
100%
;
color
:
#333333
;
text-align
:
center
;
...
...
src/pages/vip-login/vip-login.wxml
View file @
7d0792f
...
...
@@ -52,7 +52,7 @@
</view>
<!-- 上传 -->
<view class="upload">
<
view class="upload-tit">请上传身份证或电工证,审核后,可签到及兑换积分</view
>
<
!-- <view class="upload-tit">请上传身份证或电工证,审核后,可签到及兑换积分</view> --
>
<view class="upload-wrap">
<view class="upload-wrap-item">
<image class="image" bindtap="onUploadHandler" mode="aspectFit" src="{{files[0] && files[0].path?files[0].path:'../../image/icon/icon-plus.png'}}" />
...
...
@@ -63,12 +63,12 @@
<view class="tips">示例</view>
</view>
</view>
<view class="submit-tips">
<text class="text">五金分销商请上传营业执照,其他用户上传身份证或电工证\n审核后可参与签到及兑换积分</text>
</view>
</view>
<!-- 提交按钮 -->
<view class="submit-btn" bindtap="onSubmitHandler">确认提交</view>
<view class="submit-tips">
<text class="text">五金分销商请上传营业执照,其他用户上传身份证或电工证\n审核后可参与签到及兑换积分</text>
</view>
</view>
</view>
</view>
...
...
Please
register
or
sign in
to post a comment