diff --git a/pages/index/index.vue b/pages/index/index.vue index f789232..d2bc8f7 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -223,6 +223,7 @@ lng: gcj02Lng, lat: gcj02Lat } + console.log(gcj02Lat, gcj02Lng) // 初始化是否可打卡为 false this.isCanPunch = false; // 遍历每个打卡点 diff --git a/static/js/CommonFunction.js b/static/js/CommonFunction.js index bdc460c..e37fbf1 100644 --- a/static/js/CommonFunction.js +++ b/static/js/CommonFunction.js @@ -173,6 +173,7 @@ Vue.prototype.encryptPhone = (phone) => { // 计算两个经纬度间的距离 Vue.prototype.calculateDistance = (lat1, lon1, lat2, lon2) => { + console.log(lat1, lon1, lat2, lon2) const R = 6371e3; // 地球半径,单位:米 const φ1 = lat1 * (Math.PI / 180); const φ2 = lat2 * (Math.PI / 180); diff --git a/unpackage/dist/build/web/index.html b/unpackage/dist/build/web/index.html index 42ddbfa..d691acb 100644 --- a/unpackage/dist/build/web/index.html +++ b/unpackage/dist/build/web/index.html @@ -1,2 +1,2 @@ daoyou
\ No newline at end of file + document.write('')
\ No newline at end of file diff --git a/unpackage/dist/build/web/static/js/CommonFunction.js b/unpackage/dist/build/web/static/js/CommonFunction.js index bdc460c..e37fbf1 100644 --- a/unpackage/dist/build/web/static/js/CommonFunction.js +++ b/unpackage/dist/build/web/static/js/CommonFunction.js @@ -173,6 +173,7 @@ Vue.prototype.encryptPhone = (phone) => { // 计算两个经纬度间的距离 Vue.prototype.calculateDistance = (lat1, lon1, lat2, lon2) => { + console.log(lat1, lon1, lat2, lon2) const R = 6371e3; // 地球半径,单位:米 const φ1 = lat1 * (Math.PI / 180); const φ2 = lat2 * (Math.PI / 180); diff --git a/unpackage/dist/build/web/static/js/index.f4e4a79e.js b/unpackage/dist/build/web/static/js/index.de0f6813.js similarity index 94% rename from unpackage/dist/build/web/static/js/index.f4e4a79e.js rename to unpackage/dist/build/web/static/js/index.de0f6813.js index 9eea781..d58064e 100644 --- a/unpackage/dist/build/web/static/js/index.f4e4a79e.js +++ b/unpackage/dist/build/web/static/js/index.de0f6813.js @@ -1 +1 @@ -(function(n){function i(i){for(var o,t,u=i[0],p=i[1],d=i[2],s=0,c=[];s'),i=new RegExp("section","g"),n=n.replace(i,"div"),i=new RegExp("↵","g"),n=n.replace(i,"
"),n},r.default.prototype.getUrlPara=function(n){var i=n.split("?"),e=i[1];return!!e&&e.split("&")},r.default.prototype.idChinaName=function(n){return/^[\u4E00-\u9FA5]{2,4}$/.test(n)},r.default.prototype.idCardNumber=function(n){return/^\d{17}(\d{1}|[X|x])$/.test(n)},r.default.prototype.IsTel=function(n){return/^1\d{10}$/.test(n)},r.default.prototype.IsTelMacau=function(n){return/^\d{8}$/.test(n)},r.default.prototype.IsCode=function(n){return/^\d{6}$/.test(n)},r.default.prototype.IsMail=function(n){return/^\w+@[a-z0-9]+\.[a-z]+$/i.test(n)},r.default.prototype.showImg=function(n){if(n)return-1!=n.indexOf("https://")||-1!=n.indexOf("http://")?n:"https://guide.sz-trip.com"+n},r.default.prototype.getLocation=function(){uni.startLocationUpdate({success:function(n){uni.onLocationChange((function(n){uni.setStorageSync("location",{lat:n.latitude,lon:n.longitude})}))}})},r.default.prototype.getHeadImg=function(n){return r.default.prototype.Post({type:n},"/api/public_service/getKumgangHeadImgList").then((function(n){return n.data[0].image}))},r.default.prototype.gotoPath=function(n){uni.navigateTo({url:n})},r.default.prototype.goBack=function(){console.log(getCurrentPages());var n=getCurrentPages(),i=n[n.length-1];"subPackages/techan/techanList"!=i.route&&getCurrentPages().length>1?uni.navigateBack({}):uni.switchTab({url:"/pages/index/index"})},r.default.prototype.openLocation=function(n,i){uni.openLocation({latitude:Number(n),longitude:Number(i),success:function(){console.log("success")}})},r.default.prototype.clickPhone=function(n){uni.makePhoneCall({phoneNumber:n})},r.default.prototype.ShowDateDay=function(n){var i="";switch(n){case 0:i="周日";break;case 1:i="周一";break;case 2:i="周二";break;case 3:i="周三";break;case 4:i="周四";break;case 5:i="周五";break;case 6:i="周六";break}return i},r.default.prototype.encryptPhone=function(n){return n.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")},r.default.prototype.calculateDistance=function(n,i,e,o){var a=n*(Math.PI/180),r=e*(Math.PI/180),t=(e-n)*(Math.PI/180),u=(o-i)*(Math.PI/180),p=Math.sin(t/2)*Math.sin(t/2)+Math.cos(a)*Math.cos(r)*Math.sin(u/2)*Math.sin(u/2),d=2*Math.atan2(Math.sqrt(p),Math.sqrt(1-p));return 6371e3*d},r.default.prototype.timeFormat=function(){var n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-mm-dd";n=i?/^\d{10}$/.test(null===i||void 0===i?void 0:i.toString().trim())?new Date(1e3*i):"string"===typeof i&&/^\d+$/.test(i.trim())?new Date(Number(i)):"string"===typeof i&&i.includes("-")&&!i.includes("T")?new Date(i.replace(/-/g,"/")):new Date(i):new Date;var o={y:n.getFullYear().toString(),m:(n.getMonth()+1).toString().padStart(2,"0"),d:n.getDate().toString().padStart(2,"0"),h:n.getHours().toString().padStart(2,"0"),M:n.getMinutes().toString().padStart(2,"0"),s:n.getSeconds().toString().padStart(2,"0")};for(var r in o){var t=new RegExp("".concat(r,"+")).exec(e)||[],u=(0,a.default)(t,1),p=u[0];if(p){var d="y"===r&&2===p.length?2:0;e=e.replace(p,o[r].slice(d))}}return e}},"9f4f":function(n,i,e){"use strict";var o=e("f5bd").default,a=o(e("9b1b"));e("3dde"),e("a8b2"),e("1480"),e("6e4a"),e("4e18"),e("9337");var r=o(e("9b8e")),t=o(e("caf0")),u=o(e("bd88"));e("32bf"),e("6be1");var p=o(e("ec4d"));r.default.prototype.vconsole=new p.default,r.default.config.productionTip=!1,t.default.mpType="app";var d=new r.default((0,a.default)({store:u.default},t.default));d.$mount()},b349:function(n,i,e){"use strict";e.d(i,"b",(function(){return o})),e.d(i,"c",(function(){return a})),e.d(i,"a",(function(){}));var o=function(){var n=this.$createElement,i=this._self._c||n;return i("App",{attrs:{keepAliveInclude:this.keepAliveInclude}})},a=[]},bd88:function(n,i,e){"use strict";e("6a54");var o=e("f5bd").default;Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var a=o(e("9b8e")),r=o(e("8f59")),t=o(e("fa68"));a.default.use(r.default);var u=new r.default.Store({modules:{user:t.default}});i.default=u},caf0:function(n,i,e){"use strict";e.r(i);var o=e("b349"),a=e("3e24");for(var r in a)["default"].indexOf(r)<0&&function(n){e.d(i,n,(function(){return a[n]}))}(r);e("1426");var t=e("828b"),u=Object(t["a"])(a["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);i["default"]=u.exports},fa68:function(n,i,e){"use strict";e("6a54"),Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0,e("d4b5");var o={state:{location:{lat:"",lon:""},userInfo:{token:""},toPath:"",products:"",linkProducts:"",coupon:"",eshoppingCart:[],sshoppingCart:[],meetRoomReserve:{date:null,coupon:null,people:null},lingoIds:[],scenicIds:[]},mutations:{changeUserInfo:function(n,i){n.userInfo=i,uni.setStorageSync("userInfo",JSON.stringify(i))},changeLoationInfo:function(n,i){uni.setStorageSync("locationInfo",JSON.stringify(i)),n.location=i},changeLoginPath:function(n){var i=getCurrentPages(),e=i[i.length-1];n.toPath=e.$page.fullPath,"/pages/login/login"!=n.toPath&&uni.navigateTo({url:"/pages/login/login"})},changeOrderInfo:function(n,i){n.products=i},changelinkProducts:function(n,i){n.linkProducts=i},choseCoupon:function(n,i){n.coupon=i},changeOrderECart:function(n,i){n.eshoppingCart=i},changeOrderSCart:function(n,i){n.sshoppingCart=i},changeMeetRoomReserve:function(n,i){n.meetRoomReserve=i},changeLingoIds:function(n,i){n.lingoIds=i},changeScenicIds:function(n,i){n.scenicIds=i}}};i.default=o}}); \ No newline at end of file +(function(n){function i(i){for(var o,t,u=i[0],p=i[1],d=i[2],s=0,c=[];s'),i=new RegExp("section","g"),n=n.replace(i,"div"),i=new RegExp("↵","g"),n=n.replace(i,"
"),n},r.default.prototype.getUrlPara=function(n){var i=n.split("?"),e=i[1];return!!e&&e.split("&")},r.default.prototype.idChinaName=function(n){return/^[\u4E00-\u9FA5]{2,4}$/.test(n)},r.default.prototype.idCardNumber=function(n){return/^\d{17}(\d{1}|[X|x])$/.test(n)},r.default.prototype.IsTel=function(n){return/^1\d{10}$/.test(n)},r.default.prototype.IsTelMacau=function(n){return/^\d{8}$/.test(n)},r.default.prototype.IsCode=function(n){return/^\d{6}$/.test(n)},r.default.prototype.IsMail=function(n){return/^\w+@[a-z0-9]+\.[a-z]+$/i.test(n)},r.default.prototype.showImg=function(n){if(n)return-1!=n.indexOf("https://")||-1!=n.indexOf("http://")?n:"https://guide.sz-trip.com"+n},r.default.prototype.getLocation=function(){uni.startLocationUpdate({success:function(n){uni.onLocationChange((function(n){uni.setStorageSync("location",{lat:n.latitude,lon:n.longitude})}))}})},r.default.prototype.getHeadImg=function(n){return r.default.prototype.Post({type:n},"/api/public_service/getKumgangHeadImgList").then((function(n){return n.data[0].image}))},r.default.prototype.gotoPath=function(n){uni.navigateTo({url:n})},r.default.prototype.goBack=function(){console.log(getCurrentPages());var n=getCurrentPages(),i=n[n.length-1];"subPackages/techan/techanList"!=i.route&&getCurrentPages().length>1?uni.navigateBack({}):uni.switchTab({url:"/pages/index/index"})},r.default.prototype.openLocation=function(n,i){uni.openLocation({latitude:Number(n),longitude:Number(i),success:function(){console.log("success")}})},r.default.prototype.clickPhone=function(n){uni.makePhoneCall({phoneNumber:n})},r.default.prototype.ShowDateDay=function(n){var i="";switch(n){case 0:i="周日";break;case 1:i="周一";break;case 2:i="周二";break;case 3:i="周三";break;case 4:i="周四";break;case 5:i="周五";break;case 6:i="周六";break}return i},r.default.prototype.encryptPhone=function(n){return n.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")},r.default.prototype.calculateDistance=function(n,i,e,o){console.log(n,i,e,o);var a=n*(Math.PI/180),r=e*(Math.PI/180),t=(e-n)*(Math.PI/180),u=(o-i)*(Math.PI/180),p=Math.sin(t/2)*Math.sin(t/2)+Math.cos(a)*Math.cos(r)*Math.sin(u/2)*Math.sin(u/2),d=2*Math.atan2(Math.sqrt(p),Math.sqrt(1-p));return 6371e3*d},r.default.prototype.timeFormat=function(){var n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy-mm-dd";n=i?/^\d{10}$/.test(null===i||void 0===i?void 0:i.toString().trim())?new Date(1e3*i):"string"===typeof i&&/^\d+$/.test(i.trim())?new Date(Number(i)):"string"===typeof i&&i.includes("-")&&!i.includes("T")?new Date(i.replace(/-/g,"/")):new Date(i):new Date;var o={y:n.getFullYear().toString(),m:(n.getMonth()+1).toString().padStart(2,"0"),d:n.getDate().toString().padStart(2,"0"),h:n.getHours().toString().padStart(2,"0"),M:n.getMinutes().toString().padStart(2,"0"),s:n.getSeconds().toString().padStart(2,"0")};for(var r in o){var t=new RegExp("".concat(r,"+")).exec(e)||[],u=(0,a.default)(t,1),p=u[0];if(p){var d="y"===r&&2===p.length?2:0;e=e.replace(p,o[r].slice(d))}}return e}},"9f4f":function(n,i,e){"use strict";var o=e("f5bd").default,a=o(e("9b1b"));e("3dde"),e("a8b2"),e("1480"),e("6e4a"),e("4e18"),e("9337");var r=o(e("9b8e")),t=o(e("caf0")),u=o(e("bd88"));e("32bf"),e("6be1");var p=o(e("ec4d"));r.default.prototype.vconsole=new p.default,r.default.config.productionTip=!1,t.default.mpType="app";var d=new r.default((0,a.default)({store:u.default},t.default));d.$mount()},b349:function(n,i,e){"use strict";e.d(i,"b",(function(){return o})),e.d(i,"c",(function(){return a})),e.d(i,"a",(function(){}));var o=function(){var n=this.$createElement,i=this._self._c||n;return i("App",{attrs:{keepAliveInclude:this.keepAliveInclude}})},a=[]},bd88:function(n,i,e){"use strict";e("6a54");var o=e("f5bd").default;Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var a=o(e("9b8e")),r=o(e("8f59")),t=o(e("fa68"));a.default.use(r.default);var u=new r.default.Store({modules:{user:t.default}});i.default=u},caf0:function(n,i,e){"use strict";e.r(i);var o=e("b349"),a=e("3e24");for(var r in a)["default"].indexOf(r)<0&&function(n){e.d(i,n,(function(){return a[n]}))}(r);e("1426");var t=e("828b"),u=Object(t["a"])(a["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);i["default"]=u.exports},fa68:function(n,i,e){"use strict";e("6a54"),Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0,e("d4b5");var o={state:{location:{lat:"",lon:""},userInfo:{token:""},toPath:"",products:"",linkProducts:"",coupon:"",eshoppingCart:[],sshoppingCart:[],meetRoomReserve:{date:null,coupon:null,people:null},lingoIds:[],scenicIds:[]},mutations:{changeUserInfo:function(n,i){n.userInfo=i,uni.setStorageSync("userInfo",JSON.stringify(i))},changeLoationInfo:function(n,i){uni.setStorageSync("locationInfo",JSON.stringify(i)),n.location=i},changeLoginPath:function(n){var i=getCurrentPages(),e=i[i.length-1];n.toPath=e.$page.fullPath,"/pages/login/login"!=n.toPath&&uni.navigateTo({url:"/pages/login/login"})},changeOrderInfo:function(n,i){n.products=i},changelinkProducts:function(n,i){n.linkProducts=i},choseCoupon:function(n,i){n.coupon=i},changeOrderECart:function(n,i){n.eshoppingCart=i},changeOrderSCart:function(n,i){n.sshoppingCart=i},changeMeetRoomReserve:function(n,i){n.meetRoomReserve=i},changeLingoIds:function(n,i){n.lingoIds=i},changeScenicIds:function(n,i){n.scenicIds=i}}};i.default=o}}); \ No newline at end of file diff --git a/unpackage/dist/build/web/static/js/pages-index-index.8e0f439e.js b/unpackage/dist/build/web/static/js/pages-index-index.8e0f439e.js deleted file mode 100644 index 010d49c..0000000 --- a/unpackage/dist/build/web/static/js/pages-index-index.8e0f439e.js +++ /dev/null @@ -1 +0,0 @@ -(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-index-index"],{"0874":function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return i}));var i={uniPopup:n("d93e").default},a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"content"},[n("v-uni-image",{staticClass:"topImg",attrs:{src:"https://static.ticket.sz-trip.com/tourGuide/images/index/topImg.png"}}),n("v-uni-view",{staticClass:"title",staticStyle:{"margin-top":"40rpx"}},[t._v("·快捷入口")]),n("v-uni-view",{staticClass:"flex-between"},[n("v-uni-view",{staticClass:"nav-item flex-around",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.goHX()}}},[t._v("立即核销"),n("v-uni-image",{attrs:{src:"https://static.ticket.sz-trip.com/tourGuide/images/index/hexiao.png",mode:""}})],1),n("v-uni-view",{staticClass:"nav-item flex-around",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.gotoPath("/subPackages/order/orderList")}}},[t._v("查看订单"),n("v-uni-image",{attrs:{src:"https://static.ticket.sz-trip.com/tourGuide/images/index/dingdan.png",mode:""}})],1)],1),t.isShowClasses?n("v-uni-view",[n("v-uni-view",{staticClass:"title"},[t._v("·我的排班")]),n("v-uni-view",{staticClass:"type-box"},t._l(t.typeList,(function(e,i){return n("v-uni-view",{key:i,class:["type-item",{"type-active":i==t.typeIndex}],on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.typeIndex=i,t.getList()}}},[t._v(t._s(e.title)),i==t.typeIndex?n("v-uni-view",{staticClass:"type-line"}):t._e()],1)})),1),n("calendarVue",{attrs:{isShowLunar:!0,isCanChangeDate:0==t.userPunch.is_clock},on:{changeDate:function(e){arguments[0]=e=t.$handleEvent(e),t.getDate.apply(void 0,arguments)}}}),t._l(t.typeIndex?t.sessionLists:t.sessionList,(function(e,i){return n("v-uni-view",{key:i,staticClass:"session-item flex-between"},[t._v(t._s(e.title)),n("v-uni-switch",{attrs:{checked:e.isChecked,color:"#96684F"},on:{change:function(n){arguments[0]=n=t.$handleEvent(n),t.switchChange(e,i)}}})],1)}))],2):n("v-uni-view",[n("v-uni-view",{staticClass:"title"},[t._v("·我的打卡")]),n("v-uni-view",{staticClass:"rule",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openRule.apply(void 0,arguments)}}},[t._v("打卡规则")]),n("v-uni-view",{staticClass:"punch-box flex-column",style:{backgroundColor:t.isCanPunch?"#96684F":""},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.punch.apply(void 0,arguments)}}},[n("v-uni-view",[t._v("上线打卡")]),t._v(t._s(t.currentTime))],1),t.punchSuccess?n("v-uni-view",[n("v-uni-view",{staticClass:"punch-text"},[t._v("打卡时间:"+t._s(t.currentTime.slice(0,5)))]),n("v-uni-view",{staticClass:"punch-text",staticStyle:{margin:"0 auto"}},[t._v(t._s(t.timeSuccess)+"s后自动进入排班页面")])],1):n("v-uni-view",[n("v-uni-view",{staticClass:"punch-text"},[t._v(t._s(t.isCanPunch?"您已进入打卡范围:"+t.userPunch.clock_address[t.nearestFenceIndex].title:"您当前不在可打卡范围内"))]),t.userPunch.is_open_examine?n("v-uni-view",{staticClass:"examine-btn flex-center",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.examinePunch.apply(void 0,arguments)}}},[t._v("审批打卡")]):t._e()],1)],1),n("uni-popup",{ref:"popup",attrs:{type:"center","border-radius":"10px","background-color":"#fff"}},[n("v-uni-view",{staticStyle:{width:"90%",padding:"30rpx","border-radius":"10rpx",margin:"auto"},domProps:{innerHTML:t._s(t.formateRichText(t.ruleContent))}})],1)],1)},s=[]},3474:function(t,e,n){var i=n("c86c");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.content[data-v-3fc7acb0]{background:#fff;min-height:100vh;padding:%?40?% %?26?% %?200?%}.topImg[data-v-3fc7acb0]{width:%?299.33?%;height:%?70?%;display:flex;margin:auto}.title[data-v-3fc7acb0]{font-weight:700;font-size:%?35?%;color:#000;margin:%?68?% 0 %?34?%}.rule[data-v-3fc7acb0]{font-weight:500;font-size:%?31?%;color:#96684f;text-align:right}.punch-box[data-v-3fc7acb0]{width:%?267?%;height:%?267?%;background:#ccc;box-shadow:%?0?% %?0?% %?29?% %?0?% hsla(0,0%,60%,.6);border-radius:50%;justify-content:center;align-items:center;font-weight:700;font-size:%?32?%;color:#fff;margin:%?200?% auto 0}.punch-text[data-v-3fc7acb0]{font-weight:700;font-size:%?30?%;color:#111;margin:%?40?% auto;text-align:center}.examine-btn[data-v-3fc7acb0]{width:%?257?%;height:%?80?%;border-radius:%?13?%;border:%?1?% solid #96684f;font-weight:500;font-size:%?31?%;color:#96684f;margin:0 auto}.nav-item[data-v-3fc7acb0]{font-weight:500;font-size:%?32?%;color:#000;width:%?338?%;height:%?118?%;background:#f5f5f5;border-radius:%?20?%;padding:0 %?15?%}.nav-item uni-image[data-v-3fc7acb0]{width:%?80.67?%;height:%?80.67?%}.type-box[data-v-3fc7acb0]{display:flex}.type-box .type-item[data-v-3fc7acb0]{margin-right:%?44?%;font-weight:500;font-size:%?32?%;color:#000}.type-box .type-active[data-v-3fc7acb0]{color:#96684f}.type-box .type-line[data-v-3fc7acb0]{width:%?117?%;height:%?6?%;background:#96684f;border-radius:%?3?%;margin:%?4?% auto 0}.session-item[data-v-3fc7acb0]{width:%?697?%;height:%?93?%;background:#f5f5f5;border-radius:%?47?%;margin:%?28?% auto 0;font-family:PingFang SC;font-weight:500;font-size:%?32?%;color:#000;padding:0 %?28?%}',""]),t.exports=e},"39b6":function(t,e,n){var i=n("3474");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("967d").default;a("935e7b7a",i,!0,{sourceMap:!1,shadowMode:!1})},"7ba3":function(t,e,n){"use strict";n.r(e);var i=n("0874"),a=n("df0f");for(var s in a)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(s);n("e620");var c=n("828b"),o=Object(c["a"])(a["default"],i["b"],i["c"],!1,null,"3fc7acb0",null,!1,i["a"],void 0);e["default"]=o.exports},dc8b:function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n("5de6"));n("4626"),n("bf0f"),n("2797"),n("795c"),n("5c47"),n("a1c1"),n("c223");var s=i(n("918a")),c={components:{calendarVue:s.default},data:function(){return{typeList:[{title:"导游服务",id:""},{title:"线路产品",id:""}],typeIndex:0,selectDay:"",sessionList:[{title:"上午场",isChecked:!1},{title:"下午场",isChecked:!1},{title:"全天场",isChecked:!1}],sessionLists:[{title:"当天状态",isChecked:!1}],isAllChecked:!1,nearestFenceIndex:null,fenceRadius:500,watchId:null,ruleContent:"",currentTime:"",timeInterval:null,isCanPunch:!1,punchSuccess:!1,timeSuccess:3,isShowClasses:!0,userPunch:{},myLonLat:{lng:"",lat:""}}},onLoad:function(){this.selectDay=this.getNowTime(new Date),this.getList()},onShow:function(){var t=this;this.Post({},"/api/Merchants/getGuideClockStatus").then((function(e){if(t.userPunch=e.data,0!=t.userPunch.clock_address.length){switch(t.userPunch.is_clock){case 0:t.isShowClasses=!0;break;case 1:t.isShowClasses=!1;break;case 2:t.isShowClasses=!0;break;case 3:t.isShowClasses=!1;break;case 4:t.isShowClasses=!1;break;default:break}t.watchLocation(),t.startTimeUpdate()}}))},onHide:function(){this.watchId&&navigator.geolocation.clearWatch(this.watchId),this.timeInterval&&clearInterval(this.timeInterval)},methods:{punch:function(){var t=this;null!==this.nearestFenceIndex?this.Post({address_id:this.userPunch.clock_address[this.nearestFenceIndex].id,lon:this.myLonLat.lng,lat:this.myLonLat.lat},"/api/Merchants/guideClockLocate").then((function(e){if(200==e.code){t.punchSuccess=!0,clearInterval(t.timeInterval);var n=setInterval((function(){t.timeSuccess--,0==t.timeSuccess&&(clearInterval(n),t.isShowClasses=!0)}),1e3)}})):uni.showToast({title:"您当前不在可打卡范围内,无法打卡",icon:"none"})},examinePunch:function(){1==this.userPunch.is_clock?this.gotoPath("/subPackages/clockIn/apply"):[3,4].includes(this.userPunch.is_clock)&&this.gotoPath("/subPackages/clockIn/apply?id="+this.userPunch.clock_id)},watchLocation:function(){var t=this;navigator.geolocation?this.watchId=navigator.geolocation.watchPosition((function(e){var n=e.coords,i=t.wgs84ToGcj02(n.longitude,n.latitude),s=(0,a.default)(i,2),c=s[0],o=s[1];t.myLonLat={lng:c,lat:o},t.isCanPunch=!1;for(var r=0;r137.8347||e<.8293||e>55.8271},transformLat:function(t,e){var n=2*t-100+3*e+.2*e*e+.1*t*e+.2*Math.sqrt(Math.abs(t));return n+=2*(20*Math.sin(6*t*Math.PI)+20*Math.sin(2*t*Math.PI))/3,n+=2*(20*Math.sin(e*Math.PI)+40*Math.sin(e/3*Math.PI))/3,n+=2*(160*Math.sin(e/12*Math.PI)+320*Math.sin(e*Math.PI/30))/3,n},transformLng:function(t,e){var n=300+t+2*e+.1*t*t+.1*t*e+.1*Math.sqrt(Math.abs(t));return n+=2*(20*Math.sin(6*t*Math.PI)+20*Math.sin(2*t*Math.PI))/3,n+=2*(20*Math.sin(t*Math.PI)+40*Math.sin(t/3*Math.PI))/3,n+=2*(150*Math.sin(t/12*Math.PI)+300*Math.sin(t/30*Math.PI))/3,n},wgs84ToGcj02:function(t,e){var n=6378245,i=.006693421622965943;if(this.outOfChina(t,e))return[t,e];var a=this.transformLat(t-105,e-35),s=this.transformLng(t-105,e-35),c=e/180*Math.PI,o=Math.sin(c);o=1-i*o*o;var r=Math.sqrt(o);a=180*a/(n*(1-i)/(o*r)*Math.PI),s=180*s/(n/r*Math.cos(c)*Math.PI);var u=e+a,h=t+s;return[h,u]},goHX:function(){uni.switchTab({url:"/pages/verification/index"})},switchChange:function(t,e){t.isChecked=!t.isChecked;var n=this.typeIndex?"/api/Merchants/updateGuideSched":"/api/Merchants/updateGuideSchedService";this.Post({date:this.selectDay,online_type:t.isChecked?1:0,date_half:this.typeIndex?"":e+1,classify:this.typeIndex?2:""},n).then((function(t){}))},getDate:function(t){console.log("传递过来的日期",t),this.selectDay=t,this.sessionList.forEach((function(t){return t.isChecked=!1})),this.sessionLists[0].isChecked=!1,this.getList()},changeWork:function(t){},getList:function(){var t=this;this.Post({start_date:this.selectDay,end_date:this.selectDay,classify:this.typeIndex?2:3},"/api/Merchants/getGuideSchedList").then((function(e){if(e.data&&e.data.length>0){var n=e.data[0];t.typeIndex?t.sessionLists[0].isChecked=!!n.online_type:(t.sessionList[0].isChecked=!!n.morning_type,t.sessionList[1].isChecked=!!n.afternoon_type,t.sessionList[2].isChecked=!!n.day_type)}}))},formatDate:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY/MM/DD",n=t.getFullYear(),i=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0"),s=String(t.getHours()).padStart(2,"0"),c=String(t.getMinutes()).padStart(2,"0"),o=String(t.getSeconds()).padStart(2,"0");return e.replace("YYYY",n).replace("MM",i).replace("DD",a).replace("HH",s).replace("mm",c).replace("ss",o)},getNowTime:function(t,e){var n=1===e?"ios"===uni.getSystemInfoSync().platform?"YYYY/MM/DD HH:mm:ss":"YYYY-MM-DD HH:mm:ss":"YYYY/MM/DD";return this.formatDate(t,n)},openRule:function(){var t=this;this.Post({id:7},"/api/article/getArticleById").then((function(e){t.ruleContent=e.data.content,t.$refs.popup.open()}))},startTimeUpdate:function(){var t=this;this.updateTime(),this.timeInterval=setInterval((function(){t.updateTime()}),1e3)},updateTime:function(){var t=new Date,e=String(t.getHours()).padStart(2,"0"),n=String(t.getMinutes()).padStart(2,"0"),i=String(t.getSeconds()).padStart(2,"0");this.currentTime="".concat(e,":").concat(n,":").concat(i)}}};e.default=c},df0f:function(t,e,n){"use strict";n.r(e);var i=n("dc8b"),a=n.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=a.a},e620:function(t,e,n){"use strict";var i=n("39b6"),a=n.n(i);a.a}}]); \ No newline at end of file diff --git a/unpackage/dist/build/web/static/js/pages-index-index.c7c523df.js b/unpackage/dist/build/web/static/js/pages-index-index.c7c523df.js new file mode 100644 index 0000000..15e66a0 --- /dev/null +++ b/unpackage/dist/build/web/static/js/pages-index-index.c7c523df.js @@ -0,0 +1 @@ +(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-index-index"],{"64de":function(t,e,n){var i=n("c86c");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.content[data-v-27287b0b]{background:#fff;min-height:100vh;padding:%?40?% %?26?% %?200?%}.topImg[data-v-27287b0b]{width:%?299.33?%;height:%?70?%;display:flex;margin:auto}.title[data-v-27287b0b]{font-weight:700;font-size:%?35?%;color:#000;margin:%?68?% 0 %?34?%}.rule[data-v-27287b0b]{font-weight:500;font-size:%?31?%;color:#96684f;text-align:right}.punch-box[data-v-27287b0b]{width:%?267?%;height:%?267?%;background:#ccc;box-shadow:%?0?% %?0?% %?29?% %?0?% hsla(0,0%,60%,.6);border-radius:50%;justify-content:center;align-items:center;font-weight:700;font-size:%?32?%;color:#fff;margin:%?200?% auto 0}.punch-text[data-v-27287b0b]{font-weight:700;font-size:%?30?%;color:#111;margin:%?40?% auto;text-align:center}.examine-btn[data-v-27287b0b]{width:%?257?%;height:%?80?%;border-radius:%?13?%;border:%?1?% solid #96684f;font-weight:500;font-size:%?31?%;color:#96684f;margin:0 auto}.nav-item[data-v-27287b0b]{font-weight:500;font-size:%?32?%;color:#000;width:%?338?%;height:%?118?%;background:#f5f5f5;border-radius:%?20?%;padding:0 %?15?%}.nav-item uni-image[data-v-27287b0b]{width:%?80.67?%;height:%?80.67?%}.type-box[data-v-27287b0b]{display:flex}.type-box .type-item[data-v-27287b0b]{margin-right:%?44?%;font-weight:500;font-size:%?32?%;color:#000}.type-box .type-active[data-v-27287b0b]{color:#96684f}.type-box .type-line[data-v-27287b0b]{width:%?117?%;height:%?6?%;background:#96684f;border-radius:%?3?%;margin:%?4?% auto 0}.session-item[data-v-27287b0b]{width:%?697?%;height:%?93?%;background:#f5f5f5;border-radius:%?47?%;margin:%?28?% auto 0;font-family:PingFang SC;font-weight:500;font-size:%?32?%;color:#000;padding:0 %?28?%}',""]),t.exports=e},"7ba3":function(t,e,n){"use strict";n.r(e);var i=n("9d12"),a=n("df0f");for(var s in a)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(s);n("d2e6");var c=n("828b"),o=Object(c["a"])(a["default"],i["b"],i["c"],!1,null,"27287b0b",null,!1,i["a"],void 0);e["default"]=o.exports},"9d12":function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return i}));var i={uniPopup:n("d93e").default},a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"content"},[n("v-uni-image",{staticClass:"topImg",attrs:{src:"https://static.ticket.sz-trip.com/tourGuide/images/index/topImg.png"}}),n("v-uni-view",{staticClass:"title",staticStyle:{"margin-top":"40rpx"}},[t._v("·快捷入口")]),n("v-uni-view",{staticClass:"flex-between"},[n("v-uni-view",{staticClass:"nav-item flex-around",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.goHX()}}},[t._v("立即核销"),n("v-uni-image",{attrs:{src:"https://static.ticket.sz-trip.com/tourGuide/images/index/hexiao.png",mode:""}})],1),n("v-uni-view",{staticClass:"nav-item flex-around",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.gotoPath("/subPackages/order/orderList")}}},[t._v("查看订单"),n("v-uni-image",{attrs:{src:"https://static.ticket.sz-trip.com/tourGuide/images/index/dingdan.png",mode:""}})],1)],1),t.isShowClasses?n("v-uni-view",[n("v-uni-view",{staticClass:"title"},[t._v("·我的排班")]),n("v-uni-view",{staticClass:"type-box"},t._l(t.typeList,(function(e,i){return n("v-uni-view",{key:i,class:["type-item",{"type-active":i==t.typeIndex}],on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.typeIndex=i,t.getList()}}},[t._v(t._s(e.title)),i==t.typeIndex?n("v-uni-view",{staticClass:"type-line"}):t._e()],1)})),1),n("calendarVue",{attrs:{isShowLunar:!0,isCanChangeDate:0==t.userPunch.is_clock},on:{changeDate:function(e){arguments[0]=e=t.$handleEvent(e),t.getDate.apply(void 0,arguments)}}}),t._l(t.typeIndex?t.sessionLists:t.sessionList,(function(e,i){return n("v-uni-view",{key:i,staticClass:"session-item flex-between"},[t._v(t._s(e.title)),n("v-uni-switch",{attrs:{checked:e.isChecked,color:"#96684F"},on:{change:function(n){arguments[0]=n=t.$handleEvent(n),t.switchChange(e,i)}}})],1)}))],2):n("v-uni-view",[n("v-uni-view",{staticClass:"title"},[t._v("·我的打卡")]),n("v-uni-view",{staticClass:"rule",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.openRule.apply(void 0,arguments)}}},[t._v("打卡规则")]),n("v-uni-view",{staticClass:"punch-box flex-column",style:{backgroundColor:t.isCanPunch?"#96684F":""},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.punch.apply(void 0,arguments)}}},[n("v-uni-view",[t._v("上线打卡")]),t._v(t._s(t.currentTime))],1),t.punchSuccess?n("v-uni-view",[n("v-uni-view",{staticClass:"punch-text"},[t._v("打卡时间:"+t._s(t.currentTime.slice(0,5)))]),n("v-uni-view",{staticClass:"punch-text",staticStyle:{margin:"0 auto"}},[t._v(t._s(t.timeSuccess)+"s后自动进入排班页面")])],1):n("v-uni-view",[n("v-uni-view",{staticClass:"punch-text"},[t._v(t._s(t.isCanPunch?"您已进入打卡范围:"+t.userPunch.clock_address[t.nearestFenceIndex].title:"您当前不在可打卡范围内"))]),t.userPunch.is_open_examine?n("v-uni-view",{staticClass:"examine-btn flex-center",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.examinePunch.apply(void 0,arguments)}}},[t._v("审批打卡")]):t._e()],1)],1),n("uni-popup",{ref:"popup",attrs:{type:"center","border-radius":"10px","background-color":"#fff"}},[n("v-uni-view",{staticStyle:{width:"90%",padding:"30rpx","border-radius":"10rpx",margin:"auto"},domProps:{innerHTML:t._s(t.formateRichText(t.ruleContent))}})],1)],1)},s=[]},d2e6:function(t,e,n){"use strict";var i=n("d899"),a=n.n(i);a.a},d899:function(t,e,n){var i=n("64de");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=n("967d").default;a("4a7e79d4",i,!0,{sourceMap:!1,shadowMode:!1})},dc8b:function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n("5de6"));n("4626"),n("bf0f"),n("2797"),n("795c"),n("5c47"),n("a1c1"),n("c223");var s=i(n("918a")),c={components:{calendarVue:s.default},data:function(){return{typeList:[{title:"导游服务",id:""},{title:"线路产品",id:""}],typeIndex:0,selectDay:"",sessionList:[{title:"上午场",isChecked:!1},{title:"下午场",isChecked:!1},{title:"全天场",isChecked:!1}],sessionLists:[{title:"当天状态",isChecked:!1}],isAllChecked:!1,nearestFenceIndex:null,fenceRadius:500,watchId:null,ruleContent:"",currentTime:"",timeInterval:null,isCanPunch:!1,punchSuccess:!1,timeSuccess:3,isShowClasses:!0,userPunch:{},myLonLat:{lng:"",lat:""}}},onLoad:function(){this.selectDay=this.getNowTime(new Date),this.getList()},onShow:function(){var t=this;this.Post({},"/api/Merchants/getGuideClockStatus").then((function(e){if(t.userPunch=e.data,0!=t.userPunch.clock_address.length){switch(t.userPunch.is_clock){case 0:t.isShowClasses=!0;break;case 1:t.isShowClasses=!1;break;case 2:t.isShowClasses=!0;break;case 3:t.isShowClasses=!1;break;case 4:t.isShowClasses=!1;break;default:break}t.watchLocation(),t.startTimeUpdate()}}))},onHide:function(){this.watchId&&navigator.geolocation.clearWatch(this.watchId),this.timeInterval&&clearInterval(this.timeInterval)},methods:{punch:function(){var t=this;null!==this.nearestFenceIndex?this.Post({address_id:this.userPunch.clock_address[this.nearestFenceIndex].id,lon:this.myLonLat.lng,lat:this.myLonLat.lat},"/api/Merchants/guideClockLocate").then((function(e){if(200==e.code){t.punchSuccess=!0,clearInterval(t.timeInterval);var n=setInterval((function(){t.timeSuccess--,0==t.timeSuccess&&(clearInterval(n),t.isShowClasses=!0)}),1e3)}})):uni.showToast({title:"您当前不在可打卡范围内,无法打卡",icon:"none"})},examinePunch:function(){1==this.userPunch.is_clock?this.gotoPath("/subPackages/clockIn/apply"):[3,4].includes(this.userPunch.is_clock)&&this.gotoPath("/subPackages/clockIn/apply?id="+this.userPunch.clock_id)},watchLocation:function(){var t=this;navigator.geolocation?this.watchId=navigator.geolocation.watchPosition((function(e){var n=e.coords,i=t.wgs84ToGcj02(n.longitude,n.latitude),s=(0,a.default)(i,2),c=s[0],o=s[1];t.myLonLat={lng:c,lat:o},console.log(o,c),t.isCanPunch=!1;for(var r=0;r137.8347||e<.8293||e>55.8271},transformLat:function(t,e){var n=2*t-100+3*e+.2*e*e+.1*t*e+.2*Math.sqrt(Math.abs(t));return n+=2*(20*Math.sin(6*t*Math.PI)+20*Math.sin(2*t*Math.PI))/3,n+=2*(20*Math.sin(e*Math.PI)+40*Math.sin(e/3*Math.PI))/3,n+=2*(160*Math.sin(e/12*Math.PI)+320*Math.sin(e*Math.PI/30))/3,n},transformLng:function(t,e){var n=300+t+2*e+.1*t*t+.1*t*e+.1*Math.sqrt(Math.abs(t));return n+=2*(20*Math.sin(6*t*Math.PI)+20*Math.sin(2*t*Math.PI))/3,n+=2*(20*Math.sin(t*Math.PI)+40*Math.sin(t/3*Math.PI))/3,n+=2*(150*Math.sin(t/12*Math.PI)+300*Math.sin(t/30*Math.PI))/3,n},wgs84ToGcj02:function(t,e){var n=6378245,i=.006693421622965943;if(this.outOfChina(t,e))return[t,e];var a=this.transformLat(t-105,e-35),s=this.transformLng(t-105,e-35),c=e/180*Math.PI,o=Math.sin(c);o=1-i*o*o;var r=Math.sqrt(o);a=180*a/(n*(1-i)/(o*r)*Math.PI),s=180*s/(n/r*Math.cos(c)*Math.PI);var u=e+a,d=t+s;return[d,u]},goHX:function(){uni.switchTab({url:"/pages/verification/index"})},switchChange:function(t,e){t.isChecked=!t.isChecked;var n=this.typeIndex?"/api/Merchants/updateGuideSched":"/api/Merchants/updateGuideSchedService";this.Post({date:this.selectDay,online_type:t.isChecked?1:0,date_half:this.typeIndex?"":e+1,classify:this.typeIndex?2:""},n).then((function(t){}))},getDate:function(t){console.log("传递过来的日期",t),this.selectDay=t,this.sessionList.forEach((function(t){return t.isChecked=!1})),this.sessionLists[0].isChecked=!1,this.getList()},changeWork:function(t){},getList:function(){var t=this;this.Post({start_date:this.selectDay,end_date:this.selectDay,classify:this.typeIndex?2:3},"/api/Merchants/getGuideSchedList").then((function(e){if(e.data&&e.data.length>0){var n=e.data[0];t.typeIndex?t.sessionLists[0].isChecked=!!n.online_type:(t.sessionList[0].isChecked=!!n.morning_type,t.sessionList[1].isChecked=!!n.afternoon_type,t.sessionList[2].isChecked=!!n.day_type)}}))},formatDate:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"YYYY/MM/DD",n=t.getFullYear(),i=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0"),s=String(t.getHours()).padStart(2,"0"),c=String(t.getMinutes()).padStart(2,"0"),o=String(t.getSeconds()).padStart(2,"0");return e.replace("YYYY",n).replace("MM",i).replace("DD",a).replace("HH",s).replace("mm",c).replace("ss",o)},getNowTime:function(t,e){var n=1===e?"ios"===uni.getSystemInfoSync().platform?"YYYY/MM/DD HH:mm:ss":"YYYY-MM-DD HH:mm:ss":"YYYY/MM/DD";return this.formatDate(t,n)},openRule:function(){var t=this;this.Post({id:7},"/api/article/getArticleById").then((function(e){t.ruleContent=e.data.content,t.$refs.popup.open()}))},startTimeUpdate:function(){var t=this;this.updateTime(),this.timeInterval=setInterval((function(){t.updateTime()}),1e3)},updateTime:function(){var t=new Date,e=String(t.getHours()).padStart(2,"0"),n=String(t.getMinutes()).padStart(2,"0"),i=String(t.getSeconds()).padStart(2,"0");this.currentTime="".concat(e,":").concat(n,":").concat(i)}}};e.default=c},df0f:function(t,e,n){"use strict";n.r(e);var i=n("dc8b"),a=n.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=a.a}}]); \ No newline at end of file