detail1.blade.php 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. @extends('layouts.base')
  2. @section('title', '微信模板管理')
  3. @section('content')
  4. <style>
  5. .panel{
  6. margin-bottom:10px!important;
  7. border-radius: 10px;
  8. padding-left: 20px;
  9. }
  10. .panel .active a {
  11. background-color: #29ba9c!important;
  12. border-radius: 18px!important;
  13. color:#fff;
  14. }
  15. .panel a{
  16. border:none!important;
  17. background-color:#fff!important;
  18. }
  19. .content{
  20. background: #eff3f6;
  21. padding: 10px!important;
  22. }
  23. .con{
  24. position:relative;
  25. border-radius: 8px;
  26. min-height:100vh;
  27. background: #fff;
  28. }
  29. .con .setting .block{
  30. padding:10px;
  31. background-color:#fff;
  32. border-radius: 8px;
  33. }
  34. .con .setting .block .title{
  35. font-size:18px;
  36. margin-bottom:15px;
  37. display:flex;
  38. align-items:center;
  39. justify-content:space-between;
  40. }
  41. .el-form-item{
  42. padding-left:300px;
  43. margin-bottom:10px!important;
  44. }
  45. .confirm-btn{
  46. width: 100%;
  47. position:absolute;
  48. bottom:0;
  49. left:0;
  50. line-height:63px;
  51. background-color: #ffffff;
  52. box-shadow: 0px 8px 23px 1px
  53. rgba(51, 51, 51, 0.3);
  54. background-color:#fff;
  55. text-align:center;
  56. }
  57. b{
  58. font-size:14px;
  59. }
  60. .add{
  61. width: 154px;
  62. height: 36px;
  63. border-radius: 4px;
  64. border: solid 1px #29ba9c;
  65. color:#29ba9c;
  66. display:flex;
  67. align-items:center;
  68. justify-content:center;
  69. }
  70. .vue-crumbs a {
  71. color: #333;
  72. }
  73. .vue-crumbs a:hover {
  74. color: #29ba9c;
  75. }
  76. .vue-crumbs {
  77. margin: 0 20px;
  78. font-size: 14px;
  79. color: #333;
  80. font-weight: 400;
  81. line-height: 32px;
  82. }
  83. .el-table--border::after, .el-table--group::after, .el-table::before{
  84. background-color:#fff;
  85. }
  86. </style>
  87. <div id='re_content' >
  88. @include('layouts.newTabs')
  89. <div class="con">
  90. <div class="setting">
  91. <div class="block">
  92. <div class="title"><div style="display:flex;align-items:center;"><span style="width: 4px;height: 18px;background-color: #29ba9c;margin-right:15px;display:inline-block;"></span><b>模板列表</b><i class="iconfont icon-ht_tips" style="font-size:16px;color:#ff9b19;margin-left:16px;" slot="reference">
  93. <el-popover
  94. placement="bottom-start"
  95. title="提示"
  96. width="400"
  97. trigger="hover"
  98. content="小程序公众平台服务类目请添加商家自营 > 美妆/洗护。
  99. 点击模版消息后方开关按钮即可开启默认模版消息,无需进行额外设置。
  100. ">
  101. <el-button slot="reference" style="opacity: 0;margin-left:-10px;"></el-button>
  102. </el-popover>
  103. </i></div></div>
  104. </div>
  105. <el-button type="primary" size="mini" style="margin-left:10px;" @click="synchronization">同步消息模板</el-button>
  106. <el-table
  107. :data="list"
  108. style="width: 100%;padding:0 10px;"
  109. >
  110. <el-table-column
  111. align="center"
  112. label="序号"
  113. >
  114. <template slot-scope="scope" >
  115. [[scope.row.id]]
  116. </template>
  117. </el-table-column>
  118. <el-table-column
  119. prop="title"
  120. align="center"
  121. label="模板名称"
  122. >
  123. </el-table-column>
  124. <el-table-column
  125. align="center"
  126. label="操作"
  127. >
  128. <template slot-scope="scope" >
  129. <a :href="'{{ yzWebFullUrl('setting.small-program.see', array('tmp_id' => '')) }}'+[[scope.row.priTmplId]]" style="color:#999"><i class="iconfont icon-ht_operation_perview" style="font-size:16px;"></i></a>
  130. </template>
  131. </el-table-column>
  132. </el-table>
  133. </template>
  134. </div>
  135. </div>
  136. </div>
  137. <script>
  138. var vm = new Vue({
  139. el: "#re_content",
  140. delimiters: ['[[', ']]'],
  141. data() {
  142. let list = {!!json_encode($list)?:'{}' !!}
  143. console.log(list)
  144. return {
  145. list:list,
  146. activeName: 'one',
  147. multipleSelection:[]
  148. }
  149. },
  150. mounted () {
  151. this.list.forEach((item,index,key)=>{
  152. item.id=index+1
  153. })
  154. },
  155. methods: {
  156. handleSelectionChange(val) {
  157. this.multipleSelection = val;
  158. },
  159. del(scope,rows){
  160. rows.splice(scope.$index, 1);
  161. let json={
  162. id:scope.row.id
  163. }
  164. this.$http.post('{!! yzWebFullUrl('setting.slide.deleted') !!}',json).then(function (response){
  165. if (response.data.result) {
  166. this.$message({message:"删除成功!",type:"success"});
  167. this.loading = false;
  168. }else {
  169. this.$message({message: response.data.msg,type: 'error'});
  170. }
  171. },function (response) {
  172. console.log(response);
  173. this.loading = false;
  174. }
  175. );
  176. },
  177. synchronization(){
  178. this.$http.post('{!! yzWebFullUrl('setting.small-program.synchronization') !!}').then(function (response){
  179. if (response.data.result) {
  180. this.$message({message:response.data.msg,type:"success"});
  181. this.loading = false;
  182. }else {
  183. this.$message({message: response.data.msg,type: 'error'});
  184. }
  185. },function (response) {
  186. console.log(response);
  187. this.loading = false;
  188. }
  189. );
  190. },
  191. },
  192. });
  193. </script>
  194. @endsection