| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- @extends('layouts.base')
- @section('title', "专题页")
- @section('content')
- <link rel="stylesheet" href="{{resource_get('plugins/pc-terminal-two/views/backend/index.css')}}">
- <style>
- /* 导航 */
- .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;}
- .el-radio-button__inner{border:0;}
- .el-radio-button:last-child .el-radio-button__inner {border-radius: 4px 4px 4px 4px;}
- </style>
- <div class="all">
- <div id="app" v-cloak>
- <div class="vue-crumbs">
- <a @click="goParent(1)">PC端模板2</a> >专题页
- </div>
- <div class="vue-main">
- <div>
- <div class="vue-main-title" style="margin-bottom:20px">
- <div class="vue-main-title-left"></div>
- <div class="vue-main-title-content" style="flex:0 0 120px">专题列表</div>
- </div>
- <el-table :data="list" style="width: 100%">
- <el-table-column label="专题ID" align="center" prop="id" width="100"></el-table-column>
- <el-table-column label="专题名称" align="center" prop="name"></el-table-column>
- <el-table-column prop="refund_time" label="操作" align="center" width="320" :inline="true">
- <template slot-scope="scope">
- <el-input v-model="scope.row.copy_h5_url" style="opacity:0;width:33px;" :ref="'copy'+scope.$index"></el-input>
- <el-button type="primary" size="mini" @click="gotoDetail(scope.row)">编辑</el-button>
- <el-button type="primary" size="mini" @click="copyLink(scope.row,scope.$index)">复制链接</el-button>
- </template>
- </el-table-column>
- </el-table>
- </div>
- </div>
- <!-- 分页 -->
- <div class="vue-page" v-if="total>0">
- <el-row>
- <el-col align="right">
- <el-pagination layout="prev, pager, next,jumper" @current-change="search" :total="total"
- :page-size="per_page" :current-page="current_page" background
- ></el-pagination>
- </el-col>
- </el-row>
- </div>
- </div>
- </div>
- <script>
- var app = new Vue({
- el: "#app",
- delimiters: ['[[', ']]'],
- name: 'test',
- data() {
- return {
- list:[],
- current_page:1,
- total:1,
- per_page:1,
- }
- },
- created() {
- },
- mounted() {
- this.getData(1);
- },
- methods: {
- getData(page) {
- let loading = this.$loading({target:document.querySelector(".content"),background: 'rgba(0, 0, 0, 0)'});
- this.$http.post('{!! yzWebFullUrl('plugin.pc-terminal-two.backend.features.features-list') !!}',{page:page}).then(function(response) {
- if (response.data.result) {
- console.log(response.data.data);
- this.list = response.data.data.data;
- this.current_page=response.data.data.current_page;
- this.total=response.data.data.total;
- this.per_page=response.data.data.per_page;
- loading.close();
- } else {
- this.$message({
- message: response.data.msg,
- type: 'error'
- });
- }
- loading.close();
- }, function(response) {
- this.$message({
- message: response.data.msg,
- type: 'error'
- });
- loading.close();
- });
- },
- gotoDetail(item) {
- let link = `{!! yzWebFullUrl('plugin.pc-terminal-two.backend.features.features-edit') !!}`+`&id=`+item.id;
- window.location.href = link;
- },
- goParent(level) {
- if(level==1) {
- window.location.href = `{!! yzWebFullUrl('plugin.pc-terminal-two.backend.set.basic') !!}`;
- }
- },
- copyLink(row,index) {
- that = this;
- let Url = that.$refs['copy'+index];
- Url.select(); // 选择对象
- document.execCommand("Copy",false);
- that.$message({message:"复制成功!",type:"success"});
- },
- search(val) {
- this.getData(val);
- },
- // 字符转义
- escapeHTML(a) {
- a = "" + a;
- return a.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, "\"").replace(/'/g, "'");;
- },
- },
- })
- </script>
- @endsection
|