瀏覽代碼

fix: 新增微信端超级订阅关键词设置页面

zhangyuhan 5 年之前
父節點
當前提交
6f0379c646

+ 397 - 0
src/web/staticres/vipsubscribe/css/addKeyWord.css

@@ -0,0 +1,397 @@
+.add-key-word .input-box span {
+    width: 1.6rem;
+    min-width: 1.6rem;
+}
+
+.add-key-word .input-box input::placeholder {
+    color: #C0C4CC;
+}
+
+.add-key-word .input-box input {
+    width: 100%;
+    font-size: 0.32rem;
+    line-height: 1.5;
+    border: none;
+    color: #171826;
+    user-select: text;
+    -webkit-user-select:text;
+}
+
+.add-key-word .input-box {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    justify-content: flex-start;
+    line-height: 3.6;
+    font-weight: 500;
+    font-size: 0.3rem;
+    color: #5F5E64;
+    padding: 0 0.32rem;
+    margin-top: 0.16rem;
+    background: #fff;
+}
+
+.add-key-word .add-box:active {
+    background-color: #ececec;
+}
+
+.add-key-word .add-box {
+    flex: 1;
+    font-weight: 500;
+    font-size: 0.3rem;
+    line-height: 1.08rem;
+    display: flex;
+    text-align: center;
+    align-items: center;
+    justify-content: center;
+    color: #171826;
+    background: #EDEFF2;
+    margin-right: 1px;
+}
+
+.add-key-word .add-box + .add-box {
+    margin-left: 1px;
+    margin-right: 0;
+}
+
+.add-key-word .fixed-tip-button {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+}
+
+.add-key-word .input-group .input-box span {
+    opacity: 0;
+}
+
+.add-key-word .input-group .input-box:first-child span {
+    opacity: 1;
+}
+
+.add-key-word .input-group + .input-group {
+    margin-top: 0.48rem;
+}
+
+
+.input-group .input-box {
+    margin-top: 0;
+    box-shadow: inset 0px -1px 1px -1px rgba(0, 0, 0, 0.05);
+    padding-right: 0;
+}
+
+.add-key-word .q-tip .call-dialog {
+    padding: 0.32rem;
+    display: inline-block;
+}
+
+.add-key-word .q-tip i {
+    font-size: 0.26rem;
+}
+
+.add-key-word .q-tip {
+    line-height: 0.4rem;
+    text-align: right;
+    font-weight: 500;
+    font-size: 0.26rem;
+    color: #2ABED1;
+}
+
+.jy-icon-add {
+}
+
+.jy-icon-add {
+    position: relative;
+    width: 0.28rem;
+    margin-right: 0.16rem;
+    height: 100%;
+}
+
+.jy-icon-add:before,
+.jy-icon-add:after {
+    position: absolute;
+    left: 50%;
+    top: 50%;
+    content: '';
+    width: 0.26rem;
+    height: 0.04rem;
+    background-color: #5F5E64;
+    transform: translate(-50%, -50%);
+}
+
+.jy-icon-add:after {
+    transform: translate(-50%, -50%) rotate(90deg);
+}
+
+.dialog-container {
+    background: rgba(0, 0, 0, 0.5);
+    position: fixed;
+    width: 100%;
+    height: 100%;
+    height: 100vh;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    z-index: 2;
+}
+
+.dialog-container .problemPopContent {
+    width: 5.6rem;
+    min-height: 7.23rem;
+    display: inline-block;
+    background: #fff;
+    border-radius: 0.16rem;
+    position: relative;
+    padding: 0.58rem 0;
+}
+
+.dialog-container .problemPopContent h3 {
+    font-size: .34rem;
+    text-align: center;
+    padding-bottom: 0.2rem;
+}
+
+.dialog-container .problemPopContent ul {
+    padding: 0 .4rem;
+}
+
+.dialog-container .problemPopContent ul li {
+    margin-top: 0.16rem;
+}
+
+.dialog-container .problemPopContent ul li h4 {
+    font-size: .3rem;
+    line-height: 1.5;
+    color: #1d1d1d;
+}
+
+.dialog-container .problemPopContent ul li p {
+    font-size: .28rem;
+    color: #868686;
+    line-height: 1.4;
+}
+
+.knowBtn {
+    width: 100%;
+    background-color: #fff;
+    box-shadow: inset 0px 1px 1px -1px rgba(0, 0, 0, 0.1);
+    position: absolute;
+    bottom: 0;
+    height: 1rem;
+    line-height: 1rem;
+    text-align: center;
+    font-size: .36rem;
+    color: #2ABED1;
+    border-radius: 0 0 8px 8px;
+}
+
+.addImg:active {
+    background-color: #ececec;
+}
+
+.addImg {
+    width: 0.4rem;
+    padding: 0 0.24rem;
+    margin-right: 0.08rem;
+    box-sizing: content-box;
+    display: inline-block;
+    background: url('/jyapp/vipsubscribe/image/delete.png?v=1430') center center no-repeat;
+    background-size: 0.4rem 0.4rem;
+    height: 1.08rem;
+}
+
+.sticky-box {
+    position: fixed;
+    top: 21.33333vw;
+    left: 0;
+    width: 100%;
+    background: #f5f4f9;
+    z-index: 2;
+}
+
+.fixed-bottom {
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    width: 100%;
+    z-index: 2;
+    background: rgba(255, 255, 255, 0.96);
+    padding: 0.16rem 0.32rem 0.24rem;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+}
+
+.fixed-bottom a:first-child {
+    margin-left: 0;
+    margin-right: 0.13rem;
+}
+
+.fixed-bottom a {
+    width: 100%;
+    height: 0.92rem;
+    line-height: 0.92rem;
+    border-radius: 0.16rem;
+    margin-left: 0.13rem;
+    font-weight: 500;
+    font-size: 0.36rem;
+    text-align: center;
+}
+
+.fixed-bottom .jy__btn_primary {
+    letter-spacing: 0.5em;
+}
+
+.fixed-bottom a + .jy__btn_primary {
+    letter-spacing: unset;
+}
+
+.jy__btn_primary {
+    background-color: #19b0c5;
+    color: #F7F9FA;
+}
+
+.jy__btn_primary:active {
+    background-color: #19b0c5;
+}
+
+.jy__btn_delete {
+    background-color: #EDEFF2;
+    color: #5F5E64;
+}
+
+.jy__btn_delete:active {
+    background-color: #dfe3e5;
+}
+
+.jy__btn_primary.disabled {
+    background-color: #87DFEA;
+}
+
+.jy__btn_primary.disabled:active {
+    background-color: #78cfda;
+}
+
+.add-key-word .content-box {
+    width: 100%;
+    left: 0;
+    right: 0;
+    top: 0;
+    bottom: 0;
+    padding-top: 2.20rem;
+    padding-bottom: 2.4rem;
+    z-index: 1;
+    overflow-y: scroll;
+    -webkit-overflow-scrolling: touch;
+    position: unset;
+}
+
+.select-input.left-run {
+    transform: translate3d(100%, 0, 0);
+}
+
+.select-input.right-run {
+    transform: translate3d(-100%, 0, 0);
+}
+
+.select-input {
+    position: relative;
+    transition: transform 0.3s ease-in-out;
+    width: 100%;
+}
+
+.select-input .input-box.right-box {
+    left: 100%;
+}
+
+.select-input .input-box {
+    margin-top: 0;
+    position: absolute;
+    width: 100%;
+    top: 0;
+    left: -100%;
+}
+
+.input-box .jy__btn_primary {
+    width: 0.96rem;
+    min-width: 0.96rem;
+    height: 0.52rem;
+    border-radius: 0.08rem;
+    font-weight: 500;
+    font-size: 0.26rem;
+    color: #FFFFFF;
+    line-height: 0.52rem;
+    text-align: center;
+    margin-left: 0.16rem;
+}
+
+.content-box.disabled input {
+    pointer-events: none;
+}
+
+.weui-dialog {
+    border-radius: 0.16rem;
+    left: 0.72rem;
+    right: 0.72rem;
+}
+
+.weui-dialog__hd {
+    color: #171826;
+    font-style: normal;
+    font-weight: bold;
+    font-size: 0.36rem;
+    line-height: 0.52rem;
+    padding-bottom: 0.16rem;
+    padding-top: 0.48rem;
+}
+
+.weui-dialog__bd {
+    font-weight: 500;
+    font-size: 0.3rem;
+    line-height: 0.44rem;
+    text-align: center;
+    color: #5F5E64;
+    padding-bottom: 0.47rem;
+}
+
+.weui-dialog__btn_default {
+    color: #171826;
+    font-weight: 500;
+    font-size: 0.36rem;
+}
+
+.weui-dialog__ft {
+    height: 0.92rem;
+    line-height: 0.92rem;
+}
+
+.weui-dialog .weui-dialog__ft .weui-dialog__btn_primary {
+    font-weight: 500;
+    font-size: 0.36rem;
+    color: #FB483D;
+}
+
+.custom-toast .weui-toast {
+    font-size: .3rem;
+    padding: 0.2rem;
+    width: auto;
+    max-width: 6rem;
+    min-height: 0;
+    height: auto;
+    top: 50%;
+    left: 50%;
+    margin-left: 0;
+    margin-top: -0.47rem;
+    transform: translateX(-50%) translateY(-50%);
+}
+
+.custom-toast .weui-icon_toast {
+    display: none;
+}
+
+.custom-toast .weui-toast__content {
+    margin: 0;
+}

+ 478 - 400
src/web/staticres/vipsubscribe/css/keyWord.css

@@ -1,142 +1,149 @@
 .keyWord {
 .keyWord {
-  display: flex;
-  flex-direction: column;
-  justify-content: space-between;
-  width: 100%;
-  height: 100vh;
-  overflow: hidden;
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    width: 100%;
+    height: 100%;
+    overflow: hidden;
+}
+html, body {
+    background: #f5f6f7;
 }
 }
 
 
 .keyWord .add-keyword-container,
 .keyWord .add-keyword-container,
 .keyWord .all-classify-column {
 .keyWord .all-classify-column {
-  display: flex;
-  flex: 1;
-  flex-direction: column;
-  justify-content: space-between;
-  overflow-y: scroll;
+    display: flex;
+    flex: 1;
+    flex-direction: column;
+    justify-content: space-between;
+    overflow-y: scroll;
 }
 }
 
 
 .keyWord .add-keyword-container .classify {
 .keyWord .add-keyword-container .classify {
-  display: flex;
-  align-items: center;
-  justify-content: space-between;
-  padding: 0 .3rem;
-  height: 0.94rem;
-  background-color: #fff;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: 0 .3rem;
+    height: 1.08rem;
+    background-color: #fff;
 }
 }
 
 
 .keyWord .add-keyword-container .classify .classify-l {
 .keyWord .add-keyword-container .classify .classify-l {
-  font-size: .32rem;
-  color: #1d1d1d;
-	width: 2rem;
+    font-size: .32rem;
+    color: #171826;
+    width: 2rem;
+    font-weight: 500;
 }
 }
 
 
 .keyWord .add-keyword-container .classify .classify-r {
 .keyWord .add-keyword-container .classify .classify-r {
-  display: flex;
-  align-items: center;
-  justify-content: end;
-  height: 100%;
-  color: #888888;
-  font-size: .28rem;
+    display: flex;
+    align-items: center;
+    justify-content: end;
+    height: 100%;
+    font-weight: 500;
+    color: #9B9CA3;
+    font-size: .28rem;
 }
 }
 
 
 .keyWord .add-keyword-container .classify .classify-r .icon-arrow {
 .keyWord .add-keyword-container .classify .classify-r .icon-arrow {
-  margin-left: .1rem;
-  font-size: .26rem;
+    margin-left: .1rem;
+    font-size: .26rem;
 }
 }
 
 
 .keyWord .add-keyword-container .classify-tips {
 .keyWord .add-keyword-container .classify-tips {
-  padding: .1rem .3rem .2rem;
-  font-size: .26rem;
-  color: #888;
-  line-height: .38rem;
+    padding: .16rem .32rem;
+    font-size: .24rem;
+    color: #9B9CA3;
+    line-height: .36rem;
+    font-weight: 500;
 }
 }
 
 
 .keyWord .add-keyword-container .content {
 .keyWord .add-keyword-container .content {
-  flex: 1;
-  overflow-y: scroll;
+    flex: 1;
+    overflow-y: scroll;
 }
 }
 
 
 .keyWord .add-keyword-container .content .enter .enterOne {
 .keyWord .add-keyword-container .content .enter .enterOne {
-  min-height: 47px;
-  width: 100%;
-  padding: 0.3rem;
-  font-size: .3rem;
-  background: #fff;
+    min-height: 47px;
+    width: 100%;
+    padding: 0.3rem;
+    font-size: .3rem;
+    background: #fff;
 }
 }
 
 
 .keyWord .add-keyword-container .content .enter .btnChoose {
 .keyWord .add-keyword-container .content .enter .btnChoose {
-  border-top: 1px solid #e0e0e0;
-  overflow: hidden;
-  background: #fff;
+    border-top: 1px solid #e0e0e0;
+    overflow: hidden;
+    background: #fff;
 }
 }
 
 
 .keyWord .add-keyword-container .content .enter .btnChoose button {
 .keyWord .add-keyword-container .content .enter .btnChoose button {
-  float: left;
-  height: 0.6rem;
-  font-size: .3rem;
-  width: 50%;
-  background: #fff;
-  margin: 0.15rem 0;
-  color: #1D1D1D;
+    float: left;
+    height: 0.6rem;
+    font-size: .3rem;
+    width: 50%;
+    background: #fff;
+    margin: 0.15rem 0;
+    color: #1D1D1D;
 }
 }
 
 
 .keyWord .add-keyword-container .content .enter .btnChoose button:first-child {
 .keyWord .add-keyword-container .content .enter .btnChoose button:first-child {
-  border-right: 1px solid #e0e0e0;
+    border-right: 1px solid #e0e0e0;
 }
 }
 
 
 .keyWord .add-keyword-container .content .enter .btn {
 .keyWord .add-keyword-container .content .enter .btn {
-  margin-top: .16rem;
+    margin-top: .16rem;
 }
 }
 
 
 .keyWord .add-keyword-container .content .enter .btn button {
 .keyWord .add-keyword-container .content .enter .btn button {
-  width: 50%;
-  height: 0.94rem;
-  background: #2cb7ca;
-  color: #fff;
-  font-size: .36rem;
-  opacity: .5;
+    width: 50%;
+    height: 0.94rem;
+    background: #2cb7ca;
+    color: #fff;
+    font-size: .36rem;
+    opacity: .5;
 }
 }
 
 
 .keyWord .add-keyword-container .title {
 .keyWord .add-keyword-container .title {
-  font-size: .26rem;
-  color: #888;
-  padding: .3rem;
-  line-height: .38rem;
+    font-size: .26rem;
+    color: #888;
+    padding: .3rem;
+    line-height: .38rem;
 }
 }
 
 
 .keyWord .all-classify-column {
 .keyWord .all-classify-column {
-/*  border-top: 1px solid transparent;*/
+    /*  border-top: 1px solid transparent;*/
 }
 }
 
 
 .keyWord .all-classify-column .classify-list {
 .keyWord .all-classify-column .classify-list {
-  margin-top: .8rem;
+    padding-bottom: 1.1rem;
 }
 }
 
 
 .keyWord .all-classify-column .classify-list .classify-item {
 .keyWord .all-classify-column .classify-list .classify-item {
-  /*display: flex;*/
-  align-items: center;
-  justify-content: space-between;
-  padding: 0.3rem;
-  height: 1.6rem;
-  background-color: #fff;
-  border-bottom: 1px solid #CECECE;
+    /*display: flex;*/
+    align-items: center;
+    justify-content: space-between;
+    background-color: #fff;
+    box-shadow: inset 0 -0.5px 0 rgba(0, 0, 0, 0.05);
+    border-radius: 8px;
+    width: calc(100% - 0.48rem);
+    margin: .16rem auto 0;
+    height: 1.36rem;
+    border: none;
+    padding: 0.24rem 0.32rem;
 }
 }
 
 
-.keyWord .all-classify-column .classify-list .classify-item:first-of-type {
-  border-top: 1px solid #CECECE;
-}
 
 
 .keyWord .all-classify-column .classify-list .classify-item .classify-item-l {
 .keyWord .all-classify-column .classify-list .classify-item .classify-item-l {
-  font-size: .32rem;
-  color: #1d1d1d;
+    font-size: .32rem;
+    color: #1d1d1d;
     text-overflow: ellipsis;
     text-overflow: ellipsis;
     overflow: hidden;
     overflow: hidden;
     display: -webkit-inline-box;
     display: -webkit-inline-box;
     -webkit-line-clamp: 1;
     -webkit-line-clamp: 1;
     -webkit-box-orient: vertical;
     -webkit-box-orient: vertical;
     width: 4.5rem;
     width: 4.5rem;
-	    margin-top: -0.05rem;
+    margin-top: -0.05rem;
 }
 }
 .classify .classify-detail{
 .classify .classify-detail{
     text-overflow: ellipsis;
     text-overflow: ellipsis;
@@ -145,332 +152,468 @@
     -webkit-line-clamp: 1;
     -webkit-line-clamp: 1;
     -webkit-box-orient: vertical;
     -webkit-box-orient: vertical;
     width: 4rem;
     width: 4rem;
-	text-align:right;
+    text-align:right;
 }
 }
 
 
 .keyWord .all-classify-column .classify-list .classify-item .classify-item-r {
 .keyWord .all-classify-column .classify-list .classify-item .classify-item-r {
-  /*display: flex;*/
-  align-items: center;
-  justify-content: end;
-  /*height: 100%;*/
-  color: #888888;
-  font-size: .28rem;
-  /*new*/
-  float: right;
+    /*display: flex;*/
+    align-items: center;
+    justify-content: end;
+    /*height: 100%;*/
+    color: #888888;
+    font-size: .28rem;
+    /*new*/
+    float: right;
 }
 }
 
 
 .keyWord .all-classify-column .classify-list .classify-item .classify-item-r .icon-arrow {
 .keyWord .all-classify-column .classify-list .classify-item .classify-item-r .icon-arrow {
-  margin-left: .2rem;
-  font-size: .26rem;
+    margin-left: .2rem;
+    font-size: .26rem;
 }
 }
 
 
-.keyWord .showKeyWord ul li {
-  margin-bottom: .16rem;
-  overflow: hidden;
+.keyWord .delete-button {
+    font-weight: 500;
+    font-size: 0.32rem;
+    line-height: 1;
+    align-items: center;
+    color: #FFFFFF;
+    background: #FB483D;
+    border-radius: 0.16rem;
+    width: 1.76rem;
+    margin-top: .16rem;
+    margin-right: .16rem;
+    text-align: center;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
 }
 }
 
 
 .keyWord .showKeyWord ul li .one {
 .keyWord .showKeyWord ul li .one {
-  display: flex;
-  background: #fff;
-  line-height: .54rem;
-  padding: 0.2rem 0;
+    display: flex;
+    background: #fff;
+    line-height: .54rem;
+    margin: 0.16rem 0.24rem 0;
+    border-radius: 0.16rem;
+    padding: 0.24rem 0.32rem;
+    overflow: hidden;
+    max-width: calc(100% - 0.48rem);
 }
 }
 
 
 .keyWord .showKeyWord ul li .one div {
 .keyWord .showKeyWord ul li .one div {
-  flex: 1;
+    flex: 1;
 }
 }
 
 
 .keyWord .showKeyWord ul li .one div span {
 .keyWord .showKeyWord ul li .one div span {
-  display: flex;
-  padding: 0 .3rem;
+    display: flex;
 }
 }
 
 
 .keyWord .showKeyWord ul li .one div span strong {
 .keyWord .showKeyWord ul li .one div span strong {
-  font-size: 0.3rem;
-  color: #1d1d1d;
-  font-weight: normal;
-  display: block;
-  width: 1.3rem;
+    font-size: 0.3rem;
+    color: #1d1d1d;
+    font-weight: normal;
+    display: block;
+    margin-right: 0.24rem;
+}
+.keyWord .showKeyWord ul li .one div span p.key {
+    color: #171826;
+    font-size: 0.32rem;
 }
 }
-
 .keyWord .showKeyWord ul li .one div span p {
 .keyWord .showKeyWord ul li .one div span p {
-  flex: 1;
-  font-size: 0.3rem;
-  color: #686868;
+    flex: 1;
+    line-height: 0.60rem;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    display: -webkit-box;
+    -webkit-line-clamp: 1;
+    -webkit-box-orient: vertical;
+    color: #5F5E64;
+    font-weight: 500;
+    font-size: 0.26rem;
+}
+.keyWord .showKeyWord ul li .one div span.icon-arrow {
+    color: #C0C4CC;
+    line-height: 0.60rem;
+}
+.keyWord .showKeyWord ul li .one div span.keyWord-tags {
+    display: inline-block;
+}
+.keyWord-tags {
+    color: #05A6F3;
+    font-weight: 500;
+    font-size: 0.2rem;
+    line-height: 0.34rem;
+    padding: 0 0.08rem;
+    box-sizing: border-box;
+    text-align: center;
+    min-width: 0.76rem;
+    word-break: keep-all;
+    border: 0.5px solid #05A6F3;
+    border-radius: 0.08rem;
+}
+.keyWord-tags.exclude {
+    color: #FB483D;
+    border-color: #FB483D;
+}
+.keyWord .showKeyWord ul li .one div span.line-top-border {
+    margin-top: 0.04rem;
+    padding-top: 0.24rem;
+}
+.keyWord .showKeyWord ul li .one div span.line-top-border + .line-top-border {
+    margin-top: 0;
+    padding-top: 0;
+}
+.keyWord .showKeyWord ul li .one div span.line-top-border + .line-top-border:before {
+    content: none;
+}
+.keyWord .line-top-border {
+    position: relative;
+}
+.keyWord .line-top-border::before {
+    content: '';
+    position: absolute;
+    top: 0;
+    background: rgba(0, 0, 0, 0.05);
+    width: 100%;
+    height: 1px;
+    -webkit-transform: scaleY(0.5);
+    transform: scaleY(0.5);
+    -webkit-transform-origin: 0 0;
+    transform-origin: 0 0;
+    left: 0;
 }
 }
 
 
 .keyWord .showKeyWord ul li .one button {
 .keyWord .showKeyWord ul li .one button {
-  width: 1.96rem;
-  background: #fff;
-  color: #2cb7ca;
-  border-left: 1px solid #E0E0E0;
-  font-size: .3rem;
-  position: relative;
-  left: 0;
+    width: 1.96rem;
+    background: #fff;
+    color: #2cb7ca;
+    border-left: 1px solid #E0E0E0;
+    font-size: .3rem;
+    position: relative;
+    left: 0;
 }
 }
 
 
 .keyWord .showKeyWord ul li .one button i {
 .keyWord .showKeyWord ul li .one button i {
-  font-size: .4rem;
-  padding-right: 0.1rem;
+    font-size: .4rem;
+    padding-right: 0.1rem;
 }
 }
 
 
 .keyWord .showKeyWord ul li .modify {
 .keyWord .showKeyWord ul li .modify {
-  display: none;
-  margin-top: .16rem;
+    display: none;
+    margin-top: .16rem;
 }
 }
 
 
 .keyWord .showKeyWord ul li .modify textarea {
 .keyWord .showKeyWord ul li .modify textarea {
-  box-sizing: border-box;
-  min-height: .94rem;
-  resize: none;
-  width: 100%;
-  display: flex;
-  align-items: center;
-  padding: .3rem;
-  background: #fff;
-  outline: none;
-  font-size: 0.3rem;
-  color: #1d1d1d;
+    box-sizing: border-box;
+    min-height: .94rem;
+    resize: none;
+    width: 100%;
+    display: flex;
+    align-items: center;
+    padding: .3rem;
+    background: #fff;
+    outline: none;
+    font-size: 0.3rem;
+    color: #1d1d1d;
 }
 }
 
 
 .keyWord .showKeyWord ul li .modify span {
 .keyWord .showKeyWord ul li .modify span {
-  width: 100%;
-  display: block;
-  line-height: 0.5rem;
-  padding: 0.2rem .3rem;
-  background: #fff;
-  outline: none;
-  font-size: 0.3rem;
-  color: #1d1d1d;
-  user-modify: read-write-plaintext-only;
-  -webkit-user-modify: read-write-plaintext-only;
+    width: 100%;
+    display: block;
+    line-height: 0.5rem;
+    padding: 0.2rem .3rem;
+    background: #fff;
+    outline: none;
+    font-size: 0.3rem;
+    color: #1d1d1d;
+    user-modify: read-write-plaintext-only;
+    -webkit-user-modify: read-write-plaintext-only;
 }
 }
 
 
 .keyWord .showKeyWord ul li .modify button {
 .keyWord .showKeyWord ul li .modify button {
-  width: 50%;
-  height: .88rem;
-  float: left;
-  margin-top: 0.16rem;
-  font-size: .28rem;
+    width: 50%;
+    height: .88rem;
+    float: left;
+    margin-top: 0.16rem;
+    font-size: .28rem;
 }
 }
 
 
 .keyWord .showKeyWord ul li .modify button.addAdjunctWord, .keyWord .showKeyWord ul li .modify button.addExclusion {
 .keyWord .showKeyWord ul li .modify button.addAdjunctWord, .keyWord .showKeyWord ul li .modify button.addExclusion {
-  position: relative;
-  background: #fff;
+    position: relative;
+    background: #fff;
 }
 }
 
 
 .keyWord .showKeyWord ul li .modify button.addExclusion:before {
 .keyWord .showKeyWord ul li .modify button.addExclusion:before {
-  position: absolute;
-  content: '';
-  width: 1px;
-  height: .64rem;
-  background-color: #e0e0e0;
-  left: 0;
-  top: 0.13rem;
+    position: absolute;
+    content: '';
+    width: 1px;
+    height: .64rem;
+    background-color: #e0e0e0;
+    left: 0;
+    top: 0.13rem;
 }
 }
 
 
 .keyWord .showKeyWord ul li .modify button.deleteKey {
 .keyWord .showKeyWord ul li .modify button.deleteKey {
-  color: #fff;
-  background: #FE737A;
-  font-size: .3rem;
+    color: #fff;
+    background: #FE737A;
+    font-size: .3rem;
 }
 }
 
 
 .keyWord .showKeyWord ul li .modify button.ascertainKey {
 .keyWord .showKeyWord ul li .modify button.ascertainKey {
-  color: #fff;
-  background: #2cb7ca;
-  font-size: .3rem;
+    color: #fff;
+    background: #2cb7ca;
+    font-size: .3rem;
+}
+.showKeyWord {
+    padding-bottom: 2.2rem;
 }
 }
 
 
 .keyWord .addKeyWord {
 .keyWord .addKeyWord {
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: center;
-  width: 100%;
-  text-align: center;
-  line-height: 1;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+    width: 100%;
+    text-align: center;
+    line-height: 1;
+    background: #fff;
+    position: fixed;
+    bottom: 0;
+    padding: 0.04rem 0;
+    z-index: 2;
 }
 }
 
 
 .keyWord .addKeyWord i {
 .keyWord .addKeyWord i {
-  margin-bottom: .3rem;
-  font-size: 1rem;
-  color: #2cb7ca;
+    margin-bottom: .3rem;
+    font-size: 1rem;
+    color: #2cb7ca;
 }
 }
 
 
 .keyWord .addKeyWord p {
 .keyWord .addKeyWord p {
-  width: 100%;
-  height: .56rem;
-  line-height: .56rem;
-  background-color: #fff;
-  font-size: .28rem;
-  color: #888;
+    width: 100%;
+    height: 0.4rem;
+    line-height: 0.4rem;
+    background-color: #fff;
+    color: #9B9CA3;
+    font-size: 0.24rem;
+    font-weight: 500;
 }
 }
 
 
 .keyWord .problem {
 .keyWord .problem {
-  margin-top: .4rem;
-  font-size: .3rem;
-  color: #2cb7ca;
-  float: right;
-  margin-right: 0.3rem;
+    margin-top: .4rem;
+    font-size: .3rem;
+    color: #2cb7ca;
+    float: right;
+    margin-right: 0.3rem;
 }
 }
 
 
 .keyWord .problem i {
 .keyWord .problem i {
-  margin-left: .06rem;
+    margin-left: .06rem;
 }
 }
 
 
 .dialog-container {
 .dialog-container {
-  background: rgba(0, 0, 0, 0.5);
-  position: fixed;
-  width: 100%;
-  height: 100%;
-  height: 100vh;
-  top: 0;
-  left: 0;
-  right: 0;
-  bottom: 0;
-  display: none;
-  align-items: center;
-  justify-content: center;
+    background: rgba(0, 0, 0, 0.5);
+    position: fixed;
+    width: 100%;
+    height: 100%;
+    height: 100vh;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+    display: none;
+    align-items: center;
+    justify-content: center;
+    z-index: 2;
 }
 }
 
 
 .dialog-container .problemPopContent {
 .dialog-container .problemPopContent {
-  width: 5.6rem;
-  min-height: 7.23rem;
-  display: inline-block;
-  background: #fff;
-  border-radius: 4px;
-  position: relative;
-  padding: 0.58rem 0;
+    width: 5.6rem;
+    min-height: 7.23rem;
+    display: inline-block;
+    background: #fff;
+    border-radius: 4px;
+    position: relative;
+    padding: 0.58rem 0;
 }
 }
 
 
 .dialog-container .problemPopContent h3 {
 .dialog-container .problemPopContent h3 {
-  font-size: .34rem;
-  text-align: center;
-  padding-bottom: 0.2rem;
+    font-size: .34rem;
+    text-align: center;
+    padding-bottom: 0.2rem;
 }
 }
 
 
 .dialog-container .problemPopContent ul {
 .dialog-container .problemPopContent ul {
-  padding: 0 .4rem;
+    padding: 0 .4rem;
 }
 }
 
 
 .dialog-container .problemPopContent ul li {
 .dialog-container .problemPopContent ul li {
-  margin-top: 0.16rem;
+    margin-top: 0.16rem;
 }
 }
 
 
 .dialog-container .problemPopContent ul li h4 {
 .dialog-container .problemPopContent ul li h4 {
-  font-size: .3rem;
-  line-height: 1.5;
-  color: #1d1d1d;
+    font-size: .3rem;
+    line-height: 1.5;
+    color: #1d1d1d;
 }
 }
 
 
 .dialog-container .problemPopContent ul li p {
 .dialog-container .problemPopContent ul li p {
-  font-size: .28rem;
-  color: #868686;
-  line-height: 1.4;
+    font-size: .28rem;
+    color: #868686;
+    line-height: 1.4;
 }
 }
 
 
 .dialog-container .problemPopContent button {
 .dialog-container .problemPopContent button {
-  width: 100%;
-  background: #fff;
-  border-top: 1px solid #E0E0E0;
-  position: absolute;
-  bottom: 0;
-  height: 1rem;
-  font-size: .36rem;
-  color: #2cb7ca;
+    width: 100%;
+    background: #fff;
+    border-top: 1px solid #E0E0E0;
+    position: absolute;
+    bottom: 0;
+    height: 1rem;
+    font-size: .36rem;
+    color: #2cb7ca;
 }
 }
 
 
 .custom-toast .weui-toast {
 .custom-toast .weui-toast {
-  font-size: .3rem;
-  padding: 0.2rem;
-  width: auto;
-  max-width: 6rem;
-  min-height: 0;
-  height: auto;
-  top: 50%;
-  left: 50%;
-  margin-left: 0;
-  margin-top: -0.47rem;
-  transform: translateX(-50%) translateY(-50%);
+    font-size: .3rem;
+    padding: 0.2rem;
+    width: auto;
+    max-width: 6rem;
+    min-height: 0;
+    height: auto;
+    top: 50%;
+    left: 50%;
+    margin-left: 0;
+    margin-top: -0.47rem;
+    transform: translateX(-50%) translateY(-50%);
 }
 }
 
 
 .custom-toast .weui-icon_toast {
 .custom-toast .weui-icon_toast {
-  display: none;
+    display: none;
 }
 }
 
 
 .custom-toast .weui-toast__content {
 .custom-toast .weui-toast__content {
-  margin: 0;
-}
-
-.weui-dialog .weui-dialog__ft .weui-dialog__btn_primary {
-  color: #2cb7ca;
-}
-
-.weui-dialog input {
-  caret-color: #2cb7ca;
-}
-
-.classify-edit-pop .weui-dialog .weui-dialog__hd,
-.classify-edit-pop .weui-dialog .weui-dialog__bd {
-  padding: 0;
-  text-align: left;
-  font-size: .34rem;
-}
-
-.classify-edit-pop .weui-dialog .weui-dialog__hd {
-  padding-left: .3rem;
-  height: .88rem;
-  line-height: .88rem;
-  background-color: #F4F4F9;
-}
-
-.classify-edit-pop .weui-dialog .weui-dialog__bd {
-  padding: .38rem .3rem;
-}
-
-.classify-edit-pop .weui-dialog .weui-dialog__bd .classify-keyword {
-  padding: 0 .17rem;
-  height: 0.8rem;
-  width: 100%;
-  font-size: .32rem;
-  border: 1px solid #CECECE;
-}
-
-.classify-edit-pop .weui-dialog .weui-dialog__ft {
-  margin-top: .1rem;
-  margin-bottom: .3rem;
-  justify-content: space-around;
+    margin: 0;
+}
+.weui-dialog {
+    border-radius: 0.16rem;
+    left: 0.72rem;
+    right: 0.72rem;
+}
+.weui-dialog__hd {
+    color: #171826;
+    font-style: normal;
+    font-weight: bold;
+    font-size: 0.36rem;
+    line-height: 0.52rem;
+    padding-bottom: 0.16rem;
+    padding-top: 0.48rem;
+}
+.weui-dialog__bd {
+    font-weight: 500;
+    font-size: 0.3rem;
+    line-height: 0.44rem;
+    text-align: center;
+    color: #5F5E64;
+    padding-bottom: 0.47rem;
 }
 }
-
-.classify-edit-pop .weui-dialog .weui-dialog__ft .dialog__btn {
-  display: inline-block;
-  width: 1.72rem;
-  height: .72rem;
-  line-height: .72rem;
-  color: #fff;
+.weui-dialog__btn_default {
+    color: #171826;
+    font-weight: 500;
+    font-size: 0.36rem;
 }
 }
-
-.classify-edit-pop .weui-dialog .weui-dialog__ft .dialog__btn_confirm {
-  background-color: #2CB7CA;
+.weui-dialog__ft {
+    height: 0.92rem;
+    line-height: 0.92rem;
+    min-height: 0.92rem;
 }
 }
-
-.classify-edit-pop .weui-dialog .weui-dialog__ft .dialog__btn_cancel {
-  background-color: #BFBFC3;
+.weui-dialog .weui-dialog__ft .weui-dialog__btn_primary {
+    font-weight: 500;
+    font-size: 0.36rem;
+    color: #FB483D;
 }
 }
 
 
-.classify-edit-pop .weui-dialog .weui-dialog__ft:after {
-  border: none;
+.weui-dialog input {
+    caret-color: #2cb7ca;
+}
+
+.classify-edit-pop .weui-dialog__bd input {
+    border: 1px solid rgba(0, 0, 0, 0.1);
+    box-sizing: border-box;
+    border-radius: 0.08rem;
+    font-weight: 500;
+    font-size: 0.3rem;
+    line-height: 0.32rem;
+    padding: 0.3rem 0.32rem;
+    color: #171826;
+    width: 100%;
 }
 }
 
 
 .addKeyWord  i.icon-tianjia{
 .addKeyWord  i.icon-tianjia{
-	    position: fixed;
+    position: fixed;
     bottom: .5rem;
     bottom: .5rem;
+    bottom: calc(constant(safe-area-inset-bottom) + 0.5rem); /* iOS 11.0 */
+    bottom: calc(env(safe-area-inset-bottom) + 0.5rem); /* iOS 11.2 */
     left: 50%;
     left: 50%;
     margin-left: -25px;
     margin-left: -25px;
     width: 50px;
     width: 50px;
 }
 }
 .enter.addkeyWord{
 .enter.addkeyWord{
-	margin-bottom: .2rem;
+    margin-top: 2rem;
+    margin-bottom: .2rem;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: center;
+}
+
+.enter.addkeyWord img {
+    width: 2rem;
+}
+.enter.addkeyWord img + span {
+    font-weight: 500;
+    font-size: 14px;
+    line-height: 20px;
+    color: #5F5E64;
+    margin-top: 0.77rem;
+    margin-bottom: 0.96rem;
+}
+.enter.addkeyWord .addButton {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    justify-content: center;
+    padding: 0.16rem 0.48rem;
+    width: 3.04rem;
+    height: 0.8rem;
+    background: #2ABED1;
+    border-radius: 0.08rem;
+    font-weight: 500;
+    font-size: 0.32rem;
+    line-height: 0.48rem;
+    color: #F7F9FA;
+}
+.jy-icon-add {}
+.jy-icon-add {
+    position: relative;
+    width: 0.28rem;
+    margin-right: 0.16rem;
+    height: 100%;
+}
+
+.jy-icon-add:before,
+.jy-icon-add:after {
+    position: absolute;
+    left: 50%;
+    top: 50%;
+    content: '';
+    width: 0.26rem;
+    height: 0.04rem;
+    background-color: #fff;
+    transform: translate(-50%, -50%);
+}
+
+.jy-icon-add:after {
+    transform: translate(-50%, -50%) rotate(90deg);
 }
 }
 
 
 .ios-user-select {
 .ios-user-select {
@@ -480,14 +623,16 @@
     opacity: 0.6;
     opacity: 0.6;
 }
 }
 .keysexplain{
 .keysexplain{
-    position: fixed;
-height: .8rem;
-background: rgba(245,244,249,1);
-width: 100%;
-    font-size: .3rem;
-    padding-top: .18rem;
-    padding-left: .3rem;
-    color: #888;
+    /* position: fixed; */
+    height: 0.4rem;
+    /* background: red; */
+    width: 100%;
+    font-size: .24rem;
+    line-height: 0.4rem;
+    font-weight: 500;
+    /* padding-top: .18rem; */
+    /* padding-left: .3rem; */
+    color: #9B9CA3;
 }
 }
 .classifyKeysShow{
 .classifyKeysShow{
     font-size: .25rem;
     font-size: .25rem;
@@ -500,122 +645,55 @@ width: 100%;
     -webkit-box-orient: vertical;
     -webkit-box-orient: vertical;
 }
 }
 .addClassify{
 .addClassify{
-    height: 1rem;
     text-align: center;
     text-align: center;
-    background: #2CB7CA;
-    width: 100%;
-    line-height: 1rem;
     color:#FFFFFF;
     color:#FFFFFF;
-    font-size: .32rem;
-position:fixed;
-bottom:0px;
-}
-.classify-show-pop .weui-dialog .weui-dialog__hd {
- padding: 0;
- text-align: center;
- font-size: .34rem;
-}
-.classify-show-pop .weui-dialog .weui-dialog__hd {
-    padding-left: .3rem;
-    height: .88rem;
-    line-height: .88rem;
-    background-color: #F4F4F9;
-}
-.classify-show-pop .weui-dialog .weui-dialog__bd {
-    padding: .38rem .1rem;
-    text-align: center;
-    font-size: .32rem;
-    color: #1d1d1d;
-    line-height: .6rem;
-}
-.classify-show-pop .weui-dialog .weui-dialog__bd .classify-keyword {
-    padding: 0 .17rem;
-    height: 0.8rem;
-    width: 100%;
-    font-size: .32rem;
-    border: 1px solid #CECECE;
-}
-
-.classify-show-pop .weui-dialog .weui-dialog__ft {
-    margin-top: .1rem;
-    margin-bottom: .3rem;
-    justify-content: space-around;
-}
-.classify-show-pop .weui-dialog .weui-dialog__ft .dialog__btn {
-    display: inline-block;
-    width: 1.72rem;
-    height: .72rem;
-    line-height: .72rem;
-    color: #fff;
-    font-size: .32rem;
-}
-.classify-show-pop .weui-dialog .weui-dialog__ft .dialog__btn_confirm {
-      background-color: #2CB7CA;
-}
-.classify-show-pop .weui-dialog .weui-dialog__ft .dialog__btn_cancel {
-      background-color: #BFBFC3;
-}
-.classify-show-pop .weui-dialog .weui-dialog__ft:after {
-      border: none;
+    font-size: .36rem;
+    font-weight: 500;
+    background: #2ABED1;
+    border-radius: 0.16rem;
+    width: 6.86rem;
+    margin: 0.16rem 0 0.24rem 0;
+    line-height: 0.92rem;
+    height: 1rem;
 }
 }
 .all-classify-column{
 .all-classify-column{
-      position: relative;
-      padding-bottom: 1rem;
+    position: relative;
+    padding-bottom: 1rem;
 }
 }
 .classify-fast{
 .classify-fast{
-    width: 1.7rem;
-    text-align: center;
-    color: #2CB7CA;
+    height: 0.88rem;
+    background-color: #2ABED1;
+    display: flex;
+    flex-direction: row;
+    align-items: center;
+    font-weight: 500;
     font-size: 0.26rem;
     font-size: 0.26rem;
-    padding: 0rem 0rem 0.1rem;
-    float: right;
+    padding: 0 0.32rem;
+    color: #FFFFFF;
 }
 }
-
-.classify-fast-pop .weui-dialog .weui-dialog__hd {
- padding: 0;
- text-align: center;
- font-size: .34rem;
+.classify-fast span {
+    flex: 1;
+    width: 100%;
 }
 }
-.classify-fast-pop .weui-dialog .weui-dialog__hd {
-    padding-left: .3rem;
-    height: .88rem;
-    line-height: .88rem;
-    background-color: #F4F4F9;
+.classify-fast .weui-dialog__btn {
+    max-width: 1.44rem;
+    height: 0.64rem;
+    line-height: 0.64rem;
+    border: 1px solid rgba(255, 255, 255, 0.5);
+    box-sizing: border-box;
+    border-radius: 8px;
+    font-size: 0.26rem;
+    text-align: center;
+    color: #FFFFFF;
 }
 }
+
 .classify-fast-pop .weui-dialog .weui-dialog__bd {
 .classify-fast-pop .weui-dialog .weui-dialog__bd {
-        padding: .38rem .4rem;
     text-align: left;
     text-align: left;
-    font-size: .32rem;
-    color: #1d1d1d;
-    line-height: .45rem;
-    letter-spacing: 0.01rem
 }
 }
 .classify-fast-pop .weui-dialog .weui-dialog__bd p {
 .classify-fast-pop .weui-dialog .weui-dialog__bd p {
-        color: #888;
-    font-size: .26rem;
-    margin-top: .2rem;
-    letter-spacing: 0.01rem;
-}
-
-.classify-fast-pop .weui-dialog .weui-dialog__ft {
-    margin-top: .1rem;
-    margin-bottom: .3rem;
-    justify-content: space-around;
-}
-.classify-fast-pop .weui-dialog .weui-dialog__ft .dialog__btn {
-    display: inline-block;
-    width: 1.72rem;
-    height: .72rem;
-    line-height: .72rem;
-    color: #fff;
-    font-size: .32rem;
-}
-.classify-fast-pop .weui-dialog .weui-dialog__ft .dialog__btn_confirm {
-      background-color: #2CB7CA;
-}
-.classify-fast-pop .weui-dialog .weui-dialog__ft .dialog__btn_cancel {
-      background-color: #BFBFC3;
+    color: #9B9CA3;
+    font-weight: 500;
+    font-size: 0.26rem;
+    line-height: 0.4rem;
+    margin-top: 0.4rem;
 }
 }
-.classify-fast-pop .weui-dialog .weui-dialog__ft:after {
-      border: none;
-}

+ 327 - 0
src/web/staticres/vipsubscribe/js/addKeyWord.js

@@ -0,0 +1,327 @@
+/* 全局变量 */
+var SessionData = JSON.parse(sessionStorage.a_items || false);
+var SessionPageData = {
+    appendkey: [],
+    notkey: [],
+    key: ['']
+}
+try {
+    var tempData = SessionData[sessionStorage.classify_index]['a_key'][sessionStorage.kws_index]
+    if (tempData) {
+        SessionPageData = tempData
+    }
+} catch (e) {
+    SessionPageData = {
+        appendkey: [],
+        notkey: [],
+        key: ['']
+    }
+}
+var KeyData = {
+    includeKeys: [],
+    excludeKeys: [],
+    keyStr: ''
+}
+var beforeInput = {
+    status: null,
+    index: null,
+    include: '',
+    exclude: ''
+}
+/* 回显数据 */
+function echoPageData(data) {
+    KeyData = {
+        includeKeys: data.appendkey || [],
+        excludeKeys: data.notkey || [],
+        keyStr: data.key ? data.key.toString() : ''
+    }
+    $("#keyStr").val(KeyData.keyStr)
+    if (KeyData.keyStr !== '') {
+        $(".jy__btn_delete").show()
+        $(".submitButton").removeClass('disabled')
+    }
+    KeyData.excludeKeys.forEach(function (v) {
+        prependKeyDom(false, v)
+    })
+    KeyData.includeKeys.forEach(function (v) {
+        prependKeyDom(true, v)
+    })
+}
+
+/* 保存数据 */
+function savePageData(actionType) {
+    //  SK:保存关键词; DK:删除关键词; SC:保存分类
+    var params = {
+        pageType: "keyWords",
+        classify_index: sessionStorage.classify_index,
+        classify_name: sessionStorage.classify_name,
+        kws_index: sessionStorage.kws_index,
+        kws_name: KeyData.keyStr,
+        actionType: actionType,
+        addition_kws: KeyData.includeKeys,
+        not_kws: KeyData.excludeKeys,
+        kwscount: sessionStorage.kws_count
+    }
+    if (actionType === 'DK') {
+        params.kws_name = SessionPageData.key.toString()
+    }
+    var result = false
+    $.ajax({
+        type: "POST",
+        url: "/subscribepay/afterPay/setUserInfo",
+        data: params,
+        dataType: "json",
+        async: false,
+        traditional: true,
+        success: function (r) {
+            result = r
+        }
+    })
+    if (result.flag) {
+        sessionStorage.setItem('addition_kws', JSON.stringify(KeyData.includeKeys))
+        sessionStorage.setItem('not_kws', JSON.stringify(KeyData.excludeKeys))
+    }
+    return result
+}
+
+/* 删除提示 */
+function deleteKeys() {
+    weui.confirm('删除后将无法恢复,确定删除?', {
+        title: '删除关键词',
+        isAndroid: false,
+        buttons: [{
+            label: '取消',
+            type: 'default',
+            onClick: function () {
+            }
+        }, {
+            label: '确定',
+            type: 'primary',
+            onClick: function () {
+                var temp = savePageData('DK')
+                if (temp.flag) {
+                    weui.toast('删除成功', {
+                        duration: 2000,
+                        className: 'custom-toast',
+                        callback: function () {
+                            window.history.go(-1)
+                        }
+                    });
+                } else {
+                    wToast('无法删除或已被删除')
+                }
+            }
+        }]
+    });
+}
+
+function openDialog(name, e) {
+    e && e.stopPropagation()
+    $("div[data-dialog='" + name + "']").toggle()
+}
+
+/* 附加词、排除词插入Dom */
+function prependKeyDom(status, value) {
+    var ac = (status ? '附加' : '排除') + '词'
+    var bc = '输入' + (status ? '' : '不') + '希望接收的关键词(选填)'
+    var inDom = $("#" + (status ? 'include' : 'exclude'))
+    var templateHtml = "<div class=\"input-box\"><span>" + ac + "</span><input readonly value=\"" + value + "\" type=\"text\" placeholder=\"" + bc + "\"/><i  class=\"addImg\"></i></div>";
+    var nextStatus = inDom.children(':last-child').children('input').length ? inDom.children(':last-child').children('input').val().trim().length > 0 : true
+    if (nextStatus) {
+        inDom.prepend(templateHtml)
+    }
+    // inDom.children(':last-child').children('input').focus()
+}
+
+/* 切换输入框 */
+function showInputBox(_ref) {
+    var _ref$status = _ref.status,
+        status = _ref$status === void 0 ? true : _ref$status,
+        _ref$value = _ref.value,
+        value = _ref$value === void 0 ? '' : _ref$value,
+        _ref$text = _ref.text,
+        text = _ref$text === void 0 ? '添加' : _ref$text,
+        _ref$index = _ref.index,
+        index = _ref$index === void 0 ? null : _ref$index;
+    beforeInput.status = status
+    beforeInput.index = index
+    $(".select-input").addClass((status ? 'left' : 'right') + '-run')
+    var tempIDom = $(".select-input .input-box" + (status ? ':first-child input' : '.right-box input'))
+    tempIDom.val(value + '  ').focus().next().text(text)
+    // ios部分机型不显示光标
+    setTimeout(function(){
+        tempIDom.val(value).focus()
+    }, 350)
+}
+
+function addInput(status) {
+    showInputBox({
+        status: status,
+        value: beforeInput[status ? 'include' : 'exclude']
+    })
+}
+
+/* toast */
+function wToast (text) {
+    return weui.toast(text, {
+        duration: 2000,
+        className: 'custom-toast'
+    })
+}
+
+/* 改变按钮状态 */
+function changeInputStatus (status, dom) {
+    if (status) {
+        dom.addClass('error')
+    } else {
+        dom.removeClass('error')
+        $('.addButton').removeClass('disabled')
+    }
+}
+
+/* 初始化事件监听 */
+$(function () {
+    /* 获取窗口滚动条高度 */
+    function getScrollTop() {
+        var scrollTop = 0;
+        if (document.documentElement && document.documentElement.scrollTop) {
+            scrollTop = document.documentElement.scrollTop;
+        } else if (document.body) {
+            scrollTop = document.body.scrollTop;
+        }
+        return scrollTop;
+    };
+    var oldScrollTop = getScrollTop() || 0
+    document.body.addEventListener('focusout', function () {
+        var ua = window.navigator.userAgent
+        if (ua.indexOf('iPhone') > 0 || ua.indexOf('iPad') > 0) {
+            document.body.scrollTop = oldScrollTop;
+            document.documentElement.scrollTop = oldScrollTop
+        }
+    })
+
+    // 输入框事件
+    $(".select-input .input-box").on('input', 'input', function () {
+        // $(this)[0].scrollIntoView({block: "center"})
+        var nowInput = $(this).val().trim()
+        var aDom = $(this).next()
+        var nowText = aDom.text()
+        if (nowText === '添加') {
+            beforeInput[beforeInput.status ? 'include' : 'exclude'] = nowInput
+        }
+        if (nowInput.length) {
+            aDom.removeClass('disabled')
+        } else {
+            aDom.addClass('disabled')
+        }
+    })
+    $(".select-input .input-box").on('blur', 'input', function () {
+        $(".add-key-word .content-box").removeClass('disabled')
+        $(this).parents('.select-input').removeClass('right-run').removeClass('left-run')
+    })
+    $(".select-input .input-box").on('focus', 'input', function () {
+        $(".add-key-word .content-box").addClass('disabled')
+    })
+    $("#keyStr").on('input', function (e) {
+        var nowInput = $(this).val().trim()
+        KeyData.keyStr = nowInput
+        if (nowInput.length) {
+            $('.submitButton').removeClass('disabled')
+        } else {
+            $('.submitButton').addClass('disabled')
+        }
+    })
+    $(".input-group").on('click', 'input', function (e) {
+        var nowType = $(this).parents('.input-group').attr('id') === 'include'
+        var nowInput = $(this).val().trim()
+        var nowIndex = $(this).parents('.input-box').index()
+        var nowInputStatus = $(".add-key-word .content-box").hasClass('disabled')
+        if (nowInputStatus) {
+            e.stopPropagation()
+        } else {
+            showInputBox({
+                status: nowType,
+                value: nowInput,
+                index: nowIndex,
+                text: '修改'
+            })
+        }
+    })
+    // $(".select-input .input-box").on('blur', 'input', function () {
+    //     var nowIndex = $(this).parents('.input-box').index()
+    //     var nowType = $(this).parents('.input-group').attr('id') === 'include'
+    //     var nowInput = $(this).val().trim()
+    //     var nowArr = KeyData[(nowType ? 'in' : 'ex') + 'cludeKeys']
+    //     if (nowInput.length) {
+    //         $(this).next().show()
+    //     } else {
+    //         $(this).next().hide()
+    //     }
+    //     if (nowArr.indexOf(nowInput) !== -1) {
+    //         $(this).css('color', '#fb483d')
+    //     } else {
+    //         $(this).css('color', '#171826')
+    //     }
+    //     nowArr.splice(nowIndex, 1, nowInput)
+    // })
+    // 按钮事件
+    // 按钮事件
+    $(".select-input .input-box a").on('click', function () {
+        // $(this)[0].scrollIntoView({block: "center"})
+        var nowInput = $(this).prev().val().trim()
+        var nowType = !$(this).parents('.input-box').hasClass('right-box')
+        var nowArr = KeyData[(nowType ? 'in' : 'ex') + 'cludeKeys']
+        var canPush = nowArr.indexOf(nowInput)
+        if (!nowInput.length) {
+            return
+        }
+        if (nowInput.length > 20) {
+            return wToast('每组'+(nowType ? '附加' : '排除')+'词不能超过20个字符')
+        }
+        if (canPush !== -1 && canPush !== beforeInput.index) {
+            return wToast('您设置的'+(nowType ? '附加' : '排除')+'词已存在,请调整后再添加。')
+        }
+        if (beforeInput.index !== null) {
+            $("#" + (nowType ? 'include' : 'exclude')).find('.input-box').eq(beforeInput.index).children('input').val(nowInput)
+            nowArr.splice(beforeInput.index, 1, nowInput)
+        } else {
+            prependKeyDom(nowType, nowInput)
+            nowArr.unshift(nowInput)
+        }
+        beforeInput.exclude = ''
+        beforeInput.include = ''
+    })
+    $(".submitButton").on('click', function () {
+        var canSub = $(this).hasClass('disabled')
+        if (!canSub) {
+            var kws_arr = JSON.parse(sessionStorage.getItem('kws_arr') || [])
+            if (kws_arr.indexOf(KeyData.keyStr) !== -1 && SessionPageData.key.toString() !== KeyData.keyStr) {
+                return wToast('您设置的关键词已存在,请调整后再添加。')
+            }
+            if (KeyData.keyStr.length > 20) {
+                return wToast('关键词不能超过20个字符')
+            }
+            var temp = savePageData('SK')
+            if (temp.flag) {
+                weui.toast('保存成功', {
+                    duration: 2000,
+                    className: 'custom-toast',
+                    callback: function () {
+                        window.history.go(-1)
+                    }
+                });
+            } else {
+                wToast('保存出错,稍后再试')
+            }
+
+        }
+    })
+    $(".input-group").on('click', '.addImg', function () {
+        var tempDom = $(this).parents('.input-box')
+        var nowType = $(this).parents('.input-group').attr('id') === 'include'
+        var nowArr = KeyData[(nowType ? 'in' : 'ex') + 'cludeKeys']
+        nowArr.splice(tempDom.index(), 1)
+        tempDom.remove()
+    })
+})
+echoPageData(SessionPageData)

+ 608 - 0
src/web/staticres/vipsubscribe/js/newKeyWord.js

@@ -0,0 +1,608 @@
+"use strict";
+
+var PageData = {
+    a_items: [],
+    data: null,
+    keysArr: [],
+    classArr: [],
+    classIndex: 0,
+    keyIndex: 0
+};
+
+function wToast(text) {
+    return weui.toast(text, {
+        duration: 2000,
+        className: 'custom-toast'
+    });
+} // 获取数据
+
+
+function getPageData() {
+    var loading = weui.loading();
+    $.post("/subscribepay/afterPay/getUserInfo", {}, function (_ref) {
+        var userData = _ref.userData;
+        PageData.data = userData;
+
+        if (userData) {
+            if (userData.o_vipjy && userData.o_vipjy.a_items && userData.o_vipjy.a_items.length) {
+                var a_items = userData.o_vipjy.a_items;
+                PageData.a_items = a_items;
+                drawDom(PageData.a_items);
+            } else {
+                $(".addClassify").click();
+            }
+
+            loading.hide();
+        } else {
+            loading.hide();
+        }
+    });
+} // 保存数据
+
+
+function setPageData(actionType) {
+    var loading = weui.loading();
+    var ClassData = PageData.a_items[PageData.classIndex];
+    var ajaxResult = null;
+    var param = {};
+    param.pageType = "keyWords";
+    param.classify_index = PageData.classIndex;
+    param.classify_name = ClassData.s_item;
+    param.kws_index = PageData.keyIndex;
+    param.kws_name = ClassData.a_key.length ? ClassData.a_key[PageData.keyIndex].key.toString() : null;
+    param.actionType = actionType;
+    param.addition_kws = ClassData.a_key.length ? ClassData.a_key[PageData.keyIndex].appendkey : null;
+    param.not_kws = ClassData.a_key.length ? ClassData.a_key[PageData.keyIndex].notkey : null;
+    param.kwscount = ClassData.keys.length;
+    $.ajax({
+        type: "POST",
+        url: "/subscribepay/afterPay/setUserInfo",
+        data: param,
+        dataType: "json",
+        async: false,
+        traditional: true,
+        success: function success(r) {
+            ajaxResult = r;
+
+            if (r.flag) {
+                console.log("保存成功");
+
+                try {
+                    JyObj.checkLab(); //刷新搜索首页和订阅首页
+
+                    sessionStorage.reloadHomePage = true;
+                    sessionStorage.reloadSubPage = true;
+                    setTimeout(function () {
+                        //ios 从我的菜单进入 保存关键词 底部导航会显示
+                        JyObj.hiddenBottom("0");
+                    }, 300);
+                } catch (e) {}
+            }
+        }
+    });
+
+    if (actionType === 'DK' && ajaxResult.flag) {
+        ClassData.a_key.splice(param.kws_index, 1);
+        ClassData.keys.splice(param.kws_index, 1);
+        PageData.keysArr.splice(PageData.keysArr.indexOf(param.kws_name), 1);
+        drawKwsCount(PageData.keysArr.length);
+
+        if (ClassData.keys.length === 0) {
+            $(".enter.addkeyWord").show();
+            $(".classify-item[data-c='" + PageData.classIndex + "']").remove();
+            PageData.classArr.splice(PageData.classArr.indexOf(PageData.a_items[PageData.classIndex].s_item), 1);
+        } else {
+            upDrawClassPage();
+        }
+    }
+
+    loading.hide();
+    return ajaxResult.flag;
+} // 处理页面切换
+
+
+function checkPageStatus() {
+    if (history.state && history.state.classIndex.toString()) {
+        if (PageData.a_items[history.state.classIndex].s_item == history.state.className) {
+            PageData.classIndex = history.state.classIndex;
+            toggleSection(false);
+        } else {
+            history.go(-1);
+        }
+    } else {
+        var tempAItems = PageData.a_items.filter(function (v) {
+            return v.keys.length;
+        });
+
+        if (tempAItems.length !== PageData.a_items.length) {
+            PageData.a_items = tempAItems;
+            drawDom(PageData.a_items);
+        }
+
+        toggleSection(true);
+    }
+} // 切换
+
+
+function toggleSection(type) {
+    var tempDomList = $(".keyWord .all-classify-column");
+    var tempDomKey = $(".keyWord .add-keyword-container");
+
+    if (type) {
+        $(".classify-edit-pop").hide();
+        tempDomList.show();
+        tempDomKey.hide();
+        document.title = '关键词分类';
+    } else {
+        tempDomKey.show();
+        tempDomList.hide();
+        upDrawClassPage();
+        document.title = '关键词';
+    }
+
+    $(".app-layout-header span:eq(1)").text(document.title);
+} //保存缓存
+
+
+function setSesstion() {
+    sessionStorage.classify_name = PageData.a_items[PageData.classIndex].s_item; //当前分类
+
+    sessionStorage.kws_index = PageData.keyIndex; //当前关键词索引
+
+    sessionStorage.classify_index = PageData.classIndex; //当前分类索引
+
+    sessionStorage.a_items = JSON.stringify(PageData.a_items); //当前数据
+
+    sessionStorage.kws_arr = JSON.stringify(PageData.keysArr); //当前所有关键词排
+
+    sessionStorage.kws_count = PageData.keysArr.length; //关键词个数
+} // 编辑删除
+
+
+function deleteKey(th) {
+    var jQueryDOM = $(th).parents('li.delete-box');
+    var liIndex = Number(jQueryDOM.index());
+    PageData.keyIndex = jQueryDOM.attr('data-k');
+    weui.confirm('删除后将无法恢复,确定删除?', {
+        title: '删除关键词',
+        isAndroid: false,
+        buttons: [{
+            label: '取消',
+            type: 'default',
+            onClick: function onClick() {
+                deleteSwiper.length ? deleteSwiper[liIndex].slideTo(0) : deleteSwiper.slideTo(0);
+            }
+        }, {
+            label: '确定',
+            type: 'primary',
+            onClick: function onClick() {
+                if (setPageData('DK')) {
+                    jQueryDOM.remove();
+                } else {
+                    wToast('无法删除或已被删除');
+                }
+            }
+        }]
+    });
+}
+/* swiper */
+
+
+function initSwiper() {
+    console.log('swiper');
+
+    if (window.deleteSwiper) {
+        if (window.deleteSwiper.length) {
+            window.deleteSwiper.forEach(function (e) {
+                try {
+                    e.destroy();
+                } catch (err) {
+                    e = null;
+                }
+            });
+        } else {
+            try {
+                window.deleteSwiper.destroy();
+            } catch (e) {
+                window.deleteSwiper = null;
+            }
+        }
+
+        window.deleteSwiper = null;
+    }
+
+    window.deleteSwiper = new Swiper('.delete-box', {
+        slidesPerView: 'auto',
+        initialSlide: 0,
+        resistanceRatio: 0,
+        slideToClickedSlide: true,
+        on: {
+            init: function init() {
+                var aEl = $(this.$wrapperEl).find(".one");
+                var bEl = $(this.$wrapperEl).find(".delete-button");
+                var aH = aEl[0] && aEl[0].offsetHeight;
+                aH && $(bEl).height(aH);
+            },
+            tap: function tap(event) {
+                var canDelete = event.target.className.indexOf('delete-button') !== -1;
+                var cI = $(this.$el).attr('data-c');
+                var kI = $(this.$el).attr('data-k');
+                PageData.keyIndex = kI;
+
+                if (!canDelete) {
+                    console.log(cI, kI);
+                    setSesstion();
+                    window.location.href = '/front/vipsubscribe/toSetaddKeyPage';
+                }
+            },
+            touchStart: function touchStart(event) {
+                var nowIndex = $(this.$wrapperEl).parents('li').index('.showKeyWord ul li');
+
+                if (deleteSwiper.length) {
+                    deleteSwiper.forEach(function (e, i) {
+                        var canDelete = e.getTranslate() !== 0;
+
+                        if (canDelete && i !== nowIndex) {
+                            e.slideTo(0);
+                        }
+                    });
+                }
+            }
+        }
+    });
+} // 渲染
+
+
+function drawKeyDom(index, data) {
+    console.log(index, data);
+    var keyStr = data.key.toString();
+    var appendkeyStr = data.appendkey ? data.appendkey.join('、') : '';
+    var notkeyStr = data.notkey ? data.notkey.join('、') : '';
+    var tempDom = $(".delete-box[data-c='" + PageData.classIndex + "'][data-k='" + index + "']"); // 待优化
+
+    if (false && tempDom.hasClass('delete-box')) {
+        // 更新
+        tempDom.find('p.key').text(keyStr);
+        var tempA = tempDom.find('p.addition').text(appendkeyStr).parent();
+        appendkeyStr.length ? tempA.show() : tempA.hide();
+        var tempB = tempDom.find('p.notkey').text(notkeyStr).parent();
+        notkeyStr.length ? tempB.show() : tempB.hide();
+    } else {
+        // 新增
+        var tempHTML = "\n        <li class=\"delete-box swiper-container\" data-c=\"" + PageData.classIndex + "\" data-k=\"" + index + "\">\n            <div class=\"swiper-wrapper\">\n                <div class=\"one swiper-slide\">\n                    <div>\n                        <span>\n                            <p class=\"key\">" + keyStr + "</p>\n                            <span class=\"iconfont icon-arrow\"></span>\n                        </span>\n                        <span class=\"line-top-border\" " + (appendkeyStr.length ? '' : 'style="display: none"') + ">\n                            <strong> <span class=\"keyWord-tags\">\u9644\u52A0\u8BCD</span></strong>\n                            <p class=\"addition\">" + appendkeyStr + "</p>\n                        </span>\n                        <span class=\"line-top-border\" " + (notkeyStr.length ? '' : 'style="display: none"') + ">\n                            <strong> <span class=\"keyWord-tags exclude\">\u6392\u9664\u8BCD</span></strong>\n                            <p class=\"notkey\">" + notkeyStr + "</p>\n                        </span>\n                    </div>\n                </div>\n                <div class=\"swiper-slide delete-button\" onclick=\"deleteKey(this)\" style=\"height: 128px;\">\u5220\u9664</div>\n            </div>\n        </li>\n        ";
+        $('.showKeyWord ul').append(tempHTML);
+    }
+} //强制弹出 提示信息
+
+
+function showMeg() {
+    // 如果是苹果手机,打开时候要设置top
+    var agent = navigator.userAgent.toLowerCase();
+    var dialog = $('.classify-show-pop .weui-dialog');
+
+    if (/iphone|ipod|ipad|ios/.test(agent)) {
+        dialog.css({
+            'top': '30%'
+        });
+    } else {
+        dialog.css({
+            'top': '50%'
+        });
+    }
+
+    $('.classify-show-pop').show();
+}
+
+function upDrawClassPage() {
+    var ClassPageData = PageData.a_items[PageData.classIndex];
+    $(".classify .classify-detail").text(ClassPageData.s_item);
+    $(".delete-box:not([data-c='" + PageData.classIndex + "'])").remove();
+    $('.showKeyWord ul').html('');
+
+    if (ClassPageData.a_key && ClassPageData.a_key.length) {
+        // 旧有模式
+        // 判断是否需要提示分类
+        if (ClassPageData.i_tips !== 1) {
+            showMeg();
+            var param = {};
+            param.classify_index = PageData.classIndex;
+            param.kws_tips = 1;
+            $.post("/subscribepay/afterPay/updateUserTips", param, function (r) {
+                if (r.flag) {
+                    ClassPageData.i_tips = 1;
+                }
+            });
+        }
+
+        $(".enter.addkeyWord").hide();
+        $(".add-keyword-container .addNewKeyword i").show();
+        ClassPageData.a_key.forEach(function (v, i) {
+            drawKeyDom(i, v);
+        });
+        initSwiper();
+    } else {
+        // 新增模式
+        if (PageData.data && PageData.data.i_vip_fastimport == 0) {
+            $(".classify-fast").show();
+        } else {
+            $(".classify-fast").hide();
+        }
+
+        modalOne();
+        $(".enter.addkeyWord").show();
+        $(".add-keyword-container .addNewKeyword i").hide();
+    }
+}
+
+function drawKwsCount(count) {
+    $(".kws_count").text(count);
+}
+
+function drawDom(a_items) {
+    var allHTML = '';
+    var keysArr = [];
+    var classArr = [];
+    a_items.forEach(function (data, i) {
+        data.keys = data.a_key.map(function (v) {
+            return v.key.join('、');
+        });
+        keysArr = keysArr.concat(data.keys);
+        classArr.push(data.s_item);
+        var tempHTML = "\n            <li class=\"classify-item\" data-c=\"" + i + "\">\n                <div>\n                    <span class=\"classify-item-l\">" + data.s_item + "</span>\n                    <span class=\"classify-item-r\">\n                        <span class=\"classify-item-detail\">" + data.keys.length + "\u4E2A\u5173\u952E\u8BCD</span>\n                        <span class=\"iconfont icon-arrow\"></span>\n                    </span>\n                </div>\n                <div class=\"classifyKeysShow\">" + data.keys.join('、') + "</div>\n            </li>";
+        allHTML += tempHTML;
+    });
+    PageData.keysArr = keysArr;
+    PageData.classArr = classArr;
+    drawKwsCount(PageData.keysArr.length);
+    $(".keyWord .all-classify-column ul.classify-list").html(allHTML);
+    checkPageStatus();
+    return allHTML;
+} //
+
+
+function modalOne() {
+    // 如果是苹果手机,打开时候要设置top
+    var agent = navigator.userAgent.toLowerCase();
+    var dialog = $('.classify-edit-pop .weui-dialog');
+
+    if (/iphone|ipod|ipad|ios/.test(agent)) {
+        dialog.css({
+            'top': '30%'
+        });
+    } else {
+        dialog.css({
+            'top': '50%'
+        });
+    }
+
+    $('.classify-edit-pop').show();
+    var currentClassifyName = $(".classify").find('.classify-detail').text();
+
+    if (currentClassifyName.indexOf("未分类") > -1) {
+        currentClassifyName = "";
+    }
+
+    $('input.classify-keyword').val(currentClassifyName).focus();
+} //
+
+
+function modalTwo() {
+    $(".fastICName").text($(".classify-detail").text()); // 如果是苹果手机,打开时候要设置top
+
+    var agent = navigator.userAgent.toLowerCase();
+    var dialog = $('.classify-fast-pop .weui-dialog');
+
+    if (/iphone|ipod|ipad|ios/.test(agent)) {
+        dialog.css({
+            'top': '40%'
+        });
+    } else {
+        dialog.css({
+            'top': '50%'
+        });
+    }
+
+    $('.classify-fast-pop').show();
+} // 显示关键词分类弹框
+
+
+$('.classify-r').on('click', function () {
+    modalOne();
+}); // 显示快速导入弹框
+
+$('.classify-fast').on('click', 'i', function () {
+    sessionStorage.fastimport = 1;
+    $('.classify-fast').hide();
+});
+$('.classify-fast').on('click', 'a', function () {
+    modalTwo();
+});
+$('.classify-edit-pop .classify-keyword').bind('input propertychange', function () {
+    var s = $('input.classify-keyword').val(); // 去空格
+
+    s = s.trim();
+
+    if (s.length === 0) {
+        $('.weui-dialog__ft .dialog__btn_confirm').addClass("opacity6");
+        return;
+    }
+
+    $('.weui-dialog__ft .dialog__btn_confirm').removeClass("opacity6");
+}); // 关键词分类 - 确定按钮点击事件
+
+$('.classify-edit-pop .dialog__btn_confirm').on('click', function () {
+    var classify_name = $.trim($('input.classify-keyword').val()); // 去空格
+
+    classify_name = classify_name.trim();
+
+    if (classify_name.length === 0) {
+        return;
+    } //分类名称是否已存在
+
+
+    if (PageData.classArr.indexOf(classify_name) !== -1) {
+        return wToast('此分类名称已存在');
+    }
+
+    if (classify_name.length > 20) {
+        return wToast('分类名称最大长度为20个字符');
+    }
+
+    $(this).removeClass("opacity6"); // 关闭弹框后要重置input内容
+
+    $('.classify-edit-pop').hide();
+    $('input.classify-keyword').val('');
+    PageData.keyIndex = 0;
+    var tempName = PageData.a_items[PageData.classIndex].s_item;
+    PageData.a_items[PageData.classIndex].s_item = classify_name; // 新增分类时不提交
+
+    if (PageData.classArr.length === PageData.classIndex) {
+        $(".classify-item[data-c='" + PageData.classIndex + "'] .classify-item-l").text(classify_name);
+        $('.classify-r .classify-detail').text(classify_name);
+        PageData.classArr.splice(PageData.classArr.indexOf(tempName), 1, classify_name);
+        history.replaceState({
+            classIndex: PageData.classIndex,
+            className: classify_name
+        }, "classPage", location.pathname);
+        return;
+    }
+
+    if (setPageData('SC')) {
+        $(".classify-item[data-c='" + PageData.classIndex + "'] .classify-item-l").text(classify_name);
+        $('.classify-r .classify-detail').text(classify_name);
+        PageData.classArr.splice(PageData.classArr.indexOf(tempName), 1, classify_name);
+        wToast('关键词分类添加成功');
+    } else {
+        PageData.a_items[PageData.classIndex].s_item = tempName;
+    }
+}); // 关键词分类 - 取消按钮点击事件
+
+$('.classify-edit-pop .dialog__btn_cancel').unbind('click').on('click', function () {
+    setTimeout(function () {
+        $('.classify-edit-pop').hide();
+        $('input.classify-keyword').val('');
+    }, 300);
+    return true;
+});
+
+var missingNumber = function missingNumber(nums) {
+    nums = nums.sort(function (a, b) {
+        return a - b;
+    });
+
+    for (var i = 0, n; i < nums.length; i++) {
+        if (nums[i] + 1 != nums[i + 1]) {
+            n = nums[i] + 1;
+            break;
+        }
+    }
+
+    return nums[0] != 0 ? 0 : n;
+};
+
+function getMaxClassName() {
+    var defalutT = '未分类';
+    var tempArr = PageData.classArr.filter(function (v) {
+        return /^未分类(\d+)$/.test(v) || v === defalutT;
+    }).map(function (v) {
+        return +v.replace(defalutT, '') + 0;
+    });
+
+    if (tempArr.length) {
+        return defalutT + (missingNumber(tempArr) > 0 ? missingNumber(tempArr) : '');
+    }
+
+    return defalutT;
+} // 添加关键词
+
+
+function addNewKeys() {
+    if (PageData.keysArr.length >= 300) {
+        return wToast('最多添加300组关键词');
+    }
+
+    PageData.keyIndex = PageData.a_items[PageData.classIndex].keys.length;
+    setSesstion();
+    window.location.href = '/front/vipsubscribe/toSetaddKeyPage';
+}
+
+$(function () {
+    getPageData();
+    $(window).off('popstate', checkPageStatus);
+    $(window).on('popstate', checkPageStatus); // 新增分类
+
+    $(".addClassify").on('click', function () {
+        PageData.classIndex = PageData.classArr.length;
+        PageData.a_items[PageData.classIndex] = {
+            a_key: [],
+            keys: [],
+            s_item: getMaxClassName()
+        };
+        toggleSection(false);
+        history.pushState({
+            classIndex: PageData.classIndex,
+            className: getMaxClassName()
+        }, "classPage", location.pathname);
+    }); // 提示分类弹窗
+
+    $('.classify-show-pop .dialog__btn_confirm').on('click', function () {
+        $('.classify-show-pop').hide();
+        modalOne();
+    });
+    $('.classify-show-pop .dialog__btn_cancel').on('click', function () {
+        $('.classify-show-pop').hide();
+    }); // 快速导入
+    // 关键词分类 - 去设置按钮点击事件
+
+    $('.classify-fast-pop .dialog__btn_confirm').on('click', function () {
+        var loading = weui.loading();
+        $.ajax({
+            type: "POST",
+            url: "/subscribepay/afterPay/fastImport",
+            data: {
+                c_index: PageData.classIndex,
+                k_index: PageData.keysArr.length,
+                c_name: $(".classify-detail").text()
+            },
+            dataType: "json",
+            async: false,
+            traditional: true,
+            success: function success(r) {
+                $('.classify-fast-pop').hide();
+
+                if (r.flagInt == 1) {
+                    $(".classify-fast").hide();
+                    wToast('成功导入' + r.kwMap.length + '个关键词');
+                    getPageData();
+                } else {
+                    wToast('导入失败');
+                }
+
+                try {
+                    JyObj.checkLab(); //刷新搜索首页和订阅首页
+
+                    sessionStorage.reloadHomePage = true;
+                    sessionStorage.reloadSubPage = true;
+                } catch (e) {}
+            }
+        });
+        loading.hide();
+    }); // 关键词分类 - 取消按钮点击事件
+
+    $('.classify-fast-pop .dialog__btn_cancel').on('click', function () {
+        $('.classify-fast-pop').hide();
+    }); // 新增关键词
+
+    $(".addButton").on('click', addNewKeys);
+    $(".addNewKeyword .icon-tianjia").on('click', addNewKeys); // 分类点击事件
+
+    $(".keyWord .all-classify-column ul.classify-list").on('click', 'li', function (e) {
+        var index = $(this).index();
+        PageData.classIndex = index;
+        toggleSection(false);
+        history.pushState({
+            classIndex: PageData.classIndex,
+            className: PageData.a_items[PageData.classIndex].s_item
+        }, "classPage", location.pathname);
+    });
+});

+ 101 - 0
src/web/templates/weixin/vipsubscribe/addKeyWord.html

@@ -0,0 +1,101 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <meta name="viewport"
+          content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,viewport-fit=cover" />
+    <meta name="apple-mobile-web-app-capable" content="yes">
+    <meta name="apple-mobile-web-app-status-bar-style" content="black">
+    <title>关键词</title>
+    <script src='{{Msg "seo" "cdn"}}/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}'></script>
+    <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}'>
+    <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}'>
+    <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}'>
+    <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/vipsubscribe/css/addKeyWord.css?v={{Msg "seo" "version"}}'>
+    <style>
+        .addImg {
+            background-image: url('{{Msg "seo" "cdn"}}/vipsubscribe/image/delete.png?v={{Msg "seo" "version"}}');
+        }
+    </style>
+</head>
+
+<body>
+<div class="app-layout-content-b add-key-word">
+    <div class="sticky-box" style="top: 0">
+        <div class="input-box">
+            <span>关键词</span>
+            <input id="keyStr" type="text" placeholder="请输入关键词">
+        </div>
+        <div class="select-input">
+            <div class="input-box">
+                <span>附加词</span>
+                <input type="text" placeholder="请输入附加词">
+                <a href="javascript:;" disabled="true" class="weui-dialog__btn jy__btn_primary disabled">添加</a>
+            </div>
+            <div class="input-box right-box">
+                <span>排除词</span>
+                <input type="text" placeholder="请输入排除词">
+                <a href="javascript:;" disabled="true" class="weui-dialog__btn jy__btn_primary disabled">添加</a>
+            </div>
+            <div class="fixed-tip-button">
+                <div class="add-box" onclick="addInput(true)">
+                    <span class="jy-icon-add"></span>
+                    <span>添加附加词</span>
+                </div>
+                <div class="add-box" onclick="addInput(false)">
+                    <span class="jy-icon-add"></span>
+                    <span>添加排除词</span>
+                </div>
+            </div>
+        </div>
+    </div>
+    <div class="content-box">
+        <div class="q-tip">
+            <div class="call-dialog" onclick="openDialog('help')">
+                <i class="iconfont icon-wenhao"></i>&nbsp;疑问解答
+            </div>
+        </div>
+        <div class="input-group" id="include"></div>
+        <div class="input-group" id="exclude"></div>
+    </div>
+    <!--submit-->
+    <div class="fixed-bottom safe-area-inset-bottom">
+        <a href="javascript:;" onclick="deleteKeys()" style="display: none" class="weui-dialog__btn jy__btn_delete">删除 </a>
+        <a href="javascript:;" disabled="true" class="weui-dialog__btn jy__btn_primary submitButton disabled">确认</a>
+    </div>
+    <!--dialog-->
+    <div class="problemPop dialog-container" data-dialog="help" onclick="openDialog('help')" style="display: none;">
+        <div class="problemPopContent" onclick="event.stopPropagation()">
+            <h3>疑问解答</h3>
+            <ul>
+                <li>
+                    <p>例:某公司主营业务为软件系统开发</p>
+                </li>
+                <li>
+                    <h4>关键词:</h4>
+                    <p>目标信息中的关键性词语,如“软件系统”</p>
+                </li>
+                <li>
+                    <h4>附加词:</h4>
+                    <p>与关键词形成一体/组合,便于查找准确信息,如“开发”</p>
+                </li>
+                <li>
+                    <h4>排除词:</h4>
+                    <p>与关键词互斥,可排除一部分非目标信息,如“运维”</p>
+                </li>
+            </ul>
+            <a href="javascript:;" class="weui-dialog__btn knowBtn" onclick="openDialog('help', event)">我知道了</a>
+        </div>
+    </div>
+</div>
+<script src='{{Msg "seo" "cdn"}}/js/jquery-3.2.1.min.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Msg "seo" "cdn"}}/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}'></script>
+{{include "/common/weixin.html"}}
+<script src='{{Msg "seo" "cdn"}}/vipsubscribe/js/addKeyWord.js?v={{Msg "seo" "version"}}'></script>
+{{include "/common/baiducc.html"}}
+</body>
+</html>

+ 49 - 882
src/web/templates/weixin/vipsubscribe/keyWord.html

@@ -7,12 +7,31 @@
           content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
           content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
     <meta http-equiv="X-UA-Compatible" content="ie=edge">
     <title>关键词</title>
     <title>关键词</title>
-    <script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}"></script>
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}">
-    <link rel="stylesheet" href="{{Msg "seo" "cdn"}}/vipsubscribe/css/keyWord.css?v={{Msg "seo" "version"}}">
+    <script src='{{Msg "seo" "cdn"}}/vipsubscribe/js/rem.js?v={{Msg "seo" "version"}}'></script>
+    <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/vipsubscribe/css/base.css?v={{Msg "seo" "version"}}'>
+    <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/vipsubscribe/iconfont/iconfont.css?v={{Msg "seo" "version"}}'>
+    <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/vipsubscribe/css/weui.min.css?v={{Msg "seo" "version"}}'>
+    <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/vipsubscribe/css/keyWord.css?v={{Msg "seo" "version"}}'>
+    <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/swiper/swiper.min.css?v={{Msg "seo" "version"}}'>
+    <script src='{{Msg "seo" "cdn"}}/swiper/swiper.min.js?v={{Msg "seo" "version"}}'></script>
     <style>
     <style>
+        .keyWord .all-classify-column .classify-list .classify-item > div:first-of-type  {
+            line-height: 1;
+            padding: 0.04rem 0;
+        }
+        .keyWord .all-classify-column .classify-list .classify-item .classify-item-l {
+            color: #171826;
+            font-weight: 500;
+        }
+        .keyWord .all-classify-column .classify-list .classify-item .classify-item-r {
+            color: #9B9CA3;
+        }
+        .keyWord .all-classify-column .classify-list .classify-item .classify-item-r .icon-arrow {
+            color: #C0C4CC;
+        }
+        .classifyKeysShow {
+            color: #5F5E64;
+        }
     </style>
     </style>
 </head>
 </head>
 
 
@@ -20,6 +39,11 @@
 <div class="keyWord">
 <div class="keyWord">
     <section class="add-keyword-container" style="display: none;">
     <section class="add-keyword-container" style="display: none;">
         <div>
         <div>
+            <p class="classify-fast" style="display:none;">
+                <i class="jy-icon-add" style="transform: rotate(45deg);"></i>
+                <span>导入免费订阅中的关键词及排除词</span>
+                <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary">快速导入</a>
+            </p>
             <div class="classify">
             <div class="classify">
                 <span class="classify-l">关键词分类</span>
                 <span class="classify-l">关键词分类</span>
                 <span class="classify-r">
                 <span class="classify-r">
@@ -30,22 +54,15 @@
             <p class="classify-tips">
             <p class="classify-tips">
                 关键词分类便于对同类别关键词做整合管理
                 关键词分类便于对同类别关键词做整合管理
             </p>
             </p>
-            <p class="classify-fast" style="display:none;">
-                快速导入
-            </p>
         </div>
         </div>
         <section class="content">
         <section class="content">
             <!-- 添加关键词 -->
             <!-- 添加关键词 -->
             <div class="enter addkeyWord" style="display: none;">
             <div class="enter addkeyWord" style="display: none;">
-                <input type="text" class="enterOne" placeholder="请输入关键词" maxlength="20"/>
-                <!-- <textarea style="resize:none;" rows="1"  class="enterOne" name="" id=""  placeholder="请输入关键词" maxlength="100"></textarea> -->
-                <div class="btnChoose" style="display:none;">
-                    <button onclick="toappendkey(this)">添加 附加词</button>
-                    <button onclick="tonotkey(this)">添加 排除词</button>
-                </div>
-                <div class="btn">
-                    <button onclick="Cancel()" style="width:49%;background:#fff;color:#2cb7ca;opacity: 1;">取消</button>
-                    <button disabled>确认</button>
+                <img alt="暂无关键词" src='{{Msg "seo" "cdn"}}/vipsubscribe/image/nothing.png?v={{Msg "seo" "version"}}'>
+                <span>暂无关键词</span>
+                <div class="addButton">
+                    <span class="jy-icon-add"></span>
+                    <span>添加关键词</span>
                 </div>
                 </div>
             </div>
             </div>
 
 
@@ -54,24 +71,20 @@
                 <ul>
                 <ul>
                 </ul>
                 </ul>
             </div>
             </div>
-
-            <div class="problem">
-                疑问解答 <i class="iconfont icon-wenhao"></i>
-            </div>
         </section>
         </section>
 
 
         <div class="addKeyWord addNewKeyword">
         <div class="addKeyWord addNewKeyword">
             <i class="iconfont icon-tianjia" style="display:none;"></i>
             <i class="iconfont icon-tianjia" style="display:none;"></i>
-            <p> 关键词添加数量:<em style="color: #2cb7ca;" class="kws_count">0 </em>/ 300</p>
+            <p> 关键词添加数量:<em style="color: #2cb7ca;" class="kws_count">0 </em>&nbsp;/ 300</p>
         </div>
         </div>
     </section>
     </section>
     <section class="all-classify-column" style="display: none;">
     <section class="all-classify-column" style="display: none;">
-        <div class="keysexplain"><p> 关键词添加数量:<em style="color: #2cb7ca;" class="kws_count">0 </em> / 300</p></div>
         <ul class="classify-list">
         <ul class="classify-list">
 
 
         </ul>
         </ul>
 
 
         <div class="addKeyWord addNewKeyword">
         <div class="addKeyWord addNewKeyword">
+            <div class="keysexplain"><p> 关键词添加数量:<em style="color: #2cb7ca;" class="kws_count">0 </em>&nbsp;/ 300</p></div>
             <div class="addClassify">新增关键词分类</div>
             <div class="addClassify">新增关键词分类</div>
         </div>
         </div>
     </section>
     </section>
@@ -102,17 +115,16 @@
     </div>
     </div>
     <!-- 关键词分类弹框 -->
     <!-- 关键词分类弹框 -->
     <div class="classify-edit-pop dialog-container">
     <div class="classify-edit-pop dialog-container">
-        <!-- <div class="weui-mask weui-animate-fade-in"></div> -->
         <div class="weui-dialog weui-animate-fade-in">
         <div class="weui-dialog weui-animate-fade-in">
             <div class="weui-dialog__hd">
             <div class="weui-dialog__hd">
                 <strong class="weui-dialog__title">关键词分类</strong>
                 <strong class="weui-dialog__title">关键词分类</strong>
             </div>
             </div>
             <div class="weui-dialog__bd">
             <div class="weui-dialog__bd">
-                <input type="text" class="classify-keyword" maxlength="20" placeholder="输入分类名称">
+                <input type="text" class="classify-keyword" maxlength="20" placeholder="输入关键词分类名称" onBlur="window.scrollTo(0, 0)">
             </div>
             </div>
             <div class="weui-dialog__ft">
             <div class="weui-dialog__ft">
-                <a href="javascript:;" class="dialog__btn dialog__btn_confirm opacity6">确定</a>
-                <a href="javascript:;" class="dialog__btn dialog__btn_cancel">取消</a>
+                <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_default dialog__btn dialog__btn_cancel">取消</a>
+                <a href="javascript:;" style="color: #2ABED1" class="weui-dialog__btn weui-dialog__btn_primary dialog__btn dialog__btn_confirm opacity6">确定</a>
             </div>
             </div>
         </div>
         </div>
     </div>
     </div>
@@ -128,8 +140,8 @@
                 关键词分类有利于关键词做整合管理<br>工作更为高效!
                 关键词分类有利于关键词做整合管理<br>工作更为高效!
             </div>
             </div>
             <div class="weui-dialog__ft">
             <div class="weui-dialog__ft">
-                <a href="javascript:;" class="dialog__btn dialog__btn_confirm">去设置</a>
-                <a href="javascript:;" class="dialog__btn dialog__btn_cancel">取消</a>
+                <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary dialog__btn dialog__btn_confirm">去设置</a>
+                <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_default dialog__btn dialog__btn_cancel">取消</a>
             </div>
             </div>
         </div>
         </div>
     </div>
     </div>
@@ -145,868 +157,23 @@
                 <p style="color:#888;">注:地区与行业分类以超级订阅设置内为准,不做导入。</p>
                 <p style="color:#888;">注:地区与行业分类以超级订阅设置内为准,不做导入。</p>
             </div>
             </div>
             <div class="weui-dialog__ft">
             <div class="weui-dialog__ft">
-                <a href="javascript:;" class="dialog__btn dialog__btn_confirm">确定</a>
-                <a href="javascript:;" class="dialog__btn dialog__btn_cancel">取消</a>
+                <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_default dialog__btn dialog__btn_cancel">取消</a>
+                <a href="javascript:;"  style="color: #2ABED1" class="weui-dialog__btn weui-dialog__btn_primary dialog__btn dialog__btn_confirm">导入</a>
             </div>
             </div>
         </div>
         </div>
     </div>
     </div>
 </div>
 </div>
 
 
-<script src="{{Msg "seo" "cdn"}}/js/jquery-3.2.1.min.js?v={{Msg "seo" "version"}}"></script>
-<script src="{{Msg "seo" "cdn"}}/js/jquery.cookie.js?v={{Msg "seo" "version"}}"></script>
-<script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}"></script>
+<script src='{{Msg "seo" "cdn"}}/js/jquery-3.2.1.min.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Msg "seo" "cdn"}}/js/jquery.cookie.js?v={{Msg "seo" "version"}}'></script>
+<script src='{{Msg "seo" "cdn"}}/vipsubscribe/js/weui.min.js?v={{Msg "seo" "version"}}'></script>
 {{include "/common/weixin.html"}}
 {{include "/common/weixin.html"}}
-<script src="{{Msg "seo" "cdn"}}/wxswordfish/share.js?v={{Msg "seo" "version"}}"></script>
+<script src='{{Msg "seo" "cdn"}}/wxswordfish/share.js?v={{Msg "seo" "version"}}'></script>
 <script>
 <script>
     initShare({{.T.signature}},{{.T.openid}}, 2, "jy_extend",{{.T.nickname}},{{.T.avatar}});
     initShare({{.T.signature}},{{.T.openid}}, 2, "jy_extend",{{.T.nickname}},{{.T.avatar}});
-
-    var a_items = [];//全部数据
-    var a_items_m = [];//全部数据
-    var a_items_str = "";//关键词字符串
-    var classify_name = "";//分类名称
-    var classify_index = 0;//分类索引
-    var kws_name = "";//分类关键词内容
-    var kws_index = 0;//分类关键词索引
-    var kws_count = 0;//关键词个数
-    var modifyFlag = false;//附加词 排除词变动
-    var addition_kws = []; //附加词
-    var not_kws = []; //排除词
-    var classify_arr = [];//分类对象
-    var kws_arr = {};//所有关键词对象
-    var kws_tips = 0;
-    var fastimport = 0;//快速导入功能
-    // 页面状态
-    var pageState = {
-        //是否第一次设置关键词
-        isFirstSetKeyword: true
-    }
-
-    //
-    function Cancel() {
-        if ($(".showKeyWord li").length == 0) {
-            window.history.go(-1)
-        } else {
-            $(".content .addkeyWord").hide();
-            $(".add-keyword-container .addNewKeyword i").show();
-        }
-    }
-
-    //
-    function initSess() {
-        weui.loading();
-        setTimeout(function () {
-            weui.loading().hide();
-            if (window.location.search.indexOf("page=") > -1) {
-                history.replaceState("{id:1}", "", "/front/vipsubscribe/toSetKeyWordPage")
-            } else if (history.state) {
-                window.history.go(-1)
-            }
-        }, 500)
-    }
-
-    //
-    $(function () {
-        var isinitpage = false;
-        $(window).bind("pageshow", function (event) {
-            if (event.originalEvent.persisted) {
-                initpage();
-                isinitpage = true;
-                initSess();
-                reloadFunc();
-            }
-        });
-        if (!isinitpage) {
-            initpage();
-            initSess();
-            reloadFunc();
-        }
-        window.addEventListener('popstate', function (event) {
-            if (!isinitpage) {
-                if (a_items.length == 0) {
-                    window.history.go(-1)
-                }
-                var loading = weui.loading('', {
-                    className: 'custom-classname'
-                })
-                $('.classify-show-pop').hide();
-                $('.classify-edit-pop').hide();
-                //重新加载数据
-                initpage();
-                // 用定时器模拟请求耗时
-                setTimeout(function () {
-                    loading.hide(function () {
-                        console.log('loading has been hidden');
-                    })
-                    // 判断是否是第一次(没有关键词进入)
-                    // 隐藏关键词列表section,显示分类列表section
-                    var isClassifyColumnShow = $('.add-keyword-container').is(':hidden')
-                    if (!isClassifyColumnShow) {
-                        $('.add-keyword-container').hide()
-                        $('.all-classify-column').show()
-                    }
-                }, 500)
-            }
-            isinitpage = false
-        })
-        // 关键词分类 - 去设置按钮点击事件
-        $('.classify-show-pop .dialog__btn_confirm').on('click', function () {
-            $('.classify-show-pop').hide();
-            setTimeout(function () {
-                modalOne();
-            }, 200)
-        })
-        // 关键词分类 - 取消按钮点击事件
-        $('.classify-show-pop .dialog__btn_cancel').on('click', function () {
-            $('.enterOne').focus();
-            $('.classify-show-pop').hide();
-        })
-    })
-
-    //获取数据
-    function initpage() {
-        if (sessionStorage && sessionStorage.kwspage) {
-            if (sessionStorage.addition_kws != undefined) {
-                addition_kws = JSON.parse(sessionStorage.addition_kws);
-            }
-            if (sessionStorage.not_kws != undefined) {
-                not_kws = JSON.parse(sessionStorage.not_kws);
-            }
-            showKorshowC(sessionStorage.kwspage);
-            a_items = JSON.parse(sessionStorage.a_items);
-            a_items_m = JSON.parse(sessionStorage.a_items);
-            a_items_str = sessionStorage.a_items_str;
-            console.log("a_items_str:" + a_items_str)
-            kws_arr = JSON.parse(sessionStorage.kws_arr);
-            classify_name = sessionStorage.classify_name;
-            classify_index = sessionStorage.classify_index;
-            kws_name = sessionStorage.kws_name;
-            kws_index = sessionStorage.kws_index;
-            modifyFlag = true;
-            kws_count = sessionStorage.kws_count;
-            fastimport = parseInt(sessionStorage.fastimport);
-            if (fastimport == 0) {
-                $(".classify-fast").show();
-            } else {
-                $(".classify-fast").hide();
-            }
-            $(".kws_count").text(kws_count);
-            $(".add-keyword-container .addNewKeyword i").hide();
-            toSetKws();
-        } else {
-            //获取用户设置信息类型
-            $.post("/subscribepay/afterPay/getUserInfo", {}, function (r) {
-                if (r.userData) {
-                    var _userData = r.userData;
-                    var _vipData = _userData["o_vipjy"];
-                    var ordinarykc = parseInt(_userData["ordinarykc"])
-                    fastimport = parseInt(_userData["i_vip_fastimport"]);
-                    if (fastimport == 0 && ordinarykc > 0) {
-                        sessionStorage.fastimport = fastimport;
-                        $(".classify-fast").show();
-                    } else {
-                        sessionStorage.fastimport = 1;
-                        $(".classify-fast").hide();
-                    }
-                    modifyFlag = false;
-                    if (_vipData["a_items"] != undefined && _vipData["a_items"].length > 0) {
-                        a_items = _vipData["a_items"]
-                        a_items_m = _vipData["a_items"]
-                        pageState.isFirstSetKeyword = false;
-                        appendHtml(a_items);
-                    } else {
-                        pageState.isFirstSetKeyword = true;
-                    }
-                    if (sessionStorage.a_items_str == undefined) {
-                        a_items_str = items_str(a_items_m);
-                        sessionStorage.a_items_str = a_items_str;//当前数据string
-                    } else {
-                        a_items_str = sessionStorage.a_items_str;
-                    }
-                    hasWords();
-                } else {
-                    pageState.isFirstSetKeyword = true;
-                }
-                showKorshowC(pageState.isFirstSetKeyword);
-            })
-        }
-    }
-
-    //
-    function items_str(_items) {
-        if (_items.length == 0) {
-            return ""
-        }
-        var items_str = "";
-        for (var a = 0; a < _items.length; a++) {
-		    if(_items[a]==null){
-		    	continue;
-		    }
-            items_str += _items[a]["s_item"]
-            var a_key = _items[a]["a_key"]
-            for (var b = 0; b < a_key.length; b++) {
-                if(a_key[b]==null){
-		    		continue;
-                }
-                items_str += a_key[b]["key"].join('');
-                if (a_key[b]["appendkey"] != undefined && a_key[b]["appendkey"] != "") {
-                    items_str += a_key[b]["appendkey"].join('');
-                }
-                if (a_key[b]["notkey"] != undefined && a_key[b]["notkey"] != "") {
-                    items_str += a_key[b]["notkey"].join('');
-                }
-            }
-        }
-        return items_str
-    }
-
-    //强制弹出 提示信息
-    function showMeg() {
-        // 如果是苹果手机,打开时候要设置top
-        var agent = navigator.userAgent.toLowerCase();
-        var dialog = $('.classify-show-pop .weui-dialog')
-        if (/iphone|ipod|ipad|ios/.test(agent)) {
-            dialog.css({'top': '30%'})
-        } else {
-            dialog.css({'top': '50%'})
-        }
-        $('.classify-show-pop').show()
-    }
-
-    //关键词和分类列表切换
-    function showKorshowC(state) {
-        if (state) {
-            $('.add-keyword-container').show()
-            $('.all-classify-column').hide()
-            $(".addClassify").hide();
-        } else {
-            $('.add-keyword-container').hide()
-            $('.all-classify-column').show()
-            $(".addClassify").show();
-            $(".add-keyword-container .addNewKeyword i").hide();
-        }
-    }
-
-    //分类列表
-    function appendHtml(kwsdata) {
-        kws_count = 0;
-        var classifyHtml = '';
-        classify_arr = [];//每次初始化分类对象
-        kws_arr = {};//每次初始化关键词对象
-        for (var i = 0; i < kwsdata.length; i++) {
-		    if(kwsdata[i]==null){
-				classifyHtml += '<li class="classify-item" style="display:none;"></li>';
-				continue;
-            }
-            var s_item = kwsdata[i]["s_item"]
-            if (s_item == "") {
-                s_item = "未分类"
-            }
-            classify_arr.push(s_item);
-            var a_key = kwsdata[i]["a_key"]
-            kws_count += a_key.length;
-            var keystr = '';
-            for (var j = 0; j < a_key.length; j++) {
-	        	if(a_key[j]==null){
-				    continue;
-				}
-                if (keystr != "") {
-                    keystr += "、"
-                }
-                keystr += a_key[j]["key"].join(' ');
-                kws_arr[a_key[j]["key"].join(' ')] = j + "-" + i
-            }
-            classifyHtml += '<li class="classify-item">'
-                + '<div><span class="classify-item-l">' + s_item + '</span>'
-                + '<span class="classify-item-r">'
-                + '<span class="classify-item-detail">关键词' + a_key.length + '个</span>'
-                + '<span class="iconfont icon-arrow"></span>'
-                + '</span></div>'
-                + '<div class="classifyKeysShow">' + keystr + '</div>'
-                + '</li>'
-
-        }
-        if (classifyHtml != "") {
-            $(".classify-list").html(classifyHtml);
-        }
-        $(".kws_count").text(kws_count);
-    }
-
-    //是否有关键词
-    function hasWords() {
-        var showKeyWordLength = $(".showKeyWord ul").find('li').length;
-        var modifyShow = false
-        $(".showKeyWord li").each(function () {
-            if (!$(this).find(".modify").is(":hidden")) {
-                modifyShow = true
-                return false;
-            }
-        })
-        if (showKeyWordLength === 0) {
-            $(".content .addkeyWord").show();
-            $(".add-keyword-container .addNewKeyword i").hide();
-        } else {
-            $(".content .addkeyWord").hide();
-            if (!modifyShow) {
-                $(".add-keyword-container .addNewKeyword i").show();
-            }
-        }
-    }
-
-    //修改关键词内容
-    function toSetKws() {
-        //分类列表进入
-        if (kws_index == -1) {
-            var edhtml = '<input type="text" class="enterOne" placeholder="请输入关键词" maxlength="20">'
-                + '<div class="btnChoose">'
-            if (addition_kws.length > 0) {
-                edhtml += '<button onclick="toappendkey(this)">编辑 附加词<i>(' + addition_kws.length + ')</i></button>'
-            } else {
-                edhtml += '<button onclick="toappendkey(this)">添加 附加词</button>'
-            }
-            if (not_kws.length > 0) {
-                edhtml += '<button onclick="tonotkey(this)">编辑 排除词<i>(' + not_kws.length + ')</i></button>'
-            } else {
-                edhtml += '<button onclick="tonotkey(this)">添加 排除词</button>'
-            }
-            edhtml += '</div>'
-                + '<div class="btn">'
-                + '<button onclick="Cancel()" style="width:49%;background:#fff;color:#2cb7ca;opacity: 1;">取消</button>'
-                + '<button style="opacity: 1;">确认</button>'
-                + '</div>'
-            $(".enter.addkeyWord").html(edhtml);
-            setTimeout(function () {
-                $(".enter.addkeyWord").find("input").val(kws_name)
-                $(".enter.addkeyWord").show();
-            }, 200)
-        }
-        if (classify_name == "") {
-            $(".classify-detail").text("未分类");
-        } else {
-            $(".classify-detail").text(classify_name);
-        }
-        var kwsHtml = '';
-        if (a_items[classify_index] != undefined) {
-            var _keyArr = a_items[classify_index]["a_key"];
-            //未分类 关键词强制提醒标识
-            kws_tips = a_items[classify_index]["i_tips"];
-            if (kws_tips == undefined) {
-                kws_tips = 0;
-            }
-            if (kws_tips == 0 && classify_name.indexOf("未分类") > -1 && window.location.search.indexOf("page=2") < 0) {
-                //第一次进来分类提示
-                showMeg();
-                var param = {};
-                param.classify_index = classify_index;
-                param.kws_tips = 1;
-                $.post("/subscribepay/afterPay/updateUserTips", param, function (r) {
-                    if (r.flag) {
-                        kws_tips = param.kws_tips;
-                        $(".classify").attr("tips", kws_tips);
-                    }
-                })
-            }
-            for (var i = _keyArr.length - 1; i >= 0; i--) {
-				if(_keyArr[i]==null){
-				    continue;
-                }
-                var ak_showClass = 'hide';//是否显示附加词个数
-                var nk_showClass = 'hide';//是否显示排除词个数
-                var ak_remark = '添加';
-                var nk_remark = '添加';
-                var appendkeylth = 0;
-                var notkeylth = 0;
-                kwsHtml += '<li>'
-                if (modifyFlag && i == kws_index) {
-                    kwsHtml += '<div class="one" style="display:none;">'
-                    _keyArr[i]["appendkey"] = addition_kws;
-                    _keyArr[i]["notkey"] = not_kws;
-                } else {
-                    kwsHtml += '<div class="one" style="">'
-                }
-                kwsHtml += '<div>'
-                    + '<span><strong> 关键词:</strong>'
-                    + '<p class="key">' + _keyArr[i]["key"].join(" ") + '</p></span>'
-                if (_keyArr[i]["appendkey"] != undefined && _keyArr[i]["appendkey"].length > 0) {
-                    ak_showClass = "";
-                    ak_remark = '编辑';
-                    appendkeylth = _keyArr[i]["appendkey"].length;
-                    kwsHtml += '<span>'
-                        + '<strong> 附加词:</strong>'
-                        + '<p class="addition" addArr=\''+_keyArr[i]["appendkey"]+'\'>' + _keyArr[i]["appendkey"].join(" ") + '</p>'
-                        + '</span>'
-                }
-                if (_keyArr[i]["notkey"] != undefined && _keyArr[i]["notkey"].length > 0) {
-                    nk_showClass = "";
-                    nk_remark = '编辑';
-                    notkeylth = _keyArr[i]["notkey"].length;
-                    kwsHtml += '<span>'
-                        + '<strong> 排除词:</strong>'
-                        + '<p class="notkey" notArr=\''+_keyArr[i]["notkey"]+'\'>' + _keyArr[i]["notkey"].join(" ") + '</p>'
-                        + '</span>'
-                }
-                var p = kws_arr[_keyArr[i]["key"].join(" ")].split("-")[0]
-                kwsHtml += '</div>'
-                    + '<button class="editKeyWord" onClick="editKeyWord(this)"  dataIndex="' + p + '"><i class="iconfont icon-xiugai"></i> 修改</button>'
-                    + '</div>'
-
-                if (modifyFlag && i == kws_index) {
-                    kwsHtml += '<div class="modify" style="display:block;">'
-                    if (addition_kws.length > 0) {
-                        appendkeylth = addition_kws.length;
-                    }
-                    if (not_kws.length > 0) {
-                        notkeylth = not_kws.length;
-                    }
-                } else {
-                    kwsHtml += '<div class="modify" style="display: none;">'
-                }
-                kwsHtml += '<textarea name="" rows="1" placeholder="" maxlength="20">' + _keyArr[i]["key"].join(" ") + '</textarea>'
-                    + '<button class="addAdjunctWord" onclick="toappendkey(this)">' + ak_remark + ' 附加词 <i class="appendkey ' + ak_showClass + '">(' + appendkeylth + ')</i></button>'
-                    + '<button class="addExclusion" onclick="tonotkey(this)">' + nk_remark + ' 排除词 <i class="notkey ' + nk_showClass + '">(' + notkeylth + ')</i></button>'
-                    + '<button class="deleteKey" onClick="deleteKey(this)">删除</button>'
-                    + '<button class="ascertainKey" dataIndex="' + p + '" onclick="saveK(this)">确定</button>'
-                    + '</div>'
-                    + '</li>'
-            }
-            $(".showKeyWord ul").html(kwsHtml);
-        }
-        hasWords();
-        // 发送请求刷新数据,在ajax回调中执行
-        $('.add-keyword-container').show();
-        $('.all-classify-column').hide();
-        clearSesstion();
-    }
-
-    // 编辑
-   function editKeyWord(th) {
-        kws_name = $.trim($(th).parent().find('.key').text());
-        //当前关键词数组的位置 是数组的总长度-当前所在的位置-1 数组正序索引
-        kws_index = $('.showKeyWord li').length - $(th).parent().parent("li").index() -1;
-        if($(th).prev('div').find(".addition").text()!=""){
-			addition_kws = $(th).prev('div').find(".addition").attr("addArr").split(",")
-        }else{
-            addition_kws = []
-        }
-        if ($(th).prev('div').find(".notkey").text()!=""){
-            not_kws = $(th).prev('div').find(".notkey").attr("notArr").split(",")
-        }else{
-            not_kws = []
-        }
-        $('.enter.addkeyWord').hide()
-        var oSpan = $(th).parent().siblings().children('textarea');
-        var val =  $.trim($(oSpan).val());
-        $(th).parent().hide()
-        $(th).parent().siblings().show().parent().siblings().children('.modify').hide().siblings('.one').show()
-        $(oSpan).val('').focus().val(val) 
-        $(".add-keyword-container .addNewKeyword i").hide()
-    }
-
-    // 编辑删除
-	 function deleteKey(th) {
-        var delFlag = false;
-		var _index = Number($(th).next(".ascertainKey").attr("dataindex"));
-        var jQueryDOM = $(th).parents('li')
-        weui.confirm('确定要删除关键词?', {
-            buttons: [{
-                label: '取消',
-                type: 'default',
-                onClick: function () { console.log('不删了') }
-            }, {
-                label: '确定',
-                type: 'primary',
-                onClick: function () {
-                    if (delFlag) {
-                        return
-                    }
-                    delFlag = true;
-                    if(saveData('DK')){
-                        kws_count -= 1;
-                        $(".kws_count").text(kws_count);
-                        jQueryDOM.remove();
-						if($(".showKeyWord ul").find('li').length==0){
-			                $(".enter.addkeyWord").find(".btnChoose button").eq(0).html('添加 附加词');
-			                $(".enter.addkeyWord").find(".btnChoose button").eq(1).html('添加 排除词');
-			                $(".enter.addkeyWord").find("input").val("");
-						}else{
-							$(".add-keyword-container .addNewKeyword i").show();
-						}
-                        hasWords();
-                        doSessionData('DK',_index);
-			            //把kws_name,kws_index,addition_kws,not_kws初始化
-			            kws_index = 0;
-			            kws_name = "";
-			            addition_kws = [];
-			            not_kws = [];
-                    }else{
-			            weui.toast('无法删除或已删除', {
-			                duration: 2000,
-			                className: 'custom-toast',
-			                callback: function () { console.log('close') }
-			            });
-                    }
-                }
-            }]
-        });
-        console.log('删除关键词:', $(th).parent().find('textarea').val())
-    }
-    //跳转附加词
-    function toappendkey(th) {
-        if (!$('.enter.addkeyWord').is(':hidden')) {
-            if ($.trim($('.addkeyWord input.enterOne').val()) == "") {
-                return
-            }
-            kws_index = -1
-            kws_name = $.trim($('.addkeyWord input.enterOne').val());
-        } else {
-            if ($.trim($(th).parent(".modify").find("textarea").val()) == "") {
-                return
-            }
-            kws_name = $.trim($(th).parent(".modify").find("textarea").val());
-        }
-        history.replaceState("", "", "/front/vipsubscribe/toSetKeyWordPage?page=2431")
-        setSesstion();
-        window.location.href = "/front/vipsubscribe/toSetadditionPage";
-    }
-
-    //
-    function tonotkey(th) {
-        if (!$('.enter.addkeyWord').is(':hidden')) {
-            if ($.trim($('.addkeyWord input.enterOne').val()) == "") {
-                return
-            }
-            kws_index = -1
-            kws_name = $.trim($('.addkeyWord input.enterOne').val());
-        } else {
-            if ($.trim($(th).parent(".modify").find("textarea").val()) == "") {
-                return
-            }
-            kws_name = $.trim($(th).parent(".modify").find("textarea").val());
-        }
-        history.replaceState("", "", "/front/vipsubscribe/toSetKeyWordPage?page=2431")
-        setSesstion();
-        window.location.href = '/front/vipsubscribe/toSetexclusivePage';
-    }
-
-    //保存缓存
-    function setSesstion() {
-        sessionStorage.kwspage = true;//关键词页面标识
-        sessionStorage.kws_name = kws_name;//当前关键词
-        sessionStorage.classify_name = classify_name;//当前分类
-        sessionStorage.kws_index = kws_index;//当前关键词索引
-        sessionStorage.classify_index = classify_index;//当前分类索引
-        sessionStorage.a_items = JSON.stringify(a_items);//当前数据
-        sessionStorage.addition_kws = JSON.stringify(addition_kws);//当前编辑关键词附加词
-        sessionStorage.not_kws = JSON.stringify(not_kws);//当前编辑关键词排除词
-        sessionStorage.kws_arr = JSON.stringify(kws_arr);//当前所有关键词排
-
-        sessionStorage.kws_count = kws_count;//关键词个数
-    }
-
-    //
-    function clearSesstion() {
-        if (!sessionStorage) {
-            return;
-        }
-        sessionStorage.removeItem("kwspage");
-        sessionStorage.removeItem("kws_name");
-        sessionStorage.removeItem("classify_name");
-        sessionStorage.removeItem("kws_index");
-        sessionStorage.removeItem("classify_index");
-        sessionStorage.removeItem("a_items");
-        sessionStorage.removeItem("addition_kws");
-        sessionStorage.removeItem("not_kws");
-        sessionStorage.removeItem("kws_count");
-        sessionStorage.removeItem("kws_arr");
-    }
-
-    //保存关键词
-    function saveK(th) {
-        setTimeout(function () {
-            var $this = $(th);
-            kws_name = $.trim($(th).siblings('textarea').val()).replace(/\s+/g,' ');
-            if (kws_name == "") {
-                weui.toast('您设置的关键词不能为空,请调整后再添加。', {
-                    duration: 2000,
-                    className: 'custom-toast',
-                    callback: function () {
-                        console.log('close')
-                    }
-                });
-                return
-            }
-            var _index = Number($this.attr("dataindex"));
-            if (kws_arr[kws_name] != undefined && kws_arr[kws_name] != (_index + "-" + classify_index)) {
-                weui.toast('您设置的关键词已存在,请调整后再添加。', {
-                    duration: 2000,
-                    className: 'custom-toast',
-                    callback: function () {
-                        console.log('close')
-                    }
-                });
-                return
-            }
-            if (kws_name.length > 20) {
-                weui.toast('关键词不能超过20字', {
-                    duration: 2000,
-                    className: 'custom-toast',
-                    callback: function () {
-                        console.log('close')
-                    }
-                });
-            } else {
-                if (saveData('SK')) {
-                    //$this.attr("dataindex",kws_index);
-                    $this.parent().siblings().find('.key').text(kws_name)
-                    $this.parent().hide().siblings().show()
-                    $(".add-keyword-container .addNewKeyword i").show();
-                    //
-                    doSessionData("", _index);
-                    //把kws_name,kws_index,addition_kws,not_kws初始化
-                    kws_index = 0;
-                    kws_name = "";
-                    addition_kws = [];
-                    not_kws = [];
-                } else {
-                    weui.toast('保存出错,稍后再试', {
-                        duration: 2000,
-                        className: 'custom-toast',
-                        callback: function () {
-                            console.log('close')
-                        }
-                    });
-                }
-            }
-        }, 150)
-    }
-
-    //保存数据
-    function saveData(actionType) {
-        var _flag = false;
-        var param = {};
-        param.pageType = "keyWords";
-        param.classify_index = classify_index;
-        param.classify_name = classify_name;
-        param.kws_index = kws_index;
-        param.kws_name = kws_name;
-        param.actionType = actionType;
-        param.addition_kws = addition_kws;
-        param.not_kws = not_kws;
-        param.kwscount = $(".content .showKeyWord li").length;
-        $.ajax({
-            type: "POST",
-            url: "/subscribepay/afterPay/setUserInfo",
-            data: param,
-            dataType: "json",
-            async: false,
-            traditional: true,
-            success: function (r) {
-                if (r.flag) {
-                    console.log("保存成功")
-                    _flag = r.flag;
-                }
-            }
-        });
-        return _flag
-    }
-
-    //处理缓存数据  根据新索引和原索引操作----
-    function doSessionData(t, index) {
-        //删除关键词
-        if (t != "DK") {
-            if ($(".showKeyWord li:first").find(".editKeyWord").attr("dataIndex") != undefined && index <= Number($(".showKeyWord li:first").find(".editKeyWord").attr("dataIndex"))) {
-                var akws = a_items[classify_index]["a_key"];
-                for (var n in akws) {
-                    var ky = akws[n]["key"].join(" ");
-                    var sy = index + "-" + classify_index
-                    if (kws_arr[ky] == sy) {
-                        delete kws_arr[ky];
-                        break;
-                    }
-                }
-                a_items[classify_index]["a_key"][kws_index]["key"] = kws_name.split(' ')
-                a_items[classify_index]["a_key"][kws_index]["appendkey"] = addition_kws
-                a_items[classify_index]["a_key"][kws_index]["notkey"] = not_kws
-            } else {
-                //新加
-                var karr = {"key": kws_name.split(" "), "appendkey": addition_kws, "notkey": not_kws}
-                if (index == 0) {
-                    var keyM = [];
-                    keyM.push(karr);
-                    var classifyArr = {"s_item": classify_name, "a_key": keyM}
-                    a_items.push(classifyArr);
-                } else {
-                    a_items[classify_index]["a_key"].push(karr);
-                }
-            }
-            kws_arr[kws_name] = index + "-" + classify_index
-        } else {
-            var akws = a_items[classify_index]["a_key"];
-            for (var n in akws) {
-                var ky = akws[n]["key"].join(" ");
-                var sy = index + "-" + classify_index
-                if (kws_arr[ky] == sy) {
-                    delete kws_arr[ky];
-                    break;
-                }
-            }
-            if (a_items[classify_index]["a_key"].length == 1) {
-                a_items.splice(classify_index, 1);
-            } else {
-                a_items[classify_index]["a_key"].splice(kws_index, 1);
-            }
-        }
-        a_items_m = a_items
-        //更新vip首页数据
-        var subVipState = sessionStorage.getItem('sub_vip_state')
-        if (subVipState) {
-            var reqData = JSON.parse(subVipState);
-            reqData.items = a_items_m;
-            sessionStorage.setItem('sub_vip_state', JSON.stringify(reqData))
-        }
-    }
-
-    //
-    function modalOne() {
-        // 如果是苹果手机,打开时候要设置top
-        var agent = navigator.userAgent.toLowerCase();
-        var dialog = $('.classify-edit-pop .weui-dialog')
-        if (/iphone|ipod|ipad|ios/.test(agent)) {
-            dialog.css({'top': '30%'})
-        } else {
-            dialog.css({'top': '50%'})
-        }
-        $('.classify-edit-pop').show()
-        var currentClassifyName = $(".classify").find('.classify-detail').text()
-        if (currentClassifyName.indexOf("未分类") > -1) {
-            currentClassifyName = ""
-        }
-        $('input.classify-keyword').val(currentClassifyName).focus()
-    }
-
-    //
-    function modalTwo() {
-        $(".fastICName").text($(".classify-detail").text());
-        // 如果是苹果手机,打开时候要设置top
-        var agent = navigator.userAgent.toLowerCase();
-        var dialog = $('.classify-fast-pop .weui-dialog')
-        if (/iphone|ipod|ipad|ios/.test(agent)) {
-            dialog.css({'top': '40%'})
-        } else {
-            dialog.css({'top': '50%'})
-        }
-        $('.classify-fast-pop').show();
-    }
-</script>
-<script src="{{Msg "seo" "cdn"}}/vipsubscribe/js/keyWord.js?v={{Msg "seo" "version"}}23"></script>
-<script>
-    window.onunload = function () {//离开页面保存关键词修改
-        if (items_str(a_items_m) != a_items_str) {
-            sessionStorage.removeItem("a_items_str");
-            $.post("/subscribepay/afterPay/modification ", {}, function (r) {
-                if (r && r.mflag) {
-                    console.log("保存成功")
-                }
-            })
-        }
-    }
-
-    // 设置一条空记录,用户第一次进入添加关键词点击确定时候调用
-    function setEmptyHistory() {
-        if (pageState.isFirstSetKeyword) {
-            history.pushState({id: 1}, "", "")
-            pageState.isFirstSetKeyword = false
-        }
-    }
-
-    //
-    $(function () {
-        $(".addNewKeyword div").on('click', function () {
-            //把kws_name,kws_index,addition_kws,not_kws初始化
-            kws_index = 0;
-            kws_name = "";
-            addition_kws = [];
-            not_kws = [];
-            history.pushState({id: 1}, "", "");
-            classify_index = $(".classify-list li").length;
-            var noNameIndex = -1;
-            var noName = "未分类"
-            for (var i = classify_arr.length - 1; i >= 0; i--) {
-                if (classify_arr[i].indexOf("未分类") > -1) {
-                    if (noNameIndex < Number(classify_arr[i].split("未分类")[1])) {
-                        noNameIndex = Number(classify_arr[i].split("未分类")[1])
-                    }
-                }
-            }
-            if (noNameIndex != -1) {
-                noNameIndex = noNameIndex + parseInt(1)
-                noName = noName + noNameIndex
-            }
-            classify_name = noName;
-            // 还原有数据
-            $('.classify .classify-detail').text(noName);
-            $('.add-keyword-container .showKeyWord ul').html('');
-
-            $('.add-keyword-container').show();
-            $('.all-classify-column').hide();
-
-            // 显示添加关键词的输入框
-            $(".enter.addkeyWord").find(".btnChoose button").eq(0).html('添加 附加词');
-            $(".enter.addkeyWord").find(".btnChoose button").eq(1).html('添加 排除词');
-            $(".enter.addkeyWord").find("input").val("");
-            $(".enter.addkeyWord").show();
-            $(".add-keyword-container .addNewKeyword i").hide();
-            setTimeout(function () {
-                modalOne();
-            }, 200)
-        })
-        // 通过判断是那个隐藏来判断是添加关键词还是添加新分类
-        $(".addNewKeyword i").on('click', function () {
-            // 如果是在分类列表点击添加(此时关键词列表是隐藏的)
-            // isClassifyColumnShow = true说明是添加新分类
-            var isClassifyColumnShow = $('.add-keyword-container').is(':hidden');
-            if (isClassifyColumnShow) {
-                history.pushState({}, "", "");
-                classify_index = $(".classify-list li").length;
-                // 还原有数据
-                $('.classify .classify-detail').text('未分类');
-                $('.add-keyword-container .showKeyWord ul').html('');
-            }
-            $(".add-keyword-container .addNewKeyword i").hide();
-            $('.add-keyword-container').show();
-            $('.all-classify-column').hide();
-            //
-            kws_index = 0;
-            modifyFlag = false;
-            addition_kws = [];
-            not_kws = [];
-            // 显示添加关键词的输入框
-            $(".enter.addkeyWord").find(".btnChoose button").eq(0).html('添加 附加词');
-            $(".enter.addkeyWord").find(".btnChoose button").eq(1).html('添加 排除词');
-            $(".enter.addkeyWord").find(".btn button").eq(1).css({"opacity": ".5"});
-            $(".enter.addkeyWord").find(".btn button").eq(1).attr("disabled", true);
-            $(".enter.addkeyWord").find("input").val("");
-            $(".enter.addkeyWord").show();
-            $('.enterOne').focus();
-        })
-
-        // 点击分类目录的每一项,进入对应列表
-        $('.classify-list').on('click', '.classify-item', function () {
-            // 添加一条空历史记录
-            history.pushState({id: 1}, "", "");
-            classify_name = $.trim($(this).find('.classify-item-l').text());
-            classify_index = $(this).index();
-            //把kws_name,kws_index,addition_kws,not_kws初始化
-            kws_index = 0;
-            kws_name = "";
-            addition_kws = [];
-            not_kws = [];
-            //展示此关键词信息
-            $(".add-keyword-container .addNewKeyword i").show();
-            toSetKws();
-        })
-    })
 </script>
 </script>
+<script src='{{Msg "seo" "cdn"}}/vipsubscribe/js/newKeyWord.js?v={{Msg "seo" "version"}}'></script>
 {{include "/common/baiducc.html"}}
 {{include "/common/baiducc.html"}}
 </body>
 </body>
 
 
-</html>
+</html>