2023-02-03 14:19:23 +08:00
|
|
|
|
<template>
|
|
|
|
|
<view class="header">
|
|
|
|
|
<view class="logo">
|
|
|
|
|
<image src="/static/logo.png" mode="widthFix"></image>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="title">
|
|
|
|
|
<image src="/static/count-title.png" mode="widthFix"></image>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="position" @tap="backHome">
|
|
|
|
|
<image src="/static/icon-home.png" mode="widthFix"></image>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
name: "status-nav",
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
|
2023-02-03 18:02:22 +08:00
|
|
|
|
};
|
2023-02-03 14:19:23 +08:00
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 返回主页
|
|
|
|
|
backHome(){
|
|
|
|
|
plus.runtime.launchApplication({
|
|
|
|
|
//打开app
|
2023-02-16 10:18:20 +08:00
|
|
|
|
pname: "com.samton", //B款app云打包的包名
|
2023-02-03 14:19:23 +08:00
|
|
|
|
});
|
|
|
|
|
},
|
2023-03-14 09:17:08 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// backHome() {
|
|
|
|
|
// //获取宿主上下文
|
|
|
|
|
// var main = plus.android.runtimeMainActivity();
|
|
|
|
|
// //通过反射获取Android的Intent对象
|
|
|
|
|
// var Intent = plus.android.importClass("android.content.Intent");
|
|
|
|
|
// //通过宿主上下文创建 intent
|
|
|
|
|
// var intent = new Intent(main.getIntent());
|
|
|
|
|
// //设置要开启的Activity包类路径 com.HBuilder.integrate.MainActivity换掉你自己的界面
|
|
|
|
|
// intent.setClassName(main, "com.samton.reception.mvp.ui.activity.ReceptionActivity");
|
|
|
|
|
// //开启新的任务栈 (跨进程)
|
|
|
|
|
// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
|
|
|
|
// //uni向android原生界面传值
|
|
|
|
|
// intent.putExtra("uni_key","来自uniapp的值");
|
|
|
|
|
|
|
|
|
|
// //请求码保证了,开始的新界面和返回的是同一个操作
|
|
|
|
|
// var CODE_REQUEST=1000
|
|
|
|
|
// //采用startActivityForResult开启新的界面,当界面关闭时可以处理返回结果, CODE_REQUEST请求码是唯一标识
|
|
|
|
|
// main.startActivityForResult(intent,CODE_REQUEST);
|
|
|
|
|
|
|
|
|
|
// //设置原生界面返回后的回调操作
|
|
|
|
|
// main.onActivityResult = function(requestCode, resultCode, data) {
|
|
|
|
|
// if (requestCode == CODE_REQUEST) {
|
|
|
|
|
// // alert(requestCode); //这个是正确的 1000
|
|
|
|
|
// // alert(resultCode); //始终都是0
|
|
|
|
|
// // alert(data); //弹出 undefined
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
2023-02-03 14:19:23 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.header{
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: flex-end;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
padding-top: 26px;
|
|
|
|
|
}
|
|
|
|
|
.header .logo{
|
|
|
|
|
width: 197px;
|
|
|
|
|
padding: 0 0 6px 39px;
|
|
|
|
|
}
|
|
|
|
|
.header .title{
|
|
|
|
|
width: 480px;
|
|
|
|
|
}
|
|
|
|
|
.header .position{
|
|
|
|
|
width: 161px;
|
|
|
|
|
padding: 0 60px 6px 25px;
|
|
|
|
|
}
|
|
|
|
|
.header view image{
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
</style>
|