Commit 70c72b7d by member

测试连接小工具

parent c09e0298
......@@ -4,29 +4,29 @@
<el-select v-model="giftVal" style="width: 200px;" multiple placeholder="礼品类型">
<el-option
v-for="item in giftOptions"
:key="item.value"
:label="item.label"
:value="item.value"
:key="item.integralMallCategoryId"
:label="item.categoryName"
:value="item.integralMallCategoryId"
></el-option>
</el-select>
<el-input v-model="giftName" style="width: 200px; margin-left: 20px;" placeholder="输入礼品名称"></el-input>
<el-input v-model="giftName" style="width: 200px; margin-left: 20px;" placeholder="输入礼品名称" @keyup.native.enter="handleSearch"></el-input>
</div>
<div class="goods-link-content">
<ul class="goods-link-list">
<!-- <li
<li
:class="item.mallProId == selectGoodId? 'goods-link-item goodSelect': 'goods-link-item'"
v-for="(item, index) in goodsList"
:key="index"
@click="selectGoodLinkItem(item)"
>
<img :src="item.mallProImageUrl" alt="商品图片">
<img :src="item.mainImageUrl" alt="商品图片">
<div class="inline-block goods-message">
<p class="limit-2 pro-name">{{item.proName}}</p>
<p class="limit-2 pro-name">{{item.giftCategoryName}}</p>
<p class="gray-color pro-code">货号:{{item.proCode}}</p>
<span class="pro-price">{{item.mallProSpuPrice}}</span>
</div>
</li> -->
</li>
</ul>
</div>
......@@ -59,6 +59,7 @@ export default {
total: 0,
giftVal: null,
giftOptions: [],
goodsList: [],
giftName: ""
};
},
......@@ -73,25 +74,59 @@ export default {
},
methods: {
// 分类
getGiftList() {
const params = {
requestProject: 'member'
};
this.axios
.get(`${this.baseUrl}/api-integral-mall/load-category?requestProject=member`)
.get(`${this.baseUrl}/api-integral-mall/load-category?requestProject=${this.pname}`)
.then(res => {
console.log(res);
const resData = res.data;
if (resData.errorCode === 0) {
if (!!resData.result && resData.result.length) {
this.giftOptions = resData.result;
}
}
});
},
// 分页换页
handleChangePage(val) {
this.cardCurrentPage = val;
this.getGiftList();
},
// 分页数据
getData() {
const params = {
requestProject: this.pname,
currentPage: this.currentPage,
pageSize: this.pageSize,
category: this.giftVal,
giftName: this.giftName
};
this.axios.post(`${this.baseUrl}/api-integral-mall/page-gift`,qs.stringify(params)).then(res => {
const data = res.data;
if (data.errorCode == 0) {
if (!!data.result && data.result.rows && data.result.rows.length) {
this.goodsList = data.result.rows;
}
this.total = data.result.total || 0;
}
});
},
selectGoodLinkItem(item) {
},
handleSearch() {
this.getGiftList();
}
},
mounted() {
this.getGiftList();
this.getData();
}
};
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment