Merge remote-tracking branch 'origin/main'

# Conflicts:
#	src/views/book/component/home.vue
#	src/views/maku/t_book/index.vue
#	src/views/maku/t_purchase/index.vue
#	src/views/maku/t_shopping_trolley/index.vue
This commit is contained in:
周添峰 2024-07-18 16:40:31 +08:00
commit 4ba7f85676
5 changed files with 85 additions and 36 deletions

View File

@ -1,5 +1,24 @@
<script setup lang="ts">
import { router } from '@/router/index.js'
import {useT_bookApi} from 'src\\api\\maku\\t_book.ts'
import {ref} from 'vue'
const book =ref({
id:0,
bookname:'',
author:'',
price:'',
bookcover:'',
store:0,
introduction:'',
description:''
})
// function getbook(){
// useT_bookApi(1).then(res=>{
// book.value=res.data
// })
// }
// getbook()
</script>
<template>
@ -10,7 +29,7 @@ import { router } from '@/router/index.js'
</div>
</div>
<div class="screen-outer">
<div class="tb-pick-content-item" @click="router.push('/book/details')">
<div class="tb-pick-content-item">
<div class="img-wrapper"></div>
<div class="info-wrapper">进口安佳淡奶油1L动物奶油新西兰家用生日蛋糕裱花蛋挞液专用烘焙</div>
<div class="price-wrapper">
@ -18,11 +37,21 @@ import { router } from '@/router/index.js'
<span class="price-value">30</span>
</div>
</div>
<div class="tb-pick-content-item"></div>
<div class="tb-pick-content-item"></div>
<div class="tb-pick-content-item"></div>
<div class="tb-pick-content-item"></div>
<div class="tb-pick-content-item"></div>
<div class="tb-pick-content-item">
<div class="img-wrapper"></div>
</div>
<div class="tb-pick-content-item">
<div class="img-wrapper"></div>
</div>
<div class="tb-pick-content-item">
<div class="img-wrapper"></div>
</div>
<div class="tb-pick-content-item">
<div class="img-wrapper"></div>
</div>
<div class="tb-pick-content-item">
<div class="img-wrapper"></div>
</div>
</div>
</template>

View File

@ -2,10 +2,10 @@
<el-card class="layout-query">
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList()">
<el-form-item prop="bookName">
<el-input v-model="state.queryForm.bookName" placeholder="书名"></el-input>
<el-input v-model="state.queryForm.bookName" placeholder="书名"></el-input>
</el-form-item>
<el-form-item prop="author">
<el-input v-model="state.queryForm.author" placeholder="作者"></el-input>
<el-input v-model="state.queryForm.author" placeholder="作者"></el-input>
</el-form-item>
<el-form-item>
<el-button icon="Search" type="primary" @click="getDataList()">查询</el-button>
@ -32,8 +32,8 @@
<el-table-column prop="price" label="价格" header-align="center" align="center"></el-table-column>
<el-table-column prop="bookCover" label="封面" header-align="center" align="center">
<template #default="scope">
<el-image style="width: 150px; height: 150px" :src="scope.row.bookCover" />
</template>
<img :src="scope.row.bookCover" style="max-width: 100%; max-height: 100px;" />
</template>
</el-table-column>
<el-table-column prop="introduction" label="书籍介绍" header-align="center" align="center"></el-table-column>
<el-table-column prop="description" label="书籍详情" header-align="center" align="center"></el-table-column>
@ -59,22 +59,22 @@
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update ref="addOrUpdateRef" @refresh-data-list="getDataList"></add-or-update>
<add-or-update ref="addOrUpdateRef" @refreshDataList="getDataList"></add-or-update>
</el-card>
</template>
<script setup lang="ts" name="MakuT_bookIndex">
import { useCrud } from '@/hooks'
import { reactive, ref } from 'vue'
import { IHooksOptions } from '@/hooks/interface'
import AddOrUpdate from './add-or-update.vue'
import {useCrud} from '@/hooks'
import {reactive, ref} from 'vue'
import {IHooksOptions} from '@/hooks/interface'
import AddOrUpdate from './add-or-update.vue'
const state: IHooksOptions = reactive({
const state: IHooksOptions = reactive({
dataListUrl: '/maku/t_book/page',
deleteUrl: '/maku/t_book',
queryForm: {
bookName: '',
author: ''
bookName: '',
author: '',
}
})

View File

@ -1,7 +1,15 @@
<template>
<el-card class="layout-query">
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList()">
<el-form-item>
<el-form-item prop="id">
<el-input v-model="state.queryForm.id" placeholder="序号"></el-input>
</el-form-item>
<el-form-item prop="">
<el-input v-model="state.queryForm.totalPrice" placeholder="订单总价"></el-input>
</el-form-item>
<el-form-item>
<el-button icon="Search" type="primary" @click="getDataList()">查询</el-button>
</el-form-item>
<el-form-item>
@ -45,20 +53,23 @@
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update ref="addOrUpdateRef" @refresh-data-list="getDataList"></add-or-update>
<add-or-update ref="addOrUpdateRef" @refreshDataList="getDataList"></add-or-update>
</el-card>
</template>
<script setup lang="ts" name="MakuT_purchaseIndex">
import { useCrud } from '@/hooks'
import { reactive, ref } from 'vue'
import { IHooksOptions } from '@/hooks/interface'
import AddOrUpdate from './add-or-update.vue'
import {useCrud} from '@/hooks'
import {reactive, ref} from 'vue'
import {IHooksOptions} from '@/hooks/interface'
import AddOrUpdate from './add-or-update.vue'
const state: IHooksOptions = reactive({
const state: IHooksOptions = reactive({
dataListUrl: '/maku/t_purchase/page',
deleteUrl: '/maku/t_purchase',
queryForm: {}
queryForm: {
id: '',
totalPrice: ''
}
})
const queryRef = ref()

View File

@ -1,7 +1,14 @@
<template>
<el-card class="layout-query">
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList()">
<el-form-item>
<el-form-item prop="userId">
<el-input v-model="state.queryForm.userId" placeholder="用户序号"></el-input>
</el-form-item>
<el-form-item prop="bookId">
<el-input v-model="state.queryForm.bookId" placeholder="书本序号"></el-input>
</el-form-item>
<el-form-item>
<el-button icon="Search" type="primary" @click="getDataList()">查询</el-button>
</el-form-item>
<el-form-item>
@ -44,20 +51,23 @@
</el-pagination>
<!-- 弹窗, 新增 / 修改 -->
<add-or-update ref="addOrUpdateRef" @refresh-data-list="getDataList"></add-or-update>
<add-or-update ref="addOrUpdateRef" @refreshDataList="getDataList"></add-or-update>
</el-card>
</template>
<script setup lang="ts" name="MakuT_shopping_trolleyIndex">
import { useCrud } from '@/hooks'
import { reactive, ref } from 'vue'
import { IHooksOptions } from '@/hooks/interface'
import AddOrUpdate from './add-or-update.vue'
import {useCrud} from '@/hooks'
import {reactive, ref} from 'vue'
import {IHooksOptions} from '@/hooks/interface'
import AddOrUpdate from './add-or-update.vue'
const state: IHooksOptions = reactive({
const state: IHooksOptions = reactive({
dataListUrl: '/maku/t_shopping_trolley/page',
deleteUrl: '/maku/t_shopping_trolley',
queryForm: {}
queryForm: {
bookId: '',
userId: ''
}
})
const queryRef = ref()

View File

@ -14,7 +14,6 @@
</el-form-item>
</el-form>
</template>
<script setup lang="ts">
import { reactive, ref } from 'vue'
import { useI18n } from 'vue-i18n'