This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function RadioOption(props) { | |
return ( | |
<label> | |
<input type="radio" value={props.value} name={props.name} /> | |
{props.label} | |
</label> | |
) | |
} | |
function renderChildren(props) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var subItems = Array.from(document.querySelectorAll('.sub-item')) | |
subItems.forEach((item) => { | |
item.onclick = function() { | |
var classList = this.classList | |
if (classList.contains('animation-open')) { | |
classList.remove('animation-open') | |
} else { | |
classList.add('animation-open') | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
const test = Vue.component('test', { | |
props: ['msg'], | |
template:'<div><p>{{msg}}</p><slot name="action">xx</slot></div>' | |
}) | |
new Vue({ | |
el: '#app', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function daysInMonth (year, month) { | |
return /8|3|5|10/.test(month) ? 30 : month === 1 ? (!(year % 4) && year % 100) || !(year % 400) ? 29 : 28 : 31 | |
} | |
function formatDate (date, format, translation) { | |
translation = (!translation) ? en : translation | |
let year = date.getFullYear() | |
let month = date.getMonth() + 1 | |
let day = date.getDate() | |
let str = format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"messageActionDetails": { | |
"messageFunctionDetails": { | |
"messageFunction": "183", | |
"additionalMessageFunction": "M1" | |
} | |
}, | |
"itineraryDetails": { | |
"originDestinationDetails": { | |
"origin": "YVR", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.content-box { | |
width:200px; | |
height: 200px; | |
box-sizing: content-box; | |
padding: 10px; | |
border: 10px solid #f46; | |
margin: 10px; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"numberOfPax":{"segmentControlDetails":{"quantity":"1","numberOfUnits":"1"}},"passengersID":[{"travellerDetails":{"measurementValue":"1"}}],"fareInfoGroup":{"emptySegment":null,"pricingIndicators":{"priceTariffType":"I","productDateTimeDetails":{"departureDate":"180818"},"companyDetails":{"otherCompany":"EY"}},"fareAmount":{"monetaryDetails":{"typeQualifier":"B","amount":"3140","currency":"AED"},"otherMonetaryDetails":[{"typeQualifier":"E","amount":"1123.00","currency":"CAD"},{"typeQualifier":"712","amount":"1537.03","currency":"CAD"}]},"textData":[{"freeTextQualification":{"textSubjectQualifier":"4","informationType":"15"},"freeText":"18AUG18AUH EY NYC Q2.50Q40.84 811.38NUC854.72END ROE3.672750"},{"freeTextQualification":{"textSubjectQualifier":"1","informationType":"1P3"},"freeText":"PENALTY APPLIES"},{"freeTextQualification":{"textSubjectQualifier":"1","informationType":"10"},"freeText":"NON ENDO/ REF -BG:EY"},{"freeTextQualification":{"textSubjectQualifier":"1","informationType":"1A49"},"freeText":"- DA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async drawActivityPoster() { | |
const {windowWidth} = wx.getSystemInfoSync() | |
const width = windowWidth * 80 / 100 | |
const ctx = wx.createCanvasContext('poster') | |
this.drawText({ | |
text: '我的店铺', | |
ctx :ctx, | |
x: 0, | |
y: 100, | |
fontSize: 14, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void function(){ | |
var Base64 = { | |
// private property | |
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", | |
// public method for encoding | |
encode : function (input) { | |
var output = ""; | |
var chr1, chr2, chr3, enc1, enc2, enc3, enc4; | |
var i = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createSoapClient, createSoapHeader } from '../lib/amadeus' | |
import { writeJson, requestXml, requestJson } from '../util/apiJson' | |
import OrderService from '../service/order' | |
import { getPayAmount } from '../service/flights/getPayAmount' | |
import Str from '../db/redis/str' | |
exports.PNRAddMultiElements = async function (req, res) { | |
const data = req.body | |
const searchInput = buildQuery(data) | |
const validate = validateAge(data) |