Hướng dẫn chỉnh amply chuẩn

  • Trang chủ
  • Tin tức
  • Công nghệ
  • Loa - amply
  • Hướng Dẫn Cách Chỉnh Amply Hát Karaoke Hay Như Ca Sĩ

  • Bạn có thể gửi tin nhắn yêu cầu báo giá đến nhiều nhà cung cấp cùng 1 lúc . Thử ngay !!!
    Hướng dẫn
    Yêu cầu báo giá

Doanh nghiệp

Tony Stark

Không thẻ gửi báo giá vì chưa có doanh nghiệp nào kết nối tính năng gửi báo giá. Chúng tôi xin lỗi vì bất tiện này. Để tìm hiểu thêm vui lòng liên hệ Hotline

Lịch sử yêu cầu báo giá

Báo giá chờ duyệt nếu có sẽ xuất hiện ở đây

Xin vui lòng bớt chút thời gian đóng góp ý kiến giúp Musk phục vụ bạn tốt hơn

Bạn đang không hài lòng về điểm nào của tính năng báo giá này?

Thái độ partner..
Thời gian báo giá
Trải nghiệm trên web
Hài lòng

Đóng góp ý kiến cải thiện tính năng

Gửi
Loading...
const socket = io[socketUrl]; // Start first run var listCompany = ""; var canShowQuote = "0" //html báo giá var htmlQuoteContact = `
` + '
' + '
' + 'Yêu cầu báo giá' + `
${window.location.pathname.substring[1]}
` + '
' + '
' // kiểm tra trang hiện tại có lọc được doanh nghiệp nào hay không var hasCompany = 0; var hasContactRequestQuote = false let noImage = baseUrl + '/web/musk/common/images/noimages.png' // Nếu có báo giá thì remove // if [document.getElementById['request_quote']] { // localStorage.removeItem['roomId'] // localStorage.removeItem['roomName'] // hasContactRequestQuote = true // } showSpeech[] function showSpeech [] { $['#bubble-speech'].hide[] if [localStorage.getItem['clientToken']] { $['#bubble-speech'].hide[] } if [!localStorage.getItem['clientToken']] { setTimeout[[] => { $['#bubble-speech'].show[] }, 1500] } } hideCloseButton[] function hideCloseButton [] { $['.close1'].hide[] $['.close2'].hide[] $['.close3'].hide[] $['.close4'].hide[] } $['.bubble-close'].click[[e] => { $['#bubble-speech'].hide[] }] $['.close'].each[[key, item] => { $[item].click[[e] => { e.preventDefault[] if [$[e.target]] { $[e.target].closest['.imageQuoteBtn'].find['.imageQuote'].attr['src', noImage] let eleName = $[e.target].closest['.imageQuoteBtn'].find['.imageQuote'].attr['name'] if [eleName] { formDataQuote.delete[eleName] } } }] }] // kiểm tra có token và gọi ajax lấy danh sách contact if [localStorage.getItem['clientToken']] { $['#open_chat_box'].show[] $['#btn_open_chat_box'].text['Lịch sử báo giá'] getListContactForBoxChat[] } if [!localStorage.getItem['clientToken']] { if [canShowQuote == 1] { if [filterScreen] { $['#open_chat_box'].show[] } setRoomNameGetQuote[] $['#list-contact'].append[htmlQuoteContact] showContentSendQuote[] $['#request_quote'].click[function [] { showContentSendQuote[] }] } else { $['#btn_open_chat_box'].hide[] let width = [window.innerWidth > 0] ? window.innerWidth : screen.width; if [width < 450] { $['.first-company-sponsor'].css['left', '5px'] } else { $['.first-company-sponsor'].css['right', '5px'] } } } // Ẩn ô chat $['#minimize_box_chat'].click[function [] { $['#musk_box_chat'].hide[] $['#open_chat_box'].show[] $['header'].show[] }] // Hiện ô chat $['#btn_open_chat_box'].click[function [] { $['#musk_box_chat'].show[] $['#open_chat_box'].hide[] var objDiv = document.getElementById["chat-content"]; objDiv.scrollTop = objDiv.scrollHeight; if [hasContactRequestQuote] { showContentSendQuote[] } if [$['#show_box_style'].hasClass['fa-window-restore']] { $['header'].hide[] } }] function showContentSendQuote[] { $['#request_quote_content'].show[] $['#chat-content'].empty[] $['#chat-content'].hide[] $['#box-room-name'].text['Yêu cầu báo giá'] $['#box-room-more-info'].text[window.location.pathname.substring[1]] $['#box-room-image'].attr['src', `${baseUrl}/web/img/quote-icon.png`] $['.contact-element'].removeClass['active'] $['#request_quote'].addClass['active'] $['#musk_box_chat .input'].hide[] } // Bấm gửi tin nhắn $['#submit-message'].click[function [] { submitSendMessage[] }] // Gửi báo giá $['#submitSendQuote'].click[function [] { let data = $['#getQuote'].attr['attr-list-id'] let customerName = $['#customer-name'].val[] let customerPhoneNumber = $['#customer-phone-number'].val[] let message = $['#content-first-message'].val[] if[!customerName && !localStorage.getItem['clientToken'] && !customerPhoneNumber] { alert['Vui lòng nhập tên, số điện thoại của bạn'] return true } if [!message] { alert['Vui lòng nhập nội dung muốn báo giá!'] return true } localStorage.setItem['fullName', customerName] if [data] { let listCompanyId = data.split[','] listCompanyId.forEach[item => { formDataQuote.append['listCompanyId[]', item] }] // listImage.forEach[item => { // formDataQuote.append['listImage[]', item] // }] formDataQuote.append['fullName', customerName] formDataQuote.append['clientToken', localStorage.getItem['clientToken'] || ''] formDataQuote.append['url', window.location.href] formDataQuote.append['listCompanyName', listCompany] formDataQuote.append['message', message] formDataQuote.append['phone', customerPhoneNumber] $.ajax[{ url: baseUrl+'/customer/ajax_send_quote', method:'post', data: formDataQuote, beforeSend:function[]{ $['#loadingGetQuote2'].show[] }, complete:function[]{ $['#loadingGetQuote2'].hide[] }, success:function[data]{ data = JSON.parse[data] if[data.code == 200]{ localStorage.setItem['clientToken', data.data.token] showContentMess[] getListContactForBoxChat[] showSpeech[] $['#imageQuoteName'].text[''] formDataQuote.delete['image1'] formDataQuote.delete['image2'] formDataQuote.delete['image3'] formDataQuote.delete['image4'] $['#imageQuote1'].attr['src', noImage] $['#imageQuote2'].attr['src', noImage] $['#imageQuote3'].attr['src', noImage] $['#imageQuote4'].attr['src', noImage] $[''] $['#content-first-message'].val[''] } }, cache: false, contentType: false, processData: false }] } }] const MAX_WIDTH = 1366; const MAX_HEIGHT = 768; const MIME_TYPE = "image/jpeg"; const QUALITY = 0.7; $['#uploadImageUser'].change[function [ev] { const file = ev.target.files[0]; // get the file var fileName = file.name.split['.'][0]; const blobURL = URL.createObjectURL[file]; const img = new Image[]; img.src = blobURL; img.onerror = function [] { URL.revokeObjectURL[this.src]; // Handle the failure properly console.log["Cannot load image"]; }; let datatImageUrl = '' img.onload = function [] { URL.revokeObjectURL[this.src]; const [newWidth, newHeight] = calculateSize[img, MAX_WIDTH, MAX_HEIGHT] const canvas = document.createElement["canvas"]; canvas.width = newWidth; canvas.height = newHeight; const ctx = canvas.getContext["2d"]; ctx.drawImage[img, 0, 0, newWidth, newHeight]; canvas.toBlob[ [blob] => { // Handle the compressed image. es. upload or save in local state let formData = new FormData[] formData.append['image', new File[[blob], fileName + ".jpeg"]] formData.append['roomId', localStorage.getItem['roomId']] formData.append['token', localStorage.getItem['clientToken']] $.ajax[{ url: baseUrl+'/customer/ajax_send_message_image', type: "POST", data: formData, success: function [msg] { let el = $['.contact.contact-element.active'] if[el] { selectRoomChat[el.attr['attr-room-id'], el.attr['attr-room-name'], el.attr['attr-room-image'], el.attr['attr-room-more-info'], el.attr['attr-room-confirmed']] socket.emit['clientSocket', localStorage.getItem['roomId'], el.attr['attr-room-confirmed']] } getDataActiveDotCustomer[] }, cache: false, contentType: false, processData: false }]; }, MIME_TYPE, QUALITY ]; }; }] let formDataQuote = new FormData[] let listImage = [] $['.uploadImageQuote1'].change[function [ev] { const file = ev.target.files[0]; // get the file var fileName = file.name.split['.'][0]; const blobURL = URL.createObjectURL[file]; const img = new Image[]; img.src = blobURL; img.onerror = function [] { URL.revokeObjectURL[this.src]; // Handle the failure properly console.log["Cannot load image"]; }; $['#imageQuote1'].attr["src",blobURL] img.onload = function [] { URL.revokeObjectURL[this.src]; const [newWidth, newHeight] = calculateSize[img, MAX_WIDTH, MAX_HEIGHT] const canvas = document.createElement["canvas"]; canvas.width = newWidth; canvas.height = newHeight; const ctx = canvas.getContext["2d"]; ctx.drawImage[img, 0, 0, newWidth, newHeight]; canvas.toBlob[ [blob] => { //listImage[0] = new File[[blob], fileName + ".jpeg"] formDataQuote.append['image1', new File[[blob], fileName + ".jpeg"]] $['.close1'].show[] }, MIME_TYPE, QUALITY ]; }; }] $['.uploadImageQuote2'].change[function [ev] { const file = ev.target.files[0]; // get the file var fileName = file.name.split['.'][0]; const blobURL = URL.createObjectURL[file]; const img = new Image[]; img.src = blobURL; img.onerror = function [] { URL.revokeObjectURL[this.src]; // Handle the failure properly console.log["Cannot load image"]; }; $['#imageQuote2'].attr["src",blobURL] img.onload = function [] { URL.revokeObjectURL[this.src]; const [newWidth, newHeight] = calculateSize[img, MAX_WIDTH, MAX_HEIGHT] const canvas = document.createElement["canvas"]; canvas.width = newWidth; canvas.height = newHeight; const ctx = canvas.getContext["2d"]; ctx.drawImage[img, 0, 0, newWidth, newHeight]; canvas.toBlob[ [blob] => { //listImage[1] = new File[[blob], fileName + ".jpeg"] formDataQuote.append['image2', new File[[blob], fileName + ".jpeg"]] $['.close2'].show[] }, MIME_TYPE, QUALITY ]; }; }] $['.uploadImageQuote3'].change[function [ev] { const file = ev.target.files[0]; // get the file var fileName = file.name.split['.'][0]; const blobURL = URL.createObjectURL[file]; const img = new Image[]; img.src = blobURL; img.onerror = function [] { URL.revokeObjectURL[this.src]; // Handle the failure properly console.log["Cannot load image"]; }; $['#imageQuote3'].attr["src",blobURL] img.onload = function [] { URL.revokeObjectURL[this.src]; const [newWidth, newHeight] = calculateSize[img, MAX_WIDTH, MAX_HEIGHT] const canvas = document.createElement["canvas"]; canvas.width = newWidth; canvas.height = newHeight; const ctx = canvas.getContext["2d"]; ctx.drawImage[img, 0, 0, newWidth, newHeight]; canvas.toBlob[ [blob] => { //listImage[2] = new File[[blob], fileName + ".jpeg"] formDataQuote.append['image3', new File[[blob], fileName + ".jpeg"]] $['.close3'].show[] }, MIME_TYPE, QUALITY ]; }; }] $['.uploadImageQuote4'].change[function [ev] { const file = ev.target.files[0]; // get the file var fileName = file.name.split['.'][0]; const blobURL = URL.createObjectURL[file]; const img = new Image[]; img.src = blobURL; img.onerror = function [] { URL.revokeObjectURL[this.src]; // Handle the failure properly console.log["Cannot load image"]; }; $['#imageQuote4'].attr["src",blobURL] img.onload = function [] { URL.revokeObjectURL[this.src]; const [newWidth, newHeight] = calculateSize[img, MAX_WIDTH, MAX_HEIGHT] const canvas = document.createElement["canvas"]; canvas.width = newWidth; canvas.height = newHeight; const ctx = canvas.getContext["2d"]; ctx.drawImage[img, 0, 0, newWidth, newHeight]; canvas.toBlob[ [blob] => { //listImage[3] = new File[[blob], fileName + ".jpeg"] formDataQuote.append['image4', new File[[blob], fileName + ".jpeg"]] $['.close4'].show[] }, MIME_TYPE, QUALITY ]; }; }] function calculateSize[img, maxWidth, maxHeight] { let width = img.width; let height = img.height; // calculate the width and height, constraining the proportions if [width > height] { if [width > maxWidth] { height = Math.round[[height * maxWidth] / width]; width = maxWidth; } } else { if [height > maxHeight] { width = Math.round[[width * maxHeight] / height]; height = maxHeight; } } return [width, height]; } // Utility functions for demo purpose function readableBytes[bytes] { const i = Math.floor[Math.log[bytes] / Math.log[1024]], sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; return [bytes / Math.pow[1024, i]].toFixed[2] + ' ' + sizes[i]; } handleModeScreenChat[] function handleModeScreenChat[] { $['#show_box_style'].click[function [] { if [$[this].hasClass['fa-window-maximize']] { $[this].removeClass['fa-window-maximize'] $[this].addClass['fa-window-restore'] $['#content-contact-id'].css['height', '100vh'] $['#content-chat-id'].css['height', '100vh'] $['header'].hide[] } else { $[this].removeClass['fa-window-restore'] $[this].addClass['fa-window-maximize'] $['#content-contact-id'].css['height', '60vh'] $['#content-chat-id'].css['height', '60vh'] $['header'].show[] } }] } // button mở box chat function showButtonOpenChatBox[] { $['#open_chat_box'].show[] } function hideButtonOpenChatBox[] { $['#open_chat_box'].hide[] } // button yêu cầu báo giá function showButtonGetQuote[] { $['#getQuote'].show[] } function hideButtonGetQuote[] { $['#getQuote'].hide[] } // ẩn hiện list contact function showListContact[] { $['.contacts'].show[] } // ẩn hiện input nhập tin nhắn function hideInputMessage[] { $['#input-message'].hide[] } function showInputMessage[] { $['#input-message'].show[] } // hiển thị nội dung báo giá - khi đã có token function showContentQuote [] { if [localStorage.getItem['clientToken']] { $['#customer-name'].hide[] $['#customer-phone-number'].hide[] } $['#request_quote'].show[] $['#request_quote_content'].show[] $['#chat-content'].hide[] $['#musk_box_chat .input'].hide[] setTitleButtonGetQuote[] } // hiển thị nội dung message - khi đã có token function showContentMess [] { $['#request_quote_content'].hide[] $['#chat-content'].show[] $['#musk_box_chat .input'].show[] } function showContentQuoteWithoutToken [] { $['.contacts'].hide[] $['#musk_box_chat .input'].hide[] $['#musk_box_chat'].show[] } function setRoomNameGetQuote[] { $['#box-room-name'].text['Yêu cầu báo giá'] } function setTitleButtonGetQuote[] { // $['#btn_open_chat_box'].text['Yêu cầu báo giá'] } function setActiveContactSendQuote[] { $['.contact-element'].removeClass['active'] $['#request_quote'].addClass['active'] } // Khi chọn user báo giá $['#getQuote'].click[function [] { showContentQuoteWithoutToken[] }] // Bấm enter để gửi tin nhắn var el = document.getElementById["input-message"]; if [el] { el.addEventListener["keydown", function[event] { if [event.key === "Enter"] { submitSendMessage[] } }]; } // lấy danh sách contact function getListContactForBoxChat[] { $.ajax[{ url: baseUrl+'/customer/get_list_contact', method:'post', dataType:'json', data: { clientToken: localStorage.getItem['clientToken'] || '' }, beforeSend:function[]{ }, complete:function[]{ }, success:function[data]{ if[data.code == 200]{ let html = '' let checkSelectRoom = false data.data.listContact.forEach[[value, index] => { html += `
${value.roomName}
SĐT: ${value.phoneNumber} - ĐC: ${value.address}
1+
` }] if [!checkSelectRoom && hasContactRequestQuote] { setActiveContactSendQuote[] } $['#list-contact'].empty[] // let checkHasNewUrl = false // if [typeof filterScreen !== 'undefined' && filterScreen && !checkUrl] { // if [hasCompany] { // $['#list-contact'].append[htmlQuoteContact] // checkHasNewUrl = true // // $['#request_quote'].click[function [] { // showContentSendQuote[] // }] // } // } if[canShowQuote == 1] { $['#list-contact'].append[htmlQuoteContact] } else { $['#request_quote_content'].hide[] } $['#request_quote'].click[function [] { showContentSendQuote[] }] $['#list-contact'].append[html] // if [checkHasNewUrl] { // showContentQuote[] // setRoomNameGetQuote[] // setActiveContactSendQuote[] // } // Chọn room $['.contact-element'].click[function [] { $['.contact-element'].removeClass['active'] $[this].addClass['active'] if [$[this].attr['attr-room-id']] { selectRoomChat[$[this].attr['attr-room-id'], $[this].attr['attr-room-name'], $[this].attr['attr-room-image'], $[this].attr['attr-room-more-info'], $[this].attr['attr-room-confirmed']] } else { setRoomNameGetQuote[] } }] let htmlHistoryQuote = '' let checkUrl = false function showHistoryMessage [message] { if [message.includes['[IMAGE]'] || message.includes['[IMAGE_GROUP]']] { return message.replace[/\[IMAGE.*/, '
[Hình ảnh đính kèm]'] } return message } data.data.listQuote.forEach[[quote, index] => { // if[window.location.href == quote.url] { // checkUrl = true // } if [quote.status == 0] { htmlHistoryQuote += '' + `
Yêu cầu: ${quote.url}
Trạng thái: ${getStatusQuote[quote.status]}

` + 'Bấm xem danh sách công ty' + quote.listCompanyName + '

' + 'Lời nhắn của bạn: ' + showHistoryMessage[quote.message]+ '
' } }] $['#request_quote_history'].html[htmlHistoryQuote] $['.btn-view-company'].click[function [] { $[this].hide[] $[this].parents[].find['.data-company'].show[] }] if [typeof filterScreen !== 'undefined' && filterScreen && checkUrl] { $['#input-data-request-quote'].hide[] $['#request_quote_current_url'].hide[] } else { $['#customer-name'].hide[] $['#customer-phone-number'].hide[] } if[canShowQuote == 1] { showContentSendQuote[] } else { if [!$['.contact-element.active']] { $['.contact.contact-element'].first[].addClass['active'] } let el = $['.contact.contact-element.active'] if[el] { selectRoomChat[el.attr['attr-room-id'], el.attr['attr-room-name'], el.attr['attr-room-image'], el.attr['attr-room-more-info'], el.attr['attr-room-confirmed']] socket.emit['clientSocket', localStorage.getItem['roomId'], el.attr['attr-room-confirmed']] } } if [data.data.clientId] { socket.emit['clientConnection', data.data.clientId] } } else if [data.code == 401]{ localStorage.clear[] } } }] } function getStatusQuote[status] { let result = 'Đang chờ duyệt'; if [status == 1] { result = 'Đã duyệt' } return result } function getStatusQuoteColor[status] { let result = '#0275d8'; if [status == 1] { result = '#5cb85c' } return result } // Gửi tin nhắn function submitSendMessage[] { if [$['#input-message-data'].hasClass['active']] { return true } if [!localStorage.getItem['roomId']] { alert['Vui lòng chọn công ty bạn muốn gửi tin'] } if [$['#input-message'].val[]] { $.ajax[{ url: baseUrl+'/customer/ajax_send_message', method:'post', dataType:'json', data: { clientToken: localStorage.getItem['clientToken'] || '', roomId: localStorage.getItem['roomId'] || '', content: $['#input-message'].val[] }, beforeSend:function[]{ $['#input-message-data'].addClass['active'] $['#input-message-data'].css['pointer-events', 'none'] $['#loading-send-message'].show[] $['#submit-message'].hide[] }, complete:function[]{ $['#input-message-data'].removeClass['active'] $['#input-message-data'].css['pointer-events', 'unset'] $['#loading-send-message'].hide[] $['#submit-message'].show[] }, success:function[data]{ if[data.code == 200]{ $['#input-message'].val[''] var objDiv = document.getElementById["chat-content"]; objDiv.scrollTop = objDiv.scrollHeight; getMessageWithAjax[] socket.emit['clientSocket', localStorage.getItem['roomId']] getDataActiveDotCustomer[] } } }] } } // Chọn phòng chat function selectRoomChat[roomId, roomName, roomImage, roomMoreInfo, isConfirmed] { $['#box-room-name'].text[roomName] $['#box-room-name'].attr['title',roomName] $['#box-room-image'].attr['src', roomImage] $['#box-room-more-info'].text[roomMoreInfo] $['#box-room-more-info'].attr['title',roomMoreInfo] localStorage.setItem['roomId', roomId] showContentMess[] getMessageWithAjax[] if [isConfirmed == 0 || isConfirmed == null || isConfirmed == 'null'] { $['#musk_box_chat .input'].hide[] } else { $['#musk_box_chat .input'].show[] } } function getMessageWithAjax[] { $.ajax[{ url: baseUrl+'/customer/ajax_get_message', method:'post', dataType:'json', data: { clientToken: localStorage.getItem['clientToken'] || '', roomId: localStorage.getItem['roomId'] || '' }, beforeSend:function[]{ }, complete:function[]{ }, success:function[data]{ if[data.code == 200] { let html = '' data.data.forEach[[value, index] => { if [value.type == 1] { html += `
${getContentMess[value.content]}
` } else { html += `
${value.name}
${getContentMess[value.content]}
${changeFormat[value.createdAt]}
` } }] $['#chat-content'].empty[] $['#chat-content'].append[html] var objDiv = document.getElementById["chat-content"]; objDiv.scrollTop = objDiv.scrollHeight; } else if [data.code == 401] { localStorage.clear[] } } }] } function getContentMess[content] { if [content && content.includes['type:image=']] { content = content.replace['type:image=', ''] return `` } if [content && content.includes['[IMAGE_GROUP]']] { let listData = content.split['[IMAGE_GROUP]'] if [listData] { let contentMess = '
' contentMess += '
'+listData[0]+'
' listData.forEach[[item, key] => { if[key != 0] { if [item.includes['|']] { let listImage = item.split['|'] if [listImage] { listImage.forEach[[item2, key2] => { contentMess += '
' }] } } else { contentMess += '
' } } }] contentMess += '
' return contentMess } } return content } // Gọi socket function callSocket[] { $.ajax[{ url: baseUrl+'/customer/call_socket', method:'get', dataType:'json', }] } function getDataActiveDotCustomer[] { $.ajax[{ url: baseUrl+'/customer/get_data_active_dot', method:'post', dataType:'json', data: { clientToken: localStorage.getItem['clientToken'] || '' }, beforeSend:function[]{ }, complete:function[]{ }, success:function[data]{ if[data.code == 200] { $[`.contact-element .active-mess`].hide[] data.data.listContact.forEach[x => { if [x.isNewMess == 1] { $[`.contact-element[attr-room-id=${x.roomId}] .active-mess`].show[] } }] } else if [data.code == 401] { localStorage.clear[] } } }] } socket.on['loadClient', [Id] => { getMessageWithAjax[] getDataActiveDotCustomer[] }] socket.on['loadChatBox', [] => { getListContactForBoxChat[] showSpeech[] FeedBack.checkShowFeedback[] }] socket.on['loadUserActive', [listClientId] => { $[`.contact-element .active-dot`].hide[] if [listClientId] { let data = Object.values[listClientId] data.forEach[x => { $[`[attr-partner-id=${x}] .active-dot`].show[] }] } }] function changeFormat[val] { let dataDate = val.split[' '] if [dataDate.length === 2] { let dataTime = dataDate[1] let d = new Date[val.replace[/\s/, 'T']] let date = d.getDate[] let month = d.getMonth[] + 1 let year = d.getFullYear[] return dataTime + ' ' + date.toString[].padStart[2, '0'] + "/" + month.toString[].padStart[2, '0'] + "/" + year } return '' }

Chủ Đề