| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- <?php
- /**
- * @link:http://www.goodmall.com/
- * @copyright: Copyright (c) 2020
- * 名片
- * Author: james
- * Date: 2020-07-10
- * Time: 15:48
- */
- ?>
- <div id="app" v-cloak>
- <el-card shadow="never" style="border:0" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
- <div slot="header">
- <el-breadcrumb separator="/">
- <el-breadcrumb-item>
- <span style="color: #409EFF;cursor: pointer" @click="$navigate({r:'sign-in/default/record'})">签到记录</span>
- </el-breadcrumb-item>
- <el-breadcrumb-item>签到详情</el-breadcrumb-item>
- </el-breadcrumb>
- </div>
- <div class="table-body">
- <el-tabs>
- <el-table :data="list" border v-loading="loading" size="small" style="margin-bottom: 15px;">
- <el-table-column prop="num" label="数量">
- <template slot-scope="scope">
- <div>{{scope.row.num}}</div>
- </template>
- </el-table-column>
- <el-table-column label="奖励类型">
- <template slot-scope="scope">
- <div v-if="scope.row.type==1">积分</div>
- <div v-if="scope.row.type==2">优惠券</div>
- </template>
- </el-table-column>
- <el-table-column label="备注" prop="describe">
- <template slot-scope="scope">
- <div>{{scope.row.describe}}</div>
- </template>
- </el-table-column>
- <el-table-column label="领取时间" prop="created_at">
- <template slot-scope="scope">
- <div>{{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}</div>
- </template>
- </el-table-column>
- </el-table>
- </el-tabs>
- <div flex="box:last cross:center">
- <div></div>
- <div>
- <el-pagination
- v-if="list.length > 0"
- style="display: inline-block;float: right;"
- background :page-size="pagination.pageSize"
- @current-change="pageChange"
- layout="prev, pager, next" :current-page="pagination.current_page"
- :total="pagination.totalCount">
- </el-pagination>
- </div>
- </div>
- </div>
- </el-card>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data: {
- user_id:'',
- loading: false,
- list: [],
- exportList: [],
- pagination: null,
- },
- mounted() {
- this.loadData();
- },
- methods: {
- down() {
- var alink = document.createElement("a");
- alink.href = this.qrimg;
- alink.download = this.nickname;
- alink.click();
- },
- loadData(page) {
- this.user_id = location.href.split('=')[2];
- this.loading = true;
- request({
- params: {
- r: 'sign-in/default/user-sign-in',
- page: page,
- user_id: this.user_id,
- },
- }).then(e => {
- console.log(e);
- this.loading = false;
- if (e.data.code === 0) {
- this.list = e.data.data.list;
- this.pagination = e.data.data.pagination;
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
-
- this.loading = false;
- });
- },
- pageChange(page) {
- this.loadData(page);
- },
- }
- });
- </script>
- <style>
- .el-tabs__header {
- font-size: 16px;
- }
- .table-body {
- padding: 20px;
- background-color: #fff;
- }
- .table-body .el-button {
- padding: 0 !important;
- border: 0;
- margin: 0 5px;
- }
- .input-item {
- width: 250px;
- margin: 0 0 20px;
- display: inline-block;
- }
- .input-item .el-input__inner {
- border-right: 0;
- }
- .input-item .el-input__inner:hover {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input__inner:focus {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input-group__append {
- background-color: #fff;
- border-left: 0;
- width: 10%;
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- margin: 0;
- }
- .batch {
- margin: 0 0 20px;
- display: inline-block;
- }
- .batch .el-button {
- padding: 9px 15px !important;
- }
- </style>
|