Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
taobao-mini-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
qinhaitao
taobao-mini-template
Commits
123367d9
Commit
123367d9
authored
Sep 14, 2020
by
慕轻风
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wnf
parent
e68cd896
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
57 deletions
+18
-57
app.js
c_client/client/app.js
+1
-1
goodsModal.acss
c_client/client/components/goodsModal/goodsModal.acss
+1
-1
prizeModal.js
c_client/client/components/prizeModal/prizeModal.js
+2
-2
goodsPage.js
c_client/client/pages/goodsPage/goodsPage.js
+0
-38
myprize.js
c_client/client/pages/myprize/myprize.js
+10
-10
request.js
c_client/client/tbcc-sdk/lib/request.js
+2
-3
tb.js
c_client/client/tbcc-sdk/lib/tb.js
+2
-2
No files found.
c_client/client/app.js
View file @
123367d9
...
@@ -7,7 +7,7 @@ cloud.init({
...
@@ -7,7 +7,7 @@ cloud.init({
App
({
App
({
requestType
:
'ams'
,
// ams:ams接口,cloud: 云函数
requestType
:
'ams'
,
// ams:ams接口,cloud: 云函数
cloudName
:
'
base
'
,
// 主云函数项目名
cloudName
:
'
CommonToC
'
,
// 主云函数项目名
cloud
,
cloud
,
tbcc
,
tbcc
,
onLaunch
(
options
)
{
onLaunch
(
options
)
{
...
...
c_client/client/components/goodsModal/goodsModal.acss
View file @
123367d9
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
.goods-modal-container__title {
.goods-modal-container__title {
width: 750rpx;
width: 750rpx;
height: 120rpx;
height: 120rpx;
margin:
29
rpx 0 11rpx;
margin:
96
rpx 0 11rpx;
}
}
.goods-modal-container__banner {
.goods-modal-container__banner {
width: 750rpx;
width: 750rpx;
...
...
c_client/client/components/prizeModal/prizeModal.js
View file @
123367d9
...
@@ -29,9 +29,9 @@ Component({
...
@@ -29,9 +29,9 @@ Component({
this
.
props
.
onHandleClick
(
e
)
this
.
props
.
onHandleClick
(
e
)
},
},
// 复制编码
// 复制编码
handleCopyId
(
e
)
{
async
handleCopyId
(
e
)
{
const
{
text
}
=
e
.
target
.
dataset
||
{}
const
{
text
}
=
e
.
target
.
dataset
||
{}
setClipboard
({
text
})
await
setClipboard
({
text
})
console
.
log
(
text
)
console
.
log
(
text
)
commonToast
(
'复制成功'
)
commonToast
(
'复制成功'
)
},
},
...
...
c_client/client/pages/goodsPage/goodsPage.js
View file @
123367d9
...
@@ -57,44 +57,6 @@ Page({
...
@@ -57,44 +57,6 @@ Page({
async
initPage
()
{
async
initPage
()
{
const
{
activityId
}
=
app
const
{
activityId
}
=
app
const
{
taskType
,
itemIds
}
=
this
.
query
const
{
taskType
,
itemIds
}
=
this
.
query
let
goodsList
=
[
{
image
:
''
,
name
:
'商品名商品名商品名商品名商品名商品名商品名商品商品'
,
price
:
'388'
,
itemId
:
617724147979
,
collected
:
false
},
{
image
:
''
,
name
:
'商品名商品名商品名商品名商品名商品名商品名商品商品'
,
price
:
'388'
,
collected
:
true
,
itemId
:
617724563528
,
},
{
image
:
''
,
name
:
'商品名商品名商品名商品名商品名商品名商品名商品商品'
,
price
:
'388'
,
collected
:
false
,
itemId
:
617300295119
,
},
{
image
:
''
,
name
:
'商品名商品名商品名商品名商品名商品名商品名商品商品'
,
price
:
'388'
,
collected
:
true
,
itemId
:
614139753189
,
},
{
image
:
''
,
name
:
'商品名商品名商品名商品名商品名商品名商品名商品商品'
,
price
:
'388'
,
itemId
:
617724147979
,
},
]
this
.
setData
({
goodsList
})
let
handel
=
taskType
==
'collectGoods'
?
'getCollectItemList'
:
'getItemListByItemIds'
let
handel
=
taskType
==
'collectGoods'
?
'getCollectItemList'
:
'getItemListByItemIds'
const
{
success
,
data
}
=
await
API
[
handel
]({
activityId
,
itemIds
}).
catch
(
res
=>
{
const
{
success
,
data
}
=
await
API
[
handel
]({
activityId
,
itemIds
}).
catch
(
res
=>
{
...
...
c_client/client/pages/myprize/myprize.js
View file @
123367d9
'use strict'
;
'use strict'
;
import
API
from
"/api"
;
import
API
from
"/api"
;
const
app
=
getApp
();
const
app
=
getApp
();
const
{
tbcc
}
=
app
;
const
{
tbcc
}
=
app
;
const
{
commonToast
,
navigateToOutside
,
getUserAddress
,
setClipboard
}
=
tbcc
.
tb
;
const
{
commonToast
,
navigateToOutside
,
getUserAddress
,
setClipboard
}
=
tbcc
.
tb
;
const
{
dateFormatter
}
=
tbcc
.
utils
;
const
{
PRIZE_TYPE_MAP
,
PRIZE_DRAW_STATUS_MAP
}
=
tbcc
.
constants
;
const
{
PRIZE_TYPE_MAP
,
PRIZE_DRAW_STATUS_MAP
}
=
tbcc
.
constants
;
let
flag
=
false
;
let
flag
=
false
;
...
@@ -43,16 +45,13 @@ Page({
...
@@ -43,16 +45,13 @@ Page({
// 到期时间
// 到期时间
getEndTime
(
prizeList
=
[])
{
getEndTime
(
prizeList
=
[])
{
if
(
!
prizeList
||
!
prizeList
.
length
)
return
null
if
(
!
prizeList
||
!
prizeList
.
length
)
return
null
cons
t
endTime
=
prizeList
[
0
].
expiredTime
le
t
endTime
=
prizeList
[
0
].
expiredTime
if
(
!
endTime
)
return
null
if
(
!
endTime
)
return
null
const
t1
=
new
Date
(
endTime
).
toLocaleDateString
()
+
''
;
//获取年月日
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'
);
this
.
setData
({
this
.
setData
({
endTime
:
t1
+
" "
+
t2
.
padStart
(
2
,
'0'
)
+
":"
+
t3
.
padStart
(
2
,
'0'
)
+
":"
+
t4
.
padStart
(
2
,
'0
'
)
endTime
:
dateFormatter
(
endTime
,
'yyyy/MM/dd hh:mm:ss
'
)
})
})
console
.
log
(
this
.
data
.
endTime
)
},
},
/**
/**
...
@@ -73,6 +72,7 @@ Page({
...
@@ -73,6 +72,7 @@ Page({
this
.
setData
({
this
.
setData
({
myPrizeList
:
data
.
list
myPrizeList
:
data
.
list
})
})
console
.
log
(
data
.
list
)
this
.
getEndTime
(
data
.
list
)
this
.
getEndTime
(
data
.
list
)
}
}
if
(
type
!=
'noLoading'
)
{
if
(
type
!=
'noLoading'
)
{
...
@@ -99,7 +99,7 @@ Page({
...
@@ -99,7 +99,7 @@ Page({
const
{
activityId
}
=
app
;
const
{
activityId
}
=
app
;
const
{
item
}
=
e
.
target
.
dataset
;
const
{
item
}
=
e
.
target
.
dataset
;
console
.
log
(
item
,
'领取权益'
)
console
.
log
(
item
,
'领取权益'
)
const
{
success
,
data
,
message
}
=
await
API
.
receiveEnamePrize
({
activityId
,
_id
:
item
.
_
id
}).
catch
(
res
=>
{
const
{
success
,
data
,
message
}
=
await
API
.
receiveEnamePrize
({
activityId
,
id
:
item
.
_id
||
item
.
id
}).
catch
(
res
=>
{
this
.
getMyPrize
(
'noLoading'
)
this
.
getMyPrize
(
'noLoading'
)
commonToast
(
res
&&
res
.
message
)
commonToast
(
res
&&
res
.
message
)
})
||
{};
})
||
{};
...
@@ -128,13 +128,13 @@ Page({
...
@@ -128,13 +128,13 @@ Page({
activityId
,
activityId
,
name
,
name
,
phone
:
telNumber
,
phone
:
telNumber
,
address
d
etail
:
detailInfo
,
address
D
etail
:
detailInfo
,
cityCode
,
cityCode
,
city
:
cityName
,
city
:
cityName
,
provice
:
provinceName
,
provice
:
provinceName
,
area
:
countyName
,
area
:
countyName
,
streetName
,
streetName
,
id
:
item
.
_id
id
:
item
.
_id
||
item
.
id
}
}
my
.
confirm
({
my
.
confirm
({
...
...
c_client/client/tbcc-sdk/lib/request.js
View file @
123367d9
const
AMS_URL
=
'https://
ams.dui88.com/server/index.php?g=Web&c=Mock&o=simple&projectID=218&uri=
'
;
const
AMS_URL
=
'https://
docs.dui88.com/mock/140/
'
;
const
request
=
({
cloud
,
cloudName
,
requestType
=
'cloud'
})
=>
{
const
request
=
({
cloud
,
cloudName
,
requestType
=
'cloud'
})
=>
{
if
(
!
cloud
)
{
if
(
!
cloud
)
{
...
@@ -32,7 +32,7 @@ const request = ({ cloud, cloudName, requestType = 'cloud' }) => {
...
@@ -32,7 +32,7 @@ const request = ({ cloud, cloudName, requestType = 'cloud' }) => {
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
my
.
request
({
my
.
request
({
url
:
AMS_URL
+
_cloudName
+
'.'
+
handle
,
url
:
AMS_URL
+
_cloudName
+
'.'
+
handle
,
method
,
method
:
"GET"
,
data
:
params
,
data
:
params
,
dataType
:
'json'
dataType
:
'json'
}).
then
(({
data
:
res
})
=>
{
}).
then
(({
data
:
res
})
=>
{
...
@@ -69,7 +69,6 @@ const request = ({ cloud, cloudName, requestType = 'cloud' }) => {
...
@@ -69,7 +69,6 @@ const request = ({ cloud, cloudName, requestType = 'cloud' }) => {
return
requestType
===
'ams'
?
requestAms
()
:
requestCloud
();
return
requestType
===
'ams'
?
requestAms
()
:
requestCloud
();
};
};
};
};
export
default
request
;
export
default
request
;
\ No newline at end of file
c_client/client/tbcc-sdk/lib/tb.js
View file @
123367d9
...
@@ -520,8 +520,8 @@ export const textRiskIdentification = async (text) => {
...
@@ -520,8 +520,8 @@ export const textRiskIdentification = async (text) => {
}
}
// 剪切板
// 剪切板
export
function
setClipboard
(
params
)
{
export
const
setClipboard
=
async
(
params
)
=>
{
return
promisifyMyApi
(
'setClipboard'
,
params
)
return
await
promisifyMyApi
(
'setClipboard'
,
params
)
};
};
...
...
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