Commit 8e9bd1d9 authored by Zheng Shang Jun's avatar Zheng Shang Jun

品类问题解决1

parent 24d04ce8
export default {
base:{
dictionary:{
base: {
dictionary: {
url: "/gdep-system/dict/dictionaryList",
method: "post"
},
sizeGroup:{
sizeGroup: {
url: "/gdep-mdm/size/query",
method: "post"
},
getCategoryList:{
getCategoryList: {
url: "/gdep-mdm/category/list",
method: "get"
},
getSupplierList:{
getCategoryQuery: {
url: "/gdep-mdm/category/query",
method: "post"
},
getSupplierList: {
url: "/gdep-enterprise/supplier/getSupplierList",
method: "get"
},
upload:{
upload: {
url: "/gdep-system/virtualfile/uploadFile",
method: "post"
}
......
......@@ -23,7 +23,7 @@
</span>
</view>
<view class="u-font-24 u-m-t-20 color_6F6F72">
<span class="u-m-r-10">{{ item.category }}</span>
<span class="u-m-r-10">{{ categoryName }}</span>
|
<span class="u-m-l-10 u-m-r-10">{{ item.clothWidth }} cm</span>
|
......@@ -45,6 +45,9 @@ export default {
type: Array,
default: () => [],
},
categoryName: {
type: String,
},
},
data() {
return {
......@@ -56,6 +59,7 @@ export default {
this.$emit("click");
},
},
mounted() {},
};
</script>
......
......@@ -33,6 +33,7 @@
<material
:item="item"
:colourApiList="tabledata.colourApiList"
:categoryName="categoryName"
></material>
</view>
<!-- 其他颜色 -->
......@@ -91,6 +92,7 @@ export default {
id: "",
imgUrl: this.$IMG_URL, // 上传地址
smapTelePhone: "", //联系人电话
categoryName: "", //全名品类name
};
},
// watch: {
......@@ -101,8 +103,9 @@ export default {
// },
// },
created() {
this.detail();
async created() {
await this.detail();
this.categoryFN(this.item.category);
},
onLoad(options) {
this.id = options.id;
......@@ -125,11 +128,11 @@ export default {
},
// 详情接口
detail() {
async detail() {
let param = {
id: this.id,
};
this.$http("mobileBrand.styleDetail", param).then((res) => {
return this.$http("mobileBrand.styleDetail", param).then((res) => {
let { code, data } = res;
if (code === 200) {
this.tabledata = data;
......@@ -149,7 +152,19 @@ export default {
}
});
},
// 品类接口
async categoryFN(ids) {
return this.$http("base.getCategoryQuery", { type: "ML" }).then((res) => {
if (res.code == 200) {
let cate = res.data.find((el) => {
return el.id == ids;
});
this.categoryName = cate.name;
}
});
},
},
mounted() {},
};
</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