|
@@ -1,13 +1,19 @@
|
|
|
<template>
|
|
|
<div class="appManagement">
|
|
|
<div class="ac_left">
|
|
|
- <saveCard title="最近使用" :data="recentUse" :type="1" @saveClick="openApp"/>
|
|
|
- <saveCard title="收藏" :data="collect" :type="0" @saveClick="openApp"/>
|
|
|
+ <saveCard
|
|
|
+ title="最近使用"
|
|
|
+ :data="recentUse"
|
|
|
+ :type="1"
|
|
|
+ @saveClick="openApp"
|
|
|
+ />
|
|
|
+ <saveCard title="收藏" :data="collect" :type="0" @saveClick="openApp" />
|
|
|
</div>
|
|
|
<div class="ac_right">
|
|
|
<div class="ac_header">
|
|
|
<div class="ac_h_top">
|
|
|
- <span class="ac_h_t_active"> <!-- class="ac_h_t_active"-->
|
|
|
+ <span class="ac_h_t_active">
|
|
|
+ <!-- class="ac_h_t_active"-->
|
|
|
<svg
|
|
|
width="20"
|
|
|
height="20"
|
|
@@ -45,20 +51,18 @@
|
|
|
</svg>
|
|
|
工作空间</span
|
|
|
>
|
|
|
- <!-- <el-button
|
|
|
+ <el-button
|
|
|
type="primary"
|
|
|
size="small"
|
|
|
icon="el-icon-plus"
|
|
|
+ v-show="false"
|
|
|
style="position: absolute;right: 15px;"
|
|
|
@click="addApp"
|
|
|
>添加应用</el-button
|
|
|
- > -->
|
|
|
+ >
|
|
|
</div>
|
|
|
<div class="ac_h_banner" v-if="bannerObj">
|
|
|
- <img
|
|
|
- :src="bannerObj.poster"
|
|
|
- alt="banner图"
|
|
|
- />
|
|
|
+ <img :src="bannerObj.poster" alt="banner图" />
|
|
|
</div>
|
|
|
<div class="ac_h_bottom">
|
|
|
<div class="ac_h_b_typeList">
|
|
@@ -76,12 +80,11 @@
|
|
|
>
|
|
|
</div>
|
|
|
<div class="ac_h_b_selectList">
|
|
|
-
|
|
|
<el-select
|
|
|
v-model="selectJuri"
|
|
|
- placeholder="请选择"
|
|
|
+ placeholder="请选择显示范围"
|
|
|
@change="changeSelectType"
|
|
|
- style="width: 150px;margin-right: 10px;"
|
|
|
+ style="width: 150px;margin-right: 10px;"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="item in selectList"
|
|
@@ -90,19 +93,31 @@
|
|
|
:value="item.index"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
- <el-input
|
|
|
+ <el-select
|
|
|
+ v-model="selectLabel"
|
|
|
+ placeholder="请选择类型"
|
|
|
+ @change="changeSelectType"
|
|
|
+ style="width: 120px;margin-right: 10px;"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in labelSelect"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ <el-input
|
|
|
v-model="searchText"
|
|
|
style="width: 200px;"
|
|
|
placeholder="请输入应用名称"
|
|
|
@keyup.enter.native="getData"
|
|
|
- clearable
|
|
|
+ clearable
|
|
|
/>
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
style="margin-left: 10px;"
|
|
|
icon="el-icon-search"
|
|
|
@click="getData"
|
|
|
- clearable
|
|
|
></el-button>
|
|
|
<!-- <el-button type="primary" @click="releaseApp()">发布应用</el-button> -->
|
|
|
</div>
|
|
@@ -110,7 +125,150 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="ac_content">
|
|
|
- <div
|
|
|
+ <div class="ac_c_item" v-for="(item, index) in dataList" :key="item.id">
|
|
|
+ <div class="ac_c_i_top">
|
|
|
+ <div class="ac_c_i_t_left">
|
|
|
+ <img v-if="item.json.icon" :src="item.json.icon" />
|
|
|
+ <svg
|
|
|
+ v-else
|
|
|
+ t="1732605901531"
|
|
|
+ class="icon"
|
|
|
+ viewBox="0 0 1024 1024"
|
|
|
+ version="1.1"
|
|
|
+ xmlns="http://www.w3.org/2000/svg"
|
|
|
+ p-id="4275"
|
|
|
+ width="200"
|
|
|
+ height="200"
|
|
|
+ >
|
|
|
+ <path
|
|
|
+ d="M179.2 153.6a51.2 51.2 0 0 0-51.2 51.2v128a51.2 51.2 0 0 0 51.2 51.2h128a51.2 51.2 0 0 0 51.2-51.2V204.8a51.2 51.2 0 0 0-51.2-51.2H179.2z m0-102.4h128a153.6 153.6 0 0 1 153.6 153.6v128a153.6 153.6 0 0 1-153.6 153.6H179.2a153.6 153.6 0 0 1-153.6-153.6V204.8a153.6 153.6 0 0 1 153.6-153.6z m0 614.4a51.2 51.2 0 0 0-51.2 51.2v128a51.2 51.2 0 0 0 51.2 51.2h128a51.2 51.2 0 0 0 51.2-51.2V716.8a51.2 51.2 0 0 0-51.2-51.2H179.2z m0-102.4h128a153.6 153.6 0 0 1 153.6 153.6v128a153.6 153.6 0 0 1-153.6 153.6H179.2a153.6 153.6 0 0 1-153.6-153.6V716.8a153.6 153.6 0 0 1 153.6-153.6z m611.84-403.4048a51.2 51.2 0 0 0-72.3968 0L646.144 232.2432a51.2 51.2 0 0 0 0 72.3968l72.448 72.3968a51.2 51.2 0 0 0 72.3968 0l72.3968-72.3968a51.2 51.2 0 0 0 0-72.3968L791.04 159.744z m72.3968-72.3968l72.3968 72.3968a153.6 153.6 0 0 1 0 217.2416l-72.3968 72.3968a153.6 153.6 0 0 1-217.2416 0l-72.3968-72.3968a153.6 153.6 0 0 1 0-217.2416l72.3968-72.3968a153.6 153.6 0 0 1 217.2416 0zM699.7504 896a51.2 51.2 0 0 1 0 102.4A162.1504 162.1504 0 0 1 537.6 836.2496v-110.8992A162.1504 162.1504 0 0 1 699.7504 563.2h110.8992a162.1504 162.1504 0 0 1 162.1504 162.1504v8.448a51.2 51.2 0 0 1-102.4 0v-8.448c0-33.024-26.7264-59.7504-59.7504-59.7504h-110.8992c-33.024 0-59.7504 26.7264-59.7504 59.7504v110.8992c0 33.024 26.7264 59.7504 59.7504 59.7504z"
|
|
|
+ fill="#2C6DD2"
|
|
|
+ p-id="4276"
|
|
|
+ ></path>
|
|
|
+ <path
|
|
|
+ d="M791.4496 160a51.2 51.2 0 0 0-72.3968 0l-72.448 72.3968a51.2 51.2 0 0 0 0 72.3968l72.448 72.3968a51.2 51.2 0 0 0 72.3968 0l72.3968-72.3968a51.2 51.2 0 0 0 0-72.3968l-72.3968-72.3968z"
|
|
|
+ fill="#20C997"
|
|
|
+ p-id="4277"
|
|
|
+ ></path>
|
|
|
+ </svg>
|
|
|
+ </div>
|
|
|
+ <div class="ac_c_i_t_right">
|
|
|
+ <div class="ac_c_i_t_r_top">
|
|
|
+ <span>{{ item.name }}</span>
|
|
|
+ <div class="ac_c_i_t_popover">
|
|
|
+ <div
|
|
|
+ class="ac_c_i_t_p_box"
|
|
|
+ v-if="editAppCard === item.id"
|
|
|
+ v-click-outside="handleBlur"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ @click.stop="copyApp(item)"
|
|
|
+ v-if="item.json && item.json.copy === '1'"
|
|
|
+ >
|
|
|
+ 复制
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ @click.stop="updateApp(item)"
|
|
|
+ v-if="item.userid === userId"
|
|
|
+ >
|
|
|
+ 修改
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ @click.stop="delApp(item)"
|
|
|
+ v-if="item.userid === userId"
|
|
|
+ >
|
|
|
+ 删除
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <svg
|
|
|
+ t="1732786015570"
|
|
|
+ @click.stop="updateCard(item.id)"
|
|
|
+ class="icon"
|
|
|
+ viewBox="0 0 1024 1024"
|
|
|
+ version="1.1"
|
|
|
+ xmlns="http://www.w3.org/2000/svg"
|
|
|
+ p-id="9199"
|
|
|
+ width="200"
|
|
|
+ height="200"
|
|
|
+ >
|
|
|
+ <path
|
|
|
+ d="M192 443.733333c-38.4 0-68.266667 29.866667-68.266667 68.266667 0 38.4 29.866667 68.266667 68.266667 68.266667s68.266667-29.866667 68.266667-68.266667c0-38.4-29.866667-68.266667-68.266667-68.266667zM512 443.733333c-38.4 0-68.266667 29.866667-68.266667 68.266667 0 38.4 29.866667 68.266667 68.266667 68.266667s68.266667-29.866667 68.266667-68.266667c0-38.4-29.866667-68.266667-68.266667-68.266667zM832 443.733333c-38.4 0-68.266667 29.866667-68.266667 68.266667 0 38.4 29.866667 68.266667 68.266667 68.266667s68.266667-29.866667 68.266667-68.266667c0-38.4-34.133333-68.266667-68.266667-68.266667z"
|
|
|
+ fill="#111111"
|
|
|
+ p-id="9200"
|
|
|
+ ></path>
|
|
|
+ </svg>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="ac_c_i_t_r_center">
|
|
|
+ <span>@{{ item.username }}</span>
|
|
|
+ <div v-if="item.label === 'workflow'">
|
|
|
+ <img
|
|
|
+ src="../../../../assets/icon/appStore/workflow.svg"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ 工作流
|
|
|
+ </div>
|
|
|
+ <div v-if="item.label === 'agent'">
|
|
|
+ <img
|
|
|
+ src="../../../../assets/icon/appStore/agent.svg"
|
|
|
+ alt=""
|
|
|
+ />
|
|
|
+ 智能体
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="ac_c_i_t_r_bottom">
|
|
|
+ {{ item.detail }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="ac_c_i_bottom">
|
|
|
+ <div class="ac_c_i_b_left">
|
|
|
+ <div>
|
|
|
+ <img src="../../../../assets/icon/appStore/user_copy.svg" />
|
|
|
+ <span>{{ item.copyCount }}</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <img
|
|
|
+ src="../../../../assets/icon/appStore/praise_default.svg"
|
|
|
+ v-if="!item.likeId"
|
|
|
+ style="cursor: pointer;"
|
|
|
+ @click="praiseFn(item, 0)"
|
|
|
+ />
|
|
|
+ <img
|
|
|
+ src="../../../../assets/icon/appStore/praise_active.svg"
|
|
|
+ v-else
|
|
|
+ style="cursor: pointer;"
|
|
|
+ @click="praiseFn(item, 1)"
|
|
|
+ />
|
|
|
+ <span>{{ item.likeCount }}</span>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <img
|
|
|
+ src="../../../../assets/icon/appStore/collect_default.svg"
|
|
|
+ v-if="!item.collectId"
|
|
|
+ style="cursor: pointer;"
|
|
|
+ @click="collectFn(item, 0)"
|
|
|
+ />
|
|
|
+ <img
|
|
|
+ src="../../../../assets/icon/appStore/collect_active.svg"
|
|
|
+ v-else
|
|
|
+ style="cursor: pointer;"
|
|
|
+ @click="collectFn(item, 1)"
|
|
|
+ />
|
|
|
+ <span>{{ item.collectCount }}</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="ac_c_i_b_right" v-if="item.json.status">
|
|
|
+ <span class="ac_c_i_b_r_type2" v-if="item.json.status === '0'"
|
|
|
+ >测试</span
|
|
|
+ >
|
|
|
+ <span class="ac_c_i_b_r_type1" v-if="item.json.status === '1'"
|
|
|
+ >稳定</span
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- <div
|
|
|
class="ac_c_item"
|
|
|
v-for="(item, index) in dataList"
|
|
|
:key="item.id"
|
|
@@ -166,7 +324,6 @@
|
|
|
<div class="ac_c_i_t_right">
|
|
|
<div>{{ item.name }}</div>
|
|
|
<span>{{ item.label}}</span>
|
|
|
- <!-- <span>@{{ item.username }}</span> -->
|
|
|
</div>
|
|
|
<div class="ac_c_i_t_popover">
|
|
|
<div
|
|
@@ -218,9 +375,8 @@
|
|
|
</div>
|
|
|
<div class="ac_c_i_bottom">
|
|
|
<div>{{ item.detail }}</div>
|
|
|
- <!-- <span @click="openApp(item.url)">{{ item.url }}</span> -->
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div class="ac_c_empty" v-if="dataList.length === 0">
|
|
|
<span>暂无数据...</span>
|
|
|
</div>
|
|
@@ -231,6 +387,9 @@
|
|
|
:typeList="typeList"
|
|
|
@success="addAppSuccess"
|
|
|
/>
|
|
|
+ <selectAppDialog
|
|
|
+ ref="selectAppDialogRef"
|
|
|
+ @success="selectAppSuccess"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -254,13 +413,15 @@ const clickOutside = {
|
|
|
}
|
|
|
};
|
|
|
import addAppDialog from "../dialog/addAppDialog.vue";
|
|
|
-import saveCard from "../dialog/saveCard.vue";
|
|
|
+import saveCard from "../components/saveCard.vue";
|
|
|
+import selectAppDialog from "../dialog/selectAppDialog.vue";
|
|
|
// import collectCard from "./dialog/collectCard.vue";
|
|
|
// import recentUseCard from "./dialog/recentUseCard.vue";
|
|
|
export default {
|
|
|
components: {
|
|
|
addAppDialog,
|
|
|
- saveCard
|
|
|
+ saveCard,
|
|
|
+ selectAppDialog
|
|
|
// collectCard,
|
|
|
// recentUseCard
|
|
|
},
|
|
@@ -272,11 +433,19 @@ export default {
|
|
|
showType: "",
|
|
|
searchText: "",
|
|
|
selectJuri: 3,
|
|
|
+ selectLabel: "",
|
|
|
typeList: [],
|
|
|
selectList: [
|
|
|
- { index: 1, label: "我的" },
|
|
|
- { index: 2, label: "组织" },
|
|
|
- { index: 3, label: "所有人" }
|
|
|
+ { index: 3, label: "所有组织" },
|
|
|
+ { index: 2, label: "组织内" },
|
|
|
+ // { index: 1, label: "我的" }
|
|
|
+ // { index: 2, label: "组织" },
|
|
|
+ // { index: 3, label: "所有人" }
|
|
|
+ ],
|
|
|
+ labelSelect: [
|
|
|
+ { value: "", label: "全部类型" },
|
|
|
+ { value: "agent", label: "智能体" },
|
|
|
+ { value: "workflow", label: "工作流" }
|
|
|
],
|
|
|
userId: this.$route.query["userid"],
|
|
|
org: this.$route.query["org"],
|
|
@@ -286,7 +455,7 @@ export default {
|
|
|
recentUse: [],
|
|
|
collect: [],
|
|
|
editAppCard: null,
|
|
|
- bannerObj:null
|
|
|
+ bannerObj: null
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -324,7 +493,7 @@ export default {
|
|
|
let params = {
|
|
|
uid: this.userId, //用户ID
|
|
|
name: this.searchText, //应用名称搜索
|
|
|
- label: "", //应用的标签搜索
|
|
|
+ label: this.selectLabel, //应用的标签搜索
|
|
|
type: this.showType, //应用的类型
|
|
|
juri: this.selectJuri, //应用权限 1:我的 2:组织内 3:所有人
|
|
|
stand: "cn" //cn站还是hk站
|
|
@@ -355,8 +524,8 @@ export default {
|
|
|
addApp() {
|
|
|
this.$refs.addAppDialogRef.open({ type: 1 });
|
|
|
},
|
|
|
- releaseApp(){
|
|
|
- this.$message.info("发布应用")
|
|
|
+ releaseApp() {
|
|
|
+ this.$refs.selectAppDialogRef.open();
|
|
|
},
|
|
|
updateApp(data) {
|
|
|
this.$refs.addAppDialogRef.open({
|
|
@@ -375,10 +544,10 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
// 收藏APP
|
|
|
- collectApp(item) {
|
|
|
- this.editAppCard = null;
|
|
|
- this.insertSave(item, 0);
|
|
|
- },
|
|
|
+ // collectApp(item) {
|
|
|
+ // this.editAppCard = null;
|
|
|
+ // this.insertSave(item, 0);
|
|
|
+ // },
|
|
|
//复制app
|
|
|
copyApp(item) {
|
|
|
this.$confirm(`确定复制《${item.name}》这个应用吗?`, "复制", {
|
|
@@ -519,6 +688,9 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ selectAppSuccess(item){
|
|
|
+ console.log(item)
|
|
|
+ },
|
|
|
getTypeList() {
|
|
|
let params = {
|
|
|
suserid: this.userId, //用户ID
|
|
@@ -540,12 +712,16 @@ export default {
|
|
|
this.$message.error("获取应用类型失败");
|
|
|
});
|
|
|
},
|
|
|
- openApp(item,type=0) {
|
|
|
+ openApp(item, type = 0) {
|
|
|
window.open(item.url, "_blank");
|
|
|
- if (!(this.recentUse.length > 0 && item.id === this.recentUse[0].id) && type===0) {
|
|
|
+ if (
|
|
|
+ !(this.recentUse.length > 0 && item.id === this.recentUse[0].id) &&
|
|
|
+ type === 0
|
|
|
+ ) {
|
|
|
this.insertSave(item, 1);
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
resetData() {
|
|
|
this.searchText = "";
|
|
|
this.selectJuri = 3;
|
|
@@ -620,17 +796,13 @@ export default {
|
|
|
.post(this.$store.state.api + "insert_appStoreSave", params)
|
|
|
.then(res => {
|
|
|
if (res.data) {
|
|
|
- if (type === 0) {
|
|
|
- this.$message.success("收藏成功");
|
|
|
- this.getCollect();
|
|
|
- } else if (type === 1) {
|
|
|
+ if (type === 1) {
|
|
|
this.getRecentUse();
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
.catch(err => {
|
|
|
console.log(err);
|
|
|
- if (type === 0) this.$message.error("收藏失败");
|
|
|
});
|
|
|
},
|
|
|
delApp(item) {
|
|
@@ -672,25 +844,130 @@ export default {
|
|
|
changeShowPage(newPage) {
|
|
|
this.$emit("changeShowCard", newPage);
|
|
|
},
|
|
|
- getBanner(){
|
|
|
+ getBanner() {
|
|
|
let params = {
|
|
|
- uid:this.userId,
|
|
|
- oid:this.oid,
|
|
|
- org:this.org,
|
|
|
- type:4
|
|
|
- }
|
|
|
+ uid: this.userId,
|
|
|
+ oid: this.oid,
|
|
|
+ org: this.org,
|
|
|
+ type: 4
|
|
|
+ };
|
|
|
|
|
|
- this.ajax.get(this.$store.state.api+"select_bannerByoidORorg",params).then(res=>{
|
|
|
- let _data = res.data[0];
|
|
|
- if(_data[0]){
|
|
|
- this.bannerObj = _data[0];
|
|
|
- }else{
|
|
|
- this.bannerObj = null
|
|
|
- }
|
|
|
- }).catch(e=>{
|
|
|
- console.log("获取banner图失败")
|
|
|
- console.log(e)
|
|
|
- })
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "select_bannerByoidORorg", params)
|
|
|
+ .then(res => {
|
|
|
+ let _data = res.data[0];
|
|
|
+ if (_data[0]) {
|
|
|
+ this.bannerObj = _data[0];
|
|
|
+ } else {
|
|
|
+ this.bannerObj = null;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ console.log("获取banner图失败");
|
|
|
+ console.log(e);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ praiseFn(item, type = 0) {
|
|
|
+ //点赞
|
|
|
+ if (type === 0) {
|
|
|
+ //点赞
|
|
|
+ let params = [
|
|
|
+ {
|
|
|
+ uid: this.userId,
|
|
|
+ type: 2,
|
|
|
+ aid: item.id,
|
|
|
+ json: ""
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ this.ajax
|
|
|
+ .post(this.$store.state.api + "insert_appStoreSave", params)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ let _likeId = res.data[0][0].id;
|
|
|
+ this.dataList.find(i => i.id === item.id).likeCount += 1;
|
|
|
+ this.dataList.find(i => i.id === item.id).likeId = _likeId;
|
|
|
+ this.$message.success("点赞成功");
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ this.$message.error("点赞失败");
|
|
|
+ });
|
|
|
+ } else if (type === 1) {
|
|
|
+ //取消点赞
|
|
|
+ console.log("取消点赞👉:", item);
|
|
|
+ let params = [
|
|
|
+ {
|
|
|
+ sid: item.likeId
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ this.ajax
|
|
|
+ .post(this.$store.state.api + "delete_appStoreSave", params)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ this.dataList.find(i => i.id === item.id).likeCount -= 1;
|
|
|
+ this.dataList.find(i => i.id === item.id).likeId = "";
|
|
|
+ this.$message.success("取消点赞成功");
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ console.log(e);
|
|
|
+ this.$message.error("取消点赞失败");
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ collectFn(item, type = 0) {
|
|
|
+ //收藏
|
|
|
+ if (type === 0) {
|
|
|
+ //收藏
|
|
|
+ console.log("收藏👉:", item);
|
|
|
+ let params = [
|
|
|
+ {
|
|
|
+ uid: this.userId,
|
|
|
+ type: 0,
|
|
|
+ aid: item.id,
|
|
|
+ json: ""
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ this.ajax
|
|
|
+ .post(this.$store.state.api + "insert_appStoreSave", params)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ let _colletId = res.data[0][0].id;
|
|
|
+ this.dataList.find(i => i.id === item.id).collectCount += 1;
|
|
|
+ this.dataList.find(i => i.id === item.id).collectId = _colletId;
|
|
|
+ this.$message.success("收藏成功");
|
|
|
+ }
|
|
|
+ this.getCollect();
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ console.log(e);
|
|
|
+ this.getCollect();
|
|
|
+ this.$message.error("收藏失败");
|
|
|
+ });
|
|
|
+ } else if (type === 1) {
|
|
|
+ //取消收藏
|
|
|
+ console.log("取消收藏👉:", item);
|
|
|
+ let params = [
|
|
|
+ {
|
|
|
+ sid: item.collectId
|
|
|
+ }
|
|
|
+ ];
|
|
|
+ this.ajax
|
|
|
+ .post(this.$store.state.api + "delete_appStoreSave", params)
|
|
|
+ .then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ this.dataList.find(i => i.id === item.id).collectCount -= 1;
|
|
|
+ this.dataList.find(i => i.id === item.id).collectId = "";
|
|
|
+ this.$message.success("取消收藏成功");
|
|
|
+ }
|
|
|
+ this.getCollect();
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ console.log(e);
|
|
|
+ this.$message.error("取消收藏失败");
|
|
|
+ this.getCollect();
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -698,7 +975,7 @@ export default {
|
|
|
this.getData();
|
|
|
this.getCollect();
|
|
|
this.getRecentUse();
|
|
|
- this.getBanner()
|
|
|
+ this.getBanner();
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
@@ -719,7 +996,7 @@ export default {
|
|
|
.ac_left {
|
|
|
/* width: 280px;
|
|
|
min-width: 280px; */
|
|
|
- width: clamp(150px,12vw,280px);
|
|
|
+ width: clamp(150px, 12vw, 280px);
|
|
|
min-width: 150px;
|
|
|
margin-right: 20px;
|
|
|
height: 100%;
|
|
@@ -745,7 +1022,7 @@ export default {
|
|
|
height: auto;
|
|
|
border-radius: 5px;
|
|
|
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
|
|
|
- background-color: #fff;
|
|
|
+ background-color: #fff;
|
|
|
}
|
|
|
|
|
|
.ac_h_top {
|
|
@@ -766,23 +1043,23 @@ export default {
|
|
|
position: relative;
|
|
|
margin-right: 25px;
|
|
|
cursor: pointer;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
}
|
|
|
|
|
|
-.ac_h_top > span>svg{
|
|
|
- width: 22px;
|
|
|
- height: 22px;
|
|
|
- fill: #1A1A1A;
|
|
|
- margin-right: 10px;
|
|
|
+.ac_h_top > span > svg {
|
|
|
+ width: 22px;
|
|
|
+ height: 22px;
|
|
|
+ fill: #1a1a1a;
|
|
|
+ margin-right: 10px;
|
|
|
}
|
|
|
|
|
|
-.ac_h_t_active{
|
|
|
- color: #0354D7;
|
|
|
+.ac_h_t_active {
|
|
|
+ color: #0354d7;
|
|
|
}
|
|
|
|
|
|
-.ac_h_t_active>svg{
|
|
|
- fill: #0354D7 !important;
|
|
|
+.ac_h_t_active > svg {
|
|
|
+ fill: #0354d7 !important;
|
|
|
}
|
|
|
|
|
|
/* .ac_h_t_active::after {
|
|
@@ -798,7 +1075,7 @@ export default {
|
|
|
|
|
|
.ac_h_banner {
|
|
|
width: 100%;
|
|
|
- height: clamp(100px,20vh,300px);
|
|
|
+ height: clamp(100px, 20vh, 300px);
|
|
|
border-radius: 5px;
|
|
|
overflow: hidden;
|
|
|
box-sizing: border-box;
|
|
@@ -853,9 +1130,9 @@ export default {
|
|
|
width: 100%;
|
|
|
flex: 1;
|
|
|
height: auto;
|
|
|
- margin-top:10px;
|
|
|
+ margin-top: 10px;
|
|
|
overflow: auto;
|
|
|
- min-height: 200px;
|
|
|
+ min-height: 200px;
|
|
|
}
|
|
|
|
|
|
.ac_c_item {
|
|
@@ -869,7 +1146,7 @@ export default {
|
|
|
margin-right: 15px;
|
|
|
margin-bottom: 15px;
|
|
|
float: left;
|
|
|
- cursor: pointer;
|
|
|
+ /* cursor: pointer; */
|
|
|
}
|
|
|
|
|
|
@media screen and (min-width: 1400px) {
|
|
@@ -925,13 +1202,224 @@ export default {
|
|
|
}
|
|
|
|
|
|
.ac_c_i_top {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ height: calc(100% - 40px);
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_t_left {
|
|
|
+ width: 100px;
|
|
|
+ min-width: 100px;
|
|
|
+ height: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ display: flex;
|
|
|
+ align-items: flex-start;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_t_left > svg {
|
|
|
+ width: 100%;
|
|
|
+ height: auto;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_t_left > img {
|
|
|
+ width: 100%;
|
|
|
+ object-fit: cover;
|
|
|
+ height: 80px;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_t_right {
|
|
|
+ flex: 1;
|
|
|
+ width: calc(100% - 100px);
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_t_right > div {
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_t_r_top {
|
|
|
+ height: 40px;
|
|
|
+ display: flex;
|
|
|
+ align-items: flex-end;
|
|
|
+ position: relative;
|
|
|
+ font-size: 1.3em;
|
|
|
+ font-weight: bold;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding-bottom: 2px;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_t_r_top > span {
|
|
|
+ display: block;
|
|
|
+ max-width: 100%;
|
|
|
+ white-space: nowrap;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_t_popover {
|
|
|
+ width: 30px;
|
|
|
+ height: 30px;
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ top: 0;
|
|
|
+ z-index: 3;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_t_popover svg {
|
|
|
+ width: 25px;
|
|
|
+ height: 25px;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_t_p_box {
|
|
|
+ position: absolute;
|
|
|
+ height: auto;
|
|
|
+ top: 100%;
|
|
|
+ right: 0;
|
|
|
+ padding: 8px;
|
|
|
+ border-radius: 8px 0 8px 8px;
|
|
|
+ background-color: #fff;
|
|
|
+ box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
|
|
|
+ width: auto;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_t_p_box > div {
|
|
|
+ width: 80px;
|
|
|
+ height: 30px;
|
|
|
+ cursor: pointer;
|
|
|
+ transition: 0.3s;
|
|
|
+ font-size: 0.7em;
|
|
|
+ border-radius: 5px;
|
|
|
+ font-weight: 100;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ position: relative;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_t_p_box > div:hover {
|
|
|
+ background-color: #f2f4f7;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_t_r_center {
|
|
|
+ height: 30px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_t_r_center > span {
|
|
|
+ display: block;
|
|
|
+ max-width: calc(100% - 80px);
|
|
|
+ white-space: nowrap;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_t_r_center > div {
|
|
|
+ width: 75px;
|
|
|
+ height: 85%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ font-size: 0.8em;
|
|
|
+ background-color: #f3f3f3;
|
|
|
+ color: #00000066;
|
|
|
+ border-radius: 3px;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_t_r_center > div > img {
|
|
|
+ width: 16px;
|
|
|
+ height: 16px;
|
|
|
+ margin-right: 4px;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_t_r_bottom {
|
|
|
+ max-width: 100%;
|
|
|
+ max-height: calc(100% - 30px - 40px - 20px);
|
|
|
+ margin-top: 10px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ color: #00000099;
|
|
|
+ display: -webkit-box;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
+ -webkit-line-clamp: 5;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_bottom {
|
|
|
+ width: 100%;
|
|
|
+ height: 40px;
|
|
|
+ padding-top: 10px;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border-top: solid 2px #e7e7e7;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_b_left {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ flex: 1;
|
|
|
+ overflow: auto;
|
|
|
+ height: 100%;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_b_left > div {
|
|
|
+ margin-right: 20px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_b_left > div > img {
|
|
|
+ width: 22px;
|
|
|
+ height: 22px;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_b_left > div > span {
|
|
|
+ margin-left: 5px;
|
|
|
+ color: #00000099;
|
|
|
+ cursor: default;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_b_right {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ width: 70px;
|
|
|
+ height: 100%;
|
|
|
+ justify-content: flex-end;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_b_right > span {
|
|
|
+ width: 60px;
|
|
|
+ height: 100%;
|
|
|
+ border-radius: 4px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_b_r_type1 {
|
|
|
+ background-color: #17c469;
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
+
|
|
|
+.ac_c_i_b_r_type2 {
|
|
|
+ background-color: #ffcf33;
|
|
|
+ color: #000;
|
|
|
+}
|
|
|
+
|
|
|
+/* .ac_c_i_top {
|
|
|
width: 100%;
|
|
|
height: 50px;
|
|
|
display: flex;
|
|
|
position: relative;
|
|
|
- /* flex-direction: column; */
|
|
|
- /* justify-content: space-evenly; */
|
|
|
- /* background-color: red */
|
|
|
}
|
|
|
|
|
|
.ac_c_i_t_popover {
|
|
@@ -1023,7 +1511,6 @@ export default {
|
|
|
|
|
|
.ac_c_i_t_right > span {
|
|
|
font-size: 1.1em;
|
|
|
- /* font-weight: bold; */
|
|
|
color: #8991a1;
|
|
|
display: block;
|
|
|
max-width: 100%;
|
|
@@ -1043,7 +1530,6 @@ export default {
|
|
|
color: #8991a1;
|
|
|
width: 100%;
|
|
|
height: calc(100%);
|
|
|
- /* 第四行溢出显示... */
|
|
|
display: -webkit-box;
|
|
|
display: block;
|
|
|
overflow: hidden;
|
|
@@ -1061,5 +1547,5 @@ export default {
|
|
|
text-overflow: ellipsis;
|
|
|
white-space: nowrap;
|
|
|
cursor: pointer;
|
|
|
-}
|
|
|
+} */
|
|
|
</style>
|