Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hello_taobao
Project
Project
Details
Activity
Releases
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
wildfirecode13
hello_taobao
Commits
678de40c
Commit
678de40c
authored
Sep 08, 2020
by
汪欢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
cb98a6a2
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
274 additions
and
136 deletions
+274
-136
index$.web.js
dist/.tea/entryFiles-development/index$.web.js
+1
-1
index$.worker.js
dist/.tea/entryFiles-development/index$.worker.js
+14
-17
app.json
dist/app.json
+1
-1
comgou_mai_ji_lu32.js
dist/components/comgou_mai_ji_lu32/comgou_mai_ji_lu32.js
+33
-82
prizeModal.acss
dist/components/prizeModal/prizeModal.acss
+2
-1
pagehuo_dong_ye.acss
dist/pages/pagehuo_dong_ye/pagehuo_dong_ye.acss
+3
-1
pagehuo_dong_ye.axml
dist/pages/pagehuo_dong_ye/pagehuo_dong_ye.axml
+9
-3
pagehuo_dong_ye.js
dist/pages/pagehuo_dong_ye/pagehuo_dong_ye.js
+98
-22
pagejie_shu_ye.axml
dist/pages/pagejie_shu_ye/pagejie_shu_ye.axml
+19
-5
pagejie_shu_ye.js
dist/pages/pagejie_shu_ye/pagejie_shu_ye.js
+45
-2
my-api.js
dist/utils/my-api.js
+0
-1
request.js
dist/utils/request.js
+49
-0
No files found.
dist/.tea/entryFiles-development/index$.web.js
View file @
678de40c
...
...
@@ -8,6 +8,6 @@ require('../../components/logisticsModal/logisticsModal?hash=05d2a9730dd6009bf94
require
(
'../../components/prizeModal/prizeModal?hash=951cb6a7fcdd2a5332763295aa08b4f86b6fd2e1'
);
require
(
'../../pages/pageshou_ye/pageshou_ye?hash=f6ca2530b12f33cb12545f5a792a8e73d47ec084'
);
require
(
'../../pages/pagehuo_dong_ye/pagehuo_dong_ye?hash=90465399d3364a1028b01344ac9aa9dacad0f7e0'
);
require
(
'../../pages/myprize/myprize?hash=74b7edb09b315961bb13059a83b72836912bfd2c'
);
require
(
'../../pages/pagejie_shu_ye/pagejie_shu_ye?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68'
);
require
(
'../../pages/myprize/myprize?hash=74b7edb09b315961bb13059a83b72836912bfd2c'
);
require
(
'../../pages/pagewo_de_jiang_pin_ye_mian1/pagewo_de_jiang_pin_ye_mian1?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68'
);
dist/.tea/entryFiles-development/index$.worker.js
View file @
678de40c
...
...
@@ -5,12 +5,9 @@ self.__appxInited = 1;
require
(
'./config$'
);
if
(
navigator
.
userAgent
&&
(
navigator
.
userAgent
.
indexOf
(
'LyraVM'
)
>
0
||
navigator
.
userAgent
.
indexOf
(
'AlipayIDE'
)
>
0
)
)
{
var
AFAppX
=
self
.
AFAppX
.
getAppContext
?
self
.
AFAppX
.
getAppContext
().
AFAppX
:
self
.
AFAppX
;
}
else
{
importScripts
(
'https://appx/af-appx.worker.min.js'
);
var
AFAppX
=
self
.
AFAppX
;
}
var
AFAppX
=
self
.
AFAppX
.
getAppContext
?
self
.
AFAppX
.
getAppContext
().
AFAppX
:
self
.
AFAppX
;
self
.
getCurrentPages
=
AFAppX
.
getCurrentPages
;
self
.
getApp
=
AFAppX
.
getApp
;
self
.
Page
=
AFAppX
.
Page
;
...
...
@@ -39,8 +36,8 @@ require('../../components/logisticsModal/logisticsModal?hash=05d2a9730dd6009bf94
require
(
'../../components/prizeModal/prizeModal?hash=951cb6a7fcdd2a5332763295aa08b4f86b6fd2e1'
);
require
(
'../../pages/pageshou_ye/pageshou_ye?hash=f6ca2530b12f33cb12545f5a792a8e73d47ec084'
);
require
(
'../../pages/pagehuo_dong_ye/pagehuo_dong_ye?hash=90465399d3364a1028b01344ac9aa9dacad0f7e0'
);
require
(
'../../pages/myprize/myprize?hash=74b7edb09b315961bb13059a83b72836912bfd2c'
);
require
(
'../../pages/pagejie_shu_ye/pagejie_shu_ye?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68'
);
require
(
'../../pages/myprize/myprize?hash=74b7edb09b315961bb13059a83b72836912bfd2c'
);
require
(
'../../pages/pagewo_de_jiang_pin_ye_mian1/pagewo_de_jiang_pin_ye_mian1?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68'
);
}
self
.
bootstrapApp
?
self
.
bootstrapApp
({
success
})
:
success
();
...
...
dist/app.json
View file @
678de40c
...
...
@@ -2,8 +2,8 @@
"pages"
:
[
"pages/pageshou_ye/pageshou_ye"
,
"pages/pagehuo_dong_ye/pagehuo_dong_ye"
,
"pages/myprize/myprize"
,
"pages/pagejie_shu_ye/pagejie_shu_ye"
,
"pages/myprize/myprize"
,
"pages/pagewo_de_jiang_pin_ye_mian1/pagewo_de_jiang_pin_ye_mian1"
],
"window"
:
{}
...
...
dist/components/comgou_mai_ji_lu32/comgou_mai_ji_lu32.js
View file @
678de40c
...
...
@@ -5,109 +5,60 @@ Component({
props
:
{},
data
:
{
resList
:
resList
,
orderList
:[
orderList
:
[
{
orderDay
:
'09月16日'
,
orderDay
:
'09月16日'
,
orderFloor
:
10
,
consumeCredits
:
100
consumeCredits
:
100
},
{
orderDay
:
'09月17日'
,
orderDay
:
'09月17日'
,
orderFloor
:
20
,
consumeCredits
:
200
consumeCredits
:
200
},
{
orderDay
:
'09月18日'
,
orderDay
:
'09月18日'
,
orderFloor
:
30
,
consumeCredits
:
300
consumeCredits
:
300
},
{
orderDay
:
'09月19日'
,
orderDay
:
'09月19日'
,
orderFloor
:
40
,
consumeCredits
:
400
consumeCredits
:
400
},
{
orderDay
:
'09月20日'
,
orderDay
:
'09月20日'
,
orderFloor
:
50
,
consumeCredits
:
500
consumeCredits
:
500
},
],
orderStyle
:[
{
orderday
:{
// width:40 + 'rpx',
left
:
12
+
'rpx'
,
position
:
'absolute'
,
color
:
'#ffffff'
,
top
:
''
},
orderfloor
:{
width
:
40
+
'rpx'
,
left
:
200
+
'rpx'
,
position
:
'absolute'
,
color
:
'#ffffff'
,
top
:
''
},
consumecredits
:{
width
:
40
+
'rpx'
,
left
:
400
+
'rpx'
,
position
:
'absolute'
,
color
:
'#ffffff'
,
top
:
''
}
},
{
orderday
:{
orderStyle
:
{
orderday
:
{
// width:40 + 'rpx',
left
:
12
+
'rpx'
,
position
:
'absolute'
,
left
:
12
+
'rpx'
,
position
:
'absolute'
,
color
:
'#ffffff'
,
top
:
''
top
:
''
},
orderfloor
:
{
width
:
40
+
'rpx'
,
left
:
200
+
'rpx'
,
position
:
'absolute'
,
orderfloor
:
{
width
:
40
+
'rpx'
,
left
:
200
+
'rpx'
,
position
:
'absolute'
,
color
:
'#ffffff'
,
top
:
''
top
:
''
},
consumecredits
:
{
width
:
40
+
'rpx'
,
left
:
400
+
'rpx'
,
position
:
'absolute'
,
consumecredits
:
{
width
:
40
+
'rpx'
,
left
:
400
+
'rpx'
,
position
:
'absolute'
,
color
:
'#ffffff'
,
top
:
''
top
:
''
}
},
{
orderday
:{
// width:40 + 'rpx',
left
:
12
+
'rpx'
,
position
:
'absolute'
,
color
:
'#ffffff'
,
top
:
''
},
orderfloor
:{
width
:
40
+
'rpx'
,
left
:
200
+
'rpx'
,
position
:
'absolute'
,
color
:
'#ffffff'
,
top
:
''
},
consumecredits
:{
width
:
40
+
'rpx'
,
left
:
400
+
'rpx'
,
position
:
'absolute'
,
color
:
'#ffffff'
,
top
:
''
}
}
]
},
methods
:
{
onOrderModalClose
(){
const
{
onOrderModalClose
}
=
this
.
props
onOrderModalClose
()
{
const
{
onOrderModalClose
}
=
this
.
props
onOrderModalClose
&&
onOrderModalClose
();
}
},
...
...
dist/components/prizeModal/prizeModal.acss
View file @
678de40c
...
...
@@ -12,7 +12,8 @@
.my-prize-page .my-prize-wrap {
width: 100%;
height: 100%;
overflow: auto;
/* overflow: auto; */
overflow-x: auto;
}
.my-prize-page .my-prize-label {
...
...
dist/pages/pagehuo_dong_ye/pagehuo_dong_ye.acss
View file @
678de40c
...
...
@@ -111,10 +111,12 @@
position: absolute;
}
.huo_dong_ye .jiang_pin78 .zu114 .zu128 {
width: 681rpx;
/* width: 681rpx; */
width: 100%;
height: 191rpx;
opacity: 1;
position: absolute;
overflow-x: auto;
}
.huo_dong_ye .jiang_pin78 .zu114 .zu128 .ju_xing51_kao_bei2 {
width: 681rpx;
...
...
dist/pages/pagehuo_dong_ye/pagehuo_dong_ye.axml
View file @
678de40c
...
...
@@ -14,8 +14,8 @@
<image class="zu116" src={{resList['51ca8493-ed2a-4273-a6b6-300bd9b2eb93'].url}} />
<image class="zu5" src={{resList['e7baa6fe-46fd-422f-ac6a-3298fb965e6f'].url}} />
<view class="zu114">
<view class="zu128">
<image class="ju_xing51_kao_bei2" src={{resList['6b68feb2-7c84-473e-8f2c-b6571e7659e3'].url}} />
<view class="zu128"
a:for="{{prizeList}}" a:for-index="index" a:for-item="item" style="{{item.liststyle}}"
>
<
!-- <
image class="ju_xing51_kao_bei2" src={{resList['6b68feb2-7c84-473e-8f2c-b6571e7659e3'].url}} />
<label class="n20_lou_ceng86">n*20%楼层</label>
<label class="xxx_yuan_jiang_pin85">XXX元奖品</label>
<label class="n20_lou_ceng84">n*20%楼层</label>
...
...
@@ -23,7 +23,13 @@
<label class="n20_lou_ceng82">n*20%楼层</label>
<label class="xxx_yuan_jiang_pin81">XXX元奖品</label>
<label class="n20_lou_ceng80">n*20%楼层</label>
<label class="xxx_yuan_jiang_pin79">XXX元奖品</label>
<label class="xxx_yuan_jiang_pin79">XXX元奖品</label> -->
<!-- bianli -->
<image style="width:100;height:100" src={{item.image}}></image>
<label>{{item.probability}}楼层</label>
<label>{{item.name}}奖品</label>
</view>
</view>
</view>
...
...
dist/pages/pagehuo_dong_ye/pagehuo_dong_ye.js
View file @
678de40c
'use strict'
;
import
resList
from
'../../resconfig/resList'
;
//import API from '../../api';
import
resList
from
'../../resconfig/resList'
;
import
API
from
'../../api'
;
Page
({
data
:
{
...
...
@@ -16,17 +17,27 @@ Page({
h
:
''
,
m
:
''
,
s
:
''
,
}
},
// 奖品列表数据
prizeList
:[],
startTime
:
''
,
endingTime
:
''
,
},
onLoad
(
props
)
{
this
.
setData
({
resList
:
resList
});
this
.
getBaseInfo
();
this
.
getEndTime
();
},
// 减楼层
reduceFloor
(){
let
{
canBuyFloor
}
=
this
.
data
...
...
@@ -62,13 +73,59 @@ Page({
},
// 购买楼层
buyFloors
(){
async
buyFloors
(){
// 购买楼层数
let
{
canBuyFloor
}
=
this
.
data
// 判断会员等级
let
{
isVip
,
grade
,
gradeName
,
gradeCredits
}
=
await
API
.
getVipInfo
()
||
{};
API
.
submit
({
floor
:
canBuyFloor
,
grade
:
grade
}).
catch
((
res
)
=>
{
console
.
log
(
res
);
})
// 显示
this
.
setData
({
orderNowModalVisible
:
true
})
},
// 获取奖品列表数据
async
getBaseInfo
(){
let
listStyleArr
=
[]
let
{
data
}
=
await
API
.
getActivityBaseInfoById
()
||
{};
let
list
=
data
.
list
;
let
prize
=
data
.
prize
;
// startTime = data.startTime;
// endingTime = data.endTime;
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
){
let
listStyle
=
{
left
:
30
*
i
+
'rpx'
,
width
:
200
+
'rpx'
,
height
:
200
+
'rpx'
}
listStyleArr
.
push
(
listStyle
);
}
// 合并样式
for
(
let
l
of
list
){
for
(
let
ls
of
listStyleArr
){
l
.
liststyle
=
ls
;
}
}
this
.
setData
({
prizeList
:
list
,
startTime
:
data
.
startTime
,
endingTime
:
data
.
endingTime
})
},
// 关闭立即购买
orderNowModalClose
(){
this
.
setData
({
...
...
@@ -78,26 +135,43 @@ Page({
// 倒计时
getEndTime
()
{
// if (!prizeList || !prizeList.length) return null
let
{
prizeList
,
endingTime
}
=
this
.
data
if
(
!
prizeList
||
!
prizeList
.
length
)
return
null
// const endTime = prizeList[0].expiredTime
// if (!endTime) return null
// const endTime = '2020/09/30';
const
endTime
=
'2020-10-17T00:00:00'
const
t1
=
new
Date
(
endTime
).
toLocaleDateString
()
+
''
;
//获取年月日
const
d1
=
new
Date
(
endTime
).
getDate
()
+
''
;
const
t2
=
new
Date
(
endTime
).
getHours
()
+
''
;
//获取时
const
t3
=
new
Date
(
endTime
).
getMinutes
()
+
''
;
//获取分
const
t4
=
new
Date
(
endTime
).
getMilliseconds
()
+
''
;
//获取秒
console
.
log
(
endTime
,
new
Date
(
endTime
+
48
*
60
*
60
*
1000
).
toLocaleString
(),
'endTime'
,
t1
);
// const endTime = '2020-10-17T00:00:00'
let
endTime
=
endingTime
;
let
stringTime
=
this
.
data
.
stringTime
||
(
new
Date
(
endTime
)).
getTime
();
// this.setData({
// stringTime
// })
// const t1 = new Date(endTime).toLocaleDateString() + '';//获取年月日
// const d1 = new Date(endTime).getDate() + '';
// const t2 = new Date(endTime).getHours() + '';//获取时
// const t3 = new Date(endTime).getMinutes() + '';//获取分
// const t4 = new Date(endTime).getMilliseconds() + '';//获取秒
// console.log(endTime, new Date(endTime + 48 * 60 * 60 * 1000).toLocaleString(), 'endTime',t1);
const
t1
=
new
Date
(
stringTime
).
toLocaleDateString
()
+
''
;
//获取年月日
const
d1
=
new
Date
(
stringTime
).
getDate
()
+
''
;
const
t2
=
new
Date
(
stringTime
).
getHours
()
+
''
;
//获取时
const
t3
=
new
Date
(
stringTime
).
getMinutes
()
+
''
;
//获取分
const
t4
=
new
Date
(
stringTime
).
getSeconds
()
+
''
;
//获取秒
let
hh
=
t2
.
padStart
(
2
,
'0'
);
let
mm
=
t3
.
padStart
(
2
,
'0'
);
let
ss
=
t4
.
padStart
(
2
,
'0'
);
setInterval
(()
=>
{
},
1000
)
let
timer
=
setTimeout
(()
=>
{
this
.
setData
({
stringTime
:
stringTime
-
1
})
console
.
log
(
stringTime
,
'stringTime'
);
if
(
stringTime
<=
0
){
clearTimeout
(
timer
);
}
this
.
setData
({
// endTime: t1 + " " + t2.padStart(2, '0') + ":" + t3.padStart(2, '0') + ":" + t4.padStart(2, '0')
endTime
:{
...
...
@@ -107,6 +181,8 @@ Page({
s
:
ss
}
})
},
1000
)
}
});
\ No newline at end of file
dist/pages/pagejie_shu_ye/pagejie_shu_ye.axml
View file @
678de40c
...
...
@@ -15,7 +15,7 @@
<view class="zhong_jiang_zhuang_tai">
<!-- 已中奖名单列表 -->
<view class="yi_zhong_jiang">
<label class="dixxx_ceng68">第XXX层</label>
<
!-- <
label class="dixxx_ceng68">第XXX层</label>
<label class="dixxx_ceng67">第XXX层</label>
<label class="dixxx_ceng66">第XXX层</label>
<label class="ba_la65">巴***拉</label>
...
...
@@ -45,7 +45,15 @@
<image class="ju_xing728_kao_bei7" src={{resList['05f105eb-e5c5-4f5e-8d6a-fbc0ad0718c4'].url}} />
<label class="kao_bei4">?</label>
<label class="dixxx_ceng_kao_bei4">第XXX层</label>
<label class="ba_la_kao_bei4">巴***拉</label>
<label class="ba_la_kao_bei4">巴***拉</label> -->
<!-- 有中奖用户 -->
<view a:for="{{prizeMenu}}" a:for-index="idx" a:for-item="prizeItem">
<label>第{{prizeItem.floor}}层</label>
<label>用户名{{prizeItem.username}}</label>
<image src={{prizeItem.image}}></image>
</view>
</view>
<view class="wei_zhong_jiang">
<label class="zong_lou_ceng_bu_zu_wu_ren_zhong_jiang">总楼层不足,无人中奖</label>
...
...
@@ -56,8 +64,8 @@
<view class="gou_mai_ji_lu46">
<image class="di77" src={{resList['79d3561c-5c4c-47b8-b4f9-51e7f82fcd7c'].url}} />
<image class="jin_du_tiao" src={{resList['40b73efe-19b8-41af-be83-17dc9b933e52'].url}} />
<view class="zu13447">
<label class="tu_ceng09_yue15_ri56">09 月 15日</label>
<view class="zu13447"
>
<
!-- <
label class="tu_ceng09_yue15_ri56">09 月 15日</label>
<label class="tu_ceng10012055">100-120</label>
<label class="tu_ceng10012054">100-120</label>
<label class="tu_ceng10012053">100-120</label>
...
...
@@ -74,7 +82,13 @@
<label class="tu_ceng09_yue15_ri_kao_bei2">09 月 15日</label>
<label class="tu_ceng100120_kao_bei3">100-120</label>
<label class="tu_ceng200_kao_bei3">200</label>
<label class="tu_ceng09_yue15_ri_kao_bei3">09 月 15日</label>
<label class="tu_ceng09_yue15_ri_kao_bei3">09 月 15日</label> -->
<view a:for="{{orderList}}" a:for-index="index" a:for-item="item">
<label>购买日期{{item.createTime}}</label>
<label>购买楼层数{{item.floorRange}}</label>
<label>消耗积分{{item.credits}}</label>
</view>
</view>
</view>
</view>
\ No newline at end of file
dist/pages/pagejie_shu_ye/pagejie_shu_ye.js
View file @
678de40c
'use strict'
;
import
resList
from
'../../resconfig/resList'
;
//import API from '../../api';
import
resList
from
'../../resconfig/resList'
;
import
API
from
'../../api'
;
Page
({
data
:
{},
data
:
{
// 购买记录列表
orderList
:[],
// 中奖名单
prizeMenu
:[]
},
onLoad
(
props
)
{
this
.
setData
({
resList
:
resList
});
this
.
getOrderList
();
this
.
getPrizeMenu
();
},
// 获取购买记录
async
getOrderList
(){
let
{
data
}
=
await
API
.
getBuyFloorList
()
||
{};
this
.
setData
({
orderList
:
data
})
},
async
getPrizeMenu
(){
let
floorPrize
=
await
API
.
getFloorPrize
().
data
||
{};
// 用户名单处理
let
personMenuArr
=
[];
for
(
let
i
=
0
;
i
<
floorPrize
.
length
;
i
++
){
let
userName
=
floorPrize
[
i
].
uerNick
;
if
(
userName
.
length
>=
2
){
let
firstLetter
=
userName
.
subStr
(
0
,
1
);
let
lastLetter
=
userName
.
reverse
().
subStr
(
0
,
1
);
userName
=
firstLetter
+
'***'
+
lastLetter
;
}
personMenuArr
.
push
(
userName
);
}
// 处理好的姓名合并到floorPrize
if
(
floorPrize
!=
null
){
for
(
let
floorprize
of
floorPrize
){
for
(
let
username
of
personMenuArr
){
floorprize
.
username
=
username
;
}
}
}
this
.
setData
({
prizeMenu
:
floorPrize
})
}
});
\ No newline at end of file
dist/utils/my-api.js
View file @
678de40c
...
...
@@ -33,4 +33,3 @@ export const getSystemInfo = () => {
});
});
};
dist/utils/request.js
0 → 100644
View file @
678de40c
const
{
cloud
,
requestType
,
cloudFnName
}
=
getApp
();
import
{
commonToast
,
redirectTo
}
from
'./my-api'
;
const
request
=
(
url
,
method
,
params
,
ext
=
{})
=>
{
const
{
isShowLoading
}
=
ext
;
const
hideMyLoading
=
()
=>
{
if
(
isShowLoading
)
{
my
.
hideLoading
();
}
};
if
(
isShowLoading
)
{
my
.
showLoading
();
}
const
requestAms
=
()
=>
{
return
my
.
request
({
url
:
`https://ams.dui88.com/server/index.php?g=Web&c=Mock&o=simple&projectID=218&uri=
${
cloudFnName
}
.
${
url
}
`
,
method
,
data
:
params
,
dataType
:
'json'
}).
then
(
res
=>
{
hideMyLoading
();
return
res
.
data
;
}).
catch
(()
=>
{
hideMyLoading
();
});
}
const
requestCloud
=
()
=>
{
return
cloud
.
function
.
invoke
(
cloudFnName
,
params
,
url
).
then
(
res
=>
{
hideMyLoading
();
// 预热期的活动时间已过,提醒用户去正式期
if
(
res
.
code
===
'230001'
)
{
commonToast
(
res
.
message
||
'正式活动已开启,请前往参与活动'
)
redirectTo
(
'/pages/main/main'
)
return
}
return
res
;
}).
catch
(()
=>
{
hideMyLoading
();
});
}
return
requestType
===
'ams'
?
requestAms
()
:
requestCloud
();
};
export
default
request
;
\ No newline at end of file
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