Commit ed0d66d5 authored by 刘殿昕's avatar 刘殿昕

应用商店的列表不是一个人写的,数据结构可能会遇见不可知问题,over

parent 26abfa03
...@@ -34,12 +34,12 @@ ...@@ -34,12 +34,12 @@
</div> </div>
<div class="com_cell_item"> <div class="com_cell_item">
<span class="com_cell_item_title">更新时间:</span> <span class="com_cell_item_title">更新时间:</span>
<span class="com_cell_data">{{ cellData.update_date }}</span> <span class="com_cell_data">{{ helper.dateStringTransform(cellData.update_date) }}</span>
</div> </div>
</div> </div>
<div class="com_cell_right"> <div class="com_cell_right">
<el-rate <el-rate
v-model="cellData.rate" v-model="cellData.score"
disabled disabled
show-score show-score
text-color="#58617a" text-color="#58617a"
...@@ -55,6 +55,8 @@ ...@@ -55,6 +55,8 @@
</template> </template>
<script> <script>
import helper from "@/services/helper.js";
// if you meet date which like 2020-06-05T00:00:00+08:00, use helper.dateStringTransform()
export default { export default {
components: {}, components: {},
props: { props: {
......
...@@ -25,7 +25,10 @@ ...@@ -25,7 +25,10 @@
<!-- filter --> <!-- filter -->
<div v-if="urlFilter" class="classification"> <div v-if="urlFilter" class="classification">
<div v-for="(item, index) in filterLists" :key="'cd' + index" class="classification_line"> <div v-for="(item, index) in filterLists" :key="'cd' + index" class="classification_line">
<div class="classification_line_if" v-if="item.childDomains"> <div
class="classification_line_if"
v-if="item.childDomains && item.childDomains.length != 0"
>
<div class="classification_line_title">{{ item.name }}</div> <div class="classification_line_title">{{ item.name }}</div>
<div <div
:class="index == filterLists.length - 1 ? 'classification_line_items':'classification_line_items classification_line_items_border'" :class="index == filterLists.length - 1 ? 'classification_line_items':'classification_line_items classification_line_items_border'"
...@@ -106,7 +109,10 @@ ...@@ -106,7 +109,10 @@
</div> </div>
</div> </div>
</div> </div>
<div class="gray_line"></div> <div
class="gray_line"
v-if="filterLists[0].childDomains.length != 0 || filterLists[1].childDomains.length != 0 || filterLists[2].childDomains.length != 0"
></div>
<!-- filter button --> <!-- filter button -->
<div class="btn_group"> <div class="btn_group">
<el-button <el-button
...@@ -147,6 +153,7 @@ export default { ...@@ -147,6 +153,7 @@ export default {
name: { type: String, default: "" } name: { type: String, default: "" }
}, },
data: () => ({ data: () => ({
helper: helper,
search: "", search: "",
openList: [0, 0, 0, 0], openList: [0, 0, 0, 0],
openChildren: [ openChildren: [
...@@ -223,11 +230,14 @@ export default { ...@@ -223,11 +230,14 @@ export default {
if (response.data.success == "1") { if (response.data.success == "1") {
this.lists = response.data.data; this.lists = response.data.data;
} else { } else {
console.log(response.data.message); console.log(response.data.errMsg);
} }
}); });
}, },
getShopFilter() { getShopFilter() {
if (this.urlFilter == "app") {
} else {
let query = { let query = {
type: this.urlFilter type: this.urlFilter
}; };
...@@ -243,7 +253,6 @@ export default { ...@@ -243,7 +253,6 @@ export default {
this.filterLists[2].childDomains = data.organizations this.filterLists[2].childDomains = data.organizations
? data.organizations ? data.organizations
: []; : [];
console.log(this.filterLists);
setTimeout(() => { setTimeout(() => {
this.judgeHeight(); this.judgeHeight();
}, 0); }, 0);
...@@ -252,6 +261,7 @@ export default { ...@@ -252,6 +261,7 @@ export default {
console.log(response.data.errMsg); console.log(response.data.errMsg);
} }
}); });
}
}, },
judgeHeight() { judgeHeight() {
let list = this.filterLists; let list = this.filterLists;
...@@ -290,7 +300,6 @@ export default { ...@@ -290,7 +300,6 @@ export default {
}); });
} }
} }
console.log(this.activeOptions);
this.getFilterValue(); this.getFilterValue();
}, },
clickItemChild(index, indexs, items) { clickItemChild(index, indexs, items) {
...@@ -331,7 +340,6 @@ export default { ...@@ -331,7 +340,6 @@ export default {
} else { } else {
this.activeChildOptions[index].splice(i, 1); this.activeChildOptions[index].splice(i, 1);
} }
console.log(this.activeChildOptions, i, fatherId);
this.getFilterValue(); this.getFilterValue();
}, },
getFilterValue() { getFilterValue() {
...@@ -350,8 +358,9 @@ export default { ...@@ -350,8 +358,9 @@ export default {
this.getShopList(); this.getShopList();
}, },
clickAll(item) { clickAll(item) {
this.activeOptions[item] = []; this.$set(this.activeOptions, item, []);
this.activeChildOptions[item] = []; this.$set(this.activeChildOptions, item, []);
this.getShopList();
} }
} }
}; };
......
...@@ -60,7 +60,7 @@ export default { ...@@ -60,7 +60,7 @@ export default {
break; break;
case "app_store_list": case "app_store_list":
this.name = "应用商店"; this.name = "应用商店";
this.urlFilter = ""; this.urlFilter = "app";
this.url = "/shop/yysdDetail"; this.url = "/shop/yysdDetail";
break; break;
default: default:
......
...@@ -21,7 +21,23 @@ Page=${params.Page}&Size=${params.Size}`); ...@@ -21,7 +21,23 @@ Page=${params.Page}&Size=${params.Size}`);
getServiceShopDetail(params) { getServiceShopDetail(params) {
return axios.get(`/apaas/serviceapp/v3/servicemarket/detail?serviceId=`) return axios.get(`/apaas/serviceapp/v3/servicemarket/detail?serviceId=`)
}, },
// service list application
getApparea() {
return axios.get(`/apaas/hubApi/market/businessAreas`)
},
getAppArea() {
return axios.get(`/apaas/hubApi/market/businessAreas`)
},
getAppType() {
return axios.get(`/apaas/hubApi/market/appTypes`)
},
getAppOrg() {
return axios.get(`/apaas/hubApi/market/departments`)
},
getAppList(params) {
return axios.get(`/apaas/hubApi/market/list?online_state=${params.online_state}&appTypes=${params.appTypes}&
businessArea=${params.businessArea}&developable=${params.developable}&page=${params.page}&limit=${params.limit}&search=${params.search}`);
},
// shopping cart // shopping cart
addShoppingCart(params) { addShoppingCart(params) {
return axios.post(`/apaas/serviceapp/v3/shopcart/add`, params); return axios.post(`/apaas/serviceapp/v3/shopcart/add`, params);
......
...@@ -34,3 +34,18 @@ module.exports.dateFormat = function (fmt, timestamp) { ...@@ -34,3 +34,18 @@ module.exports.dateFormat = function (fmt, timestamp) {
}; };
return fmt; return fmt;
} }
module.exports.dateStringTransform = function (date) {
let arr = date.split("T");
let d = arr[0];
let darr = d.split('-');
let t = arr[1];
let tarr = t.split('.000');
let marr = tarr[0].split(':');
let h = parseInt(marr[0]) >= 10 ? parseInt(marr[0]) : "0" + parseInt(marr[0]);
let m = parseInt(marr[1]) >= 10 ? parseInt(marr[1]) : "0" + parseInt(marr[1]);
let s = parseInt(marr[2]) >= 10 ? parseInt(marr[2]) : "0" + parseInt(marr[2]);
let dd = arr[0] + " " + h + ":" + m + ":" + s;
return dd;
}
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