1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215 |
- <script setup>
- import {
- ref,
- reactive,
- onMounted,
- watch,
- nextTick,
- onBeforeUnmount,
- } from "vue";
- import { useRoute, useRouter } from "vue-router";
- // VR
- import "aframe";
- // i18n
- import { useI18n } from "vue-i18n";
- // Axios
- import axios from "axios";
- // Moment
- import moment from "moment";
- // Animate
- import "animate.css";
- // Swiper
- import { Swiper, SwiperSlide } from "swiper/vue";
- import { Navigation, Autoplay } from "swiper/modules";
- import "swiper/css";
- import "swiper/css/navigation";
- // Recorder
- import Recorder from "recorder-core";
- import "recorder-core/src/engine/mp3";
- import "recorder-core/src/engine/mp3-engine";
- // QR Code
- import { QrcodeStream, QrcodeDropZone, QrcodeCapture } from "vue-qrcode-reader";
- // Video.js
- // import videojs from "video.js";
- // import "video.js/dist/video-js.css";
- // import "videojs-vr/dist/videojs-vr.css";
- // import "videojs-vr"; // 確保正確引入 VR 插件
- // Components
- import Navbar from "../components/Navbar.vue";
- import TicketPurchase from "../components/TicketPurchase.vue";
- const { t, locale } = useI18n();
- const route = useRoute();
- const router = useRouter();
- const routeParam = ref(null);
- let qrCodeDialog = ref(false);
- let qrCodeLoading = ref(true);
- let location = ref(""); // 當前位置
- // QR Code 掃描
- function onDetect(detectedCodes) {
- console.log("detectedCodes", detectedCodes);
- const url = new URL(detectedCodes[0].rawValue);
- location.value = url.searchParams.get("location");
- let val;
- let lang = getLang();
- if (lang === "en") {
- switch (location.value) {
- case "B1 鼎泰豐":
- val = "b1 Din Tai Fung";
- break;
- case "B1 中環":
- val = "b1 Centre";
- break;
- case "B1 2號電梯":
- val = "b1 Elevator No.2";
- break;
- case "B1 4號電梯":
- val = "b1 Elevator No.4";
- break;
- case "B1 3號電梯":
- val = "b1 Elevator No.3";
- break;
- case "1F 信義環":
- val = "1f South Xinyi";
- break;
- case "1F 3號電梯":
- val = "1f Elevator No.3";
- break;
- case "2F 3號電梯":
- val = "2f Elevator No.3";
- break;
- case "88F 觀景台":
- val = "88f Observatory";
- break;
- case "89F 觀景台":
- val = "89f Observatory";
- break;
- default:
- break;
- }
- } else if (lang === "ch") {
- val = location.value;
- }
- if (location.value && location.value !== "") {
- qrCodeDialog.value = false;
- messages.value.push({
- label: "text",
- author: "ai",
- body: `${t("current_location")}:${val}`,
- });
- changeLocation(location.value); // 選擇導覽位置
- } else {
- qrCodeDialog.value = false;
- messages.value.push({
- label: "text",
- author: "ai",
- body: "讀取錯誤,請重新掃描。",
- });
- }
- }
- // 判斷 vue-qrcode-reader 是否加載完成
- function onInit(capabilities) {
- qrCodeLoading.value = false;
- }
- onMounted(() => {
- // 取得當前路由參數
- routeParam.value = route.path.replace("/", "");
- console.log("網址參數", routeParam.value);
- window.addEventListener("resize", handleResize);
- });
- const userMessage = ref("");
- let modules = [Navigation, Autoplay]; // Swiper
- // AI 客服回覆訊息
- let messages = ref([]);
- watch(messages.value, (val) => {
- console.log("messages", val);
- scrollToBottom();
- updateMenuHeight();
- });
- let ad = ref({}); // 彈跳視窗廣告
- let qaQuery = reactive([]);
- const chatArea = ref(null); // 對話框
- // 滾動到對話框底部
- const scrollToBottom = () => {
- setTimeout(() => {
- // chatArea.value.scrollTop = chatArea.value.scrollHeight;
- window.scrollTo({
- top: document.body.scrollHeight,
- behavior: "smooth", // 平滑滾動
- });
- }, 100);
- // let list = messages.value;
- // const item = list[list.length - 1];
- // if (item.label === "text") {
- // setTimeout(() => {
- // chatArea.value.scrollTop = chatArea.value.scrollHeight;
- // }, 100);
- // }
- };
- // 對話選項(按鈕)
- function setBtnValue(val) {
- console.log("value", val);
- userMessage.value = val;
- sendMessage("text");
- }
- // 傳送訊息 (如 type="text" 代表為純文字訊息,不需語音回覆)
- async function sendMessage(type = "") {
- if (userMessage.value === "") {
- return;
- }
- console.log("sendMessage", userMessage.value);
- qaQuery.push(userMessage.value);
- let url = "https://api.itri-101-5g.com/v1/qa/";
- try {
- // 使用者訊息
- messages.value.push({
- label: "text",
- body: userMessage.value,
- author: "user",
- });
- userMessage.value = "";
- // hideMenu.value = true;
- axios
- .post(
- url,
- new URLSearchParams({
- query: JSON.stringify(qaQuery), // 使用者問句
- language: selectLang.value, // 語系
- category: assignCategory.value, // 類別
- subtype: assignSubtype.value, // 詳細類別(非必填)
- from_loc: "", // 定位點
- to_loc: "", // 導覽點
- }),
- {
- headers: {
- "Content-Type": "application/x-www-form-urlencoded",
- },
- }
- )
- .then((response) => {
- // if (showAnchor.value) {
- // getVideo(response.data);
- // }
- // AI 客服回傳訊息
- messages.value.push({
- label: "text",
- author: "ai",
- body: response.data.response,
- });
- console.log("response", response);
- if (type !== "text") {
- handleTTS(response.data.response); // 取得語音回覆
- }
- if (response.data.data.length) {
- let info = {
- buttonList: [], // 按鈕
- ticketList: [], // 票券
- };
- let labelContent;
- response.data.data.map((item) => {
- if (item.type === "button") {
- console.log("按鈕");
- info.buttonList.push(item);
- labelContent = "ticket";
- } else if (item.type === "ticket") {
- console.log("票");
- info.ticketList.push(item);
- labelContent = "ticket";
- } else if (item.type === "brand") {
- console.log("品牌");
- info.ticketList.push(item);
- labelContent = "brand";
- } else if (
- item.type === "lost_property" ||
- item.type === "complain"
- ) {
- contactFormType.value = item.type;
- labelContent = "contact-form";
- console.log("contactFormType", contactFormType.value);
- }
- });
- console.log("info", info);
- console.log("labelContent", labelContent);
- setTimeout(() => {
- if (labelContent !== "contact-form") {
- messages.value.push({
- label: labelContent,
- author: "ai",
- body: info,
- });
- } else {
- messages.value.push({
- label: "contact-form",
- author: "ai",
- body: "",
- });
- }
- }, 10);
- }
- })
- .catch((error) => {
- console.error("Error:", error);
- });
- console.log("messages.value", messages.value);
- } catch (error) {
- console.log("error", error);
- }
- }
- // let isTTSVideo = ref(false); // API 是否回傳影片
- // let ttsVideo = ref(null); // 影片 dom
- // let ttsVideoSrc = ref(""); // 影片路徑
- // let videoPause = ref(false); // 暫停按鈕
- let hideMenu = ref(false); // 底部選單
- let showInput = ref(false); // 輸入框
- // 取得 mp4
- // async function getVideo(data) {
- // console.log("getVideo data", data);
- // // let url = `https://cmm.ai:9101/tts?message=${data.response}&type=101`;
- // let url = `https://cmm.ai:9001/tts?message=${data.response}&type=101`;
- // try {
- // const response = await axios.post(url);
- // console.log("response", response);
- // if (response.status === 200) {
- // video.value.pause();
- // videoPause.value = false;
- // // ttsVideoSrc.value = `https://cmm.ai:9101/${response.data.url}`;
- // // ttsVideoSrc.value = `https://cmm.ai:9001/${response.data.url}`;
- // ttsVideoSrc.value = response.data.url;
- // await ttsVideo.value.load();
- // await ttsVideo.value.play();
- // // AI 客服回傳訊息
- // // messages.value.splice(-1, 1);
- // messages.value.push({
- // type: data.type,
- // body: data.response,
- // author: data.author,
- // });
- // // isTTSVideo.value = true;
- // // 判斷影片是否結束
- // const videoPromise = new Promise((resolve, reject) => {
- // ttsVideo.value.onended = () => resolve(true);
- // });
- // const videoCompleted = await videoPromise; // 影片結束
- // if (videoCompleted) {
- // console.log("影片結束");
- // // isTTSVideo.value = false; // 切換為初始影片
- // hideAnchorPrologue.value = false; // 切換開場白影片
- // }
- // console.log("videoCompleted", videoCompleted);
- // }
- // } catch (error) {
- // console.log("error", error);
- // }
- // }
- // 影片暫停/播放
- // function handleVideo(isTTS) {
- // if (videoPause.value) {
- // if (isTTS) {
- // ttsVideo.value.play();
- // } else {
- // video.value.play();
- // }
- // videoPause.value = false;
- // } else {
- // if (isTTS) {
- // ttsVideo.value.pause();
- // } else {
- // video.value.pause();
- // }
- // videoPause.value = true;
- // }
- // }
- function getLang() {
- let lang = localStorage.getItem("lang");
- let langVal = "";
- switch (lang) {
- case "zh-tw":
- langVal = "ch";
- break;
- case "en-us":
- langVal = "en";
- break;
- default:
- break;
- }
- return langVal;
- }
- let showAd = ref(false);
- // 取得廣告
- async function setAd() {
- let lang = getLang();
- console.log("lang", lang);
- let url = `https://cmm.ai:9101/ad?language=${lang}`;
- try {
- const response = await axios.get(url);
- console.log("Ad response", response);
- ad.value = response.data.data.body;
- console.log("Ad", ad.value);
- } catch (error) {
- console.log("error", error);
- }
- }
- let video = ref(null);
- function videoPlay() {
- video.value.load();
- video.value.play();
- }
- // 底部選單
- const menu = ref(null);
- const menuHeight = ref(0);
- // let isRotate = ref(false);
- let isLanguagePage = ref(true);
- let selectLang = ref("");
- let chatLoading = ref(true);
- watch(isLanguagePage, (val) => {
- if (!val) {
- setTimeout(updateMenuHeight, 500);
- }
- });
- const handleResize = () => {
- updateMenuHeight();
- };
- // 取得底部選單高度
- const updateMenuHeight = () => {
- nextTick(() => {
- if (menu.value) {
- menuHeight.value = menu.value.clientHeight;
- chatLoading.value = false;
- }
- });
- };
- function chooseLang(lang) {
- console.log("選擇語言:", lang);
- selectLang.value = lang;
- isLanguagePage.value = false;
- locale.value = lang; // i18n locale
- localStorage.setItem("lang", lang);
- messages.value.push({
- label: "text",
- author: "ai",
- body: t("prologue"),
- });
- messages.value.push({
- label: "text",
- author: "ai",
- body: t("service"),
- });
- // 判斷語言修改 title
- const language = localStorage.getItem("lang") || "zh-tw";
- console.log("language", language);
- if (language === "zh-tw") {
- document.title = "New 台北101 AI智能客服";
- } else if (language === "en-us") {
- document.title = "New Taipei 101 AI Intelligent Customer Service";
- }
- setAd();
- handleClick();
- console.log(" messages.value", messages.value);
- setTimeout(() => {
- showAd.value = true;
- // videoPlay();
- }, 500);
- }
- let assignSubtype = ref("");
- let assignCategory = ref("");
- let assignCategoryIndex = ref(null);
- // 美食伴手禮
- let diningList = reactive([
- {
- value: "特色/高空餐廳",
- text: "food_souvenirs_info.signature",
- },
- {
- value: "輕食/CAFÉ",
- text: "food_souvenirs_info.light",
- },
- {
- value: "美食街",
- text: "food_souvenirs_info.courts",
- },
- {
- value: "伴手禮",
- text: "food_souvenirs_info.souvenir",
- },
- ]);
- // 秘境花園觀景台
- let observationList = reactive([
- {
- value: "線上購票",
- text: "observatory_info.tickets.title",
- },
- {
- value: "參觀資訊",
- text: "observatory_info.visitor.title",
- },
- // {
- // value: "實境景色",
- // text: "observatory_info.view",
- // },
- {
- value: "前往秘境花園觀景台",
- text: "observatory_info.garden",
- },
- ]);
- // 購物及優惠
- let shoppingList = reactive([
- {
- value: "購物品牌查詢",
- text: "shopping_discounts_info.brands.title",
- },
- {
- value: "國際貴賓卡專屬禮遇",
- text: "shopping_discounts_info.tourist_card.title",
- },
- ]);
- // 購物品牌查詢
- let brandList = reactive([
- {
- value: "國際珠寶腕錶",
- text: "shopping_discounts_info.brands.jewely",
- },
- {
- value: "國際精品",
- text: "shopping_discounts_info.brands.boutique",
- },
- {
- value: "美妝保養品",
- text: "shopping_discounts_info.brands.skincare",
- },
- {
- value: "流行服飾",
- text: "shopping_discounts_info.brands.apparel",
- },
- {
- value: "生活居家/3C",
- text: "shopping_discounts_info.brands.lifestyle",
- },
- {
- value: "文化創意",
- text: "shopping_discounts_info.brands.cultural",
- },
- {
- value: "特色品牌",
- text: "shopping_discounts_info.brands.signature",
- },
- {
- value: "館外店家",
- text: "shopping_discounts_info.brands.outside",
- },
- ]);
- // 服務資訊
- let serviceList = reactive([
- {
- title: "service_info.business_hours",
- depiction: "service_info.business_hours_1",
- },
- {
- title: "service_info.tax_refund",
- depiction: "service_info.tax_refund_1",
- },
- {
- title: "service_info.toilets",
- depiction: "service_info.toilets_1",
- },
- {
- title: "service_info.charge",
- depiction: "service_info.charge_1",
- },
- // {
- // title: "AI 天燈",
- // depiction: "https://cmm.ai/101-postcard/#/skylanternhome",
- // },
- ]);
- // 定位點
- let locationList = reactive([
- {
- location: "B1 鼎泰豐", // 編號 1
- navigation: [
- {
- value: "景觀餐廳櫃台",
- text: "high_rise_restaurant_reception",
- },
- {
- value: "ATM",
- text: "atm",
- },
- {
- value: "觀景台售票處",
- text: "observatory_ticket_office",
- },
- {
- value: "鼎泰豐",
- text: "din_tai_fung",
- },
- {
- value: "捷運",
- text: "metro_station",
- },
- {
- value: "超市",
- text: "supermarket",
- },
- {
- value: "美食街",
- text: "food_court",
- },
- {
- value: "退稅/外幣兌換櫃台",
- text: "tax_refund_currency_exchange",
- },
- {
- value: "計程車乘車處",
- text: "taxi_station",
- },
- {
- value: "無障礙廁所",
- text: "accessible_facilities",
- },
- {
- value: "客服(停車折抵)",
- text: "service_counter_parking_discount",
- },
- {
- value: "哺乳室",
- text: "nursing_room",
- },
- {
- value: "飲水機",
- text: "ice_warmed_water_dispenser",
- },
- {
- value: "伴手禮區",
- text: "snackable_souvenirs",
- },
- {
- value: "廁所",
- text: "restroom",
- },
- {
- value: "置物櫃",
- text: "items_and_luggage_storage",
- },
- ],
- // navigation: [
- // "景觀餐廳櫃台",
- // "ATM",
- // "觀景台售票處",
- // "鼎泰豐",
- // "捷運",
- // "超市",
- // "美食街",
- // "退稅/外幣兌換櫃台",
- // "計程車乘車處",
- // "無障礙廁所",
- // "客服(停車折抵)",
- // "哺乳室",
- // "飲水機",
- // "伴手禮區",
- // "廁所",
- // "置物櫃",
- // ],
- },
- {
- location: "B1 中環", // 編號 2
- navigation: [
- {
- value: "景觀餐廳櫃台",
- text: "high_rise_restaurant_reception",
- },
- {
- value: "ATM",
- text: "atm",
- },
- {
- value: "觀景台售票處",
- text: "observatory_ticket_office",
- },
- {
- value: "美食街",
- text: "food_court",
- },
- {
- value: "伴手禮區",
- text: "snackable_souvenirs",
- },
- {
- value: "鼎泰豐",
- text: "din_tai_fung",
- },
- {
- value: "捷運",
- text: "metro_station",
- },
- {
- value: "超市",
- text: "supermarket",
- },
- {
- value: "計程車乘車處",
- text: "taxi_station",
- },
- {
- value: "無障礙廁所",
- text: "accessible_facilities",
- },
- ],
- // navigation: [
- // "景觀餐廳櫃台",
- // "ATM",
- // "觀景台售票處",
- // "美食街",
- // "伴手禮區",
- // "鼎泰豐",
- // "捷運",
- // "超市",
- // "計程車乘車處",
- // "無障礙廁所",
- // ],
- },
- {
- location: "B1 2號電梯", // 編號 3
- navigation: [
- {
- value: "景觀餐廳櫃台",
- text: "high_rise_restaurant_reception",
- },
- {
- value: "ATM",
- text: "atm",
- },
- {
- value: "觀景台售票處",
- text: "observatory_ticket_office",
- },
- {
- value: "客服(退稅櫃台/外幣兌換)",
- text: "tax_refund_currency_exchange",
- },
- {
- value: "計程車乘車處",
- text: "taxi_station",
- },
- {
- value: "無障礙廁所",
- text: "accessible_facilities",
- },
- {
- value: "超市",
- text: "supermarket",
- },
- {
- value: "鼎泰豐",
- text: "din_tai_fung",
- },
- {
- value: "捷運",
- text: "metro_station",
- },
- {
- value: "伴手禮區",
- text: "snackable_souvenirs",
- },
- {
- value: "廁所",
- text: "restroom",
- },
- {
- value: "置物櫃",
- text: "items_and_luggage_storage",
- },
- {
- value: "美食街",
- text: "food_court",
- },
- {
- value: "客服(停車折抵)",
- text: "service_counter_parking_discount",
- },
- {
- value: "哺乳室",
- text: "nursing_room",
- },
- {
- value: "飲水機",
- text: "ice_warmed_water_dispenser",
- },
- {
- value: "廁所",
- text: "restroom",
- },
- ],
- // navigation: [
- // "景觀餐廳櫃台",
- // "ATM",
- // "觀景台售票處",
- // "客服(退稅櫃台/外幣兌換)",
- // "計程車乘車處",
- // "無障礙廁所",
- // "超市",
- // "鼎泰豐",
- // "捷運",
- // "伴手禮區",
- // "廁所",
- // "置物櫃",
- // "美食街",
- // "客服(停車折抵)",
- // "哺乳室",
- // "飲水機",
- // "廁所",
- // ],
- },
- {
- location: "B1 4號電梯", // 編號 4
- navigation: [
- {
- value: "景觀餐廳櫃台",
- text: "high_rise_restaurant_reception",
- },
- {
- value: "ATM",
- text: "atm",
- },
- {
- value: "觀景台售票處",
- text: "observatory_ticket_office",
- },
- {
- value: "廁所",
- text: "restroom",
- },
- {
- value: "置物櫃",
- text: "items_and_luggage_storage",
- },
- {
- value: "客服(停車折抵)",
- text: "service_counter_parking_discount",
- },
- {
- value: "哺乳室",
- text: "nursing_room",
- },
- {
- value: "飲水機",
- text: "ice_warmed_water_dispenser",
- },
- {
- value: "退稅/外幣兌換櫃台",
- text: "tax_refund_currency_exchange",
- },
- {
- value: "計程車乘車處",
- text: "taxi_station",
- },
- {
- value: "無障礙廁所",
- text: "accessible_facilities",
- },
- {
- value: "伴手禮區",
- text: "snackable_souvenirs",
- },
- {
- value: "捷運",
- text: "metro_station",
- },
- {
- value: "鼎泰豐",
- text: "din_tai_fung",
- },
- {
- value: "美食街",
- text: "food_court",
- },
- {
- value: "超市",
- text: "supermarket",
- },
- ],
- // navigation: [
- // "景觀餐廳櫃台",
- // "ATM",
- // "觀景台售票處",
- // "廁所",
- // "置物櫃",
- // "客服(停車折抵)",
- // "哺乳室",
- // "飲水機",
- // "退稅/外幣兌換櫃台",
- // "計程車乘車處",
- // "無障礙廁所",
- // "伴手禮區",
- // "捷運",
- // "鼎泰豐",
- // "美食街",
- // "超市",
- // ],
- },
- {
- location: "B1 3號電梯", // 編號 5
- navigation: [
- {
- value: "景觀餐廳櫃台",
- text: "high_rise_restaurant_reception",
- },
- {
- value: "ATM",
- text: "atm",
- },
- {
- value: "觀景台售票處",
- text: "observatory_ticket_office",
- },
- {
- value: "廁所",
- text: "restroom",
- },
- {
- value: "無障礙廁所",
- text: "accessible_facilities",
- },
- {
- value: "計程車乘車處",
- text: "taxi_station",
- },
- {
- value: "客服(退稅櫃台/外幣兌換)",
- text: "tax_refund_currency_exchange",
- },
- {
- value: "飲水機",
- text: "ice_warmed_water_dispenser",
- },
- {
- value: "哺乳室",
- text: "nursing_room",
- },
- {
- value: "置物櫃",
- text: "items_and_luggage_storage",
- },
- {
- value: "客服(停車折抵)",
- text: "service_counter_parking_discount",
- },
- {
- value: "美食街",
- text: "food_court",
- },
- {
- value: "伴手禮區",
- text: "snackable_souvenirs",
- },
- {
- value: "鼎泰豐",
- text: "din_tai_fung",
- },
- {
- value: "捷運",
- text: "metro_station",
- },
- {
- value: "超市",
- text: "supermarket",
- },
- ],
- // navigation: [
- // "景觀餐廳櫃台",
- // "ATM",
- // "觀景台售票處",
- // "廁所",
- // "無障礙廁所",
- // "計程車乘車處",
- // "客服(退稅櫃台/外幣兌換)",
- // "飲水機",
- // "哺乳室",
- // "置物櫃",
- // "客服(停車折抵)",
- // "美食街",
- // "伴手禮區",
- // "鼎泰豐",
- // "捷運",
- // "超市",
- // ],
- },
- {
- location: "1F 信義環", // 編號 6
- navigation: [
- {
- value: "景觀餐廳櫃台",
- text: "high_rise_restaurant_reception",
- },
- {
- value: "ATM",
- text: "atm",
- },
- {
- value: "觀景台售票處",
- text: "observatory_ticket_office",
- },
- {
- value: "廁所",
- text: "restroom",
- },
- {
- value: "ATM",
- text: "atm",
- },
- {
- value: "置物櫃",
- text: "items_and_luggage_storage",
- },
- {
- value: "飲水機",
- text: "ice_warmed_water_dispenser",
- },
- {
- value: "無障礙廁所",
- text: "accessible_facilities",
- },
- {
- value: "哺乳室",
- text: "nursing_room",
- },
- {
- value: "客服(停車折抵)",
- text: "service_counter_parking_discount",
- },
- {
- value: "退稅/外幣兌換櫃台",
- text: "tax_refund_currency_exchange",
- },
- {
- value: "伴手禮區",
- text: "snackable_souvenirs",
- },
- {
- value: "美食街",
- text: "food_court",
- },
- {
- value: "捷運",
- text: "metro_station",
- },
- {
- value: "鼎泰豐",
- text: "din_tai_fung",
- },
- {
- value: "超市",
- text: "supermarket",
- },
- ],
- // navigation: [
- // "景觀餐廳櫃台",
- // "ATM",
- // "觀景台售票處",
- // "廁所",
- // "ATM",
- // "置物櫃",
- // "飲水機",
- // "無障礙廁所",
- // "哺乳室",
- // "客服(停車折抵)",
- // "退稅/外幣兌換櫃台",
- // "伴手禮區",
- // "美食街",
- // "捷運",
- // "鼎泰豐",
- // "超市",
- // ],
- },
- {
- location: "1F 3號電梯", // 編號 7
- navigation: [
- {
- value: "景觀餐廳櫃台",
- text: "high_rise_restaurant_reception",
- },
- {
- value: "ATM",
- text: "atm",
- },
- {
- value: "觀景台售票處",
- text: "observatory_ticket_office",
- },
- {
- value: "廁所",
- text: "restroom",
- },
- {
- value: "置物櫃",
- text: "items_and_luggage_storage",
- },
- {
- value: "飲水機",
- text: "ice_warmed_water_dispenser",
- },
- {
- value: "無障礙廁所",
- text: "accessible_facilities",
- },
- {
- value: "哺乳室",
- text: "nursing_room",
- },
- {
- value: "客服(停車折抵)",
- text: "service_counter_parking_discount",
- },
- {
- value: "退稅/外幣兌換櫃台",
- text: "tax_refund_currency_exchange",
- },
- {
- value: "計程車乘車處",
- text: "taxi_station",
- },
- {
- value: "美食街",
- text: "food_court",
- },
- {
- value: "超市",
- text: "supermarket",
- },
- {
- value: "捷運",
- text: "metro_station",
- },
- {
- value: "伴手禮區",
- text: "snackable_souvenirs",
- },
- ],
- // navigation: [
- // "景觀餐廳櫃台",
- // "ATM",
- // "觀景台售票處",
- // "廁所",
- // "置物櫃",
- // "飲水機",
- // "無障礙廁所",
- // "哺乳室",
- // "客服(停車折抵)",
- // "退稅/外幣兌換櫃台",
- // "計程車乘車處",
- // "美食街",
- // "超市",
- // "捷運",
- // "伴手禮區",
- // ],
- },
- {
- location: "2F 3號電梯", // 編號 8
- navigation: [
- {
- value: "景觀餐廳櫃台",
- text: "high_rise_restaurant_reception",
- },
- {
- value: "ATM",
- text: "atm",
- },
- {
- value: "觀景台售票處",
- text: "observatory_ticket_office",
- },
- {
- value: "廁所",
- text: "restroom",
- },
- {
- value: "置物櫃",
- text: "items_and_luggage_storage",
- },
- {
- value: "飲水機",
- text: "ice_warmed_water_dispenser",
- },
- {
- value: "無障礙廁所",
- text: "accessible_facilities",
- },
- {
- value: "哺乳室",
- text: "nursing_room",
- },
- {
- value: "計程車乘車處",
- text: "taxi_station",
- },
- {
- value: "退稅/外幣兌換櫃台",
- text: "tax_refund_currency_exchange",
- },
- {
- value: "客服(停車折抵)",
- text: "service_counter_parking_discount",
- },
- ],
- // navigation: [
- // "景觀餐廳櫃台",
- // "ATM",
- // "觀景台售票處",
- // "廁所",
- // "置物櫃",
- // "飲水機",
- // "無障礙廁所",
- // "哺乳室",
- // "計程車乘車處",
- // "退稅/外幣兌換櫃台",
- // "客服(停車折抵)",
- // ],
- },
- {
- location: "89F 觀景台", // 編號 9
- navigation: [
- {
- value: "景觀餐廳櫃台",
- text: "high_rise_restaurant_reception",
- },
- {
- value: "ATM",
- text: "atm",
- },
- {
- value: "客服",
- text: "service_counter",
- },
- {
- value: "91F戶外區",
- text: "91f_outdoor_area",
- },
- {
- value: "廁所",
- text: "restroom",
- },
- {
- value: "101F排隊處",
- text: "101f_queue",
- },
- ],
- // navigation: [
- // "景觀餐廳櫃台",
- // "ATM",
- // "客服",
- // "91F戶外區",
- // "廁所",
- // "101F排隊處",
- // ],
- },
- {
- location: "88F 觀景台", // 編號 10
- navigation: [
- {
- value: "景觀餐廳櫃台",
- text: "high_rise_restaurant_reception",
- },
- {
- value: "ATM",
- text: "atm",
- },
- {
- value: "廁所",
- text: "restroom",
- },
- {
- value: "飲水機",
- text: "ice_warmed_water_dispenser",
- },
- {
- value: "哺乳室",
- text: "nursing_room",
- },
- ],
- // navigation: ["景觀餐廳櫃台", "ATM", "廁所", "飲水機", "哺乳室"],
- },
- ]);
- // 平面圖
- let mapList = reactive([
- {
- title: "B1 平面圖",
- },
- {
- title: "1F 平面圖",
- },
- {
- title: "2F 平面圖",
- },
- ]);
- let assignLocation = ref("當前位置"); // 指定定位點
- let assignNavigationList = ref(null); // 指定導覽點列表
- // let assignLocationFloor = ref(null); // 指定定位點樓層
- // let assignNavigation = ref(null); // 指定導覽點
- // let navigationBtn = reactive(["B1", "1F", "2F", "4F", "5F", "89F", "91F"]);
- let arVideo = ref(null);
- let arVideoDialog = ref(false);
- // 取得 AR 導覽影片
- async function getArviews(route, text, type = "") {
- let url;
- let lang = getLang();
- console.log("text >>>", text);
- if (type === "garden") {
- console.log("route", route);
- let start;
- // if (route === "B1 鼎泰豐旁 數位屏幕") {
- // start = "B1 鼎泰豐";
- // } else if (route === "B1 松智藍梯梯廳") {
- // start = "B1 3號電梯";
- // }
- switch (route) {
- case "B1 鼎泰豐旁 數位屏幕":
- start = "B1 鼎泰豐";
- break;
- case "B1 中環WOW屏幕":
- start = "B1 中環";
- break;
- case "B1 信義橘梯梯廳":
- start = "B1 2號電梯";
- break;
- case "B1 信義綠梯梯廳":
- start = "B1 4號電梯";
- break;
- case "B1 松智藍梯梯廳":
- start = "B1 3號電梯";
- break;
- case "1F 信義綠梯出入口":
- start = "1F 信義環";
- break;
- case "1F 松智梯廳":
- start = "1F 3號電梯";
- break;
- case "2F 松智藍梯梯廳":
- start = "2F 3號電梯";
- break;
- default:
- break;
- }
- url = `https://cmm.ai:9101/arviews?language=${lang}&start=${start}&end=觀景台售票處`;
- } else {
- url = `https://cmm.ai:9101/arviews?language=${lang}&start=${assignLocation.value}&end=${route}`;
- }
- console.log("url", url);
- messages.value.push({
- label: "text",
- author: "ai",
- body: text,
- });
- try {
- const response = await axios.get(url);
- console.log("AR 導覽影片", response);
- messages.value.push({
- label: "ar_views",
- author: "ai",
- body: response.data,
- });
- } catch (error) {
- console.log("error", error);
- }
- }
- // 取得定位點 & 導覽點
- function changeLocation(item) {
- assignLocation.value = item;
- console.log("定位點:", item);
- let assign = locationList.filter((e) => e.location === item);
- console.log("assign", assign);
- assignNavigationList.value = assign[0].navigation;
- // assignLocation.value = item.location;
- // assignNavigationList.value = item.navigation;
- console.log("assignNavigationList.value", assignNavigationList.value);
- messages.value.push({
- label: "text",
- author: "ai",
- body: t("select_navigation_location"),
- });
- messages.value.push({
- label: "navigation",
- author: "ai",
- body: assignNavigationList.value,
- });
- }
- // 顯示平面圖
- function assignMapImg(item) {
- console.log("顯示平面圖 item", item);
- let name;
- if (item.title === "B1 平面圖") {
- name = "All_b1";
- } else if (item.title === "1F 平面圖") {
- name = "All_1";
- } else if (item.title === "2F 平面圖") {
- name = "All_2";
- }
- messages.value.push({
- label: "map_img",
- author: "ai",
- body: name,
- });
- }
- // 動態引入視頻文件
- const videoSources = ref([]); // 開場白影片(中)
- const videoSourcesEn = ref([]); // 開場白影片(英)
- const videoMuteSources = ref([]); // 點頭影片(靜音)
- const videoSpeakSources = ref([]); // 動嘴型影片
- const loadVideoSources = async () => {
- // 本地端影片路徑
- // const start1 = await import("@/assets/video/start_1.mp4");
- // const start2 = await import("@/assets/video/start_2.mp4");
- // const mute_1 = await import("@/assets/video/mute_1.mp4");
- // const mute_2 = await import("@/assets/video/mute_2.mp4");
- // const speak_1 = await import("@/assets/video/speak_1.mp4");
- // const speak_2 = await import("@/assets/video/speak_2.mp4");
- // videoSpeakSources.value = [speak_1.default, speak_2.default];
- videoSources.value = [
- "https://cmm.ai/101-ai-chatbot-new/video/start_1.mp4",
- "https://cmm.ai/101-ai-chatbot-new/video/start_2.mp4",
- ];
- videoSourcesEn.value = [
- "https://cmm.ai/101-ai-chatbot-new/video/start_en_1.mp4",
- "https://cmm.ai/101-ai-chatbot-new/video/start_en_2.mp4",
- ];
- videoMuteSources.value = [
- "https://cmm.ai/101-ai-chatbot-new/video/mute_1.mp4",
- "https://cmm.ai/101-ai-chatbot-new/video/mute_2.mp4",
- ];
- videoSpeakSources.value = [
- "https://cmm.ai/101-ai-chatbot-new/video/speak_1.mp4",
- "https://cmm.ai/101-ai-chatbot-new/video/speak_2.mp4",
- ];
- };
- let videoSrc = ref("");
- let hideAnchorPrologue = ref(false); // 顯示開場白 or 點頭影片
- let videoIndex = ref(null); // 影片編號
- // 選擇類別
- async function selectCategory(value, index) {
- assignCategory.value = value;
- assignCategoryIndex.value = index;
- console.log("selectCategory index", assignCategoryIndex.value);
- console.log("selectCategory value", assignCategory.value);
- if (value === "叫出真人客服") {
- showAnchor.value = true;
- if (currentAudio.value && isAudioPlaying.value) {
- // currentAudio.value.addEventListener("ended", onAudioEnded); // 監聽音訊播放結束
- // setTimeout(() => {
- // video.value.play();
- // }, 0);
- // return;
- handleVoice("pause"); // 暫停音訊
- }
- // 隨機取得影片路徑
- await loadVideoSources();
- // 主播開場白只顯示一次
- if (!hideAnchorPrologue.value) {
- let lang = getLang();
- let sources;
- if (lang === "ch") {
- sources = videoSources.value;
- } else if (lang === "en") {
- sources = videoSourcesEn.value;
- }
- const randomIndex = Math.floor(Math.random() * sources.length);
- videoSrc.value = sources[randomIndex];
- hideAnchorPrologue.value = true;
- videoIndex.value = randomIndex + 1;
- // const randomIndex = Math.floor(Math.random() * videoSources.value.length);
- // videoSrc.value = videoSources.value[randomIndex];
- // hideAnchorPrologue.value = true;
- // videoIndex.value = randomIndex + 1;
- } else {
- const randomIndex = Math.floor(
- Math.random() * videoMuteSources.value.length
- );
- videoSrc.value = videoMuteSources.value[randomIndex];
- videoIndex.value = randomIndex + 1;
- }
- // 播放影片
- setTimeout(() => {
- videoPlay();
- }, 0);
- // const randomIndex = Math.floor(Math.random() * videoSources.value.length);
- // videoSrc.value = videoSources.value[randomIndex];
- }
- // else if (value === "隱藏真人客服") {
- // showAnchor.value = false;
- // video.value.pause();
- // menuList[0][0].text = "customer_show";
- // menuList[0][0].value = "叫出真人客服";
- // }
- else if (value === "秘境花園觀景台") {
- messages.value.push({
- label: "text",
- author: "ai",
- body: t("observatory_info.tickets.purchase"),
- });
- messages.value.push({
- label: "observation_deck",
- author: "ai",
- body: observationList,
- });
- } else if (value === "位置導引") {
- messages.value.push({
- label: "text",
- author: "ai",
- body: t("qr_code_scan_prompt"),
- });
- // messages.value.push({
- // label: "map_img",
- // author: "ai",
- // body: mapList,
- // });
- messages.value.push({
- label: "location",
- author: "ai",
- body: locationList,
- });
- } else if (value === "美食/伴手禮") {
- // getAd("美食伴手禮");
- messages.value.push({
- label: "text",
- author: "ai",
- body: t("food_souvenirs_info.searching"),
- });
- messages.value.push({
- label: "dining",
- author: "ai",
- body: diningList,
- });
- } else if (value === "購物及優惠") {
- // getAd("購物及優惠");
- messages.value.push({
- label: "shopping",
- author: "ai",
- body: shoppingList,
- });
- } else if (value === "服務資訊") {
- messages.value.push({
- label: "text",
- author: "ai",
- body: t("service_info.inquiry_prompt"),
- });
- messages.value.push({
- label: "service",
- author: "ai",
- body: serviceList,
- });
- }
- }
- let secondaryAd = ref({}); // 隨機廣告
- let secondaryAdShow = ref(false);
- // 取得隨機廣告 (美食伴手禮/購物及優惠)
- async function getAd(type) {
- let lang = getLang();
- let url = `https://cmm.ai:9101/ad/${type}?language=${lang}`;
- try {
- const response = await axios.get(url);
- console.log("response", response);
- secondaryAd.value = response.data.data;
- // secondaryAdShow.value = true; // 取消蓋版廣告
- messages.value.push({
- label: "brand",
- author: "ai",
- body: [
- {
- info: response.data.data,
- },
- ],
- });
- } catch (error) {
- console.log("error", error);
- }
- }
- // 服務資訊回覆
- function handleService(title, depiction) {
- messages.value.push({
- label: "text",
- author: "user",
- body: title,
- });
- if (title !== "AI 天燈") {
- messages.value.push({
- label: "text",
- author: "ai",
- body: depiction,
- });
- } else {
- window.location.href = depiction;
- // window.open(depiction, "_blank"); // 另開天燈頁面
- }
- }
- // 參觀資訊回覆
- function handleVisit(title, depiction) {
- messages.value.push({
- label: "text",
- author: "user",
- body: title,
- });
- messages.value.push({
- label: "text",
- author: "ai",
- body: depiction,
- });
- }
- // 計算使用次數
- async function handleClick() {
- let url = "https://cmm.ai:9101/click";
- try {
- const response = await axios.get(url);
- console.log("Click", response);
- } catch (error) {
- console.log("error", error);
- }
- }
- let langList = reactive([
- {
- lang: "中文",
- value: "zh-tw",
- },
- {
- lang: "English",
- value: "en-us",
- },
- // {
- // lang: "日本語",
- // value: "ja-jp",
- // },
- // {
- // lang: "한국어",
- // value: "ko-kr",
- // },
- ]);
- const btnList = reactive([
- {
- title: "observation_deck",
- value: "秘境花園觀景台",
- },
- {
- title: "location_guide",
- value: "位置導引",
- },
- {
- title: "food_souvenirs",
- value: "美食伴手禮",
- },
- {
- title: "shopping_discounts",
- value: "購物及優惠",
- },
- {
- title: "service_information",
- value: "服務資訊",
- },
- ]);
- function getImageUrl(name) {
- return new URL(`../assets/img/icon/${name}`, import.meta.url).href;
- }
- let showAnchor = ref(false); // AI 主播影片
- let videoContent = ref(null); // 主播影片區塊
- // 動態更改主播區塊位置
- // watch(showAnchor, () => {
- // console.log("showAnchor", showAnchor.value);
- // nextTick(() => {
- // changeAnchorTop();
- // });
- // });
- // watch(hideMenu, () => {
- // nextTick(() => {
- // changeAnchorTop();
- // });
- // });
- // function changeAnchorTop() {
- // const menuOffsetTop = menu.value.offsetTop;
- // videoContent.value.style.top = `${menuOffsetTop - 170}px`;
- // }
- const menuList = reactive([
- [
- {
- imgSrc: "素材-05.png",
- text: "customer_show",
- value: "叫出真人客服",
- },
- { imgSrc: "素材-06.png", text: "service_information", value: "服務資訊" },
- { imgSrc: "素材-07.png", text: "shopping_discounts", value: "購物及優惠" },
- ],
- [
- {
- imgSrc: "素材-08.png",
- text: "observation_deck",
- value: "秘境花園觀景台",
- },
- { imgSrc: "素材-09.png", text: "food_souvenirs", value: "美食/伴手禮" },
- { imgSrc: "素材-10.png", text: "location_guide", value: "位置導引" },
- ],
- ]);
- // 美食伴手禮 or 購物及優惠類別篩選
- async function findBrand(value) {
- console.log("findBrand", value);
- if (value === "館外店家") {
- value = "館外";
- }
- let lang = getLang();
- let url = `https://cmm.ai:9101/find_brand?keyword=${value}&language=${lang}`;
- try {
- const response = await axios.get(url);
- console.log("response", response);
- // response.data.data.map(
- // (item) => (item.info.tags = JSON.parse(item.info.tags))
- // );
- messages.value.push({
- label: "brand",
- author: "ai",
- body: response.data.data,
- });
- assignCategoryIndex.value = null;
- assignCategory.value = "";
- // messages.value.push({
- // label: "text",
- // author: "ai",
- // body: "請選擇問題類型:",
- // });
- // messages.value.push({
- // label: "btn-list",
- // author: "ai",
- // body: "",
- // });
- } catch (error) {
- console.log("error", error);
- }
- }
- // 處理電話格式
- // function getPhoneNumber(phoneString) {
- // const parts = phoneString.split("\n");
- // return parts[1];
- // }
- // 取得線上購票
- async function getStaticTickets(type) {
- let url = `https://cmm.ai:9101/static_tickets?is_Chinese=${type}`;
- let info = {
- buttonList: [], // 按鈕
- ticketList: [], // 票券
- };
- try {
- const response = await axios.get(url);
- console.log("線上購票", response.data.result);
- response.data.result.map((item) => info.ticketList.push(item));
- console.log("info", info);
- messages.value.push({
- label: "ticket",
- author: "ai",
- body: info,
- });
- } catch (error) {
- console.log("error", error);
- }
- }
- // 秘境花園觀景台對話
- function handleObservationDialog(value) {
- console.log("value", value);
- if (value === "線上購票") {
- messages.value.push({
- label: "text",
- author: "ai",
- body: t("observatory_info.tickets.id_card"),
- });
- messages.value.push({
- label: "check",
- author: "ai",
- body: [
- {
- value: "是",
- text: "observatory_info.tickets.yes",
- },
- {
- value: "否",
- text: "observatory_info.tickets.no",
- },
- ],
- });
- } else if (value === "是" || value === "否") {
- if (value === "是") {
- getStaticTickets("1");
- } else if (value === "否") {
- getStaticTickets("0");
- }
- messages.value.push({
- label: "text",
- author: "ai",
- body: t("observatory_info.tickets.ticket_type"),
- });
- } else if (value === "參觀資訊") {
- messages.value.push({
- label: "text",
- author: "ai",
- body: t("observatory_info.visitor.question"),
- });
- messages.value.push({
- label: "text",
- author: "ai",
- body: t("observatory_info.visitor.faq"),
- });
- messages.value.push({
- label: "visit",
- author: "ai",
- body: visitList,
- });
- } else if (value === "實境景色") {
- // window.open("https://www.youtube.com/watch?v=RVV00FZbeH0", "_blank"); // 另開頁面
- router.push("/rtsp-stream");
- } else if (value === "前往秘境花園觀景台") {
- messages.value.push({
- label: "text",
- author: "ai",
- body: t("select_location"),
- });
- messages.value.push({
- label: "garden_route",
- author: "ai",
- body: gardenRouteList,
- // body: [
- // "B1 鼎泰豐旁 數位屏幕",
- // "B1 中環WOW屏幕",
- // "B1 信義橘梯梯廳",
- // "B1 信義綠梯梯廳",
- // "B1 松智藍梯梯廳",
- // "1F 信義綠梯出入口",
- // "1F 松智梯廳",
- // "2F 松智藍梯梯廳",
- // ],
- });
- }
- }
- let gardenRouteList = reactive([
- {
- value: "B1 鼎泰豐旁 數位屏幕",
- text: "location.b1_din_tai_fung",
- },
- {
- value: "B1 中環WOW屏幕",
- text: "location.b1_centre",
- },
- {
- value: "B1 信義橘梯梯廳",
- text: "location.b1_elevator_no_2",
- },
- {
- value: "B1 信義綠梯梯廳",
- text: "location.b1_elevator_no_4",
- },
- {
- value: "B1 松智藍梯梯廳",
- text: "location.b1_elevator_no_3",
- },
- {
- value: "1F 信義綠梯出入口",
- text: "location.1f_south_xinyi",
- },
- {
- value: "1F 松智梯廳",
- text: "location.1f_elevator_no_3",
- },
- {
- value: "2F 松智藍梯梯廳",
- text: "location.2f_elevator_no_3",
- },
- ]);
- // 購物及優惠對話
- function handleShoppingDialog(value) {
- console.log("value", value);
- if (value === "購物品牌查詢") {
- messages.value.push({
- label: "text",
- author: "ai",
- body: t("shopping_discounts_info.brands.choose"),
- });
- messages.value.push({
- label: "shopping_brand",
- author: "ai",
- body: brandList,
- });
- } else if (value === "國際貴賓卡專屬禮遇") {
- messages.value.push({
- label: "text",
- author: "user",
- body: t("shopping_discounts_info.tourist_card.title"),
- });
- messages.value.push({
- label: "text",
- author: "ai",
- body: t("shopping_discounts_info.tourist_card.content"),
- });
- } else if (value === "參觀資訊") {
- messages.value.push({
- label: "text",
- author: "ai",
- body: t("observatory_info.visitor.question"),
- });
- messages.value.push({
- label: "text",
- author: "ai",
- body: t("observatory_info.visitor.faq"),
- });
- messages.value.push({
- label: "visit",
- author: "ai",
- body: visitList,
- });
- }
- }
- let visitList = reactive([
- {
- title: "observatory_info.visitor.events_q",
- depiction: "observatory_info.visitor.events_a",
- },
- {
- title: "observatory_info.visitor.ball_q",
- depiction: "observatory_info.visitor.ball_a",
- },
- {
- title: "observatory_info.visitor.accessible_q",
- depiction: "observatory_info.visitor.accessible_a",
- },
- ]);
- // 判斷價格是否包含 $ 符號
- function formatPrice(price) {
- if (price === "") {
- return "";
- } else {
- if (price.includes("$")) {
- return price;
- } else {
- return `$${price}`;
- }
- }
- }
- let currentAudio = ref(null); // 當前音訊
- let audioDuration = ref(null); // 音訊秒數
- // 文字轉語音 (TTS)
- async function handleTTS(message) {
- console.log("handleTTS", message);
- let audioLang; // 音訊語言
- let lang = localStorage.getItem("lang");
- console.log("lang", lang);
- switch (lang) {
- case "zh-tw":
- audioLang = "cmn-TW";
- break;
- case "en-us":
- audioLang = "en-US";
- break;
- case "ja-jp":
- audioLang = "ja-JP";
- break;
- case "ko-kr":
- audioLang = "ko-KR";
- break;
- default:
- break;
- }
- // let url = `https://cmm.ai:9001/ttsTry/tts_try?message=${message}&type=101`;
- let url = `https://cmm.ai:9001/gcp/text-to-speech?language_code=${audioLang}&gender=female`;
- const formData = new FormData();
- formData.append("text", message);
- try {
- const response = await axios.post(url, formData, { responseType: "blob" });
- console.log("TTS response", response);
- const blob = new Blob([response.data], { type: "audio/mp3" });
- const audioUrl = URL.createObjectURL(blob);
- console.log("audioUrl", audioUrl);
- cutVideo();
- // 取得 mp3 音訊秒數
- // audio.addEventListener("loadedmetadata", function () {
- // audioDuration.value = audio.duration;
- // cutVideo();
- // });
- // 暫停當前音訊
- if (currentAudio.value) {
- currentAudio.value.pause();
- currentAudio.value.currentTime = 0;
- }
- // 播放音檔
- currentAudio.value = new Audio(audioUrl);
- } catch (error) {
- console.log("error", error);
- }
- }
- let videoLoading = ref(false);
- let isAudioPlaying = ref(false); // 音訊播放狀態
- // 取得語音回覆 mp4
- async function cutVideo() {
- videoSrc.value = videoSpeakSources.value[videoIndex.value - 1];
- video.value.load(); // 重新讀取影片
- // let duration = Math.floor(audioDuration.value); // 音訊秒數
- // 影片和音訊加載完成後播放
- video.value.oncanplay = () => {
- setTimeout(() => {
- // 監聽音訊播放結束
- currentAudio.value.addEventListener("ended", onAudioEnded);
- // 監聽音訊播放狀態
- currentAudio.value.addEventListener("play", onAudioPlay);
- currentAudio.value.addEventListener("pause", onAudioPause);
- video.value.play(); // 播放影片
- currentAudio.value.currentTime = 0; // 重置時間
- currentAudio.value.play(); // 播放音訊
- isVideoPause.value = true;
- videoLoading.value = false;
- }, 500);
- };
- // video.value.currentTime = 0;
- // video.value.play(); // 播放影片
- // currentAudio.value.play(); // 播放音訊
- // isVideoPause.value = true;
- // videoLoading.value = false;
- // setTimeout(()=>{
- // video.value.play(); // 播放影片
- // },300)
- // // 監聽音訊播放狀態
- // currentAudio.value.addEventListener("play", onAudioPlay);
- // currentAudio.value.addEventListener("pause", onAudioPause);
- // 監聽音訊播放結束
- // currentAudio.value.addEventListener("ended", onAudioEnded);
- // if (video.value.currentTime >= duration) {
- // video.value.pause();
- // }
- }
- // 音訊結束後暫停影片播放
- const onAudioEnded = () => {
- video.value.pause();
- };
- // 判斷音訊是否為播放狀態
- const onAudioPlay = () => {
- isAudioPlaying.value = true;
- console.log("isAudioPlaying.value", isAudioPlaying.value);
- };
- const onAudioPause = () => {
- isAudioPlaying.value = false;
- console.log("isAudioPlaying.value", isAudioPlaying.value);
- };
- const audioURL = ref(null);
- const audioFile = ref(null); // 音訊檔案
- let recordTime = ref(0); // 錄音時間
- let isRecording = ref(false); // 錄音狀態
- let timer;
- // 語音轉文字
- async function handleAudioToText() {
- isRecording.value = false;
- let audioLang; // 音訊語言
- let lang = localStorage.getItem("lang");
- console.log("lang", lang);
- switch (lang) {
- case "zh-tw":
- audioLang = "cmn-Hant-TW";
- break;
- case "en-us":
- audioLang = "en-US";
- break;
- case "ja-jp":
- audioLang = "ja-JP";
- break;
- case "ko-kr":
- audioLang = "ko-KR";
- break;
- default:
- break;
- }
- // let url = `http://172.104.93.163:9880/whisper/${audioLang}/`;
- // let url = `https://cmm.ai:9001/whisper/${audioLang}/`;
- let url = `https://cmm.ai:9001/gcp/speech-to-text?language_code=${audioLang}`;
- const formData = new FormData();
- formData.append("file", audioFile.value);
- try {
- console.log("audioFile.value", audioFile.value);
- const response = await axios.post(url, formData);
- console.log("語音轉文字 response", response);
- // showAnchor.value = false; // 關閉主播視窗
- userMessage.value = response.data[0];
- // handleTTS(userMessage.value); // 取得語音回覆
- if (response.data[0] && response.data[0] !== "") {
- sendMessage(); // 傳送使用者訊息
- } else {
- if (showAnchor.value) {
- alert("語音辨識有誤,請重新錄製。");
- videoLoading.value = false;
- return;
- } else {
- messages.value.push({
- label: "text",
- author: "user",
- body: "語音辨識有誤,請重新錄製。",
- });
- }
- }
- } catch (error) {
- console.log("error", error);
- }
- }
- // 語音轉文字 (使用 recorder-core 錄音)
- let rec, wave;
- // 調用 open 請求錄音權限
- let recOpen = function (success) {
- rec = Recorder({
- type: "mp3",
- sampleRate: 16000,
- bitRate: 16,
- onProcess: function (
- buffers,
- powerLevel,
- bufferDuration,
- bufferSampleRate,
- newBufferIdx,
- asyncEnd
- ) {
- wave &&
- wave.input(buffers[buffers.length - 1], powerLevel, bufferSampleRate);
- },
- });
- rec.open(
- function () {
- if (Recorder.WaveView) wave = Recorder.WaveView({ elem: ".recwave" });
- success && success();
- },
- function (msg, isUserNotAllow) {
- // 使用者未授權或不支援
- console.log((isUserNotAllow ? "UserNotAllow," : "") + "無法錄音:" + msg);
- }
- );
- };
- /** 開始錄音 **/
- function recStart() {
- togglePause("pause"); // 暫停影片音訊
- // 需先呼叫 recOpen() 開啟錄音後才能調用 start、stop 方法
- console.log("開始錄音");
- recOpen(function () {
- isRecording.value = true;
- // 開始計時
- timer = setInterval(() => {
- recordTime.value += 1;
- }, 1000);
- rec.start();
- });
- }
- /** 結束錄音 **/
- function recStop() {
- videoLoading.value = true;
- rec.stop(
- function (blob, duration) {
- // 利用 URL 產生本地檔案位址,不用時需要 revokeObjectURL
- let localUrl = (window.URL || webkitURL).createObjectURL(blob); // 該 url 只能本地端使用 (例如給 audio.src 進行播放,或是給 a.href download 進行下載)
- console.log(blob, localUrl, "時長:" + duration + "ms");
- // rec.close(); // 釋放錄音資源 (若不釋放系統或瀏覽器將持續提示在錄音中)
- // rec = null;
- // 將 Blob 轉換為 File 對象
- audioFile.value = new File([blob], "recording.mp3", {
- type: "audio/mp3",
- });
- console.log("audioFile", audioFile.value);
- // 自動播放(測試用)
- // const audio = document.createElement("audio");
- // audio.src = localUrl;
- // audio.autoplay = true;
- // audio
- // .play()
- // .then(() => {
- // console.log("Audio is playing automatically.");
- // })
- // .catch((error) => {
- // console.error("Error playing audio:", error);
- // });
- rec.close(); // 釋放錄音資源 (若不釋放系統或瀏覽器將持續提示在錄音中)
- rec = null;
- if (recordTime.value !== 0) {
- handleAudioToText(); // 語音轉文字
- } else {
- isRecording.value = false;
- }
- clearInterval(timer); // 清空計時秒數
- recordTime.value = 0;
- },
- function (msg) {
- console.log("錄音失敗:" + msg);
- rec.close(); // 可以透過 stop 方法的第 3 個參數來自動呼叫 close
- rec = null;
- }
- );
- }
- // 關閉主播視窗 (結束錄音)
- function closeRec() {
- video.value.pause();
- isVideoPause.value = true;
- recordTime.value = 0;
- clearInterval(timer); // 清空計時秒數
- if (isRecording.value) {
- recStop();
- }
- showAnchor.value = false;
- }
- // watch(showAnchor, (val) => {
- // if (val) {
- // isVideoPause.value = true;
- // }
- // });
- let isVideoPause = ref(true);
- // AI 主播影片播放 & 暫停
- function togglePause(val) {
- if (val === "pause") {
- // video.value.pause();
- isVideoPause.value = false;
- if (video.value) {
- video.value.pause();
- }
- if (currentAudio.value) {
- currentAudio.value.pause(); // 暫停音訊
- }
- } else {
- // video.value.play();
- isVideoPause.value = true;
- if (video.value) {
- video.value.play();
- }
- if (currentAudio.value) {
- currentAudio.value.play(); // 播放音訊
- currentAudio.value.addEventListener("ended", onAudioEnded);
- }
- }
- }
- // 語音暫停
- function handleVoice(state) {
- if (currentAudio.value) {
- if (state === "pause") {
- currentAudio.value.pause();
- isVideoPause.value = false;
- } else {
- currentAudio.value.play();
- isVideoPause.value = true;
- }
- }
- }
- // 失物招領表單
- let contactForm = ref(null);
- let contactDialog = ref(false);
- const contactFormData = ref({
- type: null,
- title: "",
- content: "",
- client_name: "",
- gender: "",
- email: "",
- phone: "",
- });
- watch(contactDialog, (val) => {
- // 表單欄位清空
- Object.keys(contactFormData.value).forEach((key) => {
- if (key === "type") {
- contactFormData.value[key] = null; // type 設為 null
- } else {
- contactFormData.value[key] = ""; // 其他屬性設為空字串
- }
- });
- });
- let contactFormType = ref(""); // 聯絡表單類別 (lost_property or complain)
- let lostOptions = ref(["購物中心", "顧客服務", "遺失物查詢"]); // 遺失物類別選單
- let complaintOptions = ref(["購物中心", "顧客意見反映", "服務建議"]); // 客訴類別選單
- const requiredRule = (value) => !!value || "此欄位為必填";
- const emailRule = (value) =>
- /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/.test(value) ||
- "請輸入有效的電子郵件地址";
- // 寄送表單
- const submitContactForm = async () => {
- console.log("contactForm.value", contactForm.value);
- // 驗證表單
- const validationResult = await contactForm.value.validate();
- console.log("validationResult", validationResult.valid);
- if (validationResult.valid) {
- let url = "https://cmm.ai:9101/insert_table";
- try {
- const response = await axios.post(url, contactFormData.value);
- console.log("表單 response", response);
- if (response.data.state === 200) {
- // alert(response.data.message);
- contactDialog.value = false;
- messages.value.push({
- label: "text",
- author: "ai",
- body: "表單已成功送出!",
- });
- }
- } catch (error) {
- console.log("error", error);
- }
- }
- };
- // Video.js 測試
- // let vrVideo = ref(null);
- // let player;
- // onMounted(() => {
- // if (vrVideo.value) {
- // player = videojs(vrVideo.value, {
- // controls: true,
- // autoplay: true,
- // loop: true,
- // });
- // console.log(player.plugins_);
- // if (!player.mediainfo) {
- // player.mediainfo = {};
- // }
- // if (!player.mediainfo.projection) {
- // player.mediainfo.projection = "360";
- // }
- // player.ready(() => {
- // console.log("Video.js is ready with VR plugin");
- // });
- // }
- // });
- // onBeforeUnmount(() => {
- // if (player) {
- // player.dispose();
- // }
- // });
- </script>
- <template>
- <Navbar v-if="!isLanguagePage" />
- <div v-if="isLanguagePage" class="lang-content">
- <div class="btn-list">
- <button
- v-for="(item, index) in langList"
- :key="index"
- @click="chooseLang(item.value)"
- class="main-btn"
- >
- {{ item.lang }}
- </button>
- </div>
- </div>
- <div v-else-if="!isLanguagePage && !showAnchor" class="main-containar">
- <!-- <div class="video-content">
- <video
- ref="video"
- preload
- playsinline
- :style="{ opacity: !isTTSVideo ? '1' : '0' }"
- >
- <source src="../assets/video/start_1.mp4" type="video/mp4" />
- Your browser does not support the video tag.
- </video>
- <video
- ref="ttsVideo"
- preload
- playsinline
- :style="{ opacity: isTTSVideo ? '1' : '0' }"
- >
- <source :src="ttsVideoSrc" type="video/mp4" />
- Your browser does not support the video tag.
- </video>
- <button @click="handleVideo(isTTSVideo)" class="control-btn">
- <img v-if="!videoPause" src="../assets/img/pause-button.png" alt="" />
- <img v-else src="../assets/img/play-button.png" alt="" />
- </button>
- </div> -->
- <!-- <Navbar /> -->
- <div v-if="chatLoading" class="d-flex justify-center pt-5">
- <v-progress-circular color="primary" indeterminate></v-progress-circular>
- </div>
- <div
- v-else
- class="chat-content"
- :class="{ 'hide-menu': hideMenu }"
- :style="{ paddingBottom: !hideMenu ? menuHeight + 'px' : '50px' }"
- >
- <!-- <div class="headline">
- <h1>{{ t("title") }}</h1>
- <button @click="isRotate = !isRotate">
- <img
- :class="{ rotate: isRotate }"
- src="../assets/img/angles-up-solid.svg"
- alt=""
- />
- </button>
- </div> -->
- <!-- 購票介面 -->
- <!-- <TicketPurchase />
- <router-link
- to="/brand-search"
- style="color: #fff; text-decoration: none"
- class="ps-3"
- >館外品牌測試頁面</router-link
- > -->
- <!-- 語音暫停按鈕 -->
- <div v-if="currentAudio" class="voice-btn">
- <button v-if="isAudioPlaying" @click="togglePause('pause')">
- <img src="../assets/img/pause-button.png" alt="" />
- <p>語音</p>
- </button>
- <button v-else @click="togglePause('play')">
- <img src="../assets/img/play-button.png" alt="" />
- <p>語音</p>
- </button>
- </div>
- <section
- ref="chatArea"
- class="chat-area"
- :class="{ 'hide-menu': hideMenu }"
- >
- <div v-for="message in messages" class="message-content">
- <p
- v-if="message.label === 'text'"
- class="message animate__animated"
- :class="{
- 'message-out': message.author === 'user',
- 'message-in': message.author !== 'user',
- animate__fadeInRight: message.author === 'user',
- animate__fadeInLeft: message.author !== 'user',
- }"
- v-html="message.body"
- ></p>
- <!-- 問題類別 -->
- <!-- <div v-else-if="message.label === 'btn-list'">
- <ul class="btn-list">
- <li v-for="(btn, index) in btnList">
- <button
- :class="{ active: index === assignCategoryIndex }"
- @click="selectCategory(btn.value, index)"
- >
- {{ t(`${btn.title}`) }}
- </button>
- </li>
- </ul>
- </div> -->
- <!-- 秘境花園觀景台 -->
- <div v-else-if="message.label === 'observation_deck'">
- <swiper
- :slidesPerView="'auto'"
- :spaceBetween="20"
- :modules="modules"
- class="btn-swiper"
- >
- <swiper-slide v-for="item in message.body">
- <div class="btn-container">
- <button @click="handleObservationDialog(item.value)">
- {{ t(item.text) }}
- </button>
- </div>
- </swiper-slide>
- </swiper>
- </div>
- <!-- 確認按鈕 -->
- <div v-else-if="message.label === 'check'">
- <swiper
- :slidesPerView="'auto'"
- :spaceBetween="20"
- :modules="modules"
- class="btn-swiper"
- >
- <swiper-slide v-for="item in message.body">
- <div class="btn-container">
- <button @click="handleObservationDialog(item.value)">
- {{ t(item.text) }}
- </button>
- </div>
- </swiper-slide>
- </swiper>
- </div>
- <!-- 參觀資訊 -->
- <div v-else-if="message.label === 'visit'">
- <swiper
- :slidesPerView="'auto'"
- :spaceBetween="20"
- :modules="modules"
- class="btn-swiper"
- >
- <swiper-slide v-for="item in message.body">
- <div class="btn-container">
- <button
- @click="handleVisit(t(item.title), t(item.depiction))"
- >
- {{ t(item.title) }}
- </button>
- </div>
- </swiper-slide>
- </swiper>
- </div>
- <!-- 位置導引 (定位點) -->
- <div v-else-if="message.label === 'location'">
- <!-- <v-select
- @update:modelValue="changeLocation"
- v-model="assignLocation"
- label="當前位置"
- :items="locationList"
- item-title="location"
- item-value="location"
- variant="outlined"
- density="comfortable"
- hide-details
- color="primary"
- class="mt-5 me-15"
- :menu-props="{ maxHeight: '155px' }"
- ></v-select> -->
- <!-- 掃描 QR Code -->
- <v-btn @click="qrCodeDialog = true" color="primary" class="mt-5">
- {{ t("tap_to_start_scan") }}
- </v-btn>
- <v-dialog v-model="qrCodeDialog" width="auto">
- <v-card max-width="400">
- <v-card-text>
- <div v-if="qrCodeLoading" class="d-flex justify-center pt-5">
- <v-progress-circular
- color="primary"
- indeterminate
- ></v-progress-circular>
- </div>
- <qrcode-stream
- v-show="!qrCodeLoading"
- @detect="onDetect"
- @camera-on="onInit"
- ></qrcode-stream>
- </v-card-text>
- <template v-slot:actions>
- <v-btn class="ms-auto" @click="qrCodeDialog = false">
- {{ t("close") }}
- </v-btn>
- </template>
- </v-card>
- </v-dialog>
- <!-- <div class="d-flex">
- <v-menu location="top">
- <template v-slot:activator="{ props }">
- <v-btn class="mt-5 py-2" color="primary" dark v-bind="props">
- <p class="me-2">{{ assignLocation }}</p>
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="18"
- height="18"
- fill="currentColor"
- class="bi bi-caret-down-fill pt-1"
- viewBox="0 0 16 16"
- >
- <path
- d="M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z"
- />
- </svg>
- </v-btn>
- </template>
- <v-list style="max-height: 155px; overflow-y: auto">
- <v-list-item
- v-for="(item, index) in locationList"
- :key="index"
- >
- <v-list-item-title @click="changeLocation(item)">
- {{ index + 1 }}. {{ item.location }}
- </v-list-item-title>
- </v-list-item>
- </v-list>
- </v-menu>
- <v-menu location="top">
- <template v-slot:activator="{ props }">
- <v-btn
- class="ms-5 mt-5 py-2"
- color="primary"
- dark
- v-bind="props"
- >
- <p class="me-2">查看平面圖</p>
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="18"
- height="18"
- fill="currentColor"
- class="bi bi-caret-down-fill pt-1"
- viewBox="0 0 16 16"
- >
- <path
- d="M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z"
- />
- </svg>
- </v-btn>
- </template>
- <v-list style="max-height: 155px; overflow-y: auto">
- <v-list-item v-for="(item, index) in mapList" :key="index">
- <v-list-item-title @click="assignMapImg(item)">
- {{ item.title }}
- </v-list-item-title>
- </v-list-item>
- </v-list>
- </v-menu>
- </div> -->
- </div>
- <!-- 定位點平面圖 -->
- <!-- <div v-else-if="message.label === 'map_img'" class="mt-5">
- <img
- class="map-img"
- :class="{ 'show-anchor': showAnchor }"
- :src="`../src/assets/img/map/${message.body}.webp`"
- alt=""
- />
- </div> -->
- <!-- 位置導引 (導覽點) -->
- <div v-else-if="message.label === 'navigation'">
- <!-- <v-select
- @update:modelValue="changeLocation"
- v-model="assignNavigation"
- label="導覽位置"
- :items="assignNavigationList"
- variant="solo"
- hide-details
- class="bg-white mt-4"
- ></v-select> -->
- <swiper
- :slidesPerView="'auto'"
- :spaceBetween="20"
- :modules="modules"
- class="btn-swiper"
- >
- <swiper-slide v-for="item in message.body">
- <div class="btn-container">
- <button
- @click="
- getArviews(item.value, t(`navigation.${item.text}`))
- "
- >
- {{ t(`navigation.${item.text}`) }}
- </button>
- </div>
- </swiper-slide>
- </swiper>
- </div>
- <!-- 秘境花園觀景台 -->
- <div v-else-if="message.label === 'garden_route'">
- <!-- <v-select
- @update:modelValue="changeLocation"
- v-model="assignNavigation"
- label="導覽位置"
- :items="assignNavigationList"
- variant="solo"
- hide-details
- class="bg-white mt-4"
- ></v-select> -->
- <swiper
- :slidesPerView="'auto'"
- :spaceBetween="20"
- :modules="modules"
- class="btn-swiper"
- >
- <swiper-slide v-for="item in message.body">
- <div class="btn-container">
- <button
- @click="getArviews(item.value, t(item.text), 'garden')"
- >
- {{ t(item.text) }}
- </button>
- </div>
- </swiper-slide>
- </swiper>
- </div>
- <!-- AR 導覽影片 -->
- <div v-else-if="message.label === 'ar_views'">
- <div
- class="message animate__animated"
- :class="{
- 'message-out': message.author === 'user',
- 'message-in': message.author !== 'user',
- animate__fadeInRight: message.author === 'user',
- animate__fadeInLeft: message.author !== 'user',
- }"
- >
- <p v-html="message.body.words"></p>
- <button @click="arVideoDialog = true" class="ar-link my-3">
- <!-- 進行 AR 導覽 -->
- {{ t("ar_tour") }}
- </button>
- <v-dialog v-model="arVideoDialog" width="auto">
- <v-card class="ar-card">
- <v-card-title class="mt-3"> AR 導覽 </v-card-title>
- <v-card-text class="pa-0">
- <!-- 測試 -->
- <!-- <video
- ref="vrVideo"
- class="video-js vjs-default-skin"
- controls
- playsinline
- >
- <source :src="message.body.url" type="video/mp4" />
- </video> -->
- <a-scene>
- <a-assets>
- <video
- id="vr-video"
- ref="arVideo"
- :src="message.body.url"
- autoplay
- crossorigin="anonymous"
- ecrossorigin="anonymous"
- ></video>
- </a-assets>
- <a-sky src="#vr-video"></a-sky>
- </a-scene>
- </v-card-text>
- <template v-slot:actions>
- <v-btn class="ms-auto" @click="arVideoDialog = false">
- {{ t("close") }}
- </v-btn>
- </template>
- </v-card>
- </v-dialog>
- </div>
- </div>
- <!-- 美食伴手禮 -->
- <div v-else-if="message.label === 'dining'">
- <!-- <ul class="btn-options">
- <li v-for="item in message.body">
- <button @click="findBrand(item.value)">
- {{ t(item.text) }}
- </button>
- </li>
- </ul> -->
- <swiper
- :slidesPerView="'auto'"
- :spaceBetween="20"
- :modules="modules"
- class="btn-swiper"
- >
- <swiper-slide v-for="item in message.body">
- <div class="btn-container">
- <button @click="findBrand(item.value)">
- {{ t(item.text) }}
- </button>
- </div>
- </swiper-slide>
- </swiper>
- </div>
- <!-- 購物及優惠 -->
- <div v-else-if="message.label === 'shopping'">
- <!-- <ul class="btn-options">
- <li v-for="item in message.body">
- <button @click="handleShoppingDialog(item.value)">
- {{ t(item.text) }}
- </button>
- </li>
- </ul> -->
- <swiper
- :slidesPerView="'auto'"
- :spaceBetween="20"
- :modules="modules"
- class="btn-swiper"
- >
- <swiper-slide v-for="item in message.body">
- <div class="btn-container">
- <button @click="handleShoppingDialog(item.value)">
- {{ t(item.text) }}
- </button>
- </div>
- </swiper-slide>
- </swiper>
- </div>
- <!-- 購物品牌查詢 -->
- <div v-else-if="message.label === 'shopping_brand'">
- <!-- <ul class="btn-options">
- <li v-for="item in message.body">
- <button @click="findBrand(item.value)">
- {{ item.value }}
- </button>
- </li>
- </ul> -->
- <swiper
- :slidesPerView="'auto'"
- :spaceBetween="20"
- :modules="modules"
- class="btn-swiper"
- >
- <swiper-slide v-for="item in message.body">
- <div class="btn-container">
- <button @click="findBrand(item.value)">
- {{ t(item.text) }}
- </button>
- </div>
- </swiper-slide>
- </swiper>
- </div>
- <!-- 服務資訊 (常見問題) -->
- <div v-else-if="message.label === 'service'">
- <swiper
- :slidesPerView="'auto'"
- :spaceBetween="20"
- :modules="modules"
- class="btn-swiper"
- >
- <swiper-slide v-for="item in message.body">
- <div class="btn-container">
- <button
- @click="handleService(t(item.title), t(item.depiction))"
- >
- {{ t(item.title) }}
- </button>
- </div>
- </swiper-slide>
- </swiper>
- </div>
- <!-- 推薦資訊 -->
- <div v-else-if="message.label === 'ticket'" class="ticket-item">
- <!-- 按鈕 -->
- <swiper
- v-if="message.body.buttonList.length"
- :slidesPerView="'auto'"
- :spaceBetween="20"
- :modules="modules"
- class="btn-swiper"
- :style="{
- marginBottom: message.body.ticketList.length ? '35px' : '0px',
- }"
- >
- <swiper-slide v-for="item in message.body.buttonList">
- <div class="btn-container">
- <button @click="setBtnValue(item.info.value)">
- {{ item.info.key }}
- </button>
- </div>
- </swiper-slide>
- </swiper>
- <!-- 票券 -->
- <swiper
- v-if="message.body.ticketList.length"
- :slidesPerView="1"
- :navigation="true"
- :modules="modules"
- class="ticket-slide"
- >
- <swiper-slide v-for="item in message.body.ticketList">
- <div class="slide-item">
- <img
- class="cover-img"
- :src="item.info.img || item.info.cover_img"
- alt=""
- />
- <section>
- <h3 class="title">
- {{ item.info.name || item.info.title }}
- </h3>
- <div class="price-info">
- <span>{{ item.info.floor || item.info.price }}</span>
- <div class="link-btn">
- <a
- :href="item.info.website_url || item.info.url"
- target="_blank"
- >
- {{ t("ctaGoUrl") }}
- </a>
- </div>
- </div>
- <p class="description">
- {{ item.info.content || item.info.description }}
- </p>
- </section>
- </div>
- </swiper-slide>
- </swiper>
- </div>
- <!-- 品牌資訊 -->
- <div v-else-if="message.label === 'brand'" class="ticket-item">
- <!-- 按鈕 -->
- <swiper
- v-if="message.body.buttonList?.length"
- :slidesPerView="'auto'"
- :spaceBetween="20"
- :modules="modules"
- class="btn-swiper"
- :style="{
- marginBottom: message.body.ticketList.length ? '35px' : '0px',
- }"
- >
- <swiper-slide v-for="item in message.body.buttonList">
- <div class="btn-container">
- <button @click="setBtnValue(item.info.value)">
- {{ item.info.key }}
- </button>
- </div>
- </swiper-slide>
- </swiper>
- <!-- 票券 -->
- <swiper
- v-if="message.body.ticketList?.length"
- :slidesPerView="1"
- :navigation="true"
- :modules="modules"
- class="ticket-slide"
- >
- <swiper-slide v-for="item in message.body.ticketList">
- <div class="slide-item">
- <img
- class="cover-img"
- :src="item.info.img || item.info.cover_img"
- alt=""
- />
- <section>
- <h3 class="title">
- {{ item.info.name || item.info.title }}
- </h3>
- <div class="price-info">
- <span>{{ item.info.floor || item.info.price }}</span>
- <div class="link-btn">
- <a
- :href="item.info.url || item.info.website_url"
- target="_blank"
- >
- {{ t("ctaGoUrl") }}
- </a>
- </div>
- </div>
- <p
- class="description"
- v-html="item.info.content || item.info.description"
- ></p>
- </section>
- </div>
- </swiper-slide>
- </swiper>
- <!-- 美食/伴手禮 -->
- <swiper
- v-if="message.body.length"
- :slidesPerView="1"
- :navigation="true"
- :modules="modules"
- class="ticket-slide"
- >
- <swiper-slide v-for="item in message.body">
- <div class="slide-item">
- <img
- class="cover-img"
- :src="item.info.img || item.info.cover_img"
- alt=""
- />
- <section>
- <h3 class="title">
- {{ item.info.name || item.info.title }}
- </h3>
- <div
- v-if="item.info.phone !== ''"
- class="d-flex align-center mt-3 mb-5"
- >
- <img
- src="../assets/img/phone-solid.svg"
- width="15"
- alt=""
- />
- <p class="ms-2">
- {{ item.info.phone }}
- </p>
- </div>
- <div class="price-info">
- <span>{{ item.info.floor || item.info.price }}</span>
- <div class="link-btn">
- <a :href="item.info.url" target="_blank">
- {{ t("ctaGoUrl") }}
- </a>
- </div>
- </div>
- <p class="description">
- {{ item.info.content || item.info.description }}
- </p>
- </section>
- </div>
- </swiper-slide>
- </swiper>
- <!-- <swiper
- v-if="message.body.length"
- :slidesPerView="'auto'"
- :spaceBetween="20"
- :modules="modules"
- >
- <swiper-slide v-for="item in message.body">
- <img
- class="cover-img"
- :src="item.info.img || item.info.cover_img"
- alt=""
- />
- <section>
- <h3 class="title">{{ item.info.name || item.info.title }}</h3>
- <div
- v-if="item.info.phone !== ''"
- class="d-flex align-center mt-3 mb-5"
- >
- <img
- src="../assets/img/phone-solid.svg"
- width="15"
- alt=""
- />
- <p class="ms-2">
- {{ getPhoneNumber(item.info.phone) }}
- </p>
- </div>
- <div class="price-info">
- <span>{{ item.info.floor || item.info.price }}</span>
- <div class="link-btn">
- <a :href="item.info.url" target="_blank">
- {{ t("ctaGoUrl") }}
- </a>
- </div>
- </div>
- <p class="description">
- {{ item.info.content || item.info.description }}
- </p>
- </section>
- </swiper-slide>
- </swiper> -->
- </div>
- <!-- 推薦資訊 -->
- <div v-else-if="message.label === 'recommend'" class="recommend-item">
- <img class="cover-img" :src="message.body.cover_img" alt="" />
- <section>
- <h3 class="title">{{ message.body.title }}</h3>
- <p class="description">{{ message.body.description }}</p>
- <div class="link-btn">
- <a
- :href="message.body.store_info_url || message.body.url"
- target="_blank"
- >
- {{ t("ctaBuyNow") }}
- </a>
- <a :href="message.body.website_url" target="_blank"> 官網 </a>
- </div>
- <p class="date">{{ message.body.date }} 限時搶購</p>
- </section>
- </div>
- <!-- 店家資訊 -->
- <div v-else-if="message.label === 'store'" class="store-item">
- <p class="headline">店家資訊</p>
- <div class="cover-img">
- <img :src="message.body.cover_img" alt="" />
- <h3 class="title">{{ message.body.title }}</h3>
- </div>
- <section>
- <div class="info">
- <p>
- <img
- src="../assets/img/location-dot-solid.svg"
- width="15"
- alt=""
- />
- {{ message.body.location }}
- </p>
- <p>
- <img src="../assets/img/phone-solid.svg" width="15" alt="" />
- {{ message.body.contact }}
- </p>
- </div>
- <p class="description">{{ message.body.description }}</p>
- </section>
- </div>
- <!-- 套票資訊 -->
- <div v-else-if="message.label === 'ticket'" class="ticket-item">
- <img class="cover-img" :src="message.body.cover_img" alt="" />
- <section>
- <h3 class="title">{{ message.body.title }}</h3>
- <div class="link-btn">
- <a :href="message.body.store_info_url" target="_blank">
- 線上預約
- </a>
- </div>
- <p class="description">{{ message.body.description }}</p>
- <span class="price-item">{{ message.body.price }}</span>
- </section>
- </div>
- <!-- 聯絡表單 -->
- <div v-else-if="message.label === 'contact-form'">
- <v-btn
- @click="contactDialog = true"
- text="填寫表單"
- color="primary"
- class="mt-5"
- ></v-btn>
- <!-- <v-dialog v-model="contactDialog" max-width="600">
- <template v-slot:activator="{ props: activatorProps }">
- <v-btn
- text="填寫表單"
- color="primary"
- class="mt-5"
- v-bind="activatorProps"
- ></v-btn>
- </template>
- <v-card class="lost-item">
- <v-card-title class="mt-3 ms-3"> 聯絡我們 </v-card-title>
- <v-form
- ref="contactForm"
- lazy-validation
- @submit.prevent="submitContactForm"
- >
- <v-card-text>
- <p class="mb-5">
- 為加快為您服務或有其他問題,您可撥打客服電話:02-8101-8800<br />
- (國際電話+886 2 8101-8800),將有專人協助您;<br />
- 或於下方填寫聯絡資料及留言,我們將盡快為您處理。
- </p>
- <v-select
- v-model="contactFormData.type"
- label="問題類別"
- :items="
- contactFormType === 'lost_property'
- ? lostOptions
- : complaintOptions
- "
- :rules="[requiredRule]"
- required
- ></v-select>
- <v-text-field
- v-model="contactFormData.title"
- :rules="[requiredRule]"
- label="標題 *"
- required
- ></v-text-field>
- <v-text-field
- v-model="contactFormData.content"
- :rules="[requiredRule]"
- label="內容 *"
- required
- placeholder="請詳述說明,我們將盡快回覆您,您最多可輸入 1,000 字元"
- ></v-text-field>
- <v-text-field
- v-model="contactFormData.client_name"
- :rules="[requiredRule]"
- label="姓名 *"
- required
- ></v-text-field>
- <v-text-field
- v-model="contactFormData.gender"
- :rules="[requiredRule]"
- label="性別 *"
- required
- ></v-text-field>
- <v-text-field
- v-model="contactFormData.email"
- :rules="[requiredRule, emailRule]"
- label="電子郵件 *"
- required
- ></v-text-field>
- <v-text-field
- v-model="contactFormData.phone"
- :rules="[requiredRule]"
- label="聯絡電話 *"
- required
- ></v-text-field>
- <section class="mt-5">
- <strong
- >台北 101個人資料蒐集、處理及利用告知事項:</strong
- >
- <p>
- 台北金融大樓股份有限公司(即「台北101」)基於客戶服務及業務聯繫(特定目的代號090消費者、客戶管理與服務)及其他相關業務(181其他經營合於營業登記項目或組織章程所定之業務),故有必要蒐集、處理或利用相關個人資料,請您詳閱。
- </p>
- <p>
- 基於前項目的蒐集之資料包含姓名、聯絡方式、性別(個人資料類別代號C001、C011、C132)等實際蒐集之個人資料,台北101將依前項特定目的存續期間,辦理紙本及電子化資料保存,並以非全自動化方式進行資料處理,且僅於臺灣地區之台北101營業範圍內進行特定目的內利用,除有法令規定或主管機關要求,或為答覆您的詢問而需提供商品或服務之合作夥伴共同處理外,台北101不會將資料提供給其他第三方或跨國境進行處理或利用。
- </p>
- <p>
- 依據不同法令適用規定,就台北101保有您的個人資料,您可行使下列權利:
- </p>
- <ol>
- <li>
- 除有法令規定之例外情形外,得向台北101查詢、請求閱覽或請求製給複製本,惟台北101得依法令及實際狀況酌收必要成本費用。
- </li>
- <li>
- 向台北101請求補充或更正您的個人資料,惟需應適當釋明其原因及事實。
- </li>
- <li>
- 若台北101違反法令規定蒐集、處理或利用個人資料,得依法令規定向台北101請求停止繼續蒐集、處理或利用您的個人資料。
- </li>
- <li>
- 若個人資料正確性有爭議者,得向台北101請求停止處理或利用您的個人資料,惟因執行業務所必須並註明其爭議或經您書面同意者,不在此限。
- </li>
- <li>
- 依法令規定,個人資料蒐集之特定目的消失、期限屆滿、受法令拘束要求、您撤回同意、反對台北101繼續處理時,得向台北101請求刪除、停止處理或利用您的個人資料,惟因台北101因執行業務、履行雙方契約關係所必須、履行法定義務要求或經您書面同意者,不在此限。
- </li>
- <li>
- 若您針對資料的正確性或處理方式提出疑義、反對台北101繼續處理、台北101非法處理、特定目的消失或保存期間屆滿時,台北101於進行法律訴訟、待完成法令適用釐清、查證等作業期間,仍需持續保存,您可要求台北101限制資料的處理;若台北101基於合法利益或公共利益處理您的個人資料,您亦有提出拒絕(異議)之權利。
- </li>
- <li>
- 您可依法令適用之不同,將台北101基於履行契約、您同意處理或台北101以自動化方式處理的個人資料,並以您提供的資料為限,以機器可讀之格式,指定傳輸至其他機關(構)。
- </li>
- <li>
- 若處理之依據為您明確表示同意之前提下進行蒐集、處理或利用,您可撤回您的同意,惟不影響您撤回同意前台北101處理個資之合法性。
- </li>
- </ol>
- <p>
- 若您如欲行使上述各項法定權利、了解如何行使之方式,或有任何個人資料相關問題,得向台北101客服(電話:02-8101-8800;電子郵件:mallservice@tfc101.com.tw)詢問、於台北101官方網站【聯絡我們】提出詢問,或連繫台北101隱私保護官(EMAIL:dpo@tfc101.com.tw),隱私權及資訊安全政策請詳台北101網站。您另有向個人資料保護法之主管機關「個人資料保護委員會」申訴之權利。
- </p>
- <p>
- 您可自由選擇是否提供相關個人資料及類別,惟您拒絕提供之個人資料及類別,如是辦理業務審核或作業所必需,或為成立雙方契約關係或法令要求之資料,台北101可能無法進行必要之業務審核或作業而無法提供您相關服務或無法提供較佳之服務,敬請見諒。(2024.06修訂)
- </p>
- </section>
- </v-card-text>
- <v-divider></v-divider>
- <v-card-actions class="py-5">
- <v-spacer></v-spacer>
- <v-btn
- text="取消"
- variant="plain"
- @click="contactDialog = false"
- ></v-btn>
- <v-btn
- type="submit"
- color="primary"
- text="確認送出"
- variant="tonal"
- >
- </v-btn>
- </v-card-actions>
- </v-form>
- </v-card>
- </v-dialog> -->
- </div>
- </div>
- <!-- 對話輸入框 -->
- <!-- <form
- @submit.prevent="sendMessage('out')"
- class="chat-inputs"
- :class="{ 'd-none': !hideMenu }"
- >
- <button @click="hideMenu = false" class="menu-btn">
- <img src="../assets/img/icon/素材-02.png" alt="" width="50" />
- </button>
- <input
- v-model="userMessage"
- type="text"
- placeholder="Type a message..."
- />
- <button type="submit" class="submit">
- <img width="20" src="../assets/img/paper-plane-solid.svg" alt="" />
- </button>
- </form> -->
- </section>
- <!-- 廣告輪播 -->
- <!-- <div class="slider-content">
- <swiper
- :slidesPerView="1"
- :autoplay="{
- delay: 5000,
- disableOnInteraction: false,
- }"
- :modules="modules"
- >
- <swiper-slide>
- <img src="../assets/img/banner-1.jpg" alt="" />
- </swiper-slide>
- <swiper-slide>
- <img src="../assets/img/banner-2.jpg" alt="" />
- </swiper-slide>
- </swiper>
- </div> -->
- <!-- AI 主播影片 -->
- <!-- <div
- ref="videoContent"
- v-show="showAnchor"
- class="video-content"
- :class="{ 'video-down': hideMenu }"
- >
- <div v-show="!isTTSVideo">
- <video ref="video" preload playsinline>
- <source src="../assets/video/start_1.mp4" type="video/mp4" />
- Your browser does not support the video tag.
- </video>
- </div>
- <div v-show="isTTSVideo">
- <video ref="ttsVideo" preload playsinline>
- <source :src="ttsVideoSrc" type="video/mp4" />
- Your browser does not support the video tag.
- </video>
- </div>
- </div> -->
- </div>
- <!-- 底部選單 -->
- <div ref="menu" class="menu">
- <!-- AI 主播影片 -->
- <!-- <div
- v-show="showAnchor"
- class="video-content"
- :class="{ 'video-down': hideMenu }"
- >
- <div v-show="!isTTSVideo">
- <video ref="video" preload playsinline>
- <source src="../assets/video/start_1.mp4" type="video/mp4" />
- Your browser does not support the video tag.
- </video>
- </div>
- <div v-show="isTTSVideo">
- <video ref="ttsVideo" preload playsinline>
- <source
- :src="`https://cmm.ai:9001/${ttsVideoSrc}`"
- type="video/mp4"
- />
- Your browser does not support the video tag.
- </video>
- </div>
- </div> -->
- <div class="menu-table" :class="{ 'hide-table': hideMenu }">
- <table class="mt-3">
- <tbody>
- <tr v-for="(row, rowIndex) in menuList" :key="rowIndex">
- <td v-for="(item, itemIndex) in row" :key="itemIndex">
- <button @click="selectCategory(item.value, itemIndex)">
- <img :src="getImageUrl(item.imgSrc)" alt="" class="icon" />
- <p>{{ t(`${item.text}`) }}</p>
- </button>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- <table class="mt-3">
- <tbody>
- <tr v-for="(row, rowIndex) in menuList" :key="rowIndex">
- <td v-for="(item, itemIndex) in row" :key="itemIndex">
- <button @click="selectCategory(item.value, itemIndex)">
- <img :src="getImageUrl(item.imgSrc)" alt="" class="icon" />
- <p>{{ t(`${item.text}`) }}</p>
- </button>
- </td>
- </tr>
- </tbody>
- </table> -->
- <div class="d-flex align-center position-relative">
- <div class="position-absolute">
- <button
- v-if="!showInput"
- @click="
- hideMenu = true;
- showInput = true;
- "
- class="ms-3 pt-1"
- >
- <img src="../assets/img/icon/素材-04.png" alt="" width="35" />
- </button>
- <button
- v-else
- @click="
- hideMenu = false;
- showInput = false;
- "
- >
- <img
- src="../assets/img/icon/素材-02.png"
- alt=""
- width="50"
- class="pt-2"
- />
- </button>
- </div>
- <div class="w-100 d-flex align-center justify-center">
- <button
- v-if="!showInput"
- @click="
- hideMenu = true;
- showInput = true;
- "
- class="d-flex align-center question-btn"
- >
- <img
- class="me-2"
- src="../assets/img/icon/素材-03.png"
- alt=""
- width="45"
- />
- {{ t("question") }}
- </button>
- <!-- 對話輸入框 -->
- <form
- v-else
- @submit.prevent="sendMessage('text')"
- class="chat-inputs"
- :class="{ 'd-none': !showInput }"
- >
- <!-- <button @click="hideMenu = false" class="menu-btn">
- <img src="../assets/img/icon/素材-02.png" alt="" width="50" />
- </button> -->
- <input
- v-model="userMessage"
- type="text"
- placeholder="Type a message..."
- />
- <button type="submit" class="submit">
- <img
- width="20"
- src="../assets/img/paper-plane-solid.svg"
- alt=""
- />
- </button>
- </form>
- </div>
- </div>
- </div>
- </div>
- <!-- AI 主播語音轉文字 -->
- <div v-else class="anchor-voice">
- <div v-show="showAnchor" class="video-content">
- <div>
- <video ref="video" preload playsinline>
- <source :src="videoSrc" type="video/mp4" />
- <!-- <source src="../assets/video/start_1.mp4" type="video/mp4" /> -->
- Your browser does not support the video tag.
- </video>
- <div v-if="videoLoading" class="video-progress">
- <v-progress-circular
- color="primary"
- indeterminate
- ></v-progress-circular>
- </div>
- </div>
- <!-- <div v-show="isTTSVideo">
- <video ref="ttsVideo" preload playsinline>
- <source
- :src="` ${ttsVideoSrc}`"
- type="video/mp4"
- />
- Your browser does not support the video tag.
- </video>
- </div> -->
- </div>
- <div class="control-item">
- <!-- <p class="text-center">連接中…</p> -->
- <div class="d-flex flex-column align-center">
- <audio v-if="audioURL" :src="audioURL" controls></audio>
- <p
- v-if="!isRecording"
- class="mb-3 text-center"
- v-html="t('system_construction')"
- ></p>
- <!-- <p v-if="!isRecording" class="mb-3">
- {{ t("tap_to_record") }}
- </p> -->
- <p v-else class="mb-3">錄音中:{{ recordTime }} 秒</p>
- <!-- 錄音按鈕 -->
- <!-- <v-btn
- v-if="!isRecording"
- @click="recStart"
- icon="mdi-circle"
- size="large"
- >
- <v-icon icon="mdi-circle" color="red" size="large"></v-icon>
- </v-btn> -->
- <v-btn
- v-else
- @click="recStop"
- icon="mdi-circle"
- size="large"
- color="success"
- >
- <v-icon icon="mdi-square" size="large"></v-icon>
- </v-btn>
- </div>
- <div class="d-flex justify-space-between mt-3 mx-10">
- <!-- 暫停按鈕 -->
- <v-btn
- v-if="isVideoPause"
- @click="togglePause('pause')"
- icon="mdi-pause"
- size="large"
- color="grey-darken-3"
- ></v-btn>
- <v-btn
- v-else
- @click="togglePause('play')"
- icon="mdi-play"
- size="large"
- color="grey-darken-3"
- ></v-btn>
- <!-- 關閉按鈕 -->
- <v-btn
- @click="closeRec()"
- icon="mdi-close-thick"
- size="large"
- color="red"
- ></v-btn>
- </div>
- </div>
- </div>
- <!-- 主要廣告 -->
- <v-dialog v-model="showAd">
- <div class="ad-content">
- <button @click="showAd = false" class="close-btn">
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="28"
- height="28"
- fill="currentColor"
- class="bi bi-x-circle"
- viewBox="0 0 16 16"
- >
- <path
- d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"
- />
- <path
- d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"
- />
- </svg>
- </button>
- <img class="cover-img" :src="ad.cover_img" alt="" />
- <section>
- <h2 class="title">{{ ad.title }}</h2>
- <span></span>
- <p v-html="ad.description"></p>
- <div v-if="ad.included.length" class="product">
- <p>訂單內含商品</p>
- <ul>
- <li v-for="(product, index) in ad.included" :key="index">
- {{ product }}
- </li>
- </ul>
- </div>
- <div v-if="ad.branch.length" class="branch">
- <p>分店資訊</p>
- <ul>
- <li v-for="(name, index) in ad.branch" :key="index">
- {{ name }}
- </li>
- </ul>
- </div>
- <!-- <p class="date">{{ item.body.date }}</p> -->
- <span v-if="ad.location !== ''" class="info justify-end">
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="20"
- height="20"
- viewBox="0 0 384 512"
- >
- <path
- d="M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"
- />
- </svg>
- <p>{{ ad.location }}</p>
- </span>
- </section>
- </div>
- </v-dialog>
- <!-- 隨機廣告 -->
- <v-dialog v-model="secondaryAdShow">
- <div class="ad-content">
- <button @click="secondaryAdShow = false" class="close-btn">
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="28"
- height="28"
- fill="currentColor"
- class="bi bi-x-circle"
- viewBox="0 0 16 16"
- >
- <path
- d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"
- />
- <path
- d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"
- />
- </svg>
- </button>
- <img class="cover-img" :src="secondaryAd.img" alt="" />
- <section>
- <h2 class="title">{{ secondaryAd.name }}</h2>
- <span class="price">
- <p>{{ formatPrice(secondaryAd.price) }}</p>
- <a :href="secondaryAd.url">前往官網</a>
- </span>
- <p class="mb-5" v-html="secondaryAd.content"></p>
- <span v-if="secondaryAd.phone !== ''" class="info">
- <img
- src="../assets/img/phone-solid.svg"
- width="15"
- alt=""
- style="
- filter: invert(50%) sepia(21%) saturate(1061%) hue-rotate(348deg)
- brightness(96%) contrast(92%);
- "
- />
- <p class="ms-1">{{ secondaryAd.phone }}</p>
- </span>
- <span v-if="secondaryAd.address !== ''" class="info">
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="20"
- height="20"
- viewBox="0 0 384 512"
- class="mt-1"
- >
- <path
- d="M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"
- />
- </svg>
- <p>{{ secondaryAd.address }}</p>
- </span>
- </section>
- </div>
- </v-dialog>
- <!-- 聯絡表單 -->
- <v-dialog v-if="contactDialog" v-model="contactDialog" max-width="600">
- <template v-slot:activator="{ props: activatorProps }">
- <v-btn
- text="填寫表單"
- color="primary"
- class="mt-5"
- v-bind="activatorProps"
- ></v-btn>
- </template>
- <v-card class="lost-item">
- <v-card-title class="mt-3 ms-3"> 聯絡我們 </v-card-title>
- <v-form
- ref="contactForm"
- lazy-validation
- @submit.prevent="submitContactForm"
- >
- <v-card-text>
- <p class="mb-5">
- 為加快為您服務或有其他問題,您可撥打客服電話:02-8101-8800<br />
- (國際電話+886 2 8101-8800),將有專人協助您;<br />
- 或於下方填寫聯絡資料及留言,我們將盡快為您處理。
- </p>
- <v-select
- v-model="contactFormData.type"
- label="問題類別 *"
- :items="
- contactFormType === 'lost_property'
- ? lostOptions
- : complaintOptions
- "
- :rules="[requiredRule]"
- required
- ></v-select>
- <v-text-field
- v-model="contactFormData.title"
- :rules="[requiredRule]"
- label="標題 *"
- required
- ></v-text-field>
- <v-text-field
- v-model="contactFormData.content"
- :rules="[requiredRule]"
- label="內容 *"
- required
- placeholder="請詳述說明,我們將盡快回覆您,您最多可輸入 1,000 字元"
- ></v-text-field>
- <v-text-field
- v-model="contactFormData.client_name"
- :rules="[requiredRule]"
- label="姓名 *"
- required
- ></v-text-field>
- <v-select
- v-model="contactFormData.gender"
- label="性別 *"
- :items="['女性', '男性', '不願透露']"
- :rules="[requiredRule]"
- required
- ></v-select>
- <!-- <v-text-field
- v-model="contactFormData.gender"
- :rules="[requiredRule]"
- label="性別 *"
- required
- ></v-text-field> -->
- <v-text-field
- v-model="contactFormData.email"
- :rules="[requiredRule, emailRule]"
- label="電子郵件 *"
- required
- ></v-text-field>
- <v-text-field
- v-model="contactFormData.phone"
- :rules="[requiredRule]"
- label="聯絡電話 *"
- required
- ></v-text-field>
- <section class="mt-5">
- <strong>台北 101個人資料蒐集、處理及利用告知事項:</strong>
- <p>
- 台北金融大樓股份有限公司(即「台北101」)基於客戶服務及業務聯繫(特定目的代號090消費者、客戶管理與服務)及其他相關業務(181其他經營合於營業登記項目或組織章程所定之業務),故有必要蒐集、處理或利用相關個人資料,請您詳閱。
- </p>
- <p>
- 基於前項目的蒐集之資料包含姓名、聯絡方式、性別(個人資料類別代號C001、C011、C132)等實際蒐集之個人資料,台北101將依前項特定目的存續期間,辦理紙本及電子化資料保存,並以非全自動化方式進行資料處理,且僅於臺灣地區之台北101營業範圍內進行特定目的內利用,除有法令規定或主管機關要求,或為答覆您的詢問而需提供商品或服務之合作夥伴共同處理外,台北101不會將資料提供給其他第三方或跨國境進行處理或利用。
- </p>
- <p>
- 依據不同法令適用規定,就台北101保有您的個人資料,您可行使下列權利:
- </p>
- <ol>
- <li>
- 除有法令規定之例外情形外,得向台北101查詢、請求閱覽或請求製給複製本,惟台北101得依法令及實際狀況酌收必要成本費用。
- </li>
- <li>
- 向台北101請求補充或更正您的個人資料,惟需應適當釋明其原因及事實。
- </li>
- <li>
- 若台北101違反法令規定蒐集、處理或利用個人資料,得依法令規定向台北101請求停止繼續蒐集、處理或利用您的個人資料。
- </li>
- <li>
- 若個人資料正確性有爭議者,得向台北101請求停止處理或利用您的個人資料,惟因執行業務所必須並註明其爭議或經您書面同意者,不在此限。
- </li>
- <li>
- 依法令規定,個人資料蒐集之特定目的消失、期限屆滿、受法令拘束要求、您撤回同意、反對台北101繼續處理時,得向台北101請求刪除、停止處理或利用您的個人資料,惟因台北101因執行業務、履行雙方契約關係所必須、履行法定義務要求或經您書面同意者,不在此限。
- </li>
- <li>
- 若您針對資料的正確性或處理方式提出疑義、反對台北101繼續處理、台北101非法處理、特定目的消失或保存期間屆滿時,台北101於進行法律訴訟、待完成法令適用釐清、查證等作業期間,仍需持續保存,您可要求台北101限制資料的處理;若台北101基於合法利益或公共利益處理您的個人資料,您亦有提出拒絕(異議)之權利。
- </li>
- <li>
- 您可依法令適用之不同,將台北101基於履行契約、您同意處理或台北101以自動化方式處理的個人資料,並以您提供的資料為限,以機器可讀之格式,指定傳輸至其他機關(構)。
- </li>
- <li>
- 若處理之依據為您明確表示同意之前提下進行蒐集、處理或利用,您可撤回您的同意,惟不影響您撤回同意前台北101處理個資之合法性。
- </li>
- </ol>
- <p>
- 若您如欲行使上述各項法定權利、了解如何行使之方式,或有任何個人資料相關問題,得向台北101客服(電話:02-8101-8800;電子郵件:mallservice@tfc101.com.tw)詢問、於台北101官方網站【聯絡我們】提出詢問,或連繫台北101隱私保護官(EMAIL:dpo@tfc101.com.tw),隱私權及資訊安全政策請詳台北101網站。您另有向個人資料保護法之主管機關「個人資料保護委員會」申訴之權利。
- </p>
- <p>
- 您可自由選擇是否提供相關個人資料及類別,惟您拒絕提供之個人資料及類別,如是辦理業務審核或作業所必需,或為成立雙方契約關係或法令要求之資料,台北101可能無法進行必要之業務審核或作業而無法提供您相關服務或無法提供較佳之服務,敬請見諒。(2024.06修訂)
- </p>
- </section>
- </v-card-text>
- <v-divider></v-divider>
- <v-card-actions class="py-5">
- <v-spacer></v-spacer>
- <v-btn
- text="取消"
- variant="plain"
- @click="contactDialog = false"
- ></v-btn>
- <v-btn type="submit" color="primary" text="確認送出" variant="tonal">
- </v-btn>
- <!-- <v-btn
- color="primary"
- text="確認送出"
- variant="tonal"
- @click="dialog = false"
- ></v-btn> -->
- </v-card-actions>
- </v-form>
- </v-card>
- </v-dialog>
- <!-- <div
- v-show="showAd"
- v-for="(item, index) in ad"
- :key="index"
- class="ad-content"
- >
- <div>
- <button @click="showAd = false" class="close-btn">
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="28"
- height="28"
- fill="currentColor"
- class="bi bi-x-circle"
- viewBox="0 0 16 16"
- >
- <path
- d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"
- />
- <path
- d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"
- />
- </svg>
- </button>
- <img class="cover-img" :src="item.body.cover_img" alt="" />
- <section>
- <h2 class="title">{{ item.body.title }}</h2>
- <span></span>
- <p>
- {{ item.body.description }}
- </p>
- <div v-if="item.body.included.length" class="product">
- <p>訂單內含商品</p>
- <ul>
- <li v-for="(product, index) in item.body.included" :key="index">
- {{ product }}
- </li>
- </ul>
- </div>
- <div v-if="item.body.branch.length" class="branch">
- <p>分店資訊</p>
- <ul>
- <li v-for="(name, index) in item.body.branch" :key="index">
- {{ name }}
- </li>
- </ul>
- </div>
- <span v-if="item.body.location !== ''" class="map">
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="20"
- height="20"
- viewBox="0 0 384 512"
- >
- <path
- d="M215.7 499.2C267 435 384 279.4 384 192C384 86 298 0 192 0S0 86 0 192c0 87.4 117 243 168.3 307.2c12.3 15.3 35.1 15.3 47.4 0zM192 128a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"
- />
- </svg>
- <p>{{ item.body.location }}</p>
- </span>
- </section>
- </div>
- </div> -->
- </template>
- <style lang="scss">
- .main-btn {
- padding: 16px 70px;
- font-size: 22px;
- font-weight: 600;
- border: none;
- border-radius: 100px;
- letter-spacing: 2px;
- color: white;
- background-color: var(--main-color);
- cursor: pointer;
- transition: all 0.3s;
- &:hover {
- background-color: #c19c75;
- }
- }
- .lang-content {
- width: 100%;
- height: 100vh;
- padding: 0 20vw;
- display: flex;
- align-items: center;
- justify-content: center;
- background-color: rgba(0, 0, 0, 0.6);
- background-blend-mode: multiply;
- background-image: url("@/assets/img/banner.jpg");
- background-size: cover;
- background-position: center center;
- .main-btn {
- margin-bottom: 40px;
- &:last-child {
- margin-bottom: 0;
- }
- }
- .btn-list {
- max-width: 400px;
- display: flex;
- flex-direction: column;
- }
- }
- .main-containar {
- width: 100%;
- background-color: var(--sub-color);
- // height: 150vh;
- // min-height: -webkit-fill-available;
- // display: flex;
- // flex-direction: column;
- // padding-bottom: 70vh;
- // min-height: 100%;
- // overflow-x: hidden;
- // overflow-y: scroll;
- .video-content {
- width: 25vw;
- position: absolute;
- right: -5px;
- top: -45vw;
- @media (max-width: 360px) {
- width: 22vw;
- top: -40vw;
- }
- video {
- // position: fixed;
- // top: 50px;
- // left: 0;
- // right: 0;
- // z-index: 10;
- width: 100%;
- height: auto;
- }
- .control-btn {
- width: 33px;
- height: 33px;
- display: flex;
- align-items: center;
- justify-content: center;
- position: absolute;
- z-index: 50;
- top: 70px;
- right: 7px;
- background: var(--main-color);
- border: none;
- border-radius: 100px;
- img {
- width: 25px;
- filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(93deg)
- brightness(103%) contrast(103%); // 改成白色
- }
- }
- }
- .chat-content {
- width: 100%;
- position: relative;
- z-index: 200;
- letter-spacing: 1px;
- background-color: var(--sub-color);
- &.hide-menu {
- min-height: 90vh;
- }
- .headline {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 10px 25px;
- border-radius: 15px 15px 0 0;
- background-color: var(--main-color);
- h1 {
- font-size: 1.125rem;
- font-weight: 500;
- color: white;
- @media (max-width: 375px) {
- font-size: 0.875rem;
- }
- }
- button {
- padding-top: 3px;
- display: flex;
- align-items: center;
- border: none;
- background-color: transparent;
- cursor: pointer;
- img {
- width: 25px;
- height: 20px;
- transition: all 0.3s;
- transform: rotate(0deg);
- &.rotate {
- transform: rotate(180deg);
- }
- }
- }
- }
- .chat-area {
- // display: flex;
- // flex-direction: column;
- min-height: 60vh;
- background: var(--sub-color);
- padding: 0.5em 1em 1.5em;
- .btn-list {
- margin-top: 20px;
- display: flex;
- flex-wrap: wrap;
- list-style: none;
- button {
- margin-right: 15px;
- margin-bottom: 15px;
- padding: 5px 15px;
- color: white;
- border: 2px solid white;
- letter-spacing: 2px;
- font-weight: bold;
- text-shadow: 1px 1px 1px #939393;
- &.active {
- color: var(--sub-color);
- background-color: white;
- text-shadow: none;
- }
- }
- }
- }
- .message-content {
- display: flex;
- flex-direction: column;
- // margin-top: 20px;
- .message {
- max-width: 45%;
- border-radius: 20px;
- padding: 0.8em 1.2em;
- white-space: pre-line;
- &:first-child {
- margin-top: 0;
- }
- @media (max-width: 600px) {
- max-width: 75%;
- font-size: 0.875em;
- }
- &.message-out {
- margin-left: auto;
- background: var(--bg-grey);
- color: white;
- }
- &.message-in {
- margin-right: auto;
- background: #f1f0f0;
- color: black;
- }
- &.message-in,
- &.message-out {
- margin-top: 20px;
- }
- }
- }
- .branch {
- ul,
- li,
- p {
- margin: 10px 0;
- font-size: 14px;
- }
- }
- .recommend-item {
- width: 350px;
- border-radius: 10px;
- background-color: white;
- }
- .recommend-item,
- .ticket-item {
- .cover-img {
- width: 100%;
- height: 22.5vh;
- object-fit: contain;
- overflow: hidden;
- border-radius: 10px 10px 0 0;
- }
- section {
- padding: 15px 25px;
- letter-spacing: 1px;
- .title {
- margin-bottom: 0;
- font-weight: 600;
- font-size: 1.25rem;
- text-align: left;
- // 超過則省略
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: 1;
- -webkit-box-orient: vertical;
- line-break: after-white-space;
- }
- .description {
- line-height: 1.8;
- font-size: 0.875rem;
- a {
- text-decoration: none;
- color: var(--main-color);
- border-bottom: 1px solid;
- }
- }
- .date {
- color: #646464;
- font-size: 0.875rem;
- text-align: center;
- }
- }
- .link-btn {
- display: flex;
- justify-content: center;
- a {
- display: block;
- width: 100%;
- max-width: 200px;
- margin: 25px 3px;
- padding: 8px;
- text-align: center;
- border-radius: 20px;
- color: white;
- background-color: var(--main-color);
- text-decoration: none;
- transition: all 0.3s;
- &:hover {
- opacity: 0.8;
- }
- }
- }
- }
- .store-item {
- width: 350px;
- .cover-img {
- position: relative;
- margin-bottom: -5px;
- img {
- width: 100%;
- height: 200px;
- object-fit: cover;
- }
- .title {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- color: white;
- font-size: 1.25rem;
- letter-spacing: 2px;
- text-shadow: 2px 2px 4px #333;
- }
- }
- .headline {
- color: white;
- justify-content: center;
- }
- section {
- padding: 20px;
- letter-spacing: 1px;
- border-radius: 0 0 10px 10px;
- background-color: white;
- .info {
- margin-bottom: 15px;
- p {
- display: flex;
- align-items: center;
- img {
- margin-right: 10px;
- }
- &:last-child {
- margin-top: 3px;
- }
- }
- }
- }
- }
- .ticket-item {
- width: 100%;
- margin-top: 20px;
- h3 {
- margin-bottom: 10px;
- text-align: center;
- }
- .ticket-slide {
- width: 90%;
- position: relative;
- .slide-item {
- max-width: 70vw;
- border-radius: 10px;
- background-color: white;
- }
- .swiper-button-prev {
- display: none;
- }
- }
- .title,
- .description {
- // 超過則省略
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- // -webkit-line-clamp: 3;
- -webkit-box-orient: vertical;
- line-break: after-white-space;
- }
- .title {
- -webkit-line-clamp: 3;
- }
- .description {
- -webkit-line-clamp: 5;
- }
- section {
- margin-top: -6px;
- border-radius: 0 0 10px 10px;
- background-color: white;
- .link-btn {
- a {
- max-width: 150px;
- margin: 0;
- padding: 8px 12px;
- font-size: 0.75rem;
- }
- }
- .price-item {
- display: block;
- margin-top: 10px;
- text-align: end;
- }
- .price-info {
- margin: 20px 0;
- display: flex;
- align-items: center;
- justify-content: space-between;
- @media (max-width: 575px) {
- font-size: 0.875rem;
- // flex-direction: column;
- // align-items: start;
- }
- span {
- display: block;
- margin: 10px 0;
- padding-right: 5px;
- font-size: 1rem;
- font-weight: 600;
- color: var(--main-color);
- }
- }
- }
- }
- }
- }
- .lost-item {
- p,
- strong {
- display: block;
- margin-bottom: 1rem;
- line-height: 1.7;
- }
- section {
- font-size: 0.875rem;
- color: #808080;
- ol {
- margin-left: 1.25rem;
- li {
- margin-bottom: 0.5rem;
- line-height: 1.7;
- }
- }
- }
- }
- .btn-options {
- // max-width: 85%;
- margin-top: 15px;
- display: flex;
- flex-wrap: wrap;
- list-style: none;
- li {
- margin-top: 15px;
- margin-right: 20px;
- button {
- display: block;
- width: 100%;
- padding: 8px 16px;
- border-radius: 5px;
- color: white;
- border: none;
- background-color: var(--main-color);
- letter-spacing: 2px;
- transition: all 0.3s;
- font-size: 0.875rem;
- &:hover {
- opacity: 0.8;
- }
- }
- }
- }
- .btn-swiper {
- .swiper-slide {
- width: auto;
- // max-width: 185px;
- .btn-container {
- display: flex;
- justify-content: center;
- button {
- display: block;
- width: 100%;
- padding: 10px 20px;
- border-radius: 5px;
- color: white;
- border: none;
- background-color: var(--main-color);
- letter-spacing: 2px;
- transition: all 0.3s;
- font-size: 0.875rem;
- &:hover {
- opacity: 0.8;
- }
- }
- }
- }
- }
- .ad-content {
- // width: 90%;
- max-height: 95vh;
- padding: 35px;
- overflow-y: auto;
- // position: absolute;
- // z-index: 500;
- border-radius: 10px;
- background-color: #fff;
- // box-shadow: 2px 2px 14px #5f5f5f;
- .close-btn {
- position: absolute;
- top: 7px;
- right: 5px;
- border: none;
- background-color: transparent;
- transition: all 0.3s;
- cursor: pointer;
- svg {
- filter: invert(57%) sepia(45%) saturate(391%) hue-rotate(350deg)
- brightness(93%) contrast(84%);
- }
- &:hover {
- opacity: 0.8;
- }
- }
- .ar-link {
- display: flex;
- justify-content: center;
- }
- section {
- p {
- // padding: 0 10px;
- line-height: 1.7;
- letter-spacing: 2px;
- }
- .title {
- margin: 15px auto;
- color: var(--main-color);
- font-weight: 600;
- font-size: 1.375em;
- text-align: center;
- letter-spacing: 2px;
- }
- .product,
- .branch {
- margin-top: 20px;
- background-color: #f1e9dc;
- p {
- padding: 10px 0;
- font-weight: 500;
- font-size: 0.875em;
- text-align: center;
- border-bottom: 2px solid #fff;
- }
- ul {
- padding: 10px;
- list-style: none;
- li {
- padding-bottom: 5px;
- letter-spacing: 1px;
- font-weight: 500;
- font-size: 0.875em;
- }
- }
- }
- .date {
- margin: 20px 0;
- text-align: center;
- }
- .info {
- display: flex;
- align-items: center;
- margin-top: 5px;
- p {
- padding-left: 10px;
- letter-spacing: 2px;
- // font-weight: 500;
- // color: var(--main-color);
- }
- svg {
- filter: invert(57%) sepia(45%) saturate(391%) hue-rotate(350deg)
- brightness(93%) contrast(84%);
- }
- }
- }
- .cover-img {
- width: 100%;
- max-height: 250px;
- object-fit: cover;
- }
- .price {
- display: flex;
- flex-wrap: wrap;
- align-items: center;
- justify-content: space-between;
- margin: 10px 0;
- p {
- font-size: 1.25rem;
- font-weight: 500;
- color: var(--main-color);
- }
- a {
- max-width: 150px;
- margin: 10px 0;
- padding: 8px 25px;
- display: inline-block;
- text-decoration: none;
- text-align: center;
- border-radius: 20px;
- letter-spacing: 1px;
- color: white;
- background-color: var(--main-color);
- }
- }
- }
- .slider-content {
- width: 100%;
- img {
- width: 100%;
- margin-bottom: -5px;
- }
- }
- .branch {
- margin-top: 30px;
- ul {
- padding: 0;
- list-style: none;
- li {
- letter-spacing: 1px;
- }
- }
- }
- .video-progress {
- position: absolute;
- left: 50%;
- top: 40%;
- transform: translate(-50%, -50%);
- }
- .dialog-content {
- position: absolute;
- top: 60px;
- left: 0;
- z-index: 100;
- }
- .vr-content {
- width: 700px;
- height: 700px;
- }
- .ar-link {
- display: inline-block;
- padding: 7px 17px;
- color: #fff;
- background-color: var(--main-color);
- border-radius: 5px;
- text-decoration: none;
- letter-spacing: 1px;
- }
- .ar-card {
- width: 85vw;
- height: 100vh;
- .v-card-title {
- text-align: center;
- }
- #vr-video {
- height: 77vh;
- }
- }
- .btn-swiper {
- margin-top: 20px;
- }
- .v-expansion-panel-text {
- font-size: 0.875rem;
- line-height: 1.7;
- }
- // 對話輸入框
- .chat-inputs {
- width: 100%;
- display: flex;
- padding: 10px 20px;
- background-color: white;
- input {
- width: 100%;
- border: none;
- margin-left: 2rem;
- &:focus-visible {
- outline: none;
- }
- }
- .menu-btn {
- position: absolute;
- top: 2px;
- left: 0;
- }
- button.submit {
- border: none;
- background: white;
- cursor: pointer;
- &:hover {
- img {
- opacity: 0.8;
- }
- }
- img {
- padding-top: 5px;
- transition: all 0.3s;
- filter: invert(75%) sepia(20%) saturate(459%) hue-rotate(360deg)
- brightness(100%) contrast(85%);
- }
- }
- ::placeholder {
- font-size: 1rem;
- font-weight: 500;
- color: var(--sub-color);
- opacity: 1; /* Firefox */
- }
- ::-ms-input-placeholder {
- /* Edge 12 -18 */
- color: var(--sub-color);
- }
- }
- // 底部選單
- .menu {
- position: fixed;
- z-index: 300;
- left: 0;
- bottom: 0px;
- right: 0;
- color: var(--text-color);
- background-color: white;
- &.hide-menu table {
- height: 0;
- z-index: -1;
- }
- .icon {
- width: 80px;
- @media (max-width: 414px) {
- width: 60px;
- }
- @media (max-width: 375px) {
- width: 45px;
- }
- }
- .menu-table {
- height: 100%;
- transition: all 0.3s;
- &.hide-table {
- height: 0;
- table {
- display: none;
- height: 0;
- }
- }
- table {
- width: 95%;
- height: 100%;
- margin: auto;
- border-collapse: collapse;
- position: relative;
- transition: all 0.3s;
- &::before,
- &::after {
- content: "";
- display: inline-block;
- width: 10px;
- height: 100%;
- background-color: #fff;
- position: absolute;
- bottom: 0%;
- @media (max-width: 390px) {
- width: 8px;
- }
- }
- &::before {
- left: -5px;
- }
- &::after {
- right: -5px;
- }
- tr {
- td {
- width: 50px;
- padding: 1rem 0;
- text-align: center;
- border: 1px solid #ccc;
- @media (max-width: 414px) {
- width: 100px;
- padding: 1rem 0;
- }
- @media (max-width: 390px) {
- padding: 0.5rem 0;
- }
- p {
- padding: 0 0.3rem;
- letter-spacing: 0.03rem;
- @media (max-width: 430px) {
- // width: 115px;
- font-size: 0.875rem;
- }
- }
- }
- &:first-child {
- td {
- border-top: 0px solid transparent;
- }
- }
- &:last-child {
- td {
- border-bottom: 0px solid transparent;
- }
- }
- }
- }
- }
- .question-btn {
- color: var(--main-color);
- font-size: 1.25rem;
- font-weight: 500;
- letter-spacing: 0.1rem;
- @media (max-width: 414px) {
- font-size: 1rem;
- }
- }
- }
- .anchor-voice {
- height: 94vh;
- color: white;
- background-color: black;
- .video-content {
- height: 70vh;
- overflow: hidden;
- @media (max-width: 375px) {
- height: 65vh;
- }
- video {
- width: 100%;
- @media (max-width: 375px) {
- margin-top: -50px;
- }
- }
- }
- .control-item {
- display: flex;
- flex-direction: column;
- justify-content: center;
- height: 24vh;
- @media (max-width: 375px) {
- height: 29vh;
- }
- }
- // .v-btn.v-btn--density-default {
- // height: 55px !important;
- // }
- }
- .map-img {
- max-width: 100%;
- &.show-anchor {
- max-width: 70%;
- }
- }
- .voice-btn {
- position: fixed;
- right: 5px;
- top: 55px;
- z-index: 100;
- button {
- display: flex;
- align-items: center;
- img {
- width: 22px;
- filter: invert(49%) sepia(66%) saturate(368%) hue-rotate(348deg)
- brightness(91%) contrast(92%);
- }
- p {
- margin-left: 5px;
- font-size: 0.85rem;
- color: var(--main-color);
- }
- }
- }
- .v-btn {
- // &.v-btn--density-default {
- // height: auto !important;
- // }
- p {
- font-size: 0.875rem;
- }
- }
- .v-field__outline {
- --v-field-border-width: 0 !important;
- }
- .swiper {
- // width: 300px;
- margin-left: 0;
- }
- .a-modal {
- position: relative !important;
- top: 50% !important;
- z-index: 15000 !important;
- }
- html.a-fullscreen {
- position: relative !important;
- }
- a-video-controls {
- position: absolute;
- bottom: 20px;
- left: 50%;
- transform: translateX(-50%);
- }
- .fc-direction-ltr {
- height: 500px;
- }
- .fc {
- .fc-scrollgrid,
- .fc-scrollgrid table,
- .fc-daygrid-body {
- height: 94%;
- width: 100% !important;
- }
- .fc-toolbar.fc-header-toolbar {
- padding: 5px;
- margin-bottom: 0;
- letter-spacing: 1px;
- background-color: #f2f2f2;
- border-radius: 5px 5px 0 0;
- }
- .fc-toolbar-title {
- font-size: 1.125em;
- }
- .fc-day-past {
- &.fc-day-other {
- a {
- text-decoration: none;
- }
- }
- a {
- color: #cccccc;
- text-decoration: line-through;
- }
- }
- .fc-button .fc-icon {
- color: #969696;
- font-size: 1em !important;
- vertical-align: baseline !important;
- }
- .fc-icon-chevron-left::before {
- content: "<";
- }
- .fc-icon-chevron-right::before {
- content: ">";
- }
- .fc-button-primary {
- border: none;
- background-color: transparent;
- &:hover,
- &:focus,
- &:not(:disabled):active:focus {
- box-shadow: none;
- background-color: transparent;
- }
- &:disabled {
- display: none;
- }
- }
- .fc-daygrid-day-top {
- justify-content: center;
- }
- .fc-day-today.fc-daygrid-day,
- .fc-day-future.fc-daygrid-day {
- cursor: pointer;
- }
- }
- </style>
|