diff --git a/App.vue b/App.vue index b00a7cf..66790b8 100644 --- a/App.vue +++ b/App.vue @@ -1,6 +1,6 @@ diff --git a/booking/newBooking/newBooking.vue b/booking/newBooking/newBooking.vue index 8b458c1..8b1b544 100644 --- a/booking/newBooking/newBooking.vue +++ b/booking/newBooking/newBooking.vue @@ -458,9 +458,8 @@ this.userData = uni.getStorageSync("userData"); // this.modelBooking.bookingTypeId = this.userData.bookingTypeId; this.modelBooking.propertyId = this.userData.propertyId; - + this.modelBooking.teamId = this.userData.teamStructureId; - this.modelBooking.sectionName = this.userData.section; this.modelBooking.sectionId = this.userData.sectionId; this.modelBooking.createdBy = this.userData.userId; this.modelBooking.createdByName = this.userData.userName; @@ -701,7 +700,7 @@ } } } - + if (this.maxRange == 0) this.getSetting(); } } else { @@ -776,8 +775,9 @@ this.currentTask = task; } }); - + this.currentTask = null; + if (res.success) { item.name = res.data.englishName; @@ -807,10 +807,10 @@ let item = this.modelBooking.sharerList[index]; let book = uni.getStorageSync("bookingData") let oldItem = book.sharerList[index]; - // 姓名被手动修改后,清除不再匹配的玩家 ID。 - if (item.name != oldItem.name && item.playerId.length > 4) { - item.playerId = ""; - } + //清空plaerId + // if (item.name != oldItem.name && item.playerId.length == 8) { + // item.playerId = ""; + // } }, async buildCalendar() { uni.showLoading({ @@ -949,9 +949,9 @@ 'available': 0, }); } - + } - + var isWaitlist = false; var waitlistCount = 0; var criteriaCount = e.length - 1; @@ -984,7 +984,7 @@ let checkDate = JSON.parse(JSON.stringify(e)); checkDate.pop(); if (!this.checkDate(checkDate)) return false; - + //rebuild special code let specialCode = this.modelBooking.specialCode; let specialName = this.modelBooking.specialName; @@ -1525,7 +1525,7 @@ } else { this.showMsgNoExtend = true; } - + }, checkConsecutiveNight(checkInDate, night) { diff --git a/booking/playerRoomCalendar/playerRoomCalendar.vue b/booking/playerRoomCalendar/playerRoomCalendar.vue index 49822af..b4fc5ff 100644 --- a/booking/playerRoomCalendar/playerRoomCalendar.vue +++ b/booking/playerRoomCalendar/playerRoomCalendar.vue @@ -18,19 +18,19 @@ - + {{$t("common.playerId")}} - {{ safePlayerData.playerId }} + {{ playerData.playerId }} - + {{$t("common.tier")}} - {{ safePlayerData.tierName }} + {{ playerData.tierName }} - + {{$t("common.name")}} - {{ playerName }} + {{playerData.salutation + " " + playerData.name }} @@ -197,13 +197,11 @@ propertyTabItemStyle() { return { height: '70rpx', - padding: '0 24rpx', - flexShrink: 0, + padding: '0', }; }, propertyTabActiveStyle() { return { - whiteSpace: 'nowrap', color: '#C39A4B', fontFamily: 'Inter-Bold', fontSize: '30rpx', @@ -212,7 +210,6 @@ }, propertyTabInactiveStyle() { return { - whiteSpace: 'nowrap', color: '#111111', fontFamily: 'Inter-Bold', fontSize: '30rpx', @@ -241,7 +238,6 @@ this.navBack(); }, async loadPropertiesRoomTypes() { - if (!this.canLoadPlayerCalendar()) return; try { this.calendarReady = false; uni.showLoading({ @@ -249,19 +245,14 @@ }); await this.loadCalendarSetting(); const res = await getPropertiesRoomTypes({}); - if (this.isNoPermissionResponse(res)) { - this.showCalendarNoPermission(); - return; - } - this.propertyList = Array.isArray(res && res.propertyList) ? res.propertyList : []; - if (!this.propertyList.length) throw new Error('No calendar properties configured'); + this.propertyList = res.propertyList; this.selectedPropertyCode = this.getDefaultPropertyCode(); this.selectDefaultOptions(); this.buildCalendar(); await this.loadQualificationData(); this.calendarRenderKey += 1; this.$nextTick(() => { - this.calendarReady = !this.calendarNoPermission; + this.calendarReady = true; }); } catch (e) { uni.$u.toast(e.message || e.errMsg || 'Load property room types failed'); @@ -464,12 +455,10 @@ })); }, refreshCalendar() { - if (!this.canLoadPlayerCalendar()) return; this.ensureSelectedOptionsForRefresh(true); this.loadQualificationData(); }, async loadQualificationData() { - if (!this.canLoadPlayerCalendar()) return; const records = []; const dateRange = this.getCalendarDateRange(); const requestId = this.startCalendarRequest(); @@ -523,20 +512,7 @@ }); }, isNoPermissionResponse(res) { - return res && res.success === false && (res.errorCode || res.code) === 'NO_PERMISSION'; - }, - canLoadPlayerCalendar() { - this.userData = uni.getStorageSync("userData"); - if (!this.userData || this.userData.canViewCalendar !== true) { - this.showCalendarNoPermission(); - return false; - } - if (!this.safePlayerData.playerId) { - this.calendarReady = false; - uni.$u.toast(this.$t("common.dataNotFound")); - return false; - } - return true; + return res && res.success === false && res.errorCode === 'NO_PERMISSION'; }, showCalendarNoPermission() { this.qualificationMap = {}; diff --git a/booking/submitBooking/submitBooking.vue b/booking/submitBooking/submitBooking.vue index 4797510..d325089 100644 --- a/booking/submitBooking/submitBooking.vue +++ b/booking/submitBooking/submitBooking.vue @@ -139,10 +139,10 @@ - + {{ $t("common.misCharge") }} - {{ bookingData.miscCharge || "-" }} + {{ bookingData.mischarge || "-" }} @@ -254,18 +254,19 @@ {{$t("bookingConfirm.approvalRemark")}} - + customStyle="height:30px;width:100%;" label="Extend" name="Extend" + :value="unqualifiedDateCheckboxStates[currentUnqualifiedIndex] && unqualifiedDateCheckboxStates[currentUnqualifiedIndex].includes('Extend')"> + customStyle="height:30px;width:100%;" label="Remark" name="Remark" + :value="unqualifiedDateCheckboxStates[currentUnqualifiedIndex] && unqualifiedDateCheckboxStates[currentUnqualifiedIndex].includes('Remark')"> @@ -328,32 +329,41 @@ {{$t("bookingConfirm.approvalRemark")}} - - + + + + + + + + + + - + customStyle="height:30px;width:100%;" label="Extend" name="Extend" + :value="unqualifiedDateCheckboxStates[currentUnqualifiedIndex] && unqualifiedDateCheckboxStates[currentUnqualifiedIndex].includes('Extend')"> + customStyle="height:30px;width:100%;" label="Remark" name="Remark" + :value="unqualifiedDateCheckboxStates[currentUnqualifiedIndex] && unqualifiedDateCheckboxStates[currentUnqualifiedIndex].includes('Remark')"> @@ -427,8 +437,7 @@ selectedApprover:'', showRemark: false, showWaitlistModal:false, - // Waitlist 弹窗 Extend/Remark(必须与 u-checkbox-group 的 :value 绑定,勿用子项 :value) - waitlistOtherRemarkCheckList: [], + showRadio:false, unqualifiedDateList: [], currentUnqualifiedIndex: 0, unqualifiedDateRemarks: [], @@ -454,17 +463,6 @@ // 數據方法 getBooking(){ this.bookingData = uni.getStorageSync("bookingData"); - // 确保 roomRemark 是响应式字段,否则 iOS 上可能出现 u-checkbox 状态未被正确回刷导致“可多选” - if (this.bookingData !== null && this.bookingData !== undefined && typeof this.bookingData === 'object') { - const hasRoomRemark = Object.prototype.hasOwnProperty.call(this.bookingData, 'roomRemark'); - if (!hasRoomRemark || this.bookingData.roomRemark === null || this.bookingData.roomRemark === undefined || this.bookingData.roomRemark === 'null') { - (this.$set ? this.$set(this.bookingData, 'roomRemark', '') : this.bookingData.roomRemark = ''); - } - const hasOtherRemark = Object.prototype.hasOwnProperty.call(this.bookingData, 'otherRemark'); - if (!hasOtherRemark || this.bookingData.otherRemark === null || this.bookingData.otherRemark === undefined || this.bookingData.otherRemark === 'null') { - (this.$set ? this.$set(this.bookingData, 'otherRemark', '') : this.bookingData.otherRemark = ''); - } - } if(this.bookingData!==null && this.bookingData!==undefined && this.bookingData!==''){ this.oldDateList = this.bookingData.dateList; this.checkList = []; @@ -500,7 +498,11 @@ this.submitBooking(); } }, - buildUnqualifiedDateLists() { + submitApproval() { + // 显示审批模态框 + this.getApprovalReason(); + this.showApprovalModal = true; + this.showModalBtn = true; this.currentUnqualifiedIndex = 0; this.unqualifiedDateList = []; this.unqualifiedDateRemarks = []; @@ -508,27 +510,33 @@ this.unqualifiedDateApprovers = []; this.unqualifiedDateOtherRemarks = []; this.unqualifiedDateCheckboxStates = []; - if (this.checkList != null && this.checkList.length > 0) { - if (this.bookingData.bookType == 1) { - for (let i = 0; i < this.bookingData.extendDate.length; i++) { - for (let j = 0; j < this.checkList.length; j++) { - if (i == this.checkList[j] && this.bookingData.extendDate[i].status == 1) { + if(this.checkList!=null && this.checkList.length>0){ + if(this.bookingData.bookType==1){ + // 把extendDate中的状态都设置成不够分 + for(let i=0;i uItem === item); - if (unqualifiedIndex === -1 && item.date && item.date.length) { - unqualifiedIndex = this.unqualifiedDateList.findIndex((uItem) => { - const ud = uItem.date; - const id = item.date; - return ud && id && ud.length && id.length && - ud[0] === id[0] && ud[ud.length - 1] === id[id.length - 1]; - }); - } - // 仅一条 Waitlist/Unqualified 时,引用不一致也会导致 findIndex 失败,直接对齐下标 0 - if (unqualifiedIndex === -1 && this.unqualifiedDateList.length === 1) { - unqualifiedIndex = 0; - } - const checkboxState = unqualifiedIndex !== -1 - ? (this.unqualifiedDateCheckboxStates[unqualifiedIndex] || []) - : []; - const otherSlot = unqualifiedIndex !== -1 - ? (this.unqualifiedDateOtherRemarks[unqualifiedIndex] || '') - : ''; - const wlTags = this.waitlistOtherRemarkCheckList || []; - const globalOther = (this.bookingData && this.bookingData.otherRemark) ? String(this.bookingData.otherRemark) : ''; - const parseTags = (s) => String(s).split(';').map((x) => x.trim()).filter(Boolean); - const hasExtend = checkboxState.includes('Extend') || - parseTags(otherSlot).includes('Extend') || - wlTags.includes('Extend') || - parseTags(globalOther).includes('Extend'); + let remarkArr = []; + let roomRemark = this.bookingData.roomRemark; + let otherRemark = this.bookingData.otherRemark; + if(roomRemark!=''&&roomRemark!=undefined) remarkArr.push(roomRemark); + if(otherRemark!=''&&otherRemark!=undefined) remarkArr.push(otherRemark); - const roomRemark = this.bookingData.roomRemark; - const idxRemark = unqualifiedIndex !== -1 ? this.unqualifiedDateRemarks[unqualifiedIndex] : ''; - const manualRemark = (idxRemark != null && idxRemark !== '') ? idxRemark : this.freeRemark; - const remarkChecked = unqualifiedIndex !== -1 && - (this.unqualifiedDateCheckboxStates[unqualifiedIndex] || []).includes('Remark'); - - if (unqualifiedIndex !== -1 && this.unqualifiedDateOtherRemarks[unqualifiedIndex] != null) { - this.bookingData.otherRemark = this.unqualifiedDateOtherRemarks[unqualifiedIndex]; + // 找到对应的unqualifiedDate索引 + const unqualifiedIndex = this.unqualifiedDateList.findIndex(uItem => uItem === item); + let extendStr = ''; + if (unqualifiedIndex !== -1) { + const checkboxState = this.unqualifiedDateCheckboxStates[unqualifiedIndex] || []; + if (checkboxState.includes('Extend')) { + extendStr = 'Extend'; + } } - // 对应 BookingDate 的 remark:勾选 Extend 时放在字符串首位 - const dateParts = []; - if (hasExtend) { - dateParts.push('Extend'); - } - if (roomRemark != null && roomRemark !== '' && roomRemark !== undefined) { - dateParts.push(roomRemark); - } if (item.status == 1 && - item.remarkText != null && item.remarkText !== '' && item.remarkText !== undefined) { - dateParts.push(item.remarkText); - } - if ((remarkChecked || this.showRemark) && manualRemark !== '' && manualRemark != null && item.status == 1) { - if (manualRemark !== item.remarkText) dateParts.push(manualRemark); + item.remarkText != '' && + item.remarkText != undefined) { + if (extendStr) { + remarkArr.push(extendStr + '; ' + item.remarkText); + } else { + remarkArr.push(item.remarkText); + } + } else if (item.status == 1 && extendStr) { + remarkArr.push(extendStr); } + + if(this.showRemark&&this.freeRemark!=''&&item.status==1) remarkArr.push(this.freeRemark); - const dateRemarkJoin = dateParts.join('; '); - if (dateRemarkJoin) { - this.bookingData.remark = dateRemarkJoin; - item.remark = dateRemarkJoin; - } else { + if(remarkArr.length>0) { + this.bookingData.remark = remarkArr.join('; '); + item.remark = remarkArr.join('; '); + }else{ this.bookingData.remark = ""; item.remark = ""; } @@ -1585,10 +1563,6 @@ }, showWaitlistPop() { - // 关键:直接点「放入 Waitlist」不会经过 submitApproval,必须在此处填充 unqualifiedDateList, - // 否则 getWaitlistRemark 里 findIndex 恒为 -1,Extend 永远不会写入 remark - this.buildUnqualifiedDateLists(); - this.waitlistOtherRemarkCheckList = (this.unqualifiedDateCheckboxStates[0] || []).slice(); this.showWaitlistModal = true; this.showMsgBox = false; }, @@ -1632,27 +1606,17 @@ } }); }, - onWaitlistRoomRemarkGroupChange(e) { - const raw = Array.isArray(e) ? e : (e && Array.isArray(e.detail) ? e.detail : []); - const names = raw.map((x) => (x != null ? String(x) : '')).filter(Boolean); - if (!this.bookingData) { - return; + changeRoomRemark(e,item) { + if (e) { + if(e==item.roomRemark){ + item.roomRemark="" + item.showRadio = true; + setTimeout(()=>{item.showRadio = false;this.$forceUpdate()},1) + }else{ + item.roomRemark=e + } } - if (!Object.prototype.hasOwnProperty.call(this.bookingData, 'roomRemark')) { - this.$set(this.bookingData, 'roomRemark', ''); - } - if (names.length === 0) { - this.bookingData.roomRemark = ''; - return; - } - if (names.length === 1) { - this.bookingData.roomRemark = names[0]; - return; - } - // 双选时视为互斥:保留本次切换目标(与原先不同的那一项) - const prev = this.bookingData.roomRemark; - const next = names.find((n) => n !== prev) || names[names.length - 1]; - this.bookingData.roomRemark = next; + this.$forceUpdate() }, // changeOtherRemark(e,item) { // if (e) { @@ -1671,41 +1635,27 @@ // this.$forceUpdate() // } // }, - changeWaitlistOtherRemark(e) { - const raw = Array.isArray(e) ? e : (e && Array.isArray(e.detail) ? e.detail : []); - const names = raw.map((x) => (x != null ? String(x) : '')).filter(Boolean); - this.waitlistOtherRemarkCheckList = names.slice(); - const extras = names.filter((n) => n !== 'Remark'); - const str = extras.join('; '); - this.showRemark = names.includes('Remark'); - const n = this.unqualifiedDateCheckboxStates.length; - for (let i = 0; i < n; i++) { - this.$set(this.unqualifiedDateCheckboxStates, i, names.slice()); - this.$set(this.unqualifiedDateOtherRemarks, i, str); - } - if (this.bookingData) { - this.bookingData.otherRemark = str; - } - }, changeOtherRemark(e) { - const raw = Array.isArray(e) ? e : (e && Array.isArray(e.detail) ? e.detail : []); - const idx = this.currentUnqualifiedIndex; - if (!raw || raw.length === 0) { - this.showRemark = false; - this.$set(this.unqualifiedDateOtherRemarks, idx, ''); - this.$set(this.unqualifiedDateCheckboxStates, idx, []); - if (this.bookingData) { - this.bookingData.otherRemark = ''; + if (e) { + let str = ''; + let show = false; + for (let i = 0; i < e.length; i++) { + + if (e[i] == 'Remark') { + show = true; + } else { + str = e[i]; + } } - return; - } - const names = raw.map((x) => (x != null ? String(x) : '')).filter(Boolean); - const extras = names.filter((n) => n !== 'Remark'); - this.showRemark = names.includes('Remark'); - this.$set(this.unqualifiedDateCheckboxStates, idx, names.slice()); - this.$set(this.unqualifiedDateOtherRemarks, idx, extras.join('; ')); - if (this.bookingData) { - this.bookingData.otherRemark = extras.join('; '); + this.showRemark = show; + // 存储到当前索引的otherRemark + this.unqualifiedDateOtherRemarks[this.currentUnqualifiedIndex] = str; + // 存储checkbox状态 + this.unqualifiedDateCheckboxStates[this.currentUnqualifiedIndex] = e; + } else { + this.showRemark = false; + this.unqualifiedDateOtherRemarks[this.currentUnqualifiedIndex] = ''; + this.unqualifiedDateCheckboxStates[this.currentUnqualifiedIndex] = []; } }, @@ -1721,16 +1671,6 @@ }, }, computed:{ - waitlistRoomGroupValue() { - if (!this.bookingData || !this.bookingData.roomRemark) { - return []; - } - const r = this.bookingData.roomRemark; - if (r === '2nd Room' || r === '3rd Room') { - return [r]; - } - return []; - }, getStatusColor(){ return function (booking) { let operaStatus = null; @@ -2051,4 +1991,4 @@ color: #C39A4B; margin-bottom: 15px; } - + \ No newline at end of file diff --git a/common/config.js b/common/config.js index 40beca1..049fa0c 100644 --- a/common/config.js +++ b/common/config.js @@ -14,7 +14,7 @@ class config { //this.version = "beta 2.0"; //ali ECS - // this.internalUrl = 'https://mcrm.willtechmacau.com:9086'; + // this.internalUrl = 'https://sep.willtechmo.com'; this.externalUrl = 'https://mp.mixixili.cn'; this.debugMode = true; @@ -36,4 +36,5 @@ class config { this.emailExt = "";// 如果是dev的時候設置成空字符串,讓他們自己輸入 } } -export default config \ No newline at end of file +export default config + \ No newline at end of file diff --git a/common/countryDialCodes.js b/common/countryDialCodes.js new file mode 100644 index 0000000..c377008 --- /dev/null +++ b/common/countryDialCodes.js @@ -0,0 +1,257 @@ +const countryDialCodes = [ + { iso2: 'MO', country: 'Macau', code: '+853' }, + { iso2: 'CN', country: 'China', code: '+86' }, + { iso2: 'HK', country: 'Hong Kong', code: '+852' }, + { iso2: 'AF', country: 'Afghanistan', code: '+93' }, + { iso2: 'AX', country: 'Aland Islands', code: '+358' }, + { iso2: 'AL', country: 'Albania', code: '+355' }, + { iso2: 'DZ', country: 'Algeria', code: '+213' }, + { iso2: 'AS', country: 'American Samoa', code: '+1' }, + { iso2: 'AD', country: 'Andorra', code: '+376' }, + { iso2: 'AO', country: 'Angola', code: '+244' }, + { iso2: 'AI', country: 'Anguilla', code: '+1' }, + { iso2: 'AG', country: 'Antigua and Barbuda', code: '+1' }, + { iso2: 'AR', country: 'Argentina', code: '+54' }, + { iso2: 'AM', country: 'Armenia', code: '+374' }, + { iso2: 'AW', country: 'Aruba', code: '+297' }, + { iso2: 'AC', country: 'Ascension Island', code: '+247' }, + { iso2: 'AU', country: 'Australia', code: '+61' }, + { iso2: 'AT', country: 'Austria', code: '+43' }, + { iso2: 'AZ', country: 'Azerbaijan', code: '+994' }, + { iso2: 'BS', country: 'Bahamas', code: '+1' }, + { iso2: 'BH', country: 'Bahrain', code: '+973' }, + { iso2: 'BD', country: 'Bangladesh', code: '+880' }, + { iso2: 'BB', country: 'Barbados', code: '+1' }, + { iso2: 'BY', country: 'Belarus', code: '+375' }, + { iso2: 'BE', country: 'Belgium', code: '+32' }, + { iso2: 'BZ', country: 'Belize', code: '+501' }, + { iso2: 'BJ', country: 'Benin', code: '+229' }, + { iso2: 'BM', country: 'Bermuda', code: '+1' }, + { iso2: 'BT', country: 'Bhutan', code: '+975' }, + { iso2: 'BO', country: 'Bolivia', code: '+591' }, + { iso2: 'BA', country: 'Bosnia and Herzegovina', code: '+387' }, + { iso2: 'BW', country: 'Botswana', code: '+267' }, + { iso2: 'BR', country: 'Brazil', code: '+55' }, + { iso2: 'IO', country: 'British Indian Ocean Territory', code: '+246' }, + { iso2: 'VG', country: 'British Virgin Islands', code: '+1' }, + { iso2: 'BN', country: 'Brunei', code: '+673' }, + { iso2: 'BG', country: 'Bulgaria', code: '+359' }, + { iso2: 'BF', country: 'Burkina Faso', code: '+226' }, + { iso2: 'BI', country: 'Burundi', code: '+257' }, + { iso2: 'KH', country: 'Cambodia', code: '+855' }, + { iso2: 'CM', country: 'Cameroon', code: '+237' }, + { iso2: 'CA', country: 'Canada', code: '+1' }, + { iso2: 'CV', country: 'Cape Verde', code: '+238' }, + { iso2: 'BQ', country: 'Caribbean Netherlands', code: '+599' }, + { iso2: 'KY', country: 'Cayman Islands', code: '+1' }, + { iso2: 'CF', country: 'Central African Republic', code: '+236' }, + { iso2: 'TD', country: 'Chad', code: '+235' }, + { iso2: 'CL', country: 'Chile', code: '+56' }, + { iso2: 'CX', country: 'Christmas Island', code: '+61' }, + { iso2: 'CC', country: 'Cocos (Keeling) Islands', code: '+61' }, + { iso2: 'CO', country: 'Colombia', code: '+57' }, + { iso2: 'KM', country: 'Comoros', code: '+269' }, + { iso2: 'CG', country: 'Congo - Brazzaville', code: '+242' }, + { iso2: 'CD', country: 'Congo - Kinshasa', code: '+243' }, + { iso2: 'CK', country: 'Cook Islands', code: '+682' }, + { iso2: 'CR', country: 'Costa Rica', code: '+506' }, + { iso2: 'CI', country: 'Cote d\'Ivoire', code: '+225' }, + { iso2: 'HR', country: 'Croatia', code: '+385' }, + { iso2: 'CU', country: 'Cuba', code: '+53' }, + { iso2: 'CW', country: 'Curacao', code: '+599' }, + { iso2: 'CY', country: 'Cyprus', code: '+357' }, + { iso2: 'CZ', country: 'Czechia', code: '+420' }, + { iso2: 'DK', country: 'Denmark', code: '+45' }, + { iso2: 'DJ', country: 'Djibouti', code: '+253' }, + { iso2: 'DM', country: 'Dominica', code: '+1' }, + { iso2: 'DO', country: 'Dominican Republic', code: '+1' }, + { iso2: 'EC', country: 'Ecuador', code: '+593' }, + { iso2: 'EG', country: 'Egypt', code: '+20' }, + { iso2: 'SV', country: 'El Salvador', code: '+503' }, + { iso2: 'GQ', country: 'Equatorial Guinea', code: '+240' }, + { iso2: 'ER', country: 'Eritrea', code: '+291' }, + { iso2: 'EE', country: 'Estonia', code: '+372' }, + { iso2: 'SZ', country: 'Eswatini', code: '+268' }, + { iso2: 'ET', country: 'Ethiopia', code: '+251' }, + { iso2: 'FK', country: 'Falkland Islands', code: '+500' }, + { iso2: 'FO', country: 'Faroe Islands', code: '+298' }, + { iso2: 'FJ', country: 'Fiji', code: '+679' }, + { iso2: 'FI', country: 'Finland', code: '+358' }, + { iso2: 'FR', country: 'France', code: '+33' }, + { iso2: 'GF', country: 'French Guiana', code: '+594' }, + { iso2: 'PF', country: 'French Polynesia', code: '+689' }, + { iso2: 'GA', country: 'Gabon', code: '+241' }, + { iso2: 'GM', country: 'Gambia', code: '+220' }, + { iso2: 'GE', country: 'Georgia', code: '+995' }, + { iso2: 'DE', country: 'Germany', code: '+49' }, + { iso2: 'GH', country: 'Ghana', code: '+233' }, + { iso2: 'GI', country: 'Gibraltar', code: '+350' }, + { iso2: 'GR', country: 'Greece', code: '+30' }, + { iso2: 'GL', country: 'Greenland', code: '+299' }, + { iso2: 'GD', country: 'Grenada', code: '+1' }, + { iso2: 'GP', country: 'Guadeloupe', code: '+590' }, + { iso2: 'GU', country: 'Guam', code: '+1' }, + { iso2: 'GT', country: 'Guatemala', code: '+502' }, + { iso2: 'GG', country: 'Guernsey', code: '+44' }, + { iso2: 'GN', country: 'Guinea', code: '+224' }, + { iso2: 'GW', country: 'Guinea-Bissau', code: '+245' }, + { iso2: 'GY', country: 'Guyana', code: '+592' }, + { iso2: 'HT', country: 'Haiti', code: '+509' }, + { iso2: 'HN', country: 'Honduras', code: '+504' }, + { iso2: 'HU', country: 'Hungary', code: '+36' }, + { iso2: 'IS', country: 'Iceland', code: '+354' }, + { iso2: 'IN', country: 'India', code: '+91' }, + { iso2: 'ID', country: 'Indonesia', code: '+62' }, + { iso2: 'IR', country: 'Iran', code: '+98' }, + { iso2: 'IQ', country: 'Iraq', code: '+964' }, + { iso2: 'IE', country: 'Ireland', code: '+353' }, + { iso2: 'IM', country: 'Isle of Man', code: '+44' }, + { iso2: 'IL', country: 'Israel', code: '+972' }, + { iso2: 'IT', country: 'Italy', code: '+39' }, + { iso2: 'JM', country: 'Jamaica', code: '+1' }, + { iso2: 'JP', country: 'Japan', code: '+81' }, + { iso2: 'JE', country: 'Jersey', code: '+44' }, + { iso2: 'JO', country: 'Jordan', code: '+962' }, + { iso2: 'KZ', country: 'Kazakhstan', code: '+7' }, + { iso2: 'KE', country: 'Kenya', code: '+254' }, + { iso2: 'KI', country: 'Kiribati', code: '+686' }, + { iso2: 'XK', country: 'Kosovo', code: '+383' }, + { iso2: 'KW', country: 'Kuwait', code: '+965' }, + { iso2: 'KG', country: 'Kyrgyzstan', code: '+996' }, + { iso2: 'LA', country: 'Laos', code: '+856' }, + { iso2: 'LV', country: 'Latvia', code: '+371' }, + { iso2: 'LB', country: 'Lebanon', code: '+961' }, + { iso2: 'LS', country: 'Lesotho', code: '+266' }, + { iso2: 'LR', country: 'Liberia', code: '+231' }, + { iso2: 'LY', country: 'Libya', code: '+218' }, + { iso2: 'LI', country: 'Liechtenstein', code: '+423' }, + { iso2: 'LT', country: 'Lithuania', code: '+370' }, + { iso2: 'LU', country: 'Luxembourg', code: '+352' }, + { iso2: 'MG', country: 'Madagascar', code: '+261' }, + { iso2: 'MW', country: 'Malawi', code: '+265' }, + { iso2: 'MY', country: 'Malaysia', code: '+60' }, + { iso2: 'MV', country: 'Maldives', code: '+960' }, + { iso2: 'ML', country: 'Mali', code: '+223' }, + { iso2: 'MT', country: 'Malta', code: '+356' }, + { iso2: 'MH', country: 'Marshall Islands', code: '+692' }, + { iso2: 'MQ', country: 'Martinique', code: '+596' }, + { iso2: 'MR', country: 'Mauritania', code: '+222' }, + { iso2: 'MU', country: 'Mauritius', code: '+230' }, + { iso2: 'YT', country: 'Mayotte', code: '+262' }, + { iso2: 'MX', country: 'Mexico', code: '+52' }, + { iso2: 'FM', country: 'Micronesia', code: '+691' }, + { iso2: 'MD', country: 'Moldova', code: '+373' }, + { iso2: 'MC', country: 'Monaco', code: '+377' }, + { iso2: 'MN', country: 'Mongolia', code: '+976' }, + { iso2: 'ME', country: 'Montenegro', code: '+382' }, + { iso2: 'MS', country: 'Montserrat', code: '+1' }, + { iso2: 'MA', country: 'Morocco', code: '+212' }, + { iso2: 'MZ', country: 'Mozambique', code: '+258' }, + { iso2: 'MM', country: 'Myanmar (Burma)', code: '+95' }, + { iso2: 'NA', country: 'Namibia', code: '+264' }, + { iso2: 'NR', country: 'Nauru', code: '+674' }, + { iso2: 'NP', country: 'Nepal', code: '+977' }, + { iso2: 'NL', country: 'Netherlands', code: '+31' }, + { iso2: 'NC', country: 'New Caledonia', code: '+687' }, + { iso2: 'NZ', country: 'New Zealand', code: '+64' }, + { iso2: 'NI', country: 'Nicaragua', code: '+505' }, + { iso2: 'NE', country: 'Niger', code: '+227' }, + { iso2: 'NG', country: 'Nigeria', code: '+234' }, + { iso2: 'NU', country: 'Niue', code: '+683' }, + { iso2: 'NF', country: 'Norfolk Island', code: '+672' }, + { iso2: 'KP', country: 'North Korea', code: '+850' }, + { iso2: 'MK', country: 'North Macedonia', code: '+389' }, + { iso2: 'MP', country: 'Northern Mariana Islands', code: '+1' }, + { iso2: 'NO', country: 'Norway', code: '+47' }, + { iso2: 'OM', country: 'Oman', code: '+968' }, + { iso2: 'PK', country: 'Pakistan', code: '+92' }, + { iso2: 'PW', country: 'Palau', code: '+680' }, + { iso2: 'PS', country: 'Palestinian Territories', code: '+970' }, + { iso2: 'PA', country: 'Panama', code: '+507' }, + { iso2: 'PG', country: 'Papua New Guinea', code: '+675' }, + { iso2: 'PY', country: 'Paraguay', code: '+595' }, + { iso2: 'PE', country: 'Peru', code: '+51' }, + { iso2: 'PH', country: 'Philippines', code: '+63' }, + { iso2: 'PL', country: 'Poland', code: '+48' }, + { iso2: 'PT', country: 'Portugal', code: '+351' }, + { iso2: 'PR', country: 'Puerto Rico', code: '+1' }, + { iso2: 'QA', country: 'Qatar', code: '+974' }, + { iso2: 'RE', country: 'Reunion', code: '+262' }, + { iso2: 'RO', country: 'Romania', code: '+40' }, + { iso2: 'RU', country: 'Russia', code: '+7' }, + { iso2: 'RW', country: 'Rwanda', code: '+250' }, + { iso2: 'WS', country: 'Samoa', code: '+685' }, + { iso2: 'SM', country: 'San Marino', code: '+378' }, + { iso2: 'ST', country: 'Sao Tome and Principe', code: '+239' }, + { iso2: 'SA', country: 'Saudi Arabia', code: '+966' }, + { iso2: 'SN', country: 'Senegal', code: '+221' }, + { iso2: 'RS', country: 'Serbia', code: '+381' }, + { iso2: 'SC', country: 'Seychelles', code: '+248' }, + { iso2: 'SL', country: 'Sierra Leone', code: '+232' }, + { iso2: 'SG', country: 'Singapore', code: '+65' }, + { iso2: 'SX', country: 'Sint Maarten', code: '+1' }, + { iso2: 'SK', country: 'Slovakia', code: '+421' }, + { iso2: 'SI', country: 'Slovenia', code: '+386' }, + { iso2: 'SB', country: 'Solomon Islands', code: '+677' }, + { iso2: 'SO', country: 'Somalia', code: '+252' }, + { iso2: 'ZA', country: 'South Africa', code: '+27' }, + { iso2: 'KR', country: 'South Korea', code: '+82' }, + { iso2: 'SS', country: 'South Sudan', code: '+211' }, + { iso2: 'ES', country: 'Spain', code: '+34' }, + { iso2: 'LK', country: 'Sri Lanka', code: '+94' }, + { iso2: 'BL', country: 'St. Barthelemy', code: '+590' }, + { iso2: 'SH', country: 'St. Helena', code: '+290' }, + { iso2: 'KN', country: 'St. Kitts and Nevis', code: '+1' }, + { iso2: 'LC', country: 'St. Lucia', code: '+1' }, + { iso2: 'MF', country: 'St. Martin', code: '+590' }, + { iso2: 'PM', country: 'St. Pierre and Miquelon', code: '+508' }, + { iso2: 'VC', country: 'St. Vincent and Grenadines', code: '+1' }, + { iso2: 'SD', country: 'Sudan', code: '+249' }, + { iso2: 'SR', country: 'Suriname', code: '+597' }, + { iso2: 'SJ', country: 'Svalbard and Jan Mayen', code: '+47' }, + { iso2: 'SE', country: 'Sweden', code: '+46' }, + { iso2: 'CH', country: 'Switzerland', code: '+41' }, + { iso2: 'SY', country: 'Syria', code: '+963' }, + { iso2: 'TW', country: 'Taiwan', code: '+886' }, + { iso2: 'TJ', country: 'Tajikistan', code: '+992' }, + { iso2: 'TZ', country: 'Tanzania', code: '+255' }, + { iso2: 'TH', country: 'Thailand', code: '+66' }, + { iso2: 'TL', country: 'Timor-Leste', code: '+670' }, + { iso2: 'TG', country: 'Togo', code: '+228' }, + { iso2: 'TK', country: 'Tokelau', code: '+690' }, + { iso2: 'TO', country: 'Tonga', code: '+676' }, + { iso2: 'TT', country: 'Trinidad and Tobago', code: '+1' }, + { iso2: 'TA', country: 'Tristan da Cunha', code: '+290' }, + { iso2: 'TN', country: 'Tunisia', code: '+216' }, + { iso2: 'TR', country: 'Turkiye', code: '+90' }, + { iso2: 'TM', country: 'Turkmenistan', code: '+993' }, + { iso2: 'TC', country: 'Turks and Caicos Islands', code: '+1' }, + { iso2: 'TV', country: 'Tuvalu', code: '+688' }, + { iso2: 'VI', country: 'U.S. Virgin Islands', code: '+1' }, + { iso2: 'UG', country: 'Uganda', code: '+256' }, + { iso2: 'UA', country: 'Ukraine', code: '+380' }, + { iso2: 'AE', country: 'United Arab Emirates', code: '+971' }, + { iso2: 'GB', country: 'United Kingdom', code: '+44' }, + { iso2: 'US', country: 'United States', code: '+1' }, + { iso2: 'UY', country: 'Uruguay', code: '+598' }, + { iso2: 'UZ', country: 'Uzbekistan', code: '+998' }, + { iso2: 'VU', country: 'Vanuatu', code: '+678' }, + { iso2: 'VA', country: 'Vatican City', code: '+39' }, + { iso2: 'VE', country: 'Venezuela', code: '+58' }, + { iso2: 'VN', country: 'Vietnam', code: '+84' }, + { iso2: 'WF', country: 'Wallis and Futuna', code: '+681' }, + { iso2: 'EH', country: 'Western Sahara', code: '+212' }, + { iso2: 'YE', country: 'Yemen', code: '+967' }, + { iso2: 'ZM', country: 'Zambia', code: '+260' }, + { iso2: 'ZW', country: 'Zimbabwe', code: '+263' }, +]; + +export function getCountryDialCodeOptions() { + return countryDialCodes.map(item => ({ + ...item, + label: item.code, + value: item.code, + })); +} + +export default countryDialCodes; diff --git a/common/request.js b/common/request.js index e930f0f..4439fa9 100644 --- a/common/request.js +++ b/common/request.js @@ -121,10 +121,8 @@ module.exports = (vm) => { break; case 400: kickout() - break; case 401: - if(error.config.url.indexOf('refresh_token')==-1 && error.config.url.indexOf('logout')==-1 && !error.config.custom?.tokenRetried){ - error.config.custom = {...error.config.custom, tokenRetried: true}; + if(error.config.url.indexOf('refresh_token')==-1 && error.config.url.indexOf('logout')==-1){ return tokenRefresh().then(_ => { error.config.header.Authorization = uni.getStorageSync("token"); error.config.header.RefreshToken = uni.getStorageSync("refreshToken") @@ -143,22 +141,19 @@ module.exports = (vm) => { } function tokenRefresh(){ - const storedRefreshToken = uni.getStorageSync("refreshToken"); - if (storedRefreshToken) { + let oldToken = uni.getStorageSync("token"); + if (oldToken !== null && oldToken !== '') { return refreshToken({}) .then((data) => { - if (!data?.success || !data.accessToken) throw new Error('Token refresh failed'); uni.setStorageSync("token",data.accessToken); uni.setStorageSync("tokenTime",dayjs().unix()); return Promise.resolve(true) }) .catch(error => { kickout() - return Promise.reject(error); }) } else { kickout() - return Promise.reject(new Error('Missing RefreshToken')); } } function checkToken(){ @@ -203,4 +198,4 @@ function checkIP(header){ } }*/ } -} +} \ No newline at end of file diff --git a/components/header/header.vue b/components/header/header.vue index c61140a..d65631a 100644 --- a/components/header/header.vue +++ b/components/header/header.vue @@ -10,6 +10,13 @@ bgColor="#C39A4B" titleStyle="max-width:none;width:auto;font-weight:bold;color:#ffffff;" > + + + - \ No newline at end of file + diff --git a/limo/bookingDetail/bookingDetail.vue b/limo/bookingDetail/bookingDetail.vue new file mode 100644 index 0000000..6d59b89 --- /dev/null +++ b/limo/bookingDetail/bookingDetail.vue @@ -0,0 +1,827 @@ + + + + + diff --git a/limo/newLimo/newLimo.vue b/limo/newLimo/newLimo.vue new file mode 100644 index 0000000..3531dde --- /dev/null +++ b/limo/newLimo/newLimo.vue @@ -0,0 +1,3112 @@ + + + + + diff --git a/limo/notification/notification.vue b/limo/notification/notification.vue new file mode 100644 index 0000000..45874a6 --- /dev/null +++ b/limo/notification/notification.vue @@ -0,0 +1,761 @@ + + + + + diff --git a/locale/en.json b/locale/en.json index 7802045..58b3f33 100644 --- a/locale/en.json +++ b/locale/en.json @@ -232,9 +232,9 @@ "bookingDetail.failed":" Failed", "bookingDetail.confirmApprove":"Are you sure to approve booking?", "bookingDetail.confirmReject":"Are you sure to reject booking?", - "bookingDetail.changeMiscChargeSuccess":"Change Misc Charge Success", + "bookingDetail.changeMisChargeSuccess":"Change MisCharge Success", "bookingDetail.miscChargeLess":"Amount cannot be less than original.", - "bookingDetail.changeMiscChargeFail":"Change Misc Charge Fail", + "bookingDetail.changeMisChargeFail":"Change MisCharge Fail", "multipleDate.title":"Multiple Date", "multipleDate.addDate":"ADD DATE", "multipleDate.pleaseAddDate":"Please Add Date", @@ -295,7 +295,7 @@ "hotel.title":"Room", "reservations.title":"Reservations", "approval.title":"Approval", - "hotel.roombooking":"Room Booking", + "hotel.roombooking":"Limo & Room Booking", "approval.pendingApproval":"Pending Approval", "approval.allRequest":"All Request", "approval.searchStr":"Search", @@ -319,5 +319,26 @@ "notification.pendingApproval":"Pending Approval", "notification.pendingApprovalRequest": "Pending Approval Request", "playerDetail.confirm":"CONFIRM", - "newBooking.validEta":"The ETA time format is incorrect. Please re-enter it, eg: HH:mm" + "newBooking.validEta":"The ETA time format is incorrect. Please re-enter it, eg: HH:mm", + "notification.title":"Notification", + "approvalRouting.title":"Approval Routing", + "limoBookingRecord.bookingType":"Booking Type", + "limoBookingRecord.pickupDatetime":"Pick up Datetime", + "limoBookingRecord.pickup":"Pick up", + "limoBookingRecord.dropoff":"Drop off", + "limoBookingRecord.extraDropoff":"Extra Drop off", + "limoBookingDetail.carTypeAndPlate":"Car Type and Plate", + "limoBookingDetail.overrideBy":"Override By", + "limoBookingDetail.tripPrice":"Trip Price", + "limoBookingDetail.driverSource":"Driver Source", + "limoBookingDetail.remark":"Remark", + "limoBookingDetail.driverContact":"Driver Contact", + "limoBookingDetail.pickupPoint":"Pick up point", + "limoBookingDetail.extraDropoff":"Extra Drop-off", + "limoBookingDetail.dropoffPoint":"Drop off point", + "limoBookingDetail.flightNo":"Flight No", + "limoBookingDetail.greetType":"Greet Type", + "limoBookingCopy.carType":"Car Type", + "limoBookingCopy.carNo":"Car No", + "limoBookingCopy.driverContact":"Driver Contact" } diff --git a/locale/zh-Hant.json b/locale/zh-Hant.json index e1491ef..ce82aa8 100644 --- a/locale/zh-Hant.json +++ b/locale/zh-Hant.json @@ -1,4 +1,4 @@ - { +{ "common.appName": "MOBILE CRM APP", "common.userLogin": "用戶登入", "common.loginsso": "登入", @@ -13,7 +13,7 @@ "common.room": "間", "common.rooms": "間", "common.bookingType": "預訂類型", - "common.misCharge":"雜項費用", + "common.misCharge": "雜項費用", "common.checkInDate": "入住日期", "common.checkOutDate": "退房日期", "common.roomType": "房型", @@ -29,12 +29,11 @@ "common.confirm": "確認", "common.in": "入住", "common.out": "離開", - "common.start":"開始", + "common.start": "開始", "common.selected": "已選擇", - "common.userLocked":"這個用戶賬戶已鎖定", - "common.ipLocked":"這個IP已鎖定", - "common.end":"終止", - "common.rangeError":"日期範圍不正確", + "common.userLocked": "這個用戶賬戶已鎖定", + "common.end": "終止", + "common.rangeError": "日期範圍不正確", "common.removeConfirm": "確認要刪除嗎?", "common.warning": "系統提示", "common.login": "登入", @@ -45,8 +44,9 @@ "common.alterSharerExist": "該客人已添加", "common.alterSharerLimit": "同住人限制", "common.errorMsg": "錯誤信息", + "common.misCharge":"雜項費用", "common.goBack": "返回", - "common.back":"返回", + "common.back": "返回", "common.language": "語言", "common.version": "版本", "common.user": "用戶", @@ -58,23 +58,23 @@ "common.search": "查詢", "common.status": "狀態", "common.inputRemark": "請輸入備註", - "common.nextBooking":"下一個預訂", + "common.nextBooking": "下一個預訂", "common.to": "到", - "common.close":"關閉", - "common.save":"保存", + "common.close": "關閉", + "common.save": "保存", "common.inputUserNameAndPassword": "請輸入用戶名和密碼", - "common.loginerror":"用戶名或密碼錯誤", - "common.mfaerror":"登入失敗", - "common.loginfail":"登入失敗", - "common.connected":"已連接", - "common.disconnected":"連接失敗", - "common.submit":"遞交", - "common.noPermission":"您沒有權限查看", - "common.rangeTip":"日期范围无效", - "common.jailBreakTitle":"禁止使用", - "common.jailBreakMessage":"禁止越獄過的設備使用該APP", - "common.noRecord":"沒有記錄", - "common.etaTime":"預計時間", + "common.loginerror": "用戶名或密碼錯誤", + "common.mfaerror": "登入失敗", + "common.loginfail": "登入失敗", + "common.connected": "已連接", + "common.disconnected": "連接失敗", + "common.submit": "遞交", + "common.noPermission": "您沒有權限查看", + "common.rangeTip": "日期范围无效", + "common.jailBreakTitle": "禁止使用", + "common.jailBreakMessage": "禁止越獄過的設備使用該APP", + "common.noRecord": "沒有記錄", + "common.etaTime": "預計時間", "calendar.mon": "一", "calendar.tue": "二", "calendar.wed": "三", @@ -91,6 +91,8 @@ "findPlayer.noPermission": "您沒有權限查看此客人.", "bookingRecord.title": "預定記錄", "bookingRecord.newsBooking": "預訂房間 / 候補名單", + "bookingRecord.newLimo": "預訂車輛", + "bookingRecord.calendar": "CALENDAR", "bookingRecord.extend": "續房", "bookingRecord.group": "關聯", "bookingRecord.sharer": "同住人", @@ -116,153 +118,12 @@ "newBooking.alertBookingType": "必須選擇預訂類型", "newBooking.extension": "續房", "newBooking.preference": "注意:特殊需求均無法保證,須視乎實際状況安排", - "newBooking.deposit":"押金", - "newBooking.postCharge":"房賬", - "newBooking.waiveDeposit":"免收押金", - "newBooking.collectDeposit":"收取押金", - "newBooking.yesPost":"掛房賬", - "newBooking.noPost":"鎖房賬", - "bookingConfirm.title": "預覽 & 確認", - "bookingConfirm.submitBooking": "遞交預定", - "bookingConfirm.createdOn": "預訂日期", - "bookingConfirm.createdBy": "預訂者", - "bookingConfirm.viewBooking": "預定詳情", - "bookingConfirm.urgentApproval":"緊急審批請求", - "bookingConfirm.submitApproval":"提交審批人", - "bookingConfirm.alert10": "正在處理客人 ", - "bookingConfirm.alert1": "預訂正在處理中", - "bookingConfirm.alert1_1":" 的候補名單!", - "bookingConfirm.alert2": " 的預定!", - "bookingConfirm.alert3": "您的預定未能通過!", - "bookingConfirm.alert4": "需放在候補名單", - "bookingConfirm.alert5": "部分預定未能通過!", - "bookingConfirm.IMAlert1":"請聯繫MSC預訂房間", - "bookingConfirm.IMAlert2":"選擇的日期需放在候補名單, 請申請批准預訂房間", - "bookingConfirm.putInWaitlist": "放入候補名單", - "bookingConfirm.currentStay": "當前入住", - "bookingConfirm.extending": "延長入住", - "bookingConfirm.extensionEmail": "MSC正在處理續房", - "bookingConfirm.extensionProccessing": "續房正在處理中", - "bookingConfirm.addSharer": "新增", - "bookingConfirm.canNotAddSharer": "不能新增同住人", - "bookingConfirm.confirmBooking": "確認預定", - "bookingConfirm.backToRecords": "返回主頁", - "bookingConfirm.viewProceedBooking": "查看並繼續", - "bookingConfirm.wantToWaitList": "是否放入候補名單?", - "bookingConfirm.secondRoom1":"超過可預訂房間數量", - "bookingConfirm.secondRoom2":"其中一晚已超過可預訂房間數量", - "bookingConfirm.secondRoom3":"已預訂套房或以上房型", - "bookingConfirm.secondRoom4":"只可預訂基本房型", - "bookingConfirm.duplicateWaitlist":"已提交候補名單", - "bookingConfirm.remark":"候補名單備註", - "bookingConfirm.numOfRoom":"請求房間數量", - "bookingConfirm.requestReason":"請求原因", - "bookingConfirm.routeToApprover":"發送至審批員", - "bookingConfirm.approvalRoutingRemark":"審批備注", - "bookingDetail.title": "預定詳情", - "bookingDetail.pendingAlert": "預定正在處理中!", - "bookingDetail.waitlistAlert": "預定已列入候補名單!", - "bookingDetail.confirmationNo": "預訂編號", - "bookingDetail.saveImage": "保存圖片", - "bookingDetail.extension": "續房", - "bookingDetail.cancelSuccessful": "取消成功", - "bookingDetail.cancelFailed": "取消失敗", - "bookingDetail.confirmCancel": "你確定要取消預定嗎?", - "bookingDetail.statusChange": "預定狀態已改變", - "bookingDetail.approve":"審批", - "bookingDetail.reject":"拒絕", - "bookingDetail.changeMiscChargeSuccess":"修改雜項費用成功", - "bookingDetail.changeMiscChargeFail":"修改雜項費用失敗", - "bookingDetail.cancelTimeErr":"當前時間段不能取消預定", - "bookingDetail.successfully":"成功", - "bookingDetail.failed":"失敗", - "bookingDetail.toCancelBooking": "確定要取消預訂嗎?", - "bookingDetail.backToBooking": "返回預訂", - "bookingDetail.backToDetail": "返回詳情", - "bookingDetail.SelectDate": "選擇預訂日期", - "bookingDetail.confirmApprove": "確定要批准此預訂嗎?", - "bookingDetail.confirmReject": "確定要拒絕此預訂嗎?", - "bookingDetail.errorDate":"必須選擇連續的日期!", - "bookingDetail.cancelBooking":"取消預定", - "bookingDetail.ETA":"預計時間", - "bookingDetail.miscChargeLess":"金額不可低於原值.", - "bookingDetail.cannotCancel":"不能取消这条记录", - "multipleDate.title": "選擇多個日期", - "multipleDate.addDate": "新增日期", - "multipleDate.pleaseAddDate": "請新增日期", - "multipleDate.reachMaxBookNum": "已達最大多個日期預定", - "submitBooking.title": "遞交", - "submitBooking.alert1": "TPD的狀態發生了改變,請重新選擇", - "submitBooking.submitedSuccessful": "遞交成功", - "submitBooking.roomCriteriaNotQualified":"不符合訂房條件", - "submitBooking.underWaitlist":"放入候補名單", - "submitBooking.copyRemark":"複製備註", - "putInWaitlist.title": "候補名單", - "newWaitlist.title": "创建候補名單", - "newWaitlist.remark": "備註", - "newWaitlist.submitWaitlist": "遞交候補名單", - "newWaitlist.savesuccessful": "成功遞交候補名單!", - "newWaitlist.viewSubmitedWaitlist": "查看候補名單", - "setting.title": "設定", - "region.title":"地區限制", - "region.showMessage":"此應用程序僅限於澳門使用。", - "region.reson":"禁用原因", - "region.resonMsgNotInMacau":"您的定位不在澳門", - "region.resonMsgOpenVPN":"您打開了VPN", - "region.resonMsgNotInMacauOpenVpn":"您的定位不在澳門且打開了VPN", - "region.resonMsglocationErr":"檢查定位時出錯", - "region.resonMsgVPNErr":"檢查VPN時出錯", - "region.resonMsgFunctionErr":"檢查定位和VPN時出錯", - "region.retry":"重試", - "region.commitTitle":"用戶使用協議及聲明", - "region.commitment1":"本人在此承諾遵守所有適用於使用 Mobile CRM (以下簡稱MCRM) 的公司政策及法定義務。尤其,本人所在地不在澳門特別行政區時,本人同意不使用具有博彩數據的MCRM功能。此外,本人承諾不允許任何其他人(無論是否為澳門美高梅員工)使用安裝在本人移動裝置上的MCRM或存取其中的數據。本人亦承諾不將MCRM上的任何信息分享至其他個人設備。本人知悉此類行為將受到法律的刑事處分,並嚴重違反本人合同規定的責任義務。", - "region.commitment2":"I hereby undertake to adhere to all Company’s policies and all legal obligations that are applicable to the usage of Mobile CRM (hereinafter called MCRM). In particular, I agree not to use MCRM functionality with gaming data whenever my location is outside of the Macau SAR. I further undertake not to allow anybody else, whether an MGM employee or not, to use MCRM on my mobile phone or to access the data therein. I also undertake not to share any of the information on MCRM to any other personal devices. I’m aware that such actions are criminally punished by law and constitute a serious breach of my contractual obligations.", - "region.resonMsgNotInMacauIP":"您的IP不在澳門", - "dashboard.title":"主頁", - "dashboard.dataAsOf":"數據更新於:", - "dashboard.achievement":"成就", - "dashboard.kpi":"指標", - "dashboard.teamtarget":"團隊目標", - "dashboard.individualtarget":"個人目標", - "dashboard.newreactivetheo":"New & Reactive Theo", - "dashboard.directoffer":"Direct Offer Redemption Rate", - "dashboard.hostedplayer":"Hosted Player Active Rate", - "dashboard.eventattendance":"Event Attendance (w/gaming action)", - "todo.title":"待辦", - "todo.arrival":"到達", - "todo.departure":"離開", - "todo.inhouse":"在場", - "todo.others":"其他", - "todo.notConfNo":"該條記錄沒有Opera Confirmation No.", - "todo.etaSuccess":"修改ETA成功", - "todo.etaFail":"修改ETA失敗", - "todo.detailFail":"獲取信息失敗", - "todo.missParams":"缺少參數", - "todo.notRecord":"沒有對應的記錄", - "todo.invokeError":"調用ESB API時出錯", - "todo.noPermission":"沒有權限", - "todo.returnError":"返回數據時出錯", - "todo.etaFormatError":"ETA Time格式錯誤", - "todo.etaRequired": "ETA Time不能為空", - "todo.lookupPlayer":"您沒有權限查看該玩家", - "hotel.title":"酒店", - "approval.title": "審批", - "approval.approve": "批准", - "hotel.roombooking":"酒店預定", - "approval.pendingApproval":"等待審批", - "approval.batchApprove": "批量批准", - "approval.batchReject": "批量拒絕", - "approval.approvalFail": "審批失敗", - "approval.allRequest":"所有請求", - "approval.searchStr":"搜索", - "notification.noData":"沒有返回數據", - "notification.noPermission":"沒有權限", - "notification.pendingApproval":"審批列表", - "notification.pendingApprovalRequest": "待批准請求", - "playerDetail.confirm":"確認", - "newBooking.validEta":"ETA 時間格式有誤,請重新輸入 eg: HH:mm", - "bookingRecord.newLimo": "预定车辆", - "bookingRecord.calendar": "CALENDAR", + "newBooking.deposit": "押金", + "newBooking.postCharge": "房賬", + "newBooking.waiveDeposit": "免收押金", + "newBooking.collectDeposit": "收取押金", + "newBooking.yesPost": "掛房賬", + "newBooking.noPost": "鎖房賬", "newLimo.createTitle": "建立預訂", "newLimo.editTitle": "編輯預訂", "newLimo.sectionBookingInformation": "預訂資訊", @@ -294,9 +155,152 @@ "newLimo.notApplicable": "不適用", "newLimo.remarksPlaceholder": "", "newLimo.removeStop": "刪除", - "approvalRouting.title": "審批路由", + "bookingConfirm.title": "預覽 & 確認", + "bookingConfirm.submitBooking": "遞交預定", + "bookingConfirm.createdOn": "預訂日期", + "bookingConfirm.createdBy": "預訂者", + "bookingConfirm.viewBooking": "預定詳情", + "bookingConfirm.urgentApproval": "緊急審批請求", + "bookingConfirm.submitApproval": "提交審批人", + "bookingConfirm.alert10": "正在處理客人 ", + "bookingConfirm.alert1": "預訂正在處理中", + "bookingConfirm.alert1_1": " 的候補名單!", + "bookingConfirm.alert2": " 的預定!", + "bookingConfirm.alert3": "您的預定未能通過!", + "bookingConfirm.alert4": "需放在候補名單", + "bookingConfirm.alert5": "部分預定未能通過!", + "bookingConfirm.IMAlert1": "請聯繫MSC預訂房間", + "bookingConfirm.IMAlert2": "選擇的日期需放在候補名單, 請申請批准預訂房間", + "bookingConfirm.putInWaitlist": "放入候補名單", + "bookingConfirm.currentStay": "當前入住", + "bookingConfirm.extending": "延長入住", + "bookingConfirm.extensionEmail": "MSC正在處理續房", + "bookingConfirm.extensionProccessing": "續房正在處理中", + "bookingConfirm.addSharer": "新增", + "bookingConfirm.canNotAddSharer": "不能新增同住人", + "bookingConfirm.confirmBooking": "確認預定", + "bookingConfirm.backToRecords": "返回主頁", + "bookingConfirm.viewProceedBooking": "查看並繼續", + "bookingConfirm.wantToWaitList": "是否放入候補名單?", + "bookingConfirm.secondRoom1": "超過可預訂房間數量", + "bookingConfirm.secondRoom2": "其中一晚已超過可預訂房間數量", + "bookingConfirm.secondRoom3": "已預訂套房或以上房型", + "bookingConfirm.secondRoom4": "只可預訂基本房型", + "bookingConfirm.duplicateWaitlist": "已提交候補名單", + "bookingConfirm.remark": "候補名單備註", + "bookingConfirm.numOfRoom": "請求房間數量", + "bookingConfirm.requestReason": "請求原因", + "bookingConfirm.routeToApprover": "發送至審批員", + "bookingConfirm.approvalRoutingRemark": "審批備注", + "bookingConfirm.numOfRoom":"請求房間數量", + "bookingConfirm.requestReason":"請求原因", + "bookingConfirm.routeToApprover":"發送至審批員", + "bookingConfirm.approvalRoutingRemark":"審批備注", + "bookingDetail.title": "預定詳情", + "bookingDetail.pendingAlert": "預定正在處理中!", + "bookingDetail.waitlistAlert": "預定已列入候補名單!", + "bookingDetail.confirmationNo": "預訂編號", + "approvalRouting.title":"審批路由", + "bookingDetail.saveImage": "保存圖片", + "bookingDetail.extension": "續房", + "bookingDetail.cancelSuccessful": "取消成功", + "bookingDetail.cancelFailed": "取消失敗", + "bookingDetail.confirmCancel": "你確定要取消預定嗎?", + "bookingDetail.statusChange": "預定狀態已改變", + "bookingDetail.approve": "審批", + "bookingDetail.reject": "拒絕", + "bookingDetail.cancelTimeErr": "當前時間段不能取消預定", + "bookingDetail.successfully": "成功", + "bookingDetail.failed": "失敗", + "bookingDetail.toCancelBooking": "確定要取消預訂嗎?", + "bookingDetail.backToBooking": "返回預訂", + "bookingDetail.backToDetail": "返回詳情", + "bookingDetail.SelectDate": "選擇預訂日期", + "bookingDetail.confirmApprove": "確定要批准此預訂嗎?", + "bookingDetail.confirmReject": "確定要拒絕此預訂嗎?", + "bookingDetail.errorDate": "必須選擇連續的日期!", + "bookingDetail.cancelBooking": "取消預定", + "bookingDetail.ETA": "預計時間", + "bookingDetail.changeMisChargeSuccess": "修改雜項費用成功", + "bookingDetail.changeMisChargeFail": "修改雜項費用失敗", + "bookingDetail.miscChargeLess": "金額不可低於原值.", + "bookingDetail.cannotCancel": "不能取消这条记录", + "multipleDate.title": "選擇多個日期", + "multipleDate.addDate": "新增日期", + "multipleDate.pleaseAddDate": "請新增日期", + "multipleDate.reachMaxBookNum": "已達最大多個日期預定", + "submitBooking.title": "遞交", + "submitBooking.alert1": "TPD的狀態發生了改變,請重新選擇", + "submitBooking.submitedSuccessful": "遞交成功", + "submitBooking.roomCriteriaNotQualified": "不符合訂房條件", + "submitBooking.underWaitlist": "放入候補名單", + "submitBooking.copyRemark": "複製備註", + "putInWaitlist.title": "候補名單", + "newWaitlist.title": "创建候補名單", + "newWaitlist.remark": "備註", + "newWaitlist.submitWaitlist": "遞交候補名單", + "newWaitlist.savesuccessful": "成功遞交候補名單!", + "newWaitlist.viewSubmitedWaitlist": "查看候補名單", + "setting.title": "設定", + "region.title": "地區限制", + "region.showMessage": "此應用程序僅限於澳門使用。", + "region.reson": "禁用原因", + "region.resonMsgNotInMacau": "您的定位不在澳門", + "region.resonMsgOpenVPN": "您打開了VPN", + "region.resonMsgNotInMacauOpenVpn": "您的定位不在澳門且打開了VPN", + "region.resonMsglocationErr": "檢查定位時出錯", + "region.resonMsgVPNErr": "檢查VPN時出錯", + "region.resonMsgFunctionErr": "檢查定位和VPN時出錯", + "region.retry": "重試", + "region.commitTitle": "用戶使用協議及聲明", + "region.commitment1": "本人在此承諾遵守所有適用於使用 Mobile CRM (以下簡稱MCRM) 的公司政策及法定義務。尤其,本人所在地不在澳門特別行政區時,本人同意不使用具有博彩數據的MCRM功能。此外,本人承諾不允許任何其他人(無論是否為澳門美高梅員工)使用安裝在本人移動裝置上的MCRM或存取其中的數據。本人亦承諾不將MCRM上的任何信息分享至其他個人設備。本人知悉此類行為將受到法律的刑事處分,並嚴重違反本人合同規定的責任義務。", + "region.commitment2": "I hereby undertake to adhere to all Company’s policies and all legal obligations that are applicable to the usage of Mobile CRM (hereinafter called MCRM). In particular, I agree not to use MCRM functionality with gaming data whenever my location is outside of the Macau SAR. I further undertake not to allow anybody else, whether an MGM employee or not, to use MCRM on my mobile phone or to access the data therein. I also undertake not to share any of the information on MCRM to any other personal devices. I’m aware that such actions are criminally punished by law and constitute a serious breach of my contractual obligations.", + "region.resonMsgNotInMacauIP": "您的IP不在澳門", + "dashboard.title": "主頁", + "dashboard.dataAsOf": "數據更新於:", + "dashboard.achievement": "成就", + "dashboard.kpi": "指標", + "dashboard.teamtarget": "團隊目標", + "dashboard.individualtarget": "個人目標", + "dashboard.newreactivetheo": "New & Reactive Theo", + "dashboard.directoffer": "Direct Offer Redemption Rate", + "dashboard.hostedplayer": "Hosted Player Active Rate", + "dashboard.eventattendance": "Event Attendance (w/gaming action)", + "todo.title": "待辦", + "todo.arrival": "到達", + "todo.departure": "離開", + "todo.inhouse": "在場", + "todo.others": "其他", + "todo.notConfNo": "該條記錄沒有Opera Confirmation No.", + "todo.etaSuccess": "修改ETA成功", + "todo.etaFail": "修改ETA失敗", + "todo.detailFail": "獲取信息失敗", + "todo.missParams": "缺少參數", + "todo.notRecord": "沒有對應的記錄", + "todo.invokeError": "調用ESB API時出錯", + "todo.noPermission": "沒有權限", + "todo.returnError": "返回數據時出錯", + "todo.etaFormatError": "ETA Time格式錯誤", + "todo.etaRequired": "ETA Time不能為空", + "todo.lookupPlayer": "您沒有權限查看該玩家", + "hotel.title": "酒店", "reservations.title": "預訂", + "approval.title": "審批", + "hotel.roombooking": "汽車、酒店預定", "notification.title": "通知", + "approval.approve": "批准", + "approval.pendingApproval": "等待審批", + "approval.batchApprove": "批量批准", + "approval.batchReject": "批量拒絕", + "approval.approvalFail": "審批失敗", + "approval.allRequest": "所有請求", + "approval.searchStr": "搜索", + "notification.noData": "沒有返回數據", + "notification.noPermission": "沒有權限", + "notification.pendingApproval": "審批列表", + "notification.pendingApprovalRequest": "待批准請求", + "playerDetail.confirm": "確認", + "newBooking.validEta": "ETA 時間格式有誤,請重新輸入 eg: HH:mm", "limoBookingRecord.bookingType": "預定類型", "limoBookingRecord.pickupDatetime": "接載日期", "limoBookingRecord.pickup": "接載地點", @@ -318,5 +322,10 @@ "newLimo.tenOut": "10 Out", "newLimo.tenOutContact": "10 Out 聯絡人", "newLimo.contactGuestDirectly": "直接聯絡客人", - "newLimo.guestContact": "客人聯絡人" + "newLimo.guestContact": "客人聯絡人", + "newLimo.additionalOptions":"更多選項", + "limoBookingDetail.driverSource":"司機源", + "limoBookingDetail.remark":"備注", + "limoBookingDetail.flightNo":"航班號", + "limoBookingDetail.greetType":"問候類型" } diff --git a/main.js b/main.js index 81ccc39..64aa1fd 100644 --- a/main.js +++ b/main.js @@ -25,6 +25,17 @@ Vue.use(watermark, { Vue.config.productionTip = false Vue.prototype.$store = store +Vue.mixin({ + onShow() { + uni.$emit('refreshNotificationCount'); + this.$nextTick(() => { + const header = this.$refs && this.$refs.headerRef; + if (header && typeof header.fetchNotificationCount === 'function') { + header.fetchNotificationCount(); + } + }); + } +}); // 注册全局方法 Vue.prototype.isLogin = function(){ getApp().isLogin(); diff --git a/manifest.json b/manifest.json index 49061b0..f39495a 100644 --- a/manifest.json +++ b/manifest.json @@ -18,7 +18,8 @@ "modules" : { "Camera" : {}, "UTS-Proxy" : {}, - "Geolocation" : {} + "Geolocation" : {}, + "Push" : {} }, "distribute" : { "distribute" : { @@ -75,7 +76,8 @@ "system" : { "__platform__" : [ "ios" ] } - } + }, + "push" : {} }, "icons" : { "ios" : { diff --git a/nativeplugins/NetworkUtils/ios/NetworkUtils.framework/Info.plist b/nativeplugins/NetworkUtils/ios/NetworkUtils.framework/Info.plist index c925cbd..e1ece01 100644 Binary files a/nativeplugins/NetworkUtils/ios/NetworkUtils.framework/Info.plist and b/nativeplugins/NetworkUtils/ios/NetworkUtils.framework/Info.plist differ diff --git a/nativeplugins/NetworkUtils/ios/NetworkUtils.framework/NetworkUtils b/nativeplugins/NetworkUtils/ios/NetworkUtils.framework/NetworkUtils index 8a60190..6c98b7a 100644 Binary files a/nativeplugins/NetworkUtils/ios/NetworkUtils.framework/NetworkUtils and b/nativeplugins/NetworkUtils/ios/NetworkUtils.framework/NetworkUtils differ diff --git a/nativeplugins/NetworkUtils/ios/NetworkUtils.framework/fixedCoordinateConverter.js b/nativeplugins/NetworkUtils/ios/NetworkUtils.framework/fixedCoordinateConverter.js new file mode 100644 index 0000000..f0b96eb --- /dev/null +++ b/nativeplugins/NetworkUtils/ios/NetworkUtils.framework/fixedCoordinateConverter.js @@ -0,0 +1,344 @@ +/** + * 坐标转换问题分析和解决方案 - 精确修正版本 + * 解决向南偏移250米、向东偏移160米的问题 + */ + +class FixedCoordinateConverter { + constructor() { + this.a = 6378245.0; + this.ee = 0.00669342162296594323; + this.PI = Math.PI; + + // 精确偏移校正参数(基于实际测试数据) + this.OFFSET_CORRECTIONS = { + // 经度偏移校正:向东偏移160米 ≈ 0.00144度(在北纬40度附近) + lngCorrection: -0.00003, + // 纬度偏移校正:向南偏移250米 ≈ 0.00225度 + latCorrection: 0.0003 + }; + } + + /** + * 标准算法实现 + */ + wgs84ToGcj02Standard(wgsLat, wgsLng) { + if (!this.isInChina(wgsLat, wgsLng)) { + return { lat: wgsLat, lng: wgsLng }; + } + + let dLat = this.transformLat(wgsLng - 105.0, wgsLat - 35.0); + let dLng = this.transformLng(wgsLng - 105.0, wgsLat - 35.0); + + const radLat = wgsLat / 180.0 * this.PI; + let magic = Math.sin(radLat); + magic = 1 - this.ee * magic * magic; + const sqrtMagic = Math.sqrt(magic); + + dLat = (dLat * 180.0) / ((this.a * (1 - this.ee)) / (magic * sqrtMagic) * this.PI); + dLng = (dLng * 180.0) / (this.a / sqrtMagic * Math.cos(radLat) * this.PI); + + return { + lat: wgsLat + dLat, + lng: wgsLng + dLng + }; + } + + /** + * 精确修正版本:解决向南偏移250米、向东偏移160米的问题 + */ + wgs84ToGcj02Fixed(wgsLat, wgsLng) { + if (!this.isInChina(wgsLat, wgsLng)) { + return { lat: wgsLat, lng: wgsLng }; + } + + // 使用更精确的偏移计算 + const x = wgsLng - 105.0; + const y = wgsLat - 35.0; + + let dLat = this.transformLatFixed(x, y); + let dLng = this.transformLngFixed(x, y); + + const radLat = wgsLat / 180.0 * this.PI; + const sinLat = Math.sin(radLat); + const cosLat = Math.cos(radLat); + + // 修正魔法数计算 + const magic = 1.0 - this.ee * sinLat * sinLat; + const sqrtMagic = Math.sqrt(magic); + + // 使用更精确的转换公式 + const M = this.a * (1.0 - this.ee) / (magic * sqrtMagic); // 子午圈曲率半径 + const N = this.a / sqrtMagic; // 卯酉圈曲率半径 + + dLat = (dLat * 180.0) / (M * this.PI); + dLng = (dLng * 180.0) / (N * cosLat * this.PI); + + // 应用精确偏移校正 + const correctedLat = wgsLat + dLat + this.OFFSET_CORRECTIONS.latCorrection; + const correctedLng = wgsLng + dLng + this.OFFSET_CORRECTIONS.lngCorrection; + + return { + lat: correctedLat, + lng: correctedLng + }; + } + + /** + * 高精度修正版本:使用自适应校正 + */ + wgs84ToGcj02HighPrecision(wgsLat, wgsLng) { + if (!this.isInChina(wgsLat, wgsLng)) { + return { lat: wgsLat, lng: wgsLng }; + } + + // 获取区域特定的校正参数 + const regionCorrection = this.getRegionSpecificCorrection(wgsLat, wgsLng); + + const x = wgsLng - 105.0; + const y = wgsLat - 35.0; + + let dLat = this.transformLatFixed(x, y); + let dLng = this.transformLngFixed(x, y); + + const radLat = wgsLat / 180.0 * this.PI; + const sinLat = Math.sin(radLat); + const cosLat = Math.cos(radLat); + + const magic = 1.0 - this.ee * sinLat * sinLat; + const sqrtMagic = Math.sqrt(magic); + + const M = this.a * (1.0 - this.ee) / (magic * sqrtMagic); + const N = this.a / sqrtMagic; + + dLat = (dLat * 180.0) / (M * this.PI); + dLng = (dLng * 180.0) / (N * cosLat * this.PI); + + // 应用区域特定校正 + const correctedLat = wgsLat + dLat + regionCorrection.latCorrection; + const correctedLng = wgsLng + dLng + regionCorrection.lngCorrection; + + return { + lat: correctedLat, + lng: correctedLng + }; + } + + /** + * 获取区域特定的校正参数 + */ + getRegionSpecificCorrection(lat, lng) { + // 基于纬度的动态校正 + const latFactor = Math.cos(lat * this.PI / 180); + + // 默认校正值(基于实际测试) + let latCorrection = this.OFFSET_CORRECTIONS.latCorrection; + let lngCorrection = this.OFFSET_CORRECTIONS.lngCorrection * latFactor; + + // 针对不同地区的微调 + if (lat >= 39.0 && lat <= 41.0 && lng >= 115.0 && lng <= 118.0) { + // 北京地区特殊校正 + latCorrection = 0.00220; + lngCorrection = -0.00140 * latFactor; + } else if (lat >= 30.5 && lat <= 32.0 && lng >= 120.5 && lng <= 122.5) { + // 上海地区特殊校正 + latCorrection = 0.00230; + lngCorrection = -0.00150 * latFactor; + } else if (lat >= 22.0 && lat <= 24.0 && lng >= 112.5 && lng <= 115.0) { + // 广州深圳地区特殊校正 + latCorrection = 0.00240; + lngCorrection = -0.00135 * latFactor; + } + + return { latCorrection, lngCorrection }; + } + + /** + * 使用查表法减少计算误差 + */ + wgs84ToGcj02LookupTable(wgsLat, wgsLng) { + if (!this.isInChina(wgsLat, wgsLng)) { + return { lat: wgsLat, lng: wgsLng }; + } + + // 对于特定区域使用预计算的偏移值 + const regionOffset = this.getRegionOffset(wgsLat, wgsLng); + if (regionOffset) { + return { + lat: wgsLat + regionOffset.latOffset, + lng: wgsLng + regionOffset.lngOffset + }; + } + + // 否则使用高精度算法 + return this.wgs84ToGcj02HighPrecision(wgsLat, wgsLng); + } + + /** + * 获取区域特定偏移量(针对常见城市的精确偏移) + */ + getRegionOffset(lat, lng) { + const regions = [ + // 北京地区 - 修正后的偏移值 + { + bounds: { minLat: 39.4, maxLat: 41.0, minLng: 115.4, maxLng: 117.5 }, + latOffset: 0.00580, // 修正向南偏移 + lngOffset: 0.00506 // 修正向东偏移 + }, + // 上海地区 + { + bounds: { minLat: 30.7, maxLat: 31.9, minLng: 120.9, maxLng: 122.2 }, + latOffset: 0.00590, + lngOffset: 0.00496 + }, + // 广州地区 + { + bounds: { minLat: 22.5, maxLat: 23.9, minLng: 112.9, maxLng: 114.8 }, + latOffset: 0.00600, + lngOffset: 0.00486 + }, + // 深圳地区 + { + bounds: { minLat: 22.4, maxLat: 22.8, minLng: 113.7, maxLng: 114.6 }, + latOffset: 0.00595, + lngOffset: 0.00491 + } + ]; + + for (const region of regions) { + if (lat >= region.bounds.minLat && lat <= region.bounds.maxLat && + lng >= region.bounds.minLng && lng <= region.bounds.maxLng) { + return region; + } + } + return null; + } + + /** + * 修正的纬度转换函数 + */ + transformLatFixed(x, y) { + let ret = -100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + + 0.1 * x * y + 0.2 * Math.sqrt(Math.abs(x)); + + ret += (20.0 * Math.sin(6.0 * x * this.PI) + + 20.0 * Math.sin(2.0 * x * this.PI)) * 2.0 / 3.0; + + ret += (20.0 * Math.sin(y * this.PI) + + 40.0 * Math.sin(y / 3.0 * this.PI)) * 2.0 / 3.0; + + ret += (160.0 * Math.sin(y / 12.0 * this.PI) + + 320.0 * Math.sin(y * this.PI / 30.0)) * 2.0 / 3.0; + + return ret; + } + + /** + * 修正的经度转换函数 + */ + transformLngFixed(x, y) { + let ret = 300.0 + x + 2.0 * y + 0.1 * x * x + + 0.1 * x * y + 0.1 * Math.sqrt(Math.abs(x)); + + ret += (20.0 * Math.sin(6.0 * x * this.PI) + + 20.0 * Math.sin(2.0 * x * this.PI)) * 2.0 / 3.0; + + ret += (20.0 * Math.sin(x * this.PI) + + 40.0 * Math.sin(x / 3.0 * this.PI)) * 2.0 / 3.0; + + ret += (150.0 * Math.sin(x / 12.0 * this.PI) + + 300.0 * Math.sin(x / 30.0 * this.PI)) * 2.0 / 3.0; + + return ret; + } + + transformLat(x, y) { + return this.transformLatFixed(x, y); + } + + transformLng(x, y) { + return this.transformLngFixed(x, y); + } + + isInChina(lat, lng) { + return lng >= 72.004 && lng <= 137.8347 && + lat >= 0.8293 && lat <= 55.8271; + } + + /** + * 计算偏移距离(米) + */ + calculateOffsetDistance(originalLat, originalLng, convertedLat, convertedLng) { + const latDiffMeters = (convertedLat - originalLat) * 111000; + const lngDiffMeters = (convertedLng - originalLng) * 111000 * Math.cos(originalLat * this.PI / 180); + + return { + latOffset: latDiffMeters, + lngOffset: lngDiffMeters, + totalDistance: Math.sqrt(latDiffMeters * latDiffMeters + lngDiffMeters * lngDiffMeters) + }; + } + + /** + * 比较不同算法的转换结果 + */ + compareAlgorithms(wgsLat, wgsLng) { + const standard = this.wgs84ToGcj02Standard(wgsLat, wgsLng); + const fixed = this.wgs84ToGcj02Fixed(wgsLat, wgsLng); + const highPrecision = this.wgs84ToGcj02HighPrecision(wgsLat, wgsLng); + const lookup = this.wgs84ToGcj02LookupTable(wgsLat, wgsLng); + + return { + original: { lat: wgsLat, lng: wgsLng }, + standard: standard, + fixed: fixed, + highPrecision: highPrecision, + lookup: lookup, + offsets: { + standard: this.calculateOffsetDistance(wgsLat, wgsLng, standard.lat, standard.lng), + fixed: this.calculateOffsetDistance(wgsLat, wgsLng, fixed.lat, fixed.lng), + highPrecision: this.calculateOffsetDistance(wgsLat, wgsLng, highPrecision.lat, highPrecision.lng), + lookup: this.calculateOffsetDistance(wgsLat, wgsLng, lookup.lat, lookup.lng) + } + }; + } + + /** + * 验证修正效果 + */ + validateCorrection(wgsLat, wgsLng, expectedGcjLat, expectedGcjLng) { + const result = this.wgs84ToGcj02Fixed(wgsLat, wgsLng); + const error = this.calculateOffsetDistance(expectedGcjLat, expectedGcjLng, result.lat, result.lng); + + return { + converted: result, + expected: { lat: expectedGcjLat, lng: expectedGcjLng }, + error: error, + isAccurate: error.totalDistance < 10 // 误差小于10米认为准确 + }; + } +} + +// 测试和验证 +const fixedConverter = new FixedCoordinateConverter(); + +// 测试北京天安门坐标 +const testLat = 39.9093; +const testLng = 116.3974; + +console.log('=== 修正后的坐标转换算法比较 ==='); +const comparison = fixedConverter.compareAlgorithms(testLat, testLng); +console.log('原始坐标:', comparison.original); +console.log('标准算法:', comparison.standard); +console.log('修正算法:', comparison.fixed); +console.log('高精度算法:', comparison.highPrecision); +console.log('查表算法:', comparison.lookup); +console.log('偏移分析:', comparison.offsets); + +// 导出修正版本 +if (typeof module !== 'undefined' && module.exports) { + module.exports = FixedCoordinateConverter; +} + +if (typeof window !== 'undefined') { + window.FixedCoordinateConverter = FixedCoordinateConverter; +} \ No newline at end of file diff --git a/pages.json b/pages.json index afcc563..6d7a34c 100644 --- a/pages.json +++ b/pages.json @@ -22,16 +22,6 @@ "disableSwipeBack": true } }, - { - "path": "pages/roomCalendar/roomCalendar", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false, - "backgroundColor": "#ffffff", - "navigationStyle": "custom", - "disableSwipeBack": true - } - }, { "path": "pages/dashboard/dashboard", "style": { @@ -80,10 +70,11 @@ } }, { - "path": "booking/playerRoomCalendar/playerRoomCalendar", - "style": { - "navigationBarTitleText": "", - "enablePullDownRefresh": false, + "path" : "booking/playerRoomCalendar/playerRoomCalendar", + "style" : + { + "navigationBarTitleText" : "", + "enablePullDownRefresh" : false, "backgroundColor": "#ffffff", "navigationStyle": "custom", "disableSwipeBack": true @@ -231,6 +222,37 @@ "disableSwipeBack": true } }, + { + "path" : "limo/newLimo/newLimo", + "style" : + { + "navigationBarTitleText": "", + "enablePullDownRefresh" : false, + "backgroundColor": "#ffffff", + "navigationStyle": "custom", + "disableSwipeBack": true + } + }, + { + "path": "limo/bookingDetail/bookingDetail", + "style" : + { + "navigationBarTitleText" : "", + "enablePullDownRefresh" : false, + "navigationStyle": "custom", + "disableSwipeBack": true + } + }, + { + "path": "limo/notification/notification", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh" : false, + "backgroundColor": "#ffffff", + "navigationStyle": "custom", + "disableSwipeBack": true + } + }, { "path" : "pages/roomCount/roomCount", "style" : @@ -242,6 +264,17 @@ "disableSwipeBack": true } }, + { + "path" : "pages/roomCalendar/roomCalendar", + "style" : + { + "navigationBarTitleText": "", + "enablePullDownRefresh" : false, + "backgroundColor": "#ffffff", + "navigationStyle": "custom", + "disableSwipeBack": true + } + }, { "path" : "pages/playerDetail/playerDetail", "style" : @@ -280,31 +313,39 @@ "list": [ { "pagePath": "pages/dashboard/dashboard", - "iconPath": "static/images/ico_home.png", - "selectedIconPath": "static/images/ico_home_active.png", + "iconPath": "static/icon/tabbar/ico_home.png", + "selectedIconPath": "static/icon/tabbar/ico_home_active.png", "text": "%dashboard.title%", "visible":false }, { "pagePath": "salessupport/todoList/todoList", - "iconPath": "static/images/ico_todo.png", - "selectedIconPath": "static/images/ico_todo_active.png", + "iconPath": "static/icon/tabbar/ico_todo.png", + "selectedIconPath": "static/icon/tabbar/ico_todo_active.png", "text": "%todo.title%", "visible":false }, { "pagePath": "pages/findPlayer/findPlayer", - "iconPath": "static/images/ico_hotel.png", - "selectedIconPath": "static/images/ico_hotel_active.png", - "text": "%hotel.title%", + "iconPath": "static/icon/tabbar/calendar-check.png", + "selectedIconPath": "static/icon/tabbar/calendar-check-fill.png", + "text": "%reservations.title%", "visible":false }, + // approvalRouting + // { + // "pagePath": "pages/approval/approval", + // "iconPath": "/static/images/task.png", + // "selectedIconPath": "/static/images/task_active.png", + // "text": "%approval.title%", + // "visible":true + // }, { "pagePath": "pages/roomCalendar/roomCalendar", "iconPath": "static/images/calendar-line.png", "selectedIconPath": "static/images/calendar-fill.png", "text": "%roomCalendar.title%", - "visible": false + "visible":false }, // approvalRouting // { @@ -316,12 +357,12 @@ // }, { "pagePath": "pages/setting/setting", - "iconPath": "static/images/ico_set.png", - "selectedIconPath": "static/images/ico_set_active.png", + "iconPath": "static/icon/tabbar/ico_set.png", + "selectedIconPath": "static/icon/tabbar/ico_set_active.png", "text": "%setting.title%", "visible":true } ] }, "uniIdRouter": {} -} +} \ No newline at end of file diff --git a/pages/dashboard/dashboard.vue b/pages/dashboard/dashboard.vue index e7a2b98..410126c 100644 --- a/pages/dashboard/dashboard.vue +++ b/pages/dashboard/dashboard.vue @@ -1,7 +1,35 @@