Commit 8e8d0f37 by kaisa

feat:修改半屏网页cid 补充透明底

parent 0bae3e34
Showing with 572 additions and 545 deletions
...@@ -64,125 +64,125 @@ function webAppComm() { ...@@ -64,125 +64,125 @@ function webAppComm() {
this.langList = [ this.langList = [
// 简中 // 简中
{ {
'lang1': '活动规则', lang1: "活动规则",
'lang2': '刷新', lang2: "刷新",
'lang3': '客服咨询', lang3: "客服咨询",
'lang4': '推荐朋友', lang4: "推荐朋友",
'lang5': '活动专区', lang5: "活动专区",
'lang6': '关闭页面', lang6: "关闭页面",
'lang7': '露水', lang7: "露水",
'lang8': '宝石' lang8: "宝石",
}, },
//1英文 //1英文
{ {
'lang1': 'Events Rule', lang1: "Events Rule",
'lang2': 'Refresh', lang2: "Refresh",
'lang3': 'Customer Service', lang3: "Customer Service",
'lang4': 'Compartir', lang4: "Compartir",
'lang5': 'Event Zone', lang5: "Event Zone",
'lang6': 'Close Page', lang6: "Close Page",
'lang7': 'DEWs', lang7: "DEWs",
'lang8': 'GEMs' lang8: "GEMs",
}, },
//2繁体 //2繁体
{ {
'lang1': '活動規則', lang1: "活動規則",
'lang2': '刷新', lang2: "刷新",
'lang3': '客服咨詢', lang3: "客服咨詢",
'lang4': '推薦朋友', lang4: "推薦朋友",
'lang5': '活動專區', lang5: "活動專區",
'lang6': '關閉頁面', lang6: "關閉頁面",
'lang7': '露水', lang7: "露水",
'lang8': '寶石' lang8: "寶石",
}, },
//3泰语 //3泰语
{ {
'lang1': 'กฎกติกากิจกรรม', lang1: "กฎกติกากิจกรรม",
'lang2': 'รีเฟรช', lang2: "รีเฟรช",
'lang3': 'บริการลูกค้า', lang3: "บริการลูกค้า",
'lang4': 'แชร์', lang4: "แชร์",
'lang5': 'โซนกิจกรรม', lang5: "โซนกิจกรรม",
'lang6': 'ปิดหน้านี้', lang6: "ปิดหน้านี้",
'lang7': 'DEWs', lang7: "DEWs",
'lang8': 'GEMs' lang8: "GEMs",
}, },
//4日语 //4日语
{ {
'lang1': 'イベントルール', lang1: "イベントルール",
'lang2': '更新する', lang2: "更新する",
'lang3': 'カスタマーサービス', lang3: "カスタマーサービス",
'lang4': '共有', lang4: "共有",
'lang5': 'イベントゾーン', lang5: "イベントゾーン",
'lang6': 'ページを閉じる', lang6: "ページを閉じる",
'lang7': 'DEWs', lang7: "DEWs",
'lang8': 'GEMs' lang8: "GEMs",
}, },
//5印尼 //5印尼
{ {
'lang1': 'Aturan acara', lang1: "Aturan acara",
'lang2': 'Segarkan', lang2: "Segarkan",
'lang3': 'Layanan Pelanggan', lang3: "Layanan Pelanggan",
'lang4': 'Bagikan', lang4: "Bagikan",
'lang5': 'Zona Acara', lang5: "Zona Acara",
'lang6': 'Tutup halaman', lang6: "Tutup halaman",
'lang7': 'DEWs', lang7: "DEWs",
'lang8': 'GEMs' lang8: "GEMs",
}, },
//6 //6
{ {
'lang1': 'Events Rule', lang1: "Events Rule",
'lang2': 'Refresh', lang2: "Refresh",
'lang3': 'Customer Service', lang3: "Customer Service",
'lang4': 'Compartir', lang4: "Compartir",
'lang5': 'Event Zone', lang5: "Event Zone",
'lang6': 'Close Page', lang6: "Close Page",
'lang7': 'DEWs', lang7: "DEWs",
'lang8': 'GEMs' lang8: "GEMs",
}, },
//7阿拉伯 //7阿拉伯
{ {
'lang1': 'قواعد الحدث', lang1: "قواعد الحدث",
'lang2': 'تحديث', lang2: "تحديث",
'lang3': 'خدمة العملاء', lang3: "خدمة العملاء",
'lang4': 'مشاركة', lang4: "مشاركة",
'lang5': 'منطقة الفعاليات', lang5: "منطقة الفعاليات",
'lang6': 'إغلاق الصفحة', lang6: "إغلاق الصفحة",
'lang7': 'DEWs', lang7: "DEWs",
'lang8': 'GEMs' lang8: "GEMs",
}, },
//8越南 //8越南
{ {
'lang1': 'Quy tắc sự kiện', lang1: "Quy tắc sự kiện",
'lang2': 'Làm mới', lang2: "Làm mới",
'lang3': 'Dịch vụ khách hàng', lang3: "Dịch vụ khách hàng",
'lang4': 'Chia sẻ', lang4: "Chia sẻ",
'lang5': 'Khu vực sự kiện', lang5: "Khu vực sự kiện",
'lang6': 'Đóng trang', lang6: "Đóng trang",
'lang7': 'DEWs', lang7: "DEWs",
'lang8': 'GEMs' lang8: "GEMs",
}, },
//9韩文 //9韩文
{ {
'lang1': 'Events Rule', lang1: "Events Rule",
'lang2': 'Refresh', lang2: "Refresh",
'lang3': 'Customer Service', lang3: "Customer Service",
'lang4': 'Compartir', lang4: "Compartir",
'lang5': 'Event Zone', lang5: "Event Zone",
'lang6': 'Close Page', lang6: "Close Page",
'lang7': 'DEWs', lang7: "DEWs",
'lang8': 'GEMs' lang8: "GEMs",
}, },
//10西班牙 //10西班牙
{ {
'lang1': 'Reglas del evento', lang1: "Reglas del evento",
'lang2': 'Actualizar', lang2: "Actualizar",
'lang3': 'Servicio al Cliente', lang3: "Servicio al Cliente",
'lang4': 'Share', lang4: "Share",
'lang5': 'Zona de Eventos', lang5: "Zona de Eventos",
'lang6': 'Cerrar página', lang6: "Cerrar página",
'lang7': 'DEWs', lang7: "DEWs",
'lang8': 'GEMs' lang8: "GEMs",
} },
]; ];
this.urlData = this.url_get_params(location.href); this.urlData = this.url_get_params(location.href);
this.langType = this.urlData.lang; this.langType = this.urlData.lang;
...@@ -191,136 +191,150 @@ function webAppComm() { ...@@ -191,136 +191,150 @@ function webAppComm() {
//3:分享 //3:分享
webAppComm.prototype.goShare = function (shareContent, shareType) { webAppComm.prototype.goShare = function (shareContent, shareType) {
let mShare = shareType || { //1图片 2文字 3网页 let mShare = shareType || {
"wechat": 3, //1图片 2文字 3网页
"wechat_moment": 3, wechat: 3,
"facebook": 3, wechat_moment: 3,
"line": 3, facebook: 3,
"link": 3, line: 3,
"whatsApp": 3, link: 3,
"twitter": 3 whatsApp: 3,
} twitter: 3,
};
let obj = { let obj = {
"cid": 3, cid: 3,
"reqCode": new Date().getTime(), reqCode: new Date().getTime(),
"data": { data: {
"shareContent": shareContent, shareContent: shareContent,
"shareType": mShare shareType: mShare,
} },
};
}
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2) webAppCollaboration(obj2);
} };
//4:客服 //4:客服
webAppComm.prototype.goCustomerService = function () { webAppComm.prototype.goCustomerService = function () {
let obj = { let obj = {
"cid": 4, cid: 4,
"reqCode": new Date().getTime(), reqCode: new Date().getTime(),
"data": { data: {
"msg": "Hi,請問有什麼可以幫到您?", msg: "Hi,請問有什麼可以幫到您?",
"customerLayer": 1, customerLayer: 1,
"uid": 1000, uid: 1000,
"face": 'https://app.ixiulive.com/static/images/yhx.png', face: "https://app.ixiulive.com/static/images/yhx.png",
"nickname": "客服", nickname: "客服",
"title": "客服", title: "客服",
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2) webAppCollaboration(obj2);
} };
//5:跳转外部浏览器 //5:跳转外部浏览器
webAppComm.prototype.goExternalWeb = function (h5Url) { webAppComm.prototype.goExternalWeb = function (h5Url) {
let obj = { let obj = {
"cid": 5, cid: 5,
"reqCode": new Date().getTime(), reqCode: new Date().getTime(),
"data": { data: {
"url": h5Url, url: h5Url,
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
//6:打开兑换宝石页面 //6:打开兑换宝石页面
webAppComm.prototype.goExchangeGem = function () { webAppComm.prototype.goExchangeGem = function () {
let obj = { let obj = {
"cid": 6, cid: 6,
"reqCode": new Date().getTime(), reqCode: new Date().getTime(),
"data": { data: {
"msg": '打开兑换寶石' msg: "打开兑换寶石",
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
//7:绑定手机 //7:绑定手机
webAppComm.prototype.goBindPhone = function () { webAppComm.prototype.goBindPhone = function () {
let obj2 = { let obj2 = {
"cid": 7, cid: 7,
"reqCode": new Date().getTime(), reqCode: new Date().getTime(),
"data": { data: {
msg: '点击跳转绑定手机页面', msg: "点击跳转绑定手机页面",
} },
} };
let obj = JSON.stringify(obj2); let obj = JSON.stringify(obj2);
webAppCollaboration(obj); webAppCollaboration(obj);
} };
//8:绑定微信 //8:绑定微信
webAppComm.prototype.goBindWechat = function () { webAppComm.prototype.goBindWechat = function () {
let obj2 = { let obj2 = {
"cid": 8, cid: 8,
"reqCode": new Date().getTime(), reqCode: new Date().getTime(),
"data": { data: {
msg: '跳转微信绑定页面' msg: "跳转微信绑定页面",
} },
} };
let obj = JSON.stringify(obj2); let obj = JSON.stringify(obj2);
webAppCollaboration(obj) webAppCollaboration(obj);
} };
//弹出帮助 //弹出帮助
webAppComm.prototype.needHelp = function () { webAppComm.prototype.needHelp = function () {
let obj = { let obj = {
"cid": 9, cid: 9,
"reqCode": new Date().getTime(), reqCode: new Date().getTime(),
"data": { data: {
msg: '是否分享或帮助', msg: "是否分享或帮助",
shareType: 1, shareType: 1,
helpType: 0, helpType: 0,
} },
} };
let obj2 = JSON.stringify(obj) let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2) webAppCollaboration(obj2);
} };
//10:确认是否有该APP //10:确认是否有该APP
webAppComm.prototype.ifHasApp = function (type) { //1微信 2line 3facebook 4Twitter 5WhatsApp 6微博 7QQ webAppComm.prototype.ifHasApp = function (type) {
//1微信 2line 3facebook 4Twitter 5WhatsApp 6微博 7QQ
let obj2 = { let obj2 = {
"cid": 10, cid: 10,
"reqCode": new Date().getTime(), reqCode: new Date().getTime(),
"data": { data: {
msg: '點擊確認有沒有這個APP', msg: "點擊確認有沒有這個APP",
type: type type: type,
} },
} };
let obj = JSON.stringify(obj2); let obj = JSON.stringify(obj2);
webAppCollaboration(obj) webAppCollaboration(obj);
} };
//12:跳转 //12:跳转
webAppComm.prototype.goOthers = function (jumptype, url = '', isHide, gid, topicId = '', uid) { webAppComm.prototype.goOthers = function (
let arr = { 16: '去儲值', 18: '跳轉到座駕', 3: '跳轉集合功能', 13: 'VIP中心', 26: '设置' }; jumptype,
url = "",
isHide,
gid,
topicId = "",
uid,
) {
let arr = {
16: "去儲值",
18: "跳轉到座駕",
3: "跳轉集合功能",
13: "VIP中心",
26: "设置",
};
let obj = { let obj = {
"cid": 12, cid: 12,
"reqCode": new Date().getTime(), reqCode: new Date().getTime(),
"data": { data: {
"msg": arr[jumptype], msg: arr[jumptype],
"jumptype": jumptype, jumptype: jumptype,
/* /*
jumptype: jumptype:
2:跳转到另一个网页 2:跳转到另一个网页
...@@ -340,182 +354,179 @@ webAppComm.prototype.goOthers = function (jumptype, url = '', isHide, gid, topic ...@@ -340,182 +354,179 @@ webAppComm.prototype.goOthers = function (jumptype, url = '', isHide, gid, topic
72:半屏资料卡 72:半屏资料卡
"jumptype": jumptype, "jumptype": jumptype,
*/ */
"url": url, //41 42时传入礼物id。 url: url, //41 42时传入礼物id。
"topicId": topicId, // 贴文id topicId: topicId, // 贴文id
"hideTitle": isHide, // 1隐藏头部,0 不隐藏, 默认为0 hideTitle: isHide, // 1隐藏头部,0 不隐藏, 默认为0
"gid": gid, // 礼物列表类别 gid: gid, // 礼物列表类别
"uid": uid // 用户ID uid: uid, // 用户ID
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
//14:关闭网页 //14:关闭网页
webAppComm.prototype.closeWebView = function (callback) { webAppComm.prototype.closeWebView = function (callback) {
callback && callback(); callback && callback();
let obj = { let obj = {
"cid": 14, cid: 14,
"reqCode": new Date().getTime(), reqCode: new Date().getTime(),
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
//15:打开多网页面板 //15:打开多网页面板
webAppComm.prototype.openRecords = function (urls, type) { webAppComm.prototype.openRecords = function (urls, type) {
let obj = { let obj = {
"cid": 15, cid: 15,
"reqCode": new Date().getTime(), reqCode: new Date().getTime(),
"data": { data: {
"urls": [ urls: [
{ {
"url": $url + '/Nesting/recording/gem.html' + window.location.search, url: $url + "/Nesting/recording/gem.html" + window.location.search,
"title": langList[langType].dew18, title: langList[langType].dew18,
"rightBtnImageURL": '', rightBtnImageURL: "",
"rightBtnClickURL": '' rightBtnClickURL: "",
}, },
{ {
"url": $url + '/Nesting/recording/dew.html' + window.location.search, url: $url + "/Nesting/recording/dew.html" + window.location.search,
"title": langList[langType].dewExchangeTitle3, title: langList[langType].dewExchangeTitle3,
"rightBtnImageURL": '', rightBtnImageURL: "",
"rightBtnClickURL": '' rightBtnClickURL: "",
} },
], ],
"select": type, select: type,
"titleColor": "", titleColor: "",
"titleSelectedColor": "", titleSelectedColor: "",
"titleBackground": '', titleBackground: "",
},
} };
}
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
appCollaboration(obj2); appCollaboration(obj2);
} };
//18: 关闭當前网页并弹出VIP购买页面(tips:这个cid不能直接通过window.$firefly.showVip()调用,得通过直接的"cid": 18的方式调用,不然会失效) //18: 关闭當前网页并弹出VIP购买页面(tips:这个cid不能直接通过window.$firefly.showVip()调用,得通过直接的"cid": 18的方式调用,不然会失效)
webAppComm.prototype.showVip = function (orderId) { webAppComm.prototype.showVip = function (orderId) {
let obj = { let obj = {
"cid": 18, cid: 18,
"reqCode": new Date().getTime(), reqCode: new Date().getTime(),
"data": { data: {
"msg": "关闭当前网页并弹出VIP购买页面", msg: "关闭当前网页并弹出VIP购买页面",
"orderId": orderId, orderId: orderId,
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
} };
//19: 打开开通守护 //19: 打开开通守护
webAppComm.prototype.buyGuard = function (roomid) { webAppComm.prototype.buyGuard = function (roomid) {
let obj = { let obj = {
"cid": 19, cid: 19,
"reqCode": new Date().getTime(), reqCode: new Date().getTime(),
"data": { data: {
"msg": "打开开通守护", msg: "打开开通守护",
"roomid": roomid, roomid: roomid,
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
} };
//21:隐藏客户端顶部 //21:隐藏客户端顶部
webAppComm.prototype.hideTopBar = function () { webAppComm.prototype.hideTopBar = function () {
let obj = { let obj = {
"cid": 21, cid: 21,
"reqCode": new Date().getTime(), reqCode: new Date().getTime(),
"data": { data: {
"msg": "web关闭网页方法加载完成向客户端通知", msg: "web关闭网页方法加载完成向客户端通知",
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
//23:自動添加直播間聊天消息 //23:自動添加直播間聊天消息
webAppComm.prototype.addLiveMsg = function (content) { webAppComm.prototype.addLiveMsg = function (content) {
let obj = { let obj = {
"cid": 23, cid: 23,
"reqCode": new Date().getTime(), reqCode: new Date().getTime(),
"data": { data: {
"msg": "H5调起消息输入框", msg: "H5调起消息输入框",
"closeType": 1, closeType: 1,
"content": content, content: content,
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
//26:左上角添加联系客服 //26:左上角添加联系客服
webAppComm.prototype.addTopLeftService = function (data) { webAppComm.prototype.addTopLeftService = function (data) {
let obj = { let obj = {
"cid": 26, cid: 26,
"reqCode": new Date().getTime(), reqCode: new Date().getTime(),
"data": { data: {
"msg": "左上角上角添加 联系客服", msg: "左上角上角添加 联系客服",
"type": 1, type: 1,
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
//27:唤起谷歌、苹果支付 //27:唤起谷歌、苹果支付
webAppComm.prototype.oriCharge = function (data) { webAppComm.prototype.oriCharge = function (data) {
let obj = { let obj = {
"cid": 27, cid: 27,
"reqCode": new Date().getTime(), reqCode: new Date().getTime(),
"data": { data: {
"msg": "直接唤起 苹果支付 和 google支付", msg: "直接唤起 苹果支付 和 google支付",
"pid": data.pid, pid: data.pid,
"packageid": data.packageid, packageid: data.packageid,
"chargeInfo": data.info, chargeInfo: data.info,
"succeedAlert": data.alert succeedAlert: data.alert,
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
console.log(obj2) console.log(obj2);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 28:判断是否可以在外部关闭webview // 28:判断是否可以在外部关闭webview
// closeType 0:点击区域外关闭 1:点击区域外不关闭 // closeType 0:点击区域外关闭 1:点击区域外不关闭
webAppComm.prototype.closeOutSideWebView = function (closeType) { webAppComm.prototype.closeOutSideWebView = function (closeType) {
let obj = { let obj = {
"cid": 28, cid: 28,
"reqCode": new Date().getTime(), reqCode: new Date().getTime(),
"data": { data: {
"msg": "判断是否外部关闭webview", msg: "判断是否外部关闭webview",
"closeType ": closeType, "closeType ": closeType,
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
console.log(obj2) console.log(obj2);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 30:注销账号后退出 // 30:注销账号后退出
webAppComm.prototype.logOff = function (data) { webAppComm.prototype.logOff = function (data) {
let obj = { let obj = {
"cid": 30, cid: 30,
"reqCode": new Date().getTime(), reqCode: new Date().getTime(),
"data": { data: {
"msg": "注销账号后退出", msg: "注销账号后退出",
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 31: 打开半屏网页 // 31: 打开半屏网页
webAppComm.prototype.openHalfWeb = function (param) { webAppComm.prototype.openHalfWeb = function (param) {
let obj = { let obj = {
"cid": 31, cid: 31,
"data": { data: {
popupType: param.type, //popupType 1全屏2半屏3浮动屏(默认居中) popupType: param.type, //popupType 1全屏2半屏3浮动屏(默认居中)
heightR: param.height, //heightR 弹窗高度 单位vw 安卓不允许 传小数; heightR: param.height, //heightR 弹窗高度 单位vw 安卓不允许 传小数;
widthR: param.width, //widthR 弹窗宽度vw widthR: param.width, //widthR 弹窗宽度vw
...@@ -529,8 +540,9 @@ webAppComm.prototype.openHalfWeb = function (param) { ...@@ -529,8 +540,9 @@ webAppComm.prototype.openHalfWeb = function (param) {
afterReady: param.afterReady, // afterReady 是否加载完成后再显示。 0否 1是。 默认为0, afterReady: param.afterReady, // afterReady 是否加载完成后再显示。 0否 1是。 默认为0,
needMounted: param.needMounted, //ios专用 0不独立 1独立。 默认是0. needMounted: param.needMounted, //ios专用 0不独立 1独立。 默认是0.
allowScroll: param.allowScroll, //是否允许直播间滑动 0不允许 1允许 默认为1. allowScroll: param.allowScroll, //是否允许直播间滑动 0不允许 1允许 默认为1.
} transparency: 1, //是否透明 0不透明 1透明 默认为0.
} },
};
if (param.top || param.top === 0) { if (param.top || param.top === 0) {
obj.data.top = param.top; obj.data.top = param.top;
} }
...@@ -545,115 +557,114 @@ webAppComm.prototype.openHalfWeb = function (param) { ...@@ -545,115 +557,114 @@ webAppComm.prototype.openHalfWeb = function (param) {
} }
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
//32:webview右上角的icon //32:webview右上角的icon
webAppComm.prototype.showIcons = function (infos) { webAppComm.prototype.showIcons = function (infos) {
let obj = { let obj = {
"cid": 32, //新的右上角展示 cid: 32, //新的右上角展示
"data": { data: {
"msg": "h5网页右上角显示图标", msg: "h5网页右上角显示图标",
"info": infos, info: infos,
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
//33:打开更多功能面板 //33:打开更多功能面板
webAppComm.prototype.openExtra = function (infos) { webAppComm.prototype.openExtra = function (infos) {
let obj = { let obj = {
"cid": 33, //打开额外功能面板 cid: 33, //打开额外功能面板
"data": { data: {
"msg": '打开额外功能面板', msg: "打开额外功能面板",
"info": infos info: infos,
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
//修改网页标题 //修改网页标题
webAppComm.prototype.changeTitle = function (param) { webAppComm.prototype.changeTitle = function (param) {
let obj = { let obj = {
"cid": 34, //修改网页title 居中显示。 cid: 34, //修改网页title 居中显示。
"data": { data: {
"type": param.type, //1 图片 2文本。 type: param.type, //1 图片 2文本。
"imgTxt": param.text, imgTxt: param.text,
"imgUrl": param.url, //1 imgUrl: param.url, //1
"style": { style: {
//图片 //图片
"width": param.w, //1 width: param.w, //1
"height": param.h, //1 height: param.h, //1
} },
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
//修改网页标题(中间默认Firefly Icon) //修改网页标题(中间默认Firefly Icon)
webAppComm.prototype.changeTitle1 = function () { webAppComm.prototype.changeTitle1 = function () {
let obj = { let obj = {
"cid": 34, //修改网页title 居中显示。 cid: 34, //修改网页title 居中显示。
"data": { data: {
"type": 1, //1 图片 2文本。 type: 1, //1 图片 2文本。
"imgUrl": 'https://app.ixiulive.com/static/app/img/title.png?v=20230425', //1 imgUrl: "https://app.ixiulive.com/static/app/img/title.png?v=20230425", //1
"style": { style: {
//图片 //图片
"width": '300', //1 width: "300", //1
"height": '120', //1 height: "120", //1
} },
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
//修改网页标题(中间只显示文本标题-默认取网页的title标题的值) //修改网页标题(中间只显示文本标题-默认取网页的title标题的值)
webAppComm.prototype.changeTitle2 = function () { webAppComm.prototype.changeTitle2 = function () {
let obj = { let obj = {
"cid": 34, //修改网页title 居中显示。 cid: 34, //修改网页title 居中显示。
"data": { data: {
"type": 2, //1 图片 2文本。 type: 2, //1 图片 2文本。
"imgTxt": $("title").text(),//2 imgTxt: $("title").text(), //2
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
//修改网页标题(根据传入的图片设定标题中间Icon) //修改网页标题(根据传入的图片设定标题中间Icon)
webAppComm.prototype.changeTitle3 = function (imgUrl, param) { webAppComm.prototype.changeTitle3 = function (imgUrl, param) {
let obj = { let obj = {
"cid": 34, //修改网页title 居中显示。 cid: 34, //修改网页title 居中显示。
"data": { data: {
"type": 1, //1 图片 2文本。 type: 1, //1 图片 2文本。
"imgUrl": imgUrl, imgUrl: imgUrl,
"style": { style: {
//图片 //图片
"width": param.width, //1 width: param.width, //1
"height": param.height, //1 height: param.height, //1
} },
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 修改网页标题(中间只显示文本标题-根据传入的值来定义) // 修改网页标题(中间只显示文本标题-根据传入的值来定义)
webAppComm.prototype.changeTitle4 = function (title) { webAppComm.prototype.changeTitle4 = function (title) {
let obj = { let obj = {
"cid": 34, //修改网页title 居中显示。 cid: 34, //修改网页title 居中显示。
"data": { data: {
"type": 2, //1 图片 2文本。 type: 2, //1 图片 2文本。
"imgTxt": title, imgTxt: title,
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
//刷新网页 //刷新网页
webAppComm.prototype.refreshWeb = function (callback) { webAppComm.prototype.refreshWeb = function (callback) {
...@@ -661,95 +672,95 @@ webAppComm.prototype.refreshWeb = function (callback) { ...@@ -661,95 +672,95 @@ webAppComm.prototype.refreshWeb = function (callback) {
if (this.needRefresh) { if (this.needRefresh) {
location.reload(); location.reload();
} }
} };
// 35:打开游戏 // 35:打开游戏
webAppComm.prototype.goGame = function (mData) { webAppComm.prototype.goGame = function (mData) {
let obj = { let obj = {
"cid": 35, cid: 35,
"data": mData data: mData,
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 36:播放動畫 // 36:播放動畫
webAppComm.prototype.playAnimate = function (mData) { webAppComm.prototype.playAnimate = function (mData) {
let obj = { let obj = {
"cid": 36, cid: 36,
"data": mData data: mData,
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 37:web加载完毕 // 37:web加载完毕
webAppComm.prototype.domReady = function (mData) { webAppComm.prototype.domReady = function (mData) {
let obj = { let obj = {
"cid": 37, cid: 37,
"data": mData data: mData,
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 38:web打开/关闭签到提醒 // 38:web打开/关闭签到提醒
webAppComm.prototype.openSignRemind = function () { webAppComm.prototype.openSignRemind = function () {
let obj = { let obj = {
"cid": 38, cid: 38,
"data": { data: {
"msg": '打开签到提醒' msg: "打开签到提醒",
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 39: 告知客户端渠道信息和uid // 39: 告知客户端渠道信息和uid
webAppComm.prototype.sendBindInfos = function (cid, uid, lang, type, origin) { webAppComm.prototype.sendBindInfos = function (cid, uid, lang, type, origin) {
let obj = { let obj = {
"cid": 39, cid: 39,
"data": { data: {
"channelId": cid, channelId: cid,
"agentUid": uid, agentUid: uid,
"lang": lang, lang: lang,
"bindType": type, bindType: type,
"origin": origin origin: origin,
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 40: 跳转任务界面 // 40: 跳转任务界面
webAppComm.prototype.jumpToTask = function (type) { webAppComm.prototype.jumpToTask = function (type) {
let obj = { let obj = {
"cid": 40, cid: 40,
"data": { data: {
"taskType": type // 1:新手任务 2:每日任务 3:主播任务 4:奖励领取 taskType: type, // 1:新手任务 2:每日任务 3:主播任务 4:奖励领取
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
//41: 修改webview的背景底色 //41: 修改webview的背景底色
webAppComm.prototype.setBackground = function (color, color2) { webAppComm.prototype.setBackground = function (color, color2) {
let obj = { let obj = {
"cid": 41, cid: 41,
"data": { data: {
"background": color, // # color值为HEX色值 例:#FFFFFF, background: color, // # color值为HEX色值 例:#FFFFFF,
"AHEX": color2 // # color2值为AHEX色值 例:#FFFFFFFF, AHEX: color2, // # color2值为AHEX色值 例:#FFFFFFFF,
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
//42: 手机振动 //42: 手机振动
webAppComm.prototype.toVibrate = function (duration) { webAppComm.prototype.toVibrate = function (duration) {
...@@ -757,274 +768,282 @@ webAppComm.prototype.toVibrate = function (duration) { ...@@ -757,274 +768,282 @@ webAppComm.prototype.toVibrate = function (duration) {
let numDuration = Number(duration); let numDuration = Number(duration);
let obj = { let obj = {
"cid": 42, cid: 42,
"data": { data: {
"duration": numDuration // 此时保证是 Number 类型 duration: numDuration, // 此时保证是 Number 类型
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
//43: 修改webview宽高 //43: 修改webview宽高
webAppComm.prototype.setRatio = function (type, wr, hr, position, unit) { webAppComm.prototype.setRatio = function (type, wr, hr, position, unit) {
let obj = { let obj = {
"cid": 43, cid: 43,
"data": { data: {
"type": type, //1活动框架 2游戏框架。 type: type, //1活动框架 2游戏框架。
"width": wr, // #单位为vw 默认值为-1 未传或传-1时,则不修改宽度 width: wr, // #单位为vw 默认值为-1 未传或传-1时,则不修改宽度
"height": hr, //单位为vw 默认值为-1 未传或传-1时,则不修改高度 height: hr, //单位为vw 默认值为-1 未传或传-1时,则不修改高度
"position": position, // 1右贴边 2左贴边 默认右贴边。 position: position, // 1右贴边 2左贴边 默认右贴边。
"unit": unit, //单位 默认1 vw 2 pt unit: unit, //单位 默认1 vw 2 pt
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
//44: 调起第三方并获取OpenId(7570版本以上 //44: 调起第三方并获取OpenId(7570版本以上
webAppComm.prototype.vertify = function (type, callBackName) { webAppComm.prototype.vertify = function (type, callBackName) {
let obj = { let obj = {
"cid": 44, cid: 44,
"data": { data: {
"type": type, //1:QQ 2:微信 3:微博 4:Google 5:Twitter 6:FaceBook 8:line 9:appleId type: type, //1:QQ 2:微信 3:微博 4:Google 5:Twitter 6:FaceBook 8:line 9:appleId
"callBackName": callBackName, callBackName: callBackName,
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
//45: 与客户端同步H5客服聊天消息 //45: 与客户端同步H5客服聊天消息
webAppComm.prototype.syncChatHis = function (type, content, timeStr) { webAppComm.prototype.syncChatHis = function (type, content, timeStr) {
let obj = { let obj = {
"cid": 45, //客服聊天用,与客户端同步本地发送信息 cid: 45, //客服聊天用,与客户端同步本地发送信息
"data": { data: {
"type": type, //1文字 2图片 type: type, //1文字 2图片
"content": content, content: content,
"time": timeStr //发送聊天时间戳 time: timeStr, //发送聊天时间戳
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
//46: 将图片存入相册 //46: 将图片存入相册
webAppComm.prototype.savePhoto = function (imgUrl) { webAppComm.prototype.savePhoto = function (imgUrl) {
let obj = { let obj = {
"cid": 46, //将图片存入相册 cid: 46, //将图片存入相册
"data": { data: {
'imgUrl': imgUrl //照片地址 imgUrl: imgUrl, //照片地址
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
//47: 通知客户端直播奖励小窗抖动 //47: 通知客户端直播奖励小窗抖动
webAppComm.prototype.liveShakes = function () { webAppComm.prototype.liveShakes = function () {
let obj = { let obj = {
"cid": 47, cid: 47,
"data": { data: {
"msg": '窗口抖动' msg: "窗口抖动",
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 48:弹出用户行为规范弹窗 // 48:弹出用户行为规范弹窗
webAppComm.prototype.userBehaviorSpecification = function (type) { webAppComm.prototype.userBehaviorSpecification = function (type) {
let obj = { let obj = {
"cid": 48, cid: 48,
"reqCode": new Date().getTime(), reqCode: new Date().getTime(),
"data": { data: {
'type': type type: type,
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 49: base64格式图片保存到相册 // 49: base64格式图片保存到相册
webAppComm.prototype.saveImgToAlbum = function (imgUrl) { webAppComm.prototype.saveImgToAlbum = function (imgUrl) {
let obj = { let obj = {
"cid": 49, cid: 49,
"data": { data: {
'base64Url': imgUrl //照片地址 base64Url: imgUrl, //照片地址
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 50: 网页在直播间唤起输入框并且粘贴文本到输入框 // 50: 网页在直播间唤起输入框并且粘贴文本到输入框
webAppComm.prototype.evokeIptPasteText = function (text, closeType) { webAppComm.prototype.evokeIptPasteText = function (text, closeType) {
let obj = { let obj = {
"cid": 50, cid: 50,
"data": { data: {
'content': text, //文本内容 content: text, //文本内容
'closeType': closeType //0:关闭输入框 1:不关闭输入框 closeType: closeType, //0:关闭输入框 1:不关闭输入框
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 51: 通知安卓客户端活动窗口宽高 // 51: 通知安卓客户端活动窗口宽高
webAppComm.prototype.setWidthHeigth = function (type, wr, hr, position, unit) { webAppComm.prototype.setWidthHeigth = function (type, wr, hr, position, unit) {
let obj = { let obj = {
"cid": 51, cid: 51,
"data": { data: {
"type": type, //1活动框架 2游戏框架。 type: type, //1活动框架 2游戏框架。
"width": wr, // #单位为vw 默认值为-1 未传或传-1时,则不修改宽度 width: wr, // #单位为vw 默认值为-1 未传或传-1时,则不修改宽度
"height": hr, //单位为vw 默认值为-1 未传或传-1时,则不修改高度 height: hr, //单位为vw 默认值为-1 未传或传-1时,则不修改高度
"position": position, // 1右贴边 2左贴边 默认右贴边。 position: position, // 1右贴边 2左贴边 默认右贴边。
"unit": unit, //单位 默认1 vw 2 pt unit: unit, //单位 默认1 vw 2 pt
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 52:通知ios客户端返回home键高度 // 52:通知ios客户端返回home键高度
webAppComm.prototype.setHomeHeight = function () { webAppComm.prototype.setHomeHeight = function () {
let obj = { let obj = {
"cid": 52, cid: 52,
"data": { data: {
"msg": '返回home键高度' msg: "返回home键高度",
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 53:直播间跳转全屏任务中心页面 // 53:直播间跳转全屏任务中心页面
webAppComm.prototype.jumpToTaskCenter = function (type) { webAppComm.prototype.jumpToTaskCenter = function (type) {
let obj = { let obj = {
"cid": 53, cid: 53,
"data": { data: {
"taskType": type // 1:新手任务 2:每日任务 3:主播任务 4:奖励领取 taskType: type, // 1:新手任务 2:每日任务 3:主播任务 4:奖励领取
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 54:添加系统日历提醒 // 54:添加系统日历提醒
webAppComm.prototype.calendarReminders = function (title, content, time, tipContent) { webAppComm.prototype.calendarReminders = function (
title,
content,
time,
tipContent,
) {
let obj = { let obj = {
"cid": 54, cid: 54,
"data": { data: {
"title": title, title: title,
"content": content, content: content,
"time": time, //时间戳 time: time, //时间戳
"type": 1, // 1:只提醒一次 2:每周都提醒一次 type: 1, // 1:只提醒一次 2:每周都提醒一次
"durationTime": 10,//持续时间 durationTime: 10, //持续时间
"reminderTime": 5,//提前多久提醒 reminderTime: 5, //提前多久提醒
"tipContent": tipContent // 添加日历提示内容 tipContent: tipContent, // 添加日历提示内容
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 55: 打开外部对应APP并链接到对应的账号 // 55: 打开外部对应APP并链接到对应的账号
webAppComm.prototype.openChatApp = function (appType, officialId) { webAppComm.prototype.openChatApp = function (appType, officialId) {
let obj = { let obj = {
"cid": 55, cid: 55,
"data": { data: {
"appType": appType, // whatsapp、line、wechat appType: appType, // whatsapp、line、wechat
"officialId": officialId officialId: officialId,
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 56: 返回原生上一层(flutter使用) // 56: 返回原生上一层(flutter使用)
webAppComm.prototype.backOriginApp = function () { webAppComm.prototype.backOriginApp = function () {
let obj = { let obj = {
"cid": 56, cid: 56,
"data": { data: {
"msg": '返回原生上一层' msg: "返回原生上一层",
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 57:开启/加入游戏房间 // 57:开启/加入游戏房间
webAppComm.prototype.joinGameRoom = function (isOpenGameRoom, roomId, gameType) { webAppComm.prototype.joinGameRoom = function (
isOpenGameRoom,
roomId,
gameType,
) {
let obj = { let obj = {
"cid": 57, cid: 57,
"data": { data: {
"msg": '开启/加入游戏房间', msg: "开启/加入游戏房间",
"isOpenGameRoom": isOpenGameRoom, //0 开启房间 1 加入房间 isOpenGameRoom: isOpenGameRoom, //0 开启房间 1 加入房间
"roomId": roomId, roomId: roomId,
"gameType": gameType, //游戏类型 1001:LUDO (后续增加) gameType: gameType, //游戏类型 1001:LUDO (后续增加)
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 58: 告知客户端是否打开原生侧滑返回手势(flutter使用) // 58: 告知客户端是否打开原生侧滑返回手势(flutter使用)
webAppComm.prototype.setNativeSwipeBackEnabled = function (enabled) { webAppComm.prototype.setNativeSwipeBackEnabled = function (enabled) {
let obj = { let obj = {
"cid": 58, cid: 58,
"data": { data: {
"msg": '是否打开原生侧滑返回手势', msg: "是否打开原生侧滑返回手势",
"enabled": enabled, enabled: enabled,
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 59:上麦/下麦 // 59:上麦/下麦
webAppComm.prototype.micOnOff = function (type) { webAppComm.prototype.micOnOff = function (type) {
let obj = { let obj = {
"cid": 59, cid: 59,
"data": { data: {
"micType": type, // 0:上麦 1:下麦 micType: type, // 0:上麦 1:下麦
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 60:隐藏客户端标题头部 // 60:隐藏客户端标题头部
webAppComm.prototype.hideClientTitle = function (type) { webAppComm.prototype.hideClientTitle = function (type) {
let obj = { let obj = {
"cid": 60, cid: 60,
"data": { data: {
"isHide": type, // 1隐藏头部,0 不隐藏, 默认为0 isHide: type, // 1隐藏头部,0 不隐藏, 默认为0
"msg": '隐藏客户端标题头部' msg: "隐藏客户端标题头部",
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 61:通知客户端弹起购买VIP特权弹窗 // 61:通知客户端弹起购买VIP特权弹窗
webAppComm.prototype.showVIPPurchasePopup = function ( ) { webAppComm.prototype.showVIPPurchasePopup = function () {
let obj = { let obj = {
"cid": 61, cid: 61,
"data": { data: {
"orderId": orderId, orderId: orderId,
"msg": '弹起购买VIP特权弹窗' msg: "弹起购买VIP特权弹窗",
} },
} };
let obj2 = JSON.stringify(obj); let obj2 = JSON.stringify(obj);
webAppCollaboration(obj2); webAppCollaboration(obj2);
} };
// 接收客戶端的消息 // 接收客戶端的消息
webAppComm.prototype.reMsgFromApp = function (callback) { webAppComm.prototype.reMsgFromApp = function (callback) {
callback && callback(); callback && callback();
} };
webAppComm.prototype.url_get_params = function (url_path) { webAppComm.prototype.url_get_params = function (url_path) {
let url = url_path; let url = url_path;
...@@ -1037,7 +1056,7 @@ webAppComm.prototype.url_get_params = function (url_path) { ...@@ -1037,7 +1056,7 @@ webAppComm.prototype.url_get_params = function (url_path) {
} }
} }
return theRequest; return theRequest;
} };
function webAppCollaboration(msg) { function webAppCollaboration(msg) {
let sUserAgent = navigator.userAgent.toLowerCase(); let sUserAgent = navigator.userAgent.toLowerCase();
let bIsIpad = sUserAgent.match(/ipad/i) == "ipad"; let bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
...@@ -1048,15 +1067,23 @@ function webAppCollaboration(msg) { ...@@ -1048,15 +1067,23 @@ function webAppCollaboration(msg) {
let bIsAndroid = sUserAgent.match(/android/i) == "android"; let bIsAndroid = sUserAgent.match(/android/i) == "android";
let bIsCE = sUserAgent.match(/windows ce/i) == "windows ce"; let bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
let bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile"; let bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) { if (
} !(
else if (bIsAndroid) { bIsIpad ||
bIsIphoneOs ||
bIsMidp ||
bIsUc7 ||
bIsUc ||
bIsAndroid ||
bIsCE ||
bIsWM
)
) {
} else if (bIsAndroid) {
window.yazhai.appCollaboration(msg); window.yazhai.appCollaboration(msg);
} else if (bIsIphoneOs || bIsIpad) { } else if (bIsIphoneOs || bIsIpad) {
window.webkit.messageHandlers.appCollaboration.postMessage(msg); window.webkit.messageHandlers.appCollaboration.postMessage(msg);
} }
} }
window.$firefly = new webAppComm(); window.$firefly = new webAppComm();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment