Compare commits
No commits in common. "ningboyinhang" and "master" have entirely different histories.
ningboyinh
...
master
|
|
@ -3,9 +3,9 @@ ENV = development
|
|||
|
||||
# 本地环境接口地址
|
||||
# VITE_API_URL = http://123.60.153.169:8040/apih5
|
||||
# VITE_API_URL = http://4155gf93ll13.vicp.fun/apih5
|
||||
# VITE_API_URL = https://4155gf93ll13.vicp.fun/apih5
|
||||
# VITE_API_URL = http://123.60.79.143:8041/apih5
|
||||
# VITE_API_URL =http://192.168.0.135:8040/apih5
|
||||
# VITE_API_URL =http://ukfba3.natappfree.cc/apih5
|
||||
VITE_API_URL = https://cankao.cs.com.cn/apih5
|
||||
|
||||
VITE_API_DATAV_URL = https://cankao.cs.com.cn/zzck_datav
|
||||
37
index.html
|
|
@ -32,43 +32,6 @@
|
|||
<body>
|
||||
<div id="app"><!--app-html--></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
<script>
|
||||
(function (w, d, s, q, i) {
|
||||
w[q] = w[q] || [];
|
||||
var f = d.getElementsByTagName(s)[0], j = d.createElement(s);
|
||||
j.async = true;
|
||||
j.id = 'beacon-aplus';
|
||||
j.src = 'https://d.alicdn.com/alilog/mlog/aplus/' + i + '.js';
|
||||
f.parentNode.insertBefore(j, f);
|
||||
})(window, document, 'script', 'aplus_queue', '203467608');
|
||||
|
||||
//集成应用的appKey
|
||||
aplus_queue.push({
|
||||
action: 'aplus.setMetaInfo',
|
||||
arguments: ['appKey', '68d7b06e8560e34872b9f3a7']
|
||||
});
|
||||
/************************以下内容为可选配置内容****************************/
|
||||
//sdk提供手动pv发送机制,启用手动pv(即关闭自动pv),需设置aplus-waiting=MAN;
|
||||
//注意:由于单页面路由改变时不会刷新页面,无法自动发送pv,所以对于单页应用,强烈建议您关闭自动PV, 手动控制PV事件
|
||||
aplus_queue.push({
|
||||
action: 'aplus.setMetaInfo',
|
||||
arguments: ['aplus-waiting', 'MAN']
|
||||
});
|
||||
//是否开启调试模式
|
||||
aplus_queue.push({
|
||||
action: 'aplus.setMetaInfo',
|
||||
arguments: ['DEBUG', true]
|
||||
});
|
||||
//是否指定用作计算umid的id类型,默认为cnaid,目前支持:
|
||||
//1. 微信和QQ: openid; 字节和百度 anonymousid; 支付宝 alipay_id
|
||||
//2. 微信、QQ、字节、百度平台的 unionid
|
||||
//3. 业务方自己生成的随机id uuid
|
||||
// aplus_queue.push({
|
||||
// action: 'aplus.setMetaInfo',
|
||||
// arguments: ['aplus-idtype', 'xxxx'] //取值参考见附表1
|
||||
// });
|
||||
</script>
|
||||
|
||||
<!-- <script type="text/javascript">
|
||||
var link = location.href.split("#")[0];
|
||||
console.log("🚀 ~ link:", link);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
"clipboard": "^2.0.11",
|
||||
"dayjs": "^1.11.9",
|
||||
"echarts": "^5.6.0",
|
||||
"element-plus": "^2.11.7",
|
||||
"js-cookie": "^3.0.5",
|
||||
"js-md5": "^0.8.3",
|
||||
"pinia": "^2.0.36",
|
||||
|
|
@ -1786,14 +1785,6 @@
|
|||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@ctrl/tinycolor": {
|
||||
"version": "3.6.1",
|
||||
"resolved": "https://registry.npmjs.org/@ctrl/tinycolor/-/tinycolor-3.6.1.tgz",
|
||||
"integrity": "sha512-SITSV6aIXsuVNV3f3O0f2n/cgyEDWoSqtZMYiAmcsYHydcKrOz3gUxB/iXd/Qf08+IZX4KpgNbvUdMBmWz+kcA==",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/@dcloudio/types": {
|
||||
"version": "3.3.3",
|
||||
"resolved": "https://registry.npmmirror.com/@dcloudio/types/-/types-3.3.3.tgz",
|
||||
|
|
@ -2246,14 +2237,6 @@
|
|||
"vite": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@element-plus/icons-vue": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/@element-plus/icons-vue/-/icons-vue-2.3.2.tgz",
|
||||
"integrity": "sha512-OzIuTaIfC8QXEPmJvB4Y4kw34rSXdCJzxcD1kFStBvr8bK6X1zQAYDo0CNMjojnfTqRQCJ0I7prlErcoRiET2A==",
|
||||
"peerDependencies": {
|
||||
"vue": "^3.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-arm": {
|
||||
"version": "0.16.17",
|
||||
"resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.16.17.tgz",
|
||||
|
|
@ -2584,28 +2567,6 @@
|
|||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@floating-ui/core": {
|
||||
"version": "1.7.3",
|
||||
"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.3.tgz",
|
||||
"integrity": "sha512-sGnvb5dmrJaKEZ+LDIpguvdX3bDlEllmv4/ClQ9awcmCZrlx5jQyyMWFM5kBI+EyNOCDDiKk8il0zeuX3Zlg/w==",
|
||||
"dependencies": {
|
||||
"@floating-ui/utils": "^0.2.10"
|
||||
}
|
||||
},
|
||||
"node_modules/@floating-ui/dom": {
|
||||
"version": "1.7.4",
|
||||
"resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.4.tgz",
|
||||
"integrity": "sha512-OOchDgh4F2CchOX94cRVqhvy7b3AFb+/rQXyswmzmGakRfkMgoWVjfnLWkRirfLEfuD4ysVW16eXzwt3jHIzKA==",
|
||||
"dependencies": {
|
||||
"@floating-ui/core": "^1.7.3",
|
||||
"@floating-ui/utils": "^0.2.10"
|
||||
}
|
||||
},
|
||||
"node_modules/@floating-ui/utils": {
|
||||
"version": "0.2.10",
|
||||
"resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.10.tgz",
|
||||
"integrity": "sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ=="
|
||||
},
|
||||
"node_modules/@intlify/core-base": {
|
||||
"version": "9.1.9",
|
||||
"resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-9.1.9.tgz",
|
||||
|
|
@ -3937,16 +3898,6 @@
|
|||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/@popperjs/core": {
|
||||
"name": "@sxzz/popperjs-es",
|
||||
"version": "2.11.7",
|
||||
"resolved": "https://registry.npmjs.org/@sxzz/popperjs-es/-/popperjs-es-2.11.7.tgz",
|
||||
"integrity": "sha512-Ccy0NlLkzr0Ex2FKvh2X+OyERHXJ88XJ1MXtsI9y9fGexlaXaVTPzBCRBwIxFkORuOb+uBqeu+RqnpgYTEZRUQ==",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/popperjs"
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/pluginutils": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz",
|
||||
|
|
@ -4122,19 +4073,6 @@
|
|||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@types/lodash": {
|
||||
"version": "4.17.20",
|
||||
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.20.tgz",
|
||||
"integrity": "sha512-H3MHACvFUEiujabxhaI/ImO6gUrd8oOurg7LQtS7mbwIXA/cUqWrvBsaeJ23aZEPk1TAYkurjfMbSELfoCXlGA=="
|
||||
},
|
||||
"node_modules/@types/lodash-es": {
|
||||
"version": "4.17.12",
|
||||
"resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.12.tgz",
|
||||
"integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==",
|
||||
"dependencies": {
|
||||
"@types/lodash": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "24.0.4",
|
||||
"resolved": "https://registry.npmmirror.com/@types/node/-/node-24.0.4.tgz",
|
||||
|
|
@ -4168,11 +4106,6 @@
|
|||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@types/web-bluetooth": {
|
||||
"version": "0.0.16",
|
||||
"resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz",
|
||||
"integrity": "sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ=="
|
||||
},
|
||||
"node_modules/@types/yargs": {
|
||||
"version": "16.0.9",
|
||||
"resolved": "https://registry.npmmirror.com/@types/yargs/-/yargs-16.0.9.tgz",
|
||||
|
|
@ -4573,39 +4506,6 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@vueuse/core": {
|
||||
"version": "9.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-9.13.0.tgz",
|
||||
"integrity": "sha512-pujnclbeHWxxPRqXWmdkKV5OX4Wk4YeK7wusHqRwU0Q7EFusHoqNA/aPhB6KCh9hEqJkLAJo7bb0Lh9b+OIVzw==",
|
||||
"dependencies": {
|
||||
"@types/web-bluetooth": "^0.0.16",
|
||||
"@vueuse/metadata": "9.13.0",
|
||||
"@vueuse/shared": "9.13.0",
|
||||
"vue-demi": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/antfu"
|
||||
}
|
||||
},
|
||||
"node_modules/@vueuse/metadata": {
|
||||
"version": "9.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-9.13.0.tgz",
|
||||
"integrity": "sha512-gdU7TKNAUVlXXLbaF+ZCfte8BjRJQWPCa2J55+7/h+yDtzw3vOoGQDRXzI6pyKyo6bXFT5/QoPE4hAknExjRLQ==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/antfu"
|
||||
}
|
||||
},
|
||||
"node_modules/@vueuse/shared": {
|
||||
"version": "9.13.0",
|
||||
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-9.13.0.tgz",
|
||||
"integrity": "sha512-UrnhU+Cnufu4S6JLCPZnkWh0WwZGUp72ktOF2DFptMlOs3TOdVv8xJN53zhHGARmVOsz5KqOls09+J1NR6sBKw==",
|
||||
"dependencies": {
|
||||
"vue-demi": "*"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/antfu"
|
||||
}
|
||||
},
|
||||
"node_modules/@webassemblyjs/ast": {
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmmirror.com/@webassemblyjs/ast/-/ast-1.14.1.tgz",
|
||||
|
|
@ -5025,11 +4925,6 @@
|
|||
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/async-validator": {
|
||||
"version": "4.2.5",
|
||||
"resolved": "https://registry.npmjs.org/async-validator/-/async-validator-4.2.5.tgz",
|
||||
"integrity": "sha512-7HhHjtERjqlNbZtqNqy2rckN/SpOOlmDliet+lP7k+eKZEjPk3DgyeU9lIXLdeLz0uBbbVp+9Qdow9wJWgwwfg=="
|
||||
},
|
||||
"node_modules/asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
|
||||
|
|
@ -5958,9 +5853,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/dayjs": {
|
||||
"version": "1.11.19",
|
||||
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.19.tgz",
|
||||
"integrity": "sha512-t5EcLVS6QPBNqM2z8fakk/NKel+Xzshgt8FFKAn+qwlD1pzZWxh0nVCrvFK7ZDb6XucZeF9z8C7CBWTRIVApAw=="
|
||||
"version": "1.11.9",
|
||||
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.9.tgz",
|
||||
"integrity": "sha512-QvzAURSbQ0pKdIye2txOzNaHmxtUBXerpY0FJsFXUMKbIZeFm5ht1LS/jFsrncjnmtv8HsG0W2g6c0zUjZWmpA=="
|
||||
},
|
||||
"node_modules/de-indent": {
|
||||
"version": "1.0.2",
|
||||
|
|
@ -6144,30 +6039,6 @@
|
|||
"integrity": "sha512-HE43yYdUUiJVjewV2A9EP8o89Kb4AqMKplMQP2IxEPUws1Etu/ZkdsgUDabUZ/WmbP4ZbvJDOcunvbBUPPIfmw==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/element-plus": {
|
||||
"version": "2.11.7",
|
||||
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.11.7.tgz",
|
||||
"integrity": "sha512-Bh47wuzsqaNBNDkbtlOlZER1cGcOB8GsXp/+C9b95MOrk0wvoHUV4NKKK7xMkfYNFYdYysQ752oMhnExgAL6+g==",
|
||||
"dependencies": {
|
||||
"@ctrl/tinycolor": "^3.4.1",
|
||||
"@element-plus/icons-vue": "^2.3.2",
|
||||
"@floating-ui/dom": "^1.0.1",
|
||||
"@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7",
|
||||
"@types/lodash": "^4.17.20",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@vueuse/core": "^9.1.0",
|
||||
"async-validator": "^4.2.5",
|
||||
"dayjs": "^1.11.18",
|
||||
"lodash": "^4.17.21",
|
||||
"lodash-es": "^4.17.21",
|
||||
"lodash-unified": "^1.0.3",
|
||||
"memoize-one": "^6.0.0",
|
||||
"normalize-wheel-es": "^1.2.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"vue": "^3.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/emittery": {
|
||||
"version": "0.8.1",
|
||||
"resolved": "https://registry.npmmirror.com/emittery/-/emittery-0.8.1.tgz",
|
||||
|
|
@ -9764,22 +9635,9 @@
|
|||
"version": "4.17.21",
|
||||
"resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz",
|
||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/lodash-es": {
|
||||
"version": "4.17.21",
|
||||
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz",
|
||||
"integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw=="
|
||||
},
|
||||
"node_modules/lodash-unified": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/lodash-unified/-/lodash-unified-1.0.3.tgz",
|
||||
"integrity": "sha512-WK9qSozxXOD7ZJQlpSqOT+om2ZfcT4yO+03FuzAHD0wF6S0l0090LRPDx3vhTTLZ8cFKpBn+IOcVXK6qOcIlfQ==",
|
||||
"peerDependencies": {
|
||||
"@types/lodash-es": "*",
|
||||
"lodash": "*",
|
||||
"lodash-es": "*"
|
||||
}
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/lodash.camelcase": {
|
||||
"version": "4.3.0",
|
||||
|
|
@ -9871,11 +9729,6 @@
|
|||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/memoize-one": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/memoize-one/-/memoize-one-6.0.0.tgz",
|
||||
"integrity": "sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw=="
|
||||
},
|
||||
"node_modules/merge": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmmirror.com/merge/-/merge-2.1.1.tgz",
|
||||
|
|
@ -10089,11 +9942,6 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/normalize-wheel-es": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-wheel-es/-/normalize-wheel-es-1.2.0.tgz",
|
||||
"integrity": "sha512-Wj7+EJQ8mSuXr2iWfnujrimU35R2W4FAErEyTmJoJ7ucwTn2hOUSsRehMb5RSYkxXGTM7Y9QpvPmp++w5ftoJw=="
|
||||
},
|
||||
"node_modules/npm-run-path": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/npm-run-path/-/npm-run-path-4.0.1.tgz",
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@
|
|||
"clipboard": "^2.0.11",
|
||||
"dayjs": "^1.11.9",
|
||||
"echarts": "^5.6.0",
|
||||
"element-plus": "^2.11.7",
|
||||
"js-cookie": "^3.0.5",
|
||||
"js-md5": "^0.8.3",
|
||||
"pinia": "^2.0.36",
|
||||
|
|
|
|||
|
|
@ -55,38 +55,10 @@ export const getUnlockList = (data: any) => {
|
|||
return Request.post("/user/unlockList", data);
|
||||
};
|
||||
|
||||
|
||||
// 全文搜索
|
||||
//
|
||||
export const searchNews = (data: any) => {
|
||||
return Request.post("/news/search", data);
|
||||
};
|
||||
|
||||
// 已发布列表
|
||||
export const getReleaseList = (data: any) => {
|
||||
return Request.post("/news/top_news_release_h5_d", data);
|
||||
};
|
||||
|
||||
// 编辑精选接口
|
||||
export const editTopNews = (data: any) => {
|
||||
return Request.post("/news/list/published", data);
|
||||
};
|
||||
|
||||
// 编辑精选接口
|
||||
export const sendToken = (data: any) => {
|
||||
return Request.post("/common/forward/financial", data);
|
||||
};
|
||||
|
||||
// 退出登录
|
||||
export const doLogout = (data: any) => {
|
||||
console.log("🚀 ~ doLogout ~ data:", data);
|
||||
return Request.post("/common/logout", data);
|
||||
};
|
||||
|
||||
// 退出登录
|
||||
export const getEtfIndexList = (data: any) => {
|
||||
return Request.post("/news/etfIndexList", data);
|
||||
};
|
||||
|
||||
// 获取ETF详情
|
||||
export const fetchEtfDetail = (data: any) => {
|
||||
return Request.post("/news/etfList", data);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -15,20 +15,9 @@ export const getConceptCount = (data: any) => {
|
|||
return request.get("/news_info/concept/count", data);
|
||||
};
|
||||
|
||||
// 概念标签贴标
|
||||
export const getTopNewsDay = (data: any) => {
|
||||
// return request.get("/top_news_h5_period?start_date=" + data.start_date + "&end_date=" + data.end_date + "&limit_num=" + data.limit_num, data);
|
||||
return request.get("/top_news_h5_d", data);
|
||||
};
|
||||
|
||||
// 概念标签贴标
|
||||
export const getTopNews = (data: any) => {
|
||||
return request.get("/top_news_h5_period?start_date=" + data.start_date + "&end_date=" + data.end_date + "&limit_num=" + data.limit_num, data);
|
||||
// return request.get("/top_news_h5_d", data);
|
||||
};
|
||||
// 概念标签贴标
|
||||
export const getTopNewsAll = (data: any) => {
|
||||
return request.get("/top_news_release_h5_all", data);
|
||||
return request.get("/top_news_h5_d", data);
|
||||
};
|
||||
|
||||
// 热门行业top10:
|
||||
|
|
@ -45,17 +34,3 @@ export const getTopConcept_d = (data: any) => {
|
|||
export const getNews_cnt_d = (data: any) => {
|
||||
return request.get("/news_cnt_d", data);
|
||||
};
|
||||
|
||||
// 热门标签某时间段内topN列表(左边第一个)
|
||||
export const getTopConceptPeriod = (data: any) => {
|
||||
return request.get("/top_concept_period?start_date=" + data.start_time + "&end_date=" + data.end_time + "&limit_num=" + data.limit_num, data);
|
||||
};
|
||||
// 热门行业某时间段内topN列表(中间第二个)
|
||||
export const getTopIndustryPeriod = (data: any) => {
|
||||
return request.get("/top_industry_period?start_date=" + data.start_time + "&end_date=" + data.end_time + "&limit_num=" + data.limit_num, data);
|
||||
};
|
||||
|
||||
// 热门标签某时间段内topN列表(右边)
|
||||
export const getTopSourcePeriod = (data: any) => {
|
||||
return request.get("/top_source_period?start_date=" + data.start_time + "&end_date=" + data.end_time + "&limit_num=" + data.limit_num, data);
|
||||
};
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 488 KiB |
|
Before Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 949 B |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 6.6 KiB |
|
|
@ -6,7 +6,7 @@
|
|||
<text class="date">({{ dayjs(new Date().getTime()).format("MM/DD") }})</text>
|
||||
</view>
|
||||
|
||||
<text class="sub_title">评分80分以上精选资讯数量</text>
|
||||
<text class="sub_title">评分80分以上精选咨洵数量</text>
|
||||
</view>
|
||||
<view class="right">
|
||||
<!-- <text class="num">{{ count }}</text> -->
|
||||
|
|
@ -95,4 +95,4 @@ watch(
|
|||
text-align: right;
|
||||
font-style: normal;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
|
@ -1,8 +1,19 @@
|
|||
<template>
|
||||
<view class="news-rank-list">
|
||||
<u-skeleton rows="5" title loading style="margin-bottom: 30rpx" v-if="loading"></u-skeleton>
|
||||
<u-skeleton
|
||||
rows="5"
|
||||
title
|
||||
loading
|
||||
style="margin-bottom: 30rpx"
|
||||
v-if="loading"
|
||||
></u-skeleton>
|
||||
<view class="list" v-else>
|
||||
<view v-for="(item, index) in rankListLocal" :key="index" class="news-item" @click="goDetail(item, 0)">
|
||||
<view
|
||||
v-for="(item, index) in rankListLocal"
|
||||
:key="index"
|
||||
class="news-item"
|
||||
@click="goDetail(item, 0)"
|
||||
>
|
||||
<view class="rank-tag">
|
||||
<view v-if="index == 0" class="rank-text-top3">
|
||||
<img src="@/assets/zixun/ranking_icon_1.png" />
|
||||
|
|
@ -16,48 +27,20 @@
|
|||
<text class="rank-text" v-else>{{ index + 1 }}</text>
|
||||
</view>
|
||||
|
||||
<view class="news-content" :style="{ filter: Session.get('token') ? '' : 'blur(5px)' }">
|
||||
<view
|
||||
class="news-content"
|
||||
:style="{ filter: Session.get('token') ? '' : 'blur(5px)' }"
|
||||
>
|
||||
<text class="news-title">{{ item.title }}</text>
|
||||
<text class="news-desc">{{ item.summary }}</text>
|
||||
|
||||
<!-- 两个标签 start -->
|
||||
<view class="r_r_tags" v-if="hasTag">
|
||||
<view style="display: flex; margin-top: 20rpx; overflow-x: auto; width: 95vw">
|
||||
<view class="r_tags">
|
||||
<view
|
||||
class="tag"
|
||||
style="background-color: #fff2e9; color: #ff8125"
|
||||
v-for="(item, index) in item.conceptLabels"
|
||||
:key="index"
|
||||
>{{ item }}</view
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="display: flex; margin-top: 4pt; overflow-x: auto; width: 100vw">
|
||||
<view class="r_tags">
|
||||
<view
|
||||
class="tag"
|
||||
style="background-color: #f5f8fe; color: #007aff"
|
||||
v-for="(item, index) in item.industryLabels"
|
||||
:key="index"
|
||||
>{{ item }}</view
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 两个标签 end -->
|
||||
|
||||
<view class="news-meta">
|
||||
<view>
|
||||
<text class="source">中国证券报</text>
|
||||
<!-- <text class="time">{{ dayjs(item.publish_time).format("YYYY-MM-DD HH:MM:ss") }}</text> -->
|
||||
<!-- .format('YYYY-MM-DD HH:mm:ss'); -->
|
||||
<text class="time">
|
||||
{{ timeFormat(new Date(item.publish_time).getTime()) }}
|
||||
</text>
|
||||
<text class="source">{{ item.source }}</text>
|
||||
<text class="time">{{
|
||||
dayjs(item.publish_time).format("YYYY-MM-DD HH:MM:ss")
|
||||
}}</text>
|
||||
</view>
|
||||
<text class="score" v-if="needExp">
|
||||
<text class="score">
|
||||
<text v-if="index < 3">资讯评分:</text>
|
||||
{{ item.news_score }}</text
|
||||
>
|
||||
|
|
@ -66,7 +49,7 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view @click="isExp = !isExp" class="r_exp" v-if="needExp">
|
||||
<view @click="isExp = !isExp" class="r_exp">
|
||||
<text v-if="isExp">收起</text>
|
||||
<text v-else>展开全部</text>
|
||||
<img src="@/assets/zixun/up_icon.png" class="exp_up" v-if="isExp" />
|
||||
|
|
@ -83,7 +66,7 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch, computed } from "vue";
|
||||
import { ref, watch } from "vue";
|
||||
import dayjs from "dayjs/esm/index";
|
||||
import LoginPopup from "@/components/loginPopup/index.vue";
|
||||
import { Session } from "@/utils/storage";
|
||||
|
|
@ -100,49 +83,27 @@ watch(
|
|||
if (!isExp.value && index > 9) {
|
||||
return;
|
||||
}
|
||||
let concept_label = "";
|
||||
let industry_label = "";
|
||||
try {
|
||||
concept_label = JSON.parse(item.concept_label);
|
||||
industry_label = JSON.parse(item.industry_label);
|
||||
} catch (e) {}
|
||||
rankListLocal.value.push({
|
||||
...item,
|
||||
conceptLabels: concept_label,
|
||||
industryLabels: industry_label,
|
||||
});
|
||||
|
||||
rankListLocal.value.push(item);
|
||||
});
|
||||
|
||||
loading.value = false;
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
watch(
|
||||
() => props.newsList,
|
||||
(newValue, oldValue) => {
|
||||
if (!props.needExp) {
|
||||
isExp.value = true;
|
||||
}
|
||||
rankListLocal.value = [];
|
||||
props.newsList.forEach((item, index) => {
|
||||
if (!isExp.value && index > 9) {
|
||||
return;
|
||||
}
|
||||
let concept_label = "";
|
||||
let industry_label = "";
|
||||
try {
|
||||
concept_label = JSON.parse(item.concept_label);
|
||||
industry_label = JSON.parse(item.industry_label);
|
||||
} catch (e) {}
|
||||
|
||||
rankListLocal.value.push({
|
||||
...item,
|
||||
conceptLabels: concept_label,
|
||||
industryLabels: industry_label,
|
||||
});
|
||||
rankListLocal.value.push(item);
|
||||
});
|
||||
loading.value = false;
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
// 接收父组件传入的新闻列表
|
||||
|
|
@ -152,14 +113,6 @@ const props = defineProps({
|
|||
required: true,
|
||||
default: () => [],
|
||||
},
|
||||
needExp: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
hasTag: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
|
||||
const clickItem = ref({});
|
||||
|
|
@ -194,54 +147,6 @@ const handlePopupSuccessCallback = () => {
|
|||
const handlePopupErrorCallback = () => {
|
||||
console.log("登录失败");
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 格式化时间
|
||||
* @param {String|Number} dateTime 需要格式化的时间戳
|
||||
* @param {String} fmt 格式化规则 yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合 默认yyyy-mm-dd
|
||||
* @returns {string} 返回格式化后的字符串
|
||||
*/
|
||||
function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd hh:MM:ss") {
|
||||
let date;
|
||||
// 若传入时间为假值,则取当前时间
|
||||
if (!dateTime) {
|
||||
date = new Date();
|
||||
}
|
||||
// 若为unix秒时间戳,则转为毫秒时间戳(逻辑有点奇怪,但不敢改,以保证历史兼容)
|
||||
else if (/^\d{10}$/.test(dateTime.toString().trim())) {
|
||||
date = new Date(dateTime * 1000);
|
||||
}
|
||||
// 若用户传入字符串格式时间戳,new Date无法解析,需做兼容
|
||||
else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
|
||||
date = new Date(Number(dateTime));
|
||||
}
|
||||
// 其他都认为符合 RFC 2822 规范
|
||||
else {
|
||||
// 处理平台性差异,在Safari/Webkit中,new Date仅支持/作为分割符的字符串时间
|
||||
date = new Date(typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime);
|
||||
}
|
||||
|
||||
const timeSource = {
|
||||
y: date.getFullYear().toString(), // 年
|
||||
m: (date.getMonth() + 1).toString().padStart(2, "0"), // 月
|
||||
d: date.getDate().toString().padStart(2, "0"), // 日
|
||||
h: date.getHours().toString().padStart(2, "0"), // 时
|
||||
M: date.getMinutes().toString().padStart(2, "0"), // 分
|
||||
s: date.getSeconds().toString().padStart(2, "0"), // 秒
|
||||
// 有其他格式化字符需求可以继续添加,必须转化成字符串
|
||||
};
|
||||
|
||||
for (const key in timeSource) {
|
||||
const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
|
||||
if (ret) {
|
||||
// 年可能只需展示两位
|
||||
const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
|
||||
formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
|
||||
}
|
||||
}
|
||||
|
||||
return formatStr;
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
|
@ -268,13 +173,11 @@ function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd hh:MM:ss") {
|
|||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: 6rpx;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.rank-text-top3 {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #ffffff;
|
||||
|
|
@ -291,9 +194,7 @@ function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd hh:MM:ss") {
|
|||
}
|
||||
|
||||
.rank-text {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #e98254;
|
||||
|
|
@ -307,15 +208,6 @@ function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd hh:MM:ss") {
|
|||
}
|
||||
|
||||
.news-title {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC,
|
||||
Helvetica,
|
||||
Noto Sans SC,
|
||||
Hiragino Sans GB,
|
||||
Microsoft YaHei,
|
||||
Arial,
|
||||
sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
|
|
@ -324,25 +216,18 @@ function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd hh:MM:ss") {
|
|||
}
|
||||
|
||||
.news-desc {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
|
||||
display: -webkit-box;
|
||||
/* 设置为WebKit内核的弹性盒子模型 */
|
||||
-webkit-box-orient: vertical;
|
||||
/* 垂直排列 */
|
||||
-webkit-line-clamp: 2;
|
||||
/* 限制显示三行 */
|
||||
overflow: hidden;
|
||||
/* 隐藏超出范围的内容 */
|
||||
text-overflow: ellipsis;
|
||||
/* 使用省略号 */
|
||||
display: -webkit-box; /* 设置为WebKit内核的弹性盒子模型 */
|
||||
-webkit-box-orient: vertical; /* 垂直排列 */
|
||||
-webkit-line-clamp: 2; /* 限制显示三行 */
|
||||
overflow: hidden; /* 隐藏超出范围的内容 */
|
||||
text-overflow: ellipsis; /* 使用省略号 */
|
||||
}
|
||||
|
||||
.news-meta {
|
||||
|
|
@ -357,9 +242,7 @@ function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd hh:MM:ss") {
|
|||
.time,
|
||||
.score {
|
||||
// opacity: 0.8;
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
color: #999999;
|
||||
|
|
@ -373,9 +256,7 @@ function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd hh:MM:ss") {
|
|||
}
|
||||
|
||||
.score {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 22rpx;
|
||||
color: #ffa800;
|
||||
|
|
@ -396,29 +277,4 @@ function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd hh:MM:ss") {
|
|||
align-items: center;
|
||||
gap: 10rpx;
|
||||
}
|
||||
|
||||
.r_r_tags {
|
||||
// margin-left: 20rpx;
|
||||
width: 85vw;
|
||||
overflow-x: scroll;
|
||||
}
|
||||
|
||||
.r_tags {
|
||||
display: flex;
|
||||
gap: 4pt;
|
||||
|
||||
.tag {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
color: #3f80fa;
|
||||
|
||||
padding: 5rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,68 +1,50 @@
|
|||
<template>
|
||||
<view class="main">
|
||||
<view class="title" :class="{ mohu: !isLogin }">{{ props.data.title }}</view>
|
||||
<view class="title">{{ props.data.title }}</view>
|
||||
<view class="author">
|
||||
<view class="name" :class="{ mohu: !isLogin }">
|
||||
<view class="name">
|
||||
<text class="text">来源:</text>
|
||||
<text class="text" v-if="intoType === 'etf'">中国证券报</text>
|
||||
<text class="text" v-else>{{ props.data.tag ? props.data.tag : "中国证券报" }}</text>
|
||||
<text class="text">{{ props.data.tag }}</text>
|
||||
</view>
|
||||
|
||||
<!-- <view class="name" v-if="props.data.editor">
|
||||
<view class="name" v-if="props.data.editor">
|
||||
<text class="text">编辑:</text>
|
||||
<text class="text">{{ props.data.editor }}</text>
|
||||
</view> -->
|
||||
<view class="time" :class="{ mohu: !isLogin }">{{ props.data.publishTime }}</view>
|
||||
</view>
|
||||
<view class="time">{{ props.data.publishTime }}</view>
|
||||
</view>
|
||||
|
||||
<!-- 两个标签 start -->
|
||||
<view class="r_r_tags" :class="{ mohu: !isLogin }">
|
||||
<view class="r_r_tags">
|
||||
<view style="display: flex; margin-top: 20rpx; overflow-x: auto; width: 95vw">
|
||||
<view class="r_tags">
|
||||
<view
|
||||
class="tag"
|
||||
style="background-color: #fff2e9; color: #ff8125"
|
||||
v-for="(item, index) in props.data.conceptLabels"
|
||||
:key="index"
|
||||
>{{ item }}</view
|
||||
>
|
||||
<view class="tag" style="background-color: #fff9ec; color: #ffb100"
|
||||
v-for="(item, index) in props.data.conceptLabels" :key="index">{{ item }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="display: flex; margin-top: 4pt; overflow-x: auto; width: 100vw">
|
||||
<view style="display: flex; margin-top: 20rpx; overflow-x: auto; width: 100vw">
|
||||
<view class="r_tags">
|
||||
<view
|
||||
class="tag"
|
||||
style="background-color: #f5f8fe; color: #007aff"
|
||||
v-for="(item, index) in props.data.industryLabels"
|
||||
:key="index"
|
||||
>{{ item }}</view
|
||||
>
|
||||
<view class="tag" style="background-color: #f5f8fe; color: #007aff"
|
||||
v-for="(item, index) in props.data.industryLabels" :key="index">{{ item }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 两个标签 end -->
|
||||
|
||||
<!-- 摘要 -->
|
||||
<view class="desc" v-if="props.data.summary" :class="{ mohu: !isLogin }">
|
||||
<view class="desc" v-if="props.data.summary">
|
||||
<!-- <view class="bill_icon"></view> -->
|
||||
<image :src="zhaiyaoImg" mode="scaleToFill" class="zhaiyao_icon" />
|
||||
<view>
|
||||
{{ props.data.summary }}
|
||||
</view>
|
||||
{{ props.data.summary }}
|
||||
</view>
|
||||
|
||||
<view class="thumbnail" v-if="props.data.picture">
|
||||
<image :src="props.data.picture" mode="widthFix" />
|
||||
</view>
|
||||
|
||||
<view style="padding: 35rpx" :class="{ mohu: !isLogin }">
|
||||
<text
|
||||
class="articleDes"
|
||||
:class="props?.data?.needpay && 'needpay'"
|
||||
style="white-space: pre-wrap"
|
||||
v-html="props.data.content"
|
||||
>
|
||||
<view style="padding: 35rpx;">
|
||||
<text class="articleDes" :class="props?.data?.needpay && 'needpay'" style="white-space: pre-wrap;"
|
||||
v-html="props.data.content">
|
||||
</text>
|
||||
</view>
|
||||
|
||||
|
|
@ -72,50 +54,24 @@
|
|||
v-html="props.data.content"
|
||||
>
|
||||
</view> -->
|
||||
|
||||
<view class="author" style="justify-content: flex-start; margin-top: -30rpx">
|
||||
<view class="name" v-if="props.data.editor">
|
||||
<text class="text">编辑:</text>
|
||||
<text class="text">{{ props.data.editor }}</text>
|
||||
</view>
|
||||
|
||||
<view class="name" style="margin-left: 40rpx" v-if="props.data.secondReviewer">
|
||||
<text class="text">二校:</text>
|
||||
<text class="text">{{ props.data.secondReviewer }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="r_etf" style="margin-top: 80rpx" v-if="intoType == 'etf'">
|
||||
<text class="etf_title">AI关联标的</text>
|
||||
<view class="etfs">
|
||||
<view v-for="(item, index) in data.etfs" class="etf_item" :key="index" @click="goEtfDetail(item)">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<LoginPopup
|
||||
:show="LoginShow"
|
||||
@handlePopupClose="handlePopupClose"
|
||||
@handlePopupSuccessCallback="handlePopupSuccessCallback"
|
||||
@handlePopupErrorCallback="handlePopupErrorCallback"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { onLaunch, onShow, onLoad, onShareAppMessage, onShareTimeline } from "@dcloudio/uni-app";
|
||||
import {
|
||||
onLaunch,
|
||||
onShow,
|
||||
onLoad,
|
||||
onShareAppMessage,
|
||||
onShareTimeline,
|
||||
} from "@dcloudio/uni-app";
|
||||
import articleMock from "@/mock/article.js";
|
||||
import LoginPopup from "@/components/loginPopup/index.vue";
|
||||
import { Session } from "@/utils/storage";
|
||||
import zhaiyaoImg from "../../assets/zixun/zhaiyao_icon.png";
|
||||
|
||||
const isLogin = ref(Session.get("token"));
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
default: () => { },
|
||||
},
|
||||
});
|
||||
const tagList1 = ref([
|
||||
|
|
@ -129,17 +85,6 @@ const tagList1 = ref([
|
|||
name: "医药生物-医疗服务",
|
||||
},
|
||||
]);
|
||||
const LoginShow = ref(false);
|
||||
// 关闭弹框
|
||||
const handlePopupClose = () => {
|
||||
LoginShow.value = false;
|
||||
isLogin.value = Session.get("token");
|
||||
};
|
||||
// 登录成功回调
|
||||
const handlePopupSuccessCallback = () => {
|
||||
isLogin.value = Session.get("token");
|
||||
console.log("🚀 ~ handlePopupSuccessCallback ~ isLogin.value:", isLogin.value);
|
||||
};
|
||||
|
||||
const tagList2 = ref([
|
||||
{
|
||||
|
|
@ -159,23 +104,10 @@ const handleClick = (value: any) => {
|
|||
show.value = value;
|
||||
};
|
||||
|
||||
const intoType = ref(null);
|
||||
onLoad((option) => {
|
||||
type.value = option?.type || "list";
|
||||
intoType.value = option?.intoType || null;
|
||||
|
||||
if (!isLogin.value) {
|
||||
LoginShow.value = true;
|
||||
}
|
||||
});
|
||||
|
||||
function goEtfDetail(item) {
|
||||
console.log("🚀 ~ goEtfDetail ~ item:", item);
|
||||
uni.navigateTo({
|
||||
url: `/pages/realtimeInfo/indexEtfInfo?name=${item.name}&code=${item.code}`,
|
||||
});
|
||||
}
|
||||
|
||||
const handleSub = () => {
|
||||
if (type.value === "list") {
|
||||
let mainItemId = uni.getStorageSync("mainItem");
|
||||
|
|
@ -229,7 +161,6 @@ const handleSub = () => {
|
|||
.main {
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
padding-bottom: 30rpx;
|
||||
|
||||
.title {
|
||||
padding-top: 16rpx;
|
||||
|
|
@ -242,7 +173,7 @@ const handleSub = () => {
|
|||
/* 允许换行 */
|
||||
overflow-wrap: break-word;
|
||||
/* 在必要时单词内部断行 */
|
||||
// font-family: "SourceHanSansCN-Medium";
|
||||
font-family: "SourceHanSansCN-Medium";
|
||||
}
|
||||
|
||||
.author {
|
||||
|
|
@ -270,25 +201,15 @@ const handleSub = () => {
|
|||
.desc {
|
||||
padding: 12rpx;
|
||||
box-sizing: border-box;
|
||||
background-color: #f2f4fa;
|
||||
background-color: #f5f5f5;
|
||||
width: 700rpx;
|
||||
margin: 30rpx auto;
|
||||
color: #666666;
|
||||
color: rgba(51, 51, 51, 0.6);
|
||||
// font-size: 28rpx;
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC,
|
||||
Helvetica,
|
||||
Noto Sans SC,
|
||||
Hiragino Sans GB,
|
||||
Microsoft YaHei,
|
||||
Arial,
|
||||
sans-serif;
|
||||
font-size: var(--h2-font-size);
|
||||
// text-indent: 0.5em;
|
||||
white-space: pre-wrap;
|
||||
overflow-wrap: break-word;
|
||||
line-height: 40rpx;
|
||||
|
||||
/* 在必要时单词内部断行 */
|
||||
.bill_icon {
|
||||
|
|
@ -315,15 +236,6 @@ const handleSub = () => {
|
|||
line-height: 50rpx;
|
||||
text-align: justify;
|
||||
white-space: pre-wrap;
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC,
|
||||
Helvetica,
|
||||
Noto Sans SC,
|
||||
Hiragino Sans GB,
|
||||
Microsoft YaHei,
|
||||
Arial,
|
||||
sans-serif;
|
||||
|
||||
::v-deep {
|
||||
p {
|
||||
|
|
@ -358,12 +270,10 @@ const handleSub = () => {
|
|||
|
||||
.r_tags {
|
||||
display: flex;
|
||||
gap: 4pt;
|
||||
gap: 10rpx;
|
||||
|
||||
.tag {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
color: #3f80fa;
|
||||
|
|
@ -374,62 +284,4 @@ const handleSub = () => {
|
|||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.mohu {
|
||||
filter: blur(4px);
|
||||
}
|
||||
|
||||
.zhaiyao_icon {
|
||||
width: 72rpx;
|
||||
height: 51rpx;
|
||||
margin-top: 10rpx;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.r_etf {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0 30rpx;
|
||||
|
||||
.etfs {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.etf_title {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
color: #222222;
|
||||
line-height: 42rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.etf_item {
|
||||
width: calc(50vw - 80rpx);
|
||||
height: 64rpx;
|
||||
background: #edf1f5;
|
||||
border-radius: 8rpx;
|
||||
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
line-height: 44rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 5rpx 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,326 +0,0 @@
|
|||
<template>
|
||||
<view class="list" v-if="data.length">
|
||||
<view class="listItem" v-for="item in props.data" :key="item.id" @click="handleClick(item)">
|
||||
<view class="listItemHeader">
|
||||
<view class="ListItemImg" v-if="item.picture">
|
||||
<image :src="item.picture" class="ListItemImage" mode="widthFix" style="width: 204rpx" />
|
||||
<image class="ListItemBg" :src="item.picture" style="width: 100%; height: 100%" />
|
||||
<view class="tag" v-if="item.newType !== 'search'">{{ item.tag }}</view>
|
||||
</view>
|
||||
<view class="listItemHeaderContent">
|
||||
<view v-if="!isLogin">
|
||||
<div :class="['listItemTitle']" v-html="item.title"></div>
|
||||
<!-- <text :class="['listItemTitle']">{{ item.title.slice(0, 3) }}</text>
|
||||
<text :class="['listItemTitle', isLogin ? '' : 'mohu']">
|
||||
{{ item.title.slice(3, item.title.length) }}
|
||||
</text> -->
|
||||
</view>
|
||||
<view v-else>
|
||||
<view :class="['listItemTitle1']" v-html="item.title"> </view>
|
||||
</view>
|
||||
<view :class="['listItemAbstract', isLogin ? '' : 'mohu']" v-if="item.newType !== 'search'"
|
||||
v-html="item.summary"></view>
|
||||
<view :class="['listItemAbstract', isLogin ? '' : 'mohu']" v-else
|
||||
v-html="item.MarkInRedContent || item.abstract"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <view class="tabContainer">
|
||||
<view class="tag">{{ item.tag }}</view>
|
||||
</view> -->
|
||||
<!--
|
||||
<view :class="['listItemContent', isLogin ? '' : 'mohu']">
|
||||
<view style="display: flex">
|
||||
<view class="tag">{{ item.tag }}</view>
|
||||
<view class="listItemTime" style="margin-left: 10rpx">{{ item.time }}</view>
|
||||
</view>
|
||||
|
||||
<view class="r_option">
|
||||
<image class="option_icon" src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/eye_icon%402x.png"></image>
|
||||
<text class="option_text">{{ item.readNums }}</text>
|
||||
|
||||
<image class="option_icon" src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/like_icon%402x.png"></image>
|
||||
<text class="option_text">{{ item.likeNums }}</text>
|
||||
|
||||
<image class="option_icon" src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/share_icon%402x.png"></image>
|
||||
<text class="option_text">{{ item.shareNums }}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- <view class="listItemFooter" v-if="item.needpay"></view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<u-empty mode="news" v-else> </u-empty>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { onShow, onLoad } from "@dcloudio/uni-app";
|
||||
import { Session } from "@/utils/storage";
|
||||
|
||||
const emit = defineEmits(["handleListJump", "onClick"]);
|
||||
// const isLogin = ref(uni.getStorageSync("token"));
|
||||
const isLogin = ref(Session.get("token"));
|
||||
|
||||
const props = defineProps({
|
||||
// 列表内容
|
||||
data: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
});
|
||||
console.log("props ===>", props.data);
|
||||
const handleListJump = (item) => {
|
||||
emit("handleListJump", item);
|
||||
};
|
||||
|
||||
// 点击新闻传给父组件
|
||||
const handleClick = (item: any) => {
|
||||
emit("onClick", item);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.list {
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
padding: 0 40rpx 30rpx 40rpx;
|
||||
border-radius: 10rpx;
|
||||
font-family: "SourceHanSansCN-Regular";
|
||||
|
||||
.listItem {
|
||||
border-bottom: 2rpx solid rgba(51, 51, 51, 0.1);
|
||||
box-sizing: border-box;
|
||||
padding: 30rpx 0;
|
||||
|
||||
.listItemHeader {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.ListItemImg {
|
||||
width: 204rpx;
|
||||
height: 204rpx;
|
||||
border-radius: 9rpx;
|
||||
overflow: hidden;
|
||||
background-color: #c4c4c4;
|
||||
flex-shrink: 0;
|
||||
position: relative;
|
||||
margin-right: 12rpx;
|
||||
|
||||
.ListItemImage {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.ListItemBg {
|
||||
filter: blur(30rpx);
|
||||
}
|
||||
|
||||
.tag {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
box-sizing: border-box;
|
||||
padding: 6rpx 16rpx;
|
||||
border-radius: 4rpx;
|
||||
background-color: #e7303f;
|
||||
// font-size: 20rpx;
|
||||
font-size: var(--h6-font-size);
|
||||
color: #fff;
|
||||
z-index: 9;
|
||||
}
|
||||
}
|
||||
|
||||
.listItemHeaderContent {
|
||||
// width: 100%;
|
||||
box-sizing: border-box;
|
||||
padding-left: 0rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.listItemTitle1 {
|
||||
font-size: 32rpx;
|
||||
font-size: var(--h1-font-size);
|
||||
color: #333;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
// font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #192236;
|
||||
line-height: 45rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.listItemTitle {
|
||||
// font-size: 32rpx;
|
||||
// font-size: var(--h1-font-size);
|
||||
// color: #333;
|
||||
// display: -webkit-box;
|
||||
// -webkit-box-orient: vertical;
|
||||
// -webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #192236;
|
||||
line-height: 45rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
|
||||
// text-align: left;
|
||||
&.noAbstract {
|
||||
-webkit-line-clamp: 4;
|
||||
}
|
||||
|
||||
.isVip {
|
||||
display: inline-block;
|
||||
width: 50rpx;
|
||||
height: 29rpx;
|
||||
background-image: url(https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/icon_vip.png);
|
||||
background-size: cover;
|
||||
}
|
||||
}
|
||||
|
||||
.listItemTitleContent {
|
||||
// font-size: 32rpx;
|
||||
font-size: var(--h1-font-size);
|
||||
// color: #333;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: normal;
|
||||
// font-weight: bold;
|
||||
|
||||
.isVip {
|
||||
display: inline-block;
|
||||
width: 50rpx;
|
||||
height: 29rpx;
|
||||
background-image: url(https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/icon_vip.png);
|
||||
background-size: cover;
|
||||
box-sizing: border-box;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.listItemAbstract {
|
||||
box-sizing: border-box;
|
||||
padding-top: 12rpx;
|
||||
// font-size: 26rpx;
|
||||
font-size: var(--h3-font-size);
|
||||
color: rgba(51, 51, 51, 0.6);
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: normal;
|
||||
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #2d3849;
|
||||
line-height: 33rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.listItemContent {
|
||||
// font-size: 20rpx;
|
||||
font-size: var(--h6-font-size);
|
||||
color: #b9b9b9;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding: 21rpx 0 0 0;
|
||||
|
||||
.listItemData {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.dataItem {
|
||||
margin-right: 12rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tabContainer {
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
padding-top: 21rpx;
|
||||
|
||||
.tag {
|
||||
box-sizing: border-box;
|
||||
padding: 6rpx 16rpx;
|
||||
border-radius: 4rpx;
|
||||
background-color: #e7303f;
|
||||
// font-size: 20rpx;
|
||||
font-size: var(--h6-font-size);
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.listItemFooter {
|
||||
height: 74rpx;
|
||||
margin-top: 15rpx;
|
||||
background-image: url(https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/vip_sub_2.png);
|
||||
background-size: cover;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.listItemTitleContentText {
|
||||
font-family: "SourceHanSansCN-Medium";
|
||||
}
|
||||
|
||||
.r_option {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10rpx;
|
||||
|
||||
.option_icon {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
|
||||
.option_text {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #192236;
|
||||
line-height: 33rpx;
|
||||
text-align: justify;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.mohu {
|
||||
filter: blur(7rpx);
|
||||
}
|
||||
</style>
|
||||
|
|
@ -28,7 +28,7 @@ const colorList = ["#F05040", "#696BBE", "#93CFED", "#FE9F19", "#3C74F1"];
|
|||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
default: () => { },
|
||||
},
|
||||
});
|
||||
|
||||
|
|
@ -42,8 +42,8 @@ watch(
|
|||
keys.value.push(item.key);
|
||||
values.value.push(item.doc_count);
|
||||
});
|
||||
keys.value.reverse();
|
||||
values.value.reverse();
|
||||
keys.value.reverse()
|
||||
values.value.reverse()
|
||||
initChart();
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,171 +0,0 @@
|
|||
<template>
|
||||
<view>
|
||||
<div ref="chartDom" style="width: 100vw; height: 700rpx"></div>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { watch, onMounted, reactive, ref } from "vue";
|
||||
import * as echarts from "echarts";
|
||||
import { newsInfoScore } from "@/api/newsInfo";
|
||||
|
||||
const chartDom = ref(null);
|
||||
let myChart = null;
|
||||
|
||||
const data = reactive({});
|
||||
const keys = ref([]);
|
||||
const values = ref([]);
|
||||
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
barColor: {
|
||||
type: String,
|
||||
default: "#3C74F1",
|
||||
},
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.data,
|
||||
(newVal) => {
|
||||
if (newVal) {
|
||||
initChart();
|
||||
}
|
||||
}
|
||||
);
|
||||
const colorList = ["#F05040", "#696BBE", "#93CFED", "#FE9F19", "#3C74F1", "#F05040", "#696BBE", "#93CFED", "#FE9F19", "#3C74F1"];
|
||||
// 初始化图表
|
||||
const initChart = () => {
|
||||
myChart = echarts.init(chartDom.value);
|
||||
|
||||
const builderJson = {
|
||||
all: 10887,
|
||||
charts: {},
|
||||
components: {
|
||||
geo: 2788,
|
||||
title: 9575,
|
||||
legend: 9400,
|
||||
tooltip: 9466,
|
||||
grid: 9266,
|
||||
markPoint: 3419,
|
||||
markLine: 2984,
|
||||
timeline: 2739,
|
||||
dataZoom: 2744,
|
||||
visualMap: 2466,
|
||||
toolbox: 3034,
|
||||
polar: 1945,
|
||||
},
|
||||
ie: 9743,
|
||||
};
|
||||
// 查找value最大的项
|
||||
const maxItem = props.data.reduce((prev, current) => {
|
||||
// 比较当前项和上一项的value,返回较大的那个
|
||||
return current.value > prev.value ? current : prev;
|
||||
}, props.data[0]); // 初始值设为数组的第一个元素
|
||||
|
||||
props.data.forEach((item) => {
|
||||
builderJson.charts[item.content] = item.value;
|
||||
});
|
||||
builderJson.all = maxItem.value;
|
||||
|
||||
const waterMarkText = "ECHARTS";
|
||||
const canvas = document.createElement("canvas");
|
||||
const ctx = canvas.getContext("2d");
|
||||
// canvas.width = canvas.height = 100;
|
||||
ctx.textAlign = "center";
|
||||
ctx.textBaseline = "middle";
|
||||
ctx.globalAlpha = 0.08;
|
||||
ctx.font = "20px Microsoft Yahei";
|
||||
ctx.translate(50, 50);
|
||||
ctx.rotate(-Math.PI / 4);
|
||||
ctx.fillText(waterMarkText, 0, 0);
|
||||
let option = {
|
||||
// backgroundColor: {
|
||||
// type: "pattern",
|
||||
// image: canvas,
|
||||
// repeat: "repeat",
|
||||
// },
|
||||
tooltip: {},
|
||||
title: [],
|
||||
grid: [
|
||||
{
|
||||
top: 0,
|
||||
width: "90%",
|
||||
top: "5%",
|
||||
bottom: "10%",
|
||||
left: 10,
|
||||
containLabel: true,
|
||||
},
|
||||
],
|
||||
xAxis: [
|
||||
{
|
||||
type: "value",
|
||||
max: builderJson.all,
|
||||
splitLine: {
|
||||
show: false,
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
color: "#999999"
|
||||
}
|
||||
},
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: "category",
|
||||
data: Object.keys(builderJson.charts),
|
||||
axisLabel: {
|
||||
interval: 0,
|
||||
rotate: 30,
|
||||
color: "#333333"
|
||||
},
|
||||
splitLine: {
|
||||
show: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
type: "bar",
|
||||
stack: "chart",
|
||||
z: 3,
|
||||
label: {
|
||||
position: "right",
|
||||
show: true,
|
||||
color: "#666666"
|
||||
},
|
||||
barWidth: '10pt',
|
||||
itemStyle: {
|
||||
color: props.barColor,
|
||||
normal: {
|
||||
borderRadius: [0, 4, 4, 0],
|
||||
color: props.barColor,
|
||||
// color: function (params) {
|
||||
// return colorList[params.dataIndex];
|
||||
// },
|
||||
},
|
||||
},
|
||||
data: Object.keys(builderJson.charts).map(function (key) {
|
||||
return builderJson.charts[key];
|
||||
}),
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
//使用配置
|
||||
myChart.setOption(option);
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
// await getData();
|
||||
// initChart();
|
||||
// setInterval(async () => {
|
||||
// await getData();
|
||||
// initChart();
|
||||
// }, 5000);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
@ -1,146 +0,0 @@
|
|||
<template>
|
||||
<view>
|
||||
<div ref="chartDom" style="width: 100vw; height: 700rpx"></div>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { watch, onMounted, reactive, ref } from "vue";
|
||||
import * as echarts from "echarts";
|
||||
import { newsInfoScore } from "@/api/newsInfo";
|
||||
|
||||
const chartDom = ref(null);
|
||||
let myChart = null;
|
||||
|
||||
const data = reactive({});
|
||||
const keys = ref([]);
|
||||
const values = ref([]);
|
||||
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
barColor: {
|
||||
type: String,
|
||||
default: "#3C74F1",
|
||||
},
|
||||
});
|
||||
|
||||
// 初始化图表
|
||||
const initChart = () => {
|
||||
myChart = echarts.init(chartDom.value);
|
||||
let source = [];
|
||||
source.push(["score", "amount", "product"]);
|
||||
props.data.forEach((item) => {
|
||||
source.push([item.value, item.value, item.content]);
|
||||
});
|
||||
|
||||
let option = {
|
||||
dataset: {
|
||||
source: source,
|
||||
// [
|
||||
// ["score", "amount", "product"],
|
||||
// [89.3, 58212, "Matcha Latte"],
|
||||
// [57.1, 78254, "Milk Tea"],
|
||||
// [74.4, 41032, "Cheese Cocoa"],
|
||||
// [50.1, 12755, "Cheese Brownie"],
|
||||
// [89.7, 20145, "Matcha Cocoa"],
|
||||
// [68.1, 79146, "Tea"],
|
||||
// [19.6, 91852, "Orange Juice"],
|
||||
// [10.6, 101852, "Lemon Juice"],
|
||||
// [32.7, 20112, "Walnut Brownie"],
|
||||
// ],
|
||||
},
|
||||
grid: {
|
||||
top: 0,
|
||||
width: "90%",
|
||||
top: "5%",
|
||||
bottom: "10%",
|
||||
left: 10,
|
||||
containLabel: true,
|
||||
},
|
||||
xAxis: {
|
||||
splitLine: {
|
||||
show: false,
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
color: "#999999",
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
type: "category",
|
||||
axisLabel: {
|
||||
interval: 0,
|
||||
rotate: 30,
|
||||
color: "#333333",
|
||||
},
|
||||
splitLine: {
|
||||
show: false,
|
||||
},
|
||||
},
|
||||
// visualMap: {
|
||||
// show: false,
|
||||
// orient: "horizontal",
|
||||
// left: "center",
|
||||
// min: 1,
|
||||
// max: 100,
|
||||
// text: ["High Score", "Low Score"],
|
||||
// // Map the score column to color
|
||||
// dimension: 0,
|
||||
// inRange: {
|
||||
// color: ["#65B581", "#FFCE34", "#FD665F"],
|
||||
// },
|
||||
// },
|
||||
series: [
|
||||
{
|
||||
type: "bar",
|
||||
label: {
|
||||
position: "right",
|
||||
show: true,
|
||||
color: "#666666"
|
||||
},
|
||||
barWidth: '10pt',
|
||||
itemStyle: {
|
||||
color: "#FFCE34",
|
||||
normal: {
|
||||
borderRadius: [0, 4, 4, 0],
|
||||
color: props.barColor,
|
||||
// color: function (params) {
|
||||
// return colorList[params.dataIndex];
|
||||
// },
|
||||
},
|
||||
},
|
||||
encode: {
|
||||
// Map the "amount" column to X axis.
|
||||
x: "amount",
|
||||
// Map the "product" column to Y axis
|
||||
y: "product",
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
//使用配置
|
||||
myChart.setOption(option);
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.data,
|
||||
(newVal) => {
|
||||
if (newVal) {
|
||||
initChart();
|
||||
}
|
||||
},
|
||||
);
|
||||
onMounted(async () => {
|
||||
// await getData();
|
||||
// initChart();
|
||||
// setInterval(async () => {
|
||||
// await getData();
|
||||
// initChart();
|
||||
// }, 5000);
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
|
@ -1,34 +1,44 @@
|
|||
<template>
|
||||
<view class="comment">
|
||||
<Tips v-if="messageShow" />
|
||||
<view class="comment-input">
|
||||
<input
|
||||
type="text"
|
||||
confrim-type="done"
|
||||
placeholder="输入评论内容……"
|
||||
class="input-field"
|
||||
v-model="comment"
|
||||
@confirm="handleSubmit"
|
||||
/>
|
||||
|
||||
<!-- <view class="input-field">输入评论内容……</view> -->
|
||||
</view>
|
||||
<view class="comment-count">
|
||||
<!-- <view class="count" @click="handleClickLike">
|
||||
<image
|
||||
:src="
|
||||
props.data.isLike
|
||||
? 'https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/zan_like_fill%402x.png'
|
||||
: 'https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/zan_like_normal%402x.png'
|
||||
"
|
||||
class="icon"
|
||||
/>
|
||||
<text class="num">点赞</text>
|
||||
</view> -->
|
||||
<!-- <view class="count" @click="handleClickStar">
|
||||
<image
|
||||
:src="props.data.isFav ? 'https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/star_icon_fill%402x.png' : 'https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/star_icon_normal%402x.png'"
|
||||
class="icon" />
|
||||
<text class="num">收藏</text>
|
||||
<view class="count" @click="handleClickLike">
|
||||
<image :src="props.data.isLike ? IconLikeActive : IconLike" class="icon" />
|
||||
<text class="num">{{ props.data.likeNums }}</text>
|
||||
</view>
|
||||
<button class="count" style="background-color: transparent;" open-type="share">
|
||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/share_icon%402x.png" class="icon" />
|
||||
<text class="num">分享</text>
|
||||
</button> -->
|
||||
<view class="count" @click="handleClickStar">
|
||||
<image :src="props.data.isFav ? IconStarActive : IconStar" class="icon" />
|
||||
<text class="num">{{ props.data.favNums }}</text>
|
||||
</view>
|
||||
<!-- <view class="count">
|
||||
<image src="@/static/icon_message.png" class="icon" />
|
||||
<text class="num">{{
|
||||
props.data.comment > 1000 ? "999+" : props.data.comment
|
||||
}}</text>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from "vue";
|
||||
|
||||
// import { likeNews } from "@/api";
|
||||
import IconLike from "@/static/icon_like.png";
|
||||
import IconStar from "@/static/icon_star.png";
|
||||
import IconLikeActive from "@/static/icon_like_active.png";
|
||||
import IconStarActive from "@/static/icon_star_active.png";
|
||||
const emit = defineEmits(["handleClickLike", "handleClickStar"]);
|
||||
const messageShow = ref(false);
|
||||
const props = defineProps({
|
||||
|
|
@ -68,7 +78,7 @@ const handleSubmit = () => {
|
|||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 160rpx;
|
||||
height: 112rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 0 10rpx rgba(51, 51, 51, 0.3);
|
||||
display: flex;
|
||||
|
|
@ -79,7 +89,6 @@ const handleSubmit = () => {
|
|||
|
||||
.comment-input {
|
||||
width: 100%;
|
||||
|
||||
.input-field {
|
||||
height: 72rpx;
|
||||
background-color: #f5f5f5;
|
||||
|
|
@ -91,7 +100,6 @@ const handleSubmit = () => {
|
|||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.input-placeholder {
|
||||
color: rgba(51, 51, 51, 0.6);
|
||||
}
|
||||
|
|
@ -99,15 +107,12 @@ const handleSubmit = () => {
|
|||
|
||||
.comment-count {
|
||||
display: flex;
|
||||
width: 100vw;
|
||||
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
.count {
|
||||
display: flex;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-left: 24rpx;
|
||||
width: 100%;
|
||||
|
||||
.num {
|
||||
margin-left: 12rpx;
|
||||
|
|
@ -123,8 +128,4 @@ const handleSubmit = () => {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
button::after {
|
||||
border: 0;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import title_bg from "@/assets/zixun/title_bg1.png";
|
||||
import title_bg from "@/assets/zixun/title_bg.png";
|
||||
|
||||
const props = defineProps({
|
||||
// 列表内容
|
||||
|
|
|
|||
|
|
@ -1,29 +1,56 @@
|
|||
<template>
|
||||
<!-- <view class="loginPopup"> -->
|
||||
<u-popup class="loginPopup" :show="props.show" closeable :mode="props.mode" round="12" :closeOnClickOverlay="false"
|
||||
@close="handlePopupClose">
|
||||
<u-popup
|
||||
class="loginPopup"
|
||||
:show="props.show"
|
||||
closeable
|
||||
:mode="props.mode"
|
||||
round="12"
|
||||
:closeOnClickOverlay="false"
|
||||
@close="handlePopupClose"
|
||||
>
|
||||
<view class="loginPopupContent">
|
||||
<view class="loginTitle">登录后掌握更多优质财经内容</view>
|
||||
|
||||
<!-- 登录表单 -->
|
||||
<view class="loginForm">
|
||||
<u--form :model="state.loginForm" ref="uForm">
|
||||
<u-form-item style="padding: 0" class="loginFormItem" prop="userInfo.name" borderBottom ref="item1">
|
||||
<u--input class="loginFormInput" placeholder="请输入您的手机号" v-model="state.loginForm.phone"
|
||||
border="none"></u--input>
|
||||
<u-form-item
|
||||
style="padding: 0"
|
||||
class="loginFormItem"
|
||||
prop="userInfo.name"
|
||||
borderBottom
|
||||
ref="item1"
|
||||
>
|
||||
<u--input
|
||||
class="loginFormInput"
|
||||
placeholder="请输入您的手机号"
|
||||
v-model="state.loginForm.phone"
|
||||
border="none"
|
||||
></u--input>
|
||||
</u-form-item>
|
||||
<u-form-item class="loginFormItem" prop="userInfo.name" borderBottom ref="item1">
|
||||
<u--input class="loginFormInput" placeholder="请输入短信验证码" v-model="state.loginForm.code"
|
||||
border="none"></u--input>
|
||||
<u-form-item
|
||||
class="loginFormItem"
|
||||
prop="userInfo.name"
|
||||
borderBottom
|
||||
ref="item1"
|
||||
>
|
||||
<u--input
|
||||
class="loginFormInput"
|
||||
placeholder="请输入短信验证码"
|
||||
v-model="state.loginForm.code"
|
||||
border="none"
|
||||
></u--input>
|
||||
<view class="getCode" @click="captcha">{{ codeText }}</view>
|
||||
</u-form-item>
|
||||
</u--form>
|
||||
<u-button class="loginFormBtn" text="登录" @click="Login"></u-button>
|
||||
</view>
|
||||
<!-- 用户协议 -->
|
||||
<view class="tips">登录即代表已经阅读并同意
|
||||
<view class="userAgreement">《用户协议》</view>
|
||||
</view>
|
||||
<view class="tips"
|
||||
>登录即代表已经阅读并同意
|
||||
<view class="userAgreement">《用户协议》</view></view
|
||||
>
|
||||
</view>
|
||||
</u-popup>
|
||||
<!-- </view> -->
|
||||
|
|
@ -103,8 +130,6 @@ const handlePopupSuccessCallback = () => {
|
|||
const handlePopupErrorCallback = () => {
|
||||
emit("handlePopupErrorCallback");
|
||||
};
|
||||
const { aplus_queue } = window;
|
||||
|
||||
// 登录
|
||||
const Login = async () => {
|
||||
if (!validatePhoneNumber(state.loginForm.phone)) {
|
||||
|
|
@ -130,14 +155,6 @@ const Login = async () => {
|
|||
});
|
||||
console.log(code, "<=== code");
|
||||
if (code === 200) {
|
||||
aplus_queue.push({
|
||||
action: 'aplus.record',
|
||||
arguments: ['login', 'CLK', {
|
||||
phone: data.phone,
|
||||
}]
|
||||
});
|
||||
|
||||
|
||||
uni.hideLoading();
|
||||
Session.set("token", data.token);
|
||||
Session.set("userPhone", data.phone);
|
||||
|
|
@ -146,7 +163,6 @@ const Login = async () => {
|
|||
icon: "success",
|
||||
});
|
||||
handlePopupSuccessCallback();
|
||||
|
||||
} else {
|
||||
console.log(msg, "<=== msg");
|
||||
handlePopupErrorCallback();
|
||||
|
|
@ -172,7 +188,6 @@ const handlePopupClose = () => {
|
|||
width: 100%;
|
||||
height: 786rpx;
|
||||
}
|
||||
|
||||
.u-popup__content__close {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
|
@ -208,13 +223,11 @@ const handlePopupClose = () => {
|
|||
&:nth-child(2) {
|
||||
margin: 32rpx 0;
|
||||
}
|
||||
|
||||
::v-deep {
|
||||
.u-form-item__body {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.loginFormInput {
|
||||
width: 100%;
|
||||
height: 100rpx !important;
|
||||
|
|
@ -231,7 +244,6 @@ const handlePopupClose = () => {
|
|||
font-size: var(--h1-font-size);
|
||||
color: rgba(51, 51, 51, 0.6);
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
display: block;
|
||||
|
|
@ -251,7 +263,6 @@ const handlePopupClose = () => {
|
|||
border: none;
|
||||
background-color: #e7303f;
|
||||
color: #fff;
|
||||
|
||||
::v-deep {
|
||||
.u-button__text {
|
||||
font-size: var(--h1-font-size) !important;
|
||||
|
|
@ -266,7 +277,6 @@ const handlePopupClose = () => {
|
|||
display: flex;
|
||||
justify-content: center;
|
||||
color: #717171;
|
||||
|
||||
.userAgreement {
|
||||
color: #333;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,11 @@
|
|||
<view class="userContainer">
|
||||
<u-avatar :src="avatarImg" size="60"></u-avatar>
|
||||
<view class="userData">
|
||||
<text class="phone">{{ !isLoginStatus ? "未登录用户" : maskPhoneNumber(Session.get("userPhone")) }}</text>
|
||||
<text class="phone">{{
|
||||
!isLoginStatus
|
||||
? "未登录用户"
|
||||
: maskPhoneNumber(Session.get("userPhone"))
|
||||
}}</text>
|
||||
<!-- <view class="setUserData">
|
||||
编辑我的个人资料
|
||||
<u-icon size="12" name="arrow-right"></u-icon>
|
||||
|
|
@ -94,7 +98,9 @@
|
|||
|
||||
<!-- 退出登录的按钮 -->
|
||||
<view class="loginOut" :class="!isLoginStatus && 'loginBtn'">
|
||||
<u-button type="danger" size="large" @click="loginBtnStatus">{{ !isLoginStatus ? "点击登录" : "退出登录" }}</u-button>
|
||||
<u-button type="danger" size="large" @click="loginBtnStatus">{{
|
||||
!isLoginStatus ? "点击登录" : "退出登录"
|
||||
}}</u-button>
|
||||
</view>
|
||||
|
||||
<!-- 登录弹框 -->
|
||||
|
|
@ -121,8 +127,6 @@ import like from "@/assets/images/like.png";
|
|||
import time from "@/assets/images/time.png";
|
||||
import vip from "@/assets/images/vip.png";
|
||||
import { useShareStore } from "@/stores/shareStore";
|
||||
import { doLogout } from "@/api";
|
||||
|
||||
const stores = useShareStore();
|
||||
const curPages = getCurrentPages();
|
||||
|
||||
|
|
@ -173,9 +177,6 @@ const loginOut = () => {
|
|||
icon: "none",
|
||||
duration: 1500,
|
||||
});
|
||||
doLogout({
|
||||
financialAccount: Session.get("userPhone"),
|
||||
});
|
||||
// 清除 cookie
|
||||
Session.clear();
|
||||
uni.removeStorageSync("subStatus");
|
||||
|
|
|
|||
|
|
@ -3,14 +3,12 @@ import pinia from "@/stores/index";
|
|||
import App from "./App.vue";
|
||||
import uviewPlus from "@/uni_modules/uview-plus";
|
||||
import "@/assets/fonts/font.css";
|
||||
import ElementPlus from 'element-plus'
|
||||
import 'element-plus/dist/index.css'
|
||||
|
||||
|
||||
|
||||
export function createApp() {
|
||||
const app = createSSRApp(App);
|
||||
app.use(pinia).use(uviewPlus);
|
||||
app.use(ElementPlus)
|
||||
return {
|
||||
app,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -19,15 +19,6 @@
|
|||
{
|
||||
"path": "pages/mine/index"
|
||||
},
|
||||
{
|
||||
"path": "pages/realtimeInfo/indexRelease"
|
||||
},
|
||||
{
|
||||
"path": "pages/realtimeInfo/indexEtf"
|
||||
},
|
||||
{
|
||||
"path": "pages/realtimeInfo/indexEtfInfo"
|
||||
},
|
||||
{
|
||||
"path": "pages/sreachReq/index"
|
||||
},
|
||||
|
|
@ -91,4 +82,4 @@
|
|||
"allowsBounceVertical": "YES"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,22 +3,17 @@
|
|||
<!-- 导航栏 start -->
|
||||
<view class="custom-bav-bar">
|
||||
<view class="left">
|
||||
<image
|
||||
src="@/static/icon_left.png"
|
||||
class="back_icon"
|
||||
@click="handleBack"
|
||||
/>
|
||||
<image src="@/static/icon_left.png" class="back_icon" @click="handleBack" />
|
||||
</view>
|
||||
<view class="center">
|
||||
<!-- <image src="@/assets/images/detail_logo.png" class="logo_icon" /> -->
|
||||
<image src="@/assets/images/detail_logo.png" class="logo_icon" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 文章正文 start -->
|
||||
<Article :data="data" />
|
||||
|
||||
<!-- 分割 -->
|
||||
<!-- <view class="line"></view> -->
|
||||
<view class="line"></view>
|
||||
<!-- 推荐栏目 -->
|
||||
<!-- <Column
|
||||
:data="columnList"
|
||||
|
|
@ -37,7 +32,7 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from "vue";
|
||||
import { ref } from "vue";
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
import { onReachBottom } from "@dcloudio/uni-app";
|
||||
import {
|
||||
|
|
@ -75,7 +70,7 @@ onLoad(async (option: any) => {
|
|||
if (res.code === 200) {
|
||||
data.value = res.data;
|
||||
|
||||
res.data.content = res.data.content.replace(/\n{3,}/g, "\n");
|
||||
res.data.content = res.data.content.replace(/\n{3,}/g, '\n');
|
||||
|
||||
columnName.value = res.data.columnName1;
|
||||
newList(res.data.columnId1);
|
||||
|
|
@ -99,35 +94,6 @@ const newList = async (columnId: number) => {
|
|||
|
||||
// 点赞
|
||||
const handleClickLike = async () => {
|
||||
console.log("🚀 ~ handleClickLike ~ data.value.isLike:", data.value.isLike);
|
||||
if (data.value.isLike == 1) {
|
||||
// 取消点赞
|
||||
aplus_queue.push({
|
||||
action: "aplus.record",
|
||||
arguments: [
|
||||
"canncelLike",
|
||||
"CLK",
|
||||
{
|
||||
param1: data.value.id,
|
||||
param2: data.value.title,
|
||||
},
|
||||
],
|
||||
});
|
||||
} else {
|
||||
// 点赞
|
||||
aplus_queue.push({
|
||||
action: "aplus.record",
|
||||
arguments: [
|
||||
"doLike",
|
||||
"CLK",
|
||||
{
|
||||
param1: data.value.id,
|
||||
param2: data.value.title,
|
||||
},
|
||||
],
|
||||
});
|
||||
}
|
||||
|
||||
// console.log("=== 点赞 ===")
|
||||
const res = await fetchArticleLike({
|
||||
id: data.value.id,
|
||||
|
|
@ -209,27 +175,6 @@ const jumpAll = () => {
|
|||
}
|
||||
};
|
||||
|
||||
const { aplus_queue } = window;
|
||||
|
||||
onMounted(() => {
|
||||
aplus_queue.push({
|
||||
action: "aplus.sendPV",
|
||||
arguments: [{ is_auto: false }], // 此处上报的数据暂时在后台没有展示
|
||||
});
|
||||
//一个简单的demo
|
||||
aplus_queue.push({
|
||||
action: "aplus.record",
|
||||
arguments: [
|
||||
"goDetail",
|
||||
"CLK",
|
||||
{
|
||||
id: data.value.id,
|
||||
title: data.value.title,
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
// 跳转详情
|
||||
const jumpDetail = (item: any) => {
|
||||
// console.log(item)
|
||||
|
|
@ -287,7 +232,7 @@ const jumpDetail = (item: any) => {
|
|||
|
||||
.container {
|
||||
// background-color: #f5f5f5;
|
||||
// padding-bottom: 112rpx;
|
||||
padding-bottom: 112rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,11 @@
|
|||
<img :src="bannerImg" class="banner_bk" />
|
||||
<view class="r_banner_title">
|
||||
<img :src="bannerTitle" class="banner_title" />
|
||||
<text>数据更新时间:{{ dayjs(new Date().getTime()).format("YYYY-MM-DD") }}</text>
|
||||
<text
|
||||
>数据更新时间:{{
|
||||
dayjs(new Date().getTime()).format("YYYY-MM-DD")
|
||||
}}</text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<!-- banner end -->
|
||||
|
|
@ -21,7 +25,12 @@
|
|||
|
||||
<view style="display: flex; margin-top: 15rpx">
|
||||
<!-- <text class="tag_num">{{ topNum.leftNum }}</text> -->
|
||||
<countTo :startVal="lastLeftNum" :endVal="topNum.leftNum" :duration="5000" class="tag_num"></countTo>
|
||||
<countTo
|
||||
:startVal="lastLeftNum"
|
||||
:endVal="topNum.leftNum"
|
||||
:duration="5000"
|
||||
class="tag_num"
|
||||
></countTo>
|
||||
|
||||
<text class="tag_status">已处理</text>
|
||||
</view>
|
||||
|
|
@ -40,7 +49,12 @@
|
|||
<text class="tag_title">概念标签贴标</text>
|
||||
<view style="display: flex; margin-top: 15rpx">
|
||||
<!-- <text class="tag_num">{{ topNum.rightNum }}</text> -->
|
||||
<countTo :startVal="lastRightNum" :endVal="topNum.rightNum" :duration="5000" class="tag_num"></countTo>
|
||||
<countTo
|
||||
:startVal="lastRightNum"
|
||||
:endVal="topNum.rightNum"
|
||||
:duration="5000"
|
||||
class="tag_num"
|
||||
></countTo>
|
||||
|
||||
<text class="tag_status">已处理</text>
|
||||
</view>
|
||||
|
|
@ -73,35 +87,19 @@
|
|||
</view>
|
||||
|
||||
<view style="background-color: white; margin-top: 40rpx">
|
||||
<div style="display: flex; justify-content: space-between; align-items: center">
|
||||
<indexMenuTitle title="资讯头条 Top20"></indexMenuTitle>
|
||||
<view
|
||||
style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-right: 15rpx;
|
||||
font-size: 30rpx;
|
||||
gap: 10rpx;
|
||||
margin-top: 10rpx;
|
||||
"
|
||||
@click="showCalendar"
|
||||
>
|
||||
{{ chooseDate.startDate.split(" ")[0] }}
|
||||
<u-icon name="calendar" size="26" style="margin-right: 10rpx"></u-icon>
|
||||
</view>
|
||||
|
||||
<!-- <view style="display: flex; align-items: center; gap: 25rpx;margin-right: 15px;margin-top: 10px;">
|
||||
<u-icon name="play-left-fill" color="#2979ff" size="20"></u-icon>
|
||||
{{ chooseDate.startDate.split(' ')[0] }}
|
||||
<u-icon name="play-right-fill" color="#2979ff" size="20"></u-icon>
|
||||
</view> -->
|
||||
</div>
|
||||
<indexMenuTitle title="资讯头条榜 Top20"></indexMenuTitle>
|
||||
<RankList :newsList="newsList"></RankList>
|
||||
</view>
|
||||
|
||||
<view style="background-color: white; margin-top: 40rpx">
|
||||
<view
|
||||
style="display: flex; justify-content: space-between; align-items: center; padding-right: 30rpx; height: 100rpx"
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-right: 30rpx;
|
||||
height: 100rpx;
|
||||
"
|
||||
>
|
||||
<indexMenuTitle title="热门行业池 Top10"></indexMenuTitle>
|
||||
<view style="display: flex; gap: 3rpx">
|
||||
|
|
@ -110,12 +108,22 @@
|
|||
<u-icon size="12" name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<HotIndustryList :industryList="industryList" :type="0" @viewAll="handleViewAll" />
|
||||
<HotIndustryList
|
||||
:industryList="industryList"
|
||||
:type="0"
|
||||
@viewAll="handleViewAll"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view style="background-color: white; margin-top: 40rpx">
|
||||
<view
|
||||
style="display: flex; justify-content: space-between; align-items: center; padding-right: 30rpx; height: 100rpx"
|
||||
style="
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-right: 30rpx;
|
||||
height: 100rpx;
|
||||
"
|
||||
>
|
||||
<indexMenuTitle title="风口概念池 Top10"></indexMenuTitle>
|
||||
<view style="display: flex; gap: 3rpx">
|
||||
|
|
@ -124,10 +132,16 @@
|
|||
<u-icon size="12" name="arrow-right"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<HotIndustryList :type="1" :industryList="topConceptList" @viewAll="handleViewAll" />
|
||||
<HotIndustryList
|
||||
:type="1"
|
||||
:industryList="topConceptList"
|
||||
@viewAll="handleViewAll"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="logout" @click="loginOut" v-if="Session.get('token')">退出登录</view>
|
||||
<view class="logout" @click="loginOut" v-if="Session.get('token')"
|
||||
>退出登录</view
|
||||
>
|
||||
|
||||
<LoginPopup
|
||||
:show="LoginShow"
|
||||
|
|
@ -135,19 +149,6 @@
|
|||
@handlePopupSuccessCallback="handlePopupSuccessCallback"
|
||||
@handlePopupErrorCallback="handlePopupErrorCallback"
|
||||
/>
|
||||
|
||||
<u-calendar
|
||||
:show="calendarShow"
|
||||
min-date="2025-01-01"
|
||||
closeOnClickOverlay
|
||||
:max-date="maxDate"
|
||||
:default-date="chooseDate.startDate"
|
||||
monthNum="12"
|
||||
:key="chooseDate.startDate"
|
||||
@confirm="calendarConfirm"
|
||||
@close="calendarShow = false"
|
||||
>
|
||||
</u-calendar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
|
@ -179,15 +180,6 @@ import indexMenuTitle from "@/components/indexMenuTitle.vue"; // 路径根据实
|
|||
import dayjs from "dayjs/esm/index";
|
||||
import HotIndustryList from "@/components/HotIndustryList.vue"; // 路径根据实际调整
|
||||
|
||||
const d = new Date();
|
||||
const year = d.getFullYear();
|
||||
let month = d.getMonth() + 1;
|
||||
month = month < 10 ? `0${month}` : month;
|
||||
const date = d.getDate();
|
||||
const maxDate = ref(`${year}-${month}-${date} 23:59:59`);
|
||||
const minDate = ref(`${year}-${month}-${date}`);
|
||||
|
||||
const calendarShow = ref(false);
|
||||
const newsList = ref([]);
|
||||
|
||||
const lastLeftNum = ref(0);
|
||||
|
|
@ -215,34 +207,9 @@ async function getTopNum() {
|
|||
lastRightNum.value = topNum.value.rightNum;
|
||||
}
|
||||
|
||||
const chooseDate = reactive({
|
||||
startDate: `${year}-${month}-${date}`,
|
||||
endDate: null,
|
||||
});
|
||||
const today = new Date();
|
||||
|
||||
function calendarConfirm(dateList) {
|
||||
console.log("🚀 ~ calendarConfirm ~ dateList:", dateList);
|
||||
if (dateList && dateList.length > 0) {
|
||||
chooseDate.startDate = dateList[0] + " 00:00:00";
|
||||
chooseDate.endDate = dateList[dateList.length - 1] + " 23:59:59";
|
||||
}
|
||||
getNewsList();
|
||||
calendarShow.value = false;
|
||||
console.log("🚀 ~ calendarConfirm ~ chooseDate:", chooseDate);
|
||||
}
|
||||
|
||||
// 概念标签贴标
|
||||
async function getNewsList() {
|
||||
newsList.value = await getTopNews({
|
||||
start_date: chooseDate.startDate
|
||||
? timeFormat(chooseDate.startDate)
|
||||
: timeFormat(new Date(today.getFullYear(), today.getMonth(), today.getDate(), 0, 0, 0, 0)),
|
||||
end_date: chooseDate.endDate
|
||||
? timeFormat(chooseDate.endDate)
|
||||
: timeFormat(new Date(today.getFullYear(), today.getMonth(), today.getDate(), 12, 0, 0, 0)),
|
||||
limit_num: 1000,
|
||||
});
|
||||
newsList.value = await getTopNews({});
|
||||
}
|
||||
|
||||
// 热门行业top10
|
||||
|
|
@ -273,7 +240,8 @@ function initData() {
|
|||
getLineData();
|
||||
// 获取顶部两个统计数据
|
||||
getTopNum();
|
||||
|
||||
// 概念标签贴标
|
||||
getNewsList();
|
||||
// 热门行业top10
|
||||
getTopIndustry_dFn();
|
||||
// 风口概念池top10
|
||||
|
|
@ -282,9 +250,9 @@ function initData() {
|
|||
getNews_cnt_dFn();
|
||||
}
|
||||
|
||||
const type = ref(null);
|
||||
function onViewAll(type1) {
|
||||
type.value = type1;
|
||||
const type = ref();
|
||||
function onViewAll(type) {
|
||||
type.value = type;
|
||||
if (Session.get("token")) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/realtimeInfo/rankDetail?type=" + type,
|
||||
|
|
@ -294,13 +262,9 @@ function onViewAll(type1) {
|
|||
}
|
||||
}
|
||||
|
||||
// const timer = setInterval(() => {
|
||||
// initData();
|
||||
// }, 5000);
|
||||
|
||||
function showCalendar() {
|
||||
calendarShow.value = true;
|
||||
}
|
||||
const timer = setInterval(() => {
|
||||
initData();
|
||||
}, 5000);
|
||||
|
||||
const LoginShow = ref(false);
|
||||
const isLoginStatus = ref();
|
||||
|
|
@ -322,12 +286,8 @@ const handlePopupSuccessCallback = () => {
|
|||
const handlePopupErrorCallback = () => {
|
||||
console.log("登录失败");
|
||||
};
|
||||
import { doLogout } from "@/api";
|
||||
function loginOut() {
|
||||
doLogout({
|
||||
financialAccount: Session.get("userPhone"),
|
||||
});
|
||||
|
||||
function loginOut() {
|
||||
Session.clear();
|
||||
window.location.reload();
|
||||
}
|
||||
|
|
@ -341,64 +301,7 @@ onMounted(async () => {
|
|||
if (!Session.get("token")) {
|
||||
LoginShow.value = true;
|
||||
}
|
||||
|
||||
// 概念标签贴标
|
||||
getNewsList();
|
||||
|
||||
const { aplus_queue } = window;
|
||||
aplus_queue.push({
|
||||
action: "aplus.sendPV",
|
||||
arguments: [{ is_auto: false }], // 此处上报的数据暂时在后台没有展示
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* @description 格式化时间
|
||||
* @param {String|Number} dateTime 需要格式化的时间戳
|
||||
* @param {String} fmt 格式化规则 yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合 默认yyyy-mm-dd
|
||||
* @returns {string} 返回格式化后的字符串
|
||||
*/
|
||||
function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd hh:MM:ss") {
|
||||
let date;
|
||||
// 若传入时间为假值,则取当前时间
|
||||
if (!dateTime) {
|
||||
date = new Date();
|
||||
}
|
||||
// 若为unix秒时间戳,则转为毫秒时间戳(逻辑有点奇怪,但不敢改,以保证历史兼容)
|
||||
else if (/^\d{10}$/.test(dateTime.toString().trim())) {
|
||||
date = new Date(dateTime * 1000);
|
||||
}
|
||||
// 若用户传入字符串格式时间戳,new Date无法解析,需做兼容
|
||||
else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
|
||||
date = new Date(Number(dateTime));
|
||||
}
|
||||
// 其他都认为符合 RFC 2822 规范
|
||||
else {
|
||||
// 处理平台性差异,在Safari/Webkit中,new Date仅支持/作为分割符的字符串时间
|
||||
date = new Date(typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime);
|
||||
}
|
||||
|
||||
const timeSource = {
|
||||
y: date.getFullYear().toString(), // 年
|
||||
m: (date.getMonth() + 1).toString().padStart(2, "0"), // 月
|
||||
d: date.getDate().toString().padStart(2, "0"), // 日
|
||||
h: date.getHours().toString().padStart(2, "0"), // 时
|
||||
M: date.getMinutes().toString().padStart(2, "0"), // 分
|
||||
s: date.getSeconds().toString().padStart(2, "0"), // 秒
|
||||
// 有其他格式化字符需求可以继续添加,必须转化成字符串
|
||||
};
|
||||
|
||||
for (const key in timeSource) {
|
||||
const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
|
||||
if (ret) {
|
||||
// 年可能只需展示两位
|
||||
const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
|
||||
formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
|
||||
}
|
||||
}
|
||||
|
||||
return formatStr;
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
|
@ -429,9 +332,7 @@ function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd hh:MM:ss") {
|
|||
}
|
||||
|
||||
text {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
|
|
@ -474,9 +375,7 @@ function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd hh:MM:ss") {
|
|||
}
|
||||
|
||||
.tag_title {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #222222;
|
||||
|
|
@ -484,9 +383,7 @@ function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd hh:MM:ss") {
|
|||
}
|
||||
|
||||
.tag_num {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: bold;
|
||||
font-size: 38rpx;
|
||||
color: #222222;
|
||||
|
|
@ -494,9 +391,7 @@ function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd hh:MM:ss") {
|
|||
}
|
||||
|
||||
.tag_status {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
color: #999999;
|
||||
|
|
|
|||
|
|
@ -1,594 +0,0 @@
|
|||
<template>
|
||||
<!-- 顶部 banner 区域 -->
|
||||
<!-- banner start -->
|
||||
<view class="all">
|
||||
<text class="top_menu_text">海外资讯</text>
|
||||
<view class="banner">
|
||||
<img :src="bannerImg" class="banner_bk" />
|
||||
<view class="r_banner_title">
|
||||
<img :src="bannerTitle2" class="banner_title" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- banner end -->
|
||||
|
||||
<view class="list_content">
|
||||
<!-- 搜索 start -->
|
||||
<view class="r_sreach">
|
||||
<view class="sreach" style="height: 72rpx">
|
||||
<u-search v-model="form.keyword" placeholder="搜索资讯" @search="onSreach" @custom="onSreach" />
|
||||
<!-- <view class="sreach_icon">
|
||||
<image :src="icon_search"></image>
|
||||
</view>
|
||||
<view class="sreach_text">
|
||||
<text>搜索资讯</text>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- 搜索 end -->
|
||||
|
||||
<view class="r_list">
|
||||
<view v-for="item in listData" :key="item.day">
|
||||
<!-- 时间轴顶部日期 start -->
|
||||
<view class="item_top">
|
||||
<view class="r_line">
|
||||
<view class="item_point"></view>
|
||||
<view class="item_line"></view>
|
||||
</view>
|
||||
<text class="item_day">{{ dayjs(item.day).format("YYYY年MM月DD日") }}</text>
|
||||
</view>
|
||||
<!-- 时间轴顶部日期 end -->
|
||||
<view class="list_card">
|
||||
<view class="card_left">
|
||||
<img :src="time_icon" />
|
||||
<view class="left_line"></view>
|
||||
</view>
|
||||
<view class="card_right">
|
||||
<view v-for="item in item.list" :key="item.time" @click="goDetail(item)">
|
||||
<view class="item_time">
|
||||
<text>{{ item.timeStr }}</text>
|
||||
<text class="item_source_title">来自 <text class="item_source">中国证券报</text></text>
|
||||
</view>
|
||||
<view class="item_title">
|
||||
<text>{{ item.title }}</text>
|
||||
</view>
|
||||
<view class="item_summary">
|
||||
<text>{{ item.summary }}</text>
|
||||
</view>
|
||||
<view class="item_etf">
|
||||
<view v-for="etf in item.etfs" :key="etf.code" class="item_etf_item" @click.stop="goEtfDetail(etf)">
|
||||
<view></view>
|
||||
<text>{{ etf.name }}</text>
|
||||
<div class="btn-play"></div>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="r_logout">
|
||||
<view class="logout" @click="loginOut" v-if="Session.get('token')">退出登录</view>
|
||||
</view>
|
||||
|
||||
<LoginPopup
|
||||
:show="LoginShow"
|
||||
@handlePopupClose="handlePopupClose"
|
||||
@handlePopupSuccessCallback="handlePopupSuccessCallback"
|
||||
@handlePopupErrorCallback="handlePopupErrorCallback"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, onUnmounted, reactive } from "vue";
|
||||
import Line from "@/components/charts/Line.vue";
|
||||
import bannerImg from "@/assets/zixun/banner_pic1.png";
|
||||
import bannerTitle from "@/assets/zixun/banner_title.png";
|
||||
import bannerTitle2 from "@/assets/zixun/banner_title3.png";
|
||||
import icon_search from "@/assets/zixun/icon_search.png";
|
||||
import time_icon from "@/assets/zixun/time_icon.png";
|
||||
import LoginPopup from "@/components/loginPopup/index.vue";
|
||||
import { Session } from "@/utils/storage";
|
||||
import dayjs from "dayjs/esm/index";
|
||||
import { onReachBottom } from "@dcloudio/uni-app";
|
||||
import { getEtfIndexList } from "@/api/index";
|
||||
|
||||
const listData = ref([
|
||||
// {
|
||||
// day: "2026-10-26",
|
||||
// list: [
|
||||
// {
|
||||
// time: "11:30:56",
|
||||
// title: "刚果延长禁令后,中国钴价和库存飙升刚果延长禁令后,中国钴价和库存飙升",
|
||||
// summary: "刚果民主共和国将钴出口禁令延长至9月,导致全球约四分之三的钴供应受到影响。这一消息引…",
|
||||
// etfs: [
|
||||
// {
|
||||
// name: "医药 ETF",
|
||||
// code: "string",
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
]);
|
||||
|
||||
const form = ref({
|
||||
page: 1,
|
||||
keyword: null,
|
||||
});
|
||||
async function getData() {
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
});
|
||||
let { code, data } = await getEtfIndexList({
|
||||
...form.value,
|
||||
size: 20,
|
||||
});
|
||||
uni.hideLoading();
|
||||
|
||||
if (code == 200) {
|
||||
if (form.value.page == 1) {
|
||||
listData.value = [];
|
||||
listData.value = data.list;
|
||||
} else {
|
||||
// 处理可能的day字段重复,合并相同day的list数据
|
||||
const newList = [...data.list];
|
||||
const updatedList = [...listData.value];
|
||||
|
||||
newList.forEach(newItem => {
|
||||
// 检查是否存在相同day的条目
|
||||
const existingItemIndex = updatedList.findIndex(item => item.day === newItem.day);
|
||||
|
||||
if (existingItemIndex !== -1) {
|
||||
// 如果存在相同day,合并list数据
|
||||
updatedList[existingItemIndex].list = [...updatedList[existingItemIndex].list, ...newItem.list];
|
||||
} else {
|
||||
// 如果不存在相同day,直接添加
|
||||
updatedList.push(newItem);
|
||||
}
|
||||
});
|
||||
|
||||
listData.value = updatedList;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const LoginShow = ref(false);
|
||||
const isLoginStatus = ref();
|
||||
// 关闭弹框
|
||||
const handlePopupClose = () => {
|
||||
LoginShow.value = false;
|
||||
};
|
||||
|
||||
// 登录成功之后的回调
|
||||
const handlePopupSuccessCallback = () => {
|
||||
isLoginStatus.value = true;
|
||||
};
|
||||
|
||||
// 登录失败之后的回调
|
||||
const handlePopupErrorCallback = () => {
|
||||
console.log("登录失败");
|
||||
};
|
||||
import { doLogout } from "@/api";
|
||||
import { onPullDownRefresh } from "@dcloudio/uni-app";
|
||||
function loginOut() {
|
||||
doLogout({
|
||||
financialAccount: Session.get("userPhone"),
|
||||
});
|
||||
Session.clear();
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
onReachBottom(() => {
|
||||
form.value.page++;
|
||||
getData();
|
||||
});
|
||||
|
||||
function goDetail(item, index) {
|
||||
if (Session.get("token")) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/detail/indexNewsInfo?id=${item.id}&intoType=etf`,
|
||||
});
|
||||
} else {
|
||||
LoginShow.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
function goEtfDetail(item) {
|
||||
console.log("🚀 ~ goEtfDetail ~ item:", item);
|
||||
uni.navigateTo({
|
||||
url: `/pages/realtimeInfo/indexEtfInfo?name=${item.name}&code=${item.code}`,
|
||||
});
|
||||
}
|
||||
|
||||
function onSreach() {
|
||||
if (Session.get("token")) {
|
||||
form.value.page = 1;
|
||||
getData();
|
||||
} else {
|
||||
LoginShow.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
if (!Session.get("token")) {
|
||||
LoginShow.value = true;
|
||||
}
|
||||
getData();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.all {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
|
||||
.top_menu_text {
|
||||
position: absolute;
|
||||
top: 60rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
z-index: 9999;
|
||||
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 34rpx;
|
||||
color: #ffffff;
|
||||
line-height: 36rpx;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.banner {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.banner_bk {
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.r_banner_title {
|
||||
position: absolute;
|
||||
top: 200rpx;
|
||||
left: 50rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.banner_title {
|
||||
width: 461rpx;
|
||||
height: 110rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
font-family: AlibabaPuHuiTiM;
|
||||
font-size: 32rpx;
|
||||
color: #ffffff;
|
||||
line-height: 44rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.r_logout {
|
||||
position: fixed;
|
||||
bottom: 0rpx;
|
||||
right: 0rpx;
|
||||
z-index: 9999;
|
||||
background-color: white;
|
||||
width: 100vw;
|
||||
height: auto;
|
||||
box-shadow: 0 -10rpx 20rpx rgba(73, 73, 73, 0.1);
|
||||
}
|
||||
|
||||
.logout {
|
||||
// width: 100%;
|
||||
height: 80rpx;
|
||||
background-color: red;
|
||||
display: flex;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: white;
|
||||
margin-top: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-right: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.logo_text {
|
||||
width: 88rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.top_bk {
|
||||
width: 100vw;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.list_content {
|
||||
position: relative;
|
||||
z-index: 9999;
|
||||
|
||||
// margin-top: -70px;
|
||||
// padding: 10rpx 30rpx;
|
||||
background-color: #f3f5f8;
|
||||
// background: linear-gradient(180deg, #ffffff 0%, #f3f5f8 100%);
|
||||
// min-height: 80vh;
|
||||
|
||||
.r_sreach {
|
||||
position: relative;
|
||||
z-index: 99999;
|
||||
|
||||
margin-top: -120rpx;
|
||||
|
||||
border-radius: 24rpx 24rpx 0rpx 0rpx;
|
||||
// width: 100%;
|
||||
height: 120rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// margin-top: 30rpx;
|
||||
padding-top: 30rpx;
|
||||
padding: 0 30rpx;
|
||||
background-color: white;
|
||||
background-image: linear-gradient(to bottom, white 60rpx, #f3f5f8);
|
||||
// background: linear-gradient(to bottom, #ffffff 0%, #f3f5f8 100%);
|
||||
}
|
||||
|
||||
.sreach {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0rpx 30rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 100rpx;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #f3f5f8;
|
||||
border-radius: 36rpx;
|
||||
// box-shadow: 0 0 10rpx rgba(97, 97, 97, 0.1);
|
||||
}
|
||||
|
||||
.sreach_icon {
|
||||
margin-right: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 35rpx;
|
||||
height: 35rpx;
|
||||
margin-top: 5rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.sreach_text {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
line-height: 40rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.item_day {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: bold;
|
||||
font-size: 24rpx;
|
||||
color: #222222;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
margin-top: -10rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.r_list {
|
||||
padding: 10rpx 30rpx;
|
||||
margin-top: -30rpx;
|
||||
}
|
||||
|
||||
.item_top {
|
||||
display: flex;
|
||||
margin-top: 40rpx;
|
||||
padding: 0 30rpx;
|
||||
|
||||
.r_line {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.item_point {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
background: #eb5d46;
|
||||
border-radius: 100rpx;
|
||||
}
|
||||
|
||||
.item_line {
|
||||
width: 1rpx;
|
||||
height: 35rpx;
|
||||
border-left: 2px dashed #d9d7d7;
|
||||
}
|
||||
}
|
||||
|
||||
.list_card {
|
||||
display: flex;
|
||||
// height: 334rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 24rpx;
|
||||
padding: 30rpx 30rpx;
|
||||
|
||||
.card_left {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-top: 25rpx;
|
||||
|
||||
img {
|
||||
width: 8rpx;
|
||||
height: 33rpx;
|
||||
}
|
||||
|
||||
.left_line {
|
||||
width: 1rpx;
|
||||
height: 100%;
|
||||
border-left: 2px dashed #d9d7d7;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.card_right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-left: 20rpx;
|
||||
width: 95%;
|
||||
margin-top: 10rpx;
|
||||
gap: 10rpx;
|
||||
|
||||
.item_time {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #222222;
|
||||
line-height: 44rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.item_title {
|
||||
width: 100%;
|
||||
margin-top: 30rpx;
|
||||
|
||||
text {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: bold;
|
||||
font-size: 28rpx;
|
||||
color: #222222;
|
||||
line-height: 40rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
|
||||
display: inline-block;
|
||||
/* 或 block */
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
.item_summary {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
line-height: 44rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
margin-top: 10rpx;
|
||||
|
||||
/* 1. 必须将元素设置为块级或弹性盒 */
|
||||
display: -webkit-box;
|
||||
/* 2. 定义盒模型的排列方向为垂直 */
|
||||
-webkit-box-orient: vertical;
|
||||
/* 3. 限制显示的行数 */
|
||||
-webkit-line-clamp: 2;
|
||||
/* 4. 隐藏超出的内容 */
|
||||
overflow: hidden;
|
||||
/* 5. (可选) 当文本溢出时显示省略号 */
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.item_source_title {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #b3b3b3;
|
||||
line-height: 33rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.item_source {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #5978b2;
|
||||
line-height: 33rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.item_etf {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 10rpx;
|
||||
gap: 20rpx;
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.item_etf_item {
|
||||
// width: 168rpx;
|
||||
width: calc(50% - 60rpx);
|
||||
height: 48rpx;
|
||||
background: #edf1f5;
|
||||
border-radius: 125rpx;
|
||||
padding: 5rpx 25rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
justify-content: space-between;
|
||||
|
||||
text {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
line-height: 44rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
/* 容器样式(模拟红框) */
|
||||
.btn-play {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
/* 三角形伪元素 */
|
||||
.btn-play::before {
|
||||
content: "";
|
||||
width: 0;
|
||||
height: 0;
|
||||
border-top: 5px solid transparent;
|
||||
border-bottom: 5px solid transparent;
|
||||
border-left: 8px solid #999;
|
||||
/* 注意:这里是border-left,因为三角形朝右时,左边框是实心 */
|
||||
margin-left: 4px;
|
||||
/* 与文字的间距(从右边移到左边) */
|
||||
}
|
||||
|
||||
/* 文字部分 */
|
||||
.btn-play span {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
line-height: 44rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,262 +0,0 @@
|
|||
<template>
|
||||
<div class="index-etf-info">
|
||||
<!-- 头部 -->
|
||||
<view class="vipHeader">
|
||||
<view class="flashBack" @click="doBack">
|
||||
<u-icon size="20" name="arrow-left" color="#000"></u-icon>
|
||||
</view>
|
||||
<view style="display: flex; flex-direction: column">
|
||||
<view class="title">{{ name }}</view>
|
||||
<view class="title_sub">{{ code }}</view>
|
||||
</view>
|
||||
<view style="width: 5%"></view>
|
||||
</view>
|
||||
|
||||
<view style="width: 100vw; height: 10rpx; background-color: #f5f5f5"></view>
|
||||
<!-- 指数ETF实时信息展示区域 -->
|
||||
<view class="r_list">
|
||||
<view v-for="(item, index) in etfInfoList" :key="index" class="news-item" @click="goDetail(item, 0)">
|
||||
<view class="news-content">
|
||||
<text class="news-title">{{ item.title }}</text>
|
||||
<text class="news-desc">{{ item.summary }}</text>
|
||||
|
||||
<view class="news-meta">
|
||||
<view>
|
||||
<text class="time">
|
||||
{{ timeFormat(new Date(item.publish_time).getTime()) }}
|
||||
</text>
|
||||
</view>
|
||||
<text class="time">中国证券报</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { ref } from "vue";
|
||||
import { fetchEtfDetail } from "@/api/index";
|
||||
|
||||
// 使用 Vue3 的 <script setup> 语法糖
|
||||
// 在此声明响应式数据、方法等
|
||||
|
||||
const etfInfoList = ref([]);
|
||||
async function getEtfInfo() {
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
});
|
||||
let { code, data } = await fetchEtfDetail({
|
||||
etfName: name.value,
|
||||
});
|
||||
uni.hideLoading();
|
||||
|
||||
if (code === 200) {
|
||||
console.log(data);
|
||||
etfInfoList.value = data.list;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 格式化时间
|
||||
* @param {String|Number} dateTime 需要格式化的时间戳
|
||||
* @param {String} fmt 格式化规则 yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合 默认yyyy-mm-dd
|
||||
* @returns {string} 返回格式化后的字符串
|
||||
*/
|
||||
function timeFormat(dateTime = null, formatStr = "yyyy-mm-dd hh:MM:ss") {
|
||||
let date;
|
||||
// 若传入时间为假值,则取当前时间
|
||||
if (!dateTime) {
|
||||
date = new Date();
|
||||
}
|
||||
// 若为unix秒时间戳,则转为毫秒时间戳(逻辑有点奇怪,但不敢改,以保证历史兼容)
|
||||
else if (/^\d{10}$/.test(dateTime.toString().trim())) {
|
||||
date = new Date(dateTime * 1000);
|
||||
}
|
||||
// 若用户传入字符串格式时间戳,new Date无法解析,需做兼容
|
||||
else if (typeof dateTime === "string" && /^\d+$/.test(dateTime.trim())) {
|
||||
date = new Date(Number(dateTime));
|
||||
}
|
||||
// 其他都认为符合 RFC 2822 规范
|
||||
else {
|
||||
// 处理平台性差异,在Safari/Webkit中,new Date仅支持/作为分割符的字符串时间
|
||||
date = new Date(typeof dateTime === "string" ? dateTime.replace(/-/g, "/") : dateTime);
|
||||
}
|
||||
|
||||
const timeSource = {
|
||||
y: date.getFullYear().toString(), // 年
|
||||
m: (date.getMonth() + 1).toString().padStart(2, "0"), // 月
|
||||
d: date.getDate().toString().padStart(2, "0"), // 日
|
||||
h: date.getHours().toString().padStart(2, "0"), // 时
|
||||
M: date.getMinutes().toString().padStart(2, "0"), // 分
|
||||
s: date.getSeconds().toString().padStart(2, "0"), // 秒
|
||||
// 有其他格式化字符需求可以继续添加,必须转化成字符串
|
||||
};
|
||||
|
||||
for (const key in timeSource) {
|
||||
const [ret] = new RegExp(`${key}+`).exec(formatStr) || [];
|
||||
if (ret) {
|
||||
// 年可能只需展示两位
|
||||
const beginIndex = key === "y" && ret.length === 2 ? 2 : 0;
|
||||
formatStr = formatStr.replace(ret, timeSource[key].slice(beginIndex));
|
||||
}
|
||||
}
|
||||
|
||||
return formatStr;
|
||||
}
|
||||
|
||||
function goDetail(item, index) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/detail/indexNewsInfo?id=${item.id}&intoType=etf`,
|
||||
});
|
||||
}
|
||||
|
||||
function doBack() {
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
}
|
||||
|
||||
const name = ref("");
|
||||
const code = ref("");
|
||||
onLoad((option) => {
|
||||
console.log(option.name);
|
||||
name.value = option.name;
|
||||
code.value = option.code;
|
||||
|
||||
getEtfInfo();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.news-item {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 15px;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.news-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.r_list {
|
||||
padding: 30rpx;
|
||||
width: calc(100vw - 60rpx);
|
||||
}
|
||||
|
||||
.news-title {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
color: #222222;
|
||||
line-height: 42rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
|
||||
margin-bottom: 5px;
|
||||
line-height: 1.2;
|
||||
|
||||
width: calc(100vw - 60rpx);
|
||||
display: inline-block;
|
||||
/* 或 block */
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.news-desc {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
|
||||
display: -webkit-box;
|
||||
/* 设置为WebKit内核的弹性盒子模型 */
|
||||
-webkit-box-orient: vertical;
|
||||
/* 垂直排列 */
|
||||
-webkit-line-clamp: 2;
|
||||
/* 限制显示三行 */
|
||||
overflow: hidden;
|
||||
/* 隐藏超出范围的内容 */
|
||||
text-overflow: ellipsis;
|
||||
/* 使用省略号 */
|
||||
|
||||
width: calc(100vw - 60rpx);
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.news-meta {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
margin-top: 26rpx;
|
||||
}
|
||||
|
||||
.source,
|
||||
.time,
|
||||
.score {
|
||||
// opacity: 0.8;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
color: #999999;
|
||||
line-height: 30rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.time {
|
||||
// margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.score {
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 22rpx;
|
||||
color: #ffa800;
|
||||
line-height: 30rpx;
|
||||
text-align: center;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.vipHeader {
|
||||
width: 100vw;
|
||||
height: 120rpx;
|
||||
background-color: white;
|
||||
box-sizing: border-box;
|
||||
padding: 32rpx 32rpx 6rpx 40rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
// position: sticky;
|
||||
// top: 0;
|
||||
// z-index: 9999;
|
||||
|
||||
.flashBack {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.title_sub {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
font-weight: 400;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,627 +0,0 @@
|
|||
<template>
|
||||
<!-- 顶部 banner 区域 -->
|
||||
<view class="all">
|
||||
<!-- banner start -->
|
||||
<!-- <view class="banner">
|
||||
<img :src="bannerImg" class="banner_bk" />
|
||||
<view class="r_banner_title">
|
||||
<img :src="bannerTitle2" class="banner_title" />
|
||||
<text>数据更新时间:{{ dayjs(new Date().getTime()).format("YYYY-MM-DD") }}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- banner end -->
|
||||
|
||||
<view>
|
||||
<!-- <view class="tag">
|
||||
<view class="r_tag_img">
|
||||
<img :src="tagicon_1_bg" class="tag_bk" />
|
||||
<view class="tag_content">
|
||||
<view class="tag_item_left">
|
||||
<text class="tag_title">行业分类贴标</text>
|
||||
|
||||
<view style="display: flex; margin-top: 15rpx">
|
||||
<countTo :startVal="lastLeftNum" :endVal="topNum.leftNum" :duration="5000" class="tag_num"></countTo>
|
||||
|
||||
<text class="tag_status">已处理</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="tag_item_right">
|
||||
<img :src="tagicon_1" class="tag_icon" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="r_tag_img">
|
||||
<img :src="tagicon_2_bg" class="tag_bk" />
|
||||
<view class="tag_content">
|
||||
<view class="tag_item_left">
|
||||
<text class="tag_title">概念标签贴标</text>
|
||||
<view style="display: flex; margin-top: 15rpx">
|
||||
<countTo :startVal="lastRightNum" :endVal="topNum.rightNum" :duration="5000" class="tag_num"></countTo>
|
||||
|
||||
<text class="tag_status">已处理</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="tag_item_right">
|
||||
<img :src="tagicon_2" class="tag_icon" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<view style="background-color: white; margin-top: -100rpx; position: relative; z-index: 9999; margin-bottom: 12pt">
|
||||
<indexMenuTitle title="近7天热度统计"></indexMenuTitle>
|
||||
<view style="background-color: white; padding: 12pt">
|
||||
<view class="tabs">
|
||||
<view :class="['tab', 'tab_left', { active: lineTabIndex === 0 }]" @click="handleTabClick(0)">申万行业</view>
|
||||
<view :class="['tab', { active: lineTabIndex === 1 }]" @click="handleTabClick(1)">概念标签</view>
|
||||
<view :class="['tab', 'tab_right', { active: lineTabIndex === 2 }]" @click="handleTabClick(2)">媒体来源</view>
|
||||
</view>
|
||||
</view>
|
||||
<LineHol v-if="lineTabIndex === 0" barColor="#FF8A00" :data="lineTopData"></LineHol>
|
||||
<LineHol v-else-if="lineTabIndex === 1" barColor="#FF8A00" :data="lineTopData"></LineHol>
|
||||
<LineHolYellow v-else-if="lineTabIndex === 2" barColor="#FF8A00" :data="lineTopData"></LineHolYellow>
|
||||
</view>
|
||||
|
||||
<!-- <view style="background-color: white; margin-top: 40rpx">
|
||||
<indexMenuTitle title="资讯评分分布区间"></indexMenuTitle>
|
||||
<Line style="margin-top: 30rpx" :data="lineData"></Line>
|
||||
|
||||
<view style="display: flex; flex-direction: column; text-align: center; justify-content: center; align-items: center; padding-bottom: 30rpx">
|
||||
<InfoSummary style="width: 85%" :count="newsNum"></InfoSummary>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view style="background-color: white">
|
||||
<view style="width: 100vw; display: flex; justify-content: space-between; align-items: center">
|
||||
<!-- <indexMenuTitle title="编辑精选" style="margin-top: 10rpx"></indexMenuTitle> -->
|
||||
<view class="r_title">编辑精选</view>
|
||||
<view class="r_sreach">
|
||||
<!-- <image class="top_bk" src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/top_bg.png"></image> -->
|
||||
<!-- <image class="logo_text" src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/logo_text_icon.png"> </image> -->
|
||||
<view class="sreach" @click="goSreach">
|
||||
<view class="sreach_icon">
|
||||
<!-- <image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/icon_search_line.png"></image> -->
|
||||
<u-icon size="22" name="search" color="#999"></u-icon>
|
||||
</view>
|
||||
<view class="sreach_text">
|
||||
<text>搜索资讯</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<RankList hasTag :newsList="newsList" :needExp="false"></RankList>
|
||||
</view>
|
||||
|
||||
<!-- <view class="logout" @click="loginOut" v-if="Session.get('token')">退出登录</view> -->
|
||||
|
||||
<LoginPopup
|
||||
:show="LoginShow"
|
||||
@handlePopupClose="handlePopupClose"
|
||||
@handlePopupSuccessCallback="handlePopupSuccessCallback"
|
||||
@handlePopupErrorCallback="handlePopupErrorCallback"
|
||||
/>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { onReachBottom } from "@dcloudio/uni-app";
|
||||
import { ref, onMounted, onUnmounted, reactive } from "vue";
|
||||
import Line from "@/components/charts/Line.vue";
|
||||
import bannerImg from "@/assets/zixun/banner_pic.png";
|
||||
import bannerTitle from "@/assets/zixun/banner_title.png";
|
||||
import bannerTitle2 from "@/assets/zixun/banner_title2.png";
|
||||
import tagicon_1_bg from "@/assets/zixun/tagicon_1_bg.png";
|
||||
import tagicon_2_bg from "@/assets/zixun/tagicon_2_bg.png";
|
||||
import tagicon_1 from "@/assets/zixun/tagicon_1.png";
|
||||
import tagicon_2 from "@/assets/zixun/tagicon_2.png";
|
||||
import LoginPopup from "@/components/loginPopup/index.vue";
|
||||
import { Session } from "@/utils/storage";
|
||||
import LineHol from "@/components/charts/LineHol.vue";
|
||||
import LineHolYellow from "@/components/charts/LineHolYellow.vue";
|
||||
|
||||
import {
|
||||
getindustryCount,
|
||||
getConceptCount,
|
||||
getTopNewsAll,
|
||||
getTopIndustry_d,
|
||||
getTopConcept_d,
|
||||
getNews_cnt_d,
|
||||
newsInfoScore,
|
||||
getTopConceptPeriod,
|
||||
getTopIndustryPeriod,
|
||||
getTopSourcePeriod,
|
||||
} from "@/api/newsInfo";
|
||||
import countTo from "@/components/count-to/vue-countTo.vue";
|
||||
import RankList from "@/components/RankList.vue"; // 路径根据实际调整
|
||||
import InfoSummary from "@/components/InfoSummary.vue"; // 路径根据实际调整
|
||||
import indexMenuTitle from "@/components/indexMenuTitle.vue"; // 路径根据实际调整
|
||||
import dayjs from "dayjs/esm/index";
|
||||
import HotIndustryList from "@/components/HotIndustryList.vue"; // 路径根据实际调整
|
||||
|
||||
const newsList = ref([]);
|
||||
|
||||
const lastLeftNum = ref(0);
|
||||
const lastRightNum = ref(0);
|
||||
|
||||
const industryList = ref([]);
|
||||
const topConceptList = ref([]);
|
||||
const newsNum = ref(0);
|
||||
const lineData = ref();
|
||||
const handleViewAll = () => {
|
||||
// 在这里处理点击“查看全部”的逻辑,比如跳转新页面等
|
||||
console.log("点击了查看全部");
|
||||
};
|
||||
|
||||
const topNum = ref({});
|
||||
|
||||
// 获取顶部两个统计数据
|
||||
async function getTopNum() {
|
||||
let res1 = await getindustryCount({});
|
||||
topNum.value.leftNum = res1.aggregations.industry_non_empty.doc_count;
|
||||
let res2 = await getConceptCount({});
|
||||
topNum.value.rightNum = res2.aggregations.concept_non_empty.doc_count;
|
||||
|
||||
lastLeftNum.value = topNum.value.leftNum;
|
||||
lastRightNum.value = topNum.value.rightNum;
|
||||
}
|
||||
|
||||
const newListAll = ref([]);
|
||||
const pageData = reactive({
|
||||
page: 1,
|
||||
size: 20,
|
||||
total: 0,
|
||||
});
|
||||
// 概念标签贴标
|
||||
async function getNewsList() {
|
||||
const result = await getTopNewsAll({});
|
||||
// 存储所有数据
|
||||
newListAll.value = [...result];
|
||||
|
||||
if (result && result.length > 0) {
|
||||
// 获取总页数
|
||||
pageData.total = Math.ceil(newListAll.value.length / pageData.size);
|
||||
newsList.value = newListAll.value.slice(0, pageData.size);
|
||||
} else {
|
||||
newsList.value = [];
|
||||
}
|
||||
}
|
||||
|
||||
// 热门行业top10
|
||||
async function getTopIndustry_dFn() {
|
||||
industryList.value = await getTopIndustry_d({});
|
||||
}
|
||||
|
||||
// 风口概念池top10
|
||||
async function getTopConcept_dFn() {
|
||||
topConceptList.value = await getTopConcept_d({});
|
||||
}
|
||||
|
||||
// 今日精选
|
||||
async function getNews_cnt_dFn() {
|
||||
let temp = await getNews_cnt_d({});
|
||||
|
||||
newsNum.value = temp[0].value;
|
||||
}
|
||||
|
||||
// 获取柱状图数据
|
||||
async function getLineData() {
|
||||
let res = await newsInfoScore({});
|
||||
lineData.value = res;
|
||||
}
|
||||
|
||||
function initData() {
|
||||
// 获取柱状图数据
|
||||
getLineData();
|
||||
// 获取顶部两个统计数据
|
||||
getTopNum();
|
||||
// 概念标签贴标
|
||||
getNewsList();
|
||||
// 热门行业top10
|
||||
getTopIndustry_dFn();
|
||||
// 风口概念池top10
|
||||
getTopConcept_dFn();
|
||||
// 今日精选
|
||||
getNews_cnt_dFn();
|
||||
}
|
||||
|
||||
const type = ref();
|
||||
function onViewAll(type) {
|
||||
type.value = type;
|
||||
if (Session.get("token")) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/realtimeInfo/rankDetail?type=" + type,
|
||||
});
|
||||
} else {
|
||||
// LoginShow.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
// const timer = setInterval(() => {
|
||||
// initData();
|
||||
// }, 5000);
|
||||
|
||||
const LoginShow = ref(false);
|
||||
const isLoginStatus = ref();
|
||||
// 关闭弹框
|
||||
const handlePopupClose = () => {
|
||||
LoginShow.value = false;
|
||||
};
|
||||
|
||||
// 登录成功之后的回调
|
||||
const handlePopupSuccessCallback = () => {
|
||||
isLoginStatus.value = true;
|
||||
|
||||
// uni.navigateTo({
|
||||
// url: "/pages/realtimeInfo/rankDetail?type=" + type.value,
|
||||
// });
|
||||
};
|
||||
|
||||
// 登录失败之后的回调
|
||||
const handlePopupErrorCallback = () => {
|
||||
console.log("登录失败");
|
||||
};
|
||||
import { doLogout } from "@/api";
|
||||
function loginOut() {
|
||||
doLogout({
|
||||
financialAccount: Session.get("userPhone"),
|
||||
});
|
||||
Session.clear();
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
const lineTabIndex = ref(0);
|
||||
function handleTabClick(index) {
|
||||
lineTabIndex.value = index;
|
||||
getLineDataFn();
|
||||
}
|
||||
|
||||
const lineTopData = ref({});
|
||||
async function getLineDataFn() {
|
||||
if (lineTabIndex.value == 0) {
|
||||
// 行业
|
||||
getTopIndustryPeriod({
|
||||
start_time: dayjs().subtract(7, "day").format("YYYY-MM-DD"),
|
||||
end_time: dayjs().format("YYYY-MM-DD"),
|
||||
limit_num: 10,
|
||||
}).then((res) => {
|
||||
lineTopData.value = res;
|
||||
});
|
||||
} else if (lineTabIndex.value == 1) {
|
||||
// 概念
|
||||
getTopConceptPeriod({
|
||||
start_time: dayjs().subtract(7, "day").format("YYYY-MM-DD"),
|
||||
end_time: dayjs().format("YYYY-MM-DD"),
|
||||
limit_num: 10,
|
||||
}).then((res) => {
|
||||
lineTopData.value = res;
|
||||
});
|
||||
} else if (lineTabIndex.value == 2) {
|
||||
// 媒体
|
||||
getTopSourcePeriod({
|
||||
start_time: dayjs().subtract(7, "day").format("YYYY-MM-DD"),
|
||||
end_time: dayjs().format("YYYY-MM-DD"),
|
||||
limit_num: 10,
|
||||
}).then((res) => {
|
||||
lineTopData.value = res;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function goSreach() {
|
||||
if (Session.get("token")) {
|
||||
uni.navigateTo({
|
||||
url: "/pages/sreachReq/index",
|
||||
});
|
||||
} else {
|
||||
LoginShow.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
// 触底更新
|
||||
onReachBottom(() => {
|
||||
console.log("我到底了");
|
||||
if (pageData.page < pageData.total) {
|
||||
pageData.page += 1;
|
||||
const start = (pageData.page - 1) * pageData.size;
|
||||
const end = pageData.page * pageData.size;
|
||||
newsList.value = newListAll.value.slice(0, end);
|
||||
}
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
clearInterval(timer);
|
||||
});
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const { aplus_queue } = window;
|
||||
onMounted(async () => {
|
||||
initData();
|
||||
// if (!Session.get("token")) {
|
||||
// LoginShow.value = true;
|
||||
// }
|
||||
getLineDataFn();
|
||||
|
||||
// 解构路由参数,排除token
|
||||
const { token, phone, ...otherQuery } = route.query;
|
||||
// 若存在token,替换路由清除参数
|
||||
if (token) {
|
||||
router.replace({
|
||||
path: route.path, // 保持当前路径不变
|
||||
query: otherQuery, // 保留其他参数
|
||||
});
|
||||
}
|
||||
Session.set("token", token);
|
||||
Session.set("userPhone", phone);
|
||||
|
||||
aplus_queue.push({
|
||||
action: "aplus.sendPV",
|
||||
arguments: [{ is_auto: false }], // 此处上报的数据暂时在后台没有展示
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.all {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #f3f5f8;
|
||||
}
|
||||
|
||||
.banner {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.banner_bk {
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.r_banner_title {
|
||||
position: absolute;
|
||||
top: 160rpx;
|
||||
left: 50rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.banner_title {
|
||||
width: 364rpx;
|
||||
height: 134rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
}
|
||||
|
||||
.tag {
|
||||
display: flex;
|
||||
margin-top: -150rpx;
|
||||
position: relative;
|
||||
z-index: 999;
|
||||
padding: 0 25rpx;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.r_tag_img {
|
||||
width: calc(50vw - 20rpx);
|
||||
height: 175rpx;
|
||||
position: relative;
|
||||
box-shadow: 0 10rpx 10rpx rgba(80, 80, 80, 0.1);
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.tag_bk {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.tag_content {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
top: 40rpx;
|
||||
left: 30rpx;
|
||||
width: 83%;
|
||||
justify-content: space-between;
|
||||
|
||||
.tag_item_left {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.tag_title {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #222222;
|
||||
line-height: 33rpx;
|
||||
}
|
||||
|
||||
.tag_num {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-weight: bold;
|
||||
font-size: 38rpx;
|
||||
color: #222222;
|
||||
line-height: 56rpx;
|
||||
}
|
||||
|
||||
.tag_status {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
color: #999999;
|
||||
line-height: 33rpx;
|
||||
margin-top: 15rpx;
|
||||
margin-left: 7rpx;
|
||||
}
|
||||
|
||||
.tag_item_right {
|
||||
width: 70rpx;
|
||||
height: 84rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.tag_icon {
|
||||
width: 70rpx;
|
||||
height: 84rpx;
|
||||
}
|
||||
|
||||
.view-all {
|
||||
font-size: 14px;
|
||||
color: #999;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.logout {
|
||||
// width: 100%;
|
||||
height: 80rpx;
|
||||
background-color: red;
|
||||
display: flex;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: white;
|
||||
margin-top: 50rpx;
|
||||
border-radius: 20rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-right: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
gap: 16rpx;
|
||||
height: 30px;
|
||||
border-radius: 10px;
|
||||
|
||||
.tab {
|
||||
// width: 100px;
|
||||
// height: 100%;
|
||||
display: flex;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 10rpx 24rpx;
|
||||
// border: 1px solid #e7e7e7;
|
||||
color: #333;
|
||||
font-size: 12px;
|
||||
background: #f6f6f6;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
// .tab_left {
|
||||
// border-start-start-radius: 10px;
|
||||
// border-end-start-radius: 10px;
|
||||
// border-right: 0;
|
||||
// }
|
||||
|
||||
// .tab_right {
|
||||
// border-start-end-radius: 10px;
|
||||
// border-end-end-radius: 10px;
|
||||
// border-left: 0;
|
||||
// }
|
||||
|
||||
.active {
|
||||
font-weight: bold;
|
||||
background-color: rgba(255, 153, 0, 0.1);
|
||||
color: #ff9900;
|
||||
}
|
||||
}
|
||||
|
||||
.r_title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 12pt;
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
width: 4px;
|
||||
height: 32rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-right: 16rpx;
|
||||
background: #ff9900;
|
||||
}
|
||||
}
|
||||
|
||||
.r_sreach {
|
||||
height: 60px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 30rpx;
|
||||
// position: absolute;
|
||||
// top: 10px;
|
||||
// left: 0;
|
||||
// z-index: 9999;
|
||||
// background: url("https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/top_bg.png");
|
||||
}
|
||||
|
||||
.logo_text {
|
||||
width: 88rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.sreach {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0rpx 30rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 100rpx;
|
||||
// width: 90vw;
|
||||
height: 63rpx;
|
||||
margin-left: 20rpx;
|
||||
//border: 1px solid #e7e7e7;
|
||||
margin-top: 5rpx;
|
||||
// box-shadow: 0 0 10rpx rgba(97, 97, 97, 0.1);
|
||||
color: #333;
|
||||
background-color: #f7f8f9;
|
||||
}
|
||||
|
||||
.sreach_icon {
|
||||
margin-right: 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
image {
|
||||
width: 35rpx;
|
||||
height: 35rpx;
|
||||
margin-top: 5rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.sreach_text {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
line-height: 33rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.top_bk {
|
||||
width: 100vw;
|
||||
height: 60px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -2,7 +2,6 @@
|
|||
<view class="page_top">
|
||||
<view class="r_menu">
|
||||
<image src="@/assets/images/logo.png" class="logo"></image>
|
||||
|
||||
<view class="r_menu_item" @click="tabChange(1)">
|
||||
<text class="menu_item">资讯头条榜</text>
|
||||
<view class="line" v-if="tabIndex == 1"></view>
|
||||
|
|
@ -17,11 +16,6 @@
|
|||
<text class="menu_item">风口概念</text>
|
||||
<view class="line" v-if="tabIndex == 3"></view>
|
||||
</view>
|
||||
|
||||
<view class="r_menu_item" @click="tabChange(4)">
|
||||
<text class="menu_item">编辑精选</text>
|
||||
<view class="line" v-if="tabIndex == 4"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view @click="logout" v-if="Session.get('token')">
|
||||
|
|
@ -31,10 +25,9 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, onUnmounted, reactive, nextTick } from "vue";
|
||||
import { ref, onMounted, onUnmounted, reactive } from "vue";
|
||||
import { onLoad, onShow } from "@dcloudio/uni-app";
|
||||
import { Session } from "@/utils/storage";
|
||||
import { doLogout } from "@/api";
|
||||
|
||||
const tabIndex = ref(0);
|
||||
function tabChange(type) {
|
||||
|
|
@ -45,41 +38,13 @@ function tabChange(type) {
|
|||
});
|
||||
}
|
||||
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
async function logout() {
|
||||
if (Session.get("userPhone")) {
|
||||
await doLogout({
|
||||
financialAccount: Session.get("userPhone"),
|
||||
});
|
||||
}
|
||||
|
||||
function logout() {
|
||||
Session.clear();
|
||||
|
||||
// 解构路由参数,排除token
|
||||
const { token, ...otherQuery } = route.query;
|
||||
// 若存在token,替换路由清除参数
|
||||
if (token) {
|
||||
router.replace({
|
||||
path: route.path, // 保持当前路径不变
|
||||
query: otherQuery, // 保留其他参数
|
||||
});
|
||||
}
|
||||
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
window.location.reload();
|
||||
}, 500);
|
||||
});
|
||||
window.location.reload();
|
||||
}
|
||||
|
||||
onLoad((e) => {
|
||||
if (e.type) tabIndex.value = e.type;
|
||||
|
||||
console.log("🚀 ~ route.query.token:", route.query.token);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -128,7 +93,7 @@ onLoad((e) => {
|
|||
.line {
|
||||
width: 64px;
|
||||
height: 4px;
|
||||
background: #ff9900;
|
||||
background: #007aff;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,8 +19,6 @@ onMounted(async () => {
|
|||
if (route.query.id) {
|
||||
infoId.value = route.query.id;
|
||||
}
|
||||
// 如果过来的链接里有token说明是财保过来的
|
||||
console.log("🚀 ~ route.query:", route.query);
|
||||
|
||||
if (route.query.type) {
|
||||
switch (route.query.type) {
|
||||
|
|
@ -40,13 +38,11 @@ onMounted(async () => {
|
|||
case "3":
|
||||
layoutName.value = "top10";
|
||||
uni.navigateTo({
|
||||
url: "/pages/realtimeInfo/pc/top10?type=" + route.query.type + "&name=" + route.query.name,
|
||||
});
|
||||
break;
|
||||
case "4":
|
||||
layoutName.value = "rank";
|
||||
uni.navigateTo({
|
||||
url: "/pages/realtimeInfo/pc/rank?type=" + route.query.type,
|
||||
url:
|
||||
"/pages/realtimeInfo/pc/top10?type=" +
|
||||
route.query.type +
|
||||
"&name=" +
|
||||
route.query.name,
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,10 @@
|
|||
<view class="pc_all">
|
||||
<PageTop></PageTop>
|
||||
|
||||
<view class="content-wrap" :style="{ filter: Session.get('token') ? '' : 'blur(5px)' }">
|
||||
<view
|
||||
class="content"
|
||||
:style="{ filter: Session.get('token') ? '' : 'blur(5px)' }"
|
||||
>
|
||||
<view class="top" @click="goBack">
|
||||
<image src="@/assets/zixun/icon_fanhui.png" class="icon_back" />
|
||||
<text>返回列表</text>
|
||||
|
|
@ -19,13 +22,16 @@
|
|||
<text class="time"> {{ infoData?.publishTime }}</text>
|
||||
</view>
|
||||
|
||||
<view class="abstract" v-if="infoData?.summary">
|
||||
<view class="abstract">
|
||||
{{ infoData?.summary }}
|
||||
</view>
|
||||
|
||||
<!-- 两个标签 start -->
|
||||
<view class="r_tag_two">
|
||||
<view style="display: flex" v-if="infoData?.industryLabels && infoData?.industryLabels.length > 0">
|
||||
<view
|
||||
style="display: flex"
|
||||
v-if="infoData?.conceptLabels && infoData?.conceptLabels.length > 0"
|
||||
>
|
||||
<text class="tag_title">行业分类:</text>
|
||||
<view class="r_tags">
|
||||
<view
|
||||
|
|
@ -38,7 +44,10 @@
|
|||
</view>
|
||||
</view>
|
||||
|
||||
<view style="display: flex" v-if="infoData?.conceptLabels && infoData?.conceptLabels.length > 0">
|
||||
<view
|
||||
style="display: flex"
|
||||
v-if="infoData?.industryLabels && infoData?.industryLabels.length > 0"
|
||||
>
|
||||
<text class="tag_title">概念标签:</text>
|
||||
<view class="r_tags">
|
||||
<view
|
||||
|
|
@ -53,7 +62,12 @@
|
|||
</view>
|
||||
<!-- 两个标签 end -->
|
||||
|
||||
<view class="text" v-html="infoData.content" style="white-space: pre-wrap"> </view>
|
||||
<view
|
||||
class="text"
|
||||
v-html="infoData.content"
|
||||
style="white-space: pre-wrap"
|
||||
>
|
||||
</view>
|
||||
<!-- <view class="text">
|
||||
<text >{{ infoData.content }}</text>
|
||||
</view> -->
|
||||
|
|
@ -130,11 +144,6 @@ const handlePopupErrorCallback = () => {
|
|||
<style lang="scss" scoped>
|
||||
@import url("./index.css");
|
||||
|
||||
.content-wrap {
|
||||
background-color: #fff;
|
||||
padding: 0 120px;
|
||||
}
|
||||
|
||||
.page_top {
|
||||
width: 100vw;
|
||||
height: 120rpx;
|
||||
|
|
@ -169,9 +178,7 @@ const handlePopupErrorCallback = () => {
|
|||
}
|
||||
|
||||
.menu_item {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #1a1a1a;
|
||||
|
|
@ -201,9 +208,7 @@ const handlePopupErrorCallback = () => {
|
|||
}
|
||||
|
||||
text {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: normal;
|
||||
font-size: 38rpx;
|
||||
color: #919191;
|
||||
|
|
@ -220,9 +225,7 @@ const handlePopupErrorCallback = () => {
|
|||
}
|
||||
|
||||
.title {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: bold;
|
||||
font-size: 48rpx;
|
||||
color: #1a1a1a;
|
||||
|
|
@ -235,18 +238,14 @@ const handlePopupErrorCallback = () => {
|
|||
margin-top: 10rpx;
|
||||
|
||||
.srouse {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #919191;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #919191;
|
||||
|
|
@ -254,7 +253,7 @@ const handlePopupErrorCallback = () => {
|
|||
}
|
||||
|
||||
.abstract {
|
||||
font-family: "Microsoft YaHei", "PingFangSC", "PingFang SC";
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #666666;
|
||||
|
|
@ -282,9 +281,7 @@ const handlePopupErrorCallback = () => {
|
|||
gap: 20rpx;
|
||||
|
||||
.tag {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 26rpx;
|
||||
color: #ffb100;
|
||||
|
|
@ -300,9 +297,7 @@ const handlePopupErrorCallback = () => {
|
|||
}
|
||||
|
||||
.tag_title {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
|
|
@ -314,10 +309,10 @@ const handlePopupErrorCallback = () => {
|
|||
}
|
||||
|
||||
.text {
|
||||
font-family: "Microsoft YaHei", "PingFangSC", "PingFang SC";
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
color: #1a1a1a;
|
||||
line-height: 28px;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
|
|
|
|||
|
|
@ -2,83 +2,55 @@
|
|||
<view class="pc_all">
|
||||
<PageTop></PageTop>
|
||||
|
||||
<view class="content" :style="{ filter: Session.get('token') ? '' : 'blur(5px)' }">
|
||||
<view
|
||||
class="content"
|
||||
:style="{ filter: Session.get('token') ? '' : 'blur(5px)' }"
|
||||
>
|
||||
<view class="top_title">
|
||||
<text class="pageTitle" v-if="pageType != 4">资讯头条榜</text>
|
||||
<text class="pageTitle" v-if="pageType == 4">编辑<text class="strong">精选</text></text>
|
||||
<image src="@/assets/zixun/top20_icon.png" class="title_icon" v-if="pageType != 4"></image>
|
||||
<!-- <u-input v-if="pageType == 4" placeholder="请输入搜索内容" v-model="form.keyword" prefixIcon="search"
|
||||
@keyup.enter="getNewsList" @blur="getNewsList" prefixIconStyle="font-size: 22px;color: #909399"
|
||||
style="margin-left: 40rpx; margin-top: 5rpx; border-radius: 20rpx">
|
||||
<template #suffix>
|
||||
<u-button @tap="getNewsList" text="搜索" size="mini" class="search_btn"></u-button>
|
||||
</template>
|
||||
</u-input> -->
|
||||
|
||||
<div class="r_input" v-if="pageType == 4">
|
||||
<input
|
||||
v-model="form.keyword"
|
||||
placeholder="请输入搜索内容"
|
||||
class="input"
|
||||
placeholder-style="color: #ccc"
|
||||
@keyup.enter="getNewsList"
|
||||
@clear="getNewsList"
|
||||
@blur="getNewsList"
|
||||
/>
|
||||
<div class="input_button" @click="getNewsList">搜索</div>
|
||||
</div>
|
||||
<text class="pageTitle">资讯头条榜</text>
|
||||
<image src="@/assets/zixun/top20_icon.png" class="title_icon"></image>
|
||||
</view>
|
||||
|
||||
<view class="line"></view>
|
||||
|
||||
<view class="r_list">
|
||||
<view class="list_item" v-for="(item, index) in newsList" :key="index">
|
||||
<view class="r_list_item_num" v-if="pageType != 4">
|
||||
<view class="list_item_num num1" v-if="index < 3 && index == 0">{{ index + 1 }}</view>
|
||||
<view class="list_item_num num2" v-else-if="index < 3 && index == 1">{{ index + 1 }}</view>
|
||||
<view class="list_item_num num3" v-else-if="index < 3 && index == 2">{{ index + 1 }}</view>
|
||||
<view class="r_list_item_num">
|
||||
<view class="list_item_num num1" v-if="index < 3 && index == 0">{{
|
||||
index + 1
|
||||
}}</view>
|
||||
<view
|
||||
class="list_item_num num2"
|
||||
v-else-if="index < 3 && index == 1"
|
||||
>{{ index + 1 }}</view
|
||||
>
|
||||
<view
|
||||
class="list_item_num num3"
|
||||
v-else-if="index < 3 && index == 2"
|
||||
>{{ index + 1 }}</view
|
||||
>
|
||||
<view class="list_item_num nol_num" v-else>{{ index + 1 }}</view>
|
||||
</view>
|
||||
|
||||
<view class="list_item_content">
|
||||
<text class="item_title" @click="goDetail(item)" v-html="item.title"></text>
|
||||
<text class="item_summary" v-if="pageType != 4">{{ item.summary }}</text>
|
||||
<text class="item_summary" v-if="pageType == 4" v-html="item.summary"></text>
|
||||
<text class="item_title" @click="goDetail(item)">{{
|
||||
item.title
|
||||
}}</text>
|
||||
<text class="item_summary">{{ item.summary }}</text>
|
||||
|
||||
<view class="item_bottom">
|
||||
<view>
|
||||
<text class="time">{{ item.source }}</text>
|
||||
<text class="time" style="margin-left: 30rpx" v-if="pageType != 4">{{
|
||||
<text class="time" style="margin-left: 30rpx">{{
|
||||
dayjs(item.publish_time).format("YYYY-MM-DD HH:MM:ss")
|
||||
}}</text>
|
||||
<text class="time" style="margin-left: 30rpx" v-if="pageType == 4">{{ formatTime(item.time) }}</text>
|
||||
</view>
|
||||
|
||||
<text class="score" v-if="pageType != 4">{{ item.news_score }}</text>
|
||||
<text class="score">{{ item.news_score }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<div
|
||||
class="pagination"
|
||||
style="width: 100%; display: flex; justify-content: flex-end"
|
||||
v-if="pageType == 4 && newsList && newsList.length > 0"
|
||||
>
|
||||
<el-config-provider :locale="zhCn">
|
||||
<el-pagination
|
||||
popper-class="popper-style"
|
||||
background
|
||||
v-model:current-page="currentPage"
|
||||
:page-size="form.size"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="form.total"
|
||||
@current-change="currentChange"
|
||||
@size-change="sizeChange"
|
||||
>
|
||||
</el-pagination>
|
||||
</el-config-provider>
|
||||
</div>
|
||||
</view>
|
||||
<LoginPopup
|
||||
:show="LoginShow"
|
||||
|
|
@ -93,134 +65,30 @@
|
|||
<script setup>
|
||||
import { ref, onMounted, onUnmounted, reactive } from "vue";
|
||||
import PageTop from "@/pages/realtimeInfo/pc/components/PageTop.vue";
|
||||
import { getTopNewsDay } from "@/api/newsInfo";
|
||||
import { getTopNews } from "@/api/newsInfo";
|
||||
import dayjs from "dayjs/esm/index";
|
||||
import LoginPopup from "@/components/loginPopup/index.vue";
|
||||
import { Session } from "@/utils/storage";
|
||||
import { editTopNews } from "@/api/index";
|
||||
import { sendToken } from "@/api/index";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import zhCn from 'element-plus/es/locale/lang/zh-cn'
|
||||
|
||||
const pageSizes = ref([10, 20, 30, 40]);
|
||||
const form = reactive({
|
||||
keyword: "",
|
||||
page: 1,
|
||||
size: 10,
|
||||
total: 10,
|
||||
});
|
||||
const currentPage = ref(form.page);
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
const pageType = ref(route.query.type);
|
||||
const newsList = ref([]);
|
||||
|
||||
function formatTime(timestamp) {
|
||||
const date = new Date(Number(timestamp).toString().length === 10 ? timestamp * 1000 : timestamp);
|
||||
return (
|
||||
[
|
||||
date.getFullYear(),
|
||||
(date.getMonth() + 1).toString().padStart(2, "0"),
|
||||
date.getDate().toString().padStart(2, "0"),
|
||||
].join("-") +
|
||||
" " +
|
||||
[
|
||||
date.getHours().toString().padStart(2, "0"),
|
||||
date.getMinutes().toString().padStart(2, "0"),
|
||||
date.getSeconds().toString().padStart(2, "0"),
|
||||
].join(":")
|
||||
);
|
||||
}
|
||||
|
||||
// 概念标签贴标
|
||||
async function getNewsList() {
|
||||
if (pageType.value == 4) {
|
||||
// 编辑精选
|
||||
let { code, data } = await editTopNews({
|
||||
...form,
|
||||
});
|
||||
if (code == 200) {
|
||||
newsList.value = data.list;
|
||||
form.total = data.total;
|
||||
data.list.forEach((item) => {
|
||||
item.summary = item.summary.replace(form.keyword, "<span style='color: #007aff'>" + form.keyword + "</span>");
|
||||
item.title = item.title.replace(form.keyword, "<span style='color: #007aff'>" + form.keyword + "</span>");
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// 概念标签贴标
|
||||
newsList.value = await getTopNewsDay({});
|
||||
}
|
||||
newsList.value = await getTopNews({});
|
||||
}
|
||||
|
||||
function goDetail(item) {
|
||||
let id = null;
|
||||
if (pageType.value != 4) {
|
||||
id = item.news_id;
|
||||
} else {
|
||||
id = item.id;
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: "/pages/realtimeInfo/pc/indexPC?id=" + id + "&type=" + pageType.value,
|
||||
url: "/pages/realtimeInfo/pc/indexPC?id=" + item.news_id + "&type=1",
|
||||
});
|
||||
}
|
||||
|
||||
function currentChange(page) {
|
||||
form.page = page;
|
||||
getNewsList();
|
||||
}
|
||||
|
||||
onMounted(async (e) => {
|
||||
console.log("🚀 ~ route.query:", route.query);
|
||||
console.log(`🚀 ~ Session.get("token"):`, Session.get("token"));
|
||||
if (Session.get("token") == "undefined") {
|
||||
Session.remove("token");
|
||||
}
|
||||
if (route.query?.token && (!Session.get("token") || Session.get("token") == "undefined")) {
|
||||
uni.showLoading({
|
||||
title: "加载中",
|
||||
mask: true,
|
||||
});
|
||||
sendToken({
|
||||
token: route.query.token,
|
||||
}).then((res) => {
|
||||
uni.hideLoading();
|
||||
if (res.code == 200) {
|
||||
Session.set("token", res.data.token);
|
||||
Session.set("userPhone", res.data.phone);
|
||||
|
||||
// 解构路由参数,排除token
|
||||
const { token, ...otherQuery } = route.query;
|
||||
// 若存在token,替换路由清除参数
|
||||
if (token) {
|
||||
router.replace({
|
||||
path: route.path, // 保持当前路径不变
|
||||
query: otherQuery, // 保留其他参数
|
||||
});
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
window.location.reload();
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (!Session.get("token") || Session.get("token") == "undefined") {
|
||||
LoginShow.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
// 解构路由参数,排除token
|
||||
const { token, ...otherQuery } = route.query;
|
||||
// 若存在token,替换路由清除参数
|
||||
if (token) {
|
||||
router.replace({
|
||||
path: route.path, // 保持当前路径不变
|
||||
query: otherQuery, // 保留其他参数
|
||||
});
|
||||
}
|
||||
getNewsList();
|
||||
|
||||
if (!Session.get("token")) {
|
||||
LoginShow.value = true;
|
||||
}
|
||||
});
|
||||
|
||||
const LoginShow = ref(false);
|
||||
|
|
@ -248,12 +116,6 @@ const handlePopupErrorCallback = () => {
|
|||
<style scoped lang="scss">
|
||||
@import url("./index.css");
|
||||
|
||||
.pc_all{
|
||||
|
||||
--el-color-primary: #ff9900;
|
||||
|
||||
}
|
||||
|
||||
.top_title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
|
@ -263,10 +125,6 @@ const handlePopupErrorCallback = () => {
|
|||
font-size: 26px;
|
||||
color: #1a1a1a;
|
||||
font-weight: bold;
|
||||
|
||||
.strong {
|
||||
color: #ff9900;
|
||||
}
|
||||
}
|
||||
|
||||
.title_icon {
|
||||
|
|
@ -312,9 +170,7 @@ const handlePopupErrorCallback = () => {
|
|||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
color: #ffffff;
|
||||
|
|
@ -330,16 +186,13 @@ const handlePopupErrorCallback = () => {
|
|||
background: linear-gradient(169deg, #a9c3e3 0%, #92b2e0 100%);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.num3 {
|
||||
background: linear-gradient(169deg, #f2996e 0%, #f77741 100%);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.nol_num {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 20px;
|
||||
color: #93a2b3;
|
||||
|
|
@ -356,13 +209,10 @@ const handlePopupErrorCallback = () => {
|
|||
}
|
||||
|
||||
.item_title:hover {
|
||||
color: #ff9900;
|
||||
color: #057cff;
|
||||
}
|
||||
|
||||
.item_title {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
color: #1a1a1a;
|
||||
|
|
@ -370,28 +220,11 @@ const handlePopupErrorCallback = () => {
|
|||
}
|
||||
|
||||
.item_summary {
|
||||
font-family: "Microsoft YaHei", "PingFangSC", "PingFang SC";
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: normal;
|
||||
font-size: 16px;
|
||||
color: #333333;
|
||||
margin-top: 20rpx;
|
||||
|
||||
/* 必须:限制内容不溢出容器 */
|
||||
overflow: hidden;
|
||||
/* 必须:超出部分显示省略号 */
|
||||
text-overflow: ellipsis;
|
||||
/* 必须:将元素设置为webkit弹性盒模型(用于控制行数) */
|
||||
display: -webkit-box;
|
||||
/* 关键:限制显示的行数(这里设为2行) */
|
||||
-webkit-line-clamp: 2;
|
||||
/* 必须:设置弹性盒的排列方向为垂直(让文本换行) */
|
||||
-webkit-box-orient: vertical;
|
||||
|
||||
/* 可选:调整行高和容器高度,确保刚好容纳2行文本 */
|
||||
line-height: 1.5;
|
||||
/* 行高 */
|
||||
max-height: 3em;
|
||||
/* 2行总高度 = 行高 × 2(1.5×2=3) */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -400,11 +233,8 @@ const handlePopupErrorCallback = () => {
|
|||
justify-content: space-between;
|
||||
margin-top: 30rpx;
|
||||
margin-bottom: 10rpx;
|
||||
|
||||
.time {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
color: #919191;
|
||||
|
|
@ -414,9 +244,7 @@ const handlePopupErrorCallback = () => {
|
|||
}
|
||||
|
||||
.score {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-family: PingFangSC, PingFang SC;
|
||||
font-weight: 600;
|
||||
font-size: 18px;
|
||||
color: #ffa800;
|
||||
|
|
@ -425,91 +253,4 @@ const handlePopupErrorCallback = () => {
|
|||
font-style: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.search_btn {
|
||||
border: none;
|
||||
display: flex;
|
||||
width: 56px;
|
||||
height: 44px;
|
||||
padding: 8px 15px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex-shrink: 0;
|
||||
border-radius: 8px;
|
||||
background: #0062d9;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.input {
|
||||
border: none;
|
||||
flex: 1;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.input_button {
|
||||
display: flex;
|
||||
width: 140px;
|
||||
height: 100%;
|
||||
// padding: 8px 15px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex-shrink: 0;
|
||||
border-radius: 0 10px 10px 0;
|
||||
background: #ff9900;
|
||||
|
||||
color: white;
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
color: #ffffff;
|
||||
line-height: 25px;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.r_input {
|
||||
background-color: white;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #e3e3e3;
|
||||
flex: 1;
|
||||
height: 52px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 30px;
|
||||
margin-top: 3px;
|
||||
|
||||
:deep(.el-input__inner::placeholder) {
|
||||
color: #ccced3;
|
||||
font-family: "PingFang SC";
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
:deep(.el-input__wrapper) {
|
||||
box-shadow: 0 0 0 #fff;
|
||||
}
|
||||
}
|
||||
.pagination {
|
||||
margin-top: 24px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
// :deep(.el-pager li){
|
||||
// border: 1px solid #ccc;
|
||||
// background: transparent;
|
||||
// }
|
||||
}
|
||||
|
||||
:deep(.el-select-dropdown__item.is-selected) {
|
||||
color: #ff9900
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,12 +1,19 @@
|
|||
<template>
|
||||
<view class="all">
|
||||
<PageHeaderView :title="type == 0 ? '热门行业池Top10' : '风口概念池Top10'"></PageHeaderView>
|
||||
<PageHeaderView
|
||||
:title="type == 0 ? '热门行业池Top10' : '风口概念池Top10'"
|
||||
></PageHeaderView>
|
||||
|
||||
<!-- 类目标签 start -->
|
||||
<view class="page_content">
|
||||
<view class="tag_list">
|
||||
<view :class="['tag_item', clickTagIndex == index ? tagClickedClass : '']" class="tag_item"
|
||||
v-for="(item, index) in tagList" :key="index" @click="clickTag(index)">
|
||||
<view
|
||||
:class="['tag_item', clickTagIndex == index ? tagClickedClass : '']"
|
||||
class="tag_item"
|
||||
v-for="(item, index) in tagList"
|
||||
:key="index"
|
||||
@click="clickTag(index)"
|
||||
>
|
||||
{{ item.content }}
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -15,7 +22,12 @@
|
|||
|
||||
<!-- 列表 start -->
|
||||
<view class="list">
|
||||
<view v-for="(item, index) in list" :key="index" class="news-item" @click="goDetail(item)">
|
||||
<view
|
||||
v-for="(item, index) in list"
|
||||
:key="index"
|
||||
class="news-item"
|
||||
@click="goDetail(item)"
|
||||
>
|
||||
<view class="news-content">
|
||||
<text class="news-title">{{ item.title }}</text>
|
||||
<text class="news-desc">{{ item.summary }}</text>
|
||||
|
|
@ -153,12 +165,6 @@ onMounted(async () => {
|
|||
}
|
||||
|
||||
getListByTagFn();
|
||||
|
||||
const { aplus_queue } = window;
|
||||
aplus_queue.push({
|
||||
action: 'aplus.sendPV',
|
||||
arguments: [{ is_auto: false }] // 此处上报的数据暂时在后台没有展示
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
@ -248,16 +254,11 @@ onMounted(async () => {
|
|||
text-align: left;
|
||||
font-style: normal;
|
||||
|
||||
display: -webkit-box;
|
||||
/* 设置为WebKit内核的弹性盒子模型 */
|
||||
-webkit-box-orient: vertical;
|
||||
/* 垂直排列 */
|
||||
-webkit-line-clamp: 2;
|
||||
/* 限制显示三行 */
|
||||
overflow: hidden;
|
||||
/* 隐藏超出范围的内容 */
|
||||
text-overflow: ellipsis;
|
||||
/* 使用省略号 */
|
||||
display: -webkit-box; /* 设置为WebKit内核的弹性盒子模型 */
|
||||
-webkit-box-orient: vertical; /* 垂直排列 */
|
||||
-webkit-line-clamp: 2; /* 限制显示三行 */
|
||||
overflow: hidden; /* 隐藏超出范围的内容 */
|
||||
text-overflow: ellipsis; /* 使用省略号 */
|
||||
}
|
||||
|
||||
.news-meta {
|
||||
|
|
|
|||
|
|
@ -1,66 +1,54 @@
|
|||
<template>
|
||||
<view class="sreachcss">
|
||||
<!-- 导航栏 start -->
|
||||
<!-- <view
|
||||
class="custom-bav-bar"
|
||||
:style="{
|
||||
position: 'sticky',
|
||||
top: getNavHeight() + 'px',
|
||||
left: 0,
|
||||
background: '#fff',
|
||||
zIndex: '9999',
|
||||
}">
|
||||
<view class="left">
|
||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_left.png" class="back_icon" @click="handleBack" />
|
||||
</view>
|
||||
<view class="center">
|
||||
<image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/images/detail_logo.png" class="logo_icon" />
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 搜索 start -->
|
||||
<view class="sreach">
|
||||
<!-- <image src="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/static/icon_left.png" class="back_icon"
|
||||
@click="handleBack" /> -->
|
||||
<view
|
||||
style="height: 100%; display: flex; align-items: center"
|
||||
@click="goBack"
|
||||
>
|
||||
<u-icon name="arrow-left" color="#333" size="20" bold></u-icon>
|
||||
</view>
|
||||
|
||||
<view style="width: 100%; padding: 0 10rpx">
|
||||
<view style="width: 60vw; margin-left: 50rpx">
|
||||
<u-input
|
||||
v-model="keyWord"
|
||||
@change="handleChange"
|
||||
confirm-type="search"
|
||||
@confirm="getData()"
|
||||
prefixIcon="search"
|
||||
style="flex: 1"
|
||||
placeholder="请输入关键字"
|
||||
placeholderStyle="color: #ccc"
|
||||
clearable
|
||||
placeholder="搜索快讯"
|
||||
class="sreach_input"
|
||||
:border="false"
|
||||
/>
|
||||
</view>
|
||||
<!-- <text class="serach_btn" @click="getData()">搜索</text> -->
|
||||
</view>
|
||||
<!-- 搜索 end -->
|
||||
|
||||
<List :data="screenList" @onClick="handleSwiperJump" v-if="screenList.length !== 0" />
|
||||
<List
|
||||
:data="screenList"
|
||||
@onClick="handleSwiperJump"
|
||||
v-if="screenList.length !== 0"
|
||||
/>
|
||||
<!-- 列表 end -->
|
||||
<!-- 加载更多的按钮 -->
|
||||
<!-- <view class="onLoad-btn" @click="onload" v-if="finish === false && inputValue">加载更多</view> -->
|
||||
<view
|
||||
class="onLoad-btn"
|
||||
@click="onload"
|
||||
v-if="finish === false && inputValue"
|
||||
>加载更多</view
|
||||
>
|
||||
|
||||
<view v-if="screenList.length === 0" style="margin-top: 20vh">
|
||||
<u-empty
|
||||
text="无搜索结果"
|
||||
width="157"
|
||||
height="100"
|
||||
icon="https://cankao.obs.cn-east-3.myhuaweicloud.com/mini/newmini/nosearch_icon%E5%A4%87%E4%BB%BD%402x.png"
|
||||
></u-empty>
|
||||
</view>
|
||||
<u-empty
|
||||
v-if="screenList.length === 0"
|
||||
text="搜索结果为空"
|
||||
mode="search"
|
||||
style="margin-top: 20vh"
|
||||
></u-empty>
|
||||
|
||||
<!-- <view v-if="finish && screenList.length > 0" class="noMore">
|
||||
<view v-if="finish && screenList.length > 0" class="noMore">
|
||||
<view class="line"></view>
|
||||
<view class="text">暂无更多结果</view>
|
||||
<view class="line"></view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<!-- 订阅 支付 -->
|
||||
<Pay :show="payShow" @onClick="handleClose" @handleSub="handleSub" />
|
||||
|
|
@ -78,7 +66,7 @@
|
|||
import { ref, watch } from "vue";
|
||||
import { Session } from "@/utils/storage";
|
||||
import { onShow, onLoad } from "@dcloudio/uni-app";
|
||||
import List from "@/components/articleList/index2.vue";
|
||||
import List from "@/components/articleList/index.vue";
|
||||
import { searchNews, unlockColumn } from "@/api";
|
||||
import { extractText, formatTimestamp } from "@/utils/util";
|
||||
import LoginPopup from "@/components/loginPopup/index.vue";
|
||||
|
|
@ -94,13 +82,6 @@ function goBack() {
|
|||
uni.navigateBack();
|
||||
}
|
||||
|
||||
// 导航栏路由返回
|
||||
const handleBack = () => {
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
});
|
||||
};
|
||||
|
||||
// login 弹框是否显示
|
||||
const LoginShow = ref(false);
|
||||
|
||||
|
|
@ -118,7 +99,6 @@ const handleSub = async () => {
|
|||
if (item.type === itemType) {
|
||||
item.needpay = false;
|
||||
}
|
||||
|
||||
return item;
|
||||
});
|
||||
articleList.value = articleResult;
|
||||
|
|
@ -160,19 +140,14 @@ const handleShowPay = (type) => {
|
|||
// 点击轮播图进入详情
|
||||
const handleSwiperJump = (item: any) => {
|
||||
console.log("item ===>", item);
|
||||
if (Session.get("token")) {
|
||||
if (item.needpay) {
|
||||
// 需要先弹出订阅的弹框
|
||||
handleShowPay(item.type);
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: `/pages/detail/indexNewsInfo?id=${item.id}&type=${item.type}`,
|
||||
url: `/pages/detail/index?id=${item.id}&type=${item.type}`,
|
||||
});
|
||||
}
|
||||
// if (item.needpay) {
|
||||
// // 需要先弹出订阅的弹框
|
||||
// handleShowPay(item.type);
|
||||
// } else {
|
||||
// uni.navigateTo({
|
||||
// url: `/pages/detail/indexNewsInfo?id=${item.id}&type=${item.type}`,
|
||||
// });
|
||||
// }
|
||||
};
|
||||
|
||||
const handleChange = (val: string) => {
|
||||
|
|
@ -215,17 +190,13 @@ const getData = async () => {
|
|||
item.time = formatTimestamp(item.time);
|
||||
item.MarkInRedTitle = item.title.replace(
|
||||
new RegExp(inputValue.value, "gi"),
|
||||
`<text style="color: #E7303F">$&</text>`,
|
||||
`<text style="color: #E7303F">$&</text>`
|
||||
);
|
||||
|
||||
item.title = item.title.replace(keyWord.value, '<span style="color: #ff8125;">' + keyWord.value + "</span>");
|
||||
console.log("🚀 ~ getData ~ item.title :", item.title);
|
||||
|
||||
item.MarkInRedContent =
|
||||
item.contentText &&
|
||||
extractText(item.contentText, inputValue.value).replace(
|
||||
new RegExp(inputValue.value, "gi"),
|
||||
`<text style="color: #E7303F">$&</text>`,
|
||||
`<text style="color: #E7303F">$&</text>`
|
||||
);
|
||||
return item;
|
||||
});
|
||||
|
|
@ -252,13 +223,13 @@ onShow(() => {
|
|||
.sreachcss {
|
||||
min-height: 100vh;
|
||||
background-color: #ffffff;
|
||||
// padding: 0 30rpx;
|
||||
padding: 0 30rpx;
|
||||
|
||||
.sreach {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// height: 60rpx;
|
||||
// gap: 20rpx;
|
||||
gap: 20rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 12rpx 0;
|
||||
position: sticky;
|
||||
|
|
@ -268,22 +239,11 @@ onShow(() => {
|
|||
}
|
||||
|
||||
.sreach_input {
|
||||
// width: 100%;
|
||||
background: rgba(118, 118, 128, 0.12);
|
||||
width: 100%;
|
||||
height: 70%;
|
||||
padding: 0 20rpx;
|
||||
border-radius: 20rpx;
|
||||
color: #333333;
|
||||
// margin-left: 10rpx;
|
||||
border: 1px solid rgba(0, 0, 0, 0);
|
||||
background-color: #f7f8f9;
|
||||
|
||||
:deep(.u-icon__icon){
|
||||
color: #999 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.sreach_input:hover {
|
||||
border: 1px solid #ff8a00;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.tabsListContainer {
|
||||
|
|
@ -300,13 +260,11 @@ onShow(() => {
|
|||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
padding: 21rpx 0;
|
||||
|
||||
.line {
|
||||
width: 69rpx;
|
||||
height: 3rpx;
|
||||
background-color: #b9b9b9;
|
||||
}
|
||||
|
||||
.text {
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
|
@ -324,54 +282,4 @@ onShow(() => {
|
|||
color: #828b92;
|
||||
}
|
||||
}
|
||||
|
||||
.back_icon {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.custom-bav-bar {
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
|
||||
.logo_icon {
|
||||
width: 168rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 6rpx;
|
||||
}
|
||||
|
||||
.left {
|
||||
position: absolute;
|
||||
top: 24rpx;
|
||||
left: 40rpx;
|
||||
}
|
||||
|
||||
.center {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
// font-size: 28rpx;
|
||||
font-size: var(--h2-font-size);
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
.serach_btn {
|
||||
font-family:
|
||||
PingFangSC,
|
||||
PingFang SC;
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #d13e3c;
|
||||
line-height: 45rpx;
|
||||
text-align: right;
|
||||
font-style: normal;
|
||||
margin-left: 50rpx;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -54,14 +54,14 @@ export const useShareStore = defineStore("share", {
|
|||
params: { url },
|
||||
responseType: "json",
|
||||
}).then((res: any) => {
|
||||
const data: IWxConfig = res?.data?.data;
|
||||
const data: IWxConfig = res.data.data;
|
||||
// console.log("🚀 ~ getWeChatSdkData ~ data:", data);
|
||||
wx.config({
|
||||
debug: false,
|
||||
appId: data?.appId,
|
||||
timestamp: data?.timestamp,
|
||||
nonceStr: data?.nonceStr,
|
||||
signature: data?.signature,
|
||||
appId: data.appId,
|
||||
timestamp: data.timestamp,
|
||||
nonceStr: data.nonceStr,
|
||||
signature: data.signature,
|
||||
jsApiList: [
|
||||
"updateAppMessageShareData",
|
||||
"updateTimelineShareData",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import type { AxiosResponse } from "axios";
|
|||
// import { ElMessage, ElMessageBox, ElNotification } from 'element-plus';
|
||||
import { Session } from "@/utils/storage";
|
||||
import qs from "qs";
|
||||
import { doLogout } from "@/api";
|
||||
|
||||
// 配置新建一个 axios 实例
|
||||
const service = axios.create({
|
||||
|
|
@ -53,13 +52,9 @@ service.interceptors.response.use(
|
|||
|
||||
// `token` 过期或者账号已在别处登录
|
||||
if (res.code === 401 || res.code === 4001) {
|
||||
doLogout({
|
||||
financialAccount: Session.get("userPhone"),
|
||||
});
|
||||
Session.clear(); // 清除浏览器全部临时缓存
|
||||
window.location.reload();
|
||||
// window.location.href = "/"; // 去登录页
|
||||
// console.log("你已被登出,请重新登录");
|
||||
window.location.href = "/"; // 去登录页
|
||||
console.log("你已被登出,请重新登录");
|
||||
// ElMessageBox.alert('你已被登出,请重新登录', '提示', {})
|
||||
// .then(() => {})
|
||||
// .catch(() => {});
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import type { AxiosResponse } from "axios";
|
|||
// import { ElMessage, ElMessageBox, ElNotification } from 'element-plus';
|
||||
import { Session } from "@/utils/storage";
|
||||
import qs from "qs";
|
||||
import { doLogout } from "@/api";
|
||||
|
||||
// 配置新建一个 axios 实例
|
||||
const service = axios.create({
|
||||
|
|
@ -53,9 +52,6 @@ service.interceptors.response.use(
|
|||
|
||||
// `token` 过期或者账号已在别处登录
|
||||
if (res.status === 401 || res.status === 4001) {
|
||||
doLogout({
|
||||
financialAccount: Session.get("userPhone"),
|
||||
});
|
||||
Session.clear(); // 清除浏览器全部临时缓存
|
||||
window.location.href = "/"; // 去登录页
|
||||
console.log("你已被登出,请重新登录");
|
||||
|
|
|
|||
|
|
@ -4,16 +4,15 @@ import { resolve } from "path";
|
|||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
base: "/nbyhhaiwai/",
|
||||
plugins: [uni()],
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
additionalData: `
|
||||
@import "@/assets/style/variable.scss";
|
||||
`,
|
||||
},
|
||||
},
|
||||
`
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
server: {
|
||||
|
|
|
|||