Przeglądaj źródła

默认跳转地址

HW 4 lat temu
rodzic
commit
44a14f9d84

+ 9 - 4
js/component/administration/business/advertisementList.jsx

@@ -236,7 +236,12 @@ const AdvertisementList = Form.create()(
           {
             title: "跳转链接",
             dataIndex: "jumpUrl",
-            key: "jumpUrl"
+            key: "jumpUrl",
+            render: r => {
+              return (
+                  <span>{r === 'javascript:;' ? '' : r}</span>
+              )
+            }
           },
           {
             title: "是否显示",
@@ -346,7 +351,7 @@ const AdvertisementList = Form.create()(
           this.setState({
             id: thisdata.id,
             title: thisdata.title,
-            jumpUrl: thisdata.jumpUrl,
+            jumpUrl: thisdata.jumpUrl === 'javascript:;' ? undefined : thisdata.jumpUrl,
             bannerUrl: thisdata.bannerUrl
               ? splitUrl(thisdata.bannerUrl, ",", globalConfig.avatarUploadHost)
               : [],
@@ -470,7 +475,7 @@ const AdvertisementList = Form.create()(
             ? this.state.bannerUrl[0].response.data
             : undefined,
           title: this.state.title,
-          jumpUrl: this.state.jumpUrl || undefined,
+          jumpUrl: this.state.jumpUrl || 'javascript:;',
         },
         success: function(data) {
           let theArr = [];
@@ -511,7 +516,7 @@ const AdvertisementList = Form.create()(
             ? this.state.bannerUrl[0].response.data
             : undefined,
           title: this.state.title,
-          jumpUrl: this.state.jumpUrl || undefined,
+          jumpUrl: this.state.jumpUrl || 'javascript:;',
         },
         success: function(data) {
           let theArr = [];