google翻譯
此功能 由google翻譯提供參考,樂淘不保證翻譯內容之正確性,詳細問題說明請使用商品問與答
';
s += "沒有任何賣家回覆訊息。";
s += " ";
var cnt = jData["@attributes"].totalResultsReturned;
for (var i = 0; i < cnt; i++) {
if (i == 0) s = "";
var json =
cnt > 1 ? jData["Result"]["QandA"][i] : jData["Result"]["QandA"];
s += '
';
s += "
";
s += '質問';
s += json.WhichQuestion;
s += " ";
s += '投稿者:';
s += json["Question"].Id;
s += " / 評価:";
s += json["Question"]["Rating"].Point;
s += " ";
s += '';
var s_date = json["Question"].Date; //if(typeof String.prototype.trim === 'function'){s_date=s_date;var c_date=new Date(s_date);s_date=c_date.getYear()+1900;s_date+="年";s_date+=c_date.getMonth()+1;s_date+="月";s_date+=c_date.getDate();s_date+="日";s_date+=" ";s_date+=c_date.getHours();s_date+="時";s_date+=c_date.getMinutes();s_date+="分";}
var p = s_date.indexOf("+");
s_date = s_date.substring(1, p);
s_date = s_date.replace("T", " ");
s += s_date;
s += " ";
s += "
";
s += "
";
s += '
';
s += "
";
s += json["Question"].Comment;
s += "
";
s += "
";
s += '
';
s += "
";
s += '回答 ';
s += '';
s_date = json["Answer"].Date; //if(typeof String.prototype.trim === 'function'){s_date=s_date;c_date=new Date(s_date);s_date=c_date.getYear()+1900;s_date+="年";s_date+=c_date.getMonth()+1;s_date+="月";s_date+=c_date.getDate();s_date+="日";s_date+=" ";s_date+=c_date.getHours();s_date+=":";s_date+=c_date.getMinutes();s_date+="分";}
p = s_date.indexOf("+");
s_date = s_date.substring(1, p);
s_date = s_date.replace("T", " ");
s += s_date;
s += " ";
s += "
";
s += "
";
s += '
';
s += "
";
s += json["Answer"].Comment;
s += "
";
s += "
";
}
$("#sellerQnA").html(s);
},
});
if (window.location.href.indexOf("#qna") != -1) {
tab2QnA();
}
// 取得問與答清單
$.ajax({
type: "POST",
url: "/config/my_qna_api.php",
xhrFields: {
withCredentials: true,
},
contentType: "application/json; charset=utf-8",
dataType: "json",
data: JSON.stringify({
token: qAToken,
action: "searchByItem",
data: {
item_id: qAItemId,
},
}),
success: function (response) {
if (response.code == "200") {
getQAndAList(response.details.data);
} else {
console.log(response);
}
},
error: function (error) {
console.log("error", error);
},
});
});
// 問與答清單
function getQAndAList(qaData) {
$(".js-q-and-a-list").addClass("is-show");
// 產生html
for (var cc = 1; cc <= qaData.length; cc++) {
var templateDom = $(".js-q-and-a-list")
.find(".js-q-and-a-item.template")
.clone()
.removeClass("template")
.addClass("clone");
$(".js-q-and-a-list").append(templateDom);
}
// 填入資料 與 顯示隱藏 html
$(".js-q-and-a-list")
.find(".js-q-and-a-item.clone")
.each(function (index, elm) {
getMyQuestion(qaData, elm, index);
getAnswer(qaData, elm, index);
});
}
// 我的發問
function getMyQuestion(qaData, elm, index) {
// var queryId = qaData[index].query_id;
const isDelete = qaData[index].is_deleted;
const isReply =
qaData[index].reply_time == "" && qaData[index].reply_time_japanese == "";
const qaList = $(elm).find(".js-q-and-a-item-my-q-name");
// 我的發問
if (qaData[index].query_id != "") {
$(elm)
.find(".js-q-and-a-item-my-q-name")
.text("投稿者:" + qaData[index].query_id.slice(0, 2) + "*****");
} else {
$(elm).find(".js-q-and-a-item-my-q-name").text("");
if (isReply) {
if (isDelete) {
$(qaList).html(
$(qaList).html() +
`
${isDelete ? "已取消問題" : "取消問題"}
`
);
$(elm).find(".js-myQnA-A").addClass("is-show");
$(elm).find(".js-myQnA-A-content").text("已取消問題");
$(elm).find(".js-myQnA-A-time").addClass("is-show");
$(elm).find(".js-myQnA-A-time").text(qaData[index].delete_time);
}
// qaList.find('.qna-cancel-btn').click(() => {
// if (!isDelete) {
// fetch('/config/my_qna_api.php', {
// method: 'POST',
// headers: new Headers({
// 'Content-Type': 'application/json; charset=utf-8',
// }),
// body: JSON.stringify({
// token: '988119d48318e9b77a6b0fecaf5291c8',
// action: 'cancel',
// data: {
// sn: qaData[index].sn,
// },
// }),
// })
// .then((response) => {
// if (response.ok) {
// return response.json();
// }
// })
// .then((res) => {
// if (res.code == '200') {
// qaList.find('.qna-cancel-btn').html('已取消問題');
// qaList.find('.qna-cancel-btn').attr('disabled', true);
// $(elm).find('.js-myQnA-A').addClass('is-show');
// $(elm).find('.js-myQnA-A-content').text('已取消問題')
// $(elm).find('.js-myQnA-A-time').addClass('is-show');
// $(elm)
// .find('.js-myQnA-A-time')
// .text(
// new Date(
// new Date().getTime() -
// new Date().getTimezoneOffset() * 60000
// )
// .toISOString()
// .slice(0, 19)
// .replace('T', ' ')
// );
// } else {
// Swal.fire({
// icon: 'error',
// title: `Oops...${res.code}`,
// text: `${res.details.message}(${res.details.target})`,
// }).then(async (result) => {
// if (result.isConfirmed) {
// window.location.reload();
// }
// });
// }
// });
// }
// });
}
}
if (qaData[index].reply_time != "") {
$(elm).find(".js-q-and-a-item-my-q-time").text(qaData[index].reply_time);
} else {
$(elm).find(".js-q-and-a-item-my-q-time").text(qaData[index].adding_time);
}
if (qaData[index].content != "") {
$(elm).find(".js-q-and-a-item-my-q-content").addClass("is-show");
$(elm)
.find(".js-q-and-a-item-my-q-content-text")
.text(qaData[index].content);
if (qaData[index].query_id != "") {
$(elm).find(".js-q-and-a-item-my-q-content-img").addClass("is-show");
}
}
if (qaData[index].content_japanese != "") {
$(elm).find(".js-q-and-a-item-my-q-content-jp").addClass("is-show");
$(elm)
.find(".js-q-and-a-item-my-q-content-jp-text")
.text(qaData[index].content_japanese);
if (qaData[index].query_id != "") {
$(elm).find(".js-q-and-a-item-my-q-content-jp-img").addClass("is-show");
}
}
}
// 回答與賣家回覆
function getAnswer(qaData, elm, index) {
if (
qaData[index].content_japanese == "" &&
qaData[index].reply_content != ""
) {
// 回答
if (qaData[index].reply_content != "") {
$(elm).find(".js-myQnA-A").addClass("is-show");
$(elm).find(".js-myQnA-A-content").text(qaData[index].reply_content);
if (
qaData[index].reply_time != "" &&
qaData[index].reply_time_japanese == ""
) {
$(elm).find(".js-myQnA-A-time").addClass("is-show");
$(elm).find(".js-myQnA-A-time").text(qaData[index].reply_time);
} else {
$(elm).find(".js-myQnA-A-time").addClass("is-show");
$(elm)
.find(".js-myQnA-A-time")
.text(qaData[index].reply_time_japanese);
}
}
} else {
// 賣家回覆
if (qaData[index].query_id != "") {
$(elm).find(".js-myQnA-A-seller").addClass("is-show");
if (qaData[index].reply_content_japanese != "") {
$(elm).find(".js-myQnA-A-seller-answer").addClass("is-show");
$(elm)
.find(".js-myQnA-A-seller-answer-time-jp")
.text(qaData[index].reply_time_japanese);
$(elm)
.find(".js-myQnA-A-seller-answer-content-jp")
.text(qaData[index].reply_content_japanese);
$(elm)
.find(".js-myQnA-A-seller-answer-content")
.text(qaData[index].reply_content);
} else {
$(elm).find(".js-myQnA-A-seller-not-answer").addClass("is-show");
}
}
}
}
// 送出提問
function leave_msg(msg_block_check) {
if (msg_block_check) {
alert("請先電話認證");
} else {
var qTitle = filter_string(
"%E7%99%BA%E8%A1%8C%E6%9E%9A%E6%95%B0%E6%BF%80%E5%B0%91%20%E5%B9%B3%E6%88%9031%E5%B9%B4%E3%80%80%E8%B2%A8%E5%B9%A3%E3%80%80%202019%E5%B9%B4%20%EF%BC%950%E5%86%86%20%EF%BC%91%E5%86%86%E3%80%80%E7%A1%AC%E8%B2%A8%E3%80%80%E3%83%9F%E3%83%B3%E3%83%88%E5%87%BA%E3%81%97%20%E6%96%B0%E5%93%81%E6%9C%AA%E4%BD%BF%E7%94%A8%20%E8%B6%85%E5%B8%8C%E5%B0%91%20%E3%82%BB%E3%83%83%E3%83%88%20%E5%90%84%EF%BC%91%E6%9E%9A%20%E3%82%B3%E3%82%A4%E3%83%B3%E3%82%B1%E3%83%BC%E3%82%B9%E5%85%A5%E3%82%8A%20%E4%BA%94%E5%8D%81%E5%86%86%20%E4%B8%80%E5%86%86"
),
qImg = "https://auc-pctr.c.yimg.jp/i/auctions.c.yimg.jp/images.auctions.yahoo.co.jp/image/dr000/auc0210/users/c7dd4042257da398c25de77200f5e39780011145/i-img812x1038-1635076724npq9mt14.jpg?pri=s&w=298&h=298&ccw=298&cch=298&fill=1&fw=298&fh=298&up=0&nf_src=sy&nf_path=images/auc/pc/top/image/1.0.3/na_170x170.png&nf_st=200",
qSellerId = "hhsoftbank",
qCategorypath = "0,20000,20452,20460,26723,2084036911,2084036920",
qEndtime = "2025-04-03 16:30:47",
qContent = $(".js-faq-content").val();
$.ajax({
type: "POST",
url: "/config/my_qna_api.php",
xhrFields: {
withCredentials: true,
},
contentType: "application/json; charset=utf-8",
dataType: "json",
data: JSON.stringify({
token: qAToken,
action: "add",
data: {
item_id: qAItemId,
title: qTitle,
img: qImg,
seller_id: qSellerId,
categorypath: qCategorypath,
endtime: qEndtime,
content: qContent,
},
}),
success: function (response) {
console.log("res", response);
if (response.code == "201") {
Swal.fire({
type: "success",
title: response.details.message,
text: "點擊OK刷新頁面",
}).then((result) => {
if (result.value) {
location.reload();
}
});
} else {
console.log(response);
}
},
error: function (error) {
console.log("error", error);
},
});
}
}
const ShippingList = `0`;
const ShoppingItemCode = "";
const itemId = "1014654582";
let dataInfo = {};
if (ShippingList > 0) {
const ItemWeight = ``;
dataInfo["sellerId"] =
"";
dataInfo["postageSet"] =
"";
dataInfo["price"] =
parseInt("") ||
parseInt("4100.00");
dataInfo["weight"] = ItemWeight ? ItemWeight : 0;
}
if (ShoppingItemCode) {
dataInfo["ShoppingItemCode"] = ShoppingItemCode;
}
dataInfo["itemId"] = itemId;
dataInfo["shipmentToken"] = shipmentToken;
// 取得代標運費
const pushItem = (arr) => {
let temp = "";
if (arr.length) {
arr.forEach((item, i) => {
temp += `
${item.Name}${
item.SinglePrice == null || item.SinglePrice == 0
? ""
: `-${item.SinglePrice}円`
}
${item.IsPrivacyDeliveryAvailable ? "(匿名賣家)" : ""} `;
});
itemLocalFee = Math.max(...arr.map(item => item.SinglePrice))
} else {
temp = `
依賣家方式寄送(商品說明) `;
}
if ($("#Right .T1 .Seller").eq(1).children(".Sellers").eq(3).length == 0) {
$("#Right .T1 .Seller").eq(1).append(`
發送方式-
參考 (依賣家寄送為主):
${temp}
`);
} else {
$("#Right .T1 .Seller").eq(1).children(".Sellers").eq(3).html(`
發送方式-
參考 (依賣家寄送為主):
${temp}
`);
}
};
const getInfo = (state) => {
$.ajax({
type: "POST",
url: "/yahoojp/auctions/get_yahoo_item_page_shipment.php",
xhrFields: {
withCredentials: true,
},
data: {
action: state
? "getCommonShipments"
: ShippingList > 0
? "getShoppingInfoShipments"
: "getItemShipments",
data: JSON.stringify(dataInfo),
},
success: function (response) {
if (response.code == "200") {
const { methods } = response.details.data;
pushItem(methods);
} else {
if (state < 1) {
getInfo(state + 1);
}
}
},
error: function (error) {
console.error("error", error);
},
});
};
getInfo(0);
請先登入在做發問
質問一覧
賣家回覆後,原始頁面中才會顯示詢問的問題