video-list.blade.php 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. @extends('layouts.base')
  2. @section('title', "视频管理")
  3. @section('content')
  4. <link rel="stylesheet" type="text/css" href="{{static_url('yunshop/goods/vue-goods1.css')}}"/>
  5. <style>
  6. /* 导航 */
  7. .el-radio-button .el-radio-button__inner,.el-radio-button:first-child .el-radio-button__inner {border-radius: 4px 4px 4px 4px;border-left: 0px;}
  8. .el-radio-button__inner{border:0;}
  9. .el-radio-button:last-child .el-radio-button__inner {border-radius: 4px 4px 4px 4px;}
  10. </style>
  11. <div class="all">
  12. <div id="app" v-cloak>
  13. <div class="vue-head">
  14. <el-radio-group v-model="choose_index" @change="changeList">
  15. <el-radio-button label="1">视频管理</el-radio-button>
  16. <el-radio-button label="2">分红记录</el-radio-button>
  17. </el-radio-group>
  18. </div>
  19. <div class="vue-head">
  20. <div class="vue-main-title" style="margin-bottom:20px">
  21. <div class="vue-main-title-left"></div>
  22. <div class="vue-main-title-content">[[choose_index==1?'视频管理':'分红管理']]</div>
  23. <div class="vue-main-title-button">
  24. </div>
  25. </div>
  26. <div class="vue-search">
  27. <el-form :inline="true" :model="search_form" class="demo-form-inline">
  28. <el-form-item label="">
  29. <el-input v-model="search_form.circle_name" placeholder="圈子名称"></el-input>
  30. </el-form-item>
  31. <el-form-item label="">
  32. <el-input v-model="search_form.member_info" placeholder="发布会员ID/昵称/名称/手机号"></el-input>
  33. </el-form-item>
  34. <el-form-item label="" v-if="choose_index==2">
  35. <el-input v-model="search_form.invitation_id" placeholder="视频ID"></el-input>
  36. </el-form-item>
  37. <el-form-item label="" v-if="choose_index==1">
  38. <el-input v-model="search_form.title" placeholder="视频标题"></el-input>
  39. </el-form-item>
  40. <el-form-item label="" v-if="choose_index==2">
  41. <el-input v-model="search_form.invitation_title" placeholder="视频标题"></el-input>
  42. </el-form-item>
  43. <el-form-item label="">
  44. <el-input v-model="search_form.goods_id" placeholder="商品ID"></el-input>
  45. </el-form-item>
  46. <el-form-item label="" v-if="choose_index==2">
  47. <el-input v-model="search_form.order_sn" placeholder="订单编号"></el-input>
  48. </el-form-item>
  49. <el-form-item label="">
  50. <el-date-picker
  51. v-model="times"
  52. type="datetimerange"
  53. value-format="timestamp"
  54. range-separator="至"
  55. start-placeholder="开始日期"
  56. end-placeholder="结束日期"
  57. style="margin-left:5px;"
  58. align="right">
  59. </el-date-picker>
  60. </el-form-item>
  61. <el-form-item label="">
  62. <el-button type="primary" @click="search(1)">搜索</el-button>
  63. </el-form-item>
  64. </el-form>
  65. </div>
  66. </div>
  67. <div class="vue-main" v-if="choose_index==1">
  68. <div>
  69. <div class="vue-main-title" style="margin-bottom:20px">
  70. <div class="vue-main-title-left"></div>
  71. <div class="vue-main-title-content" style="flex:0 0 120px">视频列表</div>
  72. <div class="vue-main-title-button">
  73. <!-- <el-button type="primary" plain icon="el-icon-plus" size="small" @click="addModal">添加</el-button> -->
  74. </div>
  75. </div>
  76. <el-table :data="list" style="width: 100%">
  77. <el-table-column label="视频ID" align="center" prop="id" width="80"></el-table-column>
  78. <el-table-column prop="" label="圈子名称" min-width="150" align="left" class="edit-cell">
  79. <template slot-scope="scope">
  80. <div style="display:flex">
  81. <img :src="scope.row.circle_img" style="min-width:50px;height:50px;margin-right:10px">
  82. <span>[[scope.row.circle_name]]</span>
  83. </div>
  84. </template>
  85. </el-table-column>
  86. <el-table-column label="发布会员" align="center" prop="display_order">
  87. <template slot-scope="scope">
  88. <div>
  89. <div v-if="scope.row.avatar">
  90. <img :src="scope.row.avatar" alt="" style="width:40px;height:40px;border-radius:50%">
  91. </div>
  92. <div @click="gotoMember(scope.row.member_id)" style="line-height:32px;color:#29BA9C;cursor: pointer;" class="vue-ellipsis">[[scope.row.nickname]]</div>
  93. </div>
  94. </template>
  95. </el-table-column>
  96. <el-table-column label="视频" align="center" prop="display_order">
  97. <template slot-scope="scope">
  98. <div v-if="scope.row.content" @click="playVideo(scope.row.content)">
  99. <video :src="scope.row.content" alt="" style="width:40px;height:40px;"></video>
  100. </div>
  101. </template>
  102. </el-table-column>
  103. <el-table-column label="标题" align="center" prop="title"></el-table-column>
  104. <el-table-column label="关联商品" align="center" prop="id" min-width="120">
  105. <template slot-scope="scope">
  106. <span v-if="scope.row.goods_id">
  107. 【ID:[[scope.row.goods_id]]】[[scope.row.goods_name]]
  108. </span>
  109. </template>
  110. </el-table-column>
  111. <el-table-column label="" align="center">
  112. <template slot="header" slot-scope="scope">
  113. <!-- <div>分享次数</div> -->
  114. <div>点赞次数</div>
  115. </template>
  116. <template slot-scope="scope">
  117. <!-- <div>121</div> -->
  118. <div>[[scope.row.link_count]]</div>
  119. </template>
  120. </el-table-column>
  121. <el-table-column label="转化订单金额(元)" align="center" prop="order_price"></el-table-column>
  122. <el-table-column label="奖励金额(元)" align="center" prop="amount"></el-table-column>
  123. <el-table-column label="审核状态" align="center" prop="id" >
  124. <template slot-scope="scope">
  125. <el-select v-model="scope.row.is_review" size="small" @change="changeReview(scope.row.id,scope.$index)">
  126. <el-option label="待审核" :value="0"></el-option>
  127. <el-option label="审核通过" :value="1"></el-option>
  128. <el-option label="审核驳回" :value="2"></el-option>
  129. </el-select>
  130. </template>
  131. </el-table-column>
  132. <el-table-column label="推荐" align="center" prop="id" >
  133. <template slot-scope="scope">
  134. <div>
  135. <el-switch v-model="scope.row.is_recommend" :active-value="1" :inactive-value="0" @change="changeStatus(scope.row.id,'is_recommend')"></el-switch>
  136. </div>
  137. </template>
  138. </el-table-column>
  139. <el-table-column prop="refund_time" label="操作" align="center" width="160">
  140. <template slot-scope="scope">
  141. <el-link title="分红记录" :underline="false" @click="gotoReward(scope.row.id)" style="width:50px;">
  142. <i class="iconfont icon-fontclass-shujutongji"></i>
  143. </el-link>
  144. <el-link title="删除视频" :underline="false" @click="del(scope.row.id)" style="width:50px;">
  145. <i class="iconfont icon-ht_operation_delete"></i>
  146. </el-link>
  147. </template>
  148. </el-table-column>
  149. </el-table>
  150. </div>
  151. </div>
  152. <div class="vue-main" v-if="choose_index==2">
  153. <div>
  154. <div class="vue-main-title" style="margin-bottom:20px">
  155. <div class="vue-main-title-left"></div>
  156. <div class="vue-main-title-content" style="flex:0 0 120px">分红记录</div>
  157. <div class="vue-main-title-button">
  158. </div>
  159. </div>
  160. <el-table :data="list" style="width: 100%">
  161. <el-table-column label="时间" align="center" prop="created_at"></el-table-column>
  162. <el-table-column label="视频ID" align="center" prop="invitation_id"></el-table-column>
  163. <el-table-column prop="down_time" label="圈子名称" min-width="180" align="left" class="edit-cell">
  164. <template slot-scope="scope">
  165. <div style="display:flex;align-items: center;">
  166. <img :src="scope.row.circle_img" style="width:50px;min-width:50px;height:50px;margin-right:10px">
  167. <span>[[scope.row.circle_name]]</span>
  168. </div>
  169. </template>
  170. </el-table-column>
  171. <el-table-column label="发布会员" align="center" prop="display_order">
  172. <template slot-scope="scope">
  173. <div>
  174. <div v-if="scope.row.avatar">
  175. <img :src="scope.row.avatar" alt="" style="width:40px;height:40px;border-radius:50%">
  176. </div>
  177. <div @click="gotoMember(scope.row.invitation_member_id)" style="line-height:32px;color:#29BA9C;cursor: pointer;" class="vue-ellipsis">[[scope.row.nickname]]</div>
  178. </div>
  179. </template>
  180. </el-table-column>
  181. <el-table-column label="标题" align="center" prop="title"></el-table-column>
  182. <el-table-column label="订单号" align="center" prop="order_sn"></el-table-column>
  183. <el-table-column label="订单金额(元)" align="center" prop="order_price"></el-table-column>
  184. <el-table-column label="奖励比例" align="center" prop="rebate">
  185. <template slot-scope="scope">
  186. <div>
  187. [[scope.row.rebate]]%
  188. </div>
  189. </template>
  190. </el-table-column>
  191. <el-table-column label="奖励金额(元)" align="center" prop="amount"></el-table-column>
  192. <el-table-column label="状态" align="center" prop="">
  193. <template slot-scope="scope">
  194. <div>
  195. [[scope.row.status==1?'已完成':'未完成']]
  196. </div>
  197. </template>
  198. </el-table-column>
  199. </el-table>
  200. </div>
  201. </div>
  202. <!-- 分页 -->
  203. <div class="vue-page" v-if="total>0">
  204. <el-row>
  205. <el-col align="right">
  206. <el-pagination layout="prev, pager, next,jumper" @current-change="search" :total="total"
  207. :page-size="per_page" :current-page="current_page" background
  208. ></el-pagination>
  209. </el-col>
  210. </el-row>
  211. </div>
  212. <!--弹框-->
  213. <el-dialog :visible.sync="video_show" width="60%" center title="播放视频">
  214. <div style="text-align:center">
  215. <video :src="video_url" controls="controls" style="max-width:100%;height:auto" ref="video" autoplay="autoplay">
  216. 您的浏览器不支持 video 标签。
  217. </video>
  218. </div>
  219. <span slot="footer" class="dialog-footer">
  220. <el-button @click="video_show = false">取 消</el-button>
  221. </span>
  222. </el-dialog>
  223. </div>
  224. </div>
  225. <script>
  226. var app = new Vue({
  227. el: "#app",
  228. delimiters: ['[[', ']]'],
  229. name: 'test',
  230. data() {
  231. return {
  232. choose_index:'1',
  233. video_show:false,
  234. video_url:'',
  235. list:[],
  236. search_form:{
  237. },
  238. times:[],
  239. rules: {},
  240. current_page:1,
  241. total:1,
  242. per_page:1,
  243. }
  244. },
  245. created() {
  246. },
  247. mounted() {
  248. this.getData(1);
  249. },
  250. methods: {
  251. getData(page) {
  252. let url = '';
  253. if(this.choose_index == 1) {
  254. url = '{!! yzWebFullUrl('plugin.circle.admin.invitation.get-video-list') !!}'
  255. }
  256. else {
  257. url = '{!! yzWebFullUrl('plugin.circle.admin.pay-log.video-bouns-list') !!}'
  258. }
  259. let json = {
  260. page:page
  261. }
  262. for(let i in this.search_form) {
  263. if(this.search_form[i]||this.search_form[i]===0) {
  264. json[i] = this.search_form[i]
  265. }
  266. }
  267. if(this.times&&this.times!=null&&this.times.length) {
  268. json.created_start = this.times[0] / 1000
  269. json.created_end = this.times[1] / 1000
  270. }
  271. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  272. this.$http.post(url,json).then(function(response) {
  273. if (response.data.result) {
  274. this.list = response.data.data.data;
  275. this.current_page=response.data.data.current_page;
  276. this.total=response.data.data.total;
  277. this.per_page=response.data.data.per_page;
  278. loading.close();
  279. } else {
  280. this.$message({
  281. message: response.data.msg,
  282. type: 'error'
  283. });
  284. }
  285. loading.close();
  286. }, function(response) {
  287. this.$message({
  288. message: response.data.msg,
  289. type: 'error'
  290. });
  291. loading.close();
  292. });
  293. },
  294. gotoDetail(item) {
  295. let link = `{!! yzWebFullUrl('plugin.circle.admin.invitation.edit') !!}`+`&id=`+item.id;
  296. window.location.href = link;
  297. },
  298. search(val) {
  299. this.getData(val);
  300. },
  301. addModal() {
  302. let link = `{!! yzWebFullUrl('plugin.circle.admin.invitation.edit') !!}`;
  303. console.log(link);
  304. window.location.href = link;
  305. },
  306. del(id) {
  307. this.$confirm('确定删除吗', '提示', {confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning'}).then(() => {
  308. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  309. this.$http.post('{!! yzWebFullUrl('plugin.circle.admin.invitation.del') !!}',{invitation_id:id}).then(function (response) {
  310. if (response.data.result) {
  311. this.$message({type: 'success',message: '删除成功!'});
  312. }
  313. else{
  314. this.$message({type: 'error',message: response.data.msg});
  315. }
  316. loading.close();
  317. this.search(this.current_page)
  318. },function (response) {
  319. this.$message({type: 'error',message: response.data.msg});
  320. loading.close();
  321. }
  322. );
  323. }).catch(() => {
  324. this.$message({type: 'info',message: '已取消删除'});
  325. });
  326. },
  327. search(val) {
  328. this.getData(val);
  329. },
  330. gotoMember(id) {
  331. window.location.href = `{!! yzWebFullUrl('member.member.detail') !!}`+`&id=`+id;
  332. },
  333. // 快速修改
  334. changeStatus(id,type) {
  335. let that = this;
  336. let json = {invitation_id:id, invitation_type: type};
  337. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  338. that.$http.post("{!! yzWebFullUrl('plugin.circle.admin.invitation.set-invitation-review') !!}", json).then(response => {
  339. if (response.data.result == 1) {
  340. that.$message.success('操作成功!');
  341. } else {
  342. that.$message.error(response.data.msg);
  343. }
  344. that.search(this.current_page);
  345. loading.close();
  346. }), function (res) {
  347. console.log(res);
  348. loading.close();
  349. };
  350. },
  351. changeReview(id,index) {
  352. let that = this;
  353. let json = {invitation_id:id, review:this.list[index].is_review};
  354. let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
  355. that.$http.post("{!! yzWebFullUrl('plugin.circle.admin.invitation.review') !!}", json).then(response => {
  356. if (response.data.result == 1) {
  357. that.$message.success('操作成功!');
  358. } else {
  359. that.$message.error(response.data.msg);
  360. }
  361. that.search(this.current_page);
  362. loading.close();
  363. }), function (res) {
  364. console.log(res);
  365. loading.close();
  366. };
  367. },
  368. playVideo(content) {
  369. if(!content) {
  370. return;
  371. }
  372. this.video_show = true;
  373. this.video_url = content
  374. },
  375. changeList() {
  376. this.search_form = {};
  377. this.getData(1)
  378. },
  379. gotoReward(id) {
  380. this.choose_index = '2'
  381. this.search_form = {};
  382. this.search_form.invitation_id = id
  383. this.getData(1)
  384. },
  385. },
  386. })
  387. </script>
  388. @endsection