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
c53424b8
Commit
c53424b8
authored
Apr 22, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口地址和部分
parent
333d78d8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
15 deletions
+21
-15
scratch.js
src/subPackageMarketing/page/components/scratch/scratch.js
+17
-10
scratch.js
src/subPackageMarketing/page/pages/scratch/scratch.js
+4
-4
Http.js
src/utils/Http.js
+0
-1
No files found.
src/subPackageMarketing/page/components/scratch/scratch.js
View file @
c53424b8
...
...
@@ -167,20 +167,27 @@ class Scratch {
const
pos
=
this
.
drawRect
(
e
.
touches
[
0
].
x
,
e
.
touches
[
0
].
y
)
this
.
ctx
.
clearRect
(
pos
[
0
],
pos
[
1
],
pos
[
2
],
pos
[
2
])
this
.
ctx
.
draw
(
true
)
this
.
areaIsOk
();
}
touchEnd
(
e
)
{
if
(
!
this
.
isStart
)
return
if
(
!
this
.
isStart
)
return
// 自动清楚采用点范围值方式判断
const
{
canvasWidth
,
canvasHeight
,
minX
,
minY
,
maxX
,
maxY
}
=
this
if
(
maxX
-
minX
>
.
2
*
canvasWidth
&&
maxY
-
minY
>
.
2
*
canvasHeight
)
{
this
.
ctx
.
draw
()
this
.
endCallBack
&&
this
.
endCallBack
()
this
.
isStart
=
false
this
.
page
.
setData
({
'isScroll'
:
true
})
}
this
.
areaIsOk
();
}
//清除
areaIsOk
(){
const
{
canvasWidth
,
canvasHeight
,
minX
,
minY
,
maxX
,
maxY
}
=
this
if
(
maxX
-
minX
>
.
2
*
canvasWidth
&&
maxY
-
minY
>
.
2
*
canvasHeight
)
{
this
.
ctx
.
draw
()
this
.
endCallBack
&&
this
.
endCallBack
()
this
.
isStart
=
false
this
.
page
.
setData
({
'isScroll'
:
true
})
}
}
reset
()
{
...
...
src/subPackageMarketing/page/pages/scratch/scratch.js
View file @
c53424b8
...
...
@@ -68,7 +68,7 @@ wxService.page({
//记录分享数据
markShareRecords
(
memberId
,
activityId
){
wxService
.
post
(
`/marketing/lottery
Mobile
/shareRecord`
,{
wxService
.
post
(
`/marketing/lottery/shareRecord`
,{
activityId
:
activityId
,
memberId
:
memberId
}).
then
(
res
=>
{});
...
...
@@ -92,7 +92,7 @@ wxService.page({
//获取活动详情
getActivityInfo
(){
wxService
.
get
(
`/marketing/lottery/findById?id=
${
this
.
data
.
activityId
}
`
).
then
(
res
=>
{
wxService
.
get
(
`/marketing/lottery
Set
/findById?id=
${
this
.
data
.
activityId
}
`
).
then
(
res
=>
{
let
{
result
,
data
}
=
res
.
data
;
if
(
result
==
0
&&
data
){
this
.
data
.
activityInfo
=
data
;
...
...
@@ -130,7 +130,7 @@ wxService.page({
}
;
const
{
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
);
let
activityId
=
this
.
data
.
activityInfo
.
id
;
wxService
.
post
(
`/marketing/lottery
Mobile
/getLotteryNumber?activityId=
${
activityId
}
&memberId=
${
memberId
}
`
).
then
(
res
=>
{
wxService
.
post
(
`/marketing/lottery/getLotteryNumber?activityId=
${
activityId
}
&memberId=
${
memberId
}
`
).
then
(
res
=>
{
if
(
res
){
let
count
=
res
.
data
.
data
?
res
.
data
.
data
:
0
;
this
.
data
.
leftNum
=
count
;
...
...
@@ -213,7 +213,7 @@ wxService.page({
const
{
memberId
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
);
let
activityId
=
this
.
data
.
activityInfo
.
id
;
let
self
=
this
;
wxService
.
get
(
`/marketing/lottery
Mobile
/lottery?activityId=
${
activityId
}
&memberId=
${
memberId
}
`
).
then
(
res
=>
{
wxService
.
get
(
`/marketing/lottery/lottery?activityId=
${
activityId
}
&memberId=
${
memberId
}
`
).
then
(
res
=>
{
if
(
res
){
if
(
res
.
data
.
result
==
0
){
if
(
!
res
.
data
.
data
){
...
...
src/utils/Http.js
View file @
c53424b8
...
...
@@ -201,7 +201,6 @@ class Http {
});
}
else
if
(
error
.
msg
&&
error
.
msg
!=
'该用户尚未登录'
){
setTimeout
(()
=>
{
wx
.
showToast
({
title
:
`
${
error
.
msg
}
`
,
...
...
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