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

品类问题解决1

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