Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
doublescreen-back
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pengguangpu
doublescreen-back
Commits
6df1cdda
Commit
6df1cdda
authored
Feb 27, 2020
by
pengguangpu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决海报页面数据被冲掉的bug;
parent
4e6729c2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
index.js
pages/index/index.js
+7
-8
No files found.
pages/index/index.js
View file @
6df1cdda
...
@@ -16,18 +16,18 @@ Page({
...
@@ -16,18 +16,18 @@ Page({
data
:
{
data
:
{
//页面控制相关参数
//页面控制相关参数
pageShow
:
{
pageShow
:
{
"home"
:
tru
e
,
"home"
:
fals
e
,
"landscan"
:
false
,
"landscan"
:
false
,
"waitoperate"
:
false
,
"waitoperate"
:
false
,
"payresult"
:
false
,
"payresult"
:
false
,
"operateresult"
:
false
,
"operateresult"
:
false
,
"printlastorder"
:
false
,
"printlastorder"
:
false
,
"poster"
:
fals
e
,
"poster"
:
tru
e
,
"aboutsystem"
:
false
,
"aboutsystem"
:
false
,
"appsetting"
:
false
,
"appsetting"
:
false
,
},
},
// 前屏是否完成登录
// 前屏是否完成登录
isFrontScreenLoginOK
:
fals
e
,
isFrontScreenLoginOK
:
tru
e
,
flowType
:
""
,
//流程类型:用于区分易混淆的流程,以及共同界面使用时用该标识位作为区分
flowType
:
""
,
//流程类型:用于区分易混淆的流程,以及共同界面使用时用该标识位作为区分
/**账号信息 */
/**账号信息 */
...
@@ -105,8 +105,6 @@ Page({
...
@@ -105,8 +105,6 @@ Page({
posterList
:
[
posterList
:
[
{
url
:
"/images/img_ad1.png"
,
selected
:
true
},
{
url
:
"/images/img_ad1.png"
,
selected
:
true
},
{
url
:
"/images/img_ad2.png"
,
selected
:
false
},
{
url
:
"/images/img_ad2.png"
,
selected
:
false
},
{
url
:
"/images/img_ad1.png"
,
selected
:
false
},
{
url
:
"/images/img_ad2.png"
,
selected
:
false
}
],
],
},
},
...
@@ -1109,8 +1107,7 @@ Page({
...
@@ -1109,8 +1107,7 @@ Page({
console
.
log
(
"event==>"
+
JSON
.
stringify
(
event
));
console
.
log
(
"event==>"
+
JSON
.
stringify
(
event
));
//获取点击的index
//获取点击的index
var
index
=
event
.
target
.
dataset
.
index
;
var
index
=
event
.
target
.
dataset
.
index
;
var
tempList
=
[];
var
tempList
=
{
...
this
.
data
.
posterList
};
tempList
=
tempList
.
concat
(
this
.
data
.
posterList
);
//遍历改变posterList状态
//遍历改变posterList状态
for
(
var
i
=
0
;
i
<
tempList
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
tempList
.
length
;
i
++
)
{
if
(
i
==
index
)
{
if
(
i
==
index
)
{
...
@@ -1119,13 +1116,15 @@ Page({
...
@@ -1119,13 +1116,15 @@ Page({
tempList
[
i
].
selected
=
false
;
tempList
[
i
].
selected
=
false
;
}
}
}
}
var
selAdUrl
=
tempList
[
index
].
url
;
console
.
log
(
selAdUrl
);
let
context
=
this
;
let
context
=
this
;
//发送指令至前屏
//发送指令至前屏
my
.
ix
.
sendBuddyMessage
({
my
.
ix
.
sendBuddyMessage
({
target
:
getApp
().
globalData
.
frontScreenAppId
,
target
:
getApp
().
globalData
.
frontScreenAppId
,
data
:
{
data
:
{
action
:
ACTION_SEND_SEL_AD
,
action
:
ACTION_SEND_SEL_AD
,
data
:
tempList
[
index
].
u
rl
data
:
selAdU
rl
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
my
.
showToast
({
my
.
showToast
({
...
...
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