Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
a770f5e2
Commit
a770f5e2
authored
Aug 16, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 集点进度_图片
parent
97ce453b
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
119 additions
and
6 deletions
+119
-6
progressImage.js
src/component/progressImage/progressImage.js
+50
-0
progressImage.json
src/component/progressImage/progressImage.json
+6
-0
progressImage.wxml
src/component/progressImage/progressImage.wxml
+19
-0
progressImage.wxss
src/component/progressImage/progressImage.wxss
+31
-0
pointDetail.js
src/pages/pointDetail/pointDetail.js
+4
-0
pointDetail.json
src/pages/pointDetail/pointDetail.json
+3
-1
pointDetail.wxml
src/pages/pointDetail/pointDetail.wxml
+3
-2
pointDetail.wxss
src/pages/pointDetail/pointDetail.wxss
+1
-1
project.config.json
src/project.config.json
+2
-2
No files found.
src/component/progressImage/progressImage.js
0 → 100644
View file @
a770f5e2
// component/progressImage/progressImage.js
const
wxService
=
require
(
'../../utils/wxService'
)
Component
({
properties
:
{
goal
:
{
type
:
Number
,
value
:
0
},
showNum
:
{
type
:
Boolean
,
value
:
false
},
AvailableNum
:
{
type
:
Number
,
value
:
0
},
showRemNum
:
{
type
:
Number
,
value
:
0
},
iconImage
:
{
type
:
String
,
value
:
''
},
iconImageFinsh
:
{
type
:
String
,
value
:
''
}
},
/**
* 页面的初始数据
*/
data
:
{
num
:
5
,
currentProgress
:
0
,
// 当前已完成进度
},
attached
()
{},
observers
:
{
AvailableNum
()
{
wxService
.
nextTick
(()
=>
{
const
{
AvailableNum
,
showRemNum
,
goal
,
showNum
}
=
this
.
data
this
.
setData
({
currentProgress
:
AvailableNum
?
(
showNum
?
goal
:
showRemNum
)
:
showRemNum
})
})
}
}
})
\ No newline at end of file
src/component/progressImage/progressImage.json
0 → 100644
View file @
a770f5e2
{
"component"
:
true
,
"usingComponents"
:
{
}
}
\ No newline at end of file
src/component/progressImage/progressImage.wxml
0 → 100644
View file @
a770f5e2
<!--component/progressImage/progressImage.wxml-->
<view class="section clearfix">
<view class="{{goal >=7 ? '' : 'text-section'}}">
<!-- 当前已完成 -->
<block wx:for="{{currentProgress}}" wx:key="{{index}}">
<view class="text-item" style="width: {{100 / 8}}%;">
<!--<image class="item-img" style="" src="/assets/imgs/point/color.png" mode="widthFix" />-->
<image class="item-img computed" style="" src="{{iconImageFinsh}}" mode="widthFix" />
</view>
</block>
<!-- 当前目标进度 未完成 -->
<block wx:for="{{goal - currentProgress}}" wx:key="{{index}}">
<view class="text-item" style="width: {{100 / 8}}%;">
<image class="item-img undone" style="" src="{{iconImage}}" mode="widthFix" />
</view>
</block>
</view>
</view>
\ No newline at end of file
src/component/progressImage/progressImage.wxss
0 → 100644
View file @
a770f5e2
/* component/progressImage/progressImage.wxss */
.text-section {
text-align: center;
display: flex;
justify-content: center;
}
.text-item {
float: left;
height: 82rpx;
line-height: 82rpx;
margin:0 10rpx 10rpx 0;
box-sizing: content-box;
border-radius: 50%;
}
.item-img {
height: 82rpx;
width: 100%;
border-radius: 50%;
}
.computed {
border: 1rpx dashed #FFF;
}
.undone {
border: 1rpx dashed #ccc;
}
.clearfix::after {
content: '';
display: block;
clear: both; }
\ No newline at end of file
src/pages/pointDetail/pointDetail.js
View file @
a770f5e2
...
...
@@ -21,6 +21,8 @@ wxService.page({
type
:
0
,
// 0 不显示 1 显示
popupType
:
0
,
// 默认不跳转 1 优惠券 2 积分
goal
:
0
,
iconImage
:
''
,
iconImageFinsh
:
''
,
detailImage
:
''
,
countObj
:
{
surplusPoints
:
0
,
...
...
@@ -78,6 +80,8 @@ wxService.page({
currentStatus
:
data
.
status
,
popupType
:
data
.
popupType
,
goal
:
data
.
goal
,
iconImage
:
data
.
iconImage
,
iconImageFinsh
:
data
.
iconImageFinsh
,
desc
:
JSON
.
parse
(
data
.
content
),
detailImage
:
data
.
detailImage
,
dialog
,
...
...
src/pages/pointDetail/pointDetail.json
View file @
a770f5e2
...
...
@@ -3,6 +3,7 @@
"usingComponents"
:
{
"status-img"
:
"/component/statusPoint/statusPoint"
,
"x-dialog"
:
"/component/dialog/dialog"
,
"x-progress-point"
:
"/component/progressPoint/progressPoint"
"x-progress-point"
:
"/component/progressPoint/progressPoint"
,
"x-progress-image"
:
"/component/progressImage/progressImage"
}
}
\ No newline at end of file
src/pages/pointDetail/pointDetail.wxml
View file @
a770f5e2
...
...
@@ -21,12 +21,13 @@
</view>
</view>
<view class="info-progress border_box">
<x-progress-point
<!--
<x-progress-point
active-color='#3EEB9A, #04C25C'
percent='{{currentPercent != null ? currentPercent : 0}}'
stroke-width='20'
radius='20'
/>
/>-->
<x-progress-image goal="{{goal}}" iconImageFinsh="{{iconImageFinsh}}" iconImage="{{iconImage}}" AvailableNum="{{countObj.surplusExchangeCount}}" showRemNum="{{countObj.totalPoints ? tools.parse(countObj.totalPoints % goal) : 0}}" showNum="{{tools.parse(countObj.totalPoints % goal) == 0}}"/>
</view>
<!-- 活动剩余点数 >= 目标点数 wx:if="{{countObj.surplusPoints >= goal}}"-->
<button
...
...
src/pages/pointDetail/pointDetail.wxss
View file @
a770f5e2
...
...
@@ -21,7 +21,7 @@
font-family: PingFangSC-Regular;
}
.info-progress{
padding: 31rpx 0 56rpx
0
;
padding: 31rpx 0 56rpx
15rpx
;
}
.info-status-btn {
margin: 0 50rpx;
...
...
src/project.config.json
View file @
a770f5e2
...
...
@@ -39,7 +39,7 @@
"list"
:
[]
},
"miniprogram"
:
{
"current"
:
1
7
,
"current"
:
1
5
,
"list"
:
[
{
"id"
:
-1
,
...
...
@@ -137,7 +137,7 @@
"id"
:
15
,
"name"
:
"pages/pointDetail/pointDetail"
,
"pathName"
:
"pages/pointDetail/pointDetail"
,
"query"
:
"id=61
0436124833353728
"
,
"query"
:
"id=61
1943773647278080
"
,
"scene"
:
null
},
{
...
...
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