12345678910 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/basic-component/app-jump-button/app-jump-button"],{"0110":function(t,e,a){"use strict";var n=a("2313"),r=a.n(n);r.a},2245:function(t,e,a){"use strict";a.r(e);var n=a("9b5a"),r=a.n(n);for(var i in n)"default"!==i&&function(t){a.d(e,t,(function(){return n[t]}))}(i);e["default"]=r.a},2313:function(t,e,a){},"9b5a":function(t,e,a){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a("d82f"),r=a("a5cd"),i={name:"app-jump-button",props:{item:Object,arrangement:{type:String,default:function(){return"row"}},backgroundColor:String,form:{type:Boolean,default:function(){return!0}},height:{type:String,default:function(){return"100"}},width:{type:String,default:function(){return"100"}},open_type:{type:String,default:function(){return"navigate"}},url:{type:String,default:function(){return""}},params:{type:Array,default:function(){return[]}},number:{type:String,default:function(){return""}},appId:{type:String,default:function(){return""}},path:{type:String,default:function(){return""}},latitude:{type:String,default:function(){return"0"}},longitude:{type:String,default:function(){return"0"}},address:{type:String,default:function(){return""}}},methods:{jumpLogic:function(e){var a=this;switch(this.form&&(0,n.push)(e.detail.formId),this.open_type){case"reLaunch":t.reLaunch({url:this.url});break;case"redirect":t.redirectTo({url:this.url});break;case"navigate":if(this.url){var i=this.url;if(this.params.length>0){for(var u="?",s=0;s<this.params.length;s++)u+="".concat(this.params[s].key,"=").concat(this.params[s].value,"&");i+=u.slice(0,u.length-1)}t.navigateTo({url:i})}break;case"app_admin":1==this.$store.state.user.info.identity.is_admin&&t.navigateTo({url:this.url});break;case"back":t.navigateBack({});break;case"tel":1===this.params.length?t.makePhoneCall({phoneNumber:this.params[0].value}):this.number?t.makePhoneCall({phoneNumber:this.number}):t.makePhoneCall({phoneNumber:this.url.split("?")[1].split("=")[1]});break;case"web":this.params.length>0?t.navigateTo({url:"".concat(this.url,"?url=").concat(encodeURIComponent(this.params[0].value))}):t.navigateTo({url:this.url});break;case"app":if(this.url){var o="";if("app"!==this.url)o=this.url.split("app?")[1];else for(var c=0;c<this.params.length;c++)o+="".concat(this.params[c].key,"=").concat(this.params[c].value,"&");if("string"!==typeof o)return;var l=o.split("&"),p={};for(var f in l)if("string"===typeof l[f]&&l[f].length){var h=l[f].split("=");if(2!==h.length){for(var d="",g=1;g<h.length;g++)g+1!==h.length&&(d+="".concat(h[g],"=").concat(h[g+1]));p[h[0]]=d}else p[h[0]]=h[1]}var m=p;console.log(m);var b="",v="";b=m.app_id||"",v=m.path||"",console.log(v),t.navigateToMiniProgram({appId:b,path:v,success:function(t){console.log("打开小程序成功",t)},fail:function(t){console.log("打开小程序失败",t)}})}else this.appId&&t.navigateToMiniProgram({appId:this.appId,path:this.path?this.path:"",success:function(t){},fail:function(t){}});break;case"clear_cache":t.showModal({title:"清理缓存",content:"确定要清理缓存?",cancelText:"取消",confirmText:"确认",success:function(e){e.confirm&&((0,r.clearStorage)(),a.$user&&a.$store&&a.$store.state.user.accessToken&&a.$user.loginByToken(a.$store.state.user.accessToken),a.$store.dispatch("mallConfig/actionResetConfig"),t.showToast({title:"清理完成",duration:1e3,icon:"none"}))}});break;case"map":t.openLocation({latitude:Number(this.latitude),longitude:Number(this.longitude),name:this.address,address:this.address,success:function(){},fail:function(t){}});break;case"share":}}}};e.default=i}).call(this,a("543d")["default"])},"9e5c":function(t,e,a){"use strict";a.r(e);var n=a("fa80"),r=a("2245");for(var i in r)"default"!==i&&function(t){a.d(e,t,(function(){return r[t]}))}(i);a("0110");var u,s=a("f0c5"),o=Object(s["a"])(r["default"],n["b"],n["c"],!1,null,"2ef18679",null,!1,n["a"],u);e["default"]=o.exports},fa80:function(t,e,a){"use strict";var n,r=function(){var t=this,e=t.$createElement;t._self._c},i=[];a.d(e,"b",(function(){return r})),a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){return n}))}}]);
- ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
- 'components/basic-component/app-jump-button/app-jump-button-create-component',
- {
- 'components/basic-component/app-jump-button/app-jump-button-create-component':(function(module, exports, __webpack_require__){
- __webpack_require__('543d')['createComponent'](__webpack_require__("9e5c"))
- })
- },
- [['components/basic-component/app-jump-button/app-jump-button-create-component']]
- ]);
|