Home > front end >  Simplify the code, click the link according to the number of the number of images in json loading de
Simplify the code, click the link according to the number of the number of images in json loading de

Time:12-04

The function open_detail (item) {
Var p1=item. Picture1;
The p2=item. Picture2;
P3=item. Picture3;
P4=item. Picture4;
P5=item. Picture5;
P6=item. Picture6;
STR="https://www.yysz123.comnull";
If (p1!=str& & The p2!=str& & P3!=str& & P4!=str& & P5!=str& & P6!=STR) {
Var options={
Styles: {
"PopGesture" : "close",
"Render" : "always,"
"PopGesture" : "hide",
"Bounce", "vertical",
"BounceBackground" : "# efeff4,"
"TitleNView" : {//details page native navigation configuration
BackgroundColor: '# f7f7f7',//navigation bar background
TitleText: item name,//navigation title
TitleColor: '# 000000',//text color
Type: 'transparent',//transparent gradient style
AutoBackButton: true,//automatic drawing back arrow
SplitLine: {//at the bottom of the line
Color: '# CCCCCC
}
},
"SubNViews" : [{//configuration image shuffling
Id: 'the slider - native,
Type: 'ImageSlider',
Styles: {
//left: '0',
//right: '0',
Top: '50 px,
Height: "200 px",
Position: 'static',
BackgroundColor: "# FFFFFF",
Loop: true,
Images: [
{
SRC: item. Picture1,
Height: "200 px",
}, {
SRC: item. Picture2,
Height: "200 px",
}, {
SRC: item picture3,
Height: "200 px",
}, {
SRC: item picture4,
Height: "200 px",
}, {
SRC: item picture5,
Height: "200 px",
}, {
SRC: item picture6,
Height: "200 px",
}]
}
}]
},
Extras: {
Name: item name,
Code: item code,
Price: the item price,
Introduce: item. Introduce,
Properties: the item. The properties,
}
};
}
Else if (p2==STR) {
Var options={
Styles: {
"PopGesture" : "close",
"Render" : "always,"
"PopGesture" : "hide",
"Bounce", "vertical",
"BounceBackground" : "# efeff4,"
"TitleNView" : {//details page native navigation configuration
BackgroundColor: '# f7f7f7',//navigation bar background
TitleText: item name,//navigation title
TitleColor: '# 000000',//text color
Type: 'transparent',//transparent gradient style
AutoBackButton: true,//automatic drawing back arrow
SplitLine: {//at the bottom of the line
Color: '# CCCCCC
}
},
"SubNViews" : [{//configuration image shuffling
Id: 'the slider - native,
Type: 'ImageSlider',
Styles: {
//left: 0,
//right: 0,
Top: '50 px,
Height: "200 px",
Position: 'static',
BackgroundColor: "# FFFFFF",
Loop: true,
Images: [
{
SRC: item. Picture1,
Height: "200 px",
}]
}
}]
},
Extras: {
Name: item name,
Code: item code,
Price: the item price,
Introduce: item. Introduce,
Properties: the item. The properties,
}
};
}
Else if (p3==STR) {
Var options={
Styles: {
"PopGesture" : "close",
"Render" : "always,"
"PopGesture" : "hide",
"Bounce", "vertical",
"BounceBackground" : "# efeff4,"
"TitleNView" : {//details page native navigation configuration
BackgroundColor: '# f7f7f7',//navigation bar background
TitleText: item name,//navigation title
TitleColor: '# 000000',//text color
Type: 'transparent',//transparent gradient style
AutoBackButton: true,//automatic drawing back arrow
SplitLine: {//at the bottom of the line
Color: '# CCCCCC
}
},
"SubNViews" : [{//configuration image shuffling
Id: 'the slider - native,
Type: 'ImageSlider',
Styles: {
//left: 0,
//right: 0,
Top: '50 px,
Height: "200 px",
Position: 'static',
BackgroundColor: "# FFFFFF",
Loop: true,
Images: [
{
SRC: item. Picture1,
Height: "200 px",
}, {
SRC: item. Picture2,
Height: "200 px",
}]
}
}]
},
Extras: {
Name: item name,
Code: item code,
Price: the item price,
Introduce: item. Introduce,
Properties: the item. The properties,
}
};
}
Else if (p4==STR) {
Var options={
Styles: {
"PopGesture" : "close",
"Render" : "always,"
"PopGesture" : "hide",
"Bounce", "vertical",
"BounceBackground" : "# efeff4,"
"TitleNView" : {//details page native navigation configuration
BackgroundColor: '# f7f7f7',//navigation bar background
TitleText: item name,//navigation title
TitleColor: '# 000000',//text color
Type: 'transparent',//transparent gradient style
AutoBackButton: true,//automatic drawing back arrow
SplitLine: {//at the bottom of the line
Color: '# CCCCCC
}
},
"SubNViews" : [{//configuration image shuffling
Id: 'the slider - native,
Type: 'ImageSlider',
Styles: {
Left: 0,
Right: 0,
Top: 0,
Height: "200 px",
Position: 'static',
BackgroundColor: "# FFFFFF",
Loop: true,
Images: [
{
SRC: item. Picture1,
Height: "200 px",
}, {
SRC: item. Picture2,
Height: "200 px",
}, {
SRC: item picture3,
Height: "200 px",
}]
}
}]
},
Extras: {
Name: item name,
Code: item code,
Price: the item price,
Introduce: item. Introduce,
Properties: the item. The properties,
}
};
}
Else if (p5==STR) {
Var options={
Styles: {
"PopGesture" : "close",
"Render" : "always,"
"PopGesture" : "hide",
"Bounce", "vertical",
"BounceBackground" : "# efeff4,"
"TitleNView" : {//details page native navigation configuration
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related