8.28 修改事件详情相关概念模块样式,增加股票详情信息来源展示
3
App.vue
@@ -21,6 +21,9 @@
|
||||
},
|
||||
onHide: function() {
|
||||
console.log('App Hide')
|
||||
},
|
||||
globalData:{
|
||||
mobileReg:/^1[3456789][0-9]{9}$/
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
1
components/ua-markdown/lib/highlight/atom-one-dark.css
Normal file
@@ -0,0 +1 @@
|
||||
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#c678dd}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#98c379}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#d19a66}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}
|
||||
1
components/ua-markdown/lib/highlight/atom-one-light.css
Normal file
@@ -0,0 +1 @@
|
||||
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#383a42;background:#fafafa}.hljs-comment,.hljs-quote{color:#a0a1a7;font-style:italic}.hljs-doctag,.hljs-formula,.hljs-keyword{color:#a626a4}.hljs-deletion,.hljs-name,.hljs-section,.hljs-selector-tag,.hljs-subst{color:#e45649}.hljs-literal{color:#0184bb}.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#50a14f}.hljs-attr,.hljs-number,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-pseudo,.hljs-template-variable,.hljs-type,.hljs-variable{color:#986801}.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-symbol,.hljs-title{color:#4078f2}.hljs-built_in,.hljs-class .hljs-title,.hljs-title.class_{color:#c18401}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}
|
||||
10
components/ua-markdown/lib/highlight/github-dark.min.css
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
|
||||
Theme: GitHub Dark
|
||||
Description: Dark theme as seen on github.com
|
||||
Author: github.com
|
||||
Maintainer: @Hirse
|
||||
Updated: 2021-05-15
|
||||
|
||||
Outdated base version: https://github.com/primer/github-syntax-dark
|
||||
Current colors taken from GitHub's CSS
|
||||
*/.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#79c0ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-code,.hljs-comment,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c}
|
||||
5254
components/ua-markdown/lib/highlight/uni-highlight.min.js
vendored
Normal file
352
components/ua-markdown/lib/html-parser.js
Normal file
@@ -0,0 +1,352 @@
|
||||
/*
|
||||
* HTML5 Parser By Sam Blowes
|
||||
*
|
||||
* Designed for HTML5 documents
|
||||
*
|
||||
* Original code by John Resig (ejohn.org)
|
||||
* http://ejohn.org/blog/pure-javascript-html-parser/
|
||||
* Original code by Erik Arvidsson, Mozilla Public License
|
||||
* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
|
||||
*
|
||||
* ----------------------------------------------------------------------------
|
||||
* License
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* This code is triple licensed using Apache Software License 2.0,
|
||||
* Mozilla Public License or GNU Public License
|
||||
*
|
||||
* ////////////////////////////////////////////////////////////////////////////
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
* use this file except in compliance with the License. You may obtain a copy
|
||||
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* ////////////////////////////////////////////////////////////////////////////
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
||||
* License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
*
|
||||
* The Original Code is Simple HTML Parser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Erik Arvidsson.
|
||||
* Portions created by Erik Arvidssson are Copyright (C) 2004. All Rights
|
||||
* Reserved.
|
||||
*
|
||||
* ////////////////////////////////////////////////////////////////////////////
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* ----------------------------------------------------------------------------
|
||||
* Usage
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* // Use like so:
|
||||
* HTMLParser(htmlString, {
|
||||
* start: function(tag, attrs, unary) {},
|
||||
* end: function(tag) {},
|
||||
* chars: function(text) {},
|
||||
* comment: function(text) {}
|
||||
* });
|
||||
*
|
||||
* // or to get an XML string:
|
||||
* HTMLtoXML(htmlString);
|
||||
*
|
||||
* // or to get an XML DOM Document
|
||||
* HTMLtoDOM(htmlString);
|
||||
*
|
||||
* // or to inject into an existing document/DOM node
|
||||
* HTMLtoDOM(htmlString, document);
|
||||
* HTMLtoDOM(htmlString, document.body);
|
||||
*
|
||||
*/
|
||||
// Regular Expressions for parsing tags and attributes
|
||||
var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/;
|
||||
var endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/;
|
||||
var attr = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g; // Empty Elements - HTML 5
|
||||
|
||||
var empty = makeMap('area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr'); // Block Elements - HTML 5
|
||||
// fixed by xxx 将 ins 标签从块级名单中移除
|
||||
|
||||
var block = makeMap('a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video'); // Inline Elements - HTML 5
|
||||
|
||||
var inline = makeMap('abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var'); // Elements that you can, intentionally, leave open
|
||||
// (and which close themselves)
|
||||
|
||||
var closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr'); // Attributes that have their values filled in disabled="disabled"
|
||||
|
||||
var fillAttrs = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected'); // Special Elements (can contain anything)
|
||||
|
||||
var special = makeMap('script,style');
|
||||
function HTMLParser(html, handler) {
|
||||
var index;
|
||||
var chars;
|
||||
var match;
|
||||
var stack = [];
|
||||
var last = html;
|
||||
|
||||
stack.last = function () {
|
||||
return this[this.length - 1];
|
||||
};
|
||||
|
||||
while (html) {
|
||||
chars = true; // Make sure we're not in a script or style element
|
||||
|
||||
if (!stack.last() || !special[stack.last()]) {
|
||||
// Comment
|
||||
if (html.indexOf('<!--') == 0) {
|
||||
index = html.indexOf('-->');
|
||||
|
||||
if (index >= 0) {
|
||||
if (handler.comment) {
|
||||
handler.comment(html.substring(4, index));
|
||||
}
|
||||
|
||||
html = html.substring(index + 3);
|
||||
chars = false;
|
||||
} // end tag
|
||||
|
||||
} else if (html.indexOf('</') == 0) {
|
||||
match = html.match(endTag);
|
||||
|
||||
if (match) {
|
||||
html = html.substring(match[0].length);
|
||||
match[0].replace(endTag, parseEndTag);
|
||||
chars = false;
|
||||
} // start tag
|
||||
|
||||
} else if (html.indexOf('<') == 0) {
|
||||
match = html.match(startTag);
|
||||
|
||||
if (match) {
|
||||
html = html.substring(match[0].length);
|
||||
match[0].replace(startTag, parseStartTag);
|
||||
chars = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (chars) {
|
||||
index = html.indexOf('<');
|
||||
var text = index < 0 ? html : html.substring(0, index);
|
||||
html = index < 0 ? '' : html.substring(index);
|
||||
|
||||
if (handler.chars) {
|
||||
handler.chars(text);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
html = html.replace(new RegExp('([\\s\\S]*?)<\/' + stack.last() + '[^>]*>'), function (all, text) {
|
||||
text = text.replace(/<!--([\s\S]*?)-->|<!\[CDATA\[([\s\S]*?)]]>/g, '$1$2');
|
||||
|
||||
if (handler.chars) {
|
||||
handler.chars(text);
|
||||
}
|
||||
|
||||
return '';
|
||||
});
|
||||
parseEndTag('', stack.last());
|
||||
}
|
||||
|
||||
if (html == last) {
|
||||
throw 'Parse Error: ' + html;
|
||||
}
|
||||
|
||||
last = html;
|
||||
} // Clean up any remaining tags
|
||||
|
||||
|
||||
parseEndTag();
|
||||
|
||||
function parseStartTag(tag, tagName, rest, unary) {
|
||||
tagName = tagName.toLowerCase();
|
||||
|
||||
if (block[tagName]) {
|
||||
while (stack.last() && inline[stack.last()]) {
|
||||
parseEndTag('', stack.last());
|
||||
}
|
||||
}
|
||||
|
||||
if (closeSelf[tagName] && stack.last() == tagName) {
|
||||
parseEndTag('', tagName);
|
||||
}
|
||||
|
||||
unary = empty[tagName] || !!unary;
|
||||
|
||||
if (!unary) {
|
||||
stack.push(tagName);
|
||||
}
|
||||
|
||||
if (handler.start) {
|
||||
var attrs = [];
|
||||
rest.replace(attr, function (match, name) {
|
||||
var value = arguments[2] ? arguments[2] : arguments[3] ? arguments[3] : arguments[4] ? arguments[4] : fillAttrs[name] ? name : '';
|
||||
attrs.push({
|
||||
name: name,
|
||||
value: value,
|
||||
escaped: value.replace(/(^|[^\\])"/g, '$1\\\"') // "
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
if (handler.start) {
|
||||
handler.start(tagName, attrs, unary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function parseEndTag(tag, tagName) {
|
||||
// If no tag name is provided, clean shop
|
||||
if (!tagName) {
|
||||
var pos = 0;
|
||||
} // Find the closest opened tag of the same type
|
||||
else {
|
||||
for (var pos = stack.length - 1; pos >= 0; pos--) {
|
||||
if (stack[pos] == tagName) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pos >= 0) {
|
||||
// Close all the open elements, up the stack
|
||||
for (var i = stack.length - 1; i >= pos; i--) {
|
||||
if (handler.end) {
|
||||
handler.end(stack[i]);
|
||||
}
|
||||
} // Remove the open elements from the stack
|
||||
|
||||
|
||||
stack.length = pos;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function makeMap(str) {
|
||||
var obj = {};
|
||||
var items = str.split(',');
|
||||
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
obj[items[i]] = true;
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
function removeDOCTYPE(html) {
|
||||
return html.replace(/<\?xml.*\?>\n/, '').replace(/<!doctype.*>\n/, '').replace(/<!DOCTYPE.*>\n/, '');
|
||||
}
|
||||
|
||||
function parseAttrs(attrs) {
|
||||
return attrs.reduce(function (pre, attr) {
|
||||
var value = attr.value;
|
||||
var name = attr.name;
|
||||
|
||||
if (pre[name]) {
|
||||
pre[name] = pre[name] + " " + value;
|
||||
} else {
|
||||
pre[name] = value;
|
||||
}
|
||||
|
||||
return pre;
|
||||
}, {});
|
||||
}
|
||||
|
||||
function parseHtml(html) {
|
||||
html = removeDOCTYPE(html);
|
||||
var stacks = [];
|
||||
var results = {
|
||||
node: 'root',
|
||||
children: []
|
||||
};
|
||||
HTMLParser(html, {
|
||||
start: function start(tag, attrs, unary) {
|
||||
var node = {
|
||||
name: tag
|
||||
};
|
||||
|
||||
if (attrs.length !== 0) {
|
||||
node.attrs = parseAttrs(attrs);
|
||||
}
|
||||
|
||||
if (unary) {
|
||||
var parent = stacks[0] || results;
|
||||
|
||||
if (!parent.children) {
|
||||
parent.children = [];
|
||||
}
|
||||
|
||||
parent.children.push(node);
|
||||
} else {
|
||||
stacks.unshift(node);
|
||||
}
|
||||
},
|
||||
end: function end(tag) {
|
||||
var node = stacks.shift();
|
||||
if (node.name !== tag) console.error('invalid state: mismatch end tag');
|
||||
|
||||
if (stacks.length === 0) {
|
||||
results.children.push(node);
|
||||
} else {
|
||||
var parent = stacks[0];
|
||||
|
||||
if (!parent.children) {
|
||||
parent.children = [];
|
||||
}
|
||||
|
||||
parent.children.push(node);
|
||||
}
|
||||
},
|
||||
chars: function chars(text) {
|
||||
var node = {
|
||||
type: 'text',
|
||||
text: text
|
||||
};
|
||||
|
||||
if (stacks.length === 0) {
|
||||
results.children.push(node);
|
||||
} else {
|
||||
var parent = stacks[0];
|
||||
|
||||
if (!parent.children) {
|
||||
parent.children = [];
|
||||
}
|
||||
|
||||
parent.children.push(node);
|
||||
}
|
||||
},
|
||||
comment: function comment(text) {
|
||||
var node = {
|
||||
node: 'comment',
|
||||
text: text
|
||||
};
|
||||
var parent = stacks[0];
|
||||
|
||||
if (!parent.children) {
|
||||
parent.children = [];
|
||||
}
|
||||
|
||||
parent.children.push(node);
|
||||
}
|
||||
});
|
||||
return results.children;
|
||||
}
|
||||
|
||||
export default parseHtml;
|
||||
2
components/ua-markdown/lib/markdown-it.min.js
vendored
Normal file
318
components/ua-markdown/ua-markdown.vue
Normal file
@@ -0,0 +1,318 @@
|
||||
<!-- uniapp vue3 markdown解析 -->
|
||||
<template>
|
||||
<view class="ua__markdown"><rich-text space="nbsp" :nodes="parseNodes(source)" @itemclick="handleItemClick"></rich-text></view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue'
|
||||
import MarkdownIt from './lib/markdown-it.min.js'
|
||||
import hljs from './lib/highlight/uni-highlight.min.js'
|
||||
import './lib/highlight/atom-one-dark.css'
|
||||
import parseHtml from './lib/html-parser.js'
|
||||
const props = defineProps({
|
||||
// 解析内容
|
||||
source: String,
|
||||
showLine: { type: [Boolean, String], default: true }
|
||||
})
|
||||
|
||||
let copyCodeData = []
|
||||
const markdown = MarkdownIt({
|
||||
html: true,
|
||||
highlight: function(str, lang) {
|
||||
let preCode = ""
|
||||
try {
|
||||
preCode = hljs.highlightAuto(str).value
|
||||
} catch (err) {
|
||||
preCode = markdown.utils.escapeHtml(str);
|
||||
}
|
||||
const lines = preCode.split(/\n/).slice(0, -1)
|
||||
// 添加自定义行号
|
||||
let html = lines.map((item, index) => {
|
||||
if( item == ''){
|
||||
return ''
|
||||
}
|
||||
return '<li><span class="line-num" data-line="' + (index + 1) + '"></span>' + item +'</li>'
|
||||
}).join('')
|
||||
if(props.showLine) {
|
||||
html = '<ol style="padding: 0px 30px;">' + html + '</ol>'
|
||||
}else {
|
||||
html = '<ol style="padding: 0px 7px;list-style:none;">' + html + '</ol>'
|
||||
}
|
||||
copyCodeData.push(str)
|
||||
let htmlCode = `<div class="markdown-wrap">`
|
||||
// #ifndef MP-WEIXIN
|
||||
htmlCode += `<div style="color: #aaa;text-align: right;font-size: 12px;padding:8px;">`
|
||||
htmlCode += `${lang}<a class="copy-btn" code-data-index="${copyCodeData.length - 1}" style="margin-left: 8px;">复制代码</a>`
|
||||
htmlCode += `</div>`
|
||||
// #endif
|
||||
htmlCode += `<pre class="hljs" style="padding:10px 8px 0;margin-bottom:5px;overflow: auto;display: block;border-radius: 5px;"><code>${html}</code></pre>`;
|
||||
htmlCode += '</div>'
|
||||
return htmlCode
|
||||
}
|
||||
})
|
||||
const parseNodes = (value) => {
|
||||
if(!value) return
|
||||
// 解析<br />到\n
|
||||
value = value.replace(/<br>|<br\/>|<br \/>/g, "\n")
|
||||
value = value.replace(/ /g, " ")
|
||||
let htmlString = ''
|
||||
if (value.split("```").length % 2) {
|
||||
let mdtext = value
|
||||
if(mdtext[mdtext.length-1] != '\n'){
|
||||
mdtext += '\n'
|
||||
}
|
||||
htmlString = markdown.render(mdtext)
|
||||
} else {
|
||||
htmlString = markdown.render(value)
|
||||
}
|
||||
// 解决小程序表格边框型失效问题
|
||||
htmlString = htmlString.replace(/<table/g, `<table class="table"`)
|
||||
htmlString = htmlString.replace(/<tr/g, `<tr class="tr"`)
|
||||
htmlString = htmlString.replace(/<th>/g, `<th class="th">`)
|
||||
htmlString = htmlString.replace(/<td/g, `<td class="td"`)
|
||||
htmlString = htmlString.replace(/<hr>|<hr\/>|<hr \/>/g, `<hr class="hr">`)
|
||||
|
||||
// #ifndef APP-NVUE
|
||||
return htmlString
|
||||
// #endif
|
||||
|
||||
// 将htmlString转成htmlArray,反之使用rich-text解析
|
||||
// #ifdef APP-NVUE
|
||||
return parseHtml(htmlString)
|
||||
// #endif
|
||||
}
|
||||
|
||||
// 复制代码
|
||||
const handleItemClick = (e) => {
|
||||
let {attrs} = e.detail.node
|
||||
let {"code-data-index":codeDataIndex,"class":className} = attrs
|
||||
if(className == 'copy-btn'){
|
||||
uni.setClipboardData({
|
||||
data: copyCodeData[codeDataIndex],showToast: false,
|
||||
success() {
|
||||
uni.showToast({
|
||||
title: '复制成功',icon: 'none'
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.ua__markdown {
|
||||
font-size: 14px;line-height: 1.5; word-break: break-all;
|
||||
h1,h2,h3,h4,h5,h6 {
|
||||
font-family: inherit;font-weight: 500;line-height: 1.1;color: inherit;
|
||||
}
|
||||
h1,h2,h3 {margin-top: 20px;margin-bottom: 10px}
|
||||
h4,h5,h6 {margin-top: 10px;margin-bottom: 10px}
|
||||
.h1,h1 {font-size: 36px
|
||||
}
|
||||
.h2,h2 {font-size: 30px
|
||||
}
|
||||
.h3,h3 {font-size: 24px
|
||||
}
|
||||
.h4,h4 {font-size: 18px
|
||||
}
|
||||
.h5,h5 {font-size: 14px
|
||||
}
|
||||
.h6,h6 {font-size: 12px
|
||||
}
|
||||
a {
|
||||
background-color: transparent;color: #2196f3;
|
||||
text-decoration: none;
|
||||
}
|
||||
hr, ::v-deep .hr {
|
||||
margin-top: 20px;margin-bottom: 20px; border: 0; border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
img { max-width: 35%;
|
||||
}
|
||||
p {margin: 0 0 10px}
|
||||
em {
|
||||
font-style: italic; font-weight: inherit;
|
||||
}
|
||||
ol,ul {
|
||||
margin-top: 0; margin-bottom: 10px;padding-left: 40px;
|
||||
}
|
||||
ol ol,ol ul,ul ol,ul ul {margin-bottom: 0;
|
||||
}
|
||||
ol ol, ul ol {list-style-type: lower-roman;
|
||||
}
|
||||
ol ol ol, ul ul ol {list-style-type: lower-alpha;
|
||||
}
|
||||
dl {
|
||||
margin-top: 0;margin-bottom: 20px;
|
||||
}
|
||||
dt {font-weight: 600;
|
||||
}
|
||||
dt, dd {line-height: 1.4;
|
||||
}
|
||||
.task-list-item { list-style-type: none;
|
||||
}
|
||||
.task-list-item input {
|
||||
margin: 0 .2em .25em -1.6em;vertical-align: middle;
|
||||
}
|
||||
pre {
|
||||
position: relative; z-index: 11;
|
||||
}
|
||||
code,kbd,pre,samp { font-family: Menlo,Monaco,Consolas,"Courier New",monospace;}
|
||||
code:not(.hljs) {
|
||||
padding: 2px 4px;font-size: 90%;color: #c7254e;background-color: #ffe7ee;border-radius: 4px;
|
||||
}
|
||||
code:empty {display: none;
|
||||
}
|
||||
pre code.hljs {
|
||||
color: var(--vg__text-1); border-radius: 16px; background: var(--vg__bg-1);font-size: 12px;
|
||||
}
|
||||
.markdown-wrap {
|
||||
font-size: 12px;margin-bottom: 10px;
|
||||
}
|
||||
pre.code-block-wrapper {background: #2b2b2b;color: #f8f8f2;border-radius: 4px;overflow-x: auto;
|
||||
padding: 1em;
|
||||
position: relative;
|
||||
}
|
||||
pre.code-block-wrapper code {
|
||||
padding: auto;
|
||||
font-size: inherit;
|
||||
color: inherit;
|
||||
background-color: inherit;
|
||||
border-radius: 0;
|
||||
}
|
||||
.code-block-header__copy {
|
||||
font-size: 16px;margin-left: 5px;
|
||||
}
|
||||
abbr[data-original-title],abbr[title] {
|
||||
cursor: help;border-bottom: 1px dotted #777;
|
||||
}
|
||||
blockquote {
|
||||
padding: 10px 20px;margin: 0 0 20px;font-size: 17.5px;
|
||||
border-left: 5px solid #e5e5e5;
|
||||
}
|
||||
blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child {
|
||||
margin-bottom: 0
|
||||
}
|
||||
blockquote .small,blockquote footer,blockquote small {
|
||||
display: block;font-size: 80%;line-height: 1.42857143;color: #777
|
||||
}
|
||||
blockquote .small:before,blockquote footer:before,blockquote small:before {
|
||||
content: '\2014 \00A0'
|
||||
}
|
||||
.blockquote-reverse,blockquote.pull-right {
|
||||
padding-right: 15px; padding-left: 0;
|
||||
text-align: right;border-right: 5px solid #eee;border-left: 0
|
||||
}
|
||||
.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before {
|
||||
content: ''
|
||||
}
|
||||
.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after {
|
||||
content: '\00A0 \2014'
|
||||
}
|
||||
.footnotes {
|
||||
-moz-column-count: 2;
|
||||
-webkit-column-count: 2;
|
||||
column-count: 2
|
||||
}
|
||||
.footnotes-list {padding-left: 2em}
|
||||
table, ::v-deep .table {
|
||||
border-spacing: 0;border-collapse: collapse; width: 100%;max-width: 65em; overflow: auto;margin-top: 0;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
table tr, ::v-deep .table .tr {
|
||||
border-top: 1px solid #e5e5e5;
|
||||
}
|
||||
table th, table td, ::v-deep .table .th, ::v-deep .table .td {
|
||||
padding: 6px 13px;border: 1px solid #e5e5e5;
|
||||
}
|
||||
table th, ::v-deep .table .th {
|
||||
font-weight: 600;background-color: #eee;
|
||||
}
|
||||
.hljs[class*=language-]:before {
|
||||
position: absolute; z-index: 3;top: .8em; right: 1em; font-size: .8em; color: #999;
|
||||
}
|
||||
.hljs[class~=language-js]:before {
|
||||
content: "js"
|
||||
}
|
||||
.hljs[class~=language-ts]:before {
|
||||
content: "ts"
|
||||
}
|
||||
.hljs[class~=language-html]:before {
|
||||
content: "html"
|
||||
}
|
||||
.hljs[class~=language-md]:before {
|
||||
content: "md"
|
||||
}
|
||||
.hljs[class~=language-vue]:before {
|
||||
content: "vue"
|
||||
}
|
||||
.hljs[class~=language-css]:before {
|
||||
content: "css"
|
||||
}
|
||||
.hljs[class~=language-sass]:before {
|
||||
content: "sass"
|
||||
}
|
||||
.hljs[class~=language-scss]:before {
|
||||
content: "scss"
|
||||
}
|
||||
.hljs[class~=language-less]:before {
|
||||
content: "less"
|
||||
}
|
||||
.hljs[class~=language-stylus]:before {
|
||||
content: "stylus"
|
||||
}
|
||||
.hljs[class~=language-go]:before {
|
||||
content: "go"
|
||||
}
|
||||
.hljs[class~=language-java]:before {
|
||||
content: "java"
|
||||
}
|
||||
.hljs[class~=language-c]:before {
|
||||
content: "c"
|
||||
}
|
||||
.hljs[class~=language-sh]:before {
|
||||
content: "sh"
|
||||
}
|
||||
.hljs[class~=language-yaml]:before {
|
||||
content: "yaml"
|
||||
}
|
||||
.hljs[class~=language-py]:before {
|
||||
content: "py"
|
||||
}
|
||||
.hljs[class~=language-docker]:before {
|
||||
content: "docker"
|
||||
}
|
||||
.hljs[class~=language-dockerfile]:before {
|
||||
content: "dockerfile"
|
||||
}
|
||||
.hljs[class~=language-makefile]:before {
|
||||
content: "makefile"
|
||||
}
|
||||
.hljs[class~=language-javascript]:before {
|
||||
content: "js"
|
||||
}
|
||||
.hljs[class~=language-typescript]:before {
|
||||
content: "ts"
|
||||
}
|
||||
.hljs[class~=language-markup]:before {
|
||||
content: "html"
|
||||
}
|
||||
.hljs[class~=language-markdown]:before {
|
||||
content: "md"
|
||||
}
|
||||
.hljs[class~=language-json]:before {
|
||||
content: "json"
|
||||
}
|
||||
.hljs[class~=language-ruby]:before {
|
||||
content: "rb"
|
||||
}
|
||||
.hljs[class~=language-python]:before {
|
||||
content: "py"
|
||||
}
|
||||
.hljs[class~=language-bash]:before {
|
||||
content: "sh"
|
||||
}
|
||||
.hljs[class~=language-php]:before {
|
||||
content: "php"
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -50,17 +50,17 @@ Component({
|
||||
const data = e.currentTarget.dataset;
|
||||
const url = data.path;
|
||||
const index = data.index
|
||||
// if(index==2||index==4)
|
||||
// {
|
||||
// //如果是购物车和我的,需要登录
|
||||
// let token = wx.getStorageSync('token')
|
||||
// if (!token) {
|
||||
// wx.navigateTo({
|
||||
// url:'/pages/login/login'
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
if(index==2)
|
||||
{
|
||||
//如果是购物车和我的,需要登录
|
||||
let token = wx.getStorageSync('token')
|
||||
if (!token) {
|
||||
wx.navigateTo({
|
||||
url:'/pages/login/login'
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
app.globalData.tabIndex = index
|
||||
wx.switchTab({url})
|
||||
},
|
||||
|
||||
@@ -43,7 +43,14 @@
|
||||
/* ios打包配置 */
|
||||
"ios" : {},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {}
|
||||
"sdkConfigs" : {
|
||||
"share" : {
|
||||
"weixin" : {
|
||||
"appid" : "",
|
||||
"UniversalLinks" : ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
|
||||
18
package.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"id": "ua-markdown",
|
||||
"name": "uniapp markdown语法渲染及代码高亮",
|
||||
"displayName": "uniapp markdown语法渲染及代码高亮",
|
||||
"version": "1.2.4",
|
||||
"description": "基于uniapp+vue3自定义解析markdown语法/高亮,适用于h5+小程序+App端。",
|
||||
"keywords": [
|
||||
"ua-markdown",
|
||||
"uni-markdown",
|
||||
"markdown"
|
||||
],
|
||||
"dcloudext": {
|
||||
"category": [
|
||||
"前端组件",
|
||||
"通用组件"
|
||||
]
|
||||
}
|
||||
}
|
||||
49
pages.json
@@ -11,7 +11,8 @@
|
||||
"path" : "pages/invest/invest",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
"navigationBarTitleText" : "",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -63,20 +64,6 @@
|
||||
"navigationBarTitleText" : ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/mine/vip/vip",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/mine/vipMeal/vipMeal",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/index/stockDetails/stockDetails",
|
||||
"style" :
|
||||
@@ -88,7 +75,9 @@
|
||||
"path" : "pages/index/conceptDetails/conceptDetails",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
"navigationBarTitleText" : "",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -118,7 +107,35 @@
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/mine/web/web",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"subPackages": [
|
||||
{
|
||||
"root": "pagesMine",
|
||||
"pages": [
|
||||
{
|
||||
"path": "vip/vip",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "vipMeal/vipMeal",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationStyle": "custom",
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
<template>
|
||||
<view>
|
||||
<navBar leftText="相关概念详情"></navBar>
|
||||
<image class="topBg absolute" src="/static/image/mine/myTopBg.png" mode="widthFix"></image>
|
||||
<view class="conceptDetailsC fixed" :style="'top:'+navH+'px;'">
|
||||
<view class="title">外骨骼机器人(250501)</view>
|
||||
<view class="time">2025-05-08 08:43</view>
|
||||
<view class="content">四部门联合启动的人力资源服务业与制造业融合发展试点,主要目的是推动人力资源服务向高端制造渗透,促进产业升级。而外骨骼机器人属于高端制造领域的重要创新产品之一,其发展需要人力资源服务业的支持,例如技术人才的输送、产业工人培训等。同时,外骨骼机器人在消费级市场的推广和应用也符合制造业与服务业融合发展的方向。因此,该政策试点对外骨骼机器人行业具有潜在利好影响。</view>
|
||||
</view>
|
||||
<web-view :src="url"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -16,7 +10,14 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
navH:inject('navHeight')
|
||||
navH:inject('navHeight'),
|
||||
url:''
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
if(e.name)
|
||||
{
|
||||
this.url = 'https://valuefrontier.cn/htmls/'+e.name+'.html'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -28,22 +28,44 @@
|
||||
<view class="code">{{item.stock_code}}</view>
|
||||
</view>
|
||||
<view class="flex1">
|
||||
|
||||
<view style="width:140rpx; height:100rpx">
|
||||
<l-echart :ref="'chartRef'+index"></l-echart>
|
||||
</view>
|
||||
</view>
|
||||
<view class="price flex1">{{item.trade_data.open_price}}</view>
|
||||
<view class="price flex1">{{item.trade_data.latest_price}}</view>
|
||||
<view :class="'chg flex1 '+(getRateUpOrDown(item.trade_data.change_pct)?'down':'up')">{{item.trade_data.change_pct}}%</view>
|
||||
<view class="price flex1">{{item.trade_data?item.trade_data.open_price:''}}</view>
|
||||
<view class="price flex1">{{item.trade_data?item.trade_data.latest_price:''}}</view>
|
||||
<view :class="'chg flex1 '+(getRateUpOrDown(item.trade_data?item.trade_data.change_pct:'')?'down':'up')">{{item.trade_data?item.trade_data.change_pct:''}}%</view>
|
||||
</view>
|
||||
<view class="content">{{item.relation_desc}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="selectCategory==1" class="conceptList">
|
||||
<view class="item relative" v-for="(item,index) in conceptList" :key="index" @click="clickConceptItem()">
|
||||
<image class="cover" :src="item.first_image" mode="aspectFill"></image>
|
||||
<view class="infoC absolute">
|
||||
<view v-if="selectCategory==1" class="conceptList flexWrap">
|
||||
<view class="conceptItem" v-for="(item,index) in conceptList" :key="index" @click="clickConceptItem(item.concept)">
|
||||
<view class="coverC relative">
|
||||
<image class="cover" src="" mode="aspectFill"></image>
|
||||
<view :class="'rateC absolute '+(getRateUpOrDown(item.price_info.avg_change_pct)?'down':'up')">
|
||||
<image v-if="getRateUpOrDown(item.price_info.avg_change_pct)" class="icon" src="/static/icon/home/conceptDownArrow.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/home/conceptUpArrow.png" mode="widthFix"></image>
|
||||
<text>{{getRateStr(item.price_info.avg_change_pct)}}%</text>
|
||||
</view>
|
||||
<view class="totalC absolute">{{item.stock_count}}只股票</view>
|
||||
</view>
|
||||
<view class="infoC">
|
||||
<view class="title">{{item.concept}}</view>
|
||||
<view class="content relative">{{item.reason}}
|
||||
<text class="lookDetails absolute">查看详情</text>
|
||||
<view class="content">{{item.description}}</view>
|
||||
<view class="transactionDate">交易日期: {{item.price_info.trade_date}}</view>
|
||||
<view class="hotStockC">
|
||||
<view class="titleC flex">
|
||||
<text class="flex1">热门个股</text>
|
||||
<image class="arrow" src="/static/icon/home/stockArrow.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="stockList flexWrap">
|
||||
<view class="item" v-for="(item,index) in item.stocks" :key="index">{{item.stock_name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="dateHistoryTimeC flex">
|
||||
<view class="date flex1">{{item.happened_times[0]+(item.happened_times.length>1?('(共'+item.happened_times.length+'次)'):'')}}</view>
|
||||
<view class="historyTimeC">历史时间轴</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -65,7 +87,7 @@
|
||||
<view class="eventInfoC flex1">
|
||||
<view class="titleCorrelationC flex">
|
||||
<view class="title flex1">{{item.title}}</view>
|
||||
<view class="correlation">相关度: 98%</view>
|
||||
<view class="correlation">相关度: {{item.relevance*10}}%</view>
|
||||
</view>
|
||||
<view class="content">{{item.content}}</view>
|
||||
<scroll-view scroll-x class="increaseRateList">
|
||||
@@ -122,30 +144,30 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="item">
|
||||
<view class="item" v-for="(item,index) in commentList" :key="index">
|
||||
<view class="originComment">
|
||||
<image class="avatar" src="" mode="aspectFill"></image>
|
||||
<image class="avatar" :src="item.user.avatar_url" mode="aspectFill"></image>
|
||||
<view class="flex1">
|
||||
<view class="nickname">逸尘破晓</view>
|
||||
<view class="content">四部门联合启动的人力资源服务业与制造业融合发展点,主要目的是推动人力资源服务向高端制造渗透。</view>
|
||||
<view class="nickname">{{item.user.username}}</view>
|
||||
<view class="content">{{item.content}}</view>
|
||||
<view class="timeReplyLikeC flex between">
|
||||
<view class="timeReplyC flex">
|
||||
<view class="time">15:37</view>
|
||||
<view class="reply">回复</view>
|
||||
<view class="time">{{getLocaleHourMinute(item.created_at)}}</view>
|
||||
<view class="reply" @click.stop="clickReplyComment(item.post_id)">回复</view>
|
||||
</view>
|
||||
<view class="likeC flex">
|
||||
<view class="likeC flex" @click.stop="clickLikeComment(item.post_id,index,-1)">
|
||||
<image class="icon" src="/static/icon/home/like.png" mode="widthFix"></image>
|
||||
<view class="num">85</view>
|
||||
<view class="num">{{item.likes_count}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="totalCommentNumC flex">
|
||||
<!-- <view class="totalCommentNumC flex">
|
||||
<view class="line"></view>
|
||||
全部34条评论
|
||||
<image class="arrow" src="/static/icon/home/commentArrow.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="replyList">
|
||||
<!-- <view class="replyList">
|
||||
<view class="replyItem">
|
||||
<image class="avatar" src="" mode="aspectFill"></image>
|
||||
<view class="flex1">
|
||||
@@ -156,19 +178,19 @@
|
||||
<view class="time">15:37</view>
|
||||
<view class="reply">回复</view>
|
||||
</view>
|
||||
<view class="likeC flex">
|
||||
<view class="likeC flex" @click.stop="clickLikeComment(item.post_id)">
|
||||
<image class="icon" src="/static/icon/home/like.png" mode="widthFix"></image>
|
||||
<view class="num">85</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="popBottomC">
|
||||
<view class="inputC">
|
||||
<input type="text" placeholder="我来说两句..." placeholder-style="color:#666"/>
|
||||
<input type="text" v-model="replyComment" :focus="isFocus" placeholder="我来说两句..." placeholder-style="color:#666" confirm-type="send" @confirm="sendReplyComment()"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -197,7 +219,7 @@
|
||||
</view>
|
||||
<view class="sectorRateC">
|
||||
<view class="sector">{{item.sector}}</view>
|
||||
<view class="rateC">
|
||||
<view :class="'rateC '+(getRateUpOrDown(item.daily_change)?'down':'up')">
|
||||
当日涨幅:
|
||||
<image v-if="getRateUpOrDown(item.daily_change)" class="arrow" src="/static/icon/home/downArrow.png" mode="widthFix"></image>
|
||||
<image v-else class="arrow" src="/static/icon/home/upArrow.png" mode="widthFix"></image>
|
||||
@@ -214,8 +236,9 @@
|
||||
|
||||
<script>
|
||||
import { inject } from 'vue';
|
||||
import { eventRelatedConcept, eventHistoryEvent, eventRelatedStock, eventCommentList, commentEvent } from '@/request/api';
|
||||
import { getLocaleTime, getRateStr, getRateUpOrDown } from '@/utils/util';
|
||||
import { eventRelatedConcept, eventHistoryEvent, eventRelatedStock, eventCommentList, commentEvent, likeEventComment, replyComment, followEvent } from '@/request/api';
|
||||
import { getLocaleHourMinute, getLocaleTime, getRateStr, getRateUpOrDown } from '@/utils/util';
|
||||
const echarts = require('../../../uni_modules/lime-echart/static/echarts.min.js');
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -224,19 +247,81 @@
|
||||
windowWidth:inject('windowWidth'),
|
||||
eventId:'', //事件id
|
||||
eventDetails:null, //事件详情
|
||||
categoryList:['相关标的','相关概念','历史事件','时间传导链分析','关联数据'],
|
||||
categoryList:['相关标的','相关概念','历史事件'],
|
||||
targetList:[], //相关标的
|
||||
conceptList:[], //相关概念
|
||||
historyEventList:[], //历史事件
|
||||
historyEventRelatedStockList:[], //历史事件相关股票
|
||||
selectCategory:0,
|
||||
headingList:['名称代码','分时图','开盘价','最新价','涨跌幅'],
|
||||
getLocaleHourMinute:getLocaleHourMinute,
|
||||
getLocaleTime:getLocaleTime,
|
||||
getRateUpOrDown:getRateUpOrDown,
|
||||
getRateStr:getRateStr,
|
||||
scoreTop:'',
|
||||
eventComment:'', //事件评论
|
||||
expectScore:0, //预期得分
|
||||
commentList:[], //评价列表
|
||||
eventComment:'', //事件评论内容
|
||||
replyId:'', //回复评论id
|
||||
replyPid:'', //回复评论父级id
|
||||
isFocus:false, //是否获取焦点
|
||||
replyComment:'', //评论回复内容
|
||||
option:{
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
},
|
||||
confine: true
|
||||
},
|
||||
grid:{
|
||||
left: '0%',
|
||||
right: '0%',
|
||||
top: '0%',
|
||||
bottom: '20%',
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: [],
|
||||
axisTick:{
|
||||
show:false
|
||||
},
|
||||
axisLine:{
|
||||
show:false
|
||||
},
|
||||
}
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
show:false,
|
||||
axisTick: { show: false },
|
||||
scale:true
|
||||
}
|
||||
],
|
||||
series: {
|
||||
name: '分时图',
|
||||
type: 'line',
|
||||
label: {
|
||||
show:true,
|
||||
position:'top',
|
||||
fontSize:12,
|
||||
},
|
||||
data: [],
|
||||
itemStyle:{
|
||||
color:''
|
||||
},
|
||||
markLine:{
|
||||
symbol:['none','none'],
|
||||
lineStyle:{
|
||||
color:'#AAAAAA',
|
||||
type:'dashed'
|
||||
},
|
||||
data:[]
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(e)
|
||||
@@ -249,6 +334,33 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async init() {
|
||||
// chart 图表实例不能存在data里
|
||||
let that = this
|
||||
setTimeout(function() {
|
||||
that.targetList.map(function(item,index) {
|
||||
const chartDom = that.$refs['chartRef'+index][0]
|
||||
chartDom.init(echarts).then(res=>{
|
||||
let option = {...that.option}
|
||||
let valueData = []
|
||||
for (let item1 of item.minute_chart_data) {
|
||||
valueData.push(item1.close)
|
||||
}
|
||||
option.series.data = valueData
|
||||
let firstOpen = item.minute_chart_data[0].open
|
||||
option.series.markLine.data = [{yAxis:firstOpen}]
|
||||
// console.log(option.series.markLine.data)
|
||||
let lastClose = item.minute_chart_data.slice(-1)[0].close
|
||||
if(lastClose>=firstOpen)
|
||||
{
|
||||
option.series.itemStyle.color = '#EF5350'
|
||||
}else
|
||||
option.series.itemStyle.color = '#26A69A'
|
||||
res.setOption(option)
|
||||
})
|
||||
})
|
||||
}, 300);
|
||||
},
|
||||
/**
|
||||
* 点击切换分类
|
||||
*/
|
||||
@@ -278,16 +390,16 @@
|
||||
clickStockItem(code)
|
||||
{
|
||||
uni.navigateTo({
|
||||
url:'/pages/index/stockDetails/stockDetails?code='+code
|
||||
url:'/pages/index/stockDetails/stockDetails?type=1&code='+code+'&id='+this.eventId
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 点击查看相关概念
|
||||
*/
|
||||
clickConceptItem()
|
||||
clickConceptItem(name)
|
||||
{
|
||||
uni.navigateTo({
|
||||
url:'/pages/index/conceptDetails/conceptDetails'
|
||||
url:'/pages/index/conceptDetails/conceptDetails?name='+name
|
||||
})
|
||||
},
|
||||
/**
|
||||
@@ -330,7 +442,14 @@
|
||||
let eventId = this.eventId
|
||||
let param = {content:this.eventComment}
|
||||
commentEvent(eventId,param).then(res=>{
|
||||
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
let that = this
|
||||
setTimeout(function() {
|
||||
that.getEventCommentListData()
|
||||
}, 1000);
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
@@ -364,6 +483,61 @@
|
||||
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 点击回复评论
|
||||
*/
|
||||
clickReplyComment(id,pid)
|
||||
{
|
||||
this.replyId = id
|
||||
if(pid)
|
||||
{
|
||||
this.replyPid = pid
|
||||
}
|
||||
this.isFocus = true
|
||||
},
|
||||
sendReplyComment()
|
||||
{
|
||||
if(!this.replyComment)
|
||||
{
|
||||
uni.showToast({
|
||||
title:'请输入评论内容',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
let param = {content:this.replyComment}
|
||||
if(this.replyPid)
|
||||
{
|
||||
param.parent_id = this.replyPid
|
||||
}
|
||||
replyComment(this.replyId,param).then(res=>{
|
||||
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 点赞评论
|
||||
*/
|
||||
clickLikeComment(id,index,cindex)
|
||||
{
|
||||
likeEventComment(id).then(res=>{
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
if(cindex==-1)
|
||||
{
|
||||
//一级评论回复
|
||||
this.commentList[index].likes_count = res.likes_count
|
||||
}else
|
||||
{
|
||||
|
||||
}
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取事件相关标的数据
|
||||
*/
|
||||
@@ -375,6 +549,7 @@
|
||||
{
|
||||
this.eventDetails = res.data
|
||||
this.targetList = res.data.related_stocks
|
||||
this.init()
|
||||
}else
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
@@ -389,16 +564,17 @@
|
||||
*/
|
||||
getEventRelatedConceptData()
|
||||
{
|
||||
let eventId = this.eventId
|
||||
eventRelatedConcept(eventId).then(res=>{
|
||||
if(res.code==200)
|
||||
{
|
||||
this.conceptList = res.data.related_concepts
|
||||
}else
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
let eventDetails = this.eventDetails
|
||||
let param = {query:eventDetails.event_title,size:4,page:1,sort_by:"_score",isJson:1}
|
||||
eventRelatedConcept(param).then(res=>{
|
||||
// if(res.code==200)
|
||||
// {
|
||||
this.conceptList = res.results
|
||||
// }else
|
||||
// uni.showToast({
|
||||
// title:res.message,
|
||||
// icon:'none'
|
||||
// })
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
@@ -430,7 +606,7 @@
|
||||
{
|
||||
let eventId = this.eventId
|
||||
eventCommentList(eventId).then(res=>{
|
||||
this.commentList = res.data.comments
|
||||
this.commentList = res.data.posts
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
@@ -581,29 +757,64 @@
|
||||
.conceptList
|
||||
{
|
||||
padding: 30rpx 25rpx;
|
||||
.item
|
||||
.conceptItem
|
||||
{
|
||||
margin-bottom: 20rpx;
|
||||
.cover
|
||||
box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.05);
|
||||
margin: 0 30rpx 30rpx 0;
|
||||
width: calc((100% - 30rpx)/2);
|
||||
border-radius: 10rpx;
|
||||
.coverC
|
||||
{
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 350rpx;
|
||||
border-radius: 10rpx;
|
||||
.cover
|
||||
{
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 220rpx;
|
||||
}
|
||||
.rateC
|
||||
{
|
||||
top: 12rpx;
|
||||
left: 12rpx;
|
||||
padding: 0 10rpx;
|
||||
line-height: 40rpx;
|
||||
border-radius: 20rpx;
|
||||
font-size: 18rpx;
|
||||
font-weight: 500;
|
||||
color: white;
|
||||
.icon
|
||||
{
|
||||
width: 11rpx;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
.rateC.up
|
||||
{
|
||||
background-color: #E53E3E;
|
||||
}
|
||||
.rateC.down
|
||||
{
|
||||
background-color: #38A169;
|
||||
}
|
||||
.totalC
|
||||
{
|
||||
background: linear-gradient(-90deg, #FAC915 0%, #F18D10 100%);
|
||||
top: 12rpx;
|
||||
right: 12rpx;
|
||||
padding: 0 9rpx;
|
||||
line-height: 40rpx;
|
||||
border-radius: 20rpx;
|
||||
font-size: 20rpx;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
.infoC
|
||||
{
|
||||
background: linear-gradient(to bottom,#00000080,#000);
|
||||
padding: 20rpx 23rpx;
|
||||
left:0;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
border-radius: ;
|
||||
color: white;
|
||||
.title
|
||||
{
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
color: #222;
|
||||
}
|
||||
.content
|
||||
{
|
||||
@@ -612,17 +823,76 @@
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
margin-top: 10rpx;
|
||||
line-height: 1.2rem;
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
line-height: 1.2rem;
|
||||
.lookDetails
|
||||
color: #666;
|
||||
}
|
||||
.transactionDate
|
||||
{
|
||||
margin-top: 12rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #AAA;
|
||||
}
|
||||
.hotStockC
|
||||
{
|
||||
background-color: #F7FAFC;
|
||||
margin-top: 16rpx;
|
||||
padding: 10rpx 13rpx;
|
||||
border-radius: 5rpx;
|
||||
.titleC
|
||||
{
|
||||
right: 0;
|
||||
color: #F97316;
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
.arrow
|
||||
{
|
||||
width: 6rpx;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
.stockList
|
||||
{
|
||||
margin-top: 10rpx;
|
||||
height: 35rpx;
|
||||
overflow: hidden;
|
||||
.item
|
||||
{
|
||||
background-color: #FFEADC;
|
||||
margin: 0 5rpx 5rpx 0;
|
||||
padding: 0 9rpx;
|
||||
line-height: 30rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 18rpx;
|
||||
font-weight: 500;
|
||||
color: #F97316;
|
||||
}
|
||||
}
|
||||
}
|
||||
.dateHistoryTimeC
|
||||
{
|
||||
margin-top: 10rpx;
|
||||
font-size: 20rpx;
|
||||
.date
|
||||
{
|
||||
color: #666;
|
||||
}
|
||||
.historyTimeC
|
||||
{
|
||||
background-color: #F97316;
|
||||
padding: 0 6rpx;
|
||||
line-height: 38rpx;
|
||||
border-radius: 5rpx;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.conceptItem:nth-child(2n)
|
||||
{
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
.historyEventList
|
||||
{
|
||||
@@ -1104,7 +1374,6 @@
|
||||
}
|
||||
.rateC
|
||||
{
|
||||
background-color: #C00000;
|
||||
display: inline-block;
|
||||
padding: 0 10rpx;
|
||||
height: 30rpx;
|
||||
@@ -1118,6 +1387,14 @@
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
.rateC.up
|
||||
{
|
||||
background-color: #C00000;
|
||||
}
|
||||
.rateC.down
|
||||
{
|
||||
background-color: #355422;
|
||||
}
|
||||
}
|
||||
.content
|
||||
{
|
||||
|
||||
@@ -38,9 +38,9 @@
|
||||
</scroll-view>
|
||||
</view>
|
||||
<scroll-view scroll-y class="eventListC fixed" :style="'top:'+listTop+'px'" @scrolltolower="loadMoreData()">
|
||||
<!-- <view style="width:750rpx; height:400rpx">
|
||||
<view style="width:750rpx; height:400rpx">
|
||||
<l-echart ref="chartRef"></l-echart>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="item" @click="clickEventItem(item.id)" v-for="(item,index) in eventList" :key="index">
|
||||
<view class="flex">
|
||||
@@ -69,7 +69,7 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
<scroll-view scroll-x class="stockList">
|
||||
<view class="stockItem" v-for="(sitem,sindex) in item.related_stocks" :key="sindex" @click.stop="clickLookRelatedStockItem(sitem.stock_code)">{{sitem.stock_name}} <text class="change">{{(getRateUpOrDown(sitem.daily_change)?'':'+')+sitem.daily_change}}%</text></view>
|
||||
<view class="stockItem" v-for="(sitem,sindex) in item.related_stocks" :key="sindex" @click.stop="clickLookRelatedStockItem(item.id,sitem.stock_code)">{{sitem.stock_name}} <text class="change">{{(getRateUpOrDown(sitem.daily_change)?'':'+')+sitem.daily_change}}%</text></view>
|
||||
</scroll-view>
|
||||
<view class="timeToolBarC flex">
|
||||
<view class="time flex1">{{getLocaleTime(item.created_at)}}</view>
|
||||
@@ -159,27 +159,78 @@
|
||||
<block v-if="selectScreenCategory==1">
|
||||
<view class="section">选择体系</view>
|
||||
<view class="industryCategoryC flexWrap">
|
||||
<view :class="'item '+(selectIndustryTopCategory==index?'select':'')" v-for="(item,index) in industryTopCategoryList" :key="index" @click="clickSelectIndustryTopCategoryItem(index)">
|
||||
<view :class="'item '+(selectIndustryTopCategory==index?'select':'')" v-for="(item,index) in industryCategoryList" :key="index" @click="clickIndustryTopCategoryItem(index)">
|
||||
{{item.classification_name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="industrySearchC flex">
|
||||
<image class="icon" src="/static/icon/home/search.png" mode="widthFix"></image>
|
||||
<input class="flex1" type="text" placeholder="搜索行业" placeholder-style="color:#94989A"/>
|
||||
<input class="flex1" type="text" v-model="industryKeywords" placeholder="搜索行业" placeholder-style="color:#94989A" @input="industrySearch"/>
|
||||
</view>
|
||||
<view class="industryList">
|
||||
<view class="selectCategoryList flexWrap">
|
||||
|
||||
<view v-if="industryKeywords.length>0" class="searchResultList">
|
||||
<block v-for="(item,index) in searchResultList" :key="index">
|
||||
<block v-for="(sitem,sindex) in item.hierarchy" :key="sindex">
|
||||
<block v-for="(titem,tindex) in sitem.level2_sectors" :key="tindex">
|
||||
<block v-for="(fitem,findex) in titem.level3_sectors" :key="findex">
|
||||
<view class="item" @click="clickIndustrySearchItem(fitem)">
|
||||
<text :class="industryKeywords.indexOf(citem)>-1?'key':''" v-for="(citem,cindex) in (fitem.level3_sector+'/'+titem.level2_sector+'/'+sitem.level1_sector)" :key="cindex">{{citem}}</text>
|
||||
</view>
|
||||
</block>
|
||||
</block>
|
||||
</block>
|
||||
</block>
|
||||
</view>
|
||||
<view v-else class="industryList">
|
||||
<view v-if="selectIndustrySecondCategory>-1" class="selectCategoryList flexWrap">
|
||||
<view v-if="selectIndustrySecondCategory>-1" class="item flex" @click="deleteIndustrySecondCategoryItem()">
|
||||
{{industryCategoryList[selectIndustryTopCategory].hierarchy[selectIndustrySecondCategory].level1_sector}}
|
||||
<view class="deleteC">
|
||||
<image class="icon" src="/static/icon/home/delete.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="selectIndustryThirdCategory>-1" class="item flex" @click="deleteIndustryThirdCategoryItem()">
|
||||
{{industryCategoryList[selectIndustryTopCategory].hierarchy[selectIndustrySecondCategory].level2_sectors[selectIndustryThirdCategory].level2_sector}}
|
||||
<view class="deleteC">
|
||||
<image class="icon" src="/static/icon/home/delete.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="selectIndustryForthCategory>-1" class="item flex" @click="deleteIndustryForthCategoryItem()">
|
||||
{{industryCategoryList[selectIndustryTopCategory].hierarchy[selectIndustrySecondCategory].level2_sectors[selectIndustryThirdCategory].level3_sectors[selectIndustryForthCategory].level3_sector}}
|
||||
<view class="deleteC">
|
||||
<image class="icon" src="/static/icon/home/delete.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="topCategory">{{industryTopCategoryList[selectIndustryTopCategory].classification_name}}</view>
|
||||
<view class="topCategory">{{industryCategoryList[selectIndustryTopCategory].classification_name}}</view>
|
||||
<view class="secondList">
|
||||
<view class="secondItem">
|
||||
<view class="thirdList">
|
||||
<view class="thirdItem">
|
||||
|
||||
</view>
|
||||
<view class="secondItem" v-for="(sitem,sindex) in industryCategoryList[selectIndustryTopCategory].hierarchy" :key="sindex">
|
||||
<view :class="'categoryC flex '+(selectIndustrySecondCategory==sindex?'select':'')" @click.stop="clickIndustrySecondCategoryItem(sindex)">
|
||||
<view class="spread">{{(selectIndustrySecondCategory==sindex&&sitem.isSpread)?'-':'+'}}</view>
|
||||
<view class="category">{{sitem.level1_sector}}</view>
|
||||
</view>
|
||||
<block v-if="sitem.isSpread">
|
||||
<view class="thirdList" v-for="(titem,tindex) in industryCategoryList[selectIndustryTopCategory].hierarchy[sindex].level2_sectors" :key="tindex">
|
||||
<view class="thirdItem">
|
||||
<view :class="'categoryC flex '+(selectIndustrySecondCategory==sindex&&selectIndustryThirdCategory==tindex?'select':'')" @click.stop="clickIndustryThirdCategoryItem(sindex,tindex)">
|
||||
<view class="spread">{{(selectIndustrySecondCategory==sindex&&selectIndustryThirdCategory==tindex&&titem.isSpread)?'-':'+'}}</view>
|
||||
<view class="category">{{titem.level2_sector}}</view>
|
||||
</view>
|
||||
<block v-if="titem.isSpread">
|
||||
<view class="forthList" v-for="(fitem,findex) in industryCategoryList[selectIndustryTopCategory].hierarchy[sindex].level2_sectors[tindex].level3_sectors" :key="findex">
|
||||
<view class="forthItem" @click.stop="clickIndustryForthCategoryItem(sindex,tindex,findex)">
|
||||
<view :class="'categoryC flex '+(selectIndustrySecondCategory==sindex&&selectIndustryThirdCategory==tindex&&selectIndustryForthCategory==findex?'select':'')">
|
||||
<view class="category flex1">{{fitem.level3_sector}}</view>
|
||||
<view v-if="selectIndustrySecondCategory==sindex&&selectIndustryThirdCategory==tindex&&selectIndustryForthCategory==findex" class="selectC">
|
||||
<image class="icon" src="/static/icon/home/industry_s.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -217,7 +268,6 @@
|
||||
menuH: inject('menuHeight'),
|
||||
navH:inject('navHeight'),
|
||||
windowWidth:inject('windowWidth'),
|
||||
|
||||
contentTop:'',
|
||||
listTop:'',
|
||||
sortListTop:'',
|
||||
@@ -243,8 +293,13 @@
|
||||
monthDateList:[],
|
||||
selectMonthIndex:0, //选中月份下标
|
||||
selectMonth:'', //选中年月
|
||||
industryTopCategoryList:[], //行业一级分类
|
||||
selectIndustryTopCategory:0, //
|
||||
industryCategoryList:[], //行业分类数组
|
||||
industryKeywords:'', //行业分类搜索关键词
|
||||
searchResultList:[], //行业分类搜索结果数组
|
||||
selectIndustryTopCategory:0, //选中行业一级分类
|
||||
selectIndustrySecondCategory:-1, //选中行业二级分类
|
||||
selectIndustryThirdCategory:-1, //选中行业三级分类
|
||||
selectIndustryForthCategory:-1, //选中行业四级分类
|
||||
selectScreenCategory:0,
|
||||
importanceList:[], //重要性数组
|
||||
selectImportanceIndex:0, //选择重要性下标
|
||||
@@ -259,7 +314,7 @@
|
||||
grid:{
|
||||
left: '0%',
|
||||
right: '0%',
|
||||
top: '0%',
|
||||
top: '10%',
|
||||
bottom: '20%',
|
||||
},
|
||||
xAxis: [
|
||||
@@ -299,71 +354,10 @@
|
||||
position:'top',
|
||||
fontSize:12,
|
||||
},
|
||||
data: [
|
||||
{
|
||||
value:0,
|
||||
itemStyle: {color:'#355422'},
|
||||
label:{
|
||||
textStyle: {color:'#355422'},
|
||||
},
|
||||
},
|
||||
{
|
||||
value:44,
|
||||
itemStyle: {color:'#35542299'},
|
||||
label:{
|
||||
textStyle: {color:'#355422'},
|
||||
},
|
||||
},
|
||||
{
|
||||
value:315,
|
||||
itemStyle: {color:'#355422CC'},
|
||||
label:{
|
||||
textStyle: {color:'#355422'},
|
||||
},
|
||||
},
|
||||
{
|
||||
value:1264,
|
||||
itemStyle: {color:'#355422'},
|
||||
label:{
|
||||
textStyle: {color:'#355422'},
|
||||
},
|
||||
},
|
||||
{
|
||||
value:1064,
|
||||
itemStyle: {color:'#ACB0C0'},
|
||||
label:{
|
||||
textStyle: {color:'#666'},
|
||||
},
|
||||
},
|
||||
{
|
||||
value:1809,
|
||||
itemStyle: {color:'#C00000'},
|
||||
label:{
|
||||
textStyle: {color:'#C00000'},
|
||||
},
|
||||
},
|
||||
{
|
||||
value:602,
|
||||
itemStyle: {color:'#C00000CC'},
|
||||
label:{
|
||||
textStyle: {color:'#C00000'},
|
||||
},
|
||||
},
|
||||
{
|
||||
value:44,
|
||||
itemStyle: {color:'#C0000099'},
|
||||
label:{
|
||||
textStyle: {color:'#C00000'},
|
||||
},
|
||||
},
|
||||
{
|
||||
value:0,
|
||||
itemStyle: {color:'#C00000'},
|
||||
label:{
|
||||
textStyle: {color:'#C00000'},
|
||||
},
|
||||
},
|
||||
],
|
||||
itemStyle:{
|
||||
borderRadius:[5,5,0,0]
|
||||
},
|
||||
data: [],
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -376,14 +370,14 @@
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.contentTop = this.navH + (75+20)/750*this.windowWidth
|
||||
this.contentTop = this.navH + (74+20)/750*this.windowWidth
|
||||
this.listTop = this.contentTop + (22+80+72)/750*this.windowWidth
|
||||
this.sortListTop = this.navH + (22+80+80)/750*this.windowWidth
|
||||
this.getEventFilterListData()
|
||||
this.getEventListData()
|
||||
this.getIndustryCategoryListData()
|
||||
this.getStockCategoryListData()
|
||||
// this.init()
|
||||
Promise.all([this.getEventFilterListData(),this.getIndustryCategoryListData(),this.getStockCategoryListData()]).then(res=>{
|
||||
this.getEventListData()
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
let currentDate = new Date();
|
||||
// 获取当前年份
|
||||
let currentYear = currentDate.getFullYear();
|
||||
@@ -572,13 +566,20 @@
|
||||
if(this.selectTopCategory!=index)
|
||||
{
|
||||
this.selectTopCategory = index
|
||||
this.selectSecondCategory = 0
|
||||
let offsetLeft = event.currentTarget.offsetLeft
|
||||
this.topScrollLeft = offsetLeft - this.topScrollWidth/2
|
||||
if(index==0)
|
||||
{
|
||||
this.listTop = this.contentTop + (22+80+72)/750*this.windowWidth
|
||||
}else
|
||||
this.listTop = this.contentTop + (22+80+72+44+44)/750*this.windowWidth
|
||||
this.listTop = this.contentTop + (22+80+72+42+42)/750*this.windowWidth
|
||||
if(this.selectTimeCategory==0)
|
||||
{
|
||||
//最新
|
||||
this.getEventListData()
|
||||
}else
|
||||
this.getHotEventListData()
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -592,6 +593,12 @@
|
||||
this.selectSecondCategory = index
|
||||
let offsetLeft = event.currentTarget.offsetLeft
|
||||
this.secondScrollLeft = offsetLeft - this.secondScrollWidth/2
|
||||
if(this.selectTimeCategory==0)
|
||||
{
|
||||
//最新
|
||||
this.getEventListData()
|
||||
}else
|
||||
this.getHotEventListData()
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -664,13 +671,140 @@
|
||||
/**
|
||||
* 选择行业分类一级分类
|
||||
*/
|
||||
clickSelectIndustryTopCategoryItem(index)
|
||||
clickIndustryTopCategoryItem(index)
|
||||
{
|
||||
if(this.selectIndustryTopCategory!=index)
|
||||
{
|
||||
this.selectIndustryTopCategory = index
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 行业分类搜索
|
||||
*/
|
||||
industrySearch(e)
|
||||
{
|
||||
let keywords = e.detail.value
|
||||
this.industryKeywords = keywords
|
||||
let arr = []
|
||||
for (let item of this.industryCategoryList) {
|
||||
let index = this.industryCategoryList.indexOf(item)
|
||||
for (let item1 of item.hierarchy) {
|
||||
let index1 = item.hierarchy.indexOf(item1)
|
||||
let arr1 = []
|
||||
if(item1.level1_sector.indexOf(keywords)>-1)
|
||||
{
|
||||
arr1.push(item1)
|
||||
arr.push({classification_name:item.classification_name,hierarchy: arr1})
|
||||
}
|
||||
for (let item2 of item1.level2_sectors) {
|
||||
let index2 = item1.level2_sectors.indexOf(item2)
|
||||
let arr2 = []
|
||||
if(item2.level2_sector.indexOf(keywords)>-1)
|
||||
{
|
||||
arr2.push(item2)
|
||||
arr1.push({level1_sector:item1.level1_sector,level2_sectors: arr2})
|
||||
arr.push({classification_name:item.classification_name,hierarchy: arr1})
|
||||
}
|
||||
for (let item3 of item2.level3_sectors) {
|
||||
let index3 = item2.level3_sectors.indexOf(item3)
|
||||
let arr3 = []
|
||||
if(item3.level3_sector.indexOf(keywords)>-1)
|
||||
{
|
||||
item3.index = index
|
||||
item3.index1 = index1
|
||||
item3.index2 = index2
|
||||
item3.index3 = index3
|
||||
arr3.push(item3)
|
||||
arr2.push({level2_sector:item2.level2_sector,level3_sectors: arr3})
|
||||
arr1.push({level1_sector:item1.level1_sector,level2_sectors: arr2})
|
||||
arr.push({classification_name:item.classification_name,hierarchy: arr1})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
this.searchResultList = arr
|
||||
},
|
||||
/**
|
||||
* 点击选择搜索结果
|
||||
* @param {Object} item
|
||||
*/
|
||||
clickIndustrySearchItem(item)
|
||||
{
|
||||
this.industryKeywords = ''
|
||||
this.selectIndustryTopCategory = item.index
|
||||
this.selectIndustrySecondCategory = item.index1
|
||||
this.selectIndustryThirdCategory = item.index2
|
||||
this.selectIndustryForthCategory = item.index3
|
||||
},
|
||||
/**
|
||||
* 选择行业分类二级分类
|
||||
*/
|
||||
clickIndustrySecondCategoryItem(index)
|
||||
{
|
||||
if(this.selectIndustrySecondCategory!=index)
|
||||
{
|
||||
this.selectIndustrySecondCategory = index
|
||||
}
|
||||
this.industryCategoryList[this.selectIndustryTopCategory].hierarchy[index].isSpread = !this.industryCategoryList[this.selectIndustryTopCategory].hierarchy[index].isSpread
|
||||
},
|
||||
/**
|
||||
* 选择行业分类三级分类
|
||||
*/
|
||||
clickIndustryThirdCategoryItem(sindex,index)
|
||||
{
|
||||
if(this.selectIndustrySecondCategory!=sindex)
|
||||
{
|
||||
this.selectIndustrySecondCategory = sindex
|
||||
}
|
||||
if(this.selectIndustryThirdCategory!=index)
|
||||
{
|
||||
this.selectIndustryThirdCategory = index
|
||||
}
|
||||
this.industryCategoryList[this.selectIndustryTopCategory].hierarchy[sindex].level2_sectors[index].isSpread = !this.industryCategoryList[this.selectIndustryTopCategory].hierarchy[sindex].level2_sectors[index].isSpread
|
||||
},
|
||||
/**
|
||||
* 选择行业分类四级分类
|
||||
*/
|
||||
clickIndustryForthCategoryItem(sindex,tindex,index)
|
||||
{
|
||||
if(this.selectIndustrySecondCategory!=sindex)
|
||||
{
|
||||
this.selectIndustrySecondCategory = sindex
|
||||
}
|
||||
if(this.selectIndustryThirdCategory!=tindex)
|
||||
{
|
||||
this.selectIndustryThirdCategory = tindex
|
||||
}
|
||||
if(this.selectIndustryForthCategory!=index)
|
||||
{
|
||||
this.selectIndustryForthCategory = index
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 删除选中的行业二级分类
|
||||
*/
|
||||
deleteIndustrySecondCategoryItem()
|
||||
{
|
||||
this.selectIndustrySecondCategory = -1
|
||||
this.selectIndustryThirdCategory = -1
|
||||
this.selectIndustryForthCategory = -1
|
||||
},
|
||||
/**
|
||||
* 删除选中的行业三级分类
|
||||
*/
|
||||
deleteIndustryThirdCategoryItem()
|
||||
{
|
||||
this.selectIndustryThirdCategory = -1
|
||||
this.selectIndustryForthCategory = -1
|
||||
},
|
||||
/**
|
||||
* 删除选中的行业四级分类
|
||||
*/
|
||||
deleteIndustryForthCategoryItem()
|
||||
{
|
||||
this.selectIndustryForthCategory = -1
|
||||
},
|
||||
/**
|
||||
* 点击选择重要性
|
||||
*/
|
||||
@@ -691,12 +825,13 @@
|
||||
},
|
||||
/**
|
||||
* 点击相关股票
|
||||
* @param {Object} code
|
||||
* @param {Object} id 事件id
|
||||
* @param {Object} code 股票代码
|
||||
*/
|
||||
clickLookRelatedStockItem(code)
|
||||
clickLookRelatedStockItem(id,code)
|
||||
{
|
||||
uni.navigateTo({
|
||||
url:'/pages/index/stockDetails/stockDetails?code='+code
|
||||
url:'/pages/index/stockDetails/stockDetails?type=1&code='+code+'&id='+id
|
||||
})
|
||||
},
|
||||
/**
|
||||
@@ -717,7 +852,7 @@
|
||||
/**
|
||||
* 查看事件详情
|
||||
*/
|
||||
clickEventItem(id)
|
||||
clickEventItem(id)
|
||||
{
|
||||
uni.navigateTo({
|
||||
url:'/pages/index/eventDetails/eventDetails?id='+id
|
||||
@@ -728,48 +863,57 @@
|
||||
*/
|
||||
getEventFilterListData()
|
||||
{
|
||||
filterOptions().then(res=>{
|
||||
if(res.code==200)
|
||||
{
|
||||
let timeList = [...res.data.sort_options]
|
||||
this.timeCategoryList = timeList.splice(0,2)
|
||||
let sortList = [...res.data.sort_options]
|
||||
for (let item of sortList) {
|
||||
if(item.name=='最新')
|
||||
{
|
||||
item.icon = '/static/icon/home/new.png'
|
||||
}
|
||||
if(item.name=='热门')
|
||||
{
|
||||
item.icon = '/static/icon/home/hot.png'
|
||||
}
|
||||
if(item.name=='收益率')
|
||||
{
|
||||
item.icon = '/static/icon/home/yield.png'
|
||||
return new Promise((resolve,reject)=>{
|
||||
filterOptions().then(res=>{
|
||||
if(res.code==200)
|
||||
{
|
||||
resolve(1)
|
||||
let timeList = [...res.data.sort_options]
|
||||
this.timeCategoryList = timeList.splice(0,2)
|
||||
let sortList = [...res.data.sort_options]
|
||||
for (let item of sortList) {
|
||||
if(item.name=='最新')
|
||||
{
|
||||
item.icon = '/static/icon/home/new.png'
|
||||
}
|
||||
if(item.name=='热门')
|
||||
{
|
||||
item.icon = '/static/icon/home/hot.png'
|
||||
}
|
||||
if(item.name=='收益率')
|
||||
{
|
||||
item.icon = '/static/icon/home/yield.png'
|
||||
}
|
||||
}
|
||||
this.sortList = res.data.sort_options.splice(0,3)
|
||||
this.importanceList = res.data.importance_options
|
||||
this.importanceList.unshift({desc: "全部",key: "all",name: "全部"})
|
||||
}else
|
||||
{
|
||||
reject(1)
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
}
|
||||
this.sortList = res.data.sort_options.splice(0,3)
|
||||
this.importanceList = res.data.importance_options
|
||||
this.importanceList.unshift({desc: "全部",key: "all",name: "全部"})
|
||||
}else
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
|
||||
}).catch(error=>{
|
||||
|
||||
}).catch(error=>{
|
||||
reject(1)
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
/**
|
||||
* 获取行业分类
|
||||
*/
|
||||
getIndustryCategoryListData()
|
||||
{
|
||||
industryCategoryList().then(res=>{
|
||||
this.industryTopCategoryList = res.data
|
||||
}).catch(error=>{
|
||||
|
||||
return new Promise((resolve,reject)=>{
|
||||
industryCategoryList().then(res=>{
|
||||
this.industryCategoryList = res.data
|
||||
resolve(1)
|
||||
}).catch(error=>{
|
||||
reject(1)
|
||||
})
|
||||
})
|
||||
},
|
||||
/**
|
||||
@@ -777,21 +921,27 @@
|
||||
*/
|
||||
getStockCategoryListData()
|
||||
{
|
||||
stockCategoryList().then(res=>{
|
||||
if(res.code==200)
|
||||
{
|
||||
for (let item of res.data) {
|
||||
item.sub_sectors.unshift('全部')
|
||||
return new Promise((resolve,reject)=>{
|
||||
stockCategoryList().then(res=>{
|
||||
if(res.code==200)
|
||||
{
|
||||
for (let item of res.data) {
|
||||
item.sub_sectors.unshift('全部')
|
||||
}
|
||||
res.data.unshift({primary_sector:'全部',sub_sectors:[]})
|
||||
this.stockCategoryList = res.data
|
||||
resolve(1)
|
||||
}else
|
||||
{
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
reject(1)
|
||||
}
|
||||
res.data.unshift({primary_sector:'全部',sub_sectors:[]})
|
||||
this.stockCategoryList = res.data
|
||||
}else
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
}).catch(error=>{
|
||||
reject(1)
|
||||
})
|
||||
})
|
||||
},
|
||||
/**
|
||||
@@ -799,7 +949,15 @@
|
||||
*/
|
||||
getEventListData()
|
||||
{
|
||||
let param = {page:this.page,keywords:this.keywords}
|
||||
let param = {page:this.page,q:this.keywords}
|
||||
if(this.selectTopCategory>0)
|
||||
{
|
||||
param.stock_sector = this.stockCategoryList[this.selectTopCategory].primary_sector
|
||||
}
|
||||
if(this.selectSecondCategory>0)
|
||||
{
|
||||
param.secondary_sector = this.stockCategoryList[this.selectTopCategory].sub_sectors[this.selectSecondCategory]
|
||||
}
|
||||
if(this.startDate)
|
||||
{
|
||||
param.start_date = this.startDate
|
||||
@@ -816,42 +974,143 @@
|
||||
{
|
||||
param.sort = this.selectSortKey
|
||||
}
|
||||
if(this.selectIndustryForthCategory>-1)
|
||||
{
|
||||
param.industry_level = 4
|
||||
param.industry_classification = this.industryCategoryList[this.selectIndustryTopCategory].hierarchy[this.selectIndustrySecondCategory].level2_sectors[this.selectIndustryThirdCategory].level3_sectors[this.selectIndustryForthCategory].level3_sector
|
||||
}else
|
||||
{
|
||||
if(this.selectIndustryThirdCategory>-1)
|
||||
{
|
||||
param.industry_level = 3
|
||||
param.industry_classification = this.industryCategoryList[this.selectIndustryTopCategory].hierarchy[this.selectIndustrySecondCategory].level2_sectors[this.selectIndustryThirdCategory].level2_sector
|
||||
}else
|
||||
{
|
||||
if(this.selectIndustrySecondCategory>-1)
|
||||
{
|
||||
param.industry_level = 2
|
||||
param.industry_classification = this.industryCategoryList[this.selectIndustryTopCategory].hierarchy[this.selectIndustrySecondCategory].level1_sector
|
||||
|
||||
}else
|
||||
{
|
||||
param.industry_level = 1
|
||||
param.industry_classification = this.industryCategoryList[this.selectIndustryTopCategory].classification_name
|
||||
}
|
||||
}
|
||||
}
|
||||
eventList(param).then(res=>{
|
||||
if(res.success)
|
||||
{
|
||||
let valueData = []
|
||||
let data = res.data.overall_stats.change_distribution
|
||||
valueData.push({
|
||||
value:data.limit_down,
|
||||
itemStyle: {color:'#35542266'},
|
||||
label:{
|
||||
textStyle: {color:'#35542266'},
|
||||
},
|
||||
})
|
||||
valueData.push({
|
||||
value:data.down_over_5,
|
||||
itemStyle: {color:'#35542299'},
|
||||
label:{
|
||||
textStyle: {color:'#355422'},
|
||||
},
|
||||
},)
|
||||
valueData.push({
|
||||
value:data.down_5_to_1,
|
||||
itemStyle: {color:'#355422CC'},
|
||||
label:{
|
||||
textStyle: {color:'#355422'},
|
||||
},
|
||||
})
|
||||
valueData.push({
|
||||
value:data.down_within_1,
|
||||
itemStyle: {color:'#355422'},
|
||||
label:{
|
||||
textStyle: {color:'#355422'},
|
||||
},
|
||||
})
|
||||
valueData.push({
|
||||
value:data.flat,
|
||||
itemStyle: {color:'#ACB0C0'},
|
||||
label:{
|
||||
textStyle: {color:'#666'},
|
||||
},
|
||||
},)
|
||||
valueData.push({
|
||||
value:data.up_within_1,
|
||||
itemStyle: {color:'#C00000'},
|
||||
label:{
|
||||
textStyle: {color:'#C00000'},
|
||||
},
|
||||
})
|
||||
valueData.push({
|
||||
value:data.up_1_to_5,
|
||||
itemStyle: {color:'#C00000CC'},
|
||||
label:{
|
||||
textStyle: {color:'#C00000'},
|
||||
}
|
||||
})
|
||||
valueData.push({
|
||||
value:data.up_over_5,
|
||||
itemStyle: {color:'#C0000099'},
|
||||
label:{
|
||||
textStyle: {color:'#C00000'},
|
||||
}
|
||||
})
|
||||
valueData.push({
|
||||
value:data.limit_up,
|
||||
itemStyle: {color:'#C0000066'},
|
||||
label:{
|
||||
textStyle: {color:'#C0000066'},
|
||||
}
|
||||
})
|
||||
this.option.series[0].data = valueData
|
||||
this.init()
|
||||
if(this.page==1)
|
||||
{
|
||||
this.eventList = res.data.events
|
||||
}else
|
||||
this.eventList = this.eventList.concat(res.data.events)
|
||||
|
||||
this.loadAll = !res.data.pagination.has_next
|
||||
}
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
let token = uni.getStorageSync('token')
|
||||
if(!token)
|
||||
{
|
||||
let param1 = {email:'1198731706@qq.com',password:'Aa123456',isJson:1}
|
||||
loginByEmail(param1).then(res=>{
|
||||
if (res.code==200) {
|
||||
uni.setStorageSync('token',res.data.token)
|
||||
} else
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
/**
|
||||
* 获取热门事件数据
|
||||
*/
|
||||
getHotEventListData()
|
||||
{
|
||||
homeData().then(res=>{
|
||||
let param = {page:this.page,q:this.keywords}
|
||||
if(this.selectTopCategory>0)
|
||||
{
|
||||
param.stock_sector = this.stockCategoryList[this.selectTopCategory].primary_sector
|
||||
}
|
||||
if(this.selectSecondCategory>0)
|
||||
{
|
||||
param.secondary_sector = this.stockCategoryList[this.selectTopCategory].sub_sectors[this.selectSecondCategory]
|
||||
}
|
||||
if(this.startDate)
|
||||
{
|
||||
param.start_date = this.startDate
|
||||
}
|
||||
if(this.endDate)
|
||||
{
|
||||
param.end_date = this.endDate
|
||||
}
|
||||
if(this.selectImportanceIndex>0)
|
||||
{
|
||||
param.importance = this.importanceList[this.selectImportanceIndex].key
|
||||
}
|
||||
if(this.selectSortKey)
|
||||
{
|
||||
param.sort = this.selectSortKey
|
||||
}
|
||||
homeData(param).then(res=>{
|
||||
if(res.code==200)
|
||||
{
|
||||
if(this.page==1)
|
||||
@@ -1405,18 +1664,119 @@
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
.searchResultList
|
||||
{
|
||||
.item
|
||||
{
|
||||
padding: 10rpx 44rpx;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
color: #444;
|
||||
.key
|
||||
{
|
||||
color: #F97316;
|
||||
}
|
||||
}
|
||||
}
|
||||
.industryList
|
||||
{
|
||||
margin-top: 24rpx;
|
||||
.selectCategoryList
|
||||
{
|
||||
padding: 0 22rpx;
|
||||
.item
|
||||
{
|
||||
background-color: #FFF1E7;
|
||||
margin-right: 15rpx;
|
||||
padding-left: 16rpx;
|
||||
line-height: 38rpx;
|
||||
border-radius: 10rpx;
|
||||
border: solid .5px #F97316;
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #F97316;
|
||||
.deleteC
|
||||
{
|
||||
padding: 0 11rpx;
|
||||
.icon
|
||||
{
|
||||
width: 15rpx;
|
||||
height: 15rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.list
|
||||
{
|
||||
margin-top: 20rpx;
|
||||
.topCategory
|
||||
{
|
||||
padding: 0 30rpx;
|
||||
padding: 0 22rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
color: #F97316;
|
||||
}
|
||||
.secondItem
|
||||
{
|
||||
padding: 0 22rpx;
|
||||
}
|
||||
.thirdItem
|
||||
{
|
||||
padding-left: 36rpx;
|
||||
}
|
||||
.forthItem
|
||||
{
|
||||
padding-left: 36rpx;
|
||||
.categoryC.select
|
||||
{
|
||||
border-bottom: solid .5px #F97316;
|
||||
}
|
||||
}
|
||||
.categoryC
|
||||
{
|
||||
height: 50rpx;
|
||||
.spread
|
||||
{
|
||||
margin-right: 12rpx;
|
||||
width: 24rpx;
|
||||
line-height: 22rpx;
|
||||
border: solid .5px #8C8C8C;
|
||||
font-size: 22rpx;
|
||||
color: #8C8C8C;
|
||||
text-align: center;
|
||||
}
|
||||
.category
|
||||
{
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #444;
|
||||
|
||||
}
|
||||
}
|
||||
.categoryC.select
|
||||
{
|
||||
.spread
|
||||
{
|
||||
color: #F97316;
|
||||
border: solid .5px #F97316;
|
||||
}
|
||||
.category
|
||||
{
|
||||
color: #F97316;
|
||||
}
|
||||
.selectC
|
||||
{
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
border: solid .5px #F97316;
|
||||
.icon
|
||||
{
|
||||
display: block;
|
||||
width: 20rpx;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.importanceList
|
||||
|
||||
@@ -2,18 +2,29 @@
|
||||
<view>
|
||||
<navBar :leftText="navTitle"></navBar>
|
||||
<image class="topBg absolute" src="/static/image/mine/myTopBg.png" mode="widthFix"></image>
|
||||
<view class="tabC fixed" :style="'top:'+navH+'px;'">
|
||||
<view v-if="type==1" class="tabC fixed" :style="'top:'+navH+'px;'">
|
||||
<view :class="'item relative '+(selectCategory==index?'select':'')" v-for="(item,index) in categoryList" :key="index" @click="clickCategoryItem(index)">
|
||||
{{item}}
|
||||
<view v-if="selectCategory==index" class="line absolute"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentC fixed" :style="'top:'+contentTop+'px;'">
|
||||
<view style="width:750rpx; height:400rpx">
|
||||
<view :class="'contentC fixed '+(type==2?'radius':'')" :style="'top:'+contentTop+'px;'">
|
||||
<view v-if="type==1" style="width:750rpx; height:400rpx">
|
||||
<l-echart ref="chartRef"></l-echart>
|
||||
</view>
|
||||
<view class="section">关联描述</view>
|
||||
<view class="des">全球原油运输巨头,VLCC运力规模全球第一,直接受益于霍尔木兹海峡地缘风险带来的运价上涨及风险溢价。</view>
|
||||
<view class="des">{{relatedDesc}}</view>
|
||||
<view v-if="type==1&&sourceList.length>0" class="section">信息来源</view>
|
||||
<view class="list">
|
||||
<view class="item" v-for="(item,index) in sourceList" :key="index">
|
||||
<view class="content">{{item.sentences}}</view>
|
||||
<view class="article">——《{{item.report_title}}》</view>
|
||||
<view class="authorDateC flex">
|
||||
<view class="author flex1">{{item.author}}</view>
|
||||
<view class="date">{{getLocalDate(item.declare_date)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -21,6 +32,7 @@
|
||||
<script>
|
||||
import { inject } from 'vue';
|
||||
import { stockCandlestickChartData, stockDetails } from '@/request/api';
|
||||
import { getLocalDate } from '@/utils/util.js';
|
||||
const echarts = require('../../../uni_modules/lime-echart/static/echarts.min.js');
|
||||
|
||||
export default {
|
||||
@@ -29,18 +41,33 @@
|
||||
navH:inject('navHeight'),
|
||||
contentTop:'',
|
||||
navTitle:'',
|
||||
type:'', //1事件详情2投资详情
|
||||
eventId:'', //事件id
|
||||
stockCode:'', //股票code
|
||||
categoryList:['分钟线','分时图','日K线'],
|
||||
categoryList:['分时图','日K线'],
|
||||
selectCategory:0,
|
||||
option:{
|
||||
title: {
|
||||
show:false
|
||||
},
|
||||
tooltip: {
|
||||
position:function (pos, params, dom, rect, size) {
|
||||
// 鼠标在左侧时 tooltip 显示到右侧,鼠标在右侧时 tooltip 显示到左侧。
|
||||
var obj = {top: '10%'};
|
||||
obj[['left', 'right'][+(pos[0] < size.viewSize[0] / 2)]] = 5;
|
||||
|
||||
return obj;
|
||||
},
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'cross'
|
||||
}
|
||||
},
|
||||
formatter: function (params) {
|
||||
console.log(params)
|
||||
let res = '日期:'+params[0].name+'\n'+'开盘价:'+params[0].data[1]+'\n'+'收盘价:'+params[0].data[2]+'\n'+'最低价:'+params[0].data[3]+'\n'+'最高价:'+params[0].data[4]
|
||||
console.log(res)
|
||||
return res; // 经过这么一加工,最终返回出去并渲染,最终就出现了我们所看的效果
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
show:false
|
||||
@@ -81,117 +108,90 @@
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: '日K',
|
||||
type: 'candlestick',
|
||||
data: [],
|
||||
itemStyle: {
|
||||
color: '#ec0000',
|
||||
color0: '#8A0000',
|
||||
borderColor: '#00da3c',
|
||||
borderColor0: '#008F28'
|
||||
},
|
||||
markPoint: {
|
||||
label: {
|
||||
formatter: function (param) {
|
||||
return param != null ? Math.round(param.value) + '' : '';
|
||||
}
|
||||
},
|
||||
data: [
|
||||
{
|
||||
name: 'Mark',
|
||||
coord: ['2013/5/31', 2300],
|
||||
value: 2300,
|
||||
itemStyle: {
|
||||
color: 'rgb(41,60,85)'
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'highest value',
|
||||
type: 'max',
|
||||
valueDim: 'highest'
|
||||
},
|
||||
{
|
||||
name: 'lowest value',
|
||||
type: 'min',
|
||||
valueDim: 'lowest'
|
||||
},
|
||||
{
|
||||
name: 'average value on close',
|
||||
type: 'average',
|
||||
valueDim: 'close'
|
||||
}
|
||||
],
|
||||
tooltip: {
|
||||
formatter: function (param) {
|
||||
return param.name + '<br>' + (param.data.coord || '');
|
||||
}
|
||||
}
|
||||
},
|
||||
markLine: {
|
||||
symbol: ['none', 'none'],
|
||||
data: [
|
||||
[
|
||||
{
|
||||
name: 'from lowest to highest',
|
||||
type: 'min',
|
||||
valueDim: 'lowest',
|
||||
symbol: 'circle',
|
||||
symbolSize: 10,
|
||||
label: {
|
||||
show: false
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'max',
|
||||
valueDim: 'highest',
|
||||
symbol: 'circle',
|
||||
symbolSize: 10,
|
||||
label: {
|
||||
show: false
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
show: false
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
{
|
||||
name: 'min line on close',
|
||||
type: 'min',
|
||||
valueDim: 'close'
|
||||
},
|
||||
{
|
||||
name: 'max line on close',
|
||||
type: 'max',
|
||||
valueDim: 'close'
|
||||
}
|
||||
]
|
||||
}
|
||||
name: '日K',
|
||||
type: 'candlestick',
|
||||
data: [],
|
||||
itemStyle: {
|
||||
color: '#ec0000',
|
||||
color0: '#8A0000',
|
||||
borderColor: '#00da3c',
|
||||
borderColor0: '#008F28'
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
option1:{
|
||||
title: {
|
||||
show:false
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis'
|
||||
},
|
||||
grid: {
|
||||
left: '10%',
|
||||
right: '12%',
|
||||
bottom: '10%'
|
||||
},
|
||||
xAxis: {
|
||||
type:'category'
|
||||
},
|
||||
yAxis: {
|
||||
scale:true
|
||||
},
|
||||
dataZoom: [
|
||||
{
|
||||
type: 'inside'
|
||||
}
|
||||
],
|
||||
series: {
|
||||
name: '分时图',
|
||||
type: 'line',
|
||||
markLine: {
|
||||
silent: true,
|
||||
symbol:['none','none'],
|
||||
lineStyle: {
|
||||
width: 2,
|
||||
color: '#AAA'
|
||||
},
|
||||
data: []
|
||||
},
|
||||
}
|
||||
},
|
||||
relatedDesc:'', //关联描述
|
||||
sourceList:[], //来源列表
|
||||
getLocalDate:getLocalDate
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.contentTop = this.navH+(60+10)/750*inject('windowWidth')
|
||||
if(e.code)
|
||||
{
|
||||
this.stockCode = e.code
|
||||
this.getStockDetailsData()
|
||||
this.getStockCandlestickChartData()
|
||||
this.type = e.type
|
||||
if(e.type==1)
|
||||
{
|
||||
//事件详情
|
||||
this.contentTop = this.navH+(60+8)/750*inject('windowWidth')
|
||||
this.eventId = e.id
|
||||
this.stockCode = e.code
|
||||
this.getStockDetailsData()
|
||||
}else
|
||||
{
|
||||
//投资详情
|
||||
this.contentTop = this.navH
|
||||
this.navTitle = e.name+'('+e.code+')'
|
||||
this.relatedDesc = e.des
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async init() {
|
||||
// chart 图表实例不能存在data里
|
||||
const chart = await this.$refs.chartRef.init(echarts);
|
||||
chart.setOption(this.option)
|
||||
if(this.selectCategory==0)
|
||||
{
|
||||
//分时图
|
||||
chart.setOption(this.option1)
|
||||
}else
|
||||
chart.setOption(this.option)
|
||||
},
|
||||
/**
|
||||
* 点击切换分类
|
||||
@@ -202,10 +202,12 @@
|
||||
if(this.selectCategory!=index)
|
||||
{
|
||||
this.selectCategory = index
|
||||
if(index==0||index==2)
|
||||
if(index==1)
|
||||
{
|
||||
//日k
|
||||
this.getStockCandlestickChartData()
|
||||
}
|
||||
}else
|
||||
this.init()
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -214,10 +216,48 @@
|
||||
getStockDetailsData()
|
||||
{
|
||||
let stockCode = this.stockCode
|
||||
stockDetails(stockCode).then(res=>{
|
||||
let eventId = this.eventId
|
||||
stockDetails(eventId,stockCode).then(res=>{
|
||||
if(res.code==200)
|
||||
{
|
||||
this.navTitle = res.data.basic_info.stock_name+'('+res.data.basic_info.stock_code+')'
|
||||
let data = res.data.minute_chart_data
|
||||
let categoryData = []
|
||||
let valueData = []
|
||||
for (let item of data) {
|
||||
categoryData.push(item.time)
|
||||
valueData.push(item.close)
|
||||
}
|
||||
this.option1.xAxis.data = categoryData
|
||||
this.option1.series.data = valueData
|
||||
this.option1.series.markLine.data = [{
|
||||
yAxis:data[0].open,
|
||||
label:{
|
||||
show:true,
|
||||
position:'start',
|
||||
// formatter:'111',
|
||||
color:'#333'
|
||||
},
|
||||
},
|
||||
{
|
||||
yAxis:data[0].open,
|
||||
label:{
|
||||
show:true,
|
||||
position:'end',
|
||||
formatter:'0.00%',
|
||||
color:'#333'
|
||||
},
|
||||
}]
|
||||
let relatedDesc = res.data.related_desc
|
||||
if(relatedDesc)
|
||||
{
|
||||
this.relatedDesc = relatedDesc.relation_desc
|
||||
if(relatedDesc.retrieved_sources)
|
||||
{
|
||||
this.sourceList = relatedDesc.retrieved_sources
|
||||
}
|
||||
}
|
||||
this.init()
|
||||
}else
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
@@ -234,17 +274,20 @@
|
||||
{
|
||||
let stockCode = this.stockCode
|
||||
let param = {chart_type:'minute'}
|
||||
if(this.selectCategory==2)
|
||||
if(this.selectCategory==1)
|
||||
{
|
||||
param.chart_type = 'daily'
|
||||
}
|
||||
stockCandlestickChartData(stockCode,param).then(res=>{
|
||||
let data = res.data
|
||||
let categoryData = []
|
||||
let valueData = []
|
||||
for (let item of data) {
|
||||
categoryData.push(item.time)
|
||||
valueData.push([item.open,item.close,item.low,item.high])
|
||||
}
|
||||
this.option.xAxis.data = categoryData
|
||||
this.option.series[0].data = valueData
|
||||
this.init()
|
||||
}).catch(error=>{
|
||||
|
||||
@@ -298,6 +341,7 @@
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow-y: scroll;
|
||||
.section
|
||||
{
|
||||
padding: 0 28rpx;
|
||||
@@ -308,11 +352,54 @@
|
||||
}
|
||||
.des
|
||||
{
|
||||
padding: 0 30rpx;
|
||||
padding: 0 0 30rpx;
|
||||
margin: 0 25rpx;
|
||||
border-bottom: solid 1rpx #E4E4E4;
|
||||
line-height: 1.4rem;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.list
|
||||
{
|
||||
padding: 0 25rpx;
|
||||
.item
|
||||
{
|
||||
background-color: #F8F8F8;
|
||||
margin-bottom: 20rpx;
|
||||
padding: 30rpx 26rpx;
|
||||
border-radius: 10rpx;
|
||||
.content
|
||||
{
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
color: #222;
|
||||
}
|
||||
.article
|
||||
{
|
||||
margin-top: 10rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
text-align: right;
|
||||
}
|
||||
.authorDateC
|
||||
{
|
||||
margin-top: 30rpx;
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
color: #AAA;
|
||||
.author
|
||||
{
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.contentC.radius
|
||||
{
|
||||
margin-top: 10rpx;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
<view class="navTitle fixed" :style="'top:'+menuTop+'px;line-height:'+menuH+'px;'">投资</view>
|
||||
<view class="searchC fixed flex" :style="'top:'+navH+'px;'">
|
||||
<image class="icon" src="/static/icon/home/search.png" mode="widthFix"></image>
|
||||
<input class="flex1" type="text" placeholder="搜索话题/股票名称" placeholder-style="color:#94989A"/>
|
||||
<input class="flex1" type="text" v-model="keywords" placeholder="搜索话题/股票名称" placeholder-style="color:#94989A"/>
|
||||
<view class="line"></view>
|
||||
<view class="search">搜索</view>
|
||||
<view class="search" @click="clickSearch()">搜索</view>
|
||||
</view>
|
||||
<view class="contentC fixed" :style="'top:'+contentTop+'px;'">
|
||||
<scroll-view scroll-y class="contentC fixed" :style="'top:'+contentTop+'px;'" @scrolltolower="loadMoreData()">
|
||||
<view class="">
|
||||
<view class="todayC flex" >
|
||||
<view class="todayDateC flex" @click="clickExpandOrRetract()">
|
||||
<view class="todayDateC flex" @click="clickSelectMonth()">
|
||||
<view class="date">{{selectDate}}</view>
|
||||
<image class="icon" src="/static/icon/invest/calendar.png" mode="widthFix"></image>
|
||||
</view>
|
||||
@@ -64,7 +64,8 @@
|
||||
<view class="expandBgC flexCenter">
|
||||
<view class="expandC flex" @click="clickExpandOrRetract()">
|
||||
<text>{{isExpand?'收起':'展开'}}</text>
|
||||
<image class="arrow" src="/static/icon/invest/downArrow.png" mode="widthFix"></image>
|
||||
<image v-if="isExpand" class="arrow" src="/static/icon/invest/upArrow.png" mode="widthFix"></image>
|
||||
<image v-else class="arrow" src="/static/icon/invest/downArrow.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -81,9 +82,9 @@
|
||||
<view class="item" v-for="(item,index) in eventList" :key="index" @click="clickEventItem(item.id)">
|
||||
<view class="flex">
|
||||
<view class="time flex1">{{getLocaleHourMinute(item.start_time)}}</view>
|
||||
<view class="starC relative">
|
||||
<view class="starC">
|
||||
<view class="starList flex" >
|
||||
<image class="icon" :src="(sindex<(item.star)?'/static/icon/invest/star_s.png':'/static/icon/invest/star.png')" mode="widthFix" v-for="(sitem,sindex) in 5" :key="index"></image>
|
||||
<image class="icon" :src="(sindex<(item.category.star_rating)?'/static/icon/invest/star_s.png':'/static/icon/invest/star.png')" mode="widthFix" v-for="(sitem,sindex) in 5" :key="index"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -91,19 +92,19 @@
|
||||
<view class="category">{{item.category.event_type}}</view>
|
||||
<view class="title flex1">{{item.title}}</view>
|
||||
</view>
|
||||
<view class="labelC">
|
||||
<view class="label">
|
||||
|
||||
<scroll-view scroll-x class="labelC">
|
||||
<view class="label" v-for="(titem,tindex) in item.tags" :key="tindex">
|
||||
{{titem}}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="content">
|
||||
<text>{{item.description}}</text>
|
||||
<ua-markdown :source="replaceAnswerLabel(item.description)" />
|
||||
</view>
|
||||
<scroll-view v-if="item.concepts" scroll-x class="percentList">
|
||||
<view class="percentItem" v-for="(citem,cindex) in JSON.parse(item.concepts)" :key="cindex">
|
||||
{{citem[0]}}
|
||||
<zui-progress-circle :position="citem[2]" :range="[270,630]" :size="26" :ring-width="2" :texture="['#F97316','#E3E3E3']">
|
||||
<view class="num">{{citem[2]*100}}%</view>
|
||||
<scroll-view v-if="item.related_concepts" scroll-x class="percentList">
|
||||
<view class="percentItem" v-for="(citem,cindex) in item.related_concepts" :key="cindex">
|
||||
{{citem.name}}
|
||||
<zui-progress-circle :position="citem.score" :range="[270,630]" :size="26" :ring-width="2" :texture="['#F97316','#E3E3E3']">
|
||||
<view class="num">{{citem.score*100}}%</view>
|
||||
</zui-progress-circle>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@@ -114,30 +115,58 @@
|
||||
<view class="flex">
|
||||
<view class="time flex1">{{getLocaleHourMinute(item.created_at)}}</view>
|
||||
<view class="starC relative">
|
||||
<view class="starBgList flex">
|
||||
<image class="icon" src="/static/icon/invest/star.png" mode="widthFix" v-for="(item,index) in 5" :key="index"></image>
|
||||
</view>
|
||||
<view class="starList absolute flex">
|
||||
<image class="icon" src="/static/icon/invest/star_s.png" mode="widthFix" v-for="(item,index) in 5" :key="index"></image>
|
||||
<view class="starList flex" >
|
||||
<image class="icon" :src="(sindex<(item.star)?'/static/icon/invest/star_s.png':'/static/icon/invest/star.png')" mode="widthFix" v-for="(sitem,sindex) in 5" :key="index"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="valueList flex between">
|
||||
<view class="pre">前值 -7.1</view>
|
||||
<view class="prediction">预测 93</view>
|
||||
<view class="actual">实际 ————</view>
|
||||
<view class="pre">前值 {{item.former}}</view>
|
||||
<view class="prediction">预测 {{item.forecast?item.forecast:'--'}}</view>
|
||||
<view class="actual">实际 {{item.fact?item.fact:'--'}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<uni-popup ref="popup" type="top">
|
||||
<view class="popup" :style="'margin-top:'+navH+'px;'">
|
||||
<view class="yearMonthC flex">
|
||||
<view class="preC btn flexCenter" @click="clickPreMonth()">
|
||||
<image class="icon" src="/static/icon/home/monthLeftArrow.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="yearMonth flex1">{{selectMonth}}</view>
|
||||
<view class="nextC btn flexCenter" @click="clickNextMonth()">
|
||||
<image class="icon" src="/static/icon/home/monthRightArrow.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="weekList flex">
|
||||
<view class="item flex1" v-for="(item,index) in weekList" :key="index">{{item}}</view>
|
||||
</view>
|
||||
<view class="monthDateList flexWrap">
|
||||
<view class="item flexColumnCenter" v-for="(item,index) in calendarDateList[selectMonthIndex]" :key="index" @click="clickSelectDate(item)">
|
||||
<block v-if="item.isToday||item.date==selectDate">
|
||||
<view class="date today">{{item.day}}</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<block v-if="!item.isCurrentMonth">
|
||||
<view class="date notCurrentMonth">{{item.day}}</view>
|
||||
</block>
|
||||
<block v-else>
|
||||
<view class="date">{{item.day}}</view>
|
||||
</block>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { inject } from 'vue'
|
||||
import { stockCategoryList, calendarEventList, calendarDataList, calendarEventCount, } from '@/request/api'
|
||||
import { getLocaleHourMinute } from '@/utils/util'
|
||||
import { getLocaleHourMinute, replaceAnswerLabel } from '@/utils/util'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -147,7 +176,11 @@
|
||||
navH:inject('navHeight'),
|
||||
windowWidth:inject('windowWidth'),
|
||||
contentTop:'',
|
||||
todayDate:'', //今日日期
|
||||
keywords:'', //搜索关键字
|
||||
todayDate:'', //今日日期
|
||||
calendarDateList:[], //日历日期
|
||||
selectMonth:'', //选中月份
|
||||
selectMonthIndex:0, //选中月份下标
|
||||
weekList:['一','二','三','四','五','六','日'],
|
||||
weekDateList:[], //当前周日期
|
||||
monthDateList:[], //当前月日期
|
||||
@@ -162,73 +195,104 @@
|
||||
progress: 75,
|
||||
eventList:[], //事件列表
|
||||
dataList:[], //数据列表
|
||||
getLocaleHourMinute:getLocaleHourMinute
|
||||
page:1,
|
||||
loadAll:false,
|
||||
getLocaleHourMinute:getLocaleHourMinute,
|
||||
replaceAnswerLabel:replaceAnswerLabel
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
let date = new Date()
|
||||
this.contentTop = this.navH + (75+20)/750*inject('windowWidth')
|
||||
let year = date.getFullYear()
|
||||
let month = date.getMonth()+1
|
||||
let day = date.getDate()
|
||||
this.todayDate = this.selectDate = date.getFullYear()+'-'+(month>9?month:('0'+month))+'-'+(day>9?day:('0'+day))
|
||||
let currentYear = date.getFullYear()
|
||||
let currentMonth = date.getMonth()+1
|
||||
let currentDay = date.getDate()
|
||||
this.todayDate = this.selectDate = currentYear+'-'+(currentMonth>9?currentMonth:('0'+currentMonth))+'-'+(currentDay>9?currentDay:('0'+currentDay))
|
||||
let week = date.getDay() || 7
|
||||
let diff = week - 1
|
||||
let daysOfWeek = [];
|
||||
for (var i = 0; i < 7; i++) {
|
||||
let newDate = new Date()
|
||||
newDate.setDate(day - diff + i); // 设置日期为当前周的相应日期
|
||||
newDate.setDate(currentDay - diff + i); // 设置日期为当前周的相应日期
|
||||
let newDay = newDate.getDate()
|
||||
let date = year+'-'+(month>9?month:('0'+month))+'-'+(newDay>9?newDay:('0'+newDay))
|
||||
daysOfWeek.push({date:date,day:newDay,isToday:newDay==day?true:false});
|
||||
let date = currentYear+'-'+(currentMonth>9?currentMonth:('0'+currentMonth))+'-'+(newDay>9?newDay:('0'+newDay))
|
||||
daysOfWeek.push({date:date,day:newDay,isToday:newDay==currentDay?true:false});
|
||||
}
|
||||
this.weekDateList = daysOfWeek
|
||||
let firstDayOfMonth = new Date();
|
||||
firstDayOfMonth.setDate(1);
|
||||
//获取当前月天数
|
||||
let currentMonthDay = new Date(year, month, 0).getDate()
|
||||
let firstDayWeek = firstDayOfMonth.getDay() || 7
|
||||
let daysOfMonth = []
|
||||
for (var i = 1; i <= currentMonthDay; i++) {
|
||||
let newDate = new Date()
|
||||
newDate.setDate(i); // 设置日期为当前月的相应日期
|
||||
let newDay = newDate.getDate()
|
||||
let date = year+'-'+(month>9?month:('0'+month))+'-'+(newDay>9?newDay:('0'+newDay))
|
||||
daysOfMonth.push({date:date,day:newDay,isToday:newDay==day?true:false,isCurrentMonth:true});
|
||||
}
|
||||
for (var i = 0; i < firstDayWeek-1; i++) {
|
||||
//获取上月天数
|
||||
let lastMonthDay = new Date(year, month-1, 0).getDate()
|
||||
//获取上月日期
|
||||
let newDate = new Date(year,month-2,lastMonthDay-i)
|
||||
let newMonth = newDate.getMonth()+1
|
||||
let newDay = newDate.getDate()
|
||||
let date = year+'-'+(newMonth>9?newMonth:('0'+newMonth))+'-'+(newDay>9?newDay:('0'+newDay))
|
||||
daysOfMonth.unshift({date:date,day:newDay,isToday:false,isCurrentMonth:false});
|
||||
}
|
||||
// 下一个月的第一天
|
||||
let nextMonthFirstDay = new Date(year, month, 1);
|
||||
// 然后减去一天就是当前月的最后一天
|
||||
let lastDayOfMonth = new Date(nextMonthFirstDay - (24 * 60 * 60 * 1000)); // 减去一天的毫秒数
|
||||
let lastDayWeek = lastDayOfMonth.getDay() || 7; // 返回0(星期天)到6(星期六)之
|
||||
for (var i = 1; i < 8-lastDayWeek; i++) {
|
||||
if(month>11)
|
||||
{
|
||||
month = -1
|
||||
year ++
|
||||
let calendarDateList = []
|
||||
this.selectMonthIndex = 20*12+currentMonth-1
|
||||
this.selectMonth = currentYear + '-' + (currentMonth>9?currentMonth:('0'+currentMonth))
|
||||
for (var i = currentYear-20; i < currentYear+20; i++) {
|
||||
for (var j = 0; j < 12; j++) {
|
||||
let date = new Date(i,j+1,0)
|
||||
let firstDayOfMonth = new Date(i,j+1,0);
|
||||
firstDayOfMonth.setDate(1);
|
||||
//获取当前月天数
|
||||
let currentMonthDay = date.getDate()
|
||||
let firstDayWeek = firstDayOfMonth.getDay() || 7
|
||||
let daysOfMonth = []
|
||||
for (var k = 1; k <= currentMonthDay; k++) {
|
||||
let newDate = new Date(i,j+1,0)
|
||||
newDate.setDate(k); // 设置日期为当前月的相应日期
|
||||
let newMonth = newDate.getMonth()+1
|
||||
let newDay = newDate.getDate()
|
||||
let time = newDate.getTime()
|
||||
let date = i+'-'+(newMonth>9?newMonth:('0'+newMonth))+'-'+(newDay>9?newDay:('0'+newDay))
|
||||
daysOfMonth.push({date:date,year:i,month:newMonth,day:newDay,isToday:(i==currentYear&&newMonth==currentMonth&&newDay==currentDay)?true:false,isCurrentMonth:true,timestamp:time});
|
||||
}
|
||||
for (var k = 0; k < firstDayWeek-1; k++) {
|
||||
//获取上月天数
|
||||
let year = i
|
||||
let month = j
|
||||
if(j<1)
|
||||
{
|
||||
year = i - 1
|
||||
month = 12
|
||||
}
|
||||
let lastMonthDay = new Date(year, month, 0).getDate()
|
||||
//获取上月日期
|
||||
let newDate = new Date(year,month-1,lastMonthDay-k)
|
||||
let newMonth = newDate.getMonth()+1
|
||||
let newDay = newDate.getDate()
|
||||
let time = newDate.getTime()
|
||||
let date = year+'-'+(newMonth>9?newMonth:('0'+newMonth))+'-'+(newDay>9?newDay:('0'+newDay))
|
||||
daysOfMonth.unshift({date:date,year:year,month:newMonth,day:newDay,isToday:false,isCurrentMonth:false,timestamp:time});
|
||||
}
|
||||
// 下一个月的第一天
|
||||
let nextMonthFirstDay = new Date(i, j+1, 1);
|
||||
// 然后减去一天就是当前月的最后一天
|
||||
let lastDayOfMonth = new Date(nextMonthFirstDay - (24 * 60 * 60 * 1000)); // 减去一天的毫秒数
|
||||
let lastDayWeek = lastDayOfMonth.getDay() || 7; // 返回0(星期天)到6(星期六)之
|
||||
for (var k = 1; k < 8-lastDayWeek; k++) {
|
||||
let year = i
|
||||
let month = j
|
||||
if(month>11)
|
||||
{
|
||||
month = 0
|
||||
year ++
|
||||
}
|
||||
//获取下月日期
|
||||
let newDate = new Date(year,month + 1,k)
|
||||
let newMonth = newDate.getMonth()+1
|
||||
let newDay = newDate.getDate()
|
||||
let time = newDate.getTime()
|
||||
let date = year+'-'+(newMonth>9?newMonth:('0'+newMonth))+'-'+(newDay>9?newDay:('0'+newDay))
|
||||
daysOfMonth.push({date:date,year:year,month:newMonth,day:newDay,isToday:false,isCurrentMonth:false,timestamp:time});
|
||||
}
|
||||
calendarDateList.push(daysOfMonth)
|
||||
}
|
||||
//获取下月日期
|
||||
let newDate = new Date(year,month + 1,i)
|
||||
let newMonth = newDate.getMonth()+1
|
||||
let newDay = newDate.getDate()
|
||||
let date = year+'-'+(newMonth>9?newMonth:('0'+newMonth))+'-'+(newDay>9?newDay:('0'+newDay))
|
||||
daysOfMonth.push({date:date,day:newDay,isToday:false,isCurrentMonth:false});
|
||||
}
|
||||
this.monthDateList = daysOfMonth
|
||||
this.calendarDateList = calendarDateList
|
||||
this.monthDateList = calendarDateList[this.selectMonthIndex]
|
||||
this.listTop = this.contentTop + (68+40+96+74+70+74+22)/750*inject('windowWidth')
|
||||
this.getStockCategoryListData()
|
||||
this.getEventListData()
|
||||
this.getCurrentMonthEventCountData()
|
||||
Promise.all([this.getStockCategoryListData(),this.getCurrentMonthEventCountData()]).then(res=>{
|
||||
this.getEventListData()
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.reloadData()
|
||||
},
|
||||
computed: {
|
||||
circumference() {
|
||||
@@ -236,6 +300,42 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reloadData()
|
||||
{
|
||||
this.page = 1
|
||||
this.loadAll = false
|
||||
if(this.selectTab==0)
|
||||
{
|
||||
this.getEventListData()
|
||||
}else
|
||||
this.getDataListData()
|
||||
},
|
||||
loadMoreData()
|
||||
{
|
||||
if(!this.loadAll)
|
||||
{
|
||||
this.page ++
|
||||
if(this.selectTab==0)
|
||||
{
|
||||
this.getEventListData()
|
||||
}else
|
||||
this.getDataListData()
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击搜索
|
||||
*/
|
||||
clickSearch()
|
||||
{
|
||||
this.reloadData()
|
||||
},
|
||||
/**
|
||||
* 点击选择月份
|
||||
*/
|
||||
clickSelectMonth()
|
||||
{
|
||||
this.$refs['popup'].open()
|
||||
},
|
||||
/**
|
||||
* 点击今日日期
|
||||
*/
|
||||
@@ -244,11 +344,10 @@
|
||||
if(this.selectDate!=this.todayDate)
|
||||
{
|
||||
this.selectDate = this.todayDate
|
||||
if(this.selectTab==0)
|
||||
{
|
||||
this.getEventListData()
|
||||
}else
|
||||
this.getDataListData()
|
||||
let date = new Date()
|
||||
let currentMonth = date.getMonth()+1
|
||||
this.selectMonthIndex = 20*12+currentMonth-1
|
||||
this.reloadData()
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -263,6 +362,46 @@
|
||||
}else
|
||||
this.listTop = this.contentTop + (68+40+96+74+70+74+22)/750*this.windowWidth
|
||||
},
|
||||
/**
|
||||
* 点击上个月
|
||||
*/
|
||||
clickPreMonth()
|
||||
{
|
||||
if(this.selectMonthIndex>0)
|
||||
{
|
||||
this.selectMonthIndex --
|
||||
let monthList = this.calendarDateList[this.selectMonthIndex]
|
||||
let month = ''
|
||||
for (let item of monthList) {
|
||||
if(item.isCurrentMonth)
|
||||
{
|
||||
month = item.month
|
||||
break
|
||||
}
|
||||
}
|
||||
this.selectMonth = this.calendarDateList[this.selectMonthIndex][0].year+'-'+(month>9?month:('0'+month))
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击下个月
|
||||
*/
|
||||
clickNextMonth()
|
||||
{
|
||||
if(this.selectMonthIndex<this.calendarDateList.length-1)
|
||||
{
|
||||
this.selectMonthIndex ++
|
||||
let monthList = this.calendarDateList[this.selectMonthIndex]
|
||||
let month = ''
|
||||
for (let item of monthList) {
|
||||
if(item.isCurrentMonth)
|
||||
{
|
||||
month = item.month
|
||||
break
|
||||
}
|
||||
}
|
||||
this.selectMonth = this.calendarDateList[this.selectMonthIndex][0].year+'-'+(month>9?month:('0'+month))
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 选中日期
|
||||
* @param {Object} item
|
||||
@@ -272,11 +411,7 @@
|
||||
if(this.selectDate!=item.date)
|
||||
{
|
||||
this.selectDate = item.date
|
||||
if(this.selectTab==0)
|
||||
{
|
||||
this.getEventListData()
|
||||
}else
|
||||
this.getDataListData()
|
||||
this.reloadData()
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -287,11 +422,7 @@
|
||||
if(this.selectTab!=index)
|
||||
{
|
||||
this.selectTab = index
|
||||
if(this.selectTab==0)
|
||||
{
|
||||
this.getEventListData()
|
||||
}else
|
||||
this.getDataListData()
|
||||
this.reloadData()
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -302,11 +433,7 @@
|
||||
if(this.selectTopCategory!=index)
|
||||
{
|
||||
this.selectTopCategory = index
|
||||
if(this.selectTab==0)
|
||||
{
|
||||
this.getEventListData()
|
||||
}else
|
||||
this.getDataListData()
|
||||
this.reloadData()
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -323,41 +450,58 @@
|
||||
*/
|
||||
getStockCategoryListData()
|
||||
{
|
||||
stockCategoryList().then(res=>{
|
||||
if(res.code==200)
|
||||
{
|
||||
res.data.unshift({primary_sector:'全部',sub_sectors:[]})
|
||||
this.stockCategoryList = res.data
|
||||
}else
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
return new Promise((resolve,reject)=>{
|
||||
stockCategoryList().then(res=>{
|
||||
if(res.code==200)
|
||||
{
|
||||
res.data.unshift({primary_sector:'全部',sub_sectors:[]})
|
||||
this.stockCategoryList = res.data
|
||||
resolve(1)
|
||||
}else
|
||||
{
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
reject(1)
|
||||
}
|
||||
|
||||
}).catch(error=>{
|
||||
reject(1)
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
/**
|
||||
* 获取事件列表数据
|
||||
*/
|
||||
getEventListData()
|
||||
{
|
||||
let param = {start:this.selectDate}
|
||||
let param = {start:this.selectDate,q:this.keywords,page:this.page}
|
||||
if(this.selectTopCategory>0)
|
||||
{
|
||||
param.category = this.stockCategoryList[this.selectTopCategory].primary_sector
|
||||
}
|
||||
calendarEventList(param).then(res=>{
|
||||
uni.stopPullDownRefresh()
|
||||
if(res.code==200)
|
||||
{
|
||||
this.eventList = res.data.events
|
||||
if(res.data.page==1)
|
||||
{
|
||||
this.eventList = res.data.events
|
||||
}else
|
||||
this.eventList = this.eventList.concat(res.data.events)
|
||||
if(res.data.page==res.data.total_pages)
|
||||
{
|
||||
this.loadAll = true
|
||||
}
|
||||
}else
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
uni.stopPullDownRefresh()
|
||||
})
|
||||
},
|
||||
/**
|
||||
@@ -365,7 +509,11 @@
|
||||
*/
|
||||
getDataListData()
|
||||
{
|
||||
let param = {start:this.selectDate}
|
||||
let param = {start:this.selectDate,q:this.keywords,page:this.page}
|
||||
if(this.selectTopCategory>0)
|
||||
{
|
||||
param.category = this.stockCategoryList[this.selectTopCategory].primary_sector
|
||||
}
|
||||
calendarDataList(param).then(res=>{
|
||||
if(res.code==200)
|
||||
{
|
||||
@@ -376,7 +524,7 @@
|
||||
icon:'none'
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
uni.stopPullDownRefresh()
|
||||
})
|
||||
},
|
||||
/**
|
||||
@@ -384,26 +532,29 @@
|
||||
*/
|
||||
getCurrentMonthEventCountData()
|
||||
{
|
||||
calendarEventCount().then(res=>{
|
||||
for (let item of res) {
|
||||
let date = item.start
|
||||
for (let s of this.weekDateList) {
|
||||
if(s.date == date)
|
||||
{
|
||||
s.eventCount = item.title
|
||||
s.className = item.className
|
||||
return new Promise((resolve,reject)=>{
|
||||
calendarEventCount().then(res=>{
|
||||
for (let item of res) {
|
||||
let date = item.start
|
||||
for (let s of this.weekDateList) {
|
||||
if(s.date == date)
|
||||
{
|
||||
s.eventCount = item.title
|
||||
s.className = item.className
|
||||
}
|
||||
}
|
||||
for (let s of this.monthDateList) {
|
||||
if(s.date == date)
|
||||
{
|
||||
s.eventCount = item.title
|
||||
s.className = item.className
|
||||
}
|
||||
}
|
||||
}
|
||||
for (let s of this.monthDateList) {
|
||||
if(s.date == date)
|
||||
{
|
||||
s.eventCount = item.title
|
||||
s.className = item.className
|
||||
}
|
||||
}
|
||||
}
|
||||
}).catch(error=>{
|
||||
|
||||
resolve(1)
|
||||
}).catch(error=>{
|
||||
reject(1)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -723,14 +874,22 @@
|
||||
}
|
||||
.labelC
|
||||
{
|
||||
display: inline-block;
|
||||
margin-top: 12rpx;
|
||||
.label
|
||||
{
|
||||
display: inline-block;
|
||||
margin-right: 10rpx;
|
||||
padding: 0 10rpx;
|
||||
line-height: 30rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
border-radius: 5rpx;
|
||||
border: solid 1rpx #333;
|
||||
}
|
||||
}
|
||||
.content
|
||||
{
|
||||
margin-top: 20rpx;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 3;
|
||||
@@ -824,4 +983,89 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.popup
|
||||
{
|
||||
background-color: white;
|
||||
padding: 30rpx 0;
|
||||
.yearMonthC
|
||||
{
|
||||
padding: 0 30rpx;
|
||||
.yearMonth
|
||||
{
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
.btn
|
||||
{
|
||||
background-color: #f8f8f8;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 50%;
|
||||
.icon
|
||||
{
|
||||
display: block;
|
||||
width: 24rpx;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
.weekList
|
||||
{
|
||||
margin-top: 20rpx;
|
||||
padding: 0 30rpx;
|
||||
.item
|
||||
{
|
||||
line-height: 40rpx;
|
||||
font-size: 24rpx;
|
||||
color: #a1a1a1;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.monthDateList
|
||||
{
|
||||
padding: 0 30rpx;
|
||||
.item
|
||||
{
|
||||
margin-bottom: 10rpx;
|
||||
width: calc(100%/7);
|
||||
.date
|
||||
{
|
||||
background-color: #f8f8f8;
|
||||
width: calc(100% - 10rpx);
|
||||
line-height: 64rpx;
|
||||
border-radius: 15rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
text-align: center;
|
||||
}
|
||||
.date.today
|
||||
{
|
||||
background-color: #FF7E1A;
|
||||
color: white;
|
||||
}
|
||||
.date.inRange
|
||||
{
|
||||
background-color: #FFF2EB;
|
||||
}
|
||||
.date.notCurrentMonth
|
||||
{
|
||||
background-color: #fdfdfd;
|
||||
color: #c3c3c3;
|
||||
}
|
||||
.eventNum
|
||||
{
|
||||
margin-top: 12rpx;
|
||||
width: 80rpx;
|
||||
height: 30rpx;
|
||||
line-height: 30rpx;
|
||||
border-radius: 5rpx;
|
||||
font-size: 16rpx;
|
||||
font-weight: 500;
|
||||
color: white;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -8,23 +8,43 @@
|
||||
<view v-if="selectCategory==index" class="line absolute"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentC fixed" :style="'top:'+contentTop+'px;'">
|
||||
<view v-if="selectCategory==3" class="stockC">
|
||||
<view v-if="investDetails" class="contentC fixed" :style="'top:'+contentTop+'px;'">
|
||||
<view v-if="selectCategory==0" class="former">
|
||||
<ua-markdown :source="former" />
|
||||
</view>
|
||||
<view v-if="selectCategory==1" class="former">
|
||||
<ua-markdown :source="investDetails.forecast" />
|
||||
</view>
|
||||
<!-- <view v-if="selectCategory==2" class="former">
|
||||
<ua-markdown :source="investDetails.fact" />
|
||||
</view> -->
|
||||
<view v-if="selectCategory==2" class="stockC">
|
||||
<view class="stockCategoryList flexWrap">
|
||||
<view class="item flexColumnCenter" :style="'background-color:'+item.bgColor+';color:'+item.color+';'" v-for="(item,index) in stockCategoryList" :key="index">
|
||||
<view class="num">23</view>
|
||||
<view class="num">{{item.num}}</view>
|
||||
<view class="title">{{item.title}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="stockList">
|
||||
<view class="item">
|
||||
<view class="item" v-for="(item,index) in investDetails.related_stocks" :key="index" @click="clickLookRelatedStockItem(item)">
|
||||
<view class="titleCorrelationC flex">
|
||||
<view class="title flex1">000065.SZ 北方国际</view>
|
||||
<view class="correlation">相关度: 98%</view>
|
||||
<view class="title flex1">{{item.code+' '+item.name}} </view>
|
||||
<view class="correlation">相关度: {{accMul(item.score,100)}}%</view>
|
||||
</view>
|
||||
<view class="category">石油石化</view>
|
||||
<view class="content">
|
||||
海外订单占比70%-80%,在俄语区矿产资源开发(蒙古矿山)、电力运营经验丰富,是乌克兰重建核心受益标的。公司在俄语区的深厚积累使其直接获益于区域经济复苏和能源合作深化。
|
||||
<view v-if="item.sw_primary_sector" class="category">{{item.sw_primary_sector}}</view>
|
||||
<view class="content">{{item.description}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="selectCategory==4" class="">
|
||||
<view class="conceptList">
|
||||
<view class="item relative" v-for="(item,index) in investDetails.extracted_concepts" :key="index" @click="clickConceptItem()">
|
||||
<image class="cover" :src="item.first_image" mode="aspectFill"></image>
|
||||
<view class="infoC absolute">
|
||||
<view class="title">{{item.name}}</view>
|
||||
<view class="content relative">{{item.reason}}
|
||||
<text class="lookDetails absolute">查看详情</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -35,48 +55,58 @@
|
||||
|
||||
<script>
|
||||
import { inject } from 'vue';
|
||||
import { investEventDetails } from '@/request/api';
|
||||
|
||||
import { investEventDetails, stockCategoryList } from '@/request/api';
|
||||
import { accMul } from '@/utils/util';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
navH:inject('navHeight'),
|
||||
eventId:'', //事件id
|
||||
contentTop:'',
|
||||
categoryList:['背景','推演','实际','相关股票','相关概念'],
|
||||
investDetails:null,
|
||||
former:'', //背景
|
||||
categoryList:['背景','推演','相关股票'],
|
||||
selectCategory:0,
|
||||
stockCategoryList:[
|
||||
{
|
||||
title:'全部股票',
|
||||
num:0,
|
||||
bgColor:'#C00000',
|
||||
color:'white'
|
||||
},
|
||||
{
|
||||
title:'大周期',
|
||||
num:0,
|
||||
bgColor:'#305496',
|
||||
color:'white'
|
||||
},
|
||||
{
|
||||
title:'TMT板块',
|
||||
num:0,
|
||||
bgColor:'#FFBF00',
|
||||
color:'white',
|
||||
},
|
||||
{
|
||||
title:'大金融地产',
|
||||
num:0,
|
||||
bgColor:'#FFF4D3',
|
||||
},
|
||||
{
|
||||
title:'大消费',
|
||||
num:0,
|
||||
bgColor:'#CDEEEE',
|
||||
},
|
||||
{
|
||||
title:'公共产业板块',
|
||||
num:0,
|
||||
bgColor:'#DEEBF7'
|
||||
}]
|
||||
}],
|
||||
accMul:accMul
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.contentTop = this.navH+(30+74)/750*inject('windowWidth')
|
||||
this.contentTop = this.navH+(30+72)/750*inject('windowWidth')
|
||||
if(e.id)
|
||||
{
|
||||
this.eventId = e.id
|
||||
@@ -94,13 +124,35 @@
|
||||
this.selectCategory = index
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击相关股票
|
||||
* @param {Object} item 股票数据
|
||||
*/
|
||||
clickLookRelatedStockItem(item)
|
||||
{
|
||||
uni.navigateTo({
|
||||
url:'/pages/index/stockDetails/stockDetails?type=2&code='+item.code+'&des='+item.description+'&name='+item.name
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取事件详情数据
|
||||
*/
|
||||
getEventDetailsData()
|
||||
{
|
||||
investEventDetails(this.eventId).then(res=>{
|
||||
|
||||
if(res.code==200)
|
||||
{
|
||||
let detail = res.data.detail
|
||||
for (let item of this.stockCategoryList) {
|
||||
item.num = detail.sector_stats[item.title]
|
||||
}
|
||||
this.investDetails = detail
|
||||
this.former = detail.former.replace('<answer>','').replace('</answer>','')
|
||||
}else
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
@@ -155,6 +207,10 @@
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow-y: scroll;
|
||||
.former
|
||||
{
|
||||
padding: 40rpx 25rpx;
|
||||
}
|
||||
.stockCategoryList
|
||||
{
|
||||
margin-top: 18rpx;
|
||||
@@ -184,9 +240,10 @@
|
||||
.stockList
|
||||
{
|
||||
padding: 22rpx 25rpx 30rpx;
|
||||
border-bottom: solid 1rpx #E4E4E4;
|
||||
.item
|
||||
{
|
||||
padding: 22rpx 0 30rpx;
|
||||
border-bottom: solid 1rpx #E4E4E4;
|
||||
.title
|
||||
{
|
||||
font-size: 30rpx;
|
||||
@@ -224,5 +281,51 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.conceptList
|
||||
{
|
||||
padding: 30rpx 25rpx;
|
||||
.item
|
||||
{
|
||||
margin-bottom: 20rpx;
|
||||
.cover
|
||||
{
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 350rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.infoC
|
||||
{
|
||||
background: linear-gradient(to bottom,#00000080,#000);
|
||||
padding: 20rpx 23rpx;
|
||||
left:0;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
border-radius: ;
|
||||
color: white;
|
||||
.title
|
||||
{
|
||||
font-size: 26rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
.content
|
||||
{
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
margin-top: 10rpx;
|
||||
font-size: 20rpx;
|
||||
font-weight: 500;
|
||||
line-height: 1.2rem;
|
||||
.lookDetails
|
||||
{
|
||||
right: 0;
|
||||
color: #F97316;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -5,18 +5,19 @@
|
||||
<view class="loginTitle">欢迎登录价值前沿平台</view>
|
||||
<view class="inputC mobile flex">
|
||||
<image class="icon" src="/static/icon/login/mobile.png" mode="widthFix"></image>
|
||||
<input class="flex1" type="number" v-model="mobile" placeholder="请输入手机号" placeholder-style="color: #aaa"/>
|
||||
<input class="flex1" type="number" v-model="mobile" placeholder="请输入手机号" placeholder-style="color: #aaa" maxlength="11"/>
|
||||
</view>
|
||||
<view class="inputC code flex">
|
||||
<image class="icon" src="/static/icon/login/code.png" mode="widthFix"></image>
|
||||
<input class="flex1" type="number" v-model="code" placeholder="请输入验证码" placeholder-style="color: #aaa"/>
|
||||
<view class="getCode" @click="clickGetCode()">获取验证码</view>
|
||||
<view class="getCode" @click="clickGetCode()">{{getCode?(countdown>0?countdown+'s':'重新获取验证码'):'获取验证码'}}</view>
|
||||
</view>
|
||||
<view class="btn loginAtOnce" @click="clickLoginAtOnce()">立即登录</view>
|
||||
<view class="btn oneClickLogin" @click="clickOneClickLogin()">授权手机号一键登录</view>
|
||||
<view class="agreeProtocolC fixed flexCenter">
|
||||
<view class="agreeC">
|
||||
<image class="icon" src="" mode="widthFix"></image>
|
||||
<view class="agreeC" @click="clickAgree()">
|
||||
<image v-if="isAgree" class="icon" src="/static/icon/login/select_s.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/login/select.png" mode="widthFix"></image>
|
||||
</view>
|
||||
阅读并同意我们的<text class="protocol">《用户服务协议》</text>和<text class="protocol">《隐私政策》</text>
|
||||
</view>
|
||||
@@ -25,7 +26,8 @@
|
||||
|
||||
<script>
|
||||
import { inject } from 'vue';
|
||||
import { loginByPhone } from '@/request/api';
|
||||
import { loginByPhone, sendSMS } from '@/request/api';
|
||||
const app = getApp()
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -33,6 +35,10 @@
|
||||
contentTop:'',
|
||||
mobile:'', //手机号
|
||||
code:'', //验证码
|
||||
isAgree:false,
|
||||
countdown:0, //验证码倒计时
|
||||
getCode:false, //是否已经获取过验证码
|
||||
timer:null //定时器
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@@ -44,7 +50,61 @@
|
||||
*/
|
||||
clickGetCode()
|
||||
{
|
||||
|
||||
let mobile = this.mobile
|
||||
if(!mobile)
|
||||
{
|
||||
uni.showToast({
|
||||
title:'请输入手机号',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!app.globalData.mobileReg.test(mobile)) {
|
||||
uni.showToast({
|
||||
title:'请输入正确格式的手机号',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
if (this.isSubmiting) {
|
||||
return
|
||||
}
|
||||
if (this.countdown>0) {
|
||||
return
|
||||
}
|
||||
this.isSubmiting = true
|
||||
let param = {phone:this.mobile,isJson:1}
|
||||
let that = this
|
||||
sendSMS(param).then(res=>{
|
||||
// if(res.code==200)
|
||||
// {
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:'none'
|
||||
})
|
||||
let time = 60
|
||||
this.timer = setInterval(() => {
|
||||
that.isSubmiting = false
|
||||
time --
|
||||
if (time==0) {
|
||||
clearInterval(that.timer)
|
||||
}
|
||||
// that.code = res.debug_code
|
||||
that.getCode = true
|
||||
that.countdown = time
|
||||
}, 1000);
|
||||
// }else
|
||||
// {
|
||||
// this.isSubmiting = false
|
||||
// uni.showToast({
|
||||
// title:res.message,
|
||||
// icon:'none'
|
||||
// })
|
||||
// }
|
||||
|
||||
}).catch(error=>{
|
||||
this.isSubmiting = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 点击立即登录
|
||||
@@ -67,11 +127,27 @@
|
||||
})
|
||||
return
|
||||
}
|
||||
if(!this.isAgree)
|
||||
{
|
||||
uni.showToast({
|
||||
title:'请阅读并同意我们的《用户服务协议》和《隐私政策》',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
let param = {phone:this.mobile,code:this.code,isJson:1}
|
||||
loginByPhone(param).then(res=>{
|
||||
if(res.code==200)
|
||||
if(res.code==0)
|
||||
{
|
||||
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
})
|
||||
uni.setStorageSync('token',res.token)
|
||||
setTimeout(function() {
|
||||
uni.switchTab({
|
||||
url:'/pages/index/index'
|
||||
})
|
||||
}, 1000);
|
||||
}else
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
@@ -87,6 +163,22 @@
|
||||
clickOneClickLogin()
|
||||
{
|
||||
uni.navigateBack()
|
||||
},
|
||||
/**
|
||||
* 点击同意
|
||||
*/
|
||||
clickAgree()
|
||||
{
|
||||
this.isAgree = !this.isAgree
|
||||
},
|
||||
/**
|
||||
* 点击查看协议
|
||||
*/
|
||||
clickProtocol(type)
|
||||
{
|
||||
uni.navigateTo({
|
||||
url:'/pages/mine/web/web?type='+type
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -180,6 +272,7 @@
|
||||
padding: 14rpx;
|
||||
.icon
|
||||
{
|
||||
display: block;
|
||||
width: 28rpx;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
<view class="btn codeLogin" @click="clickCodeLogin()">使用短信验证登录</view>
|
||||
<view class="agreeProtocolC fixed flexCenter">
|
||||
<view class="agreeC" @click="clickAgree()">
|
||||
<image class="icon" src="" mode="widthFix"></image>
|
||||
<image v-if="isAgree" class="icon" src="/static/icon/login/select_s.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/login/select.png" mode="widthFix"></image>
|
||||
</view>
|
||||
阅读并同意我们的<text class="protocol" @click="clickProtocol()">《用户服务协议》</text>和<text class="protocol"@click="clickProtocol()">《隐私政策》</text>
|
||||
阅读并同意我们的<text class="protocol" @click="clickProtocol(2)">《用户服务协议》</text>和<text class="protocol"@click="clickProtocol(3)">《隐私政策》</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -21,7 +22,8 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
contentTop:''
|
||||
contentTop:'',
|
||||
isAgree:false
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@@ -33,12 +35,36 @@
|
||||
*/
|
||||
clickOneClickLogin()
|
||||
{
|
||||
if(!this.isAgree)
|
||||
{
|
||||
uni.showToast({
|
||||
title:'请阅读并同意我们的《用户服务协议》和《隐私政策》',
|
||||
icon:'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
uni.login({
|
||||
provider:'weixin',
|
||||
success(res) {
|
||||
console.log(res.code)
|
||||
let param = {code:res.code,isJson:1}
|
||||
loginByWx(param).then(res=>{
|
||||
|
||||
if(res.code==200)
|
||||
{
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
})
|
||||
uni.setStorageSync('token',res.data.token)
|
||||
setTimeout(function() {
|
||||
uni.switchTab({
|
||||
url:'/pages/index/index'
|
||||
})
|
||||
}, 1000);
|
||||
}else
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
icon:"none"
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
@@ -63,14 +89,16 @@
|
||||
*/
|
||||
clickAgree()
|
||||
{
|
||||
|
||||
this.isAgree = !this.isAgree
|
||||
},
|
||||
/**
|
||||
* 点击查看协议
|
||||
*/
|
||||
clickProtocol()
|
||||
clickProtocol(type)
|
||||
{
|
||||
|
||||
uni.navigateTo({
|
||||
url:'/pages/mine/web/web?type='+type
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -123,6 +151,7 @@
|
||||
padding: 14rpx;
|
||||
.icon
|
||||
{
|
||||
display: block;
|
||||
width: 28rpx;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<input type="nickname" v-model="nickname" />
|
||||
</view>
|
||||
<view class="section">手机号</view>
|
||||
<view class="inputC">{{mobile}}</view>
|
||||
<view class="selectC flex">{{mobile}}</view>
|
||||
<view class="section">性别</view>
|
||||
<picker mode="selector" :range="sexList" @change="sexChange">
|
||||
<view class="selectC flex">
|
||||
@@ -115,7 +115,7 @@
|
||||
if(this.avatar)
|
||||
{
|
||||
//如果选择了新头像
|
||||
let param = {avatar:this.avatar,nickname:this.nickname,gender:this.sex=='男'?'male':'female',
|
||||
let param = {avatar:this.avatar,nickname:this.nickname,gender:this.sex=='男'?'male':'female',phone:this.mobile,
|
||||
bio:this.profile,isFile:1}
|
||||
updateBasicInfo(param).then(res=>{
|
||||
uni.navigateTo({
|
||||
@@ -127,7 +127,7 @@
|
||||
}else
|
||||
{
|
||||
//没有选择新头像
|
||||
let param = {nickname:this.nickname,gender:this.sex=='男'?'male':'female',
|
||||
let param = {nickname:this.nickname,gender:this.sex=='男'?'male':'female',phone:this.mobile,
|
||||
bio:this.profile}
|
||||
updateBasicInfo(param).then(res=>{
|
||||
uni.navigateTo({
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
</view>
|
||||
<view class="originEventC">
|
||||
<view class="levelTitleC flex">
|
||||
<view class="level">C</view>
|
||||
<view class="title">四部门联合启动人力资源服务业与制造业...</view>
|
||||
<view class="level">{{item.event.importance}}</view>
|
||||
<view class="title">{{item.event.title}}</view>
|
||||
</view>
|
||||
<view class="eventContent">人社部、工信部等四部门印发通知,明确在30个城市开展3年期试点,培育人力资源服务与制造业协同机构...</view>
|
||||
</view>
|
||||
@@ -44,20 +44,20 @@
|
||||
<view class="myCommentItem" v-for="(item,index) in commentList" :key="index">
|
||||
<view class="replyContentC">
|
||||
<view class="flex">
|
||||
<image class="avatar" src="" mode="aspectFill"></image>
|
||||
<image class="avatar" :src="item.commenter.avatar_url" mode="aspectFill"></image>
|
||||
<view class="flex1">
|
||||
<view class="nickname">逸尘破晓</view>
|
||||
<view class="time">{{getLocaleDate(item.created_at)}}</view>
|
||||
<view class="nickname">{{item.commenter.nickname}}</view>
|
||||
<view class="time">{{getLocaleMonthDayHourMinte(item.created_at)}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">{{item.content}}</view>
|
||||
</view>
|
||||
<view class="originEventC">
|
||||
<view class="originEventC" @click.stop="clickEventItem(item.event.id)">
|
||||
<view class="levelTitleC flex">
|
||||
<view class="level">C</view>
|
||||
<view class="title">{{item.event_title}}</view>
|
||||
<view class="level">{{item.event.importance}}</view>
|
||||
<view class="title">{{item.event.title}}</view>
|
||||
</view>
|
||||
<view class="eventContent">人社部、工信部等四部门印发通知,明确在30个城市开展3年期试点,培育人力资源服务与制造业协同机构...</view>
|
||||
<view class="eventContent">{{item.event.description}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
@@ -68,7 +68,7 @@
|
||||
<script>
|
||||
import { inject } from 'vue';
|
||||
import { userActivityList } from '@/request/api';
|
||||
import { getLocaleDate } from '@/utils/util';
|
||||
import { getLocaleMonthDayHourMinte } from '@/utils/util';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -80,7 +80,7 @@
|
||||
commentList:[],
|
||||
page:1,
|
||||
loadAll:false,
|
||||
getLocaleDate:getLocaleDate
|
||||
getLocaleMonthDayHourMinte:getLocaleMonthDayHourMinte
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@@ -111,6 +111,16 @@
|
||||
this.getCommentListData()
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 点击查看事件详情
|
||||
* @param {Object} id
|
||||
*/
|
||||
clickEventItem(id)
|
||||
{
|
||||
uni.navigateTo({
|
||||
url:'/pages/index/eventDetails/eventDetails?id='+id
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取评论列表数据
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
<scroll-view scroll-x class="stockList">
|
||||
<view class="stockItem" v-for="(sitem,sindex) in item.related_stocks" :key="sindex" @click.stop="clickLookRelatedStockItem(sitem.stock_code)">{{sitem.stock_name}} <text class="change">{{(getRateUpOrDown(sitem.daily_change)?'':'+')+sitem.daily_change}}%</text></view>
|
||||
<view class="stockItem" v-for="(sitem,sindex) in item.related_stocks" :key="sindex" @click.stop="clickLookRelatedStockItem(item.event_id,sitem.stock_code)">{{sitem.stock_name}} <text class="change">{{(getRateUpOrDown(sitem.daily_change)?'':'+')+sitem.daily_change}}%</text></view>
|
||||
</scroll-view>
|
||||
<view class="timeToolBarC flex">
|
||||
<view class="time flex1">{{getLocaleTime(item.created_at)}}</view>
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
<script>
|
||||
import { inject } from 'vue';
|
||||
import { userActivityList,followEvent } from '@/request/api';
|
||||
import { userActivityList, followEvent } from '@/request/api';
|
||||
import { getRateStr, getRateUpOrDown, getLocaleTime } from '@/utils/util.js'
|
||||
|
||||
export default {
|
||||
@@ -90,10 +90,10 @@
|
||||
* 点击相关股票
|
||||
* @param {Object} code
|
||||
*/
|
||||
clickLookRelatedStockItem(code)
|
||||
clickLookRelatedStockItem(id,code)
|
||||
{
|
||||
uni.navigateTo({
|
||||
url:'/pages/index/stockDetails/stockDetails?code='+code
|
||||
url:'/pages/index/stockDetails/stockDetails?type=1&code='+code+'&id='+id
|
||||
})
|
||||
},
|
||||
/**
|
||||
|
||||
@@ -211,6 +211,13 @@
|
||||
*/
|
||||
uploadInvestPreferenceData()
|
||||
{
|
||||
let arr = []
|
||||
for (let item of this.preferredMarketList) {
|
||||
if(item.select)
|
||||
{
|
||||
arr.push(item.title)
|
||||
}
|
||||
}
|
||||
let param = {trading_experience: this.selectYearIndex,investment_style: this.investPreferenceList[this.selectInvestIndex],
|
||||
risk_preference: this.riskPreferenceList[this.selectRiskIndex],
|
||||
investment_amount: this.investmentScaleList[this.selectScaleIndex],
|
||||
@@ -231,6 +238,7 @@
|
||||
userInfo().then(res=>{
|
||||
if(res.code==200)
|
||||
{
|
||||
this.avatarUrl = res.data.basic_info.avatar_url
|
||||
let data = res.data.investment_preferences
|
||||
//投资偏好
|
||||
for (var i = 0; i < this.investPreferenceList.length; i++) {
|
||||
|
||||
@@ -10,17 +10,17 @@
|
||||
</view>
|
||||
<image class="arrow" src="/static/icon/mine/infoArrow.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="numList relative flex">
|
||||
<view v-if="userInfo" class="numList relative flex">
|
||||
<view class="item flex1 flexColumnCenter" @click="clickNumItem(0)">
|
||||
<view class="num">1</view>
|
||||
<view class="num">{{userInfo.statistics.total_comments}}</view>
|
||||
<view class="title">评论回复</view>
|
||||
</view>
|
||||
<view class="item flex1 flexColumnCenter" @click="clickNumItem(1)">
|
||||
<view class="num">1</view>
|
||||
<view class="num">{{userInfo.statistics.follows_count}}</view>
|
||||
<view class="title">关注收藏</view>
|
||||
</view>
|
||||
<view class="item flex1 flexColumnCenter" @click="clickNumItem(2)">
|
||||
<view class="num">1</view>
|
||||
<view class="num">{{userInfo.statistics.likes_count}}</view>
|
||||
<view class="title">我的点赞</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -29,11 +29,11 @@
|
||||
</view>
|
||||
<view class="menuList relative">
|
||||
<view class="list">
|
||||
<view class="item relative flex" v-for="(item,index) in menuList" :key="index" @click="clickMenuItem(item.url)" >
|
||||
<view class="item relative flex" v-for="(item,index) in menuList" :key="index" @click="clickMenuItem(item.url,index)" >
|
||||
<image class="icon" :src="item.icon" mode="aspectFit"></image>
|
||||
<view class="title flex1">{{item.title}}</view>
|
||||
<image class="arrow" src="/static/icon/mine/menuArrow.png" mode="widthFix"></image>
|
||||
<button class="absolute" v-if="index==menuList.length-1" open-type="contact"></button>
|
||||
<button class="absolute" v-if="index==menuList.length-2" open-type="contact"></button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -54,27 +54,30 @@
|
||||
menuList:[{
|
||||
icon:'/static/icon/mine/aboutUs.png',
|
||||
title:'关于我们',
|
||||
url:'/pages/mine/web/web?type=1'
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/serviceTerm.png',
|
||||
title:'服务条款',
|
||||
url:'/pages/mine/web/web?type=2'
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/privacyProtocol.png',
|
||||
title:'隐私协议',
|
||||
url:'/pages/mine/web/web?type=3'
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/feedback.png',
|
||||
title:'意见反馈',
|
||||
url:'/pages/mine/feedback/feedback'
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/accountSetting.png',
|
||||
title:'账户设置',
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/customerService.png',
|
||||
title:'联系客服',
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/logout.png',
|
||||
title:'退出登录',
|
||||
}]
|
||||
}
|
||||
},
|
||||
@@ -100,7 +103,7 @@
|
||||
clickVip()
|
||||
{
|
||||
uni.navigateTo({
|
||||
url:'/pages/mine/vip/vip'
|
||||
url:'/pagesMine/vip/vip'
|
||||
})
|
||||
},
|
||||
/**
|
||||
@@ -127,13 +130,27 @@
|
||||
url:'/pages/mine/myLike/myLike'
|
||||
})
|
||||
},
|
||||
clickMenuItem(url)
|
||||
clickMenuItem(url,index)
|
||||
{
|
||||
if(url)
|
||||
{
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}else if(index==this.menuList.length-1)
|
||||
{
|
||||
uni.showModal({
|
||||
title:'您确定要退出登录么',
|
||||
success(res) {
|
||||
if(res.confirm)
|
||||
{
|
||||
uni.removeStorageSync('token')
|
||||
uni.switchTab({
|
||||
url:'/pages/index/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<image class="topBg absolute" src="/static/image/mine/myTopBg.png" mode="widthFix"></image>
|
||||
<view class="list fixed" :style="'top:'+navH+'px;'">
|
||||
<view class="item" v-for="(item,index) in myLikeList" :key="index">
|
||||
<image class="avatar" :src="item.author.avatarurl" mode="aspectFill"></image>
|
||||
<image class="avatar" :src="item.author.avatar_url" mode="aspectFill"></image>
|
||||
<view class="flex1">
|
||||
<view class="nickname">{{item.author.nickname}}</view>
|
||||
<rich-text class="content" :nodes="item.post_content"></rich-text>
|
||||
@@ -13,7 +13,7 @@
|
||||
<view class="time">{{getLocaleHourMinute(item.like_time)}}</view>
|
||||
<!-- <view class="reply">回复</view> -->
|
||||
</view>
|
||||
<view class="likeC flex">
|
||||
<view class="likeC flex" @click="clickLikeComment(item.like_id,index)">
|
||||
<image class="icon" src="/static/icon/home/like_s.png" mode="widthFix"></image>
|
||||
<!-- <view class="num">85</view> -->
|
||||
</view>
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<script>
|
||||
import { inject } from 'vue';
|
||||
import { userActivityList } from '@/request/api';
|
||||
import { userActivityList, likeEventComment } from '@/request/api';
|
||||
import { getLocaleHourMinute } from '@/utils/util';
|
||||
|
||||
export default {
|
||||
@@ -54,6 +54,20 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 点赞评论
|
||||
*/
|
||||
clickLikeComment(id,index)
|
||||
{
|
||||
likeEventComment(id).then(res=>{
|
||||
uni.showToast({
|
||||
title:res.message,
|
||||
})
|
||||
this.myLikeList.splice(index,1)
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取我的点赞列表数据
|
||||
*/
|
||||
|
||||
93
pages/mine/web/web.vue
Normal file
@@ -0,0 +1,93 @@
|
||||
<template>
|
||||
<view>
|
||||
<navBar :leftText="navTitle"></navBar>
|
||||
<image class="topBg absolute" src="/static/image/mine/myTopBg.png" mode="widthFix"></image>
|
||||
<view class="contentC fixed" :style="'top:'+navH+'px;'">
|
||||
<text>{{webContent}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { inject } from 'vue'
|
||||
import { agreements } from '@/request/api'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
navH:inject('navHeight'),
|
||||
navTitle:'',
|
||||
type:'', //1.关于我们2.服务条款3.隐私协议
|
||||
webContent:'',
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
if(e.type)
|
||||
{
|
||||
this.type = e.type
|
||||
this.getUserInfoData()
|
||||
if(e.type==1)
|
||||
{
|
||||
this.navTitle = '关于我们'
|
||||
}else if(e.type==2)
|
||||
{
|
||||
this.navTitle = '服务条款'
|
||||
}else if(e.type==3)
|
||||
{
|
||||
this.navTitle = '隐私协议'
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 获取用户信息数据
|
||||
*/
|
||||
getUserInfoData()
|
||||
{
|
||||
agreements().then(res=>{
|
||||
if(res.code==200)
|
||||
{
|
||||
if(this.type==1)
|
||||
{
|
||||
//关于我们
|
||||
this.webContent = res.data.agreements.about_us.content
|
||||
}else if(this.type==2)
|
||||
{
|
||||
//服务条款
|
||||
this.webContent = res.data.agreements.service_terms.content
|
||||
}else if(this.type==3)
|
||||
{
|
||||
//隐私协议
|
||||
this.webContent = res.data.agreements.privacy_policy.content
|
||||
}
|
||||
}else
|
||||
wx.showToast({
|
||||
title:res.message,
|
||||
})
|
||||
}).catch(error=>{
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.topBg
|
||||
{
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.contentC
|
||||
{
|
||||
background-color: white;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
margin-top: 10rpx;
|
||||
padding: 50rpx 25rpx;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
</style>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 119 KiB After Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 156 KiB |
@@ -4,8 +4,8 @@
|
||||
<image class="topBg absolute" src="/static/image/mine/myTopBg.png" mode="widthFix"></image>
|
||||
<view v-if="memberInfo" class="vipC relative" :style="'margin-top:'+navH+'px;'">
|
||||
<view class="vipInfoC relative">
|
||||
<image v-if="memberInfo.is_member" class="bg" src="/static/image/mine/vip/vipTopBg.png" mode="widthFix"></image>
|
||||
<image v-else class="bg" src="/static/image/mine/vip/noVipTopBg.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="bg" src="/pagesMine/static/image/vip/vipTopBg.png" mode="widthFix"></image>
|
||||
<image v-else class="bg" src="/pagesMine/static/image/vip/noVipTopBg.png" mode="widthFix"></image>
|
||||
<view v-if="memberInfo.is_member" class="infoC vip absolute">
|
||||
<view class="title">尊贵的VIP会员</view>
|
||||
<view class="tips">会员有效期至:{{memberInfo.member_expire_date}}</view>
|
||||
@@ -17,11 +17,11 @@
|
||||
</view>
|
||||
<view class="vipProfitIntroC relative">
|
||||
<view class="titleC flexCenter">
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/titleLeft_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/titleLeft.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/pagesMine/static/icon/vip/titleLeft_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/pagesMine/static/icon/vip/titleLeft.png" mode="widthFix"></image>
|
||||
<view class="title">即刻开启</view>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/titleRight_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/titleRight.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/pagesMine/static/icon/vip/titleRight_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/pagesMine/static/icon/vip/titleRight.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="subtitle">HOW TO SUBSCRIBE</view>
|
||||
<view class="stepC flex">
|
||||
@@ -30,12 +30,12 @@
|
||||
</view>
|
||||
<view class="picList flex">
|
||||
<view class="pic flex1">
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/step1_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/step1.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/pagesMine/static/icon/vip/step1_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/pagesMine/static/icon/vip/step1.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="pic flex1">
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/step2_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/step2.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/pagesMine/static/icon/vip/step2_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/pagesMine/static/icon/vip/step2.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="stepC flex">
|
||||
@@ -46,18 +46,18 @@
|
||||
</view>
|
||||
<view class="picList flex">
|
||||
<view class="pic flex1">
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/step3_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/step3.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/pagesMine/static/icon/vip/step3_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/pagesMine/static/icon/vip/step3.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="pic flex1">
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/step4_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/step4.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/pagesMine/static/icon/vip/step4_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/pagesMine/static/icon/vip/step4.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="questionC">
|
||||
<view class="title">投资的你是否遇到过这些问题?</view>
|
||||
<view class="iconListC flex">
|
||||
<image class="icon" src="/static/icon/mine/vip/investQuestion.png" mode="widthFix"></image>
|
||||
<image class="icon" src="/pagesMine/static/icon/vip/investQuestion.png" mode="widthFix"></image>
|
||||
<view class="list flex1">
|
||||
<view :class="'item '+(memberInfo.is_member?'vip':'')" v-for="(item,index) in questionList" :key="index">
|
||||
{{item}}
|
||||
@@ -66,35 +66,35 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="titleC research flexCenter">
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/titleLeft_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/titleLeft.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/pagesMine/static/icon/vip/titleLeft_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/pagesMine/static/icon/vip/titleLeft.png" mode="widthFix"></image>
|
||||
<view class="title">行业研究中心</view>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/titleRight_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/titleRight.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/pagesMine/static/icon/vip/titleRight_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/pagesMine/static/icon/vip/titleRight.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="subtitle">20余年专业投研,赋能每一位投资者</view>
|
||||
<view class="introC">
|
||||
<text class="flex1">依托价值前沿研究所深耕20余年的专业积淀,我们为您构建一站式行业研究平台。内容覆盖宏观趋势、产业结构、核心公司动态,帮助投资者看懂行业,识别机会,建立自己的知识体系。</text>
|
||||
<image class="icon" src="/static/icon/mine/vip/industrialResearch.png" mode="widthFix"></image>
|
||||
<image class="icon" src="/pagesMine/static/icon/vip/industrialResearch.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="titleC decision flexCenter">
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/titleLeft_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/titleLeft.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/pagesMine/static/icon/vip/titleLeft_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/pagesMine/static/icon/vip/titleLeft.png" mode="widthFix"></image>
|
||||
<view class="title">经营决策中心</view>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/titleRight_v.png" mode="widthFix"></image>
|
||||
<image class="icon" src="/static/icon/mine/vip/titleRight.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/pagesMine/static/icon/vip/titleRight_v.png" mode="widthFix"></image>
|
||||
<image class="icon" src="/pagesMine/static/icon/vip/titleRight.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="subtitle">数据洞察,辅助每一个关键判断</view>
|
||||
<view class="introC operatingDecision">
|
||||
<text class="flex1">我们整合来自一线调研、专题报告、行业闭门会的专业数据,提供宏观到微观的全链条分析。无论是捕捉赛道拐点,还是识别公司价值,经营决策中心都是您可靠的智囊伙伴。</text>
|
||||
<image class="icon" src="/static/icon/mine/vip/operatingDecision.png" mode="widthFix"></image>
|
||||
<image class="icon" src="/pagesMine/static/icon/vip/operatingDecision.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="titleC privilege flexCenter">
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/titleLeft_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/titleLeft.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/pagesMine/static/icon/vip/titleLeft_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/pagesMine/static/icon/vip/titleLeft.png" mode="widthFix"></image>
|
||||
<view class="title">会员尊享特权</view>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/titleRight_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/titleRight.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/pagesMine/static/icon/vip/titleRight_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/pagesMine/static/icon/vip/titleRight.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="subtitle">数据洞察,辅助每一个关键判断</view>
|
||||
<view :class="'privilegeList flexWrap '+(memberInfo.is_member?'vip':'')">
|
||||
@@ -123,56 +123,56 @@
|
||||
memberInfo:null, //会员信息
|
||||
questionList:['信息纷杂难辨真伪?','信息纷杂难辨真伪?','无法把握宏观趋势与行业动向?'],
|
||||
privilegeList:[{
|
||||
icon:'/static/icon/mine/vip/depthReport.png',
|
||||
icon_v:'/static/icon/mine/vip/depthReport_v.png',
|
||||
icon:'/pagesMine/static/icon/vip/depthReport.png',
|
||||
icon_v:'/pagesMine/static/icon/vip/depthReport_v.png',
|
||||
title:'深度研报',
|
||||
tips:'行业/公司独家分析'
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/vip/strategicInsight.png',
|
||||
icon_v:'/static/icon/mine/vip/strategicInsight_v.png',
|
||||
icon:'/pagesMine/static/icon/vip/strategicInsight.png',
|
||||
icon_v:'/pagesMine/static/icon/vip/strategicInsight_v.png',
|
||||
title:'策略洞察',
|
||||
tips:'赛道趋势+拐点信号'
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/vip/dataTool.png',
|
||||
icon_v:'/static/icon/mine/vip/dataTool_v.png',
|
||||
icon:'/pagesMine/static/icon/vip/dataTool.png',
|
||||
icon_v:'/pagesMine/static/icon/vip/dataTool_v.png',
|
||||
title:'数据工具',
|
||||
tips:'行业/公司独家分析'
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/vip/dataTool.png',
|
||||
icon_v:'/static/icon/mine/vip/intelligentScreening_v.png',
|
||||
icon:'/pagesMine/static/icon/vip/dataTool.png',
|
||||
icon_v:'/pagesMine/static/icon/vip/intelligentScreening_v.png',
|
||||
title:'智能筛选',
|
||||
tips:'按需定制标的列表'
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/vip/decisionSupport.png',
|
||||
icon_v:'/static/icon/mine/vip/decisionSupport_v.png',
|
||||
icon:'/pagesMine/static/icon/vip/decisionSupport.png',
|
||||
icon_v:'/pagesMine/static/icon/vip/decisionSupport_v.png',
|
||||
title:'决策辅助',
|
||||
tips:'关键因子评分系统'
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/vip/expertMeeting.png',
|
||||
icon_v:'/static/icon/mine/vip/expertMeeting_v.png',
|
||||
icon:'/pagesMine/static/icon/vip/expertMeeting.png',
|
||||
icon_v:'/pagesMine/static/icon/vip/expertMeeting_v.png',
|
||||
title:'专家闭门会',
|
||||
tips:'深度交流机会'
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/vip/dailyReport.png',
|
||||
icon_v:'/static/icon/mine/vip/dailyReport_v.png',
|
||||
icon:'/pagesMine/static/icon/vip/dailyReport.png',
|
||||
icon_v:'/pagesMine/static/icon/vip/dailyReport_v.png',
|
||||
title:'日报周报',
|
||||
tips:'研判速递、节奏掌控'
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/vip/specialColumn.png',
|
||||
icon_v:'/static/icon/mine/vip/specialColumn_v.png',
|
||||
icon:'/pagesMine/static/icon/vip/specialColumn.png',
|
||||
icon_v:'/pagesMine/static/icon/vip/specialColumn_v.png',
|
||||
title:'专题专栏',
|
||||
tips:'核心团队观点集结'
|
||||
},
|
||||
{
|
||||
icon:'/static/icon/mine/vip/continuouslyUnlock.png',
|
||||
icon_v:'/static/icon/mine/vip/continuouslyUnlock_v.png',
|
||||
icon:'/pagesMine/static/icon/vip/continuouslyUnlock.png',
|
||||
icon_v:'/pagesMine/static/icon/vip/continuouslyUnlock_v.png',
|
||||
title:'持续解锁',
|
||||
tips:'不定期上线新功能'
|
||||
}]
|
||||
@@ -188,7 +188,7 @@
|
||||
clickVipMeal()
|
||||
{
|
||||
uni.navigateTo({
|
||||
url:'/pages/mine/vipMeal/vipMeal'
|
||||
url:'/pagesMine/vipMeal/vipMeal'
|
||||
})
|
||||
},
|
||||
/**
|
||||
@@ -4,8 +4,8 @@
|
||||
<image class="topBg absolute" src="/static/image/mine/myTopBg.png" mode="widthFix"></image>
|
||||
<view v-if="memberInfo" class="vipC" :style="'margin-top:'+navH+'px;'">
|
||||
<view class="vipInfoC relative">
|
||||
<image v-if="memberInfo.is_member" class="bg" src="/static/image/mine/vip/vipTopBg.png" mode="widthFix"></image>
|
||||
<image v-else class="bg" src="/static/image/mine/vip/noVipTopBg.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="bg" src="/pagesMine/static/image/vip/vipTopBg.png" mode="widthFix"></image>
|
||||
<image v-else class="bg" src="/pagesMine/static/image/vip/noVipTopBg.png" mode="widthFix"></image>
|
||||
<view v-if="memberInfo.is_member" class="infoC vip absolute">
|
||||
<view class="title">尊贵的VIP会员</view>
|
||||
<view class="tips">会员有效期至:{{memberInfo.member_expire_date}}</view>
|
||||
@@ -17,11 +17,11 @@
|
||||
</view>
|
||||
<view class="privilegeCompareC relative">
|
||||
<view class="titleC flexCenter">
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/titleLeft_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/titleLeft.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/pagesMine/static/icon/vip/titleLeft_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/pagesMine/static/icon/vip/titleLeft.png" mode="widthFix"></image>
|
||||
<view class="title">特权对比</view>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/static/icon/mine/vip/titleRight_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/static/icon/mine/vip/titleRight.png" mode="widthFix"></image>
|
||||
<image v-if="memberInfo.is_member" class="icon" src="/pagesMine/static/icon/vip/titleRight_v.png" mode="widthFix"></image>
|
||||
<image v-else class="icon" src="/pagesMine/static/icon/vip/titleRight.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view :class="'privilegeList '+(memberInfo.is_member?'vip':'')">
|
||||
<view class="header flex">
|
||||
@@ -34,18 +34,18 @@
|
||||
<view class="optionItem privilege flex">{{item}}</view>
|
||||
<view class="optionItem free flexCenter">
|
||||
<block v-if="index==0||index==1||index==2">
|
||||
<image class="notContain" src="/static/icon/mine/vip/notContain.png" mode="widthFix"></image>
|
||||
<image class="notContain" src="/pagesMine/static/icon/vip/notContain.png" mode="widthFix"></image>
|
||||
</block>
|
||||
<block v-if="index==3||index==4">
|
||||
<block v-if="index==3">限制查看数量</block>
|
||||
<block v-if="index==4">每日查看2只</block>
|
||||
</block>
|
||||
<block v-if="index==5||index==6">
|
||||
<image class="contain" src="/static/icon/mine/vip/contain.png" mode="widthFix"></image>
|
||||
<image class="contain" src="/pagesMine/static/icon/vip/contain.png" mode="widthFix"></image>
|
||||
</block>
|
||||
</view>
|
||||
<view class="optionItem vip flexCenter">
|
||||
<image class="contain" src="/static/icon/mine/vip/contain.png" mode="widthFix"></image>
|
||||
<image class="contain" src="/pagesMine/static/icon/vip/contain.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -77,7 +77,21 @@
|
||||
*/
|
||||
clickJoinVip()
|
||||
{
|
||||
|
||||
if(!this.memberInfo.is_member)
|
||||
{
|
||||
//如果不是会员
|
||||
uni.showModal({
|
||||
content:'请点击下方按钮复制链接并在浏览器中打开以完成会员购买流程',
|
||||
showCancel:false,
|
||||
confirmText:'复制',
|
||||
success(res) {
|
||||
if(res.confirm)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 获取会员状态
|
||||
@@ -5,11 +5,7 @@ import { get, post } from './http.js'
|
||||
/**
|
||||
* 发送短信
|
||||
*/
|
||||
export const sendSMS = param => post('/api/v1/sms/send',param)
|
||||
/**
|
||||
* 单页信息
|
||||
*/
|
||||
export const singleWeb = param => post('/api/v1/html/info_text',param)
|
||||
export const sendSMS = param => post('/api/auth/send-sms',param)
|
||||
|
||||
|
||||
/**
|
||||
@@ -28,7 +24,7 @@ export const loginByWx = param => post('/api/auth/login/wechat',param)
|
||||
/**
|
||||
* 行业分类列表
|
||||
*/
|
||||
export const industryCategoryList = param => get('/api/industry-classifications',param)
|
||||
export const industryCategoryList = param => get('/api/sector/hierarchy',param)
|
||||
/**
|
||||
* 股票分类列表
|
||||
*/
|
||||
@@ -52,7 +48,7 @@ export const eventRelatedStock = id => get('/api/event/'+id+'/related-stocks-det
|
||||
/**
|
||||
* 个股详情
|
||||
*/
|
||||
export const stockDetails = code => get('/api/stock/'+code+'/detail')
|
||||
export const stockDetails = (id,code) => get('/api/event/'+id+'/stock/'+code+'/detail')
|
||||
/**
|
||||
* 股票K线数据
|
||||
*/
|
||||
@@ -60,7 +56,7 @@ export const stockCandlestickChartData = (code,param) => get('/api/stock/'+code+
|
||||
/**
|
||||
* 事件相关概念
|
||||
*/
|
||||
export const eventRelatedConcept = id => get('/api/event/'+id+'/related-concepts')
|
||||
export const eventRelatedConcept = param => post('/concept-api/search',param)
|
||||
/**
|
||||
* 事件历史事件
|
||||
*/
|
||||
@@ -90,39 +86,14 @@ export const commentEvent = (id,param) => post('/post/create/'+id,param)
|
||||
*/
|
||||
export const likeEventComment = id => post('/post/like/'+id)
|
||||
/**
|
||||
* 评论评论
|
||||
* 回复评论
|
||||
*/
|
||||
export const commentComment = id => post('/post/comment/'+id)
|
||||
export const replyComment = (id,param) => post('/post/comment/'+id,param)
|
||||
/**
|
||||
* 评论回复列表
|
||||
*/
|
||||
export const commentReplyList = id => post('/post/comments/'+id)
|
||||
|
||||
/**
|
||||
* 确认服务订单
|
||||
*/
|
||||
export const confirmServiceOrder = param => post('/api/v1/service/order/check_order',param)
|
||||
/**
|
||||
* 添加服务购物车
|
||||
*/
|
||||
export const addToShoppingCart = param => post('/api/v1/service/add_cart',param)
|
||||
/**
|
||||
* 服务购物车列表
|
||||
*/
|
||||
export const shoppingCartList = param => post('/api/v1/service/cart_list',param)
|
||||
/**
|
||||
* 服务购物车设置优惠券
|
||||
*/
|
||||
export const shoppingCartCoupon = param => post('/api/v1/service/set_coupon',param)
|
||||
/**
|
||||
* 修改服务购物车数量
|
||||
*/
|
||||
export const updateShoppingCartNum = param => post('/api/v1/service/cart_edit',param)
|
||||
/**
|
||||
* 服务下单
|
||||
*/
|
||||
export const createServiceOrder = param => post('/api/v1/service/order/appointment',param)
|
||||
|
||||
|
||||
/**
|
||||
* 获取某一天的事件列表
|
||||
@@ -140,42 +111,6 @@ export const investEventDetails = (id,param) => get('/api/calendar/detail/'+id,p
|
||||
* 获取当前月的每一天的时间数量
|
||||
*/
|
||||
export const calendarEventCount = param => get('/api/calendar-event-counts',param)
|
||||
/**
|
||||
* 商品列表
|
||||
*/
|
||||
export const goodsList = param => post('/api/v1/goods/index',param)
|
||||
/**
|
||||
* 商品来源
|
||||
*/
|
||||
export const goodsSourceList = param => post('/api/v1/goods/goods_source',param)
|
||||
/**
|
||||
* 商品详情
|
||||
*/
|
||||
export const goodsDetails = param => post('/api/v1/goods/detail',param)
|
||||
/**
|
||||
* 商品规格价格信息
|
||||
*/
|
||||
export const goodsSpecPriceInfo = param => post('/api/v1/goods/specifications',param)
|
||||
/**
|
||||
* 商品立即购买
|
||||
*/
|
||||
export const goodsPurchase = param => post('/api/v1/goods/order/place_orders',param)
|
||||
/**
|
||||
* 商品订单支付
|
||||
*/
|
||||
export const goodsOrderPay = param => post('/api/v1/goods/order/pay_goods_order',param)
|
||||
/**
|
||||
* 商品订单列表
|
||||
*/
|
||||
export const goodsOrderList = param => post('/api/v1/goods/order/order_list',param)
|
||||
/**
|
||||
* 商品订单详情
|
||||
*/
|
||||
export const goodsOrderDetails = param => post('/api/v1/goods/order/order_detail',param)
|
||||
/**
|
||||
* 确认收货
|
||||
*/
|
||||
export const goodsConfirmReceipt = param => post('/api/v1/goods/order/take_order',param)
|
||||
|
||||
/**
|
||||
* 用户信息
|
||||
@@ -201,4 +136,7 @@ export const userActivityList = param => get('/api/user/activities',param)
|
||||
* 意见反馈
|
||||
*/
|
||||
export const feedback = param => post('/api/user/feedback',param)
|
||||
|
||||
/**
|
||||
* 意见反馈
|
||||
*/
|
||||
export const agreements = () => get('/api/agreements')
|
||||
|
||||
@@ -3,10 +3,10 @@ let baseURL = ''
|
||||
|
||||
if (process.env.NODE_ENV==='development') {
|
||||
// baseURL = 'https://app.valuefrontier.cn'
|
||||
baseURL = 'http://43.143.189.195:5001'
|
||||
baseURL = 'http://43.143.189.195:5002'
|
||||
} else{
|
||||
// baseURL = 'https://app.valuefrontier.cn'
|
||||
baseURL = 'http://43.143.189.195:5001'
|
||||
baseURL = 'http://43.143.189.195:5002'
|
||||
}
|
||||
|
||||
export function getBaseURL() {
|
||||
@@ -113,8 +113,14 @@ export function post(url, params) {
|
||||
}
|
||||
});
|
||||
}else
|
||||
{
|
||||
let baseUrl = baseURL
|
||||
if(url.indexOf('concept-api')>-1)
|
||||
{
|
||||
baseUrl = 'https://valuefrontier.cn'
|
||||
}
|
||||
uni.request({
|
||||
url:baseURL+url,
|
||||
url:baseUrl+url,
|
||||
data:params,
|
||||
header:{
|
||||
'Accept':'application/json',
|
||||
@@ -123,7 +129,6 @@ export function post(url, params) {
|
||||
},
|
||||
method:"POST",
|
||||
success:(response) =>{
|
||||
console.log(JSON.parse(JSON.stringify(response)))
|
||||
uni.hideLoading()
|
||||
if (params&¶ms.isNotNeedLogin) {
|
||||
|
||||
@@ -150,6 +155,8 @@ export function post(url, params) {
|
||||
reject(error.response)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1001 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 850 B |
BIN
static/icon/home/conceptDownArrow.png
Normal file
|
After Width: | Height: | Size: 517 B |
BIN
static/icon/home/conceptUpArrow.png
Normal file
|
After Width: | Height: | Size: 500 B |
BIN
static/icon/home/delete.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 972 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 998 B |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 640 B |
BIN
static/icon/home/industry_s.png
Normal file
|
After Width: | Height: | Size: 371 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 828 B |
BIN
static/icon/home/stockArrow.png
Normal file
|
After Width: | Height: | Size: 794 B |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 1.6 KiB |
BIN
static/icon/invest/upArrow.png
Normal file
|
After Width: | Height: | Size: 755 B |
BIN
static/icon/login/select.png
Normal file
|
After Width: | Height: | Size: 668 B |
BIN
static/icon/login/select_s.png
Normal file
|
After Width: | Height: | Size: 672 B |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 1.9 KiB |
BIN
static/icon/mine/logout.png
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
2
unpackage/dist/build/mp-weixin/app.js
vendored
@@ -1 +1 @@
|
||||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./common/vendor.js");Math;const o={onLaunch:function(){console.log("App Launch");let o=e.index.getWindowInfo();e.provide("statusHeight",o.statusBarHeight),e.provide("windowWidth",o.windowWidth),e.provide("safeAreaTop",o.safeArea.top);var t=o.safeAreaInsets.bottom;let n=e.index.getMenuButtonBoundingClientRect();e.provide("navHeight",n.bottom+n.top-o.statusBarHeight),e.provide("menuTop",n.top),e.provide("menuHeight",n.height),e.provide("isiPhoneX",34==t)},onShow:function(){console.log("App Show")},onHide:function(){console.log("App Hide")}};function t(){return{app:e.createSSRApp(o)}}t().app.mount("#app"),exports.createApp=t;
|
||||
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./common/vendor.js");Math;const o={onLaunch:function(){console.log("App Launch");let o=e.index.getWindowInfo();e.provide("statusHeight",o.statusBarHeight),e.provide("windowWidth",o.windowWidth),e.provide("safeAreaTop",o.safeArea.top);var t=o.safeAreaInsets.bottom;let n=e.index.getMenuButtonBoundingClientRect();e.provide("navHeight",n.bottom+n.top-o.statusBarHeight),e.provide("menuTop",n.top),e.provide("menuHeight",n.height),e.provide("isiPhoneX",34==t)},onShow:function(){console.log("App Show")},onHide:function(){console.log("App Hide")},globalData:{mobileReg:/^1[3456789][0-9]{9}$/}};function t(){return{app:e.createSSRApp(o)}}t().app.mount("#app"),exports.createApp=t;
|
||||
|
||||
16
unpackage/dist/build/mp-weixin/app.json
vendored
@@ -9,12 +9,22 @@
|
||||
"pages/mine/investPreference/investPreference",
|
||||
"pages/index/eventDetails/eventDetails",
|
||||
"pages/invest/investDetails/investDetails",
|
||||
"pages/mine/vip/vip",
|
||||
"pages/mine/vipMeal/vipMeal",
|
||||
"pages/index/stockDetails/stockDetails",
|
||||
"pages/index/conceptDetails/conceptDetails",
|
||||
"pages/mine/followCollect/followCollect",
|
||||
"pages/mine/myLike/myLike"
|
||||
"pages/mine/myLike/myLike",
|
||||
"pages/login/login",
|
||||
"pages/login/codeLogin/codeLogin",
|
||||
"pages/mine/web/web"
|
||||
],
|
||||
"subPackages": [
|
||||
{
|
||||
"root": "pagesMine",
|
||||
"pages": [
|
||||
"vip/vip",
|
||||
"vipMeal/vipMeal"
|
||||
]
|
||||
}
|
||||
],
|
||||
"window": {
|
||||
"navigationStyle": "custom",
|
||||
|
||||
@@ -1 +1 @@
|
||||
"use strict";exports._imports_0="/static/image/mine/myTopBg.png",exports._imports_1="/static/icon/home/search.png",exports._imports_1$1="/static/icon/home/downArrow.png",exports._imports_1$2="/static/icon/mine/infoArrow.png",exports._imports_1$3="/static/icon/mine/basicInfo/edit.png",exports._imports_1$4="/static/icon/home/like.png",exports._imports_1$5="/static/icon/home/expectScore.png",exports._imports_1$6="/static/image/mine/vip/noVipTopBg.png",exports._imports_1$7="/static/icon/back.png",exports._imports_10="/static/icon/mine/vip/operatingDecision.png",exports._imports_11="/static/icon/home/monthLeftArrow.png",exports._imports_12="/static/icon/home/monthRightArrow.png",exports._imports_2="/static/icon/home/sort.png",exports._imports_2$1="/static/icon/backBlack.png",exports._imports_2$2="/static/icon/home/upArrow.png",exports._imports_2$3="/static/icon/invest/calendar.png",exports._imports_2$4="/static/image/mine/vipBg.png",exports._imports_2$5="/static/icon/mine/basicInfo/downArrow.png",exports._imports_2$6="/static/icon/home/commentArrow.png",exports._imports_2$7="/static/icon/home/expectScoreTips.png",exports._imports_2$8="/static/icon/mine/vip/titleLeft.png",exports._imports_3="/static/icon/home/screen.png",exports._imports_3$1="/static/icon/home/browser.png",exports._imports_3$2="/static/icon/invest/downArrow.png",exports._imports_3$3="/static/icon/mine/menuArrow.png",exports._imports_3$4="/static/icon/mine/vip/titleRight.png",exports._imports_4="/static/icon/home/comment.png",exports._imports_4$1="/static/icon/invest/star.png",exports._imports_4$2="/static/icon/mine/vip/step1.png",exports._imports_4$3="/static/icon/mine/vip/notContain.png",exports._imports_5="/static/icon/home/follow.png",exports._imports_5$1="/static/icon/invest/star_s.png",exports._imports_5$2="/static/icon/mine/vip/step2.png",exports._imports_5$3="/static/icon/mine/vip/contain.png",exports._imports_6="/static/icon/home/close.png",exports._imports_6$1="/static/icon/mine/vip/step3.png",exports._imports_7="/static/icon/mine/vip/step4.png",exports._imports_8="/static/icon/mine/vip/investQuestion.png",exports._imports_9="/static/icon/home/sortArrow.png",exports._imports_9$1="/static/icon/mine/vip/industrialResearch.png";
|
||||
"use strict";exports._imports_0="/static/image/mine/myTopBg.png",exports._imports_0$1="/static/image/login/logo.png",exports._imports_1="/static/icon/home/search.png",exports._imports_1$1="/static/icon/home/downArrow.png",exports._imports_1$2="/static/icon/mine/infoArrow.png",exports._imports_1$3="/static/icon/mine/basicInfo/edit.png",exports._imports_1$4="/static/icon/home/conceptDownArrow.png",exports._imports_1$5="/static/icon/home/like_s.png",exports._imports_1$6="/static/icon/login/mobile.png",exports._imports_1$7="/pagesMine/static/image/vip/vipTopBg.png",exports._imports_1$8="/static/icon/back.png",exports._imports_10="/static/icon/home/follow.png",exports._imports_10$1="/pagesMine/static/icon/vip/step2.png",exports._imports_11="/static/icon/home/close.png",exports._imports_11$1="/pagesMine/static/icon/vip/step3_v.png",exports._imports_12="/static/icon/home/like.png",exports._imports_12$1="/pagesMine/static/icon/vip/step3.png",exports._imports_13="/static/icon/home/delete.png",exports._imports_13$1="/static/icon/home/sortArrow.png",exports._imports_13$2="/pagesMine/static/icon/vip/step4_v.png",exports._imports_14="/static/icon/home/industry_s.png",exports._imports_14$1="/pagesMine/static/icon/vip/step4.png",exports._imports_15="/pagesMine/static/icon/vip/investQuestion.png",exports._imports_16="/pagesMine/static/icon/vip/industrialResearch.png",exports._imports_17="/pagesMine/static/icon/vip/operatingDecision.png",exports._imports_2="/static/icon/backBlack.png",exports._imports_2$1="/static/icon/home/sort.png",exports._imports_2$2="/static/icon/home/upArrow.png",exports._imports_2$3="/static/icon/invest/calendar.png",exports._imports_2$4="/static/image/mine/vipBg.png",exports._imports_2$5="/static/icon/mine/basicInfo/downArrow.png",exports._imports_2$6="/static/icon/home/conceptUpArrow.png",exports._imports_2$7="/static/icon/login/code.png",exports._imports_2$8="/pagesMine/static/image/vip/noVipTopBg.png",exports._imports_3="/static/icon/home/browser.png",exports._imports_3$1="/static/icon/home/screen.png",exports._imports_3$2="/static/icon/invest/upArrow.png",exports._imports_3$3="/static/icon/mine/menuArrow.png",exports._imports_3$4="/static/icon/home/stockArrow.png",exports._imports_3$5="/static/icon/login/select_s.png",exports._imports_3$6="/pagesMine/static/icon/vip/titleLeft_v.png",exports._imports_4="/static/icon/home/comment.png",exports._imports_4$1="/static/icon/invest/downArrow.png",exports._imports_4$2="/static/icon/home/expectScore.png",exports._imports_4$3="/static/icon/login/select.png",exports._imports_4$4="/pagesMine/static/icon/vip/titleLeft.png",exports._imports_5="/static/icon/home/monthLeftArrow.png",exports._imports_5$1="/static/icon/home/expectScoreTips.png",exports._imports_5$2="/static/icon/home/follow_s.png",exports._imports_5$3="/pagesMine/static/icon/vip/titleRight_v.png",exports._imports_6="/static/icon/home/monthRightArrow.png",exports._imports_6$1="/pagesMine/static/icon/vip/titleRight.png",exports._imports_7="/pagesMine/static/icon/vip/step1_v.png",exports._imports_7$1="/pagesMine/static/icon/vip/notContain.png",exports._imports_8="/pagesMine/static/icon/vip/step1.png",exports._imports_8$1="/pagesMine/static/icon/vip/contain.png",exports._imports_9="/pagesMine/static/icon/vip/step2_v.png";
|
||||
|
||||
@@ -1 +1 @@
|
||||
"use strict";const e=require("../../common/vendor.js"),t=require("../../common/assets.js");getApp();const a={name:"navBar",data(){return{navH:e.inject("navHeight"),menuH:e.inject("menuHeight"),navBarStyle:"",backTitleStyle:"",navTitleStyle:"",titleColor:this.navTitleColor,bgColor:this.navBgColor,num:this.peopleNum}},props:{leftText:{type:String,default:""},backBlack:{type:Boolean,default:!1},navTitle:{type:String,default:""},navBgColor:{type:String,default:""},navTitleColor:{type:String,default:"white"},hideBack:{type:Boolean,default:!1},hideNavBg:{type:Boolean,default:!1},backLevel:{type:Number,default:1},peopleNum:{type:Number,default:0}},mounted(){let t=this.navH,a=e.inject("menuHeight"),l=e.inject("menuTop");this.hideNavBg&&(this.bgColor="transparent");let i=`background-color:${this.bgColor};height:${t}px;`,n=`height:${a}px;margin-top:${l}px;color:${this.titleColor}`,o=`height:${a}px;line-height:${a}px;top:${l}px;color:${this.titleColor}`;this.navBarStyle=i,this.backTitleStyle=n,this.navTitleStyle=o},watch:{navTitleColor:{handler(e,t){this.titleColor=e}},navBgColor:{handler(e,t){this.bgColor=e}},peopleNum:{handler(e,t){this.num=e}}},methods:{clickBack(){e.index.navigateBack({fail(){e.index.switchTab({url:"/pages/index/index"})}})}}};const l=e._export_sfc(a,[["render",function(a,l,i,n,o,r){return e.e({a:t._imports_0,b:!i.hideBack&&!i.backBlack},i.hideBack||i.backBlack?{}:{c:t._imports_1$7},{d:!i.hideBack&&i.backBlack},!i.hideBack&&i.backBlack?{e:t._imports_2$1}:{},{f:e.t(i.leftText),g:e.s(o.backTitleStyle),h:e.o(((...e)=>r.clickBack&&r.clickBack(...e))),i:e.t(i.navTitle),j:o.num>0},o.num>0?{k:e.t(o.num)}:{},{l:e.s(o.navTitleStyle),m:e.s(o.navBarStyle)})}]]);wx.createComponent(l);
|
||||
"use strict";const e=require("../../common/vendor.js"),t=require("../../common/assets.js");getApp();const a={name:"navBar",data(){return{navH:e.inject("navHeight"),menuH:e.inject("menuHeight"),navBarStyle:"",backTitleStyle:"",navTitleStyle:"",titleColor:this.navTitleColor,bgColor:this.navBgColor,num:this.peopleNum}},props:{leftText:{type:String,default:""},backBlack:{type:Boolean,default:!1},navTitle:{type:String,default:""},navBgColor:{type:String,default:""},navTitleColor:{type:String,default:"white"},hideBack:{type:Boolean,default:!1},hideNavBg:{type:Boolean,default:!1},backLevel:{type:Number,default:1},peopleNum:{type:Number,default:0}},mounted(){let t=this.navH,a=e.inject("menuHeight"),l=e.inject("menuTop");this.hideNavBg&&(this.titleColor="black");let i=`background-color:${this.bgColor};height:${t}px;`,o=`height:${a}px;margin-top:${l}px;color:${this.titleColor}`,n=`height:${a}px;line-height:${a}px;top:${l}px;color:${this.titleColor}`;this.navBarStyle=i,this.backTitleStyle=o,this.navTitleStyle=n},watch:{navTitleColor:{handler(e,t){this.titleColor=e}},navBgColor:{handler(e,t){this.bgColor=e}},peopleNum:{handler(e,t){this.num=e}}},methods:{clickBack(){e.index.navigateBack({fail(){e.index.switchTab({url:"/pages/index/index"})}})}}};const l=e._export_sfc(a,[["render",function(a,l,i,o,n,r){return e.e({a:!i.hideNavBg},i.hideNavBg?{}:{b:t._imports_0},{c:!i.hideBack&&!i.backBlack},i.hideBack||i.backBlack?{}:{d:t._imports_1$8},{e:!i.hideBack&&i.backBlack},!i.hideBack&&i.backBlack?{f:t._imports_2}:{},{g:e.t(i.leftText),h:e.s(n.backTitleStyle),i:e.o(((...e)=>r.clickBack&&r.clickBack(...e))),j:e.t(i.navTitle),k:n.num>0},n.num>0?{l:e.t(n.num)}:{},{m:e.s(n.navTitleStyle),n:e.s(n.navBarStyle)})}]]);wx.createComponent(l);
|
||||
|
||||
@@ -1 +1 @@
|
||||
<view class="nav flex fixed" style="{{m}}"><image class="bg absolute" src="{{a}}" mode="widthFix"></image><view class="backC relative flex" style="{{g}}" bindtap="{{h}}"><image wx:if="{{b}}" class="icon" src="{{c}}" mode="widthFix"></image><image wx:if="{{d}}" class="icon" src="{{e}}" mode="widthFix"></image><text class="title">{{f}}</text></view><view class="titleC relative" style="{{l}}">{{i}} <view wx:if="{{j}}" class="peopleNum absolute"><view class="num">{{k}}人</view></view></view></view>
|
||||
<view class="nav flex fixed" style="{{n}}"><image wx:if="{{a}}" class="bg absolute" src="{{b}}" mode="widthFix"></image><view class="backC relative flex" style="{{h}}" bindtap="{{i}}"><image wx:if="{{c}}" class="icon" src="{{d}}" mode="widthFix"></image><image wx:if="{{e}}" class="icon" src="{{f}}" mode="widthFix"></image><text class="title">{{g}}</text></view><view class="titleC relative" style="{{m}}">{{j}} <view wx:if="{{k}}" class="peopleNum absolute"><view class="num">{{l}}人</view></view></view></view>
|
||||
1
unpackage/dist/build/mp-weixin/components/ua-markdown/lib/highlight/uni-highlight.min.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/components/ua-markdown/lib/html-parser.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";function e(e){for(var t={},a=e.split(","),r=0;r<a.length;r++)t[a[r]]=!0;return t}e("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr"),e("a,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video"),e("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"),e("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),e("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),e("script,style");
|
||||
2
unpackage/dist/build/mp-weixin/components/ua-markdown/lib/markdown-it.min.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/components/ua-markdown/ua-markdown.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../../common/vendor.js"),t=require("./lib/markdown-it.min.js"),l=require("./lib/highlight/uni-highlight.min.js");require("./lib/html-parser.js");const s={__name:"ua-markdown",props:{source:String,showLine:{type:[Boolean,String],default:!0}},setup(s){const r=s;let a=[];const n=t.mt({html:!0,highlight:function(e,t){let s="";try{s=l.$e.highlightAuto(e).value}catch(c){s=n.utils.escapeHtml(e)}let i=s.split(/\n/).slice(0,-1).map(((e,t)=>""==e?"":'<li><span class="line-num" data-line="'+(t+1)+'"></span>'+e+"</li>")).join("");i=r.showLine?'<ol style="padding: 0px 30px;">'+i+"</ol>":'<ol style="padding: 0px 7px;list-style:none;">'+i+"</ol>",a.push(e);let o='<div class="markdown-wrap">';return o+=`<pre class="hljs" style="padding:10px 8px 0;margin-bottom:5px;overflow: auto;display: block;border-radius: 5px;"><code>${i}</code></pre>`,o+="</div>",o}}),i=e=>{if(!e)return;let t="";if((e=(e=e.replace(/<br>|<br\/>|<br \/>/g,"\n")).replace(/ /g," ")).split("```").length%2){let l=e;"\n"!=l[l.length-1]&&(l+="\n"),t=n.render(l)}else t=n.render(e);return t=t.replace(/<table/g,'<table class="table"'),t=t.replace(/<tr/g,'<tr class="tr"'),t=t.replace(/<th>/g,'<th class="th">'),t=t.replace(/<td/g,'<td class="td"'),t=t.replace(/<hr>|<hr\/>|<hr \/>/g,'<hr class="hr">'),t},o=t=>{let{attrs:l}=t.detail.node,{"code-data-index":s,class:r}=l;"copy-btn"==r&&e.index.setClipboardData({data:a[s],showToast:!1,success(){e.index.showToast({title:"复制成功",icon:"none"})}})};return(t,l)=>({a:i(s.source),b:e.o(o)})}},r=e._export_sfc(s,[["__scopeId","data-v-68886d85"]]);wx.createComponent(r);
|
||||
4
unpackage/dist/build/mp-weixin/components/ua-markdown/ua-markdown.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
unpackage/dist/build/mp-weixin/components/ua-markdown/ua-markdown.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="ua__markdown data-v-68886d85"><rich-text class="data-v-68886d85" space="nbsp" nodes="{{a}}" binditemclick="{{b}}"></rich-text></view>
|
||||