新增营销中心限时折扣模板
This commit is contained in:
@@ -11,6 +11,10 @@
|
||||
<u-tag :type="statusFilter(item.status, 'type')" plain :text="statusFilter(item.status, 'label')"></u-tag>
|
||||
</view>
|
||||
</view>
|
||||
<view class="row">
|
||||
<text class="b">活动名称:</text>
|
||||
<text class="t">{{ item.title }}</text>
|
||||
</view>
|
||||
<view class="row">
|
||||
<text class="b">活动时间:</text>
|
||||
<text class="t">{{ item.updateTime }}</text>
|
||||
@@ -26,7 +30,7 @@
|
||||
<u-button @click="delHandle(item)">删除</u-button>
|
||||
</view>
|
||||
<view class="btn">
|
||||
<u-button type="primary">编辑</u-button>
|
||||
<u-button type="primary" @click="editorHandle(item)">编辑</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -38,12 +42,16 @@
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref } from 'vue';
|
||||
import { onLoad, onReachBottom } from '@dcloudio/uni-app';
|
||||
import HeaderCard from '../components/HeaderCard.vue';
|
||||
import FooterBtn from '../components/FooterBtn.vue';
|
||||
import { limitTimeDiscountPage } from '@/http/api/market/index.js';
|
||||
import { onLoad, onShow, onReachBottom } from '@dcloudio/uni-app';
|
||||
import { limitTimeDiscountPage, limitTimeDiscountDel } from '@/http/api/market/index.js';
|
||||
import go from '@/commons/utils/go.js';
|
||||
|
||||
// 去编辑
|
||||
function editorHandle(item) {
|
||||
uni.setStorageSync('limitDiscountObj', item);
|
||||
go.to('PAGES_LIMIT_DISCOUNT_ADD');
|
||||
}
|
||||
|
||||
// 删除限时折扣
|
||||
function delHandle(item) {
|
||||
uni.showModal({
|
||||
@@ -56,7 +64,7 @@ function delHandle(item) {
|
||||
title: '删除中...',
|
||||
mask: true
|
||||
});
|
||||
await limitTimeDiscountDel({ id: item.id });
|
||||
await limitTimeDiscountDel(item.id);
|
||||
uni.showToast({
|
||||
title: '删除成功',
|
||||
icon: 'none'
|
||||
@@ -128,7 +136,7 @@ async function limitTimeDiscountPageAjax() {
|
||||
} else {
|
||||
tableData.list.push(...res.records);
|
||||
}
|
||||
if (res.totalPage == res.totalRow) {
|
||||
if (res.pageNumber == res.totalPage) {
|
||||
tableData.status = 'nomore';
|
||||
}
|
||||
} catch (error) {
|
||||
@@ -136,9 +144,12 @@ async function limitTimeDiscountPageAjax() {
|
||||
}
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
onShow(() => {
|
||||
tableData.page = 1;
|
||||
limitTimeDiscountPageAjax();
|
||||
});
|
||||
|
||||
onLoad(() => {});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@@ -156,12 +167,16 @@ page {
|
||||
background-color: #fff;
|
||||
padding: 20upx;
|
||||
border-radius: 20upx;
|
||||
&:not(:first-child) {
|
||||
margin-top: 28upx;
|
||||
}
|
||||
.head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.left {
|
||||
.t {
|
||||
color: #999;
|
||||
font-size: 28upx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user