Commit 44007863 authored by 王's avatar

对外投放

parent 44fd0fbc
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div class="index"> <div class="index">
<el-form ref="searchFrom" :model="searchFrom" label-width="80px"> <el-form ref="searchFrom" :model="searchFrom" label-width="80px">
<el-row> <el-row>
<el-col :span="10"> <el-col :lg="10" :sm="24" :md="24">
<el-form-item label="购买时间"> <el-form-item label="购买时间">
<el-date-picker <el-date-picker
v-model="searchFrom.time" v-model="searchFrom.time"
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :lg="4" :sm="24" :md="12">
<el-form-item label="来源"> <el-form-item label="来源">
<el-input v-model="searchFrom.source" placeholder="名称" <el-input v-model="searchFrom.source" placeholder="名称"
size="small"></el-input> size="small"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :lg="4" :sm="24" :md="12">
<el-form-item> <el-form-item>
<el-button type="primary" plain size="small" @click="initPage"> <el-button type="primary" plain size="small" @click="initPage">
搜索 搜索
...@@ -36,35 +36,26 @@ ...@@ -36,35 +36,26 @@
:data="tableData" :data="tableData"
style="width: 100%"> style="width: 100%">
<el-table-column <el-table-column
prop="id" prop="user_name"
label="id">
</el-table-column>
<el-table-column
prop="nickname"
label="宝贝名称"> label="宝贝名称">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="宝贝年龄" prop="create_at"
label="age"> label="添加时间">
</el-table-column>
<el-table-column
prop="address"
sortable
label="城市">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="source" prop="source"
sortable
label="来源"> label="来源">
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :total="total" :limit="limit" @pageChange="onPageChange"/> <page :total="total" :limit="limit" @pageChange="onPageChange" @sizeChange="onSizeChange"/>
</div> </div>
</template> </template>
<script> <script>
import page from '../framework/page' import page from '../framework/page'
import CommonJs from '../../util/common'; import CommonJs from '../../util/common';
import {getAdsListApi} from "../../service/api";
export default { export default {
name: "index", name: "index",
components:{ components:{
...@@ -97,26 +88,22 @@ ...@@ -97,26 +88,22 @@
json.source = this.searchFrom.source json.source = this.searchFrom.source
} }
if(this.searchFrom.time && this.searchFrom.time.length > 0){ if(this.searchFrom.time && this.searchFrom.time.length > 0){
json.pay_start_at = CommonJs.dateFmt(this.searchFrom.time[0],"yyyy-MM-dd hh:mm:ss"); json.date_start = CommonJs.dateFmt(this.searchFrom.time[0],"yyyy-MM-dd hh:mm:ss");
json.pay_end_at = CommonJs.dateFmt(this.searchFrom.time[1],"yyyy-MM-dd hh:mm:ss") json.date_end = CommonJs.dateFmt(this.searchFrom.time[1],"yyyy-MM-dd hh:mm:ss")
} }
this.tableData = [ getAdsListApi(json).then((res)=>{
{ this.tableData = res.list;
id: 1, this.total = res.total
nickname: 'xiaoming', })
age: '3',
mobile: 17326578909,
address: '上海',
source: 'fff_123'
}
]
}, },
onPageChange(val){ onPageChange(val){
this.nowPage = val this.nowPage = val
this.initPage() this.initPage()
}, },
changeShow() { onSizeChange(val){
this.nowPage = 1
this.limit = val
this.initPage()
} }
} }
} }
......
...@@ -580,7 +580,7 @@ export const updateQrCodeApi = function (id, json) { ...@@ -580,7 +580,7 @@ export const updateQrCodeApi = function (id, json) {
return Vue.prototype.$put(`${updateQrCodeUrl}/${id}`,json) return Vue.prototype.$put(`${updateQrCodeUrl}/${id}`,json)
}; };
// 获取二维码列表详情 // 获取二维码列表详情
const getQrCodeDetailUrl = 'api/admin/wechat/qrcode'; const getAdsListlUrl = 'api/public/ads/list';
export const getQrCodeDetailUrlApi = function (id) { export const getAdsListApi = function (json) {
return Vue.prototype.$fetch(`${getQrCodeDetailUrl}/${id}`) return Vue.prototype.$fetch(getAdsListlUrl, json)
}; };
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment