作者 王智

文档修改

... ... @@ -4,6 +4,7 @@ return [
'Id' => 'ID',
'Image' => '轮播图',
'Web' => '跳转地址',
'Page' => '小程序内跳转',
'Type' => '跳转类型',
'Type 1' => '商品单品',
'Type 2' => 'WEB链接',
... ...
... ... @@ -14,6 +14,12 @@
<ul class="row list-inline faupload-preview" id="p-image"></ul>
</div>
</div>
<div class="form-group" id="jump_page" style="display: none;">
<label class="control-label col-xs-12 col-sm-2">{:__('Page')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-page" class="form-control" name="row[page]" type="text">
</div>
</div>
<div class="form-group" id="jump_web" style="display: none;">
<label class="control-label col-xs-12 col-sm-2">{:__('Web')}:</label>
<div class="col-xs-12 col-sm-8">
... ...
... ... @@ -14,6 +14,13 @@
<ul class="row list-inline faupload-preview" id="p-image"></ul>
</div>
</div>
<div class="form-group" id="jump_page">
<label class="control-label col-xs-12 col-sm-2">{:__('Page')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-page" class="form-control" name="row[page]" type="text" value="{$row.page|htmlentities}">
</div>
</div>
<div class="form-group" id="jump_web">
<label class="control-label col-xs-12 col-sm-2">{:__('Web')}:</label>
<div class="col-xs-12 col-sm-8">
... ...
... ... @@ -45,14 +45,23 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
add: function () {
var Type = document.getElementById("c-type");
var JumpWeb = document.getElementById("jump_web");
var JumpPage = document.getElementById("jump_page");
var Goods = document.getElementById("Goods");
Type.onchange = function () {
if (Type.value == 2) {
if (Type.value == 1) {
JumpPage.style.display = 'none';
Goods.style.display = 'block';
JumpWeb.style.display = 'none';
}
if(Type.value == 2){
Goods.style.display = 'none';
JumpWeb.style.display = 'block';
}else{
Goods.style.display = 'block';
JumpPage.style.display = 'none';
}
if(Type.value == 3){
Goods.style.display = 'none';
JumpWeb.style.display = 'none';
JumpPage.style.display = 'block';
}
};
Controller.api.bindevent();
... ... @@ -60,23 +69,40 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
edit: function () {
var Type = Config.type;
var JumpWeb = document.getElementById("jump_web");
var JumpPage = document.getElementById("jump_page");
var Goods = document.getElementById("Goods");
if (Type == 2) {
if (Type == 1) {
JumpPage.style.display = 'none';
Goods.style.display = 'block';
JumpWeb.style.display = 'none';
}
if(Type == 2){
Goods.style.display = 'none';
JumpWeb.style.display = 'block';
}else{
Goods.style.display = 'block';
JumpPage.style.display = 'none';
}
if(Type == 3){
Goods.style.display = 'none';
JumpWeb.style.display = 'none';
JumpPage.style.display = 'block';
}
var Type2 = document.getElementById("c-type");
Type2.onchange = function () {
if (Type2.value == 2) {
if (Type2.value == 1) {
JumpPage.style.display = 'none';
Goods.style.display = 'block';
JumpWeb.style.display = 'none';
}
if(Type2.value == 2){
Goods.style.display = 'none';
JumpWeb.style.display = 'block';
}else{
Goods.style.display = 'block';
JumpPage.style.display = 'none';
}
if(Type2.value == 3){
Goods.style.display = 'none';
JumpWeb.style.display = 'none';
JumpPage.style.display = 'block';
}
};
Controller.api.bindevent();
... ...