app_tree_planting/unpackage/cache/wgt/__UNI__BAFB016/app-service.js

17 lines
308 KiB
JavaScript
Raw Normal View History

2023-12-13 10:20:14 +08:00
(this["webpackJsonp"]=this["webpackJsonp"]||[]).push([["app-service"],{"0267":function(t,e,i){"use strict";i.r(e);var s=i("0f85"),n=i("90af");for(var a in n)["default"].indexOf(a)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(a);var o=i("f0c5"),r=Object(o["a"])(n["default"],s["b"],s["c"],!1,null,null,null,!1,s["a"],void 0);e["default"]=r.exports},"030f":function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={data:function(){return{name:"",phone:"",token:"",id:"",address:"",detailAddress:"",title:"",content:"",lat:40.994496,lng:113.132171,covers:[{latitude:40.994496,longitude:113.132171,iconPath:"/static/images/ic_location_marker.png"}],photoList:[],maxPhoto:3,imgUrl:this.$api.common.imgUrl,tempPhoto:{id:"",src:"/static/images/ic_add_photo.png"},videoSrc:"",videoId:"",activityId:""}},onLoad:function(t){this.activityId=t.id,this.token=getApp().globalData.token,this.photoList.push(this.tempPhoto)},methods:{inputName:function(t){this.name=t.target.value},inputPhone:function(t){this.phone=t.target.value},inputAddress:function(t){this.address=t.target.value},inputDetailAddress:function(t){this.detailAddress=t.target.value},inputTitle:function(t){this.title=t.target.value},inputContent:function(t){this.content=t.target.value},chooseLoc:function(){var e=this;uni.chooseLocation({success:function(i){t("log",i," at pages/duty/casereport.vue:153"),e.address=i.name,e.lat=i.latitude,e.lng=i.longitude,e.covers[0].latitude=i.latitude,e.covers[0].longitude=i.longitude}})},delImg:function(e,i){this.photoList.splice(i,1),this.photoList=this.photoList;for(var s=!0,n=0;n<this.photoList.length;n++)if(""==this.photoList[n].id){s=!1;break}if(t("log",s," at pages/duty/casereport.vue:173"),s){this.photoList.push({id:"",src:"/static/images/ic_add_photo.png"})}this.photoList=this.photoList},delVideo:function(){this.videoId="",this.videoSrc=""},choseImg:function(e,i){var s=this;""==e.id&&uni.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album"],success:function(e){t("log",e," at pages/duty/casereport.vue:196"),uni.showLoading({title:"\u56fe\u7247\u4e0a\u4f20\u4e2d..."});var i=e.tempFilePaths[0].lastIndexOf("/"),n=e.tempFilePaths[0].substring(i+1,e.tempFilePaths[0].length);uni.uploadFile({url:s.$api.common.doUploadImg,filePath:e.tempFilePaths[0],name:"image",formData:{image:n},header:{token:s.token},success:function(t){if(200==t.statusCode){uni.hideLoading();var e=t.data,i=JSON.parse(e),n={id:i.data,src:s.imgUrl+i.data};s.photoList.length==s.maxPhoto?(s.photoList[s.photoList.length-1].id=i.data,s.photoList[s.photoList.length-1].src=s.imgUrl+i.data):s.photoList.splice(0,0,n)}else uni.hideLoading(),uni.showToast({title:"\u4e0a\u4f20\u5931\u8d25,\u8bf7\u91cd\u8bd5",duration:1e3})},fail:function(t){uni.hideLoading(),uni.showToast({title:"\u4e0a\u4f20\u5931\u8d25,\u8bf7\u91cd\u8bd5",duration:1e3})}})}})},chooseVideo:function(){var e=this;uni.chooseVideo({count:1,sourceType:["album"],success:function(i){t("log",i," at pages/duty/casereport.vue:260"),uni.showLoading({title:"\u89c6\u9891\u4e0a\u4f20\u4e2d..."});var s=i.tempFile.name;uni.uploadFile({url:e.$api.common.doUploadVideo,filePath:i.tempFilePath,name:"video",formData:{video:s},header:{token:e.token},success:function(t){if(200==t.statusCode){uni.hideLoading();var i=t.data,s=JSON.parse(i);e.videoId=s.data,e.videoSrc=e.imgUrl+s.data}else uni.hideLoading(),uni.showToast({title:"\u4e0a\u4f20\u5931\u8d25,\u8bf7\u91cd\u8bd5",duration:1e3})},fail:function(t){uni.hideLoading(),uni.showToast({title:"\u4e0a\u4f20\u5931\u8d25,\u8bf7\u91cd\u8bd5",duration:1e3})}})}})},checkParams:function(){return""==this.name?(uni.showToast({icon:"error",title:"\u8bf7\u8f93\u5165\u59d3\u540d"}),!1):""==this.phone?(uni.showToast({icon:"error",title:"\u8bf7\u8f93\u5165\u8054\u7cfb\u7535\u8bdd"}),!1):""==this.address?(uni.showToast({icon:"error",title:"\u8bf7\u8f93\u5165\u5730\u5740"}),!1):""==this.title?(uni.showToast({icon:"error",title:"\u8bf7\u8f93\u5165\u6807\u9898"}),!1):""!=this.content||(uni.showToast({icon:"error",title:"\u8bf7\u8f93\u5
2023-02-08 17:59:16 +08:00
/**
* [js-md5]{@link https://github.com/emn178/js-md5}
*
* @namespace md5
* @version 0.7.3
* @author Chen, Yi-Cyuan [emn178@gmail.com]
* @copyright Chen, Yi-Cyuan 2014-2017
* @license MIT
*/
2023-12-13 10:20:14 +08:00
(function(){"use strict";var ERROR="input is invalid type",WINDOW="object"===("undefined"===typeof window?"undefined":_typeof(window)),root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"===("undefined"===typeof self?"undefined":_typeof(self)),NODE_JS=!root.JS_MD5_NO_NODE_JS&&"object"===("undefined"===typeof process?"undefined":_typeof(process))&&process.versions&&process.versions.node;NODE_JS?root=global:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&"object"===_typeof(module)&&module.exports,AMD=__webpack_require__("3c35"),ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!==typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}!root.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"===_typeof(t)&&t.buffer&&t.buffer.constructor===ArrayBuffer});var createOutputMethod=function(t){return function(e){return new Md5(!0).update(e)[t]()}},createMethod=function(){var t=createOutputMethod("hex");NODE_JS&&(t=nodeWrap(t)),t.create=function(){return new Md5},t.update=function(e){return t.create().update(e)};for(var e=0;e<OUTPUT_TYPES.length;++e){var i=OUTPUT_TYPES[e];t[i]=createOutputMethod(i)}return t},nodeWrap=function nodeWrap(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function(t){if("string"===typeof t)return crypto.createHash("md5").update(t,"utf8").digest("hex");if(null===t||void 0===t)throw ERROR;return t.constructor===ArrayBuffer&&(t=new Uint8Array(t)),Array.isArray(t)||ArrayBuffer.isView(t)||t.constructor===Buffer?crypto.createHash("md5").update(new Buffer(t)).digest("hex"):method(t)};return nodeMethod};function Md5(t){if(t)blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks,this.buffer8=buffer8;else if(ARRAY_BUFFER){var e=new ArrayBuffer(68);this.buffer8=new Uint8Array(e),this.blocks=new Uint32Array(e)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}Md5.prototype.update=function(t){if(!this.finalized){var e,i=_typeof(t);if("string"!==i){if("object"!==i)throw ERROR;if(null===t)throw ERROR;if(ARRAY_BUFFER&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!Array.isArray(t)&&(!ARRAY_BUFFER||!ArrayBuffer.isView(t)))throw ERROR;e=!0}var s,n,a=0,o=t.length,r=this.blocks,c=this.buffer8;while(a<o){if(this.hashed&&(this.hashed=!1,r[0]=r[16],r[16]=r[1]=r[2]=r[3]=r[4]=r[5]=r[6]=r[7]=r[8]=r[9]=r[10]=r[11]=r[12]=r[13]=r[14]=r[15]=0),e)if(ARRAY_BUFFER)for(n=this.start;a<o&&n<64;++a)c[n++]=t[a];else for(n=this.start;a<o&&n<64;++a)r[n>>2]|=t[a]<<SHIFT[3&n++];else if(ARRAY_BUFFER)for(n=this.start;a<o&&n<64;++a)s=t.charCodeAt(a),s<128?c[n++]=s:s<2048?(c[n++]=192|s>>6,c[n++]=128|63&s):s<55296||s>=57344?(c[n++]=224|s>>12,c[n++]=128|s>>6&63,c[n++]=128|63&s):(s=65536+((1023&s)<<10|1023&t.charCodeAt(++a)),c[n++]=240|s>>18,c[n++]=128|s>>12&63,c[n++]=128|s>>6&63,c[n++]=128|63&s);else for(n=this.start;a<o&&n<64;++a)s=t.charCodeAt(a),s<128?r[n>>2]|=s<<SHIFT[3&n++]:s<2048?(r[n>>2]|=(192|s>>6)<<SHIFT[3&n++],r[n>>2]|=(128|63&s)<<SHIFT[3&n++]):s<55296||s>=57344?(r[n>>2]|=(224|s>>12)<<SHIFT[3&n++],r[n>>2]|=(128|s>>6&63)<<SHIFT[3&n++],r[n>>2]|=(128|63&s)<<SHIFT[3&n++]):(s=65536+((1023&s)<<10|1023&t.charCodeAt(++a)),r[n>>2]|=(240|s>>18)<<SHIFT[3&n++],r[n>>2]|=(128|s>>12&63)<<SHIFT[3&n++],r[n>>2]|=(128|s>>6&63)<<SHIFT[3&n++],r[n>>2]|=(128|63&s)<<
2023-03-03 19:29:04 +08:00
/*!
* vuex v3.6.2
* (c) 2021 Evan You
* @license MIT
*/
2023-12-13 10:20:14 +08:00
function(t){var e=Number(t.version.split(".")[0]);if(e>=2)t.mixin({beforeCreate:s});else{var i=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[s].concat(t.init):s,i.call(this,t)}}function s(){var t=this.$options;t.store?this.$store="function"===typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(l))}f.state.get=function(){return this._vm._data.$$state},f.state.set=function(t){0},d.prototype.commit=function(t,e,i){var s=this,n=m(t,e,i),a=n.type,o=n.payload,r=(n.options,{type:a,payload:o}),c=this._mutations[a];c&&(this._withCommit((function(){c.forEach((function(t){t(o)}))})),this._subscribers.slice().forEach((function(t){return t(r,s.state)})))},d.prototype.dispatch=function(t,e){var i=this,s=m(t,e),n=s.type,a=s.payload,o={type:n,payload:a},r=this._actions[n];if(r){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(o,i.state)}))}catch(u){0}var c=r.length>1?Promise.all(r.map((function(t){return t(a)}))):r[0](a);return new Promise((function(t,e){c.then((function(e){try{i._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(o,i.state)}))}catch(u){0}t(e)}),(function(t){try{i._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(o,i.state,t)}))}catch(u){0}e(t)}))}))}},d.prototype.subscribe=function(t,e){return h(t,this._subscribers,e)},d.prototype.subscribeAction=function(t,e){var i="function"===typeof t?{before:t}:t;return h(i,this._actionSubscribers,e)},d.prototype.watch=function(t,e,i){var s=this;return this._watcherVM.$watch((function(){return t(s.state,s.getters)}),e,i)},d.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._vm._data.$$state=t}))},d.prototype.registerModule=function(t,e,i){void 0===i&&(i={}),"string"===typeof t&&(t=[t]),this._modules.register(t,e),v(this,this.state,t,this._modules.get(t),i.preserveState),_(this,this.state)},d.prototype.unregisterModule=function(t){var e=this;"string"===typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){var i=g(e.state,t.slice(0,-1));l.delete(i,t[t.length-1])})),p(this)},d.prototype.hasModule=function(t){return"string"===typeof t&&(t=[t]),this._modules.isRegistered(t)},d.prototype[[104,111,116,85,112,100,97,116,101].map((function(t){return String.fromCharCode(t)})).join("")]=function(t){this._modules.update(t),p(this,!0)},d.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(d.prototype,f);var y=T((function(t,e){var i={};return x(e).forEach((function(e){var s=e.key,n=e.val;i[s]=function(){var e=this.$store.state,i=this.$store.getters;if(t){var s=S(this.$store,"mapState",t);if(!s)return;e=s.context.state,i=s.context.getters}return"function"===typeof n?n.call(this,e,i):e[n]},i[s].vuex=!0})),i})),$=T((function(t,e){var i={};return x(e).forEach((function(e){var s=e.key,n=e.val;i[s]=function(){var e=[],i=arguments.length;while(i--)e[i]=arguments[i];var s=this.$store.commit;if(t){var a=S(this.$store,"mapMutations",t);if(!a)return;s=a.context.commit}return"function"===typeof n?n.apply(this,[s].concat(e)):s.apply(this.$store,[n].concat(e))}})),i})),b=T((function(t,e){var i={};return x(e).forEach((function(e){var s=e.key,n=e.val;n=t+n,i[s]=function(){if(!t||S(this.$store,"mapGetters",t))return this.$store.getters[n]},i[s].vuex=!0})),i})),C=T((function(t,e){var i={};return x(e).forEach((function(e){var s=e.key,n=e.val;i[s]=function(){var e=[],i=arguments.length;while(i--)e[i]=arguments[i];var s=this.$store.dispatch;if(t){var a=S(this.$store,"mapActions",t);if(!a)return;s=a.context.dispatch}return"function"===typeof n?n.apply(this,[s].concat(e)):s.apply(this.$store,[n].concat(e))}})),i}));function x(t){return function(t){return Array.isArray(t)||o(t)}(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function T(t){return function(e,i){return"string"!==typeof e?(i=e,e=""):"/"!==e.ch