提交 f4b73bfc authored 作者: zgy's avatar zgy

完成一级分类图片

上级 d08b1ac3
......@@ -8,6 +8,7 @@
<result property="goodstypeTitle" column="goodstype_title"/>
<result property="goodstypeSort" column="goodstype_sort"/>
<result property="goodstypeUrl" column="goodstype_url"/>
<result property="goodstypeImage" column="goodstype_image"/>
</resultMap>
<select id="queryObject" resultType="com.platform.entity.TbCfGoodstypeEntity">
......@@ -15,7 +16,8 @@
`goodstype_id`,
`goodstype_title`,
`goodstype_sort`,
`goodstype_url`
`goodstype_url`,
`goodstype_image`
from tb_cf_goodstype
where goodstype_id = #{id}
</select>
......@@ -25,7 +27,8 @@
`goodstype_id`,
`goodstype_title`,
`goodstype_sort`,
`goodstype_url`
`goodstype_url`,
`goodstype_image`
from tb_cf_goodstype
where goodstype_title = #{title}
</select>
......@@ -35,7 +38,8 @@
`goodstype_id`,
`goodstype_title`,
`goodstype_sort`,
`goodstype_url`
`goodstype_url`,
`goodstype_image`
from tb_cf_goodstype
WHERE 1=1
<if test="name != null and name.trim() != ''">
......@@ -67,12 +71,12 @@
`goodstype_id`,
`goodstype_title`,
`goodstype_sort`,
`goodstype_url`)
`goodstype_image`)
values(
#{goodstypeId},
#{goodstypeTitle},
#{goodstypeSort},
#{goodstypeUrl})
#{goodstypeImage})
</insert>
<update id="update" parameterType="com.platform.entity.TbCfGoodstypeEntity">
......@@ -80,7 +84,7 @@
<set>
<if test="goodstypeTitle != null">`goodstype_title` = #{goodstypeTitle},</if>
<if test="goodstypeSort != null">`goodstype_sort` = #{goodstypeSort},</if>
<if test="goodstypeUrl != null">`goodstype_url` = #{goodstypeUrl}</if>
<if test="goodstypeImage != null">`goodstype_image` = #{goodstypeImage}</if>
</set>
where goodstype_id = #{goodstypeId}
</update>
......
......@@ -49,8 +49,8 @@
<i-input v-model="tbCfGoodstype.goodstypeTitle" placeholder="商品分类标题"/>
</Form-item>
<Form-item label="一级分类图片" prop="goodstypeUrl">
<img v-bind:src="tbCfGoodstype.goodstypeUrl" v-show="!!tbCfGoodstype.goodstypeUrl"/>
<Form-item label="一级分类图片" prop="goodstypeImage">
<img v-bind:src="tbCfGoodstype.goodstypeImage" v-show="!!tbCfGoodstype.goodstypeImage"/>
<input type="file" placeholder="一级分类图片" @change="tirggerFile($event)"/>
</Form-item>
......
......@@ -5,7 +5,7 @@ $(function () {
{label: 'ID', name: 'goodstypeId', index: 'goodstype_id', key: true,hidden: true},
{label: '商品一级分类', name: 'goodstypeTitle', index: 'goodstype_title', width: 80},
{label: '排序编号', name: 'goodstypeSort', index: 'goodstype_sort', width: 80},
{label: '一级分类图片', name: 'goodstypeUrl', index: 'goodstype_url', width: 80, formatter: imageFormat}],
{label: '一级分类图片', name: 'goodstypeImage', index: 'goodstype_image', width: 80, formatter: imageFormat}],
shrinkToFit: true,
datatype : "json",
rowNum:15,
......@@ -136,7 +136,7 @@ let vm = new Vue({
result = JSON.parse(result);
//console.log(result)
if (result.errno == 0) {//成功
vm.tbCfGoodstype.goodstypeUrl = result.data;
vm.tbCfGoodstype.goodstypeImage = result.data;
vm.$forceUpdate();
} else {
iview.Message.error(result.errmsg);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论