sucaiset.html 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515
  1. {template 'common/header'}
  2. </style>
  3. <script>
  4. function showOrHiddenValidate(selectstr){
  5. // alert(selectstr);
  6. if(selectstr == "miniprogrampage"){
  7. mbiaoti.style.display = "";
  8. mjianjie.style.display = "";
  9. mlinajie.style.display = "";
  10. mlogo.style.display = "";
  11. mappid.style.display = "";
  12. m_web.style.display = "none";
  13. m_page.style.display = "";
  14. biaoti.value="小程序标题";
  15. mappid_0.style.font.color = red;
  16. mappid_1.style.font.color = red;
  17. mappid_2.style.font.color = red;
  18. }
  19. if(selectstr == "text"){
  20. mbiaoti.style.display = "";
  21. mjianjie.style.display = "none";
  22. mlinajie.style.display = "none";
  23. mlogo.style.display = "none";
  24. mappid.style.display = "none";
  25. m_web.style.display = "none";
  26. m_page.style.display = "none";
  27. mappid_0.style.display = "none";
  28. mappid_1.style.display = "none";
  29. mappid_2.style.display = "none";
  30. }
  31. if(selectstr == "image"){
  32. mbiaoti.style.display = "none";
  33. mjianjie.style.display = "none";
  34. mlinajie.style.display = "none";
  35. mlogo.style.display = "";
  36. mappid.style.display = "none";
  37. m_web.style.display = "none";
  38. m_page.style.display = "none";
  39. mappid_0.style.display = "none";
  40. mappid_1.style.display = "none";
  41. mappid_2.style.display = "none";
  42. }
  43. if(selectstr == "voice"){
  44. mbiaoti.style.display = "none";
  45. mjianjie.style.display = "";
  46. mlinajie.style.display = "none";
  47. mlogo.style.display = "none";
  48. mappid.style.display = "none";
  49. m_web.style.display = "none";
  50. m_page.style.display = "none";
  51. mappid_0.style.display = "none";
  52. mappid_1.style.display = "none";
  53. mappid_2.style.display = "none";
  54. }
  55. if(selectstr == "link"){
  56. mbiaoti.style.display = "";
  57. mjianjie.style.display = "";
  58. mlinajie.style.display = "";
  59. mlogo.style.display = "";
  60. mappid.style.display = "none";
  61. m_web.style.display = "none";
  62. m_page.style.display = "none";
  63. mappid_0.style.display = "none";
  64. mappid_1.style.display = "none";
  65. mappid_2.style.display = "none";
  66. }
  67. }
  68. </script>
  69. <ul class="nav nav-tabs">
  70. <li class="{$active}"><a href="{php echo $this->createWebUrl('sucaiset');}">添加知识</a></li>
  71. <li class="{$active1}"><a href="{php echo $this->createWebUrl('sucailist');}">知识库</a></li>
  72. <li class="{$active4}"><a href="{php echo $this->createWebUrl('TikuList');}">分类设置</a></li>
  73. </ul>
  74. {if $active == 'active'}
  75. <div class="clearfix" ng-controller="memberProperty" id="memberProperty">
  76. <form action="{php echo $this->createWebUrl('savesucai')}" method="post" class="form-horizontal">
  77. <div class="panel panel-default">
  78. <div class="panel-heading">
  79. 知识管理 :
  80. {if $bianji==1}
  81. <span class='label label-success'>编辑模式</span>
  82. <a href="?c=site&a=entry&do=sucaiset&m=qidong_app&rich=1&bianji=1&id={$navmsg[0]['id']}" class='label label-info'>详情编辑</a>
  83. {else}
  84. <span class='label label-danger'>添加模式</span>
  85. {/if}
  86. </div>
  87. <div class="panel-body">
  88. <label class=" col-sm-3 col-md-2 control-label">顺序ID</label>
  89. <div class="col-sm-9 col-xs-12">
  90. <input type="text" name="sid" value="{$navmsg[0]['sid']}" class="form-control">
  91. <span class="help-block"> </span>
  92. </div>
  93. <label class="col-xs-12 col-sm-3 col-md-2 control-label">知识类型<font color=red>*</font></label>
  94. <div class="col-sm-9 col-xs-12">
  95. <select name="stype" class="form-control form-add-type" onChange="showOrHiddenValidate(this.options[selectedIndex].value)">
  96. <option value="text" > 请选择 </option>
  97. <option value="text" {if $navmsg[0]['stype'] == 'text'} selected="selected" {/if} >文本</option>
  98. <option value="link" {if $navmsg[0]['stype'] == 'link'} selected="selected" {/if} >微信图文</option>
  99. <option value="image" {if $navmsg[0]['stype'] == 'image'} selected="selected" {/if} >图片</option>
  100. <option value="miniprogrampage" {if $navmsg[0]['stype'] == 'miniprogrampage'} selected="selected" {/if} >小程序卡片</option>
  101. <option value="voice" {if $navmsg[0]['stype'] == 'news'} selected="selected" {/if} >多图文</option>
  102. </select>
  103. <span class="help-block">类型:1:文本 2:图文链接 3:图片 4:小程序卡片 ||公众号:5:语音 6.多图文 </span>
  104. </div>
  105. <label class="col-xs-12 col-sm-3 col-md-2 control-label">关键词<font color=red>*</font></label>
  106. <div class="col-sm-9 col-xs-12">
  107. <input type="text" name="keywords" value="{$navmsg[0]['keywords']}" class="form-control">
  108. <span class="help-block">用户发送此关键词 将触发本消息</span>
  109. </div>
  110. <div id='mbiaoti' >
  111. <label id='biaoti' class="col-xs-12 col-sm-3 col-md-2 control-label">标题 </label>
  112. <div class="col-sm-9 col-xs-12">
  113. <input type="text" name="title" value="{$navmsg[0]['title']}" class="form-control">
  114. <span class="help-block">根据功能分别填写:文本回复 图文标题 小程序标题 </span>
  115. <span class="help-block">多图文时把图文消息编号填入用|隔开 .如 2|3| </span>
  116. <span class="help-block">填写 [name] [id] 可用来替换成 客户的昵称和ID. </span>
  117. </div>
  118. </div>
  119. <div id='mjianjie' >
  120. <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 附加标题 </label>
  121. <div class="col-sm-9 col-xs-12">
  122. <input type="text" name="description" value="{$navmsg[0]['description']}" class="form-control">
  123. <span id='m_web' class="help-block">图文消息的副标题 | 小程序 图片id| </span>
  124. <div id='mappid_1'> <span id='m_page' class="help-block"> 当知识类型是图片和小程序时:添加图片后自动生成,无须添加. </span></div>
  125. </div>
  126. </div>
  127. <div id='mlinajie' >
  128. <label class="col-xs-12 col-sm-3 col-md-2 control-label">图文链接地址 </label>
  129. <div class="col-sm-9 col-xs-12">
  130. <input type="text" name="url" value="{$navmsg[0]['url']}" class="form-control">
  131. <span id='m_web' class="help-block">图文消息的web地址 | 小程序的page路径 | 链接QQ填写:http://wpa.qq.com/msgrd?v=3&uin=这里写QQ号 </span>
  132. <div id='mappid_2'> <span id='m_page' class="help-block"> </span> </div>
  133. </div>
  134. </div>
  135. <div id='mlogo' >
  136. <label class="col-xs-12 col-sm-3 col-md-2 control-label">图文消息图标</label>
  137. <div class="col-sm-9 col-xs-12">
  138. {php echo tpl_form_field_image('thumb_url',$navmsg['0']['thumb_url']);}
  139. <span class="help-block">图文链接消息的图片链接,支持 JPG、PNG 格式,较好的效果为大图 640 X 320,小图 80 X 80</span>
  140. <span class="help-block">注意:回复图片和小程序所需的图片只能是png格式. 并且是3天有效期.</span>
  141. </div>
  142. </div>
  143. <div id='mappid' >
  144. <label class="col-xs-12 col-sm-3 col-md-2 control-label">Appid </label>
  145. <div class="col-sm-9 col-xs-12">
  146. <input type="text" name="appid" value="{$navmsg[0]['appid']}" class="form-control">
  147. <span class="help-block"> 关联小程序的appid ,仅对接公众号时使用 </span>
  148. </div>
  149. </div>
  150. <label class="col-xs-12 col-sm-3 col-md-2 control-label">所属帮助分类</label>
  151. <div class="col-sm-9 col-xs-12">
  152. <select name="htype" class="combobox">
  153. {loop $helplist $index $items}
  154. <option value={$items['stype']} {if $navmsg[0]['zhuangtai'] == $items['stype']} selected="selected" {/if} >{$items['stype']}</option>
  155. {/loop}
  156. </select>
  157. <span class="help-block"></span>
  158. </div>
  159. </div>
  160. </div>
  161.      <div class="form-group col-sm-12">
  162. <input type="hidden" name="id" value="{$navmsg[0]['id']}" />
  163. <input type="hidden" name="bianji" value="{$bianji}" />
  164. <input name="submit" type="submit" {if $bianji==1} value="编辑" {else} value="提交" {/if} class="btn btn-primary col-lg-1" >
  165. </div>
  166. </form>
  167. </div>
  168. {else}
  169. {/if}
  170. {if $active9 == 'active'}
  171. <div class="clearfix" ng-controller="memberProperty" id="memberProperty">
  172. <form action="{php echo $this->createWebUrl('Savesucai_detail')}" method="post" class="form-horizontal">
  173. <div class="panel panel-default">
  174. <div class="panel-heading">
  175. 详细内容管理 :
  176. </div>
  177. <div class="panel-body">
  178. <div class="col-sm-9 col-xs-12">
  179. <div class="col-sm-6">
  180. </div>
  181. {php echo tpl_ueditor("beizhu", $navmsg[0]['beizhu'], $options = array("height"=>800));}
  182. <span class="help-block"> </span>
  183. </div>
  184. </div>
  185. </div>
  186.      <div class="form-group col-sm-12">
  187. <input type="hidden" name="id" value="{$navmsg[0]['id']}" />
  188. <input type="hidden" name="bianji" value="1" />
  189. <input name="submit" type="submit" {if $bianji==1} value="编辑" {else} value="提交" {/if} class="btn btn-primary col-lg-1" >
  190. </div>
  191. </form>
  192. </div>
  193. {else}
  194. {/if}
  195. {if $active1 == 'active'}
  196. <div class="clearfix" ng-controller="memberProperty" id="memberProperty">
  197. <div class="panel panel-default">
  198. <div class="panel-heading">
  199. 知识库 <span class='label label-danger'>{$huancun} </span> <span class='label label-success'>提示:点[全部] 可生成素材缓存.</span>
  200. </div>
  201. <div id="js-keyword-display" ng-controller="KeywordDisplay" class="ng-scope">
  202. <div class="btn-group we7-btn-group we7-margin-bottom btn-group-justified">
  203. <a href="./index.php?c=site&amp;a=entry&amp;do=sucailist&amp;m=qidong_app" class="btn {if $stype== '' } active {/if} ">全部</a>
  204. <a href="./index.php?c=site&amp;a=entry&amp;do=sucailist&amp;m=qidong_app&amp;stype=text" class="btn {if $stype== 'text' } active {/if} ">回复文字</a>
  205. <a href="./index.php?c=site&amp;a=entry&amp;do=sucailist&amp;m=qidong_app&amp;stype=image" class="btn {if $stype== 'image' } active {/if} ">回复图片</a>
  206. <a href="./index.php?c=site&amp;a=entry&amp;do=sucailist&amp;m=qidong_app&amp;stype=link" class="btn {if $stype== 'link' } active {/if} ">回复图文</a>
  207. <a href="./index.php?c=site&amp;a=entry&amp;do=sucailist&amp;m=qidong_app&amp;stype=miniprogrampage" class="btn {if $stype== 'miniprogrampage' } active {/if} ">回复小程序</a>
  208. <a href="./index.php?c=site&amp;a=entry&amp;do=sucailist&amp;m=qidong_app&amp;stype=vioce" class="btn {if $stype== 'vioce' } active {/if} ">回复语音</a>
  209. <a href="./index.php?c=site&amp;a=entry&amp;do=sucailist&amp;m=qidong_app&amp;stype=video" class="btn {if $stype== 'video' } active {/if} ">回复视频</a>
  210. </div>
  211. <div class="clearfix"></div>
  212. <div class="table-responsive panel-body">
  213. <table class="table table-hover">
  214. <thead class="navbar-inner">
  215. <tr>
  216. <th width=10%>数字id</th>
  217. <th width=100>关键字</th>
  218. <th width=10%>类型</th>
  219. <th width=20%>标题</th>
  220. <th width=10%>图片</th>
  221. <th width=10%>过期时间</th>
  222. </tr>
  223. </thead>
  224. <tbody id="list">
  225. {loop $navmsg $indexid $nav}
  226. <tr>
  227. <th>{$nav['sid']} </th>
  228. <th><span class="label label-success">{$nav['keywords']}</span></th>
  229. <th> {if $nav['stype']== 'text' } <i class="wi wi-text"></i> 文本 {/if}
  230. {if $nav['stype']== 'link' } <i class="wi wi-appmsg"></i>图文链接 {/if}
  231. {if $nav['stype']== 'image' }<i class="wi wi wi-img"></i> 图片 {/if}
  232. {if $nav['stype']== 'miniprogrampage' } 小程序 {/if}
  233. {if $nav['stype']== 'voice' } 语音 {/if}
  234. </th>
  235. <th>{$nav['title']}</th>
  236. <th>
  237. {if $nav['stype'] <> 'text'}
  238. <img src="{$_W['attachurl']}{$nav['thumb_url']}" width="100">
  239. {/if}
  240. </th>
  241. <th width=15%>
  242. <div>{php echo date("Y-m-d H:i:s",($nav['edittime']+259200));}</div>
  243. </th>
  244. <th>
  245. <div class="link-group" style="min-width: 210px;">
  246. <form action="{php echo $this->createWebUrl('sucaiset')}" method="post">
  247. <input type="hidden" name="id" value="{$nav['id']}" />
  248. <input type="hidden" name="bianji" value="1" />
  249. <input name="submit" type="submit" value="编辑" class="btn btn-primary">
  250. </form>
  251. <form action="{php echo $this->createWebUrl('sucaidel')}" method="post">
  252. <input type="hidden" name="id" value="{$nav['id']}" />
  253. <input name="submit" type="submit" value="删除" onclick="return confirm('确认要删除本条,确认吗?');return false;" class="btn btn-danger we7-margin-left">
  254. </form>
  255. </th>
  256. </tr>
  257. {/loop}
  258. </tbody>
  259. </table>
  260. </div>
  261. </div>
  262. </div>
  263. {else}
  264. {/if}
  265. {if $active3 == 'active'}
  266. <div class="clearfix" ng-controller="memberProperty" id="memberProperty">
  267. <div class="panel panel-default">
  268. <div class="panel-heading">
  269. 检测
  270. </div>
  271. <div class="panel-body">
  272. <form action="http://vmall.woshangtong.com/json/save.php" method="post">
  273. <label class="col-xs-12 col-sm-3 col-md-2 control-label">模板1</label>
  274. <div class="col-sm-9 col-xs-12">
  275. <img height="300" src="/addons/qicheng_webapp/gd.png">
  276. <span class="help-block"></span>
  277. </div>
  278. <div style="display:none;">
  279. <input type="text" readOnly="true" name="jsonid" value='{$jsonid}' class="form-control" />
  280. <input type="text" readOnly="true" name="store_name" value='{$store_name}' class="form-control" />
  281. <input type="hidden" name="likes" value='{$store_logo}' class="form-control" />
  282. <input type="hidden" name="banben" value='109' class="form-control" />
  283. <input type="hidden" name="uniacid" value='{$uniacid}' class="form-control" />
  284. <input type="hidden" name="website" value='{$website}' class="form-control" />
  285. <input type="hidden" name="json" value='{$jsonall}' class="form-control" />
  286. </div>
  287. <div class="col-sm-9 col-xs-12">
  288. <input name="submit" type="submit" value="检查更新" class="btn btn-primary">
  289. </div>
  290. </form>
  291. </div>
  292. </div>
  293. </div>
  294. {else}
  295. {/if}
  296. {if $active91 == 'active'}
  297. <div class="clearfix" ng-controller="memberProperty" id="memberProperty">
  298. <div class="panel panel-default">
  299. <div class="panel-heading">
  300. 上传素材
  301. </div>
  302. <div class="panel-body">
  303. <form id='media' action="{php echo $this->createWebUrl('uploadimg')}" method="post" class="form-horizontal">
  304. <!-- <label class="col-xs-12 col-sm-3 col-md-2 control-label">小程序appId</label> -->
  305. <!-- <div class="col-sm-9 col-xs-12"> -->
  306. <!-- <input type="text" name="store_id" value="{$oldmsg['0']['store_id']}" class="form-control"> -->
  307. <!-- <span class="help-block">填写关联的小程序APPid</span> -->
  308. <!-- </div> -->
  309. <!-- <label class="col-xs-12 col-sm-3 col-md-2 control-label">网页地址/小程序路径</label> -->
  310. <!-- <div class="col-sm-9 col-xs-12"> -->
  311. <!-- <input type="text" name="wxweb" value="{$oldmsg['0']['wxweb']}" class="form-control"> -->
  312. <!-- <span class="help-block">需提前在微信小程序后台设置好业务域名.打开小程序的路径是page/开头</span> -->
  313. <!-- </div> -->
  314. <div id='mlogo'>
  315. <label class="col-xs-12 col-sm-3 col-md-2 control-label">图文消息图标</label>
  316. <div class="col-sm-9 col-xs-12">
  317. {php echo tpl_form_field_image('img',$img);}
  318. <input type="hidden" name="stype" value='image' class="form-control" />
  319. <span class="help-block">永久地址:{$result}</span>
  320. </div>
  321. </div>
  322. <input name="submit" type="submit" value="上传" class="btn btn-primary">
  323. </form>
  324. </div>
  325. </div>
  326. </div>
  327. </div>
  328. {else}
  329. {/if}
  330. {if $active4== 'active'}
  331. <div class="clearfix" ng-controller="memberProperty" id="memberProperty">
  332. <div class="panel panel-default">
  333. <div class="panel-heading">
  334. 帮助分类 <a target="_blank" class="label label-success" href="{$openurl}"> 预览[请在微信打开]</a>
  335. </div>
  336. <div class="panel-body">
  337. <table class="table table-hover">
  338. <thead>
  339. <tr>
  340. <th>编号</th>
  341. <th>分类名称</th>
  342. <th>客服</th>
  343. <th>删除</th>
  344. </tr>
  345. </thead>
  346. <tbody id="list">
  347. {loop $navmsg $index $items}
  348. <tr>
  349. <th> {$items['sid']} </th>
  350. <th> {$items['stype']}</th>
  351. <th> {$items['kefu']}</th>
  352. <th>
  353. <form action="{php echo $this->createWebUrl('deltype')}" method="post">
  354. <input type="hidden" name="id" value="{$items['id']}" />
  355. <input name="submit" type="submit" value="删除" class="btn btn-primary">
  356. </form>
  357. </th>
  358. </tr>
  359. {/loop}
  360. </tbody>
  361. </table>
  362. </div>
  363. </div>
  364. </div>
  365. <div class="clearfix" ng-controller="memberProperty" id="memberProperty">
  366. <form action="{php echo $this->createWebUrl('savetiku');}" method="post" class="form-horizontal">
  367. <div class="panel panel-default">
  368. <div class="panel-heading">
  369. 添加分类
  370. </div>
  371. <div class="panel-body">
  372. <label class="col-xs-12 col-sm-3 col-md-2 control-label">编号</label>
  373. <div class="col-sm-9 col-xs-12">
  374. <select name="sid" class="combobox">
  375. <option value=1>编号1</option>
  376. <option value=2>编号2</option>
  377. <option value=3>编号3</option>
  378. <option value=4>编号4</option>
  379. <option value=5>编号5</option>
  380. <option value=6>编号6</option>
  381. <option value=7>编号7</option>
  382. <option value=8>编号8</option>
  383. </select>
  384. <span class="help-block"></span>
  385. </div>
  386. <label class="col-xs-12 col-sm-3 col-md-2 control-label">分类名称</label>
  387. <div class="col-sm-9 col-xs-12">
  388. <input type="text" name="stype" value="" class="form-control">
  389. <span class="help-block">分类名</span>
  390. </div>
  391. <label class="col-xs-12 col-sm-3 col-md-2 control-label">客服名称</label>
  392. <div class="col-sm-9 col-xs-12">
  393. <input type="text" name="kefu" value="" class="form-control">
  394. <span class="help-block">用|分割</span>
  395. </div>
  396. </div>
  397. </div>
  398.      <div class="form-group col-sm-12">
  399. <input type="hidden" name="" value="" />
  400. <input name="submit" type="submit" value="保存" class="btn btn-primary">
  401. </div>
  402. </form>
  403. </div>
  404. {else}
  405. {/if}
  406. {template 'common/footer'}