初始上传
9
addon/wechat/shop/view/public/css/wx_access_statistics.css
Executable file
@@ -0,0 +1,9 @@
|
||||
.access-statistics .access-api-list{display: flex;justify-content: space-between;padding: 0 15px;}
|
||||
.access-statistics .access-api-item{flex-grow: 1;text-align: center;margin-right: 10px;border: 1px solid #e5e5e5;padding-top: 25px;}
|
||||
.access-statistics .access-api-item:last-of-type{margin-right:0;}
|
||||
.access-statistics .access-api-itme-content{height: 80px; line-height: 80px; font-size: 30px;}
|
||||
.access-statistics .access-api-item-title{position: relative;}
|
||||
.access-statistics .access-api-item-title h3{display: inline-block;}
|
||||
.access-statistics .access-api-vice-content{font-size: 25px;}
|
||||
.layui-fluid .layui-tab-title{margin-top: 0;}
|
||||
.layui-tab-content-time{display: inline-block; height: 40px; margin-left: 15px; line-height: 40px;}
|
||||
101
addon/wechat/shop/view/public/css/wx_fans.css
Executable file
@@ -0,0 +1,101 @@
|
||||
.date-picker-btn.selected {
|
||||
background-color: var(--base-color);
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.search_form {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.search_form .reset {
|
||||
background: transparent;
|
||||
border: none;
|
||||
margin-left: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.search_form .layui-form-mid {
|
||||
display: inline-block;
|
||||
float: unset;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.search_form .layui-btn+.layui-btn {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.layui-table {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.layui-layer-content {
|
||||
padding: 15px;
|
||||
height: auto!important;
|
||||
}
|
||||
|
||||
.align-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.headimg-box {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
display: inline-block;
|
||||
line-height: 50px;
|
||||
text-align: center;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.headimg-box img{
|
||||
max-width: 50px;
|
||||
max-height: 50px;
|
||||
margin: auto;
|
||||
}
|
||||
.layui-table-cell{
|
||||
text-overflow: ellipsis;
|
||||
overflow: initial !important;
|
||||
white-space: initial;
|
||||
}
|
||||
.tag-list{
|
||||
display: inline-block;
|
||||
line-height: 40px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.tag-list span{
|
||||
margin: 2px;
|
||||
padding: 2px 5px;
|
||||
border-radius: 2px;
|
||||
color: #fff;
|
||||
white-space: nowrap;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.progress-layer {
|
||||
width: 400px;
|
||||
background: #fff;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
box-shadow: 1px 1px 50px rgba(0,0,0,.3);
|
||||
padding: 20px 20px;
|
||||
z-index: 100;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.progress-layer h3{
|
||||
line-height: 1;
|
||||
margin-bottom: 15px;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.progress-layer .layui-progress-big, .progress-layer .layui-progress-big .layui-progress-bar{
|
||||
height: 14px;
|
||||
line-height: 14px;
|
||||
}
|
||||
|
||||
.progress-layer .layui-progress-text{
|
||||
line-height: 14px;
|
||||
}
|
||||
742
addon/wechat/shop/view/public/css/wx_follow.css
Executable file
@@ -0,0 +1,742 @@
|
||||
.layui-layout-admin .layui-body .body-content{
|
||||
background: #f8f8f8;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.fourstage-nav .layui-tab-title {
|
||||
background: #fff;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.fourstage-nav .layui-tab-title li {
|
||||
line-height: 48px;
|
||||
margin: 0 15px;
|
||||
}
|
||||
|
||||
button, input, select, textarea {
|
||||
font-family: inherit;
|
||||
font-size: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
input:-moz-placeholder, textarea:-moz-placeholder {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
input::-moz-placeholder, textarea::-moz-placeholder {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
input:-ms-input-placeholder, textarea:-ms-input-placeholder {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
a:-webkit-any-link {
|
||||
color: #000;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
}
|
||||
.reply-opts a:-webkit-any-link{
|
||||
color: var(--base-color);
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
}
|
||||
.reply-opts .delet-color:-webkit-any-link {
|
||||
color: var(--base-color);
|
||||
}
|
||||
|
||||
button {
|
||||
display: inline-block;
|
||||
padding: 0 22px;
|
||||
min-width: 54px;
|
||||
line-height: 2.42857143;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
border-radius: 3px;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.layui-body {
|
||||
overflow-y: auto !important;
|
||||
}
|
||||
|
||||
.hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.page-title h2 {
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
line-height: 1;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.type-menu {
|
||||
text-align: left;
|
||||
height: 50px;
|
||||
line-height: 40px;
|
||||
border-bottom: 1px solid #E0E1E2;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.type-menu li {
|
||||
float: left;
|
||||
margin-right: 24px;
|
||||
line-height: 40px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.replay-info {
|
||||
padding: 15px 0 0;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.weixin-normal {
|
||||
position: relative;
|
||||
margin-top: 15px
|
||||
}
|
||||
|
||||
.replay-info .info {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.replay-info h3 {
|
||||
display: inline-block;
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
line-height: 1;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.replay-info h3:last-child {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.replay-button {
|
||||
float: right;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.replay-button>div {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.replay-button:after {
|
||||
content: '';
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.replay-button>label {
|
||||
background-color: #1AAD19;
|
||||
border-color: #1AAD19;
|
||||
color: #FFFFFF;
|
||||
display: inline-block;
|
||||
min-width: 54px;
|
||||
line-height: 2.42857143;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
border-radius: 3px;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.replay-button .layui-layer-page {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.replay-button .layui-form>.layui-btn {
|
||||
display: block;
|
||||
margin: auto;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.replay-button label>input {
|
||||
position: absolute;
|
||||
left: -9999em;
|
||||
}
|
||||
|
||||
.replay-button .search {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-right: .5em;
|
||||
width: 243px;
|
||||
}
|
||||
|
||||
.replay-button .down {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.replay-button .down button {
|
||||
padding: 14px 12px 10px 12px;
|
||||
min-width: unset;
|
||||
}
|
||||
|
||||
.down .show-menu li a {
|
||||
color: #00A717;
|
||||
}
|
||||
|
||||
.down .show-menu li a {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.rule-group {
|
||||
position: relative;
|
||||
/* border: 1px solid #ccc; */
|
||||
margin-bottom: 20px;
|
||||
border-radius: 2px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.rule-group .rule-meta {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.rule-group .rule-meta:hover h3 .rule-opts a {
|
||||
color: var(--base-color);
|
||||
}
|
||||
|
||||
.rule-group .rule-meta h3 {
|
||||
width: 300px;
|
||||
position: relative;
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
line-height: 1.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.rule-group .rule-meta h3 .rule-opts {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: -65px;
|
||||
font-weight: normal;
|
||||
font-size: 12px;
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
.rule-group .rule-meta h3 .rule-opts a {
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
.rule-group .rule-body {
|
||||
border-top: 1px solid #e5e5e5;
|
||||
margin: 0;
|
||||
/*padding-top: 5px;*/
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.rule-group .rule-body:before, .rule-group .rule-body:after {
|
||||
display: table;
|
||||
content: "";
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
.rule-group .long-dashed {
|
||||
position: absolute;
|
||||
top: 80px;
|
||||
width: 100%;
|
||||
border-bottom: 1px dashed #d7d7d7;
|
||||
}
|
||||
|
||||
.weixin-normal .rule-keywords {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.rule-group .rule-inner {
|
||||
font-size: 12px;
|
||||
padding: 0 10px 5px;
|
||||
}
|
||||
|
||||
.rule-group .rule-inner h4 {
|
||||
color: #000;
|
||||
font-weight: normal;
|
||||
font-size: 14px;
|
||||
margin: 0 0 5px;
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
.rule-group .keyword-containe {
|
||||
padding-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.rule-group .info:empty {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.keyword-list .keyword {
|
||||
position: relative;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
height: 30px;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.keyword .close--circle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.keyword-list .keyword:hover .close--circle {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.close--circle {
|
||||
position: absolute;
|
||||
z-index: 91;
|
||||
top: 5px;
|
||||
right: 10px;
|
||||
font-size: 28px;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.keyword .value {
|
||||
background-color: #fff;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
height: 20px;
|
||||
padding: 4px 10px;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
color: #555555;
|
||||
vertical-align: middle;
|
||||
border-radius: 4px 0 0 4px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.input-append .add-on, .input-prepend .add-on {
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
height: 20px;
|
||||
min-width: 16px;
|
||||
padding: 4px 5px;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
background-color: #eee;
|
||||
border: 1px solid #ccc;
|
||||
margin-left: -4px;
|
||||
border-radius: 0 4px 4px 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.rule-group hr.dashed {
|
||||
border-bottom: 1px dashed #d7d7d7;
|
||||
border-top: none;
|
||||
margin: 0;
|
||||
background-color: rgb(255, 255, 255);
|
||||
}
|
||||
|
||||
.rule-group .opt {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.rule-group .opt a {
|
||||
color: var(--base-color);
|
||||
}
|
||||
|
||||
.weixin-normal .rule-replies {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.rule-group .rule-inner {
|
||||
font-size: 12px;
|
||||
padding: 0 10px 5px;
|
||||
}
|
||||
|
||||
.rule-group .rule-inner h4 {
|
||||
color: #000;
|
||||
font-weight: normal;
|
||||
font-size: 14px;
|
||||
margin: 0 0 5px;
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
.rule-group .reply-container, .keyword-container {
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
.rule-group .info {
|
||||
padding: 5px 0;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.rule-group .info:empty {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ol.reply-list {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.reply-list li, .quick-dropmenu li {
|
||||
position: relative;
|
||||
padding: 8px 90px 8px 5px;
|
||||
list-style: unset;
|
||||
}
|
||||
|
||||
.reply-list .reply-opts a:hover {
|
||||
color: var(--base-color);
|
||||
}
|
||||
|
||||
.reply-cont {
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.reply-summary {
|
||||
display: inline-block;
|
||||
max-width: 360px;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.reply-list .reply-opts, .quick-dropmenu .reply-opts {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 5px;
|
||||
}
|
||||
|
||||
.reply-list li::after, .quick-dropmenu li::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
border-bottom: 1px dashed #d7d7d7;
|
||||
bottom: 0;
|
||||
left: -20px;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.reply-list li:last-child::after, .quick-dropmenu li:last-child::after {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.rule-group .opt .disable-opt {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.badge-success, .label-success {
|
||||
display: inline-block;
|
||||
padding: 2px 4px;
|
||||
font-size: 12px;
|
||||
line-height: 14px;
|
||||
color: #fff;
|
||||
white-space: nowrap;
|
||||
background: #1AAD19;
|
||||
}
|
||||
/***************************************/
|
||||
.misc {
|
||||
height: 45px;
|
||||
}
|
||||
|
||||
.misc>a {
|
||||
display: inline-block;
|
||||
padding: 10px;
|
||||
color: var(--base-color) !important
|
||||
}
|
||||
|
||||
.others {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.others>a {
|
||||
padding: 10px;
|
||||
color: var(--base-color) !important
|
||||
}
|
||||
|
||||
.pull-right {
|
||||
color: #ccc;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
display: none;
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
top: 25px;
|
||||
left: 10px;
|
||||
width: 110px;
|
||||
height: 110px;
|
||||
font-size: 12px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.125);
|
||||
cursor: pointer;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
padding: 10px 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.dropdown-menu li {
|
||||
padding: 0 10px;
|
||||
line-height: 30px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.others:hover .dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.dropdown-menu li:hover {
|
||||
background: var(--base-color);
|
||||
}
|
||||
|
||||
.dropdown-menu li:hover a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.complex-backdrop {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 75px;
|
||||
left: 25px;
|
||||
width: 86%;
|
||||
height: 36.5%;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.complex-content {
|
||||
padding: 6px 10px;
|
||||
}
|
||||
|
||||
.ng.ng-image {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border: none;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.ng {
|
||||
position: relative;
|
||||
vertical-align: top;
|
||||
width: 250px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #eee;
|
||||
background-color: #fff;
|
||||
margin-bottom: 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.picture>img {
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.msg-music-thumb {
|
||||
height: 100px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.msg-music-thumb a {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 1px dashed #F2F2F2;
|
||||
display: block;
|
||||
line-height: 100px;
|
||||
color: var(--base-color);
|
||||
}
|
||||
|
||||
#music .layui-textarea {
|
||||
min-height: 60px;
|
||||
}
|
||||
|
||||
.voice-player {
|
||||
border-radius: 5px;
|
||||
position: relative;
|
||||
border: 1px solid #85ac4c;
|
||||
display: inline-block;
|
||||
width: 90px;
|
||||
height: 25px;
|
||||
padding: 0 6px 0 7px;
|
||||
font-size: 12px !important;
|
||||
line-height: 25px;
|
||||
cursor: pointer;
|
||||
background: #a0ce3d;
|
||||
vertical-align: middle;
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
.voice-player::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
left: -13px;
|
||||
top: 6px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 6px solid transparent;
|
||||
border-right: 6px solid #85ac4c;
|
||||
}
|
||||
|
||||
.voice-player .stop {
|
||||
display: inline-block;
|
||||
color: #fff;
|
||||
text-shadow: 1px 1px 1px #8ab433;
|
||||
}
|
||||
|
||||
.popover .close--circle {
|
||||
z-index: initial;
|
||||
}
|
||||
|
||||
.complex-content .close--circle ,.keyword-list .close--circle {
|
||||
position: absolute;
|
||||
z-index: 91;
|
||||
top: -9px;
|
||||
right: -9px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
font-size: 16px;
|
||||
line-height: 20px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
background: rgba(153, 153, 153, 0.6);
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.voice-player .second {
|
||||
display: none;
|
||||
float: right;
|
||||
font-size: 12px;
|
||||
color: #476600;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.voice-player .play {
|
||||
display: inline-block;
|
||||
width: 17px;
|
||||
height: 20px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.voice-player::after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
left: -12px;
|
||||
top: 6px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 6px solid transparent;
|
||||
border-right: 6px solid #a0ce3d;
|
||||
}
|
||||
/*其他*/
|
||||
.ng .close--circle {
|
||||
top: -9px;
|
||||
right: -9px;
|
||||
}
|
||||
|
||||
.ng .ng-item {
|
||||
border-bottom: 1px solid #eee;
|
||||
overflow: hidden;
|
||||
padding: 5px 9px;
|
||||
}
|
||||
|
||||
.ng .label {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/*图文*/
|
||||
.ng .ng-title {
|
||||
display: inline-block !important;
|
||||
overflow: hidden !important;
|
||||
white-space: nowrap !important;
|
||||
text-overflow: ellipsis !important;
|
||||
line-height: 16px;
|
||||
min-height: 16px;
|
||||
vertical-align: middle;
|
||||
max-width: 180px;
|
||||
}
|
||||
|
||||
a.new-window {
|
||||
color: var(--base-color);
|
||||
}
|
||||
|
||||
.ng .ng-item.view-more {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.ng .ng-item.view-more a {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/*************************************/
|
||||
.rule-container {
|
||||
/*position: absolute;*/
|
||||
/*padding: 5px 10px;*/
|
||||
background-color: #fff;
|
||||
border-radius: 4px;
|
||||
/*box-shadow: 0px 1px 6px 7px rgba(0, 0, 0, 0.1);*/
|
||||
/*border: 1px solid #e5e5e5; */
|
||||
/*height: 230px;*/
|
||||
/*width: 460px;*/
|
||||
}
|
||||
|
||||
.rule-container .add_reply-top{
|
||||
position: absolute;
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
line-height: 0px;/*为了防止ie下出现题型*/
|
||||
border-bottom: 10px solid #fff;
|
||||
border-left: 10px solid rgba(0,0,0,0);
|
||||
border-right: 10px solid rgba(0,0,0,0);
|
||||
right: 55px;
|
||||
top: -10px;
|
||||
}
|
||||
|
||||
.popover>.close--circle {
|
||||
top: -5px;
|
||||
right: -5px;
|
||||
}
|
||||
|
||||
.rule-container .arrow {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
top: 50%;
|
||||
left: -13px;
|
||||
margin-top: -5px;
|
||||
}
|
||||
|
||||
.rule-container .arrow i {
|
||||
color: #e5e5e5;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.layui-card-body, .layui-card-header, .layui-form-label, .layui-form-mid,
|
||||
.layui-form-select, .layui-input-block, .layui-input-inline,
|
||||
.layui-textarea {
|
||||
position: unset;
|
||||
}
|
||||
|
||||
.rule-group-container {
|
||||
min-height: 165px
|
||||
}
|
||||
|
||||
.layui-layer-btn .layui-layer-btn1:hover{
|
||||
color: #333 !important;
|
||||
}
|
||||
.layui-layer-btn a:hover{
|
||||
color: #fff !important;
|
||||
}
|
||||
338
addon/wechat/shop/view/public/css/wx_graphic_message.css
Executable file
@@ -0,0 +1,338 @@
|
||||
#graphic_message {
|
||||
/*width: 760px;*/
|
||||
margin-bottom: 90px;
|
||||
padding: 20px;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
border-radius: 5px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.layui-elem-quote{
|
||||
margin: 0 0 20px;
|
||||
}
|
||||
|
||||
#graphic_message .graphic-message {
|
||||
position: relative;
|
||||
width: 320px;
|
||||
min-height: 310px;
|
||||
float: left;
|
||||
border: 1px solid #C5C5C5;
|
||||
}
|
||||
|
||||
#graphic_message .editor-box {
|
||||
position: relative;
|
||||
margin-top: 80px;
|
||||
width: 380px;
|
||||
min-height: 400px;
|
||||
float: left;
|
||||
padding: 15px;
|
||||
margin-left: 20px;
|
||||
border: 1px solid #d1d1d1;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#graphic_message .arrow, #graphic_message .arrow::after {
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-style: solid;
|
||||
border-width: 7px 7px 6px 0;
|
||||
border-color: transparent #d1d1d1 transparent transparent;
|
||||
position: absolute;
|
||||
left: -7px;
|
||||
top: 19px;
|
||||
}
|
||||
|
||||
#graphic_message .arrow::after {
|
||||
content: "";
|
||||
border-right-color: #f8f8f8;
|
||||
left: 1px;
|
||||
top: -7px;
|
||||
}
|
||||
|
||||
#graphic_message .graphic-message-list {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
#graphic_message .graphic-message-list li {
|
||||
border: 1px solid #AAA;
|
||||
border-top-color: #FFF;
|
||||
border-bottom-color: #DDD;
|
||||
background: #FFF;
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#graphic_message .graphic-message-list li:first-child {
|
||||
border-top-color: #AAA;
|
||||
}
|
||||
|
||||
#graphic_message .graphic-message-list li:last-child {
|
||||
border-bottom-color: #AAA;
|
||||
}
|
||||
|
||||
#graphic_message .graphic-message-list li content {
|
||||
display: block;
|
||||
margin: 10px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
#graphic_message .graphic-message-list li:first-child content {
|
||||
height: 150px;
|
||||
}
|
||||
|
||||
#graphic_message .graphic-message-list li .title {
|
||||
padding-right: 70px;
|
||||
max-height: 48px;
|
||||
word-break: break-all;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#graphic_message .graphic-message-list li:first-child .title {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background: rgba(0, 0, 0, .5);
|
||||
color: #FFF;
|
||||
z-index: 2;
|
||||
line-height: 30px;
|
||||
overflow: hidden;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
max-height: unset;
|
||||
}
|
||||
|
||||
#graphic_message .graphic-message-list li:first-child .title span {
|
||||
padding: 2px 7px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
line-height: 26px;
|
||||
}
|
||||
|
||||
#graphic_message .graphic-message-list li .title span {
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
}
|
||||
|
||||
#graphic_message .graphic-message-list li .action {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
#graphic_message .action span.edit, #graphic_message .action span.delete {
|
||||
background: rgba(0, 0, 0, .4);
|
||||
color: #FFF;
|
||||
font-size: 14px;
|
||||
padding: 0 5px;
|
||||
display: inline-block;
|
||||
margin-left: 1px;
|
||||
}
|
||||
|
||||
#graphic_message .graphic-message-list li content img {
|
||||
max-width: 100%;
|
||||
vertical-align: middle;
|
||||
border: 0;
|
||||
float: right;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background: #EEE;
|
||||
}
|
||||
|
||||
#graphic_message .graphic-message-list li content .empty-img {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
float: right;
|
||||
background: #EEE;
|
||||
}
|
||||
|
||||
#graphic_message .graphic-message-list li:first-child content img {
|
||||
width: 268px;
|
||||
height: auto;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
#graphic_message .graphic-message-list li:first-child content .empty-img {
|
||||
width: 268px;
|
||||
height: auto;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
#graphic_message .graphic-message-list li content .empty-hint {
|
||||
height: 20px;
|
||||
width: 60px;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: -5px;
|
||||
bottom: 0;
|
||||
margin: auto;
|
||||
color: #AAA;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
#graphic_message .graphic-message-list li:first-child content .empty-hint {
|
||||
height: 20px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 7px;
|
||||
margin: auto;
|
||||
color: #AAA;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
#editor {
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#graphic_message .add-graphic-message h4::before {
|
||||
top: -19px;
|
||||
position: absolute;
|
||||
content: ' ';
|
||||
border: 8px solid transparent;
|
||||
border-bottom-width: 10px;
|
||||
border-bottom-color: #ddd;
|
||||
left: 148px;
|
||||
}
|
||||
|
||||
#graphic_message .add-graphic-message h4::after {
|
||||
position: absolute;
|
||||
content: ' ';
|
||||
border: 8px solid transparent;
|
||||
border-bottom-width: 10px;
|
||||
border-bottom-color: #f8f8f8;
|
||||
top: -16px;
|
||||
left: 148px;
|
||||
}
|
||||
|
||||
#graphic_message .add-graphic-message h4 {
|
||||
position: relative;
|
||||
left: 0;
|
||||
top: 0;
|
||||
border-top: 1px solid #ddd;
|
||||
-webkit-box-shadow: 0 0 0 1px #ddd;
|
||||
box-shadow: 0 0 0 1px #ddd;
|
||||
padding: 0 6px 4px 10px;
|
||||
width: 304px;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#graphic_message .add-graphic-message h4 a {
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
font-size: 14px;
|
||||
line-height: 40px;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#graphic_message .layui-input {
|
||||
width: 270px;
|
||||
}
|
||||
|
||||
#graphic_message .editor-box label {
|
||||
display: inline-block;
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
|
||||
#graphic_message .editor-box label .hint {
|
||||
color: #AAA;
|
||||
}
|
||||
|
||||
#graphic_message .editor-box .editor-cover,
|
||||
#graphic_message .editor-box .editor-author,
|
||||
#graphic_message .editor-box .editor-title,
|
||||
#graphic_message .editor-box .editor-content {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#graphic_message .editor-box .editor-cover .editor-msg-label {
|
||||
position: relative;
|
||||
padding-left: 17px;
|
||||
}
|
||||
|
||||
#graphic_message .editor-box .editor-cover #check_show_cover_pic {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 1px;
|
||||
height: 13px;
|
||||
}
|
||||
|
||||
#graphic_message .editor-box .editor-cover .choose-cover {
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
|
||||
#graphic_message .editor-box .editor-cover .choose-cover a {
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#edui1_bottombar.edui-editor-bottomContainer.edui-default {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.bottom-botton {
|
||||
position: absolute;
|
||||
padding: 20px 0;
|
||||
width: auto;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
bottom: -80px;
|
||||
text-align: center;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.loading {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
text-align: center;
|
||||
top: 0;
|
||||
padding-top: 20%;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.loading .layui-icon {
|
||||
font-size: 39px;
|
||||
}
|
||||
|
||||
.show {
|
||||
display: block !important;
|
||||
}
|
||||
.choose-cover-pic{
|
||||
margin-bottom: 10px;
|
||||
width: 160px;
|
||||
height: 160px;
|
||||
text-align: center;
|
||||
line-height: 160px;
|
||||
}
|
||||
.choose-cover-pic img{
|
||||
max-height: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
106
addon/wechat/shop/view/public/css/wx_leavemsg.css
Executable file
@@ -0,0 +1,106 @@
|
||||
.user_info{
|
||||
position: relative;
|
||||
/* margin-left: 80px;
|
||||
margin-right: 215px; */
|
||||
}
|
||||
.message_info{
|
||||
margin-left:80px;
|
||||
margin-right:80px;
|
||||
width:auto;
|
||||
}
|
||||
.user_info .avatar{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left:16px;
|
||||
}
|
||||
.user_info img{
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
|
||||
}
|
||||
|
||||
.layui-table .layui-table-cell{
|
||||
padding:1px;
|
||||
}
|
||||
.layui-table thead tr{
|
||||
display:none;
|
||||
}
|
||||
.message_content{
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
color: #8d8d8d;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
white-space:normal;
|
||||
}
|
||||
.layui-icon-reply-fill:hover{
|
||||
color:#393D49 !important;
|
||||
}
|
||||
.headimg{
|
||||
width:80px;
|
||||
}
|
||||
.message_list{
|
||||
font-size:14px;
|
||||
min-height: 46px;
|
||||
/* border: 1px solid #e7e7eb;
|
||||
padding: 15px;*/
|
||||
}
|
||||
.message_time{
|
||||
margin-top: 0;
|
||||
color: #8d8d8d;
|
||||
}
|
||||
.layui-table tbody tr:hover,.layui-table-click{
|
||||
background-color:#FFF;
|
||||
}
|
||||
.layui-table tbody tr{
|
||||
border:none;
|
||||
}
|
||||
.reply-box{
|
||||
display:none;
|
||||
border-top:1px solid #e7e7eb;
|
||||
padding-top:15px;
|
||||
padding-left:80px;
|
||||
padding-right:80px;
|
||||
}
|
||||
.layui-table-header{
|
||||
border:none;
|
||||
}
|
||||
.reply-button{
|
||||
padding-top:15px;
|
||||
}
|
||||
.reply-button button{
|
||||
min-width:100px;
|
||||
}
|
||||
.userinfo-box-headimg{
|
||||
float: left;
|
||||
width: 230px;
|
||||
height: 230px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.userinfo-box-user-info{
|
||||
overflow: hidden;
|
||||
height: 230px;
|
||||
position: relative;
|
||||
}
|
||||
.userinfo-box-user-info-title{
|
||||
width:20px;
|
||||
margin-right:10px;
|
||||
color: #8d8d8d;
|
||||
}
|
||||
.userinfo-box-user-info-content{
|
||||
font-weight:normal;
|
||||
}
|
||||
.layui-layer-tips{
|
||||
width:auto !important;
|
||||
}
|
||||
.userinfo-box-user-info .layui-card-body{
|
||||
color: #333;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
}
|
||||
.userinfo-box-user-info-header-title{
|
||||
margin-right:200px;
|
||||
}
|
||||
.layui-tab-title{
|
||||
margin-bottom:15px;
|
||||
}
|
||||
280
addon/wechat/shop/view/public/css/wx_material.css
Executable file
@@ -0,0 +1,280 @@
|
||||
.right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.layui-table-page {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.layui-table-cell {
|
||||
height: auto;
|
||||
line-height: 28px;
|
||||
min-height: 28px;
|
||||
}
|
||||
|
||||
/* ----------------------------------GRAPHIC_MESSAGE_LIST----------------------------- */
|
||||
#graphic_message_list + div .layui-table-box .layui-table td {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
#graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-row.grid-demo {
|
||||
border: 1px solid #DEDEDE;
|
||||
border-radius: 5px;
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
#graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-col-md3.article-img span {
|
||||
padding: 2px 4px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-col-md12 {
|
||||
padding: 2px 0;
|
||||
border-bottom: 1px solid #DEDEDE;
|
||||
}
|
||||
|
||||
#graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-col-md12.read-all {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-col-md12:first-child {
|
||||
padding: 7px 0;
|
||||
}
|
||||
|
||||
#graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-col-md12:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
#graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-col-md3 {
|
||||
padding-left: 10px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-col-md3.title {
|
||||
text-align: left;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
#graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-col-md3.title a {
|
||||
color: #0d73f9;
|
||||
}
|
||||
|
||||
#graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-col-md4 {
|
||||
font-size: 13px;
|
||||
text-align: left;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
#graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-col-md4.layui-col-md-offset4 {
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
a.graphic-message-title {
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
/* ----------------------------------MATERIAL_GRAPHIC_MESSAGE_LIST----------------------------- */
|
||||
#marterial_graphic_message_list + div .layui-table-box .layui-table td {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
#marterial_graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-row.grid-demo {
|
||||
border: 1px solid #DEDEDE;
|
||||
border-radius: 5px;
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
#marterial_graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-col-md3.article-img span {
|
||||
background: green;
|
||||
color: #FFF;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
#marterial_graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-col-md12 {
|
||||
padding: 2px 0;
|
||||
border-bottom: 1px solid #DEDEDE;
|
||||
}
|
||||
|
||||
#marterial_graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-col-md12.read-all {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#marterial_graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-col-md12:first-child {
|
||||
padding: 7px 0;
|
||||
}
|
||||
|
||||
#marterial_graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-col-md12:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
#marterial_graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-col-md3 {
|
||||
padding-left: 10px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#marterial_graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-col-md3.title {
|
||||
text-align: left;
|
||||
font-size: 13px;
|
||||
width: 150px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#marterial_graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-col-md3.title a {
|
||||
color: #0d73f9;
|
||||
}
|
||||
|
||||
#marterial_graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-col-md4 {
|
||||
font-size: 13px;
|
||||
text-align: left;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
#marterial_graphic_message_list + div .layui-table-box .layui-table td[data-field='value'] .layui-col-md4.layui-col-md-offset4 {
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
/* ----------------------------------material_text----------------------------- */
|
||||
#material_text div .layui-table-box .layui-table td {
|
||||
padding: 10px 0;
|
||||
}
|
||||
|
||||
#material_text div .layui-table-box .layui-table td[data-field='value'] .layui-row.grid-demo {
|
||||
border: 1px solid #DEDEDE;
|
||||
border-radius: 5px;
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
#material_text div .layui-table-box .layui-table td[data-field='value'] .layui-col-md3.article-img span {
|
||||
background: green;
|
||||
color: #FFF;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
|
||||
#material_text div .layui-table-box .layui-table td[data-field='value'] .layui-col-md12 {
|
||||
padding: 2px 0;
|
||||
border-bottom: 1px solid #DEDEDE;
|
||||
}
|
||||
|
||||
#material_text div .layui-table-box .layui-table td[data-field='value'] .layui-col-md12.read-all {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#material_text div .layui-table-box .layui-table td[data-field='value'] .layui-col-md12:first-child {
|
||||
padding: 7px 0;
|
||||
}
|
||||
|
||||
#material_text div .layui-table-box .layui-table td[data-field='value'] .layui-col-md12:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
#material_text div .layui-table-box .layui-table td[data-field='value'] .layui-col-md3 {
|
||||
padding-left: 10px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#material_text div .layui-table-box .layui-table td[data-field='value'] .layui-col-md3.title {
|
||||
text-align: left;
|
||||
font-size: 13px;
|
||||
width: 150px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#material_text div .layui-table-box .layui-table td[data-field='value'] .layui-col-md3.title a {
|
||||
color: #0d73f9;
|
||||
}
|
||||
|
||||
#material_text div .layui-table-box .layui-table td[data-field='value'] .layui-col-md4 {
|
||||
font-size: 13px;
|
||||
text-align: left;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
#material_text div .layui-table-box .layui-table td[data-field='value'] .layui-col-md4.layui-col-md-offset4 {
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
/* --------------------------------ADD_MATERIAL_TEXT -------------------------------------- */
|
||||
#add_material_text form.layui-form {
|
||||
padding: 15px;
|
||||
padding-right: 50px;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
#add_material_text .input-text-hint {
|
||||
float: right;
|
||||
color: #AAA;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
/* -------------------------------- MATERIAL_IMAGE -----------------------------------------*/
|
||||
#material_image .img-list {
|
||||
padding-top: 26px;
|
||||
text-align: center;
|
||||
margin-bottom: 80px;
|
||||
}
|
||||
|
||||
#material_image .img-list::after {
|
||||
content: '';
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
#material_image .img-list .layui-col-md2 .img {
|
||||
display: inline-block;
|
||||
background: #ccc;
|
||||
width: 110px;
|
||||
height: 110px;
|
||||
text-align: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover !important;
|
||||
background-position: 50% !important;
|
||||
}
|
||||
|
||||
#material_image .buttom-button {
|
||||
position: absolute;
|
||||
bottom: 30px;
|
||||
left: 50%;
|
||||
margin-left: -66px;
|
||||
}
|
||||
|
||||
#material_image .img-list p.layui-elip {
|
||||
max-width: 110px;
|
||||
padding: 5px 20px;
|
||||
}
|
||||
|
||||
#material_image .img-list .img-check-mask {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 11px;
|
||||
right: 11px;
|
||||
bottom: 26px;
|
||||
line-height: 120px;
|
||||
background: rgba(0, 0, 0, .5);
|
||||
}
|
||||
|
||||
#material_image .img-list .img-check-mask[data-show='false'] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#material_image .img-list .layui-icon-ok {
|
||||
color: #FFF;
|
||||
font-size: 36px;
|
||||
}
|
||||
.article-img .bg-color {
|
||||
color: #fff;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
442
addon/wechat/shop/view/public/css/wx_menu.css
Executable file
@@ -0,0 +1,442 @@
|
||||
.hide {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.wx-menu {
|
||||
background: #fff;
|
||||
height: 100%;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.wx-menu-preview {
|
||||
width: 320px;
|
||||
height: 570px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.mobile-preview {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
border: 1px solid #e7e7eb;
|
||||
}
|
||||
|
||||
.mobile-hd {
|
||||
height: 25px;
|
||||
padding-top: 35px;
|
||||
color: #FFF;
|
||||
background: #000;
|
||||
font-size: 16px;
|
||||
background-image: url(../img/mobile_head.png);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mobile-bd {
|
||||
height: 50px;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
border-top: 1px solid #e7e7eb;
|
||||
background: transparent url(../img/mobile_foot_default.png) no-repeat 0 0;
|
||||
}
|
||||
|
||||
.wx-menu-list {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
padding-left: 43px;
|
||||
}
|
||||
|
||||
.wx-menu-item-box {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
line-height: 50px;
|
||||
color: #616161;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.wx-menu-item-box.add-menu {
|
||||
border-left: 1px solid #e7e7eb;
|
||||
}
|
||||
|
||||
.wx-menu-item {
|
||||
border-left: 1px solid #e7e7eb;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.wx-menu-item.active, .wx-sub-menu-item.active {
|
||||
border: 1px solid;
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
.wx-sub-menu-list {
|
||||
position: absolute;
|
||||
bottom: 62px;
|
||||
width: 136px;
|
||||
border: 1px solid #d0d0d0;
|
||||
border-top-width: 0;
|
||||
}
|
||||
|
||||
.wx-sub-menu-list.two, .wx-sub-menu-list.three {
|
||||
width: 90.328px;
|
||||
}
|
||||
|
||||
.wx-sub-menu-list.active-second {
|
||||
left: 134.328px;
|
||||
}
|
||||
|
||||
.wx-sub-menu-list.active-third {
|
||||
left: 226.328px;
|
||||
}
|
||||
|
||||
.wx-sub-menu-item {
|
||||
border-top: 1px solid #d0d0d0;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.wx-menu-item, .wx-sub-menu-item {
|
||||
line-height: 50px;
|
||||
background-color: #fafafa;
|
||||
text-align: center;
|
||||
color: #616161;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.wx-sub-menu-list .wx-sub-menu-item {
|
||||
height: 50px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.wx-menu-form {
|
||||
width: auto;
|
||||
margin-left: 340px;
|
||||
min-height: 570px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.form-editor {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
background-color: #f4f5f9;
|
||||
border: 1px solid #e7e7eb;
|
||||
min-width: 560px;
|
||||
}
|
||||
|
||||
.form-editor .form-hd {
|
||||
padding: 10px 20px;
|
||||
border-bottom: 1px solid #e7e7eb;
|
||||
line-height: 31px;
|
||||
}
|
||||
|
||||
.form-hd-name {
|
||||
float: left;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.form-hd-del {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.form-editor .form-bd {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.item-label {
|
||||
width: 5em;
|
||||
float: left;
|
||||
margin-top: .3em;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.item-group {
|
||||
display: table-cell;
|
||||
vertical-align: top;
|
||||
float: none;
|
||||
width: auto;
|
||||
line-height: 26px;
|
||||
}
|
||||
|
||||
.button-list-null {
|
||||
position: absolute;
|
||||
top: 37%;
|
||||
left: 30%;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.tip {
|
||||
color: #AAA;
|
||||
padding: 2px 2px 2px 0;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.tip.error {
|
||||
color: red;
|
||||
}
|
||||
|
||||
input.error {
|
||||
border-color: red !important;
|
||||
}
|
||||
|
||||
.form-bd-content {
|
||||
background-color: #fff;
|
||||
padding: 0 15px 15px;
|
||||
min-height: 290px;
|
||||
margin: 15px 0 0;
|
||||
border-radius: 7px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.item-group.menu-type {
|
||||
padding-left: 17px;
|
||||
}
|
||||
|
||||
.form-bd-item:first-child {
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.form-bd-item {
|
||||
min-height: 35px;
|
||||
line-height: 35px;
|
||||
padding-bottom: 15px
|
||||
}
|
||||
|
||||
.input.layui-input {
|
||||
display: inline-block !important;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.wechat-media i.layui-icon {
|
||||
color: #AAA;
|
||||
font-size: 16px;
|
||||
padding: 0 7px;
|
||||
}
|
||||
|
||||
.wechat-media .layui-this i.layui-icon {
|
||||
color: var(--base-color);
|
||||
}
|
||||
|
||||
.radio-label input {
|
||||
position: absolute;
|
||||
left: -500vw;
|
||||
top: -500vw;
|
||||
}
|
||||
|
||||
.radio-label i.layui-icon {
|
||||
color: #AAA;
|
||||
}
|
||||
|
||||
.radio-label {
|
||||
margin-right: 15px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
.form-ft {
|
||||
padding-top: 20px;
|
||||
height: 40px;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.form-bd-list {
|
||||
background: #FFF;
|
||||
border-radius: 7px;
|
||||
padding-left: 22px;
|
||||
padding-top: 7px;
|
||||
padding-bottom: 7px;
|
||||
}
|
||||
|
||||
|
||||
.material-library, .add-material {
|
||||
display: inline-block;
|
||||
width: 40%;
|
||||
margin-top: 15px;
|
||||
text-align: center;
|
||||
padding: 50px 0;
|
||||
border: 1px dotted #CCC;
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
.material-library object, .add-material object {
|
||||
width: 36px;
|
||||
}
|
||||
|
||||
.material-library {
|
||||
float: left;
|
||||
margin-left: 5%;
|
||||
}
|
||||
|
||||
.material-library i, .add-material i {
|
||||
background-size: 100% 100%;
|
||||
background-color: #FFF;
|
||||
display: block;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
margin: auto;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.material-library i {
|
||||
background-image: url(../img/folder.png);
|
||||
}
|
||||
|
||||
.add-material i {
|
||||
background-image: url(../img/add.png);
|
||||
}
|
||||
|
||||
.add-material {
|
||||
float: right;
|
||||
margin-right: 5%;
|
||||
}
|
||||
|
||||
.material-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.material-img img {
|
||||
max-width: 70%;
|
||||
max-height: 180px;
|
||||
}
|
||||
|
||||
.del {
|
||||
display: inline-block;
|
||||
vertical-align: bottom;
|
||||
color: var(--base-color);
|
||||
text-decoration: solid;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.menu-content .layui-textarea {
|
||||
height: 170px;
|
||||
resize: none;
|
||||
}
|
||||
|
||||
.material-type {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.material-type span {
|
||||
background: green;
|
||||
color: #FFF;
|
||||
padding: 2px 4px;
|
||||
display: inline-block;
|
||||
width: 50px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.graphic-message-list {
|
||||
width: 400px;
|
||||
border: 1px solid #CCC;
|
||||
border-radius: 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.graphic-message-list .graphic-message-content {
|
||||
border-bottom: 1px solid #DDD;
|
||||
padding: 5px 15px;
|
||||
}
|
||||
|
||||
.graphic-message-list .graphic-message-content:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.graphic-message-list .graphic-message-content .title {
|
||||
display: inline-block;
|
||||
width: 75%;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
.graphic-message-list .graphic-message-content .title a {
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.graphic-message-list .read-all {
|
||||
padding: 5px 15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.graphic-message-list .read-all::after {
|
||||
content: '';
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.graphic-message-list .read-all div {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.graphic-message-list .read-all i {
|
||||
float: right;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.text-message {
|
||||
width: 400px;
|
||||
border: 1px solid #CCC;
|
||||
border-radius: 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.text-message .text-message-content {
|
||||
border-bottom: 1px solid #DDD;
|
||||
padding: 5px 15px;
|
||||
}
|
||||
|
||||
.text-message .text-message-content .title {
|
||||
width: 380px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
vertical-align: middle;
|
||||
border-top: 1px solid #CCC;
|
||||
margin-top: 10px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.text-message .text-message-content .title a {
|
||||
word-wrap: break-word;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 4;
|
||||
-webkit-box-orient: vertical;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.text-message .text-message-content .material-type {
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.wx-menu-item, .wx-menu-item span, .wx-sub-menu-item, .wx-sub-menu-item span {
|
||||
moz-user-select: -moz-none;
|
||||
-moz-user-select: none;
|
||||
-o-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.article-img .bg-color {
|
||||
color: #fff;
|
||||
padding: 2px 4px;
|
||||
}
|
||||
.text-r{
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
border-color: #ccc;
|
||||
resize:none
|
||||
}
|
||||
77
addon/wechat/shop/view/public/css/wx_preview_graphic_message.css
Executable file
@@ -0,0 +1,77 @@
|
||||
.preview-box {
|
||||
max-width: 600px;
|
||||
height: 779px;
|
||||
background: #FFF;
|
||||
margin: 0 auto;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.rich-media-thumb img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.preview-box::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
.preview-box::-webkit-scrollbar-track {
|
||||
background-color: #EEE;
|
||||
}
|
||||
|
||||
.preview-box::-webkit-scrollbar-thumb {
|
||||
background-color: #CCC;
|
||||
}
|
||||
|
||||
.preview-box::-webkit-scrollbar-thumb:hover {
|
||||
background-color: #AAA
|
||||
}
|
||||
|
||||
.preview-box::-webkit-scrollbar-thumb:active {
|
||||
background-color: #AAA
|
||||
}
|
||||
|
||||
.preview-box > img.head {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.preview-box > .graphic-message {
|
||||
position: relative;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
padding-bottom: 150px;
|
||||
}
|
||||
|
||||
.preview-box > .graphic-message > span.time, .preview-box > .graphic-message > span.author {
|
||||
display: inline-block;
|
||||
color: #AAA;
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
.preview-box > .graphic-message > content {
|
||||
display: block;
|
||||
position: relative;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.preview-box > .graphic-message > .graphic-message-content {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.preview-box > .graphic-message a.original-text {
|
||||
position: absolute;
|
||||
bottom: 50px;
|
||||
left: 0px;
|
||||
color: #607fa6;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100% !important;
|
||||
}
|
||||
119
addon/wechat/shop/view/public/css/wx_qrcode.css
Executable file
@@ -0,0 +1,119 @@
|
||||
.qrcode-body {
|
||||
padding: 10px;
|
||||
margin: 10px 0;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
#albumList {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.input-file {
|
||||
position: absolute;
|
||||
top: -10px !important;
|
||||
right: 9px !important;
|
||||
height: 26px !important;
|
||||
width: 94px !important;
|
||||
filter: alpha(opacity:0) !important;
|
||||
opacity: 0 !important;
|
||||
line-height: 26px;
|
||||
}
|
||||
|
||||
.qrcode_button {
|
||||
background-color: #51a351;
|
||||
border: none;
|
||||
margin-top: 15px;
|
||||
width: 100%;
|
||||
color: #FFF;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.check {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
right: -1px;
|
||||
background-color: rgba(0, 0, 0, 0.8);
|
||||
display: none;
|
||||
}
|
||||
|
||||
.check div {
|
||||
width: 60%;
|
||||
height: 30px;
|
||||
margin-left: 20%;
|
||||
border: 1px solid #fff;
|
||||
margin-top: 10%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.check div:hover {
|
||||
background: var(--base-color);
|
||||
border: 1px solid var(--base-color);
|
||||
}
|
||||
|
||||
.check div span {
|
||||
font-size: 15px;
|
||||
color: #fff;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.options-btn {
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
#albumList li {
|
||||
opacity: 1;
|
||||
height: auto;
|
||||
position: relative;
|
||||
float: left;
|
||||
margin-right: 1%;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
line-height: 20px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.img-block {
|
||||
width: 100%;
|
||||
}
|
||||
.qrcode {
|
||||
width: 320px;
|
||||
height: 569px;
|
||||
background: #f5f5f5;
|
||||
position: relative;
|
||||
}
|
||||
.qrcode #imgLogo {
|
||||
max-width: 320px;
|
||||
max-height: 569px;
|
||||
}
|
||||
.tdrag-header {
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
position: absolute;
|
||||
left: 59px; top: 15px;
|
||||
cursor: move;
|
||||
}
|
||||
.tdrag-logo {
|
||||
width: 43px;
|
||||
position: absolute;
|
||||
left: 60px;
|
||||
top: 210px;
|
||||
cursor: move;
|
||||
}
|
||||
.tdrag-code{
|
||||
width: 144px;
|
||||
height: 144px;
|
||||
position: absolute;
|
||||
left: 70px;
|
||||
top: 300px;
|
||||
cursor: move;
|
||||
}
|
||||
.tdrag-name{
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
position: absolute;
|
||||
left: 128px;
|
||||
top: 23px;
|
||||
cursor: move;
|
||||
}
|
||||
811
addon/wechat/shop/view/public/css/wx_replay.css
Executable file
@@ -0,0 +1,811 @@
|
||||
button, input, select, textarea {
|
||||
font-family: inherit;
|
||||
font-size: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
input:-moz-placeholder, textarea:-moz-placeholder {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.empty{width: 100%;margin-top: 15px;text-align: center;padding: 75px 0;}
|
||||
|
||||
input::-moz-placeholder, textarea::-moz-placeholder {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
input:-ms-input-placeholder, textarea:-ms-input-placeholder {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
li {
|
||||
list-style: none;
|
||||
}
|
||||
a:-webkit-any-link {
|
||||
color: #333;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.reply-opts a:-webkit-any-link {
|
||||
color: var(--base-color);
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
}
|
||||
.reply-opts .delet-color:-webkit-any-link {
|
||||
color: #ff3d3d;
|
||||
}
|
||||
.rule-group .rule-meta h3 .rule-opts .delet-color {
|
||||
color: #ff3d3d;
|
||||
}
|
||||
|
||||
button {
|
||||
display: inline-block;
|
||||
padding: 0 22px;
|
||||
min-width: 54px;
|
||||
line-height: 2.42857143;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
border-radius: 3px;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.layui-body {
|
||||
overflow-y: auto !important;
|
||||
}
|
||||
|
||||
.hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.page-title h2 {
|
||||
font-size: 26px;
|
||||
font-weight: 400;
|
||||
line-height: 1;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.type-menu {
|
||||
text-align: left;
|
||||
height: 50px;
|
||||
line-height: 40px;
|
||||
border-bottom: 1px solid #E0E1E2;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.type-menu li {
|
||||
float: left;
|
||||
margin-right: 24px;
|
||||
line-height: 40px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.replay-info {
|
||||
padding: 15px 0 0;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.weixin-normal {
|
||||
margin-top: 15px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.replay-info .info {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.replay-info h3 {
|
||||
display: inline-block;
|
||||
font-size: 20px;
|
||||
font-weight: 400;
|
||||
line-height: 1;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.replay-info h3:last-child {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.replay-button {
|
||||
float: right;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.replay-button > div {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.replay-button:after {
|
||||
content: '';
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.replay-button > label {
|
||||
background-color: #1AAD19;
|
||||
border-color: #1AAD19;
|
||||
color: #FFFFFF;
|
||||
display: inline-block;
|
||||
min-width: 54px;
|
||||
line-height: 2.42857143;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
border-radius: 3px;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.replay-button .layui-layer-page {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.replay-button .layui-form > .layui-btn {
|
||||
display: block;
|
||||
margin: auto;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
.replay-button label > input {
|
||||
position: absolute;
|
||||
left: -9999em;
|
||||
}
|
||||
|
||||
.replay-button .search {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-right: .5em;
|
||||
width: 50px;
|
||||
}
|
||||
|
||||
.replay-button .down {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.replay-button .down button {
|
||||
padding: 14px 12px 10px 12px;
|
||||
min-width: unset;
|
||||
}
|
||||
|
||||
.down .show-menu li a {
|
||||
color: #00A717;
|
||||
}
|
||||
|
||||
.down .show-menu li a {
|
||||
padding: 0 15px;
|
||||
}
|
||||
|
||||
.rule-group {
|
||||
border: 1px solid #e5e5e5;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 2px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.rule-group:hover {
|
||||
border: 1px solid #e5e5e5;
|
||||
}
|
||||
|
||||
.rule-group .rule-meta {
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.rule-group .rule-meta h3 .rule-opts a:hover {
|
||||
color: var(--base-color);
|
||||
}
|
||||
|
||||
.rule-group .rule-meta h3 {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
line-height: 1.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.rule-group .rule-meta h3 .rule-opts {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0px;
|
||||
font-weight: normal;
|
||||
font-size: 12px;
|
||||
color: #ddd;
|
||||
}
|
||||
|
||||
.rule-group .rule-meta h3 .rule-opts a {
|
||||
color: var(--base-color);
|
||||
}
|
||||
|
||||
.rule-group .rule-body {
|
||||
border-top: 1px solid #e5e5e5;
|
||||
/* margin: 0 0 10px;
|
||||
padding-top: 5px; */
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.rule-group .rule-body:before, .rule-group .rule-body:after {
|
||||
display: table;
|
||||
content: "";
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
/* .rule-group .long-dashed {
|
||||
position: absolute;
|
||||
top: 80px;
|
||||
width: 100%;
|
||||
border-bottom: 1px dashed #e5e5e5;
|
||||
} */
|
||||
|
||||
.weixin-normal .rule-keywords {
|
||||
float: left;
|
||||
margin-top:10px;
|
||||
}
|
||||
|
||||
.rule-group .rule-inner {
|
||||
font-size: 12px;
|
||||
padding: 0 10px 5px;
|
||||
}
|
||||
|
||||
.rule-group .rule-inner h4 {
|
||||
color: #000;
|
||||
font-weight: normal;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.rule-group .keyword-containe {
|
||||
padding-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.rule-group .info:empty {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.rule-group .keyword-list, .reply-list {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.keyword-list .keyword {
|
||||
position: relative;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
height: 30px;
|
||||
vertical-align: middle;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.keyword .close--circle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.keyword-list .keyword:hover .close--circle {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.complex-content .close--circle ,.keyword-list .close--circle {
|
||||
position: absolute;
|
||||
z-index: 91;
|
||||
top: -9px;
|
||||
right: -9px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
font-size: 16px;
|
||||
line-height: 20px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
background: rgba(153, 153, 153, 0.6);
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.keyword .value {
|
||||
background-color: #fff;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
height: 20px;
|
||||
padding: 2px 10px;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
color: #333;
|
||||
vertical-align: middle;
|
||||
border-radius: 2px 0 0 2px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
.input-append .add-on, .input-prepend .add-on {
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
height: 20px;
|
||||
min-width: 16px;
|
||||
padding: 2px 7px;
|
||||
font-size: 10px;
|
||||
font-weight: 400;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
background-color: #f7f7f7;
|
||||
border: 1px solid #ccc;
|
||||
margin-left: -4px;
|
||||
border-radius: 0 2px 2px 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* .rule-group hr.dashed {
|
||||
border-bottom: 1px dashed #d7d7d7;
|
||||
border-top: none;
|
||||
margin: 0;
|
||||
background-color: rgb(255, 255, 255);
|
||||
|
||||
} */
|
||||
.layui-textarea {
|
||||
resize:none
|
||||
}
|
||||
.rule-group .opt {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.rule-group .opt a {
|
||||
color: var(--base-color);
|
||||
}
|
||||
.inner-keywordbox a {
|
||||
color: var(--base-color);
|
||||
}
|
||||
|
||||
.weixin-normal .rule-replies {
|
||||
position: static;
|
||||
float: left;
|
||||
border-left: 1px solid #f7f7f7;
|
||||
padding-top: 10px;
|
||||
min-height: 115px;
|
||||
}
|
||||
|
||||
.rule-group .rule-inner {
|
||||
font-size: 12px;
|
||||
padding: 0 10px 5px;
|
||||
}
|
||||
|
||||
.rule-group .rule-inner .inner-keywordbox {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 8px 15px;
|
||||
background: #f7f7f7;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.rule-group .rule-inner h4 {
|
||||
color: #000;
|
||||
font-weight: normal;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.rule-group .reply-container, .keyword-container {
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
.rule-group .info {
|
||||
padding: 5px 0;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.rule-group .info:empty {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ol.reply-list {
|
||||
list-style-type: decimal !important;
|
||||
}
|
||||
|
||||
.reply-list li, .quick-dropmenu li {
|
||||
position: relative;
|
||||
padding: 8px 90px 8px 5px;
|
||||
margin-left: 20px;
|
||||
list-style: unset;
|
||||
}
|
||||
|
||||
.reply-list .reply-opts a:hover {
|
||||
color: var(--base-color);
|
||||
}
|
||||
|
||||
.reply-cont {
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.reply-summary {
|
||||
display: inline-block;
|
||||
max-width: 360px;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.reply-list .reply-opts, .quick-dropmenu .reply-opts {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 5px;
|
||||
}
|
||||
|
||||
.reply-list li::after, .quick-dropmenu li::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
border-bottom: 1px dashed #d7d7d7;
|
||||
bottom: 0;
|
||||
left: -20px;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.reply-list li:last-child::after, .quick-dropmenu li:last-child::after {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.rule-group .opt .disable-opt {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.badge-success, .label-success {
|
||||
display: inline-block;
|
||||
padding: 2px 4px;
|
||||
font-size: 12px;
|
||||
line-height: 14px;
|
||||
color: #fff;
|
||||
white-space: nowrap;
|
||||
background-color: #1AAD19;
|
||||
}
|
||||
|
||||
/***************************************/
|
||||
.misc {
|
||||
height: 45px;
|
||||
}
|
||||
|
||||
.misc > a {
|
||||
display: inline-block;
|
||||
padding: 7px 10px;
|
||||
color: var(--base-color) !important;
|
||||
border-bottom: 2px solid #fff;
|
||||
}
|
||||
|
||||
.misc .active {
|
||||
color: var(--base-color)!important;
|
||||
border-color: var(--base-color);
|
||||
}
|
||||
|
||||
.others {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.others > a {
|
||||
padding: 10px;
|
||||
color: var(--base-color) !important
|
||||
}
|
||||
|
||||
.pull-right {
|
||||
color: #ccc;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
display: none;
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
top: 25px;
|
||||
left: 10px;
|
||||
width: 110px;
|
||||
height: 110px;
|
||||
font-size: 12px;
|
||||
border: 1px solid rgba(0, 0, 0, 0.125);
|
||||
cursor: pointer;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
padding: 10px 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.dropdown-menu li {
|
||||
padding: 0 10px;
|
||||
line-height: 30px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.others:hover .dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.dropdown-menu li:hover {
|
||||
background: var(--base-color);
|
||||
}
|
||||
|
||||
.dropdown-menu li:hover a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.complex-backdrop {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 75px;
|
||||
left: 25px;
|
||||
width: 86%;
|
||||
height: 36.5%;
|
||||
background-color: #fff;
|
||||
/* -webkit-box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.25);
|
||||
box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.25); */
|
||||
/* border:1px solid #E6E6E6; */
|
||||
/* padding-top: 12px; */
|
||||
}
|
||||
|
||||
.layui-layout-admin .layui-body .body-content {
|
||||
background: #f8f8f8;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.fourstage-nav .layui-tab-title {
|
||||
background: #fff;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.fourstage-nav .layui-tab-title li {
|
||||
line-height: 48px;
|
||||
margin: 0 15px;
|
||||
}
|
||||
|
||||
.keyword-content {
|
||||
background: #fff;
|
||||
padding: 15px;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
[lay-id=marterial_graphic_message_list] .article-img .bg-color {
|
||||
background-color: #1aad19 !important;
|
||||
}
|
||||
.layui-table-view{
|
||||
background-color: red!important;
|
||||
}
|
||||
|
||||
.complex-content {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.ng.ng-image {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border: none;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.insert-connect {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 20px;
|
||||
color: var(--base-color) !important;
|
||||
}
|
||||
|
||||
.ng {
|
||||
position: relative;
|
||||
vertical-align: top;
|
||||
width: 250px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #eee;
|
||||
background-color: #fff;
|
||||
margin-bottom: 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.picture > img {
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.msg-music-thumb {
|
||||
height: 100px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.msg-music-thumb a {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 1px dashed #F2F2F2;
|
||||
display: block;
|
||||
line-height: 100px;
|
||||
color: var(--base-color);
|
||||
}
|
||||
|
||||
#music .layui-textarea {
|
||||
min-height: 60px;
|
||||
}
|
||||
|
||||
.voice-player {
|
||||
border-radius: 5px;
|
||||
position: relative;
|
||||
border: 1px solid #85ac4c;
|
||||
display: inline-block;
|
||||
width: 90px;
|
||||
height: 25px;
|
||||
padding: 0 6px 0 7px;
|
||||
font-size: 12px !important;
|
||||
line-height: 25px;
|
||||
cursor: pointer;
|
||||
background: #a0ce3d;
|
||||
vertical-align: middle;
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
.voice-player::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
left: -13px;
|
||||
top: 6px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 6px solid transparent;
|
||||
border-right: 6px solid #85ac4c;
|
||||
}
|
||||
|
||||
.voice-player .stop {
|
||||
display: inline-block;
|
||||
color: #fff;
|
||||
text-shadow: 1px 1px 1px #8ab433;
|
||||
}
|
||||
|
||||
.popover .close--circle {
|
||||
z-index: initial;
|
||||
}
|
||||
|
||||
.close--circle {
|
||||
position: absolute;
|
||||
z-index: 91;
|
||||
top: 5px;
|
||||
right: 10px;
|
||||
font-size: 28px;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.voice-player .second {
|
||||
display: none;
|
||||
float: right;
|
||||
font-size: 12px;
|
||||
color: #476600;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.voice-player .play {
|
||||
display: inline-block;
|
||||
width: 17px;
|
||||
height: 20px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.voice-player::after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
left: -12px;
|
||||
top: 6px;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 6px solid transparent;
|
||||
border-right: 6px solid #a0ce3d;
|
||||
}
|
||||
|
||||
/*其他*/
|
||||
.ng .close--circle {
|
||||
top: -9px;
|
||||
right: -9px;
|
||||
}
|
||||
|
||||
.ng .ng-item {
|
||||
border-bottom: 1px solid #eee;
|
||||
overflow: hidden;
|
||||
padding: 5px 9px;
|
||||
}
|
||||
|
||||
.ng .label {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/*图文*/
|
||||
.ng .ng-title {
|
||||
display: inline-block !important;
|
||||
overflow: hidden !important;
|
||||
white-space: nowrap !important;
|
||||
text-overflow: ellipsis !important;
|
||||
line-height: 16px;
|
||||
min-height: 16px;
|
||||
vertical-align: middle;
|
||||
max-width: 180px;
|
||||
}
|
||||
|
||||
a.new-window {
|
||||
color: var(--base-color);
|
||||
}
|
||||
|
||||
.ng .ng-item.view-more {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.ng .ng-item.view-more a {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/*************************************/
|
||||
|
||||
.rule-container .add_reply-top{
|
||||
position: absolute;
|
||||
width: 0px;
|
||||
height: 0px;
|
||||
line-height: 0px;/*为了防止ie下出现题型*/
|
||||
border-bottom: 10px solid #fff;
|
||||
border-left: 10px solid rgba(0,0,0,0);
|
||||
border-right: 10px solid rgba(0,0,0,0);
|
||||
right: 55px;
|
||||
top: -10px;
|
||||
}
|
||||
|
||||
.popover > .close--circle {
|
||||
top: -5px;
|
||||
right: -5px;
|
||||
}
|
||||
|
||||
.rule-container .arrow {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
top: 50%;
|
||||
left: -13px;
|
||||
margin-top: -5px;
|
||||
}
|
||||
|
||||
.rule-container .arrow i {
|
||||
color: #e5e5e5;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.rule-group-container {
|
||||
position: relative;
|
||||
min-height: 165px
|
||||
}
|
||||
|
||||
.search {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
top: 1px;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.layui-form-item .layui-textarea {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.layui-form.hyperlink {
|
||||
padding: 10px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.layui-form.hyperlink .layui-form-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.layui-layout-shop .fourstage-nav ul li.layui-this:after {
|
||||
border: none !important;
|
||||
width: 100%;
|
||||
height: 4px;
|
||||
background-color: var(--base-color);
|
||||
border-radius: 30px !important;
|
||||
position: absolute;
|
||||
top: 40px;
|
||||
}
|
||||
BIN
addon/wechat/shop/view/public/img/add.png
Executable file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
addon/wechat/shop/view/public/img/administration.png
Executable file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
addon/wechat/shop/view/public/img/appmsg.png
Executable file
|
After Width: | Height: | Size: 29 KiB |
BIN
addon/wechat/shop/view/public/img/appmsg1.png
Executable file
|
After Width: | Height: | Size: 16 KiB |
BIN
addon/wechat/shop/view/public/img/appmsg2.png
Executable file
|
After Width: | Height: | Size: 95 KiB |
BIN
addon/wechat/shop/view/public/img/arrow.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
addon/wechat/shop/view/public/img/article-msg.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
addon/wechat/shop/view/public/img/audio.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
addon/wechat/shop/view/public/img/base_icon.png
Executable file
|
After Width: | Height: | Size: 93 KiB |
BIN
addon/wechat/shop/view/public/img/cart.png
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
addon/wechat/shop/view/public/img/check_qrcode1.png
Executable file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
addon/wechat/shop/view/public/img/complete.png
Executable file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
addon/wechat/shop/view/public/img/config_fans_icon.png
Executable file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
addon/wechat/shop/view/public/img/config_info.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
addon/wechat/shop/view/public/img/config_leavemsg_icon.png
Executable file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
addon/wechat/shop/view/public/img/config_mass_icon.png
Executable file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
addon/wechat/shop/view/public/img/config_material_icon.png
Executable file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
addon/wechat/shop/view/public/img/config_menu_icon.png
Executable file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
addon/wechat/shop/view/public/img/config_message_icon.png
Executable file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
addon/wechat/shop/view/public/img/config_qrcode_icon.png
Executable file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
addon/wechat/shop/view/public/img/config_replay_icon.png
Executable file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
addon/wechat/shop/view/public/img/config_share_icon.png
Executable file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
addon/wechat/shop/view/public/img/config_wechat_icon.png
Executable file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
addon/wechat/shop/view/public/img/edition.png
Executable file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
addon/wechat/shop/view/public/img/flow/arrow.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
addon/wechat/shop/view/public/img/flow/complete.png
Executable file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
addon/wechat/shop/view/public/img/flow/config_info.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
addon/wechat/shop/view/public/img/flow/edition.png
Executable file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
addon/wechat/shop/view/public/img/flow/public_number.png
Executable file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
addon/wechat/shop/view/public/img/flow/register.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
addon/wechat/shop/view/public/img/folder.png
Executable file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
addon/wechat/shop/view/public/img/icon-header.png
Executable file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
addon/wechat/shop/view/public/img/icon.png
Executable file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
addon/wechat/shop/view/public/img/icon_audio_player.png
Executable file
|
After Width: | Height: | Size: 19 KiB |
BIN
addon/wechat/shop/view/public/img/index_author.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
addon/wechat/shop/view/public/img/index_weixin.png
Executable file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
addon/wechat/shop/view/public/img/material_delete.png
Executable file
|
After Width: | Height: | Size: 1003 B |
BIN
addon/wechat/shop/view/public/img/material_download.png
Executable file
|
After Width: | Height: | Size: 15 KiB |
BIN
addon/wechat/shop/view/public/img/material_edit.png
Executable file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
addon/wechat/shop/view/public/img/menu_icon/menu_wchat_selected.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
addon/wechat/shop/view/public/img/menu_icon/menu_wechat.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
addon/wechat/shop/view/public/img/menu_icon/wechat_icon.png
Executable file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
addon/wechat/shop/view/public/img/menu_icon/wechat_icon_new.png
Executable file
|
After Width: | Height: | Size: 829 B |
BIN
addon/wechat/shop/view/public/img/menu_icon/wechat_icon_select.png
Executable file
|
After Width: | Height: | Size: 694 B |
BIN
addon/wechat/shop/view/public/img/menu_preview.png
Executable file
|
After Width: | Height: | Size: 21 KiB |
BIN
addon/wechat/shop/view/public/img/mobile_foot_default.png
Executable file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
addon/wechat/shop/view/public/img/mobile_head.png
Executable file
|
After Width: | Height: | Size: 12 KiB |
BIN
addon/wechat/shop/view/public/img/picture.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
addon/wechat/shop/view/public/img/public_number.png
Executable file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
addon/wechat/shop/view/public/img/register.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
addon/wechat/shop/view/public/img/set_up.png
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
addon/wechat/shop/view/public/img/small_procedures.png
Executable file
|
After Width: | Height: | Size: 667 B |
BIN
addon/wechat/shop/view/public/img/template_qrcode.png
Executable file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
addon/wechat/shop/view/public/img/video.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
addon/wechat/shop/view/public/img/wechat.png
Executable file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
addon/wechat/shop/view/public/img/wx_feature_set.png
Executable file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
addon/wechat/shop/view/public/img/wx_menu_icos.png
Executable file
|
After Width: | Height: | Size: 228 B |
16
addon/wechat/shop/view/public/js/common.js
Executable file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* 素材库
|
||||
* @param type
|
||||
*/
|
||||
function material(type) {
|
||||
layui.use(['layer'], function () {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "素材库",
|
||||
area: ['890px', '700px'],
|
||||
fixed: false, //不固定
|
||||
maxmin: false,
|
||||
content: ns.url("wechat://shop/material/material", {request_mode: 'iframe', type: type}),
|
||||
})
|
||||
})
|
||||
}
|
||||
475
addon/wechat/shop/view/public/js/wx_default.js
Executable file
@@ -0,0 +1,475 @@
|
||||
WxReplay = function (limit = 0, limits = []) {
|
||||
var _this = this;
|
||||
_this._dom = null;
|
||||
_this.eventFlg = true;
|
||||
|
||||
_this.listCount = 0;
|
||||
_this.limit = limit == false ? 15 : limit;
|
||||
_this.limits = limit == false ? [15, 20, 50] : limits;
|
||||
_this.page = 1;
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取关注后回复列表
|
||||
*/
|
||||
WxReplay.prototype.getData = function (d) {
|
||||
var _this = d._this;
|
||||
var page = _this.page;
|
||||
var limit = _this.limit;
|
||||
var rule_type = d.rule_type;
|
||||
_this.sendAjax({
|
||||
url: ns.url('wechat://shop/replay/default'),
|
||||
async: false,
|
||||
data: {"page": page, "limit": limit, "rule_type": rule_type},
|
||||
success: function (data) {
|
||||
_this.listCount = data.data.count;
|
||||
_this.aD.addReolayList(data.data);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* layui分页
|
||||
*/
|
||||
WxReplay.prototype.pageInit = function (d) {
|
||||
var _this = d._this;
|
||||
layui.use('laypage', function () {
|
||||
var laypage = layui.laypage;
|
||||
var page = 1;
|
||||
var hash_arr = getHashArr();
|
||||
$.each(hash_arr,function(index, itemobj){
|
||||
var item_arr = itemobj.split("=");
|
||||
if(item_arr.length == 2){
|
||||
switch(item_arr[0]){
|
||||
case "page":
|
||||
page = item_arr[1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
laypage.render({
|
||||
elem: 'list_page',
|
||||
count: _this.listCount,
|
||||
limit: _this.limit,
|
||||
limits: _this.limits,
|
||||
layout: ns.get_page_param(),
|
||||
curr: page, //获取起始页
|
||||
jump: function (obj, first) {
|
||||
_this.limit = obj.limit;
|
||||
if (!first) {
|
||||
_this.page = obj.curr;
|
||||
_this.getData({_this: _this, "rule_type": 'KEYWORDS'});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 事件操作
|
||||
* @param e 事件对象
|
||||
*/
|
||||
WxReplay.prototype.e = function (e) {
|
||||
try {
|
||||
//_this为replay对象 //_dom 为元素dom
|
||||
var _this = e.data._this;
|
||||
_this._dom = e.target;
|
||||
var eventFlg = _this.eventFlg;
|
||||
if (!eventFlg) return;
|
||||
_this.eventFlg = false;
|
||||
var _dom = e.target;
|
||||
var dataEvent = $(_dom).attr("nc-event");
|
||||
var dataAction = $(_dom).attr("nc-action");
|
||||
var type = e.type;
|
||||
if (dataEvent != type) {
|
||||
if ($(_dom).attr("nc-event2") != type) {
|
||||
_this.eventFlg = true;
|
||||
return;
|
||||
} else {
|
||||
dataEvent = $(_dom).attr("nc-event2");
|
||||
dataAction = $(_dom).attr("nc-action2");
|
||||
}
|
||||
}
|
||||
|
||||
var eventObj = null;
|
||||
switch (dataEvent) {
|
||||
case "click":
|
||||
eventObj = _this.clickEvent;
|
||||
break;
|
||||
case "mouseenter" :
|
||||
eventObj = _this.mouseenterEvent;
|
||||
break;
|
||||
case "mouseleave" :
|
||||
eventObj = _this.mouseleaveEvent;
|
||||
break;
|
||||
}
|
||||
if (eventObj) {
|
||||
|
||||
_this.evalFun(eventObj, dataAction, {"_this": _this});
|
||||
|
||||
_this.eventFlg = true;
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
_this.eventFlg = true;
|
||||
console.log(e);
|
||||
}
|
||||
};
|
||||
/**
|
||||
* 点击事件
|
||||
*/
|
||||
WxReplay.prototype.clickEvent = {
|
||||
click: function () {
|
||||
|
||||
},
|
||||
//添加一条回复
|
||||
addReply: function (d) {
|
||||
var _this = d._this;
|
||||
var _dom = _this._dom;
|
||||
var rule_id = $(_dom).parents(".rule-group").attr("data-rule_id");
|
||||
var key_id = $(_dom).attr('data-key_id');
|
||||
var reply_content = $(_dom).attr('reply_content');
|
||||
|
||||
var index = layer.open({
|
||||
type: 1,
|
||||
title: "设置默认回复",
|
||||
area: ['450px'],
|
||||
offset: "auto",
|
||||
content: $("#add_reply").html(),
|
||||
success: function (layero) {
|
||||
$(layero).find("input[name='rule_id']").val(rule_id);
|
||||
$(layero).find("textarea[name='reply_content']").val("");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//编辑回复
|
||||
editReply: function (d) {
|
||||
var _this = d._this;
|
||||
var _dom = _this._dom;
|
||||
var rule_id = $(_dom).parents(".rule-group").attr("data-rule_id");
|
||||
var key_id = $(_dom).attr('data-key_id');
|
||||
var reply_content = $(_dom).attr('reply_content');
|
||||
var request_type = $(_dom).attr('type');
|
||||
$("#hidden_reply_type").val(request_type);
|
||||
|
||||
var index = layer.open({
|
||||
type: 1,
|
||||
title: "修改默认回复",
|
||||
area: ['450px'],
|
||||
offset: "auto",
|
||||
content: $("#add_reply").html(),
|
||||
success: function (layero) {
|
||||
$(layero).find("input[name='rule_id']").val(rule_id);
|
||||
$(layero).find("input[name='key_id']").val(key_id);
|
||||
$(layero).find("textarea[name='reply_content']").val(reply_content);
|
||||
|
||||
$(".voice").css("display", "none");
|
||||
$(".voice").next("span").css("display", "none");
|
||||
|
||||
if (request_type == 'music') {
|
||||
var active_pic = '';
|
||||
active_pic += '<div class="voice-wrapper" data-voice-src="' + reply_content + '">';
|
||||
active_pic += '<span class="voice-player">';
|
||||
active_pic += '<a href="javascript:;" class="close--circle js-delete-complex">×</a>';
|
||||
active_pic += '<span class="stop">点击播放</span>';
|
||||
active_pic += '<span class="second"></span>';
|
||||
active_pic += '<i class="play" style="display:none;"></i>';
|
||||
active_pic += '</span>';
|
||||
active_pic += '</div>';
|
||||
$(layero).find(".complex-content").html(active_pic);
|
||||
$('.complex-backdrop').css("display", "block");
|
||||
|
||||
} else if (request_type == 'other') {
|
||||
var active_pic = '';
|
||||
active_pic += '<div class="ng ng-single">';
|
||||
active_pic += '<a href="javascript:;" class="close--circle js-delete-complex">×</a>';
|
||||
active_pic += '<div class="ng-item">';
|
||||
active_pic += '<a href="h" target="_blank" class="new-window" title="' + reply_content + '"><span class="label label-success">' + reply_content + '</span></a>';
|
||||
active_pic += '</div>';
|
||||
active_pic += '<div class="ng-item view-more">';
|
||||
active_pic += '<a href="" target="_blank" class="clearfix new-window">';
|
||||
active_pic += '<span class="pull-left">阅读全文</span>';
|
||||
active_pic += '<span class="pull-right">></span>';
|
||||
active_pic += '</a>';
|
||||
active_pic += '</div>';
|
||||
active_pic += '</div>';
|
||||
|
||||
$(layero).find(".complex-content").html(active_pic);
|
||||
$('.complex-backdrop').css("display", "block");
|
||||
} else if (request_type == 'articles') {
|
||||
var active_pic = '';
|
||||
active_pic += '<div class="ng ng-single">';
|
||||
active_pic += '<a href="javascript:;" class="close--circle js-delete-complex">×</a>';
|
||||
active_pic += '<div class="ng-item">';
|
||||
active_pic += '<span class="label label-success">图 文</span>';
|
||||
active_pic += '<div class="ng-title">';
|
||||
active_pic += '<a href="" target="_blank" class="new-window" title="rgrg">' + reply_content + '</a>';
|
||||
active_pic += '</div>';
|
||||
active_pic += '</div>';
|
||||
active_pic += '<div class="ng-item view-more">';
|
||||
active_pic += '<a href="" target="_blank" class="clearfix new-window">';
|
||||
active_pic += '<span class="pull-left">阅读全文</span>';
|
||||
active_pic += '<span class="pull-right">></span>';
|
||||
active_pic += '</a>';
|
||||
active_pic += '</div>';
|
||||
active_pic += '</div>';
|
||||
|
||||
$(layero).find(".complex-content").html(active_pic);
|
||||
$('.complex-backdrop').css("display", "block");
|
||||
} else {
|
||||
$('.complex-backdrop').css("display", "none");
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//删除回复
|
||||
delReply: function (d) {
|
||||
var _this = d._this;
|
||||
var _dom = _this._dom;
|
||||
var rule_id = $(_dom).parents(".rule-group").attr("data-rule_id");
|
||||
var key_id = $(_dom).attr("data-key_id");
|
||||
var flag = true;
|
||||
var index = layer.open({
|
||||
type: 1,
|
||||
title: "是否删除该条回复",
|
||||
offset: "auto",
|
||||
content: '删除后,关注该公众号的用户将不再接收该回复,确定删除?'
|
||||
, btn: ['确定', '取消']
|
||||
, yes: function (index, layero) {
|
||||
if (!flag) return;
|
||||
flag = false;
|
||||
_this.sendAjax({
|
||||
url: ns.url('wechat://shop/replay/deleteReply'),
|
||||
data: {"rule_id": rule_id, "key_id": key_id},
|
||||
success: function (res) {
|
||||
layer.msg(res.message);
|
||||
if (res.code >= 0) {
|
||||
listenerHash(); // 刷新页面
|
||||
layer.closeAll();
|
||||
}
|
||||
}
|
||||
});
|
||||
flag = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//音乐
|
||||
music: function (d) {
|
||||
$("#hidden_reply_type").val('music');
|
||||
$(".complex-backdrop").css("display", "none"); //清空文本框
|
||||
$("textarea[name='reply_content']").val("");
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: '音乐素材',
|
||||
area: ['652px', "380px"],
|
||||
offset: "auto",
|
||||
content: $("#music"),
|
||||
success: function (layero) {
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* 移入事件
|
||||
*/
|
||||
|
||||
WxReplay.prototype.mouseenterEvent = {};
|
||||
|
||||
/**
|
||||
* 移出事件
|
||||
*/
|
||||
WxReplay.prototype.mouseleaveEvent = {};
|
||||
|
||||
/**
|
||||
* 执行传过来的方法
|
||||
* @param eventObj
|
||||
* @param funcName
|
||||
* @param d
|
||||
*/
|
||||
WxReplay.prototype.evalFun = function (eventObj, funcName, d = {}) {
|
||||
for (i in eventObj) {
|
||||
if (i == funcName) {
|
||||
eval(eventObj[i](d));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 元素操作 da(documentAction)
|
||||
*/
|
||||
WxReplay.prototype.aD = {
|
||||
|
||||
addReolayList: function (d) {
|
||||
var data = d.list;
|
||||
var html = '';
|
||||
if (data.length) {
|
||||
$.each(data, function (i) {
|
||||
var d = data[i];
|
||||
html += '<div class="rule-group layui-row" data-rule_id="' + d.rule_id + '">';
|
||||
html += '<div class="rule-meta bg-color-light-9">';
|
||||
html += '<h3><span class="rule-name">规则: 默认回复</span></h3>';
|
||||
html += '</div>';
|
||||
html += '<div class="rule-body">';
|
||||
html += '</div>';
|
||||
html += '<div class="rule-replies layui-col-md12">';
|
||||
html += '<div class="rule-inner">';
|
||||
// html += '<h4>自动回复: <span class="send-method"> </span></h4>';
|
||||
html += '<div class="reply-container">';
|
||||
|
||||
if (d.replay_list.length <= 0) {
|
||||
html += '<div class="info">还没有任何回复!</div>';
|
||||
} else {
|
||||
html += '<div class="info"></div>';
|
||||
}
|
||||
html += '<ol class="reply-list">';
|
||||
|
||||
if (d.replay_list.length > 0) {
|
||||
for (var j in d.replay_list) {
|
||||
|
||||
html += '<li>';//回复列表
|
||||
html += '<div class="reply-cont">';
|
||||
html += '<div class="reply-summary">';
|
||||
if (d.replay_list[j].type == 'text') {
|
||||
html += '<span class="label label-success">文本</span> ';
|
||||
html += '<span class="label">' + d.replay_list[j].reply_content + '</span>';
|
||||
} else if (d.replay_list[j].type == 'music') {
|
||||
html += '<div class="voice-wrapper" data-voice-src="' + d.replay_list[j].reply_content + '">';
|
||||
html += '<span class="voice-player">';
|
||||
html += '<span class="stop">点击播放</span>';
|
||||
html += '<span class="second" style="display: block;"></span>';
|
||||
html += '<i class="play" style="display:none;"></i>';
|
||||
html += '</span>';
|
||||
html += '</div>';
|
||||
} else if (d.replay_list[j].type == 'other') {
|
||||
html += '<span class="label label-success">' + d.replay_list[j].reply_content + '</span> ';
|
||||
html += '<span class="label">' + d.replay_list[j].reply_content + '</span>';
|
||||
} else if (d.replay_list[j].type == 'articles') {
|
||||
html += '<span class="label label-success">图文</span> ';
|
||||
html += '<span class="label">' + d.replay_list[j].reply_content + '</span>';
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '<div class="reply-opts">';
|
||||
var reply_content_to = d.replay_list[j].reply_content.replace(/"/g, "'");
|
||||
html += '<a class="js-edit-it js-replay" href="javascript:;" reply_content="' + reply_content_to + '" data-key_id="' + j + '" type="' + d.replay_list[j].type + '" nc-event="click" nc-action="editReply">编辑</a> - ';
|
||||
html += '<a class="js-delete-it js-replay delet-color" href="javascript:;" data-key_id="' + j + '" nc-event="click" nc-action="delReply">删除</a>';
|
||||
html += '</div>';
|
||||
html += '</li>';
|
||||
|
||||
}
|
||||
}
|
||||
html += '</ol>';
|
||||
html += '</div>';
|
||||
// html += '<hr class="dashed">';
|
||||
html += '<div class="opt">';
|
||||
if (d.replay_list.length < 1) {
|
||||
html += '<a class="js-add-reply add-reply-menu js-replay" href="javascript:;" nc-event="click" nc-action="addReply">设置回复</a>';
|
||||
} else {
|
||||
html += '<span class="disable-opt hide">最多一条回复</span>';
|
||||
}
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
});
|
||||
} else {
|
||||
html += '<div class="rule-group layui-row" data-rule_id="">';
|
||||
html += '<div class="rule-meta bg-color-light-9">';
|
||||
html += '<h3><span class="rule-name">规则: 默认回复</span></h3>';//title
|
||||
html += '</div>';
|
||||
html += '<div class="rule-body">';
|
||||
html += '</div>';
|
||||
html += '<div class="rule-replies layui-col-md12">';
|
||||
html += '<div class="rule-inner">';
|
||||
// html += '<h4>自动回复: <span class="send-method"> </span></h4>';
|
||||
html += '<div class="reply-container">';
|
||||
html += '<div class="info">还没有任何回复!</div>';
|
||||
html += '</div>';
|
||||
html += '<hr class="dashed">';
|
||||
html += '<div class="opt">';
|
||||
html += '<a class="js-add-reply add-reply-menu js-replay" href="javascript:;" nc-event="click" nc-action="addReply">设置回复</a>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
$("#load_rule_list").html(html);
|
||||
}
|
||||
};
|
||||
|
||||
WxReplay.prototype.sendAjax = function (param = {}) {
|
||||
var d = $.extend({
|
||||
"url": '',
|
||||
"type": "post",
|
||||
"data": {},
|
||||
"async": true,
|
||||
"success": ''
|
||||
}, param);
|
||||
try {
|
||||
$.ajax({
|
||||
url: d.url,
|
||||
type: d.type,
|
||||
data: d.data,
|
||||
async: d.async,
|
||||
dataType: "JSON",
|
||||
success: function (res) {
|
||||
if (typeof (d.success) == "function") {
|
||||
d.success(res);
|
||||
}
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
};
|
||||
|
||||
//其他
|
||||
$(".dropdown-menu li").click(function () {
|
||||
$("#hidden_reply_type").val('other');
|
||||
var title = $(this).text();
|
||||
|
||||
var active_pic = '';
|
||||
active_pic += '<div class="ng ng-single">';
|
||||
active_pic += '<a href="javascript:;" class="close--circle js-delete-complex">×</a>';
|
||||
active_pic += '<div class="ng-item">';
|
||||
active_pic += '<a href="h" target="_blank" class="new-window" title="' + title + '"><span class="label label-success">' + title + '</span></a>';
|
||||
active_pic += '</div>';
|
||||
active_pic += '<div class="ng-item view-more">';
|
||||
active_pic += '<a href="" target="_blank" class="clearfix new-window">';
|
||||
active_pic += '<span class="pull-left">阅读全文</span>';
|
||||
active_pic += '<span class="pull-right">></span>';
|
||||
active_pic += '</a>';
|
||||
active_pic += '</div>';
|
||||
active_pic += '</div>';
|
||||
|
||||
$(".complex-content").html(active_pic);
|
||||
$('.complex-backdrop').css("display", "block");
|
||||
$("textarea[name='reply_content']").val(title);
|
||||
});
|
||||
|
||||
//插入链接
|
||||
function hyperlink(d) {
|
||||
$("#hidden_reply_type").val('text');
|
||||
$(".complex-backdrop").css("display", "none"); //清空文本框
|
||||
// $("#add_reply").find("textarea[name='reply_content']").val("");
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: false,
|
||||
area: ['306px', "auto"],
|
||||
offset: "auto",
|
||||
content: $("#hyperlink").html(),
|
||||
success: function (layero) {
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
476
addon/wechat/shop/view/public/js/wx_follow.js
Executable file
@@ -0,0 +1,476 @@
|
||||
WxReplay = function (limit = 0, limits = []) {
|
||||
var _this = this;
|
||||
_this._dom = null;
|
||||
_this.eventFlg = true;
|
||||
|
||||
_this.listCount = 0;
|
||||
_this.limit = limit == false ? 15 : limit;
|
||||
_this.limits = limit == false ? [15, 20, 50] : limits;
|
||||
_this.page = 1;
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取关注后回复列表
|
||||
*/
|
||||
WxReplay.prototype.getData = function (d) {
|
||||
var _this = d._this;
|
||||
var page = _this.page;
|
||||
var limit = _this.limit;
|
||||
var rule_type = d.rule_type;
|
||||
_this.sendAjax({
|
||||
url: ns.url('wechat://shop/replay/follow'),
|
||||
async: false,
|
||||
data: {"page": page, "limit": limit, "rule_type": rule_type},
|
||||
success: function (data) {
|
||||
_this.listCount = data.data.count;
|
||||
_this.aD.addReplayList(data.data);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* layui分页
|
||||
*/
|
||||
WxReplay.prototype.pageInit = function (d) {
|
||||
var _this = d._this;
|
||||
layui.use('laypage', function () {
|
||||
var laypage = layui.laypage;
|
||||
var page = 1;
|
||||
var hash_arr = getHashArr();
|
||||
$.each(hash_arr,function(index, itemobj){
|
||||
var item_arr = itemobj.split("=");
|
||||
if(item_arr.length == 2){
|
||||
switch(item_arr[0]){
|
||||
case "page":
|
||||
page = item_arr[1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
laypage.render({
|
||||
elem: 'list_page',
|
||||
count: _this.listCount,
|
||||
limit: _this.limit,
|
||||
limits: _this.limits,
|
||||
layout: ns.get_page_param(),
|
||||
curr: page,
|
||||
jump: function (obj, first) {
|
||||
_this.limit = obj.limit;
|
||||
if (!first) {
|
||||
_this.page = obj.curr;
|
||||
_this.getData({_this: _this, "rule_type": 'KEYWORDS'});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 事件操作
|
||||
* @param e 事件对象
|
||||
*/
|
||||
WxReplay.prototype.e = function (e) {
|
||||
try {
|
||||
//_this为replay对象 //_dom 为元素dom
|
||||
var _this = e.data._this;
|
||||
_this._dom = e.target;
|
||||
var eventFlg = _this.eventFlg;
|
||||
if (!eventFlg) return;
|
||||
_this.eventFlg = false;
|
||||
var _dom = e.target;
|
||||
var dataEvent = $(_dom).attr("nc-event");
|
||||
var dataAction = $(_dom).attr("nc-action");
|
||||
var type = e.type;
|
||||
if (dataEvent != type) {
|
||||
if ($(_dom).attr("nc-event2") != type) {
|
||||
_this.eventFlg = true;
|
||||
return;
|
||||
} else {
|
||||
dataEvent = $(_dom).attr("nc-event2");
|
||||
dataAction = $(_dom).attr("nc-action2");
|
||||
}
|
||||
}
|
||||
|
||||
var eventObj = null;
|
||||
switch (dataEvent) {
|
||||
case "click":
|
||||
eventObj = _this.clickEvent;
|
||||
break;
|
||||
case "mouseenter" :
|
||||
eventObj = _this.mouseenterEvent;
|
||||
break;
|
||||
case "mouseleave" :
|
||||
eventObj = _this.mouseleaveEvent;
|
||||
break;
|
||||
}
|
||||
if (eventObj) {
|
||||
|
||||
_this.evalFun(eventObj, dataAction, {"_this": _this});
|
||||
|
||||
_this.eventFlg = true;
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
_this.eventFlg = true;
|
||||
console.log(e);
|
||||
}
|
||||
};
|
||||
/**
|
||||
* 点击事件
|
||||
*/
|
||||
WxReplay.prototype.clickEvent = {
|
||||
click: function () {
|
||||
|
||||
},
|
||||
|
||||
//添加一条回复
|
||||
addReply: function (d) {
|
||||
var _this = d._this;
|
||||
var _dom = _this._dom;
|
||||
var rule_id = $(_dom).parents(".rule-group").attr("data-rule_id");
|
||||
var key_id = $(_dom).attr('data-key_id');
|
||||
var reply_content = $(_dom).attr('reply_content');
|
||||
var index = layer.open({
|
||||
type: 1,
|
||||
title: "设置自动回复",
|
||||
area: ['450px'],
|
||||
offset: "auto",
|
||||
content: $("#add_reply").html(),
|
||||
success: function (layero) {
|
||||
$(layero).find("input[name='rule_id']").val(rule_id);
|
||||
$(layero).find("textarea[name='reply_content']").val("");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//编辑回复
|
||||
editReply: function (d) {
|
||||
var _this = d._this;
|
||||
var _dom = _this._dom;
|
||||
var rule_id = $(_dom).parents(".rule-group").attr("data-rule_id");
|
||||
var key_id = $(_dom).attr('data-key_id');
|
||||
var reply_content = $(_dom).attr('reply_content');
|
||||
var request_type = $(_dom).attr('type');
|
||||
$("#hidden_reply_type").val(request_type);
|
||||
var index = layer.open({
|
||||
type: 1,
|
||||
title: "修改自动回复",
|
||||
area: ['450px'],
|
||||
offset: "auto",
|
||||
content: $("#add_reply").html(),
|
||||
success: function (layero) {
|
||||
$(layero).find("input[name='rule_id']").val(rule_id);
|
||||
$(layero).find("input[name='key_id']").val(key_id);
|
||||
$(layero).find("textarea[name='reply_content']").val(reply_content);
|
||||
|
||||
$(".voice").css("display", "none");
|
||||
$(".voice").next("span").css("display", "none");
|
||||
|
||||
if (request_type == 'music') {
|
||||
var active_pic = '';
|
||||
active_pic += '<div class="voice-wrapper" data-voice-src="' + reply_content + '">';
|
||||
active_pic += '<span class="voice-player">';
|
||||
active_pic += '<a href="javascript:;" class="close--circle js-delete-complex">×</a>';
|
||||
active_pic += '<span class="stop">点击播放</span>';
|
||||
active_pic += '<span class="second"></span>';
|
||||
active_pic += '<i class="play" style="display:none;"></i>';
|
||||
active_pic += '</span>';
|
||||
active_pic += '</div>';
|
||||
$(layero).find(".complex-content").html(active_pic);
|
||||
$('.complex-backdrop').css("display", "block");
|
||||
|
||||
} else if (request_type == 'other') {
|
||||
var active_pic = '';
|
||||
active_pic += '<div class="ng ng-single">';
|
||||
active_pic += '<a href="javascript:;" class="close--circle js-delete-complex">×</a>';
|
||||
active_pic += '<div class="ng-item">';
|
||||
active_pic += '<a href="h" target="_blank" class="new-window" title="' + reply_content + '"><span class="label label-success">' + reply_content + '</span></a>';
|
||||
active_pic += '</div>';
|
||||
active_pic += '<div class="ng-item view-more">';
|
||||
active_pic += '<a href="" target="_blank" class="clearfix new-window">';
|
||||
active_pic += '<span class="pull-left">阅读全文</span>';
|
||||
active_pic += '<span class="pull-right">></span>';
|
||||
active_pic += '</a>';
|
||||
active_pic += '</div>';
|
||||
active_pic += '</div>';
|
||||
|
||||
$(layero).find(".complex-content").html(active_pic);
|
||||
$('.complex-backdrop').css("display", "block");
|
||||
} else if (request_type == 'articles') {
|
||||
var active_pic = '';
|
||||
active_pic += '<div class="ng ng-single">';
|
||||
active_pic += '<a href="javascript:;" class="close--circle js-delete-complex">×</a>';
|
||||
active_pic += '<div class="ng-item">';
|
||||
active_pic += '<span class="label label-success">图 文</span>';
|
||||
active_pic += '<div class="ng-title">';
|
||||
active_pic += '<a href="" target="_blank" class="new-window" title="rgrg">' + reply_content + '</a>';
|
||||
active_pic += '</div>';
|
||||
active_pic += '</div>';
|
||||
active_pic += '<div class="ng-item view-more">';
|
||||
active_pic += '<a href="" target="_blank" class="clearfix new-window">';
|
||||
active_pic += '<span class="pull-left">阅读全文</span>';
|
||||
active_pic += '<span class="pull-right">></span>';
|
||||
active_pic += '</a>';
|
||||
active_pic += '</div>';
|
||||
active_pic += '</div>';
|
||||
|
||||
$(layero).find(".complex-content").html(active_pic);
|
||||
$('.complex-backdrop').css("display", "block");
|
||||
} else {
|
||||
$('.complex-backdrop').css("display", "none");
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//删除回复
|
||||
delReply: function (d) {
|
||||
var _this = d._this;
|
||||
var _dom = _this._dom;
|
||||
var rule_id = $(_dom).parents(".rule-group").attr("data-rule_id");
|
||||
var key_id = $(_dom).attr("data-key_id");
|
||||
var flag = true;
|
||||
var index = layer.open({
|
||||
type: 1,
|
||||
title: "是否删除该条回复",
|
||||
offset: "auto",
|
||||
content: '删除后,关注该公众号的用户将不再接收该回复,确定删除?'
|
||||
, btn: ['确定', '取消']
|
||||
, yes: function (index, layero) {
|
||||
if (!flag) return;
|
||||
flag = false;
|
||||
_this.sendAjax({
|
||||
url: ns.url('wechat://shop/replay/deleteReply'),
|
||||
data: {"rule_id": rule_id, "key_id": key_id},
|
||||
success: function (res) {
|
||||
layer.msg(res.message);
|
||||
if (res.code >= 0) {
|
||||
listenerHash(); // 刷新页面
|
||||
layer.closeAll();
|
||||
}
|
||||
}
|
||||
});
|
||||
flag = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//音乐
|
||||
music: function (d) {
|
||||
$("#hidden_reply_type").val('music');
|
||||
$(".complex-backdrop").css("display", "none"); //清空文本框
|
||||
$("#add_reply").find("textarea[name='reply_content']").val("");
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: '音乐素材',
|
||||
area: ['652px', "380px"],
|
||||
offset: "auto",
|
||||
content: $("#music").html(),
|
||||
success: function (layero) {
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* 移入事件
|
||||
*/
|
||||
|
||||
WxReplay.prototype.mouseenterEvent = {};
|
||||
|
||||
/**
|
||||
* 移出事件
|
||||
*/
|
||||
WxReplay.prototype.mouseleaveEvent = {};
|
||||
|
||||
/**
|
||||
* 执行传过来的方法
|
||||
* @param eventObj
|
||||
* @param funcName
|
||||
* @param d
|
||||
*/
|
||||
WxReplay.prototype.evalFun = function (eventObj, funcName, d = {}) {
|
||||
for (i in eventObj) {
|
||||
if (i == funcName) {
|
||||
eval(eventObj[i](d));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 元素操作 da(documentAction)
|
||||
*/
|
||||
WxReplay.prototype.aD = {
|
||||
|
||||
addReplayList: function (d) {
|
||||
var data = d.list;
|
||||
var html = '';
|
||||
if (data.length) {
|
||||
$.each(data, function (i) {
|
||||
var d = data[i];
|
||||
html += '<div class="rule-group layui-row" data-rule_id="' + d.rule_id + '">';
|
||||
html += '<div class="rule-meta bg-color-light-9">';
|
||||
html += '<h3><span class="rule-name">规则: 关注后自动回复</span></h3>';//title
|
||||
html += '</div>';
|
||||
html += '<div class="rule-body">';
|
||||
html += '</div>';
|
||||
html += '<div class="rule-replies layui-col-md12">';
|
||||
html += '<div class="rule-inner">';
|
||||
// html += '<h4>自动回复: <span class="send-method"> </span></h4>';
|
||||
html += '<div class="reply-container">';
|
||||
|
||||
if (d.replay_list.length <= 0) {
|
||||
html += '<div class="info">还没有任何回复!</div>';
|
||||
} else {
|
||||
html += '<div class="info"></div>';
|
||||
}
|
||||
html += '<ol class="reply-list">';
|
||||
|
||||
if (d.replay_list.length > 0) {
|
||||
for (var j in d.replay_list) {
|
||||
|
||||
html += '<li>';//回复列表
|
||||
html += '<div class="reply-cont">';
|
||||
html += '<div class="reply-summary">';
|
||||
if (d.replay_list[j].type == 'text') {
|
||||
html += '<span class="label label-success">文本</span> ';
|
||||
html += '<span class="label">' + d.replay_list[j].reply_content + '</span>';
|
||||
} else if (d.replay_list[j].type == 'music') {
|
||||
html += '<div class="voice-wrapper" data-voice-src="' + d.replay_list[j].reply_content + '">';
|
||||
html += '<span class="voice-player">';
|
||||
html += '<span class="stop">点击播放</span>';
|
||||
html += '<span class="second" style="display: block;"></span>';
|
||||
html += '<i class="play" style="display:none;"></i>';
|
||||
html += '</span>';
|
||||
html += '</div>';
|
||||
} else if (d.replay_list[j].type == 'other') {
|
||||
html += '<span class="label label-success">' + d.replay_list[j].reply_content + '</span> ';
|
||||
html += '<span class="label">' + d.replay_list[j].reply_content + '</span>';
|
||||
} else if (d.replay_list[j].type == 'articles') {
|
||||
html += '<span class="label label-success">图文</span> ';
|
||||
html += '<span class="label">' + d.replay_list[j].reply_content + '</span>';
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '<div class="reply-opts">';
|
||||
var reply_content_to = d.replay_list[j].reply_content.replace(/"/g, "'");
|
||||
html += '<a class="js-edit-it js-replay" href="javascript:;" data-key_id="' + j + '" reply_content="' + reply_content_to + '" type="' + d.replay_list[j].type + '" nc-event="click" nc-action="editReply">编辑</a> - ';
|
||||
html += '<a class="js-delete-it js-replay" href="javascript:;" data-key_id="' + j + '" nc-event="click" nc-action="delReply">删除</a>';
|
||||
html += '</div>';
|
||||
html += '</li>';
|
||||
|
||||
}
|
||||
}
|
||||
html += '</ol>';
|
||||
html += '</div>';
|
||||
html += '<hr class="dashed">';
|
||||
html += '<div class="opt">';
|
||||
if (d.replay_list.length < 1) {
|
||||
html += '<a class="js-add-reply add-reply-menu js-replay" href="javascript:;" nc-event="click" nc-action="addReply">设置回复</a>';
|
||||
} else {
|
||||
html += '<span class="disable-opt hide">最多一条回复</span>';
|
||||
}
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
});
|
||||
} else {
|
||||
html += '<div class="rule-group layui-row" data-rule_id="">';
|
||||
html += '<div class="rule-meta bg-color-light-9">';
|
||||
html += '<h3><span class="rule-name">规则: 关注后自动回复</span></h3>';//title
|
||||
html += '</div>';
|
||||
html += '<div class="rule-body">';
|
||||
html += '</div>';
|
||||
html += '<div class="rule-replies layui-col-md12">';
|
||||
html += '<div class="rule-inner">';
|
||||
// html += '<h4>自动回复: <span class="send-method"> </span></h4>';
|
||||
html += '<div class="reply-container">';
|
||||
html += '<div class="info">还没有任何回复!</div>';
|
||||
html += '</div>';
|
||||
html += '<hr class="dashed">';
|
||||
html += '<div class="opt">';
|
||||
html += '<a class="js-add-reply add-reply-menu js-replay" href="javascript:;" nc-event="click" nc-action="addReply">设置回复</a>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
$("#load_rule_list").html(html);
|
||||
}
|
||||
};
|
||||
|
||||
WxReplay.prototype.sendAjax = function (param = {}) {
|
||||
var d = $.extend({
|
||||
"url": '',
|
||||
"type": "post",
|
||||
"data": {},
|
||||
"async": true,
|
||||
"success": ''
|
||||
}, param);
|
||||
try {
|
||||
$.ajax({
|
||||
url: d.url,
|
||||
type: d.type,
|
||||
data: d.data,
|
||||
async: d.async,
|
||||
dataType: "JSON",
|
||||
success: function (res) {
|
||||
if (typeof (d.success) == "function") {
|
||||
d.success(res);
|
||||
}
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
};
|
||||
|
||||
//其他
|
||||
$(".dropdown-menu li").click(function () {
|
||||
$("#hidden_reply_type").val('other');
|
||||
var title = $(this).text();
|
||||
|
||||
var active_pic = '';
|
||||
active_pic += '<div class="ng ng-single">';
|
||||
active_pic += '<a href="javascript:;" class="close--circle js-delete-complex">×</a>';
|
||||
active_pic += '<div class="ng-item">';
|
||||
active_pic += '<a href="h" target="_blank" class="new-window" title="' + title + '"><span class="label label-success">' + title + '</span></a>';
|
||||
active_pic += '</div>';
|
||||
active_pic += '<div class="ng-item view-more">';
|
||||
active_pic += '<a href="" target="_blank" class="clearfix new-window">';
|
||||
active_pic += '<span class="pull-left">阅读全文</span>';
|
||||
active_pic += '<span class="pull-right">></span>';
|
||||
active_pic += '</a>';
|
||||
active_pic += '</div>';
|
||||
active_pic += '</div>';
|
||||
|
||||
$(".complex-content").html(active_pic);
|
||||
$('.complex-backdrop').css("display", "block");
|
||||
$("textarea[name='reply_content']").val(title);
|
||||
|
||||
});
|
||||
|
||||
|
||||
//插入链接
|
||||
function hyperlink(d) {
|
||||
$("#hidden_reply_type").val('text');
|
||||
$(".complex-backdrop").css("display", "none"); //清空文本框
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: false,
|
||||
area: ['306px', "auto"],
|
||||
offset: "auto",
|
||||
content: $("#hyperlink").html(),
|
||||
success: function (layero) {
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
417
addon/wechat/shop/view/public/js/wx_graphic_message.js
Executable file
@@ -0,0 +1,417 @@
|
||||
var vue_obj;
|
||||
var repeat_flag = false;//防重复标识
|
||||
$(function () {
|
||||
|
||||
initVue();
|
||||
if ($('#edit_flag').val()) {
|
||||
setTimeout(function () {
|
||||
vue_obj.loadGraphicMessageInfo();
|
||||
}, 20);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// 初始化Vue
|
||||
function initVue() {
|
||||
// 挂载父组件
|
||||
vue_obj = new Vue({
|
||||
el: '#graphic_message', // 挂载点标识
|
||||
data: { // 数据
|
||||
article_item_list: [
|
||||
{
|
||||
msg_type: 1, // 消息类型
|
||||
title: '', // 标题
|
||||
autor: '', // 作者
|
||||
content: '', // 内容
|
||||
url: '', // 原文链接
|
||||
show_cover_pic: 0, // 正文是否显示封面图
|
||||
cover: {
|
||||
path: '', // 封面路径
|
||||
media_id: '' // 封面media_id
|
||||
},
|
||||
digest: '', // 摘要
|
||||
},
|
||||
],
|
||||
edit_mask_list: [
|
||||
{
|
||||
is_show: false, // 是否显示列表修改菜单 ---对应图文消息列表
|
||||
}
|
||||
],
|
||||
max_item_list: 8,
|
||||
current_msg_index: 0, // 当前选中消息下标
|
||||
material_id: 0, // 当前图文消息ID
|
||||
inputTitle: '',
|
||||
inputAutor: '',
|
||||
inputOriginalUrl: '',
|
||||
checkShowCoverPic: 0,
|
||||
coverImg: '',
|
||||
editBoxTopPosition: 80,
|
||||
move_index: -1,
|
||||
loading: false,
|
||||
editor: null
|
||||
},
|
||||
watch: {
|
||||
//输入标题
|
||||
inputTitle: function (val) {
|
||||
this.article_item_list[this.current_msg_index].title = val;
|
||||
},
|
||||
//输入作者
|
||||
inputAutor: function (val) {
|
||||
this.article_item_list[this.current_msg_index].autor = val;
|
||||
},
|
||||
// 输入原文链接
|
||||
inputOriginalUrl: function (val) {
|
||||
this.article_item_list[this.current_msg_index].url = val;
|
||||
},
|
||||
// 正文是否显示封面图
|
||||
checkShowCoverPic: function (val) {
|
||||
this.article_item_list[this.current_msg_index].show_cover_pic = val;
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
var _self = this;
|
||||
_self.material_id = $('#material_id').val();
|
||||
_self.editor = UE.getEditor('editor');
|
||||
if(_self.material_id == 0){
|
||||
_self.reloadUpload();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 添加图文消息
|
||||
addGraphicMessage: function (e) {
|
||||
getContent();
|
||||
var article_item_list = this.article_item_list;
|
||||
if (article_item_list.length > 7) {
|
||||
layer.msg('多图文消息内容不可超过8个');
|
||||
return false;
|
||||
}
|
||||
|
||||
var new_item_msg = {
|
||||
msg_type: 1, // 消息类型
|
||||
title: '', // 标题
|
||||
autor: '', // 作者
|
||||
content: '', // 内容
|
||||
url: '', // 原文链接
|
||||
show_cover_pic: 0, // 正文是否显示封面
|
||||
cover: {
|
||||
path: '', // 封面路径
|
||||
media_id: '' // 封面media_id
|
||||
},
|
||||
digest: '', // 摘要
|
||||
};
|
||||
var new_edit_mask = {
|
||||
is_show: false
|
||||
};
|
||||
// 添加新图文消息
|
||||
this.article_item_list.push(new_item_msg);
|
||||
this.edit_mask_list.push(new_edit_mask);
|
||||
// 初始化新图文消息
|
||||
this.editor.setContent('');
|
||||
this.current_msg_index = article_item_list.length - 1;// 更新当前选中消息
|
||||
this.inputTitle = '';// 初始化输入标题
|
||||
this.inputAutor = '';// 初始化输入作者
|
||||
this.checkShowCoverPic = '';
|
||||
this.inputOriginalUrl = '';
|
||||
this.coverImg = '';
|
||||
var _num = article_item_list.length - 1;
|
||||
var _top = 250;
|
||||
_top = _num == 0 ? 80 : _top;
|
||||
_num = _num > 0 ? _num - 1 : _num;
|
||||
this.editBoxTopPosition = 72 * _num + _top;
|
||||
|
||||
setTimeout(()=>{
|
||||
this.reloadUpload();
|
||||
},600)
|
||||
},
|
||||
// 选择编辑中图文消息
|
||||
chooseGraphicMessage: function (index) {
|
||||
getContent();
|
||||
var article = this.article_item_list[index];
|
||||
this.current_msg_index = index;
|
||||
this.inputTitle = article.title; // 初始化输入标题
|
||||
this.inputAutor = article.autor; // 初始化输入作者
|
||||
this.editor.setContent(article.content); // 初始化ueditor输入
|
||||
this.checkShowCoverPic = article.show_cover_pic;
|
||||
this.inputOriginalUrl = article.url;
|
||||
this.coverImg = article.cover.path;
|
||||
var _num = index;
|
||||
var _top = 250;
|
||||
_top = _num == 0 ? 80 : _top;
|
||||
_num = _num > 0 ? _num - 1 : _num;
|
||||
this.editBoxTopPosition = 72 * _num + _top;
|
||||
|
||||
setTimeout(()=>{
|
||||
this.reloadUpload();
|
||||
},600)
|
||||
},
|
||||
//鼠标经过
|
||||
moveThis: function (index) {
|
||||
this.move_index = index;
|
||||
},
|
||||
leaveThis: function (index) {
|
||||
this.move_index = -1;
|
||||
},
|
||||
// 加载当前图文消息
|
||||
loadGraphicMessageInfo: function () {
|
||||
var _self = this;
|
||||
var id = _self.material_id;
|
||||
_self.loading = true;
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: ns.url("wechat://shop/material/getMaterialInfo"),
|
||||
data: {id},
|
||||
dataType: "JSON",
|
||||
success: function (data) {
|
||||
data = data.data;
|
||||
if (data.value != null && data.id > 0) {
|
||||
//延时渲染
|
||||
var count_timer = 0;
|
||||
var timer = setInterval(function () {
|
||||
try {
|
||||
// 初始化
|
||||
_self.article_item_list = new Array();
|
||||
_self.edit_mask_list = new Array();
|
||||
// 循环赋值
|
||||
count_timer++;
|
||||
if (count_timer > 5) {
|
||||
clearInterval(timer);
|
||||
layer.msg('加载失败');
|
||||
return false;
|
||||
}
|
||||
|
||||
for (var index in data.value) {
|
||||
var msg = data.value[index];
|
||||
|
||||
var new_item_msg = {
|
||||
msg_type: 1, // 消息类型
|
||||
title: msg.title, // 标题
|
||||
autor: msg.autor, // 作者
|
||||
content: msg.content, // 内容
|
||||
url: msg.url,
|
||||
cover: msg.cover, // 封面
|
||||
show_cover_pic: msg.show_cover_pic, // 正文是否显示封面
|
||||
digest: msg.digest, // 摘要
|
||||
};
|
||||
var new_edit_mask = {
|
||||
is_show: false
|
||||
};
|
||||
// 添加新图文消息
|
||||
_self.article_item_list.push(new_item_msg);
|
||||
_self.edit_mask_list.push(new_edit_mask);
|
||||
// 初始化新图文消息
|
||||
_self.current_msg_index = 0; // 更新当前选中消息
|
||||
|
||||
if (index == 0) {
|
||||
_self.inputTitle = msg.title; // 初始化输入标题
|
||||
_self.inputAutor = msg.autor; // 初始化输入作者
|
||||
_self.editor.setContent(msg.content); // 初始化ueditor输入
|
||||
_self.checkShowCoverPic = msg.show_cover_pic;
|
||||
_self.inputOriginalUrl = msg.url;
|
||||
_self.inputDigest = msg.digest;
|
||||
_self.coverImg = msg.cover.path;
|
||||
_self.loading = false;
|
||||
}
|
||||
}
|
||||
clearInterval(timer);
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
layer.msg('加载失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 修改当前图文消息
|
||||
editGraphicMessage: function () {
|
||||
getContent();
|
||||
|
||||
var _self = this;
|
||||
if (!_self.verification(_self)) return;
|
||||
|
||||
var id = _self.material_id;
|
||||
var article_item_list = JSON.parse(JSON.stringify(_self.article_item_list));
|
||||
article_item_list[0].cover.path = $("#logo").val();
|
||||
var value = JSON.stringify(article_item_list);
|
||||
|
||||
if (repeat_flag) return;
|
||||
repeat_flag = true;
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: ns.url('wechat://shop/material/edit'),
|
||||
data: {id, value},
|
||||
dataType: "JSON",
|
||||
success: function (res) {
|
||||
layer.msg(res.message);
|
||||
if (res.code == 0) {
|
||||
location.hash = ns.hash('wechat://shop/material/lists');
|
||||
} else {
|
||||
repeat_flag = false;
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 保存图文消息
|
||||
saveGraphicMessage: function (e) {
|
||||
getContent();
|
||||
|
||||
var _self = this;
|
||||
if (!_self.verification(_self)) return;
|
||||
|
||||
if (repeat_flag) return;
|
||||
repeat_flag = true;
|
||||
var article_item_list = JSON.parse(JSON.stringify(_self.article_item_list));
|
||||
var value = JSON.stringify(article_item_list);
|
||||
|
||||
var type = 1;
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: ns.url('wechat://shop/material/add'),
|
||||
data: {type, value},
|
||||
dataType: "JSON",
|
||||
success: function (res) {
|
||||
if (res.code == 0) {
|
||||
//_self.material_id = res.data;
|
||||
location.hash = ns.hash('wechat://shop/material/lists');
|
||||
} else {
|
||||
repeat_flag = false;
|
||||
}
|
||||
layer.msg(res.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
// 添加封面图
|
||||
addCover: function (e) {
|
||||
// uploadAlbumalbum_contain();
|
||||
},
|
||||
// 删除图文消息
|
||||
deleteGraphicMessage: function (_index) {
|
||||
var _self = this;
|
||||
layer.confirm(
|
||||
'确认删除?',
|
||||
{
|
||||
btn: ['确认', '取消'], //可以无限个按钮
|
||||
},
|
||||
function (index, layero) {
|
||||
if (_index == _self.article_item_list.length - 1) {
|
||||
_self.chooseGraphicMessage(_index - 1);
|
||||
} else {
|
||||
if (_self.current_msg_index != 0) {
|
||||
var _num = _self.current_msg_index - 1;
|
||||
var _top = 250;
|
||||
_top = _num == 0 ? 80 : _top;
|
||||
_num = _num > 0 ? _num - 1 : _num;
|
||||
_self.editBoxTopPosition = 72 * _num + _top;
|
||||
}
|
||||
_self.current_msg_index = _self.current_msg_index - 1;
|
||||
}
|
||||
_self.article_item_list.splice(_index, 1);
|
||||
layer.close(index);
|
||||
},
|
||||
function (index) {
|
||||
layer.close(index);
|
||||
}
|
||||
);
|
||||
},
|
||||
//验证
|
||||
verification: function (_self) {
|
||||
var article_item_list = _self.article_item_list;
|
||||
var falg = true;
|
||||
var hint_type = '';
|
||||
|
||||
for (var index in article_item_list) {
|
||||
var article = article_item_list[index];
|
||||
|
||||
if (article.title == '' && falg) {
|
||||
layer.msg('标题不可为空 !');
|
||||
hint_type = 'title';
|
||||
falg = false;
|
||||
}
|
||||
|
||||
if (article.cover.path == '' && falg) {
|
||||
layer.msg('封面图片不可为空 !');
|
||||
hint_type = 'cover';
|
||||
falg = false;
|
||||
}
|
||||
|
||||
if ((article.content == '' || article.content == '<p><span style="color:#A7A7Ab;">从这里开始输入正文</span></p>') && falg) {
|
||||
layer.msg('正文不可为空 !');
|
||||
hint_type = 'content';
|
||||
falg = false;
|
||||
}
|
||||
|
||||
if (article.url != '' && (article.url.indexOf('http://') != 0 && article.url.indexOf('https://') != 0) && falg) {
|
||||
layer.msg('原文链接无效,请输入http:// 或 https://为前缀的有效地址 !');
|
||||
hint_type = 'url';
|
||||
falg = false;
|
||||
}
|
||||
|
||||
if (article.digest == '' && falg) {
|
||||
var content = article.content.replace(/<\/?.+?>/g, "");
|
||||
content = content.replace(/ /g, "");
|
||||
content = content.replace(" ", " ");
|
||||
content = content.replace("'", "'");
|
||||
content = content.substr(0, 64);
|
||||
|
||||
_self.article_item_list[index].digest = content;
|
||||
}
|
||||
|
||||
if (!falg) {
|
||||
_self.chooseGraphicMessage(index);
|
||||
|
||||
if (hint_type == 'title') {
|
||||
$('#input_title').focus();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
reloadUpload: function () {
|
||||
var upload = new Upload({
|
||||
elem: '#uploadImg',
|
||||
callback:function (res) {
|
||||
if (res.code >= 0) {
|
||||
//成功之后将图片的路径存放再隐藏域中,便于提交使用
|
||||
// $("input[name='web_qrcode']").val(res.data.pic_path);
|
||||
vue_obj.coverImg = ns.img(res.data.pic_path);
|
||||
vue_obj.article_item_list[vue_obj.current_msg_index].cover.path = ns.img(res.data.pic_path);
|
||||
//将图片展示在页面上
|
||||
// $("#webQrcodeUpload").html("<img src=" + ns.img(res.data.pic_path) + " >");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 相册选择图片回调
|
||||
* @param data
|
||||
* @param name
|
||||
*/
|
||||
function albumUploadSuccess(data, name) {
|
||||
if (data.length != undefined && data.length > 0) {
|
||||
if (data.length > 1) {
|
||||
layer.msg('封面图只可选择一张');
|
||||
}
|
||||
path = ns.img(data[0].path);
|
||||
var article_item_list = vue_obj.article_item_list;
|
||||
var index = vue_obj.current_msg_index;
|
||||
article_item_list[index].cover.path = path;
|
||||
vue_obj.article_item_list = article_item_list;
|
||||
vue_obj.coverImg = path;
|
||||
} else {
|
||||
layer.msg('图片添加失败');
|
||||
}
|
||||
}
|
||||
|
||||
//获取富文本内容
|
||||
function getContent(){
|
||||
vue_obj.article_item_list[vue_obj.current_msg_index].content = vue_obj.editor.getContent();
|
||||
}
|
||||
128
addon/wechat/shop/view/public/js/wx_material.js
Executable file
@@ -0,0 +1,128 @@
|
||||
/**
|
||||
* 素材列表
|
||||
*/
|
||||
layui.use(['form', 'table', 'element'], function() {
|
||||
var form = layui.form,
|
||||
element = layui.element;
|
||||
|
||||
form.render();
|
||||
|
||||
element.on('tab(list_tab)', function() {
|
||||
table.reload({
|
||||
page: {
|
||||
curr: 1
|
||||
},
|
||||
where: {
|
||||
'type': this.getAttribute('lay-id')
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var table = new Table({
|
||||
elem: '#graphic_message_list',
|
||||
filter: "graphic_message",
|
||||
url: ns.url('wechat://shop/material/lists'),
|
||||
cols: [[
|
||||
{
|
||||
field: 'value',
|
||||
width: '30%',
|
||||
title: '标题',
|
||||
align: 'center',
|
||||
templet: '#title',
|
||||
unresize : 'true'
|
||||
},
|
||||
{
|
||||
field: 'create_time',
|
||||
width: '30%',
|
||||
title: '创建时间',
|
||||
align: 'center',
|
||||
templet: '#create_time',
|
||||
unresize : 'true'
|
||||
},
|
||||
{
|
||||
field: 'update_time',
|
||||
width: '25%',
|
||||
title: '更新时间',
|
||||
align: 'center',
|
||||
templet: '#update_time',
|
||||
unresize : 'true'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '15%',
|
||||
toolbar: '#operation',
|
||||
unresize : 'true',
|
||||
align:'right'
|
||||
}
|
||||
]]
|
||||
});
|
||||
//监听工具条
|
||||
table.tool(function(obj) {
|
||||
var data = obj.data;
|
||||
switch (obj.event) {
|
||||
case "edit":
|
||||
if(data.type == 1){
|
||||
location.hash = ns.hash('wechat://shop/material/edit', {"id": data.id});
|
||||
}else{
|
||||
location.hash = ns.hash('wechat://shop/material/edittextmaterial', {"id": data.id});
|
||||
}
|
||||
break;
|
||||
case "delete":
|
||||
delMaterial(data.id, 1, data.media_id);
|
||||
break;
|
||||
}
|
||||
});
|
||||
/**
|
||||
* 删除素材
|
||||
*/
|
||||
function delMaterial(id, type, media_id) {
|
||||
layer.confirm(
|
||||
'确认删除?', {
|
||||
btn: ['确认', '取消'],
|
||||
},
|
||||
function(index, layero) {
|
||||
$.ajax({
|
||||
url: ns.url('wechat://shop/material/delete'),
|
||||
data: {
|
||||
id,
|
||||
media_id
|
||||
},
|
||||
dataType: "JSON",
|
||||
success: function(res) {
|
||||
layer.msg(res.message);
|
||||
if (res.code == 0) {
|
||||
table.reload()
|
||||
}
|
||||
}
|
||||
});
|
||||
layer.close(index);
|
||||
},
|
||||
function(index) {
|
||||
layer.close(index);
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 图文消息预览
|
||||
*/
|
||||
function preview(id, index = 0) {
|
||||
var url = ns.href('wechat://shop/material/previewgraphicmessage', {
|
||||
"id": id,
|
||||
"i": index
|
||||
});
|
||||
window.open(url);
|
||||
}
|
||||
|
||||
function previewtext(id, index = 0) {
|
||||
var url = ns.href('wechat://shop/material/previewtextmessage', {
|
||||
"id": id,
|
||||
"i": index
|
||||
});
|
||||
window.open(url);
|
||||
}
|
||||
|
||||
265
addon/wechat/shop/view/public/js/wx_material_mannager.js
Executable file
@@ -0,0 +1,265 @@
|
||||
var layer_index = '';
|
||||
var add_layer_index = '';
|
||||
var limit = 15;
|
||||
var laytpl;
|
||||
var laypage;
|
||||
var repeat_flag = false;//防重复标识
|
||||
|
||||
function chooseMaterial(type) {
|
||||
loadMaterialList(type);
|
||||
var content_id = $('#marterial_graphic_message');
|
||||
if (type == 1) {
|
||||
content_id = $('#marterial_graphic_message');
|
||||
} else if (type == 2) {
|
||||
content_id = $('#material_image');
|
||||
} else if (type == 5) {
|
||||
content_id = $('#material_text');
|
||||
}
|
||||
layer_index = layer.open({
|
||||
type: 1,
|
||||
title: false,
|
||||
// shade: [0],
|
||||
area: ['800px', '450px'],
|
||||
content: content_id,
|
||||
success: function (layero, index) {
|
||||
var mask = $(".layui-layer-shade");
|
||||
mask.appendTo(layero.parent());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 素材列表
|
||||
*/
|
||||
function loadMaterialList(type) {
|
||||
if (type == 1) {
|
||||
var table = new Table({
|
||||
elem: '#marterial_graphic_message_list',
|
||||
filter: "marterial_graphic_message",
|
||||
// width: '780',
|
||||
url: ns.url("wechat://shop/material/lists"),
|
||||
where: {type: 1, limit},
|
||||
cols: [[
|
||||
{
|
||||
field: 'value',
|
||||
width: '35%',
|
||||
title: '标题',
|
||||
align: 'center',
|
||||
templet: '#graphic_message_title'
|
||||
},
|
||||
{
|
||||
field: 'create_time',
|
||||
width: '25%',
|
||||
title: '创建时间',
|
||||
align: 'center',
|
||||
templet: '#create_time'
|
||||
},
|
||||
{
|
||||
field: 'update_time',
|
||||
width: '20%',
|
||||
title: '更新时间',
|
||||
align: 'center',
|
||||
templet: '#update_time'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '20%',
|
||||
toolbar: '#operation',
|
||||
align:'right'
|
||||
}
|
||||
]]
|
||||
});
|
||||
|
||||
//监听工具条
|
||||
table.tool(function (obj) {
|
||||
var data = obj.data;
|
||||
switch (obj.event) {
|
||||
case "choose":
|
||||
try{
|
||||
parent.chooseGraphicMessage(data);
|
||||
}catch(e){
|
||||
console.error("chooseGraphicMessage()");
|
||||
}
|
||||
var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
|
||||
parent.layer.close(index);
|
||||
// chooseGraphicMessage(data);
|
||||
// layer.close(layer_index);
|
||||
break;
|
||||
}
|
||||
});
|
||||
}else if (type == 5) {
|
||||
var table = new Table({
|
||||
elem: '#material_text_list',
|
||||
filter: "material_text",
|
||||
// width: '780',
|
||||
url: ns.url("wechat://shop/material/lists"),
|
||||
where: {type: 5},
|
||||
cols: [[
|
||||
{
|
||||
field: 'value',
|
||||
width: '40%',
|
||||
title: '内容',
|
||||
align: 'center',
|
||||
templet: '#text_content'
|
||||
},
|
||||
{
|
||||
field: 'create_time',
|
||||
width: '25%',
|
||||
title: '创建时间',
|
||||
align: 'center',
|
||||
templet: '#create_time'
|
||||
},
|
||||
{
|
||||
field: 'update_time',
|
||||
width: '25%',
|
||||
title: '更新时间',
|
||||
align: 'center',
|
||||
templet: '#update_time'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '10%',
|
||||
toolbar: '#operation',
|
||||
align:'right'
|
||||
}
|
||||
]]
|
||||
});
|
||||
|
||||
//监听工具条
|
||||
table.tool(function (obj) {
|
||||
var data = obj.data;
|
||||
switch (obj.event) {
|
||||
case "choose":
|
||||
try{
|
||||
parent.chooseTextMessage(data);
|
||||
|
||||
}catch(e){
|
||||
console.error("chooseTextMessage()");
|
||||
}
|
||||
var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
|
||||
parent.layer.close(index);
|
||||
//
|
||||
// chooseTextMessage(data);
|
||||
// layer.close(layer_index);
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 图文消息预览
|
||||
*/
|
||||
function preview(id, index = 0) {
|
||||
var parme = {"id": id, "i": index};
|
||||
var url = ns.url("wechat://shop/material/previewgraphicmessage", {id: id, i: index});
|
||||
window.open(url);
|
||||
}
|
||||
|
||||
/**
|
||||
* 文本消息预览
|
||||
*/
|
||||
function previewTexts(event, media_id, index, subIndex = "") {
|
||||
var content = $(".text-message-content .title>a").html();
|
||||
var html = "";
|
||||
html += "<div><textarea id='text_content' class='text-r'>"+ content +"</textarea></div>";
|
||||
layer_index = layer.open({
|
||||
type: 1,
|
||||
closeBtn: 0, //不显示关闭按钮
|
||||
anim: 2,
|
||||
area: ['380px', '230px'],
|
||||
shadeClose: true, //开启遮罩关闭
|
||||
btn: ['确定', '取消'],
|
||||
title : "文本信息",
|
||||
content: html,
|
||||
yes:function(){
|
||||
var text_r = $(".text-r").val();
|
||||
$(".text-message-content .title>a").html(text_r);
|
||||
if(subIndex >= 0){
|
||||
menu.button[index].sub_button[subIndex]['text'] = text_r;
|
||||
}else{
|
||||
menu.button[index]['text'] = text_r;
|
||||
}
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: ns.url('wechat://shop/material/editTextMaterial'),
|
||||
data: {media_id: media_id, content : text_r},
|
||||
dataType: "JSON",
|
||||
success: function (res) {
|
||||
layer.msg(res.message);
|
||||
}
|
||||
});
|
||||
|
||||
layer.close(layer_index);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function previewText(content) {
|
||||
layer.open({
|
||||
title: '文本内容',
|
||||
content: content
|
||||
})
|
||||
}
|
||||
|
||||
function addMaterial(type) {
|
||||
addMaterialForm(type);
|
||||
var content_id = $('#add_material_text');
|
||||
|
||||
add_layer_index = layer.open({
|
||||
type: 1,
|
||||
title: false,
|
||||
// shade: [0],
|
||||
area: ['800px', '646px'],
|
||||
content: content_id,
|
||||
success: function (layero, index) {
|
||||
var mask = $(".layui-layer-shade");
|
||||
mask.appendTo(layero.parent());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addMaterialForm(type) {
|
||||
if (type == 5) {
|
||||
layui.use('form', function () {
|
||||
var form = layui.form;
|
||||
|
||||
$('#material_text_content').on('input', function (e) {
|
||||
var num = e.target.value.length;
|
||||
num = 300 - parseInt(num);
|
||||
$('#add_material_text .input-text-hint').html('剩余' + num);
|
||||
});
|
||||
form.verify({
|
||||
'material_text_content': function (value, item) {
|
||||
if (value == '' || value == undefined) {
|
||||
return '文本内容不可为空';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
form.on('submit(addText)', function (data) {
|
||||
var value = JSON.stringify(data.field);
|
||||
if (repeat_flag) return;
|
||||
repeat_flag = true;
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: ns.url('wechat://shop/material/addTextMaterial'),
|
||||
data: {type: 5, value},
|
||||
dataType: "JSON",
|
||||
success: function (res) {
|
||||
layer.msg(res.message);
|
||||
repeat_flag = false;
|
||||
if (res.code == 0) {
|
||||
layer.close(add_layer_index);
|
||||
var _data = {
|
||||
id: res.data,
|
||||
value: data.field
|
||||
};
|
||||
typeof chooseTextMessage == 'function' && chooseTextMessage(_data)
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
752
addon/wechat/shop/view/public/js/wx_menu.js
Executable file
@@ -0,0 +1,752 @@
|
||||
var loading_index;
|
||||
var menu = new Vue({
|
||||
el: '#menu',
|
||||
data: {
|
||||
button: [],
|
||||
menuIndex: [-1, -1],// 分别是一二级菜单的index
|
||||
menuObj: {}, // 当前选择的菜单 对应的值
|
||||
subMenuPlusShow: true,// 二级菜单 添加按钮显示
|
||||
name: '',
|
||||
type: 'media',
|
||||
key: '',
|
||||
url: '',
|
||||
media_type: '',
|
||||
media_id: '',
|
||||
appid: '',
|
||||
pagepath: '',
|
||||
error_hint: '',
|
||||
picurl: '',
|
||||
text: '',
|
||||
graphic_message: [],
|
||||
position_x: '',
|
||||
position_y: '',
|
||||
change_active: true,
|
||||
},
|
||||
watch: {
|
||||
name: function (v, ov) {
|
||||
this.setValue('name', v);
|
||||
},
|
||||
type: function (v, ov) {
|
||||
if (ov == 'media') {
|
||||
this.setValue('media_type', 'text');
|
||||
this.media_type = 'text';
|
||||
}
|
||||
this.setValue('type', v);
|
||||
},
|
||||
key: function (v, ov) {
|
||||
this.setValue('key', v);
|
||||
},
|
||||
url: function (v, ov) {
|
||||
this.setValue('url', v);
|
||||
},
|
||||
media_id: function (v, ov) {
|
||||
this.setValue('media_id', v);
|
||||
},
|
||||
appid: function (v, ov) {
|
||||
this.setValue('appid', v);
|
||||
},
|
||||
pagepath: function (v, ov) {
|
||||
this.setValue('pagepath', v);
|
||||
},
|
||||
text: function (v, ov) {
|
||||
this.setValue('text', v);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
addMenu: function () {
|
||||
var _self = this;
|
||||
var menuItem = {
|
||||
'name': '菜单名称',
|
||||
};
|
||||
var length = _self.button.length;
|
||||
_self.name = '菜单名称';
|
||||
_self.button.push(menuItem);
|
||||
_self.chooseMenu(length, -1);
|
||||
_self.setValue('type', 'media');
|
||||
_self.setValue('media_type', 'text');
|
||||
_self.media_type = 'text';
|
||||
_self.type = 'media';
|
||||
|
||||
},
|
||||
addSubMenu: function (index) {
|
||||
var menuItem, subMenuItem;
|
||||
var _self = this;
|
||||
if (_self.button[index].sub_button != undefined && _self.button[index].sub_button.length >= 5) {
|
||||
layer.msg('每个一级菜单最多包含5个子菜单');
|
||||
return false;
|
||||
}
|
||||
if (_self.button[index].sub_button == undefined || _self.button[index].sub_button.length == 0) {
|
||||
menuItem = {
|
||||
'name': _self.button[index].name,
|
||||
'sub_button': []
|
||||
};
|
||||
_self.button[index] = menuItem;
|
||||
}
|
||||
subMenuItem = {
|
||||
'name': '子菜单名称'
|
||||
};
|
||||
this.name = '子菜单名称';
|
||||
var second_index = this.button[index].sub_button.length;
|
||||
var subMenuLength = second_index + 1;
|
||||
_self.button[index].sub_button.push(subMenuItem);
|
||||
_self.subMenuPlusShow = subMenuLength >= 5 ? false : true;
|
||||
_self.chooseMenu(index, second_index);
|
||||
_self.setValue('type', 'media');
|
||||
_self.setValue('media_type', 'text');
|
||||
_self.type = 'media';
|
||||
_self.media_type = 'text';
|
||||
delete _self.button[index].type;
|
||||
delete _self.button[index].url;
|
||||
delete _self.button[index].key;
|
||||
delete _self.button[index].media_id;
|
||||
delete _self.button[index].appid;
|
||||
delete _self.button[index].pagepath;
|
||||
delete _self.button[index].media_type;
|
||||
delete _self.button[index].picurl;
|
||||
delete _self.button[index].text;
|
||||
delete _self.button[index].graphic_message;
|
||||
},
|
||||
// 选择 菜单,first_index = 一级菜单 0-2; second_index = 二级菜单下标 0-4
|
||||
chooseMenu: function (first_index, second_index) {
|
||||
var _self = this;
|
||||
var change_active = _self.change_active;
|
||||
if (change_active === false) {
|
||||
_self.change_active = true;
|
||||
return false;
|
||||
}
|
||||
_self.menuIndex = [first_index, second_index];
|
||||
if (_self.button[first_index].sub_button != undefined) {
|
||||
_self.subMenuPlusShow = _self.button[first_index].sub_button.length >= 5 ? false : true;
|
||||
} else {
|
||||
_self.subMenuPlusShow = true;
|
||||
}
|
||||
_self.initMenuInfo();
|
||||
},
|
||||
// 删除菜单
|
||||
deleteMenu: function () {
|
||||
var _self = this;
|
||||
var first_index = _self.menuIndex[0];
|
||||
var second_index = _self.menuIndex[1];
|
||||
|
||||
layer.open({
|
||||
title: '删除确认',
|
||||
content: '确定删除菜单 "' + _self.name + '"?',
|
||||
btn: ['确认', '关闭'],
|
||||
btn1: function () {
|
||||
_self.delMenu(first_index, second_index);
|
||||
},
|
||||
success: function (layero, index) {
|
||||
this.enterEsc = function (event) {
|
||||
if (event.keyCode === 13) {
|
||||
_self.delMenu(first_index, second_index);
|
||||
layer.close(index);
|
||||
return false; // 阻止系统默认事件
|
||||
} else if (event.keyCode === 27) {
|
||||
layer.close(index);
|
||||
return false; // 阻止系统默认事件
|
||||
}
|
||||
};
|
||||
$(document).on('keydown', this.enterEsc); // 监听键盘事件,关闭层
|
||||
},
|
||||
end: function () {
|
||||
$(document).off('keydown', this.enterEsc); // 解除键盘关闭事件
|
||||
}
|
||||
});
|
||||
},
|
||||
chooseMediaType: function (type) {
|
||||
var _self = this;
|
||||
var first_index = _self.menuIndex[0];
|
||||
var second_index = _self.menuIndex[1];
|
||||
switch (type) {
|
||||
case 1 :
|
||||
_self.setValue('media_type', 'graphic_message');
|
||||
_self.media_type = 'graphic_message';
|
||||
break;
|
||||
case 2 :
|
||||
_self.setValue('media_type', 'picture');
|
||||
_self.media_type = 'picture';
|
||||
break;
|
||||
case 3 :
|
||||
_self.setValue('media_type', 'audio');
|
||||
_self.media_type = 'audio';
|
||||
break;
|
||||
case 4 :
|
||||
_self.setValue('media_type', 'video');
|
||||
_self.media_type = 'video';
|
||||
break;
|
||||
case 5 :
|
||||
_self.setValue('media_type', 'text');
|
||||
_self.media_type = 'text';
|
||||
break;
|
||||
}
|
||||
},
|
||||
material: function (type) {
|
||||
switch (type) {
|
||||
case 1 :
|
||||
material(1);
|
||||
break;
|
||||
case 2 :
|
||||
material(2);
|
||||
break;
|
||||
case 3 :
|
||||
break;
|
||||
case 4 :
|
||||
break;
|
||||
case 5 :
|
||||
material(5);
|
||||
break;
|
||||
}
|
||||
},
|
||||
// 添加素材
|
||||
addMaterial: function (type) {
|
||||
switch (type) {
|
||||
case 1 :
|
||||
window.open(ns.href("wechat://shop/material/add"));
|
||||
break;
|
||||
case 2 :
|
||||
uploadSingle();
|
||||
break;
|
||||
case 3 :
|
||||
break;
|
||||
case 4 :
|
||||
break;
|
||||
case 5 :
|
||||
addMaterial(5);
|
||||
break;
|
||||
}
|
||||
},
|
||||
// 删除素材
|
||||
deleteMaterial: function (type) {
|
||||
var _self = this;
|
||||
switch (type) {
|
||||
case 1 :
|
||||
_self.setValue('media_id', '');
|
||||
_self.setValue('graphic_message', []);
|
||||
_self.graphic_message = [];
|
||||
break;
|
||||
case 2 :
|
||||
_self.setValue('media_id', '');
|
||||
_self.setValue('picurl', '');
|
||||
_self.picurl = '';
|
||||
break;
|
||||
case 3 :
|
||||
break;
|
||||
case 4 :
|
||||
break;
|
||||
case 5 :
|
||||
_self.setValue('media_id', '');
|
||||
_self.setValue('text', '');
|
||||
_self.text = '';
|
||||
break;
|
||||
}
|
||||
},
|
||||
// 预览图文
|
||||
preview: function (id, index = 0) {
|
||||
preview(id, index);
|
||||
},
|
||||
// 预览文本
|
||||
previewText: function (text) {
|
||||
previewText(text);
|
||||
},
|
||||
// 预览文本
|
||||
previewTexts: function (text) {
|
||||
var index = this.menuIndex[0];
|
||||
var subIndex = this.menuIndex[1];
|
||||
if(subIndex >= 0){
|
||||
previewTexts(text, this.button[index].sub_button[subIndex]['media_id'], index, subIndex, 2);
|
||||
}else{
|
||||
previewTexts(text, this.button[index]['media_id'], index, subIndex, 1);
|
||||
}
|
||||
},
|
||||
setValue: function (menu_key, menu_value) {
|
||||
var index = this.menuIndex[0];
|
||||
var subIndex = this.menuIndex[1];
|
||||
if (subIndex >= 0) {
|
||||
this.button[index].sub_button[subIndex][menu_key] = menu_value;
|
||||
} else {
|
||||
this.button[index][menu_key] = menu_value;
|
||||
}
|
||||
},
|
||||
initMenuInfo: function () {
|
||||
var _self = this;
|
||||
var index = _self.menuIndex[0];
|
||||
var subIndex = _self.menuIndex[1];
|
||||
var info;
|
||||
if (subIndex >= 0) {
|
||||
info = _self.button[index].sub_button[subIndex];
|
||||
} else {
|
||||
info = _self.button[index];
|
||||
}
|
||||
|
||||
_self.name = info.name ? info.name : '';
|
||||
_self.type = info.type ? info.type : '';
|
||||
_self.key = info.key ? info.key : '';
|
||||
_self.url = info.url ? info.url : '';
|
||||
_self.media_type = info.media_type ? info.media_type : '';
|
||||
_self.media_id = info.media_id ? info.media_id : '';
|
||||
_self.appid = info.appid ? info.appid : '';
|
||||
_self.pagepath = info.pagepath ? info.pagepath : '';
|
||||
_self.picurl = info.picurl ? info.picurl : '';
|
||||
_self.text = info.text ? info.text : '';
|
||||
_self.graphic_message = info.graphic_message ? info.graphic_message : [];
|
||||
|
||||
},
|
||||
// 执行删除
|
||||
delMenu: function (first_index, second_index) {
|
||||
var _self = this;
|
||||
if (second_index == -1) {
|
||||
var length = _self.button.length;
|
||||
_self.button.splice(first_index, 1);
|
||||
if (length == 1) {
|
||||
this.menuIndex[0] = -1;
|
||||
}
|
||||
first_index = first_index == length - 1 ? first_index - 1 : first_index;
|
||||
length = length - 1 <= 0 ? -1 : length;
|
||||
} else {
|
||||
var length = _self.button[first_index].sub_button.length;
|
||||
_self.button[first_index].sub_button.splice(second_index, 1);
|
||||
second_index = second_index == length - 1 ? second_index - 1 : second_index;
|
||||
if (length == 1) {
|
||||
_self.button[first_index].media_type = 'text';
|
||||
_self.button[first_index].type = 'media';
|
||||
}
|
||||
}
|
||||
layer.msg('成功删除菜单 "' + _self.name + '"', {icon: 1});
|
||||
if (length != -1) _self.chooseMenu(first_index, second_index);
|
||||
},
|
||||
// 加载自定义菜单
|
||||
loadMenu: function () {
|
||||
var _self = this;
|
||||
$.ajax({
|
||||
//TODO 有的客户服务器在加载了html页面后再相同地址请求数据会无法识别为json请求,所以加个数据做区分就不会有问题
|
||||
url: ns.url('wechat://shop/menu/menu', {type:'json'}),
|
||||
data: {},
|
||||
dataType: "JSON",
|
||||
success: function (res) {
|
||||
if (res.code != 0) {
|
||||
layer.msg(res.message);
|
||||
}
|
||||
res = res.data;
|
||||
try {
|
||||
var data = {};
|
||||
if (res.value == '') return false;
|
||||
if (res.value.button == undefined || res.value.button == '' || res.value.button == null) {
|
||||
return false;
|
||||
}
|
||||
_self.button = res.value.button;
|
||||
_self.menuIndex[-1, -1];
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
layer.msg('加载失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
// 保存自定义菜单
|
||||
saveMenu: function () {
|
||||
var _self = this;
|
||||
var value = {};
|
||||
var json_data = {};
|
||||
var button = JSON.parse(JSON.stringify(_self.button));
|
||||
|
||||
if (!_self.verification(button)[0]) {
|
||||
return;
|
||||
}
|
||||
var button_backup = JSON.parse(JSON.stringify(button));
|
||||
value.button = button;
|
||||
value = JSON.stringify(value);
|
||||
|
||||
json_data.button = _self.dataProcessing(button_backup);
|
||||
json_data = JSON.stringify(json_data);
|
||||
$.ajax({
|
||||
url: ns.url("wechat://shop/menu/edit"),
|
||||
data: {value, json_data},
|
||||
dataType: "JSON",
|
||||
success: function (res) {
|
||||
layer.msg(res.message);
|
||||
},
|
||||
error: function (e) {
|
||||
layer.msg('保存失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
// 输入名称验证
|
||||
checkName: function (e, type = '') {
|
||||
var _self = this;
|
||||
var str = e.target.value;
|
||||
_self.error_hint = '';
|
||||
|
||||
if (str == '') {
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == 'sub_button') {
|
||||
var res = /^[a-zA-Z-0-9]{1,16}$/.test((str + '').replace(/[\u4e00-\u9fa5]/g, 'aa'));
|
||||
if (!res) {
|
||||
layer.msg('菜单名称不可超过8个汉字或16个字母');
|
||||
_self.error_hint = 'name';
|
||||
_self.name = subStringLen(_self.name, 16);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
var res = /^[a-zA-Z-0-9]{1,8}$/.test((str + '').replace(/[\u4e00-\u9fa5]/g, 'aa'));
|
||||
if (!res) {
|
||||
layer.msg('菜单名称不可超过4个汉字或8个字母');
|
||||
_self.error_hint = 'name';
|
||||
_self.name = subStringLen(_self.name, 8);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
verification: function (button, _times = 0) {
|
||||
var _self = this;
|
||||
var _flag = true;
|
||||
var _index = -1;
|
||||
var _arr = [];
|
||||
for (var index in button) {
|
||||
var value = button[index];
|
||||
if (value.sub_button == undefined || value.sub_button == null || value.sub_button.length == 0) {
|
||||
|
||||
if (value.name == '' || value.name == undefined) {
|
||||
_flag = false;
|
||||
_index = index;
|
||||
layer.msg('请输入菜单名称');
|
||||
break;
|
||||
}
|
||||
|
||||
if (value.type == '' || value.type == undefined) {
|
||||
_flag = false;
|
||||
_index = index;
|
||||
layer.msg('请选择菜单内容');
|
||||
break;
|
||||
}
|
||||
|
||||
if (value.type == 'view') {
|
||||
delete value.key;
|
||||
delete value.appid;
|
||||
delete value.pagepath;
|
||||
delete value.media_type;
|
||||
delete value.media_id;
|
||||
delete value.picurl;
|
||||
delete value.graphic_message;
|
||||
delete value.text;
|
||||
if (value.url == '' || value.url == undefined) {
|
||||
_flag = false;
|
||||
_index = index;
|
||||
layer.msg('页面地址不可为空');
|
||||
break;
|
||||
}
|
||||
|
||||
if (value.url.indexOf('https://') != 0 && value.url.indexOf('http://') != 0) {
|
||||
_flag = false;
|
||||
_index = index;
|
||||
layer.msg('请输入 http:// 或 https:// 为前缀的有效地址');
|
||||
break;
|
||||
}
|
||||
|
||||
} else if (value.type == 'miniprogram') {
|
||||
delete value.key;
|
||||
delete value.media_type;
|
||||
delete value.media_id;
|
||||
delete value.picurl;
|
||||
delete value.graphic_message;
|
||||
delete value.text;
|
||||
if (value.url == '' || value.url == undefined) {
|
||||
_flag = false;
|
||||
_index = index;
|
||||
layer.msg('备用网页不可为空');
|
||||
break;
|
||||
}
|
||||
|
||||
if (value.url.indexOf('https://') != 0 && value.url.indexOf('http://') != 0) {
|
||||
_flag = false;
|
||||
_index = index;
|
||||
layer.msg('请输入 http:// 或 https:// 为前缀的有效地址');
|
||||
break;
|
||||
}
|
||||
|
||||
if (value.appid == '' || value.appid == undefined) {
|
||||
_flag = false;
|
||||
_index = index;
|
||||
layer.msg('小程序appid不可为空');
|
||||
break;
|
||||
}
|
||||
|
||||
if (value.pagepath == '' || value.pagepath == undefined) {
|
||||
_flag = false;
|
||||
_index = index;
|
||||
layer.msg('小程序页面路径不可为空');
|
||||
break;
|
||||
}
|
||||
} else if (value.type == 'media') {
|
||||
delete value.key;
|
||||
delete value.appid;
|
||||
delete value.pagepath;
|
||||
delete value.url;
|
||||
if (value.media_type == 'graphic_message') {
|
||||
delete value.picurl;
|
||||
delete value.text;
|
||||
if (value.graphic_message == undefined || value.graphic_message[0] == undefined) {
|
||||
_flag = false;
|
||||
_index = index;
|
||||
layer.msg('图文消息不可为空');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (value.media_type == 'picture') {
|
||||
delete value.graphic_message;
|
||||
delete value.text;
|
||||
if (value.picurl == undefined || value.picurl == undefined) {
|
||||
_flag = false;
|
||||
_index = index;
|
||||
layer.msg('图片素材不可为空');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (value.media_type == 'text') {
|
||||
delete value.picurl;
|
||||
delete value.graphic_message;
|
||||
if (value.text == '' || value.text == undefined) {
|
||||
_flag = false;
|
||||
_index = index;
|
||||
layer.msg('文本素材不可为空');
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
_index = index;
|
||||
_arr = _self.verification(value.sub_button, 1);
|
||||
if (!_arr[0]) {
|
||||
_flag = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!_flag) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (_times == 0 && !_flag) {
|
||||
if (_arr[0] != undefined && !_arr[0]) {
|
||||
_flag = false;
|
||||
_self.chooseMenu(_index, _arr[1]);
|
||||
} else {
|
||||
_self.chooseMenu(_index, -1);
|
||||
}
|
||||
}
|
||||
|
||||
return [_flag, _index, button];
|
||||
},
|
||||
//media 事件 转换为 click 事件
|
||||
dataProcessing: function (buttons) {
|
||||
var _self = this;
|
||||
for (var first_index in buttons) {
|
||||
if (first_index == 'indexOfElem' || first_index == 'removeElem') {
|
||||
delete buttons[first_index];
|
||||
continue;
|
||||
}
|
||||
if (buttons[first_index].sub_button == undefined || buttons[first_index].sub_button == null || buttons[first_index].sub_button.length == 0) {
|
||||
delete buttons[first_index].sub_button;
|
||||
if (buttons[first_index].type == 'media') {
|
||||
delete buttons[first_index].media_type;
|
||||
delete buttons[first_index].picurl;
|
||||
delete buttons[first_index].text;
|
||||
delete buttons[first_index].graphic_message;
|
||||
buttons[first_index].type = 'click';
|
||||
buttons[first_index].key = buttons[first_index].media_id;
|
||||
delete buttons[first_index].media_id;
|
||||
}
|
||||
} else {
|
||||
for (var second_index in buttons[first_index].sub_button) {
|
||||
if (buttons[first_index].sub_button[second_index].type == 'media') {
|
||||
delete buttons[first_index].sub_button[second_index].media_type;
|
||||
delete buttons[first_index].sub_button[second_index].picurl;
|
||||
delete buttons[first_index].sub_button[second_index].text;
|
||||
delete buttons[first_index].sub_button[second_index].graphic_message;
|
||||
buttons[first_index].sub_button[second_index].type = 'click';
|
||||
buttons[first_index].sub_button[second_index].key = buttons[first_index].sub_button[second_index].media_id;
|
||||
delete buttons[first_index].sub_button[second_index].media_id;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return buttons;
|
||||
},
|
||||
// 菜单拖拽移动
|
||||
// dragMove(e, index){
|
||||
// var _self = this;
|
||||
// var button = _self.button;
|
||||
// var menuIndex = _self.menuIndex;
|
||||
//
|
||||
// var length = button.length;
|
||||
//
|
||||
// if (length != undefined && length > 1) {
|
||||
// var odiv = e.target;
|
||||
// var disX = e.clientX;
|
||||
// var ele = $('.wx-menu-item-box-' + index);
|
||||
// // var min = 0 - index * 93.67;
|
||||
// // var max = 0 + (length - index - 1) * 93.67;
|
||||
// ele.css({'left': 0, 'z-index': 0, 'opacity' : 1});
|
||||
// document.onmousemove = (e)=>{
|
||||
// var left = e.clientX - disX;
|
||||
// if (index == 0) {
|
||||
// if (left > 47 && left < 94) {
|
||||
// var new_item = button[index];
|
||||
// button[index] = button[index + 1];
|
||||
// button[index + 1] = new_item;
|
||||
// console.log(button);
|
||||
// console.log();
|
||||
// _self.button = button;
|
||||
// _self.menuIndex[0] = index + 1;
|
||||
// _self.initMenuInfo();
|
||||
// console.log(_self.button);
|
||||
// }
|
||||
// } else if (index == 1) {
|
||||
//
|
||||
// } else {
|
||||
//
|
||||
// }
|
||||
// ele.css({'left': left + 'px', 'z-index': 10});
|
||||
// if ((left > 5 || left < -5) && _self.change_active !== false) {
|
||||
// _self.change_active = false;
|
||||
// }
|
||||
// };
|
||||
// document.onmouseup = (e) => {
|
||||
// ele.css({'left': 0, 'z-index': 0, 'opacity' : 1});
|
||||
// document.onmousemove = null;
|
||||
// document.onmouseup = null;
|
||||
// };
|
||||
// }
|
||||
// },
|
||||
// // 子菜单拖拽移动
|
||||
// dragMoveItem(e, second_index){
|
||||
// var _self = this;
|
||||
// var button = _self.button;
|
||||
// var menuIndex = _self.menuIndex;
|
||||
// var index = menuIndex[0];
|
||||
// var length = button[index].sub_button.length;
|
||||
// // var min = 0 - second_index * 50;
|
||||
// // var max = 0 + (length - second_index - 1) * 50;
|
||||
// if (length != undefined && length > 1) {
|
||||
// var odiv = e.target;
|
||||
// var disY = e.clientY;
|
||||
// var ele = $('.wx-sub-menu-item-' + second_index);
|
||||
// ele.css({'top': 0, 'z-index': 0, 'opacity' : 1});
|
||||
// document.onmousemove = (e)=>{
|
||||
// var top = e.clientY - disY;
|
||||
// ele.css({'top': top, 'z-index': 10});
|
||||
// if ((top > 5 || top < -5) && _self.change_active !== false) {
|
||||
// _self.change_active = false;
|
||||
// }
|
||||
// };
|
||||
// document.onmouseup = (e) => {
|
||||
// ele.css({'top': 0, 'z-index': 0, 'opacity' : 1});
|
||||
// document.onmousemove = null;
|
||||
// document.onmouseup = null;
|
||||
// };
|
||||
// }
|
||||
// }
|
||||
},
|
||||
});
|
||||
|
||||
$(function () {
|
||||
setTimeout(function () {
|
||||
menu.loadMenu();
|
||||
}, 50)
|
||||
});
|
||||
|
||||
/**
|
||||
* 单图上传回调
|
||||
*
|
||||
* @param _data
|
||||
* @param _name
|
||||
*/
|
||||
function singleImageUploadSuccess(_data, _name) {
|
||||
if (_data.path != undefined) {
|
||||
layer.closeAll('page');
|
||||
loading_index = layer.load(2, {time: 10 * 1000});
|
||||
$.ajax({
|
||||
type: 'post',
|
||||
url: ns.url('wechat://shop/material/add'),
|
||||
dataType: "JSON",
|
||||
data: {
|
||||
'type': 2,
|
||||
'path': _data.path,
|
||||
'title': _data.file_name
|
||||
},
|
||||
success: function (res) {
|
||||
layer.msg(res.message);
|
||||
layer.close(loading_index);
|
||||
if (res.code == 0) {
|
||||
menu.setValue('media_id', 'MATERIAL_PICTURE_' + res.data);
|
||||
menu.setValue('picurl', ns.img(_data.path));
|
||||
menu.picurl = ns.img(_data.path);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 图片素材选择回调
|
||||
*/
|
||||
function materialPicCallBack(_data) {
|
||||
menu.setValue('media_id', 'MATERIAL_PICTURE_' + _data.file_id);
|
||||
menu.setValue('picurl', _data.path);
|
||||
menu.picurl = _data.path;
|
||||
}
|
||||
|
||||
/**
|
||||
* 图文选择回调
|
||||
* @param _data
|
||||
*/
|
||||
function chooseGraphicMessage(_data) {
|
||||
var graphic_message = new Array();
|
||||
for (var index in _data.value) {
|
||||
graphic_message[index] = {};
|
||||
graphic_message[index].title = _data.value[index].title;
|
||||
graphic_message[index].id = _data.id;
|
||||
}
|
||||
menu.setValue('media_id', 'MATERIAL_GRAPHIC_MESSAGE_' + _data.id);
|
||||
menu.setValue('graphic_message', graphic_message);
|
||||
menu.graphic_message = graphic_message;
|
||||
}
|
||||
|
||||
/**
|
||||
* 文本选择回调
|
||||
*/
|
||||
function chooseTextMessage(_data) {
|
||||
menu.setValue('media_id', 'MATERIAL_TEXT_MESSAGE_' + _data.id);
|
||||
menu.setValue('text', _data.value.content);
|
||||
menu.text = _data.value.content;
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加文本回调
|
||||
*/
|
||||
function textMessageAddSuccess(_data) {
|
||||
menu.setValue('media_id', 'MATERIAL_TEXT_MESSAGE_' + _data.id);
|
||||
menu.setValue('text', _data.value.content);
|
||||
menu.text = _data.value.content;
|
||||
}
|
||||
|
||||
function subStringLen(str, len) {
|
||||
var regexp = /[^\x00-\xff]/g;
|
||||
if (str.replace(regexp, "aa").length <= len) {
|
||||
return str;
|
||||
}
|
||||
var m = Math.floor(len / 2);
|
||||
for (var i = m, j = str.length; i < j; i++) {
|
||||
if (str.substring(0, i).replace(regexp, "aa").length >= len) {
|
||||
return str.substring(0, i);
|
||||
}
|
||||
}
|
||||
return str;
|
||||
}
|
||||
139
addon/wechat/shop/view/public/js/wx_qrcode.js
Executable file
@@ -0,0 +1,139 @@
|
||||
$(document).ready(function() {
|
||||
var fontSize = $("#font_size").val();
|
||||
$(".tdrag-name").css("fontSize", fontSize + 'px');
|
||||
|
||||
$(".tdrag-header").Tdrag({
|
||||
scope: "#divBlock"
|
||||
});
|
||||
|
||||
$(".tdrag-logo").Tdrag({
|
||||
scope: "#divBlock"
|
||||
});
|
||||
|
||||
$(".tdrag-code").Tdrag({
|
||||
scope: "#divBlock"
|
||||
});
|
||||
|
||||
$(".tdrag-name").Tdrag({
|
||||
scope: "#divBlock"
|
||||
});
|
||||
});
|
||||
|
||||
layui.use(['form', 'colorpicker'], function() {
|
||||
var form = layui.form,
|
||||
colorpicker = layui.colorpicker,
|
||||
repeat_flag = false; //防重复标识
|
||||
|
||||
/**
|
||||
* 监听保存
|
||||
*/
|
||||
form.on('submit(save)', function(data) {
|
||||
if (repeat_flag) return false;
|
||||
repeat_flag = true;
|
||||
var field = data.field;
|
||||
if(field.is_logo_show == 'on'){
|
||||
field.is_logo_show = 1;
|
||||
}else{
|
||||
field.is_logo_show = 0;
|
||||
}
|
||||
field.header_left = $("#header").position().left;
|
||||
field.header_top = $("#header").position().top;
|
||||
field.name_left = $("#name").position().left;
|
||||
field.name_top = $("#name").position().top;
|
||||
field.logo_left = $("#logo").position().left;
|
||||
field.logo_top = $("#logo").position().top;
|
||||
field.code_left = $("#code").position().left;
|
||||
field.code_top = $("#code").position().top;
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: url,
|
||||
data: field,
|
||||
dataType: 'JSON',
|
||||
success: function(res) {
|
||||
layer.msg(res.message);
|
||||
location.hash = ns.hash("wechat://shop/wechat/qrcode");
|
||||
repeat_flag = false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* 图片上传
|
||||
*/
|
||||
var posterWidth = 640, posterHeight = 1134;
|
||||
|
||||
var upload = new Upload({
|
||||
elem: '#background',
|
||||
auto: false,
|
||||
choose: function(obj) {
|
||||
obj.preview(function(index, file, result) {
|
||||
var img = new Image();
|
||||
img.onload = function() {
|
||||
if (posterWidth == img.width && posterHeight == img.height) {
|
||||
obj.upload(index, file);
|
||||
} else {
|
||||
layer.msg('海报尺寸必须为:' + posterWidth + 'px * ' + posterHeight + 'px');
|
||||
return false;
|
||||
}
|
||||
};
|
||||
img.src = result;
|
||||
});
|
||||
},
|
||||
callback: function(res) {
|
||||
if (res.code >= 0) {
|
||||
$("#imgLogo").attr("src", ns.img(res.data.pic_path));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* 文字颜色
|
||||
*/
|
||||
colorpicker.render({
|
||||
elem: '#font_color', //绑定元素
|
||||
color: default_color,
|
||||
done: function(color) {
|
||||
$(".tdrag-name").css("color", color);
|
||||
$("input[name='nick_font_color']").val(color);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* 监听字体变化
|
||||
*/
|
||||
$("input[name=nick_font_size]").blur(function() {
|
||||
$("#name").css("fontSize", $(this).val() + "px");
|
||||
});
|
||||
|
||||
/**
|
||||
* 表单验证
|
||||
*/
|
||||
form.verify({
|
||||
int: function(value) {
|
||||
if (value == "") {
|
||||
return false;
|
||||
}
|
||||
if (value < 0 || !(value % 1 === 0)) {
|
||||
return '请输入大于0的整数'
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* 是否显示logo
|
||||
*/
|
||||
form.on('switch(logo)', function(data){
|
||||
if(data.elem.checked) {
|
||||
//开
|
||||
$('#logo').show();
|
||||
}else {
|
||||
//关
|
||||
$('#logo').hide();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function backWechatQrcode() {
|
||||
location.hash = ns.hash("wechat://shop/wechat/qrcode");
|
||||
}
|
||||
676
addon/wechat/shop/view/public/js/wx_replay.js
Executable file
@@ -0,0 +1,676 @@
|
||||
var form;
|
||||
layui.use('form', function() {
|
||||
form = layui.form;
|
||||
form.render();
|
||||
});
|
||||
|
||||
/**
|
||||
* 微信回复
|
||||
*/
|
||||
WxReplay = function (limit = 0, limits = []) {
|
||||
var _this = this;
|
||||
_this._dom = null;
|
||||
_this.eventFlg = true;
|
||||
_this.listCount = 0;
|
||||
_this.limit = limit == false ? 15 : limit;
|
||||
_this.limits = limit == false ? [15, 20, 50] : limits;
|
||||
|
||||
var page = 1;
|
||||
var hash_arr = getHashArr();
|
||||
$.each(hash_arr,function(index, itemobj){
|
||||
var item_arr = itemobj.split("=");
|
||||
if(item_arr.length == 2){
|
||||
switch(item_arr[0]){
|
||||
case "page":
|
||||
page = item_arr[1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
_this.page = page;
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取关键词回复列表
|
||||
*/
|
||||
WxReplay.prototype.getData = function (d) {
|
||||
var _this = d._this;
|
||||
var page = _this.page;
|
||||
var limit = _this.limit;
|
||||
var rule_type = d.rule_type;
|
||||
var search_text = d.search_text == null ? {} : d.search_text;
|
||||
_this.sendAjax({
|
||||
url: ns.url('wechat://shop/replay/replay'),
|
||||
async: false,
|
||||
data: {"page": page, "limit": limit, "rule_type": rule_type, "search_text": search_text},
|
||||
dataType: "JSON",
|
||||
success: function (data) {
|
||||
_this.listCount = data.data.count;
|
||||
_this.aD.addReplayList(data.data);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* layui分页
|
||||
*/
|
||||
WxReplay.prototype.pageInit = function (d) {
|
||||
var _this = d._this;
|
||||
|
||||
layui.use('laypage', function () {
|
||||
var laypage = layui.laypage;
|
||||
laypage.render({
|
||||
elem: 'list_page',
|
||||
count: _this.listCount,
|
||||
limit: _this.limit,
|
||||
limits: _this.limits,
|
||||
layout: ns.get_page_param().layout,
|
||||
prev: '<i class="layui-icon layui-icon-left"></i>',
|
||||
next: '<i class="layui-icon layui-icon-right"></i>',
|
||||
curr: _this.page,
|
||||
jump: function (obj, first) {
|
||||
_this.limit = obj.limit;
|
||||
if (!first) {
|
||||
_this.page = obj.curr;
|
||||
_this.getData({_this: _this, "rule_type": 'KEYWORDS'});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 事件操作
|
||||
* @param e 事件对象
|
||||
*/
|
||||
WxReplay.prototype.e = function (e) {
|
||||
try {
|
||||
//_this为replay对象 //_dom 为元素dom
|
||||
var _this = e.data._this;
|
||||
_this._dom = e.target;
|
||||
var eventFlg = _this.eventFlg;
|
||||
if (!eventFlg) return;
|
||||
_this.eventFlg = false;
|
||||
var _dom = e.target;
|
||||
var dataEvent = $(_dom).attr("nc-event");
|
||||
var dataAction = $(_dom).attr("nc-action");
|
||||
var type = e.type;
|
||||
if (dataEvent != type) {
|
||||
if ($(_dom).attr("nc-event2") != type) {
|
||||
_this.eventFlg = true;
|
||||
return;
|
||||
} else {
|
||||
dataEvent = $(_dom).attr("nc-event2");
|
||||
dataAction = $(_dom).attr("nc-action2");
|
||||
}
|
||||
}
|
||||
|
||||
var eventObj = null;
|
||||
switch (dataEvent) {
|
||||
case "click":
|
||||
eventObj = _this.clickEvent;
|
||||
break;
|
||||
case "mouseenter" :
|
||||
eventObj = _this.mouseenterEvent;
|
||||
break;
|
||||
case "mouseleave" :
|
||||
eventObj = _this.mouseleaveEvent;
|
||||
break;
|
||||
}
|
||||
if (eventObj) {
|
||||
|
||||
_this.evalFun(eventObj, dataAction, {"_this": _this});
|
||||
|
||||
_this.eventFlg = true;
|
||||
}
|
||||
|
||||
} catch (e) {
|
||||
_this.eventFlg = true;
|
||||
console.log(e);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 点击事件
|
||||
*/
|
||||
WxReplay.prototype.clickEvent = {
|
||||
click: function () {},
|
||||
|
||||
//添加回复
|
||||
addRule: function (d) {
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: "新建自动回复",
|
||||
area: ['450px'],
|
||||
offset: "auto",
|
||||
content: $("#add_auto_replay").html(),
|
||||
success: function(layero, index) {
|
||||
$(layero).find("input[name='rule_id']").val(0);
|
||||
$(layero).find("input[name='layer_index']").val(index);
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
editRule: function (d) {
|
||||
var _this = d._this;
|
||||
var _dom = _this._dom;
|
||||
var rule_id = $(_dom).parents(".rule-group").attr("data-rule_id");
|
||||
var ruke_name = $(_dom).attr('data-ruke_name');
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: "修改自动回复",
|
||||
area: ['450px'],
|
||||
offset: "auto",
|
||||
content: $("#add_auto_replay").html(),
|
||||
success: function (layero, index) {
|
||||
$(layero).find("button[type='reset']").hide();
|
||||
$(layero).find("input[name='rule_id']").val(rule_id);
|
||||
$(layero).find("input[name='layer_index']").val(index);
|
||||
$(layero).find("input[name='key_rule_name']").val(ruke_name);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
delRule: function (d) {
|
||||
var _this = d._this;
|
||||
var _dom = _this._dom;
|
||||
var rule_id = $(_dom).parents(".rule-group").attr("data-rule_id");
|
||||
var flag = true;
|
||||
var index = layer.open({
|
||||
type: 1,
|
||||
title: "删除",
|
||||
offset: "auto",
|
||||
content: ' 确定要删除规则吗?'
|
||||
, btn: ['确定', '取消']
|
||||
, yes: function (index, layero) {
|
||||
if (!flag) return;
|
||||
flag = false;
|
||||
_this.sendAjax({
|
||||
url: ns.url('wechat://shop/replay/deleteRule'),
|
||||
data: {"rule_id": rule_id},
|
||||
success: function (res) {
|
||||
layer.msg(res.message);
|
||||
if (res.code >= 0) {
|
||||
//关闭弹出层
|
||||
listenerHash(); // 刷新页面
|
||||
layer.closeAll();
|
||||
}
|
||||
}
|
||||
});
|
||||
flag = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//添加关键词
|
||||
addKeywords: function (d) {
|
||||
var _this = d._this;
|
||||
var _dom = _this._dom;
|
||||
var rule_id = $(_dom).parents(".rule-group").attr("data-rule_id");
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: "添加关键词",
|
||||
area: ['450px'],
|
||||
offset: "auto",
|
||||
content: $("#add_keywords").html(),
|
||||
success: function (layero, index) {
|
||||
form.render();
|
||||
$(layero).find("input[name='layer_index']").val(index);
|
||||
$(layero).find("input[name='rule_id']").val(rule_id);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//编辑关键词
|
||||
editKeywords: function (d) {
|
||||
var _this = d._this;
|
||||
var _dom = _this._dom;
|
||||
var rule_id = $(_dom).parents(".rule-group").attr("data-rule_id");
|
||||
var key_id = $(_dom).attr('data-key_id');
|
||||
var keyword_name = $(_dom).attr('keyword_name');
|
||||
var keywords_type = $(_dom).parent().find('.add-on').attr("keyword_type");
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: "添加关键词",
|
||||
area: ['450px'],
|
||||
offset: "auto",
|
||||
content: $("#add_keywords").html(),
|
||||
success: function (layero, index) {
|
||||
form.render();
|
||||
$(layero).find("input[name='layer_index']").val(index);
|
||||
$(layero).find("input[name='rule_id']").val(rule_id);
|
||||
$(layero).find("input[name='key_id']").val(key_id);
|
||||
$(layero).find("input[name='keywords_name']").val(keyword_name);
|
||||
$(layero).find("input[name='keywords_type']").each(function (i, item) {
|
||||
if ($(item).val() == keywords_type) {
|
||||
$(item).prop('checked', true);
|
||||
form.render();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//删除关键词
|
||||
delKeywords: function (d) {
|
||||
var _this = d._this;
|
||||
var _dom = _this._dom;
|
||||
var rule_id = $(_dom).parents(".rule-group").attr("data-rule_id");
|
||||
var key_id = $(_dom).attr("data-key_id");
|
||||
var flag = true;
|
||||
var index = layer.open({
|
||||
type: 1,
|
||||
title: "是否删除关键词",
|
||||
offset: "auto",
|
||||
content: ''
|
||||
, btn: ['保存', '返回']
|
||||
, yes: function (index, layero) {
|
||||
if (!flag) return;
|
||||
flag = false;
|
||||
_this.sendAjax({
|
||||
url: ns.url('wechat://shop/replay/deleteKeywords'),
|
||||
data: {"rule_id": rule_id, "key_id": key_id},
|
||||
success: function (res) {
|
||||
layer.msg(res.message);
|
||||
if (res.code >= 0) {
|
||||
//关闭弹出层
|
||||
listenerHash(); // 刷新页面
|
||||
layer.closeAll();
|
||||
}
|
||||
}
|
||||
});
|
||||
flag = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//添加一条回复
|
||||
addReply: function (d) {
|
||||
var _this = d._this;
|
||||
var _dom = _this._dom;
|
||||
var rule_id = $(_dom).parents(".rule-group").attr("data-rule_id");
|
||||
var key_id = $(_dom).attr('data-key_id');
|
||||
var reply_content = $(_dom).attr('reply_content');
|
||||
|
||||
var index = layer.open({
|
||||
type: 1,
|
||||
title: "添加自动回复",
|
||||
area: ['450px'],
|
||||
offset: "auto",
|
||||
content: $("#add_reply").html(),
|
||||
success: function (layero, index) {
|
||||
$(layero).find("input[name='layer_index']").val(index);
|
||||
$(layero).find("input[name='rule_id']").val(rule_id);
|
||||
$(".image,.voice").css("display", "inline-block");
|
||||
$(".image,.voice").next("span").css("display", "inline-block");
|
||||
$(".complex-backdrop").css("display", "none"); //清空文本框
|
||||
$(layero).find("textarea[name='reply_content']").val("");
|
||||
},
|
||||
cancel: function(){
|
||||
$('.complex-backdrop').css("display", "none");
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
//编辑回复
|
||||
editReply: function (d) {
|
||||
var _this = d._this;
|
||||
var _dom = _this._dom;
|
||||
var rule_id = $(_dom).parents(".rule-group").attr("data-rule_id");
|
||||
var key_id = $(_dom).attr('data-key_id');
|
||||
var reply_content = $(_dom).attr('reply_content');
|
||||
var request_type = $(_dom).attr('type');
|
||||
$("#hidden_reply_type").val(request_type);
|
||||
|
||||
var index = layer.open({
|
||||
type: 1,
|
||||
title: "修改自动回复",
|
||||
area: ['450px'],
|
||||
offset: "auto",
|
||||
content: $("#add_reply").html(),
|
||||
success: function (layero, index) {
|
||||
$(layero).find("input[name='layer_index']").val(index);
|
||||
$(layero).find("input[name='rule_id']").val(rule_id);
|
||||
$(layero).find("input[name='key_id']").val(key_id);
|
||||
$(layero).find("textarea[name='reply_content']").val(reply_content);
|
||||
|
||||
$(".voice").css("display", "none");
|
||||
$(".voice").next("span").css("display", "none");
|
||||
|
||||
if (request_type == 'image') {
|
||||
var active_pic = '';
|
||||
active_pic += '<div class="ng ng-single ng-image">';
|
||||
active_pic += '<a class="picture" target="_blank" href=""><img src="' + ns.img(reply_content) + '" alt=""/></a>';
|
||||
active_pic += '</div>';
|
||||
|
||||
$(layero).find(".complex-content").html(active_pic);
|
||||
$('.complex-backdrop').css("display", "block");
|
||||
} else if (request_type == 'music') {
|
||||
var active_pic = '';
|
||||
active_pic += '<div class="voice-wrapper" data-voice-src="' + reply_content + '">';
|
||||
active_pic += '<span class="voice-player">';
|
||||
active_pic += '<a href="javascript:;" class="close--circle js-delete-complex">×</a>';
|
||||
active_pic += '<span class="stop">点击播放</span>';
|
||||
active_pic += '<span class="second"></span>';
|
||||
active_pic += '<i class="play" style="display:none;"></i>';
|
||||
active_pic += '</span>';
|
||||
active_pic += '</div>';
|
||||
$(layero).find(".complex-content").html(active_pic);
|
||||
$('.complex-backdrop').css("display", "block");
|
||||
|
||||
} else if (request_type == 'other') {
|
||||
var active_pic = '';
|
||||
active_pic += '<div class="ng ng-single">';
|
||||
active_pic += '<a href="javascript:;" class="close--circle js-delete-complex">×</a>';
|
||||
active_pic += '<div class="ng-item">';
|
||||
active_pic += '<a href="h" target="_blank" class="new-window" title="' + reply_content + '"><span class="label label-success">' + reply_content + '</span></a>';
|
||||
active_pic += '</div>';
|
||||
active_pic += '<div class="ng-item view-more">';
|
||||
active_pic += '<a href="" target="_blank" class="clearfix new-window">';
|
||||
active_pic += '<span class="pull-left">阅读全文</span>';
|
||||
active_pic += '<span class="pull-right">></span>';
|
||||
active_pic += '</a>';
|
||||
active_pic += '</div>';
|
||||
active_pic += '</div>';
|
||||
|
||||
$(layero).find(".complex-content").html(active_pic);
|
||||
$('.complex-backdrop').css("display", "block");
|
||||
} else if (request_type == 'articles') {
|
||||
var active_pic = '';
|
||||
active_pic += '<div class="ng ng-single">';
|
||||
active_pic += '<a href="javascript:;" class="close--circle js-delete-complex">×</a>';
|
||||
active_pic += '<div class="ng-item">';
|
||||
active_pic += '<span class="label label-success">图 文</span>';
|
||||
active_pic += '<div class="ng-title">';
|
||||
active_pic += '<a href="" target="_blank" class="new-window" title="' + reply_content + '">' + reply_content + '</a>';
|
||||
active_pic += '</div>';
|
||||
active_pic += '</div>';
|
||||
active_pic += '<div class="ng-item view-more">';
|
||||
active_pic += '<a href="" target="_blank" class="clearfix new-window">';
|
||||
active_pic += '<span class="pull-left">阅读全文</span>';
|
||||
active_pic += '<span class="pull-right">></span>';
|
||||
active_pic += '</a>';
|
||||
active_pic += '</div>';
|
||||
active_pic += '</div>';
|
||||
|
||||
$(layero).find(".complex-content").html(active_pic);
|
||||
$('.complex-backdrop').css("display", "block");
|
||||
} else {
|
||||
$('.complex-backdrop').css("display", "none");
|
||||
}
|
||||
},
|
||||
cancel: function(){
|
||||
$('.complex-backdrop').css("display", "none");
|
||||
}
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
//删除回复
|
||||
delReply: function (d) {
|
||||
var _this = d._this;
|
||||
var _dom = _this._dom;
|
||||
var rule_id = $(_dom).parents(".rule-group").attr("data-rule_id");
|
||||
var key_id = $(_dom).attr("data-key_id");
|
||||
var flag = true;
|
||||
var index = layer.open({
|
||||
type: 1,
|
||||
title: "删除",
|
||||
offset: "auto",
|
||||
content: '确定删除该条回复吗?'
|
||||
, btn: ['确定', '取消']
|
||||
, yes: function (index, layero) {
|
||||
if (!flag) return;
|
||||
flag = false;
|
||||
_this.sendAjax({
|
||||
url: ns.url('wechat://shop/replay/deleteReply'),
|
||||
data: {"rule_id": rule_id, "key_id": key_id},
|
||||
success: function (res) {
|
||||
layer.msg(res.message);
|
||||
if (res.code >= 0) {
|
||||
//关闭弹出层
|
||||
listenerHash(); // 刷新页面
|
||||
layer.closeAll();
|
||||
}
|
||||
}
|
||||
});
|
||||
flag = true;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
//音乐
|
||||
music: function (d) {
|
||||
$("#hidden_reply_type").val('music');
|
||||
$(".complex-backdrop").css("display", "none"); //清空文本框
|
||||
$("textarea[name='reply_content']").val("");
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: '音乐素材',
|
||||
area: ['850px'],
|
||||
offset: "auto",
|
||||
content: $("#music").html()
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* 移入事件
|
||||
*/
|
||||
WxReplay.prototype.mouseenterEvent = {
|
||||
groupEnter: function (d) {
|
||||
var _this = d._this;
|
||||
var _dom = _this._dom;
|
||||
$(_dom).css({"border": "2px solid #333"});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 移出事件
|
||||
*/
|
||||
WxReplay.prototype.mouseleaveEvent = {};
|
||||
|
||||
/**
|
||||
* 执行传过来的方法
|
||||
* @param eventObj
|
||||
* @param funcName
|
||||
* @param d
|
||||
*/
|
||||
WxReplay.prototype.evalFun = function (eventObj, funcName, d = {}) {
|
||||
for (i in eventObj) {
|
||||
if (i == funcName) {
|
||||
eval(eventObj[i](d));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 元素操作 da(documentAction)
|
||||
*/
|
||||
WxReplay.prototype.aD = {
|
||||
|
||||
addReplayList: function (d) {
|
||||
var data = d.list;
|
||||
var html = '';
|
||||
$.each(data, function (i) {
|
||||
var d = data[i];
|
||||
html += '<div class="rule-group layui-row" data-rule_id="' + d.rule_id + '">';
|
||||
html += '<div class="rule-meta bg-color-light-9">';
|
||||
html += '<h3><span class="rule-name">' + d.rule_name + '</span><div class="rule-opts"><a href="javascript:;" class="js-edit-rule js-replay" nc-event="click" nc-action="editRule" data- data-id="' + d.rule_id + '" data-ruke_name="' + d.rule_name + '">编辑</a><span> - </span><a href="javascript:;" class="js-del-rule js-replay" data-id="' + d.rule_id + '" nc-event="click" nc-action="delRule">删除</a></div></h3>';//title
|
||||
html += '</div>';
|
||||
html += '<div class="rule-body">';
|
||||
html += '<div class="long-dashed"></div>';
|
||||
html += '<div class="rule-keywords layui-col-md5">';
|
||||
html += '<div class="rule-inner"><h4>关键词:</h4>';
|
||||
html += '<div class="keyword-container">';
|
||||
if (d.key_list.length <= 0) {
|
||||
html += '<div class="info">还没有任何关键字!</div>';
|
||||
} else {
|
||||
html += '<div class="info"></div>';
|
||||
}
|
||||
html += '<div class="keyword-list">';//关键词列表
|
||||
if (d.key_list.length > 0) {
|
||||
for (i in d.key_list) {
|
||||
html += '<div class="keyword input-append" >';
|
||||
html += '<a href="javascript:;" class="close--circle js-replay" data-key_id="' + i + '" nc-event="click" nc-action="delKeywords">×</a>';//删除关键词
|
||||
html += '<span class="value js-replay" keyword_name="' + d.key_list[i].keywords_name + '" data-key_id="' + i + '" nc-event="click" nc-action="editKeywords">' + d.key_list[i].keywords_name + '</span>';
|
||||
if (d.key_list[i].keywords_type == 0) {
|
||||
html += '<span class="add-on" keyword_type="' + d.key_list[i].keywords_type + '"> 全匹配</span>';
|
||||
} else {
|
||||
html += '<span class="add-on" keyword_type="' + d.key_list[i].keywords_type + '"> 模糊</span>';
|
||||
}
|
||||
html += '</div>';
|
||||
}
|
||||
}
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '<hr class="dashed"/>';
|
||||
html += '<div class="opt">';
|
||||
html += '<a href="javascript:;" class="js-add-keyword js-replay" nc-event="click" nc-action="addKeywords">+ 添加关键词</a>'; //添加关键词
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '<div class="rule-replies layui-col-md7">';
|
||||
html += '<div class="rule-inner">';
|
||||
html += '<h4>自动回复: <span class="send-method">随机发送</span></h4>';
|
||||
html += '<div class="reply-container">';
|
||||
if (d.replay_list.length <= 0) {
|
||||
html += '<div class="info">还没有任何回复!</div>';
|
||||
} else {
|
||||
html += '<div class="info"></div>';
|
||||
}
|
||||
html += '<ol class="reply-list">';
|
||||
|
||||
if (d.replay_list.length > 0) {
|
||||
for (j in d.replay_list) {
|
||||
|
||||
html += '<li>';//回复列表
|
||||
html += '<div class="reply-cont">';
|
||||
html += '<div class="reply-summary">';
|
||||
if (d.replay_list[j].type == 'text') {
|
||||
html += '<span class="label label-success">文本</span> ';
|
||||
html += '<span class="label">' + d.replay_list[j].reply_content + '</span>';
|
||||
} else if (d.replay_list[j].type == 'image') {
|
||||
html += '<span class="label"><img src="' + ns.img(d.replay_list[j].reply_content) + '" alt=""/></span>';
|
||||
} else if (d.replay_list[j].type == 'music') {
|
||||
html += '<div class="voice-wrapper" data-voice-src="' + d.replay_list[j].reply_content + '">';
|
||||
html += '<span class="voice-player">';
|
||||
html += '<span class="stop">点击播放</span>';
|
||||
html += '<span class="second" style="display: block;"></span>';
|
||||
html += '<i class="play" style="display:none;"></i>';
|
||||
html += '</span>';
|
||||
html += '</div>';
|
||||
} else if (d.replay_list[j].type == 'other') {
|
||||
html += '<span class="label label-success">' + d.replay_list[j].reply_content + '</span> ';
|
||||
html += '<span class="label">' + d.replay_list[j].reply_content + '</span>';
|
||||
} else if (d.replay_list[j].type == 'articles') {
|
||||
html += '<span class="label label-success">图文</span> ';
|
||||
html += '<span class="label">' + d.replay_list[j].reply_content + '</span>';
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '<div class="reply-opts">';
|
||||
var reply_content_to = d.replay_list[j].reply_content.replace(/"/g, "'");
|
||||
html += '<a class="js-edit-it js-replay" href="javascript:;" reply_content="' + reply_content_to + '" data-key_id="' + j + '" type="' + d.replay_list[j].type + '" nc-event="click" nc-action="editReply">编辑</a> - ';
|
||||
html += '<a class="js-delete-it js-replay" href="javascript:;" data-key_id="' + j + '" nc-event="click" nc-action="delReply">删除</a>';
|
||||
html += '</div>';
|
||||
html += '</li>';
|
||||
|
||||
}
|
||||
}
|
||||
html += '</ol>';
|
||||
html += '</div>';
|
||||
html += '<hr class="dashed"/>';
|
||||
html += '<div class="opt">';
|
||||
if (d.replay_list.length < 10) {
|
||||
html += '<a class="js-add-reply add-reply-menu js-replay" href="javascript:;" nc-event="click" nc-action="addReply">+ 添加一条回复</a>';
|
||||
} else {
|
||||
html += '<span class="disable-opt hide">最多十条回复</span>';
|
||||
}
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
});
|
||||
|
||||
if (d.count > 0) {
|
||||
$("#load_rule_list").html(html);
|
||||
} else {
|
||||
html = '<div class="empty">暂无数据!</div>';
|
||||
$("#load_rule_list").html(html);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
WxReplay.prototype.sendAjax = function (param = {}) {
|
||||
var d = $.extend({
|
||||
"url": '',
|
||||
"type": "post",
|
||||
"data": {},
|
||||
"async": true,
|
||||
"success": ''
|
||||
}, param);
|
||||
try {
|
||||
$.ajax({
|
||||
url: d.url,
|
||||
type: d.type,
|
||||
data: d.data,
|
||||
async: d.async,
|
||||
dataType: "JSON",
|
||||
success: function (res) {
|
||||
if (typeof (d.success) == "function") {
|
||||
d.success(res);
|
||||
}
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
};
|
||||
|
||||
//其他
|
||||
$(".dropdown-menu li").click(function () {
|
||||
$("#hidden_reply_type").val('other');
|
||||
var title = $(this).text();
|
||||
var active_pic = '';
|
||||
active_pic += '<div class="ng ng-single">';
|
||||
active_pic += '<a href="javascript:;" class="close--circle js-delete-complex">×</a>';
|
||||
active_pic += '<div class="ng-item">';
|
||||
active_pic += '<a href="javascript:;" class="new-window" title="' + title + '"><span class="label label-success">' + title + '</span></a>';
|
||||
active_pic += '</div>';
|
||||
active_pic += '<div class="ng-item view-more">';
|
||||
active_pic += '<a href="javascript:;" class="clearfix new-window">';
|
||||
active_pic += '<span class="pull-left">阅读全文</span>';
|
||||
active_pic += '<span class="pull-right">></span>';
|
||||
active_pic += '</a>';
|
||||
active_pic += '</div>';
|
||||
active_pic += '</div>';
|
||||
|
||||
$(".complex-content").html(active_pic);
|
||||
$('.complex-backdrop').css("display", "block");
|
||||
$("textarea[name='reply_content']").val(title);
|
||||
$("span.pull-right").hide();
|
||||
|
||||
});
|
||||
|
||||
//插入链接
|
||||
function hyperlink (d) {
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: false,
|
||||
area: ['450px'],
|
||||
offset: "auto",
|
||||
content: $("#hyperlink").html(),
|
||||
success: function(layero) {
|
||||
}
|
||||
});
|
||||
}
|
||||