启程易购后端代码
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.
 
 
 
 
 
 
qicheng_shop_backend/public/static/js/pages-plantGrass-plant_user...

1 lines
10 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-plantGrass-plant_user-index"],{"52c1":function(t,e,a){var n=a("24fb");e=n(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.container[data-v-0d095622]{background:#fff;min-height:100vh}.header[data-v-0d095622]{width:%?750?%;height:%?400?%;padding:%?56?% %?30?% 0;background-repeat:no-repeat;background-size:100%}.header .user_wrapper[data-v-0d095622]{align-items:center}.header .user_wrapper .image[data-v-0d095622], .header .user_wrapper uni-image[data-v-0d095622], .header .user_wrapper uni-image[data-v-0d095622]{width:%?140?%;height:%?140?%;border-radius:100%;border:%?4?% solid #fff}.header .user_wrapper .user_text[data-v-0d095622]{margin-left:%?22?%;color:#fff}.header .user_wrapper .user_text .name[data-v-0d095622]{font-size:%?34?%;font-weight:700;align-items:center}.header .user_wrapper .user_text .user_id[data-v-0d095622]{margin-top:%?16?%;font-size:%?24?%}.header .user_wrapper .user_text .level_icon[data-v-0d095622]{width:%?34?%;height:%?32?%;margin:%?4?% 0 0 %?6?%;border:none}.header .plant_info[data-v-0d095622]{margin-top:%?60?%;align-items:center;justify-content:space-between}.header .plant_info .count_wrapper[data-v-0d095622]{color:#fff;font-size:%?24?%}.header .plant_info .count_wrapper .item[data-v-0d095622]{text-align:center;margin-right:%?60?%}.header .plant_info .count_wrapper .item[data-v-0d095622]:last-child{margin-right:0}.header .plant_info .count_wrapper .item uni-text[data-v-0d095622]{display:block;font-size:%?30?%;margin-top:%?10?%}.header .follow_btn[data-v-0d095622]{color:#fff;font-size:%?26?%;display:flex;align-items:center;justify-content:center;width:%?146?%;height:%?62?%;background-color:initial;background-image:linear-gradient(270deg,var(--view-bntColor21),var(--view-bntColor22));border-radius:%?33?%}.header .follow_btn .iconfont[data-v-0d095622]{font-size:%?16?%;margin-right:%?12?%}.header .follow_btn .icon-fabu[data-v-0d095622]{font-size:%?24?%}.header .follow_btn.focused[data-v-0d095622]{background:transparent;color:#fff;border:1px solid #fff}.main[data-v-0d095622]{background:#fff;padding:%?30?% 0;border-radius:%?24?% %?24?% 0 0;position:relative;top:%?-20?%}.main .tab_count[data-v-0d095622]{margin-bottom:%?40?%;text-align:center}.main .tab_count uni-text[data-v-0d095622]{font-size:%?28?%;color:#999;margin:0 %?30?%;position:relative;padding-bottom:%?10?%}.main .tab_count uni-text.on[data-v-0d095622]{font-size:%?32?%;color:#282828;font-weight:700}.main .tab_count uni-text.on[data-v-0d095622]::after{content:"";width:%?40?%;height:%?5?%;background:var(--view-theme);position:absolute;bottom:0;left:%?10?%}.goods[data-v-0d095622]{display:flex;flex-wrap:wrap;justify-content:space-between;width:%?750?%;padding:0 %?20?%}.empty[data-v-0d095622]{margin:%?130?% 0 %?150?%;text-align:center}.empty uni-image[data-v-0d095622], .empty uni-image[data-v-0d095622]{display:inline-block;width:%?414?%;height:%?305?%}.empty uni-text[data-v-0d095622]{display:block;color:#999;font-size:%?26?%}.end[data-v-0d095622]{margin-top:%?50?% 0;text-align:center}.end uni-text[data-v-0d095622]{color:#999;font-size:%?22?%;position:relative}.end uni-text.loaded[data-v-0d095622]::before, .end uni-text.loaded[data-v-0d095622]::after{content:"";display:inline-block;width:%?22?%;height:%?1?%;background:#999;position:absolute;top:%?18?%;opacity:.5}.end uni-text.loaded[data-v-0d095622]::before{left:%?-30?%}.end uni-text.loaded[data-v-0d095622]::after{right:%?-30?%}',""]),t.exports=e},"76fa":function(t,e,a){"use strict";a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return o})),a.d(e,"a",(function(){return n}));var n={WaterfallsFlow:a("7612").default},i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"container",style:t.viewColor},[a("v-uni-view",{staticClass:"header",style:{"background-image":"url("+t.domain+"/static/images/plant-header.png)"}},[a("v-uni-view",{staticClass:"user_wrapper acea-row"},[a("v-uni-image",{staticClass:"picture",attrs:{src:t.userInfo.avatar||"/static/images/f.png"}}),a("v-uni-view",{staticClass:"user_text"},[a("v-uni-view",{staticClass:"name acea-row"},[a("v-uni-text",[t._v(t._s(t.userInfo.nickname||""))]),t.userInfo.member_icon?a("v-uni-image",{staticClass:"level_icon",attrs:{src:t.userInfo.member_icon,alt:""}}):t._e()],1),a("v-uni-view",{staticClass:"user_id"},[t._v("ID: "+t._s(t.userInfo.uid||""))])],1)],1),a("v-uni-view",{staticClass:"plant_info acea-row"},[a("v-uni-view",{staticClass:"count_wrapper acea-row"},[a("v-uni-navigator",{staticClass:"item",attrs:{url:t.userInfo.is_self?"/pages/plantGrass/plant_user_attention/index":"","hover-class":"none"}},[a("v-uni-text",[t._v(t._s(t.userInfo.focus))]),t._v("关注")],1),a("v-uni-navigator",{staticClass:"item",attrs:{url:t.userInfo.is_self?"/pages/plantGrass/plant_user_fans/index":"","hover-class":"none"}},[a("v-uni-text",[t._v(t._s(t.userInfo.fans))]),t._v("粉丝")],1),a("v-uni-view",{staticClass:"item"},[a("v-uni-text",[t._v(t._s(t.userInfo.start))]),t._v("获赞")],1)],1),t.userInfo.is_self?a("v-uni-view",[a("v-uni-navigator",{staticClass:"follow_btn focus",attrs:{"hover-class":"none",url:"/pages/plantGrass/plant_release/index"}},[a("v-uni-text",{staticClass:"iconfont icon-fabu"}),t._v("发布")],1)],1):a("v-uni-view",{on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.followAuthor.apply(void 0,arguments)}}},[t.userInfo.is_start?a("v-uni-button",{staticClass:"follow_btn focused"},[t._v("已关注")]):a("v-uni-button",{staticClass:"follow_btn focus"},[a("v-uni-text",{staticClass:"iconfont icon-jiahao2"}),t._v("关注")],1)],1)],1)],1),a("v-uni-view",{staticClass:"main"},[t.userInfo.is_self?a("v-uni-view",{staticClass:"tab_count"},[a("v-uni-text",{class:0==t.tab?"on":"",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.changeTab(0)}}},[t._v("作品")]),a("v-uni-text",{class:1==t.tab?"on":"",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.changeTab(1)}}},[t._v("赞过")])],1):t._e(),a("v-uni-view",{staticClass:"tab-cont"},[t.goods.length>0?a("v-uni-view",{staticClass:"goods-wrap"},[a("v-uni-view",{staticClass:"goods"},[a("WaterfallsFlow",{attrs:{wfList:t.goods,isAuth:1,uid:parseInt(t.uid),tab:t.tab}})],1)],1):t._e(),0!=t.goods.length||t.loading?t._e():a("v-uni-view",{staticClass:"empty"},[a("v-uni-image",{attrs:{src:t.domain+"/static/images/no_thing.png"}}),a("v-uni-text",[t._v("暂无内容哦~")])],1),a("v-uni-view",{staticClass:"loadingicon acea-row row-center-wrapper"},[a("v-uni-text",{staticClass:"loading iconfont icon-jiazai",attrs:{hidden:0==t.loading}}),a("v-uni-view",{staticClass:"end",attrs:{hidden:t.loading||0==t.goods.length}},[a("v-uni-text",{class:t.loaded?"loaded":""},[t._v(t._s(t.loadTitle))])],1)],1)],1)],1)],1)},o=[]},"8afb":function(t,e,a){"use strict";var n=a("c91f"),i=a.n(n);i.a},bbf9:function(t,e,a){"use strict";a.r(e);var n=a("76fa"),i=a("dc95");for(var o in i)["default"].indexOf(o)<0&&function(t){a.d(e,t,(function(){return i[t]}))}(o);a("8afb");var s=a("f0c5"),r=Object(s["a"])(i["default"],n["b"],n["c"],!1,null,"0d095622",null,!1,n["a"],void 0);e["default"]=r.exports},c91f:function(t,e,a){var n=a("52c1");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=a("4f06").default;i("67d02749",n,!0,{sourceMap:!1,shadowMode:!1})},dc95:function(t,e,a){"use strict";a.r(e);var n=a("fd34"),i=a.n(n);for(var o in n)["default"].indexOf(o)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(o);e["default"]=i.a},fd34:function(t,e,a){"use strict";a("7a82");var n=a("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(a("5530")),o=n(a("300a")),s=a("3fd7"),r=a("26cb"),d=a("ddb3"),l=a("f26a"),u=(getApp(),{components:{WaterfallsFlow:o.default},data:function(){return{domain:l.HTTP_REQUEST_URL,goods:[],loadTitle:"加载更多",loading:!1,loaded:!1,userInfo:{},where:{page:1,limit:30},tab:0,uid:""}},created:function(){},computed:(0,i.default)({},(0,r.mapGetters)(["isLogin","viewColor"])),watch:{},onLoad:function(t){this.uid=t.id,this.isLogin?(this.getAuthorInfo(this.uid),this.getList(this.uid)):(0,d.toLogin)()},onShow:function(){},onReady:function(){},mounted:function(){},methods:{getAuthorInfo:function(t){var e=this;(0,s.userInfoApi)(t).then((function(t){e.userInfo=t.data}))},followAuthor:function(){var t=this;if(!1===this.isLogin)(0,d.toLogin)();else{var e=!this.userInfo.is_start;(0,s.followAuthorApi)(this.userInfo.uid,{status:e}).then((function(e){200===e.status&&(t.userInfo.is_start=!t.userInfo.is_start),t.$util.Tips({title:e.message})}))}},changeTab:function(t){this.tab=t,this.where.page=1,this.loaded=this.loading=!1,this.goods=[];var e=this.userInfo.is_self?this.uid:this.userInfo.uid;this.getList(e)},getList:function(t){var e=this;e.loaded||e.loading||(e.loading=!0,e.loadTitle="",1==e.tab?this.where.is_type=1:this.where.is_type="",0==e.tab?(0,s.userArticleLst)(t,e.where).then((function(t){var a=t.data.list,n=e.$util.SplitArray(a,e.goods);e.loaded=a.length<e.where.limit,e.loading=!1,e.loadTitle=e.loaded?"到底了":"加载更多",e.$set(e,"goods",n),e.$set(e.where,"page",e.where.page+1)})).catch((function(t){e.loading=!1,uni.showToast({title:t,icon:"none"})})):(0,s.starArticleLst)(e.where).then((function(t){e.loading=!1;var a=t.data.list,n=e.$util.SplitArray(a,e.goods);e.loaded=a.length<e.where.limit,e.loading=!1,e.loadTitle=e.loaded?"到底了":"加载更多",e.$set(e,"goods",n),e.$set(e.where,"page",e.where.page+1)})).catch((function(t){e.loading=!1,uni.showToast({title:t,icon:"none"})})))}},onReachBottom:function(){var t=this.userInfo.is_self?this.uid:this.userInfo.uid;this.getList(t)},onPullDownRefresh:function(){},onPageScroll:function(t){uni.$emit("scroll")}});e.default=u}}]);