|
|
|
|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-reservation-index"],{"00ec":function(t,e,n){"use strict";n.r(e);var a=n("64b0"),i=n.n(a);for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);e["default"]=i.a},"291a":function(t,e,n){var a=n("9098");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var i=n("967d").default;i("2fa82ad0",a,!0,{sourceMap:!1,shadowMode:!1})},4726:function(t,e,n){"use strict";n("6a54");var a=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=a(n("5de6")),o=a(n("2634")),r=a(n("2fdc")),s=a(n("fcf3"));n("5c47"),n("0506"),n("bf0f"),n("c223"),n("e838"),n("8f71"),n("fd3c"),n("64aa"),n("dc8a"),n("aa77"),n("f7a5"),n("aa9c");var c=a(n("efbe")),d=n("bd31"),u=a(n("409b")),l={name:"ReservationPage",components:{NavBar:c.default},data:function(){return{isWeixinBrowser:!1,direction:"",shipList:[],currentShip:{total_length:"",total_width:"",molded_depth:"",ship_number:"",total_tonnage:"",ship_type:""},directionEnum:[],shipTypeEnum:[],agreeNotice:!1,gateDate:"today",deadlineTime:"",isDateDisabled:!1,userLocation:null,isInGeofence:null}},onLoad:function(){this.isWeixinBrowser=/MicroMessenger/i.test(navigator.userAgent)},onShow:function(){var t=this;this.fetchDirectionEnum().then((function(){t.fetchShipTypeEnum().then((function(){t.fetchShipList()}))})),uni.showModal({title:"提示",content:"预约前需要先获取您的位置信息",showCancel:!0,confirmText:"确定",cancelText:"取消",success:function(e){e.confirm?t.getUserLocation():uni.showToast({title:"未获取位置信息,可能无法完成预约",icon:"none"})}}),this.fetchDailyReservationDeadline()},methods:{getUserLocation:function(){this.isWeixinBrowser?(console.log("微信 H5 环境"),this.getWeixinLocation()):(console.log("普通 H5 环境"),this.getBrowserLocation())},getWeixinLocation:function(){var t=this;console.log("[WeixinLocation] 调用 getWeixinLocation");var e=/MicroMessenger/i.test(navigator.userAgent);console.log("[WeixinLocation] 是否微信环境 isWeixinBrowser =",this.isWeixinBrowser,"UA检测 =",e?"是":"否");var n="undefined"!==typeof window&&!!window.wx,a="undefined"!==typeof u.default;console.log("[WeixinLocation] has window.wx =",n,", has module wx =",a);var i=n?window.wx:a?u.default:null;if(console.log("[WeixinLocation] wxObj =",i),!i)return console.error("微信 JS-SDK 未加载"),void uni.showModal({title:"提示",content:"微信 JS-SDK 未加载,请刷新页面重试",showCancel:!1});console.log("[WeixinLocation] wxObj.version =",i.version,"typeof wxObj.config =",(0,s.default)(i.config),"typeof wxObj.ready =",(0,s.default)(i.ready),"typeof wxObj.getLocation =",(0,s.default)(i.getLocation)),"function"!==typeof i.config&&console.warn("[WeixinLocation] wx.config 未定义,说明微信JS-SDK可能还没有正确初始化,wx.ready 可能不会触发,请确认后端是否已下发 JSSDK 配置并在 App.vue 中调用 initWechatJSSDK"),"function"!==typeof i.getLocation&&console.warn("[WeixinLocation] wx.getLocation 不是函数,说明当前 JSSDK 可能未加载完整或未包含该接口"),"function"===typeof i.error?i.error((function(t){console.error("[WeixinLocation] wx.error 回调触发,JSSDK 配置或调用出错:",t)})):console.warn("[WeixinLocation] wx.error 不存在,无法捕获 JSSDK 配置错误");var o=!1;setTimeout((function(){o||console.warn("[WeixinLocation] 5 秒内 wx.ready 未回调,可能是 wx.config 未正确执行或签名错误")}),5e3),i.ready((function(){o=!0,console.log("[WeixinLocation] wx.ready 回调触发,开始调用 wx.getLocation"),i.getLocation({type:"gcj02",success:function(e){console.log("[WeixinLocation] wx.getLocation success 原始返回值:",e),t.userLocation={latitude:e.latitude,longitude:e.longitude,speed:e.speed,accuracy:e.accuracy},console.log("[WeixinLocation] 已保存 userLocation =",t.userLocation)},fail:function(t){console.error("[WeixinLocation] wx.getLocation fail:",t),uni.showModal({title:"提示",content:"获取位<EFBFBD><EFBFBD>
|