parent
f9d0d5d38b
commit
4f89c1edfe
@ -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 })
|
return request.get({ url: '/product/brand/page', params })
|
||||||
}
|
}
|
||||||
|
@ -12,11 +12,21 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="品牌图片" prop="picUrl">
|
<el-form-item label="品牌图片" prop="picUrl">
|
||||||
<UploadImg v-model="formData.picUrl" :limit="1" :is-show-tip="false" />
|
<UploadImg v-model="formData.picUrl" :limit="1" :is-show-tip="false" />
|
||||||
<div style="font-size: 10px">推荐 100x100 图片分辨率</div>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="品牌排序" prop="sort">
|
<el-form-item label="品牌排序" prop="sort">
|
||||||
<el-input-number v-model="formData.sort" controls-position="right" :min="0" />
|
<el-input-number v-model="formData.sort" controls-position="right" :min="0" />
|
||||||
</el-form-item>
|
</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-form-item label="品牌描述">
|
||||||
<el-input v-model="formData.description" type="textarea" placeholder="请输入品牌描述" />
|
<el-input v-model="formData.description" type="textarea" placeholder="请输入品牌描述" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -27,7 +37,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</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 { CommonStatusEnum } from '@/utils/constants'
|
||||||
import * as ProductBrandApi from '@/api/mall/product/brand'
|
import * as ProductBrandApi from '@/api/mall/product/brand'
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
|
@ -132,7 +132,7 @@ const queryFormRef = ref() // 搜索的表单
|
|||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const data = await ProductBrandApi.getBrandList(queryParams)
|
const data = await ProductBrandApi.getBrandParam(queryParams)
|
||||||
list.value = data.list
|
list.value = data.list
|
||||||
total.value = data.total
|
total.value = data.total
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -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 WxNews from '@/views/mp/components/wx-news/main.vue'
|
||||||
import WxLocation from '@/views/mp/components/wx-location/main.vue'
|
import WxLocation from '@/views/mp/components/wx-location/main.vue'
|
||||||
import WxMusic from '@/views/mp/components/wx-music/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'
|
import { defineComponent } from 'vue'
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
Loading…
Reference in New Issue
Block a user