You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
201 lines
5.8 KiB
201 lines
5.8 KiB
<!DOCTYPE html> |
|
<html> |
|
|
|
<head> |
|
<meta charset="utf-8"> |
|
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> |
|
<title>帮助中心</title> |
|
<!--REM自适应布局JS--> |
|
<link rel="stylesheet" type="text/css" href="../../../lib/css/mui.min.css"> |
|
<link rel="stylesheet" type="text/css" href="../../../lib/css/basic.css" /> |
|
<link rel="stylesheet" type="text/css" href="../../css/base.css" /> |
|
<script src="../../../lib/js/mui.min.js"></script> |
|
<script src="../../../lib/js/vue.js"></script> |
|
<script src="../../../lib/js/app.js"></script> |
|
<script src="../../js/base/rem-layout.js"></script> |
|
<script type="text/javascript" src="../../js/my/my_ajax.js"></script> |
|
<script src="../../../lib/js/require2.1.11.js"></script> |
|
|
|
</head> |
|
<style> |
|
.app-table-view { |
|
margin-top: .2rem !important; |
|
} |
|
|
|
.mui-table-view-cell>a:not(.mui-btn).mui-active { |
|
background: none; |
|
} |
|
|
|
.img-copy { |
|
padding: 0 .1rem; |
|
float: right; |
|
} |
|
|
|
.app-table-view img { |
|
width: .3rem; |
|
height: .3rem; |
|
vertical-align: middle; |
|
} |
|
</style> |
|
|
|
<body> |
|
<div id="data-info"> |
|
<header class="mui-bar mui-bar-nav app-header app-header-darkly"> |
|
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a> |
|
<h1 class="mui-title">{{langue.MyHelpCenterTitle}}</h1> |
|
</header> |
|
<div class="mui-content"> |
|
<ul class="mui-table-view app-table-view "> |
|
<li v-for="item in helpCenterList" class="mui-table-view-cell"> |
|
<a class="view-herf"> |
|
<span>{{item.contactName}} : {{item.contactValue}}</span> |
|
<span class="img-copy" :id="item.id" @click="copyText(item.contactValue)"><img src="../../../html/OTC/img/fuzhi.png"/></span> |
|
</a> |
|
</li> |
|
<!--<li class="mui-table-view-cell"> |
|
<a class="mui-navigate-right view-herf" view-id="mine/html/my/my_help_center_subordinate/my_help_center_import_wallet.html" view-url="my_help_center_subordinate/my_help_center_import_wallet.html"> |
|
111 |
|
</a> |
|
</li> |
|
<li class="mui-table-view-cell"> |
|
<a class="mui-navigate-right view-herf" view-id="mine/html/my/my_help_center_subordinate/my_help_center_backups_wallet.html" view-url="my_help_center_subordinate/my_help_center_backups_wallet.html"> |
|
333 |
|
</a> |
|
</li> |
|
<li class="mui-table-view-cell"> |
|
<a class="mui-navigate-right view-herf" view-id="mine/html/my/my_help_center_subordinate/my_help_center_cannot_find_wallet.html" view-url="my_help_center_subordinate/my_help_center_cannot_find_wallet.html"> |
|
3133 |
|
</a> |
|
</li>--> |
|
</ul> |
|
</div> |
|
</div> |
|
</body> |
|
|
|
</html> |
|
<script> |
|
// 国际化 |
|
var langues = { |
|
zh_CN: { |
|
MyHelpCenterTitle: "联系我们", |
|
copySuccess: "复制成功" |
|
}, |
|
zh_HK: { |
|
MyHelpCenterTitle: "聯係我們", |
|
copySuccess: "複製成功" |
|
}, |
|
en_US: { |
|
MyHelpCenterTitle: "Contact us", |
|
copySuccess: "Copy success" |
|
} |
|
}; |
|
</script> |
|
<script> |
|
var dataInfo = new Vue({ |
|
el: "#data-info", |
|
data: { |
|
langue: langues[app.getLanguageLocalStorage()], |
|
helpCenterList: [] |
|
}, |
|
methods: { |
|
copyText:function(value) { |
|
copyToClip(value); |
|
} |
|
} |
|
}); |
|
|
|
mui.plusReady(function() { //请求帮助中心 |
|
mui.ajax(myAjaxJs.AJAX_CONTACT_US.getUrl, { |
|
data: { |
|
"languages": app.getLanguageLocalStorage() |
|
}, |
|
headers: { |
|
"X-Requested-Token": app.getTokenStorage(), // token头部 |
|
"locale": app.getLanguageLocalStorage() // 语种头部 |
|
}, |
|
dataType: 'json', //服务器返回json格式数据 |
|
type: myAjaxJs.AJAX_CONTACT_US.getType, //HTTP请求类型 |
|
timeout: 10000, |
|
beforeSend: function() { |
|
plus.nativeUI.showWaiting(); |
|
}, |
|
complete: function() { |
|
plus.nativeUI.closeWaiting(); |
|
}, |
|
success: function(data) { |
|
if(data.code == "200") { |
|
dataInfo.helpCenterList = data.data; |
|
// console.log("帮助中心列表: " + JSON.stringify(data.data)); |
|
} else { |
|
mui.toast(data.msg); |
|
} |
|
}, |
|
error: function(xhr, type, errorThrown) { |
|
// mui.alert(dataBase.AjaxError2, dataBase.AlertMsg); |
|
} |
|
}); |
|
}); |
|
/** |
|
* 复制到剪切板 |
|
* @param {Object} 要复制的值 |
|
*/ |
|
function copyToClip(value) { |
|
if(mui.os.android) { |
|
var Context = plus.android.importClass("android.content.Context"); |
|
var main = plus.android.runtimeMainActivity(); |
|
var clip = main.getSystemService(Context.CLIPBOARD_SERVICE); |
|
// 设置文本内容: |
|
plus.android.invoke(clip, "setText", value); |
|
} else { |
|
var UIPasteboard = plus.ios.importClass("UIPasteboard"); |
|
var generalPasteboard = UIPasteboard.generalPasteboard(); |
|
// 设置文本内容: |
|
generalPasteboard.setValueforPasteboardType(value, "public.utf8-plain-text"); |
|
} |
|
mui.toast(dataInfo.langue.copySuccess); |
|
// mui.toast("复制成功"); |
|
} |
|
// 列表项跳转 |
|
// mui(".mui-table-view").on('tap', '.view-herf', function() { |
|
// // let viewId = this.getAttribute('view-id'); |
|
// let contentUrl = this.getAttribute('content_url'); |
|
// let helpCenterId = this.getAttribute('id'); |
|
// let helpCenterTitle = this.innerHTML; |
|
// |
|
// var extrasData = {}; |
|
// |
|
// if(contentUrl) { |
|
// extrasData = { |
|
// contentUrl: contentUrl, |
|
// helpCenterTitle: helpCenterTitle |
|
// } |
|
// } else { |
|
// extrasData = { |
|
// helpCenterId: helpCenterId, |
|
// helpCenterTitle: helpCenterTitle |
|
// } |
|
// } |
|
// |
|
// mui.openWindow({ |
|
// id: "mine/html/my/my_help_center_subordinate/my_help_center_add_wallet.html", |
|
// url: "my_help_center_subordinate/my_help_center_add_wallet.html", |
|
// extras: extrasData |
|
// }); |
|
// |
|
// }); |
|
|
|
// appLanguageFun(); |
|
// /** |
|
// * 国际化方法 |
|
// */ |
|
// function appLanguageFun() { |
|
// let type = app.getLanguageLocalStorage(); |
|
// require(['../../js/language/' + type], function(dataBase) { |
|
// v.dataBase = dataBase; |
|
// }) |
|
// } |
|
// 国际化统一方法 |
|
window.addEventListener('switchLangueData', function(e) { |
|
dataInfo.langue = langues[e.detail]; |
|
}); |
|
</script> |