1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/mine/album"],{2937:function(t,e,n){"use strict";n.r(e);var o=n("2a6a"),a=n("b671");for(var i in a)"default"!==i&&function(t){n.d(e,t,(function(){return a[t]}))}(i);n("32b4");var s,u=n("f0c5"),c=Object(u["a"])(a["default"],o["b"],o["c"],!1,null,"bd91b780",null,!1,o["a"],s);e["default"]=c.exports},"2a6a":function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o}));var o={uniPopup:function(){return n.e("node-modules/@dcloudio/uni-ui/lib/uni-popup/uni-popup").then(n.bind(null,"8eb5"))},Popup:function(){return n.e("components/Popup/Popup").then(n.bind(null,"5643"))}},a=function(){var t=this,e=t.$createElement;t._self._c},i=[]},"32b4":function(t,e,n){"use strict";var o=n("4630"),a=n.n(o);a.a},4630:function(t,e,n){},"82e2":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=u(n("a34a")),a=u(n("dbb0")),i=n("f8e9"),s=n("eb73");function u(t){return t&&t.__esModule?t:{default:t}}function c(t,e,n,o,a,i,s){try{var u=t[i](s),c=u.value}catch(r){return void n(r)}u.done?e(c):Promise.resolve(c).then(o,a)}function r(t){return function(){var e=this,n=arguments;return new Promise((function(o,a){var i=t.apply(e,n);function s(t){c(i,o,a,s,u,"next",t)}function u(t){c(i,o,a,s,u,"throw",t)}s(void 0)}))}}var l=function(){Promise.all([n.e("common/vendor"),n.e("components/TabBar/TabBar")]).then(function(){return resolve(n("a31d"))}.bind(null,n)).catch(n.oe)},f=function(){n.e("components/Popup/Popup").then(function(){return resolve(n("5643"))}.bind(null,n)).catch(n.oe)},d=function(){n.e("components/DragImage/DragImage").then(function(){return resolve(n("0ea8"))}.bind(null,n)).catch(n.oe)},p=(new a.default({key:"E5SBZ-T2YC3-CBL3F-YGFQQ-26PP2-ERFII"}),{components:{TabBar:l,Popup:f,DragImage:d},data:function(){return{btnText:"去认证",pageName:"编辑相册",isChooseImage:!1,assetsUrl:this.$util.assetsUrl,scrollHeight:0,topNavHeight:0,scrollRefreshing:!1,scrollTriggered:!0,showNoData:!1,albumData:[],authChooseImages:[],moveItemAlbum:{},moveItemIndex:null,currentIndex:0,isSort:!1,popup:{content1:"",content2:"",tip1:"",tip2:"",btntext:""}}},computed:{statusBarHeight:function(){return this.$store.state.statusBarHeight},topbarOffsetHeight:function(){return this.$store.state.topbarOffsetHeight},imageCdn:function(){return this.$store.state.imageCdn},videoCdn:function(){return this.$store.state.videoCdn}},onLoad:function(t){"auth"===t.type?(this.isChooseImage=!0,this.btnText="前往认证",this.pageName="选择照片"):this.isChooseImage=!1,this.computedScollviewHeight(),this.getAlbumData()},mounted:function(){},onPageScroll:function(t){},methods:{back:function(){t.navigateBack({delta:1})},chooseImageHandle:function(t){this.authChooseImages=t},toAddImg:function(){this.btnText="从相册上传",this.isChooseImage?this.$refs.authPopup.open():this.$refs.popup.open()},popupMaskClick:function(){this.btnText=this.isChooseImage?"前往认证":"去认证"},authPopupMaskClick:function(){this.btnText=this.isChooseImage?"前往认证":"去认证"},closePopup:function(){this.$refs.popup.close(),this.$refs.modalPopup.close(),this.$refs.authPopup.close(),this.btnText=this.isChooseImage?"前往认证":"去认证"},sortImg:function(e){var n=JSON.parse(t.getStorageSync("user"));this.$api.public.albumSort({completeUser:n,mediaIdsInSeq:e}).then((function(t){}))},toService:function(){this.$refs.popup.close(),t.openCustomerServiceChat({extInfo:{url:"https://work.weixin.qq.com/kfid/kfca1b21d2f7e8a18e9"},corpId:"wwa8f2a0d8a6dc0950",fail:function(t){console.log(t),wx.showToast({title:"客服联系失败",icon:"none"})}})},computedScollviewHeight:function(){var e=this,n=t.createSelectorQuery().in(this),o=0;n.select("#topnav").boundingClientRect((function(t){e.topNavHeight=t.height,o+=t.height})).exec((function(){var n=t.getSystemInfoSync();e.scrollHeight=n.windowHeight-o}))},scrollRefresh:function(){var t=this;this.scrollRefreshing||(this.scrollRefreshing=!0,setTimeout((function(){t.scrollTriggered=!1,t.scrollRefreshing=!1}),1e3),this.getAlbumData())},scrollPulling:function(t){},scrollRestore:function(){this.scrollTriggered=!0},scrollAbort:function(){},scrollToBottom:function(){},getAlbumData:function(){var e=this,n=JSON.parse(t.getStorageSync("user"));this.$api.public.album({uurd:n.id}).then((function(t){for(var n=0;n<t.data.dms.length;n++)t.data.dms[n].isMove=!1;var o=[];if(e.isChooseImage){for(var a=0;a<t.data.dms.length;a++)"Img"===t.data.dms[a].cate&&o.push(t.data.dms[a]);e.albumData=o}else e.albumData=t.data.dms}))},deleteImg:function(t){this.$api.public.albumDelete({mediaId:this.albumData[t].mediaId}).then((function(t){}))},sure:function(){"从相册上传"===this.btnText?this.addImg():(this.popup={content1:"进行认证流程需给客服回复关键词",content2:"「真人认证」",tip1:"",tip2:"",btntext:"联系客服去认证"},this.$refs.modalPopup.open())},addImg:function(){var e=this;return r(o.default.mark((function n(){var a;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:a=e,e.closePopup(),t.chooseMedia({count:9,mediaType:e.isChooseImage?["image"]:["image","video"],sourceType:["album","camera"],maxDuration:30,camera:"back",success:function(e){t.showLoading({mask:!0,title:"正在上传···"});for(var n=[],o={},u=function(u){o={cate:"image"===e.tempFiles[u].fileType?"Img":"Vdo",cdt:"General",env:"Album",url:null};var c=(0,i.getPolicy)(),r=(0,s.encode)(JSON.stringify(c)),l=(0,i.getKey)(u,e.tempFiles[u].tempFilePath.split(".")[1]);a.$api.public.aliossToken({}).then((function(s){var c={key:l,policy:r,OSSAccessKeyId:s.data.accessKeyId,signature:(0,i.computeSignature)(s.data.accessKeySecret,r),"x-oss-security-token":s.data.securityToken,success_action_status:"200"};t.uploadFile({url:"https://zhenyanapp-gen.oss-cn-qingdao.aliyuncs.com",filePath:e.tempFiles[u].tempFilePath,name:"file",header:{"Content-Type":"multipart/form-data"},formData:c,success:function(i){if(200===i.statusCode){if("Img"===o.cate){var s="".concat(a.imageCdn,"/").concat(l);o.url=s}else if("Vdo"===o.cate){var u="".concat(a.videoCdn,"/").concat(l);o.url=u}n.push(o),n.length===e.tempFiles.length&&a.$api.public.albumAdd({addMediaParamList:n}).then((function(e){"Succ"===e.status&&(a.getAlbumData(),t.hideLoading())}))}},fail:function(t){console.log(t)}})}))},c=0;c<e.tempFiles.length;c++)u(c)}});case 3:case"end":return n.stop()}}),n)})))()}}});e.default=p}).call(this,n("543d")["default"])},a4f6:function(t,e,n){"use strict";(function(t){n("39a3");o(n("66fd"));var e=o(n("2937"));function o(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=n,t(e.default)}).call(this,n("543d")["createPage"])},b671:function(t,e,n){"use strict";n.r(e);var o=n("82e2"),a=n.n(o);for(var i in o)"default"!==i&&function(t){n.d(e,t,(function(){return o[t]}))}(i);e["default"]=a.a}},[["a4f6","common/runtime","common/vendor"]]]);
|