You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
6.4 KiB
1 lines
6.4 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/question/index"],{"15fd":function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return c})),i.d(e,"a",(function(){return n}));var n={uIcon:function(){return Promise.all([i.e("common/vendor"),i.e("uni_modules/uview-ui/components/u-icon/u-icon")]).then(i.bind(null,"fef4"))}},a=function(){var t=this,e=t.$createElement,i=(t._self._c,t.staticUrl("/static/icon-arrow.png")),n=t.categoryList[t.categoryIndex]&&t.categoryList[t.categoryIndex].children.length>0,a=n?t.__map(t.categoryList[t.categoryIndex].children,(function(e,i){var n=t.__get_orig(e),a=e.children&&e.children.length>0,c=a?t.__map(e.children,(function(e,i){var n=t.__get_orig(e),a=e.isSelect?t.staticUrl("/static/icon-select-on.png"):null,c=e.isSelect?null:t.staticUrl("/static/icon-select.png");return{$orig:n,m1:a,m2:c}})):null,r=!a&&e.isSelect?t.staticUrl("/static/icon-select-on.png"):null,o=a||e.isSelect?null:t.staticUrl("/static/icon-select.png");return{$orig:n,g1:a,l0:c,m3:r,m4:o}})):null,c=t.staticUrl("/static/icon-t-03.png"),r=t.staticUrl("/static/icon-error.png"),o=t.staticUrl("/static/icon-arrow.png"),s=t.staticUrl("/static/icon-t-04.png"),l=t.staticUrl("/static/icon-error.png"),u=t.staticUrl("/static/icon-arrow.png"),g=t.staticUrl("/static/icon-error.png"),d=t.staticUrl("/static/icon-arrow.png"),f=t.staticUrl("/static/icon-t-05.png"),h=t.staticUrl("/static/icon-t-06.png"),p=t.staticUrl("/static/icon-error.png"),y=t.staticUrl("/static/icon-arrow.png");t._isMounted||(t.e0=function(e,i,n,a,c){var r=arguments[arguments.length-1].currentTarget.dataset,o=r.eventParams||r["event-params"];i=o.b,n=o.a,a=o.index,c=o.idx;e.stopPropagation(),0==i.is_buy&&t.openPage(3,n,3,a,c)},t.e1=function(e,i,n){var a=arguments[arguments.length-1].currentTarget.dataset,c=a.eventParams||a["event-params"];i=c.a,n=c.index;e.stopPropagation(),0==i.is_buy&&t.openPage(3,t.categoryList[t.categoryIndex],2,n)}),t.$mp.data=Object.assign({},{$root:{m0:i,g0:n,l1:a,m5:c,m6:r,m7:o,m8:s,m9:l,m10:u,m11:g,m12:d,m13:f,m14:h,m15:p,m16:y}})},c=[]},"7e79":function(t,e,i){"use strict";i.r(e);var n=i("e038"),a=i.n(n);for(var c in n)["default"].indexOf(c)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(c);e["default"]=a.a},"7faa":function(t,e,i){"use strict";(function(t,e){var n=i("47a9");i("482e");n(i("3240"));var a=n(i("8266"));t.__webpack_require_UNI_MP_PLUGIN__=i,e(a.default)}).call(this,i("3223")["default"],i("df3c")["createPage"])},8266:function(t,e,i){"use strict";i.r(e);var n=i("15fd"),a=i("7e79");for(var c in a)["default"].indexOf(c)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(c);i("c116");var r=i("828b"),o=Object(r["a"])(a["default"],n["b"],n["c"],!1,null,"541d598a",null,!1,n["a"],void 0);e["default"]=o.exports},c116:function(t,e,i){"use strict";var n=i("e29d"),a=i.n(n);a.a},e038:function(t,e,i){"use strict";(function(t){var n=i("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n(i("7eb4")),c=n(i("ee10")),r={data:function(){return{isToggle:!0,categoryList:[],categoryIndex:0,categoryArray:[],info:{},realforecastInfo:{forecast_score:0,last_score:0}}},onShow:function(){this.getCategoryList()},methods:{toggleItem:function(){this.isToggle=!this.isToggle},toSelect:function(t,e){this.categoryList[this.categoryIndex].children.map((function(t){t.isSelect=!1,t.children&&t.children.map((function(t){t.isSelect=!1,t.children&&t.children.map((function(t){t.isSelect=!1}))}))})),this.categoryList[this.categoryIndex].children&&(this.categoryList[this.categoryIndex].children[t].isSelect=!0,this.info=this.categoryList[this.categoryIndex].children[t],this.getRealforecast())},toSelect1:function(t,e,i){this.categoryList[this.categoryIndex].children.map((function(t){t.isSelect=!1}));var n=this.categoryList[this.categoryIndex].children;n[t].children&&n[t].children.length>0&&(this.categoryList[this.categoryIndex].children.map((function(t){t.isSelect=!1,t.children&&t.children.map((function(t){t.isSelect=!1}))})),this.categoryList[this.categoryIndex].children[t].children[e].isSelect=!0,this.info=this.categoryList[this.categoryIndex].children[t].children[e],this.isToggle=!0,this.getRealforecast())},bindPickerChange:function(t){this.categoryIndex=t.detail.value},getRealforecast:function(){var e=this;return(0,c.default)(a.default.mark((function i(){var n,c,r,o;return a.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.next=2,e.$api.Realforecast({category_id:e.info.id});case 2:n=i.sent,c=n.code,r=n.data,o=n.msg,200==c?e.realforecastInfo=r:t.showToast({icon:"none",title:o});case 7:case"end":return i.stop()}}),i)})))()},getCategoryList:function(){var e=this;return(0,c.default)(a.default.mark((function i(){var n,c,r,o,s,l;return a.default.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return n=e,i.next=3,e.$api.categoryTreeList({});case 3:c=i.sent,r=c.code,o=c.data,s=c.msg,200==r?(l=[],[],o&&o.length>0&&o.map((function(t){l.push(t.name),t.isSelect=!1,n.info.id==t.id&&(t.isSelect=!0),t.children&&t.children.length>0&&t.children.map((function(t){t.isSelect=!1,n.info.id==t.id&&(t.isSelect=!0),t.children&&t.children.length>0&&t.children.map((function(t){t.isSelect=!1,n.info.id==t.id&&(t.isSelect=!0)}))}))})),e.categoryArray=l,e.categoryList=o):t.showToast({icon:"none",title:s});case 8:case"end":return i.stop()}}),i)})))()},openPage:function(e,i,n,a,c){if(t.getStorageSync("userToken")){if(1==e)this.info.id?(t.setStorageSync("categoryTitle",this.info.name),4==i?t.navigateTo({url:"/pages/exercises/cuowuti/cuowuti?id="+this.info.id+"&type="+i}):t.navigateTo({url:"/pages/exercises/index?id="+this.info.id+"&type="+i})):t.showToast({icon:"none",title:"请选择分类"});else if(2==e)this.info.id?(t.setStorageSync("categoryTitle",this.info.name),0==i?t.navigateTo({url:"/pages/study/index?id="+this.info.id+"&type="+i}):3==i?t.navigateTo({url:"/pages/study/free?id="+this.info.id}):t.navigateTo({url:"/pages/study/detail?type="+i+"&id="+this.info.id})):t.showToast({icon:"none",title:"请选择分类"});else if(3==e){if(!t.getStorageSync("userToken"))return void t.navigateTo({url:"/pages/login/login"});i.idx=a,i.idx1=c,i.type=n,t.setStorageSync("teamInfo",i),t.navigateTo({url:"/pages/question/buyTwo"})}else if(4==e){if(!t.getStorageSync("userToken"))return void t.navigateTo({url:"/pages/login/login"});t.navigateTo({url:"/pages/question/buyOne"})}}else t.navigateTo({url:"/pages/login/login"})}}};e.default=r}).call(this,i("df3c")["default"])},e29d:function(t,e,i){}},[["7faa","common/runtime","common/vendor"]]]); |