stockprogram.js 7.9 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/stock/stockprogram"],{"2f83":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return o}));var o={faNavbar:function(){return n.e("components/fa-navbar/fa-navbar").then(n.bind(null,"6858"))},uPopup:function(){return n.e("uview-ui/components/u-popup/u-popup").then(n.bind(null,"0cac"))},uIcon:function(){return n.e("uview-ui/components/u-icon/u-icon").then(n.bind(null,"ba52"))},uTag:function(){return n.e("uview-ui/components/u-tag/u-tag").then(n.bind(null,"a8f0"))},uActionSheet:function(){return n.e("uview-ui/components/u-action-sheet/u-action-sheet").then(n.bind(null,"54be"))},uInput:function(){return Promise.all([n.e("common/vendor"),n.e("uview-ui/components/u-input/u-input")]).then(n.bind(null,"b3e3"))},faTabbar:function(){return Promise.all([n.e("common/vendor"),n.e("components/fa-tabbar/fa-tabbar")]).then(n.bind(null,"ecd8"))}},i=function(){var t=this,e=t.$createElement;t._self._c;t._isMounted||(t.e0=function(e){t.showdown=!t.showdown})},r=[]},a59d6:function(t,e,n){"use strict";(function(t){n("630e");o(n("66fd"));var e=o(n("c9b6"));function o(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("f266")["createPage"])},a828:function(t,e,n){"use strict";n.r(e);var o=n("ed2b"),i=n.n(o);for(var r in o)"default"!==r&&function(t){n.d(e,t,(function(){return o[t]}))}(r);e["default"]=i.a},aec8:function(t,e,n){"use strict";var o=n("b490"),i=n.n(o);i.a},b490:function(t,e,n){},c9b6:function(t,e,n){"use strict";n.r(e);var o=n("2f83"),i=n("a828");for(var r in i)"default"!==r&&function(t){n.d(e,t,(function(){return i[t]}))}(r);n("aec8");var a,u=n("f0c5"),c=Object(u["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],a);e["default"]=c.exports},ed2b:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=c(n("a34a")),i=c(n("c2fa")),r=(n("fc83"),n("a90a")),a=n("b3c6"),u=n("61f6");function c(t){return t&&t.__esModule?t:{default:t}}function s(t,e,n,o,i,r,a){try{var u=t[r](a),c=u.value}catch(s){return void n(s)}u.done?e(c):Promise.resolve(c).then(o,i)}function d(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var r=t.apply(e,n);function a(t){s(r,o,i,a,u,"next",t)}function u(t){s(r,o,i,a,u,"throw",t)}a(void 0)}))}}n("245f");var h=function(){Promise.all([n.e("common/vendor"),n.e("node-modules/mp-html/dist/uni-app/components/mp-html/mp-html")]).then(function(){return resolve(n("71c1"))}.bind(null,n)).catch(n.oe)},l=function(){Promise.all([n.e("common/vendor"),n.e("uni_modules/jones-hqchart2/js_sdk/HQChartControl")]).then(function(){return resolve(n("6a94"))}.bind(null,n)).catch(n.oe)};a.JSCommonCoordinateData.MinuteTimeStringData.CreateSHSZData=function(){return i.default.HQData.CreateSHSZData(a.JSCommonCoordinateData.MinuteTimeStringData)},a.JSCommonCoordinateData.MinuteCoordinateData.GetSHSZData=function(t,e){return i.default.HQData.GetSHSZData(t,e)},r.JSConsole.Complier.Log=function(){},r.JSConsole.Chart.Log=function(){};var f={components:{HQChartControl:l,mpHtml:h},data:function(){var t={Symbol:"600000.sh",ChartWidth:350,ChartHeight:500,showtool:!0,showtip:!0,mycode:"JX1:=MA(CLOSE,13);\nJX2:=MA(CLOSE,49);\nDRAWICON(CROSS(JX1,JX2),L,1);\nDRAWICON(CROSS(JX2,JX1),H,2);",scripts:"",editmode:!1,scripttype:!0,codeError:"",errColor:"#ff0000",viewstyle:"height: 200px; background-color: #2d2d2d;",pagetitle:"",codeloaded:!1,productid:0,studyid:0,downtype:0,showdown:!1,downoption:[{text:"复制到剪贴板",color:"blue",fontSize:28},{text:"下载到电脑安装",color:"blue",fontSize:28}]};return t},watch:{showtool:function(t){if(!t){this.showtip=!0;var e=this;setTimeout((function(){e.showtip=!1}),1e3)}}},onLoad:function(e){var n=this;t.$on("centerButtonClick",(function(t){n.switchtab(t)})),e.productid&&(this.productid=e.productid)},onShow:function(){var e=this;t.getSystemInfo({success:function(t){var n=t.windowWidth,o=t.windowHeight;e.ChartWidth=n,e.ChartHeight=o-100,e.$nextTick((function(){e.CreateHQChart()}))}});this.codeloaded=!1,this.checkcode()},onHide:function(){this.ClearHQChart()},onUnload:function(){this.ClearHQChart()},methods:{switchtab:function(t){return 2!=t||(this.showtool=!this.showtool,this.showtool&&this.checkcode(),!1)},CreateHQChart:function(){var t=this.ChartHeight,e=this.$refs.HQChartCtrl;e.NetworkFilter=this.NetworkFilter,e.KLine.Option.IsApiPeriod=!0,e.KLine.Option.IsClickShowCorssCursor=!0,e.KLine.Option.IsAutoUpdate=!0,e.KLine.Option.AutoUpdateFrequency=1e4,e.KLine.Option.KLineTitle={IsShowName:!1,IsShowSettingInfo:!1,IsShowDateTime:!0},e.KLine.Option.Windows=[{Script:"MA1:MA(CLOSE,N);MA2:MA(CLOSE,M);",Args:[{Name:"N",Value:13},{Name:"M",Value:49}],Name:"我的主图",Modify:!1,Change:!1},{Script:"DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);DEA:EMA(DIF,MID);MACD:(DIF-DEA)*2,COLORSTICK;",Args:[{Name:"SHORT",Value:12},{Name:"LONG",Value:26},{Name:"MID",Value:9}],Name:"我的副图",Modify:!1,Change:!1},{Index:"RSI",Modify:!1,Change:!1}],e.Minute.Option.IsAutoUpdate=!0,e.Minute.Option.AutoUpdateFrequency=1e4,e.SetSize(this.ChartWidth,t),e.OnSize(),e.CreateHQChart()},ClearHQChart:function(){var t=this.$refs.HQChartCtrl;t&&t.ClearChart()},ChangeMinutePeriod:function(t){var e=this.$refs.HQChartCtrl;e.ChangeMinutePeriod(t)},ChangeKLinePeriod:function(t){var e=this.$refs.HQChartCtrl;e.ChangeKLinePeriod(t)},ChangeSymbol:function(t){var e=this.$refs.HQChartCtrl;e.ChangeSymbol(t)},NetworkFilter:function(t,e){i.default.HQData.NetworkFilter(t,e)},changsctype:function(){this.scripttype=!this.scripttype},vinInput:function(t){var e=t;return e=e.toUpperCase(),this.mycode=e,e},editcode:function(){this.viewstyle="height: 180px; background-color: #fff;",this.editmode=!0},checkcode:function(){var t=d(o.default.mark((function t(){var e,n,i,r,a=this;return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e=this.productid,!(e>0)||this.codeloaded){t.next=8;break}return t.next=5,this.$api.getArchivesDetail({id:e,diyname:""});case 5:n=t.sent,n.code>0&&(this.pagetitle=n.data.archivesInfo.title,this.mycode=n.data.archivesInfo.tongdaxin,this.studyid=n.data.archivesInfo.studyid,this.codeloaded=!0);case 8:this.editmode=!1,this.viewstyle="height: 180px; background-color: #2d2d2d;",i=this,setTimeout((function(){var t=i.$refs.article;t&&t.setContent("<pre><code>"+i.mycode+"</code></pre>")}),2e3),i=this,r={Callback:function(t){for(var e in t)t[e];if(i.errColor="#00FF00",i.codeError="语法正确",i.scripttype){var n={Name:"我的主图",Script:i.mycode,Args:[]},o=a.$refs.HQChartCtrl;o.ChangeScriptIndex(0,n)}else{n={Name:"我的副图",Script:i.mycode,Args:[]};var r=a.$refs.HQChartCtrl;r.ChangeScriptIndex(1,n)}},ErrorCallback:function(t,e){t.LineNumber&&(i.errColor="#FF0000",i.codeError="语法错误: 行号:".concat(t.LineNumber,", ").concat(t.Description))}},u.JSCommonComplier.JSComplier.Explain(i.mycode,r,r.ErrorCallback);case 15:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}(),openstudy:function(){this.$Router.push({path:"/pages/article/detail",query:{id:this.studyid}})},copycode:function(){t.setClipboardData({data:this.mycode,success:function(e){t.showToast({title:"已复制到剪贴板"})}})},downcode:function(){t.showToast({title:"本功能暂未开放"})},getUserIndex:function(){var e=d(o.default.mark((function e(){var n;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,this.$api.getUserIndex();case 2:if(n=e.sent,t.stopPullDownRefresh(),n.code){e.next=7;break}return this.$u.toast(n.msg),e.abrupt("return");case 7:this.$u.vuex("vuex_user",n.data.userInfo||{});case 8:case"end":return e.stop()}}),e,this)})));function n(){return e.apply(this,arguments)}return n}(),downclick:function(t){if(0==t&&this.copycode(),1==t){if(this.vuex_token?this.getUserIndex():this.$u.vuex("vuex_user",{}),!this.vuex_token)return void this.$u.toast("请先登录再操作!");this.downcode()}}}};e.default=f}).call(this,n("f266")["default"])}},[["a59d6","common/runtime","common/vendor"]]]);