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 line
9.2 KiB
1 line
9.2 KiB
1 month ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-dongtai-add"],{"222d":function(t,n,i){"use strict";i("6a54");var e=i("f5bd").default;Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=e(i("2634")),o=e(i("2fdc"));i("aa9c"),i("dd2b");var d={data:function(){return{content:"",imgurl:[]}},onReady:function(){var t=this;uni.$on("uAvatarCropper",(function(n){var i=t;uni.uploadFile({url:i.$baseUrl+"/prod-api/common/upload",filePath:n,name:"file",complete:function(t){if(200==t.statusCode){var n=JSON.parse(t.data),e=n.code,a=(n.fileName,n.url);n.msg;200==e?(uni.showToast({title:"上传成功"}),i.imgurl.push(a)):uni.showToast({icon:"error",title:"上传失败"})}else uni.showToast({icon:"error",title:"上传失败"})}})}))},methods:{toReg:function(){var t=this;return(0,o.default)((0,a.default)().mark((function n(){var i,e;return(0,a.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.$api.publishArticle({userId:uni.getStorageSync("userInfo").id,content:t.content,imgurl:t.imgurl.join(",")});case 2:i=n.sent,e=i.code,i.data,200==e?(uni.showToast({title:"发布成功"}),uni.$emit("toAddDongtai"),setTimeout((function(){uni.navigateBack({delta:1})}),2e3)):uni.showToast({icon:"none",position:"bottom",title:msg});case 6:case"end":return n.stop()}}),n)})))()},toDel:function(t){this.imgurl.splice(t,1)},toNext:function(){this.$u.route({url:"/uni_modules/vk-uview-ui/components/u-avatar-cropper/u-avatar-cropper",params:{destWidth:900,rectWidth:300,fileType:"jpg"}})}}};n.default=d},"243d":function(t,n){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAAXNSR0IArs4c6QAAAsNJREFUSEvtl01vElEUhk8TyAx1OmqiJu2CllVXVE3Qv+DCuCGk6XYIH43RULCE0kzCqgltM5UOZOKigU4TCum2K/0JutC4Eo0LjNUQjQmOE/kYGHMIUxtTOpcC6UZWA/fc95n33HMP947B348dAOYA4AYAWE78PozHBgB8B4C3APAJBce6qncA4PYwCAQarwHgFYKnAeAewYRhhjxH8AMAmBymKoHWVwR7R7CmZmwNwQGzqFGM/wePIqunahKl+vDw8L7L5ZoLhULywcHBl7Pezu12T2az2UeVSuVodnZW6hVLBK5Wq2ssy16r1WoKx3FbxWLxVPj8/PxULpcLj4+Ps41G4zdFUUsDgRcXFx2iKC5ZrVa6F9zj8Uzu7e09sdlsE5qmNXmeT6+vr5cGAuNkn883LUlSpAv/xXGcYDhHp7u7uxGEtlqt5vLy8nYqlfpw1pIQpdoQOA2uaZpuOEXo6upqemNjo6dTQ6svME4KBoMz6XQ6jM5VVa3quq4zDHMFobFYTBQE4T3J1ugbjKJ+v39GFMXHNE0z+L1Wq6k8zz8jhRp/i323TCwkWZaxei+jiKqqP/1+f6pQKByRuD0XeGFhYSqbzXYKCbeMruttiqIu1et1LLgtUnhfqcbqlWU5QtP0RLvdbkaj0W1FUZqSJIUtFguNcK/X+3R/f/+zmXNiMDrN5XLH0JWVFXFzc7NTSIFAwJHJZLDgqHq9ruJWM3NOBMY2mM/nEcpi9fI8n0kmk+9Ouuo2mQ4ci83n8wn5fL7nmhOBFUVJMgxzFaHxePzY6b/pPNnhFEX5wbJsfKDOVSqVHtrtdkcikdgxaw641QRBCJbL5Y9Op3NnILBZoZxnnCjV5xE2m4NgDgCsZoFDHu8c9i7seHsRB/oXxhXmLgDcGnI6e8m9AYCXBhiD8NJ2EwCuj+CArwHAt+6lrYywP49/M8MLP/onAAAAAElFTkSuQmCC"},"41a0":function(t,n,i){"use strict";i.d(n,"b",(function(){return e})),i.d(n,"c",(function(){return a})),i.d(n,"a",(function(){}));var e=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("v-uni-view",{staticClass:"add"},[e("v-uni-view",{staticClass:"add-content"},[e("v-uni-view",{staticClass:"content"},[e("v-uni-textarea",{attrs:{maxlength:"-1",placeholder:"请输入您想发布的内容哦~"},model:{value:t.content,callback:function(n){t.content=n},expression:"content"}})],1),e("v-uni-view",{staticClass:"content"},[e("v-uni-view",{staticClass:"title"},[t._v("上传图片")]),e("v-uni-view",{staticClass:"list"},[t._l(t.imgurl,(function(n,a){return e("v-uni-view",{key:a,staticClass:"item"},[e("v-uni-image",{staticClass:"pic",attrs:{src:n}}),e("v-uni-image",{staticClass:"del",attrs:{src:i("243d")},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.toDel(a)}}})],1)})),e("v-uni-view",{staticClass:"upload",on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.toNext()}}},[e("v-uni-image",{staticClass:"pic",attrs:{src:i("cce8")}}),e("v-uni-view",{staticClass:"txt"},[t._v("上传")])],1)],2)],1)],1),e("v-uni-view",{staticClass:"add-fd"},[e("v-uni-view",{staticClass:"btn",on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.toReg()}}},[t._v("发布")])],1)],1)},a=[]},4848:function(t,n,i){var e=i("c86c");n=e(!1),n.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-
|