REVIEW 商品品牌

(cherry picked from commit 1e0f613449)
This commit is contained in:
YunaiV 2023-04-08 22:49:51 +08:00 committed by shizhong
parent f9d0d5d38b
commit 4f89c1edfe
4 changed files with 16 additions and 5 deletions

View File

@ -51,6 +51,6 @@ export const getBrand = (id: number) => {
}
// 获得商品品牌列表
export const getBrandList = (params: any) => {
export const getBrandParam = (params: PageParam) => {
return request.get({ url: '/product/brand/page', params })
}

View File

@ -12,11 +12,21 @@
</el-form-item>
<el-form-item label="品牌图片" prop="picUrl">
<UploadImg v-model="formData.picUrl" :limit="1" :is-show-tip="false" />
<div style="font-size: 10px">推荐 100x100 图片分辨率</div>
</el-form-item>
<el-form-item label="品牌排序" prop="sort">
<el-input-number v-model="formData.sort" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="品牌状态" prop="status">
<el-radio-group v-model="formData.status">
<el-radio
v-for="dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
:key="dict.value"
:label="dict.value"
>
{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="品牌描述">
<el-input v-model="formData.description" type="textarea" placeholder="请输入品牌描述" />
</el-form-item>
@ -27,7 +37,8 @@
</template>
</Dialog>
</template>
<script setup lang="ts" name="ProductBrand">
<script setup lang="ts" name="ProductBrandForm">
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { CommonStatusEnum } from '@/utils/constants'
import * as ProductBrandApi from '@/api/mall/product/brand'
const { t } = useI18n() //

View File

@ -132,7 +132,7 @@ const queryFormRef = ref() // 搜索的表单
const getList = async () => {
loading.value = true
try {
const data = await ProductBrandApi.getBrandList(queryParams)
const data = await ProductBrandApi.getBrandParam(queryParams)
list.value = data.list
total.value = data.total
} finally {

View File

@ -139,7 +139,7 @@ import WxVoicePlayer from '@/views/mp/components/wx-voice-play/main.vue'
import WxNews from '@/views/mp/components/wx-news/main.vue'
import WxLocation from '@/views/mp/components/wx-location/main.vue'
import WxMusic from '@/views/mp/components/wx-music/main.vue'
import { getUser } from '@/api/mp/mpuser'
import { getUser } from '@/api/mp/user'
import { defineComponent } from 'vue'
const message = useMessage() //