作者 王智

文档修改

@@ -4,6 +4,7 @@ return [ @@ -4,6 +4,7 @@ return [
4 'Id' => 'ID', 4 'Id' => 'ID',
5 'Image' => '轮播图', 5 'Image' => '轮播图',
6 'Web' => '跳转地址', 6 'Web' => '跳转地址',
  7 + 'Page' => '小程序内跳转',
7 'Type' => '跳转类型', 8 'Type' => '跳转类型',
8 'Type 1' => '商品单品', 9 'Type 1' => '商品单品',
9 'Type 2' => 'WEB链接', 10 'Type 2' => 'WEB链接',
@@ -14,6 +14,12 @@ @@ -14,6 +14,12 @@
14 <ul class="row list-inline faupload-preview" id="p-image"></ul> 14 <ul class="row list-inline faupload-preview" id="p-image"></ul>
15 </div> 15 </div>
16 </div> 16 </div>
  17 + <div class="form-group" id="jump_page" style="display: none;">
  18 + <label class="control-label col-xs-12 col-sm-2">{:__('Page')}:</label>
  19 + <div class="col-xs-12 col-sm-8">
  20 + <input id="c-page" class="form-control" name="row[page]" type="text">
  21 + </div>
  22 + </div>
17 <div class="form-group" id="jump_web" style="display: none;"> 23 <div class="form-group" id="jump_web" style="display: none;">
18 <label class="control-label col-xs-12 col-sm-2">{:__('Web')}:</label> 24 <label class="control-label col-xs-12 col-sm-2">{:__('Web')}:</label>
19 <div class="col-xs-12 col-sm-8"> 25 <div class="col-xs-12 col-sm-8">
@@ -14,6 +14,13 @@ @@ -14,6 +14,13 @@
14 <ul class="row list-inline faupload-preview" id="p-image"></ul> 14 <ul class="row list-inline faupload-preview" id="p-image"></ul>
15 </div> 15 </div>
16 </div> 16 </div>
  17 + <div class="form-group" id="jump_page">
  18 + <label class="control-label col-xs-12 col-sm-2">{:__('Page')}:</label>
  19 + <div class="col-xs-12 col-sm-8">
  20 + <input id="c-page" class="form-control" name="row[page]" type="text" value="{$row.page|htmlentities}">
  21 + </div>
  22 + </div>
  23 +
17 <div class="form-group" id="jump_web"> 24 <div class="form-group" id="jump_web">
18 <label class="control-label col-xs-12 col-sm-2">{:__('Web')}:</label> 25 <label class="control-label col-xs-12 col-sm-2">{:__('Web')}:</label>
19 <div class="col-xs-12 col-sm-8"> 26 <div class="col-xs-12 col-sm-8">
@@ -45,14 +45,23 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin @@ -45,14 +45,23 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
45 add: function () { 45 add: function () {
46 var Type = document.getElementById("c-type"); 46 var Type = document.getElementById("c-type");
47 var JumpWeb = document.getElementById("jump_web"); 47 var JumpWeb = document.getElementById("jump_web");
  48 + var JumpPage = document.getElementById("jump_page");
48 var Goods = document.getElementById("Goods"); 49 var Goods = document.getElementById("Goods");
49 Type.onchange = function () { 50 Type.onchange = function () {
50 - if (Type.value == 2) { 51 + if (Type.value == 1) {
  52 + JumpPage.style.display = 'none';
  53 + Goods.style.display = 'block';
  54 + JumpWeb.style.display = 'none';
  55 + }
  56 + if(Type.value == 2){
51 Goods.style.display = 'none'; 57 Goods.style.display = 'none';
52 JumpWeb.style.display = 'block'; 58 JumpWeb.style.display = 'block';
53 - }else{  
54 - Goods.style.display = 'block'; 59 + JumpPage.style.display = 'none';
  60 + }
  61 + if(Type.value == 3){
  62 + Goods.style.display = 'none';
55 JumpWeb.style.display = 'none'; 63 JumpWeb.style.display = 'none';
  64 + JumpPage.style.display = 'block';
56 } 65 }
57 }; 66 };
58 Controller.api.bindevent(); 67 Controller.api.bindevent();
@@ -60,23 +69,40 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin @@ -60,23 +69,40 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
60 edit: function () { 69 edit: function () {
61 var Type = Config.type; 70 var Type = Config.type;
62 var JumpWeb = document.getElementById("jump_web"); 71 var JumpWeb = document.getElementById("jump_web");
  72 + var JumpPage = document.getElementById("jump_page");
63 var Goods = document.getElementById("Goods"); 73 var Goods = document.getElementById("Goods");
64 - if (Type == 2) { 74 + if (Type == 1) {
  75 + JumpPage.style.display = 'none';
  76 + Goods.style.display = 'block';
  77 + JumpWeb.style.display = 'none';
  78 + }
  79 + if(Type == 2){
65 Goods.style.display = 'none'; 80 Goods.style.display = 'none';
66 JumpWeb.style.display = 'block'; 81 JumpWeb.style.display = 'block';
67 - }else{  
68 - Goods.style.display = 'block'; 82 + JumpPage.style.display = 'none';
  83 + }
  84 + if(Type == 3){
  85 + Goods.style.display = 'none';
69 JumpWeb.style.display = 'none'; 86 JumpWeb.style.display = 'none';
  87 + JumpPage.style.display = 'block';
70 } 88 }
71 89
72 var Type2 = document.getElementById("c-type"); 90 var Type2 = document.getElementById("c-type");
73 Type2.onchange = function () { 91 Type2.onchange = function () {
74 - if (Type2.value == 2) { 92 + if (Type2.value == 1) {
  93 + JumpPage.style.display = 'none';
  94 + Goods.style.display = 'block';
  95 + JumpWeb.style.display = 'none';
  96 + }
  97 + if(Type2.value == 2){
75 Goods.style.display = 'none'; 98 Goods.style.display = 'none';
76 JumpWeb.style.display = 'block'; 99 JumpWeb.style.display = 'block';
77 - }else{  
78 - Goods.style.display = 'block'; 100 + JumpPage.style.display = 'none';
  101 + }
  102 + if(Type2.value == 3){
  103 + Goods.style.display = 'none';
79 JumpWeb.style.display = 'none'; 104 JumpWeb.style.display = 'none';
  105 + JumpPage.style.display = 'block';
80 } 106 }
81 }; 107 };
82 Controller.api.bindevent(); 108 Controller.api.bindevent();