
分享一个一对一直播自动聊天脚本保护生态高山流水核心JS源码
分享一个最近很火的项目,一对一直播自动打招呼脚本,保护生态r9和高山流水小精灵的JS核心代码该源码是Auto.js编写,可以二次重构。可以直接打包运行function 首页ui() {importClass(android.view.MenuItem);importClass(com.google.android.material.bottomnavigation.BottomNavigation
·
分享一个最近很火的项目,一对一直播自动打招呼脚本,保护生态r9和高山流水小精灵的JS核心代码
该源码是Auto.js编写,可以二次重构。可以直接打包运行
function 首页ui() {
importClass(android.view.MenuItem);
importClass(com.google.android.material.bottomnavigation.BottomNavigationView);
importClass(com.google.android.material.bottomnavigation.LabelVisibilityMode);
importClass(android.widget.ArrayAdapter);
importClass(android.widget.AdapterView);
importClass(java.util.ArrayList);
ui.layout(
'<drawer id="drawer">\
<relative>\
<appbar w="*" h="auto">\
<frame bg="#FF6699">\
<toolbar id="toolbar" textStyle="bold" />\
</frame>\
</appbar>\
<viewpager id="vp" layout_below="appbar" layout_above="bnv" marginTop="55dp">\
<frame>\
<vertical bg="#FF6699">\
<vertical bg="#FFCCFF">\
<Switch id="autoService" bg="#2F4F4F" text="无障碍服务【安卓7.0或以上】" textColor="white" checked="'+ (auto.service != null) + '" padding="8 8 8 8" textSize="15sp" />\
</vertical>\
<horizontal bg="#00CED1">\
<text textColor="#080808" text="公告:" />\
<text id="滚动内容1" singleLine="true" ellipsize="marquee" textColor="#ff010100" text="觅缘,缘来有你平台,点开始没有悬浮窗,如果要停止运行可以按音量加号键!因为平台检测机器人所有才隐藏悬浮窗的!以后不需要手动更新版本了,后台直接同步更新了 觅缘,缘来有你平台,点开始没有悬浮窗,如果要停止运行可以按音量加号键!因为平台检测机器人所有才隐藏悬浮窗的!以后不需要手动更新版本了,后台直接同步更新了" />\
</horizontal>\
<horizontal bg="#C6E2FF">\
<text textColor="#080808" text="更新:" />\
<text id="滚动内容2" singleLine="true" ellipsize="marquee" textColor="#ff010100" text="1.新增:知缘,蜜糖,塔咪,对对,甜柚,勿忘我,国际名门,星梦,陌对,倾心,花枝,就聊,绿茶交友,恋否,星火,甜颜,甜心有约,知梦,初见,缘分,红颜新,花聊,宝聊,他她新,相见,花田,哆趣,欢鹊,美悦,心语,陌音,耳聊,M速配,缘来,找她,香草,百合 2.四个mp3文件会随机播放:1.mp3,2.mp3,3.mp3,4.mp3 1.新增:花枝,就聊,绿茶交友,恋否,星火,甜颜,甜心有约,知梦,初见,缘分,红颜新,花聊,宝聊,他她新,相见,花田,哆趣,欢鹊,美悦,心语,陌音,耳聊,M速配,缘来,找她,香草,百合 2.四个mp3文件会随机播放:1.mp3,2.mp3,3.mp3,4.mp3" />\
</horizontal>\
<horizontal marginTop="10" w="auto" h="auto" layout_gravity="center">\
<img w="50" h="50" circle="true" src="' + icon_url + '" />\
<input id="模糊搜索" hint="模糊搜索" />\
<img id="模糊搜索btn" src="@drawable/ic_search_black_48dp" padding="5 5 5 5" h="50dp" w="50dp" />\
<img id="运行" w="50dp" h="50dp" tint="#006600" src="ic_play_arrow_black_48dp" />\
</horizontal>\
<horizontal margin="20 5 20 5" bg="#FFCC33">\
<vertical h="auto" w="auto" layout_gravity="left|center" marginLeft="1">\
<horizontal>\
<text text="平台:"/>\
<spinner id="spin_pingTai" entries="未选择" />\
</horizontal>\
<horizontal>\
<text text="模式:"/>\
<spinner id="spin_moShi" entries="未选择" />\
</horizontal>\
</vertical>\
<img id="app图片" w="70dp" h="70dp" src="'+ 软件[app记录].src + '" circle="true" layout_gravity="center_vertical" />\
</horizontal>\
<vertical w="*" >\
<horizontal margin="20" bg="#FFCC33" gravity="left|center">\
<text text="详情:" />\
<text id = "详情" text="还未选择app" textColor="#000000" />\
<img id="下载app" w="0dp" h="50dp" tint="#98F5FF" src="ic_get_app_black_48dp"/>\
</horizontal>\
</vertical>\
</vertical>\
</frame>\
<frame >\
<ScrollView>\
<vertical padding="8 0" >\
<horizontal gravity="center" bg="#87CEFA">\
<text text="发送后延时设置" />\
</horizontal>\
<horizontal gravity="center">\
<text text="发送延时时间为:" h="auto"/>\
<input id="t1" hint="例如:3" text="'+ storage.get("time", "3") + '" gravity="center" textColor="red"/>\
<text text="秒" h="auto" textColor="red"/>\
</horizontal>\
<horizontal gravity="center" bg="#87CEFA">\
<text text="重复发送设置" />\
</horizontal>\
<horizontal gravity="center">\
<text text="重复发送条数为:" h="auto"/>\
<input id="strip" hint="例如:2" text="'+ storage.get("strip", "2") + '" ravity="center" textColor="red"/>\
<text text="条" h="auto" textColor="red"/>\
</horizontal>\
<horizontal gravity="center" bg="#87CEFA">\
<text text="过滤昵称设置" />\
</horizontal>\
<horizontal gravity="center">\
<text text="要过滤的名称:" />\
<input id="name_guoLv" text="'+ storage.get("name_guoLv", "小明|小黑|小白") + '" textColor="red" />\
</horizontal>\
<horizontal gravity="center" bg="#87CEFA">\
<text text="回复与接听设置" />\
</horizontal>\
<horizontal gravity="center">\
<Switch id="jishihuif" text="及时回复" textColor="blue" checked="'+ storage.get('jishihuif', true) + '" padding="8 8 8 8" textSize="15sp" />\
<Switch id="zdjieting" text="自动接听" textColor="blue" checked="'+ storage.get('zdjieting', true) + '" padding="8 8 8 8" textSize="15sp" />\
</horizontal>\
<horizontal gravity="center" bg="#87CEFA">\
<text text="发语音设置" />\
</horizontal>\
<Switch id="yaofayuyin" text="发语音打开(可放4个mp3,1234)" textColor="blue" checked="'+ storage.get('yaofayuyin', true) + '" padding="8 8 8 8" textSize="15sp" />\
<Switch id="fawandashipin" text="亲密度到了直接打视频开关" textColor="blue" textColor="blue" checked="'+ storage.get('fawandashipin', true) + '" padding="8 8 8 8" textSize="15sp" />\
<Switch id="faliangtiao" text="在一起发1条语音打开,发2条语音关闭" textColor="blue" textColor="blue" checked="'+ storage.get('faliangtiao', true) + '" padding="8 8 8 8" textSize="15sp" />\
<Switch id="xqbcf" text="发完语音再发一句文字打开" textColor="blue" checked="'+ storage.get('xqbcf', true) + '" padding="8 8 8 8" textSize="15sp" />\
<Switch id="dlyuyin" text="对聊单独发文字打开,要发语音关闭" textColor="blue" checked="'+ storage.get('dlyuyin', true) + '" padding="8 8 8 8" textSize="15sp" />\
<Switch id="hyyuyin" text="红缘语音发1.mp3,关闭发平台录音的打开" textColor="blue" checked="'+ storage.get('hyyuyin', true) + '" padding="8 8 8 8" textSize="15sp" />\
<Switch id="lkjujieting" text="每天同个用户只要自动接听一次" textColor="blue" checked="'+ storage.get('lkjujieting', false) + '" padding="8 8 8 8" textSize="15sp" />\
<horizontal gravity="center">\
<text text="注意:在一起相关的如果要发两条语音的分别录制1.mp3跟2.mp3放在文件管理根目录" h="auto" textColor="purple"></text>\
</horizontal>\
</vertical>\
</ScrollView>\
</frame>\
<frame>\
<vertical>\
<appbar>\
<radiogroup orientation="horizontal" padding="30 1">\
<radio id="视频话术" text="适用于视频" padding="10 1" />\
<radio id="聊天话术" text="适用无引诱聊天" padding="10 1" />\
</radiogroup>\
<tabs id="tabs" />\
</appbar>\
<viewpager id="viewpager" bg="#993399">\
<frame>\
<ScrollView>\
<vertical>\
<input id="打招呼语多行" text="" />\
<text text="" />\
<text text="" />\
<text text="" />\
</vertical>\
</ScrollView>\
<horizontal>\
<button id="招呼语恢复默认话术" layout_gravity="bottom" w="auto" h="auto" text="恢复到默认" />\
<button id="招呼语保存" layout_gravity="bottom" w="auto" h="auto" text="保存修改" />\
</horizontal>\
</frame>\
<frame>\
<ScrollView>\
<vertical>\
<input id="通用回复多行" text="" />\
<text text="" />\
<text text="" />\
<text text="" />\
</vertical>\
</ScrollView>center\
<horizontal>\
<button id="通用回复恢复默认话术" layout_gravity="bottom" w="auto" h="auto" text="恢复到默认" />\
<button id="通用回复保存" layout_gravity="bottom" w="auto" h="auto" text="保存修改" />\
</horizontal>\
</frame>\
<frame>\
<ScrollView>\
<vertical>\
<input id="关键词回复多行" text="" />\
<text text="" />\
<text text="" />\
<text text="" />\
</vertical>\
</ScrollView>center\
<horizontal>\
<button id="关键词回复恢复默认话术" layout_gravity="bottom" w="auto" h="auto" text="恢复到默认" />\
<button id="关键词回复保存" layout_gravity="bottom" w="auto" h="auto" text="保存修改" />\
</horizontal>\
</frame>\
</viewpager>\
</vertical>\
</frame>\
<frame >\
<vertical padding="10 10" >\
<horizontal w="auto" h="auto" layout_gravity="center_horizontal" marginTop="10">\
<img w="50" h="50" circle="true" src="' + icon_url + '" />\
<text text="'+ jbname + '" textColor="#000000" textSize="24sp" textStyle="bold" padding="8" />\
</horizontal>\
<vertical padding="10 10" w="*" h="auto" bg="#ffffff" marginBottom="10dp">\
<vertical id="激活码信息" w="auto" h="90" layout_gravity="left|center_vertical ">\
<text id="激活码_text" text="激活码:'+ storage.get("CDK") + '" textColor="#000000" textSize="15sp" />\
<text id="到期时间_text" text="到期时间:" textColor="#000000" textSize="15sp" marginTop="8" />\
<text id="剩余时间_text" text="剩余时间:" textColor="#000000" textSize="15sp" marginTop="8" />\
</vertical>\
</vertical>\
<card w="*" h="auto" cardCornerRadius="15dp"\
cardElevation="2dp" marginBottom="5dp">\
<ScrollView bg="#ffffff">\
<frame padding="10 10" id="获取卡密">\
<text text="获取卡密" textColor="#000000" textSize="15sp" layout_gravity="center_vertical|center_horizontal" />\
<img w="30" h="30" tint="#DCDCDC" layout_gravity="center_vertical|center_horizontal|right" src="@drawable/ic_keyboard_arrow_right_black_48dp" />\
</frame>\
</ScrollView>\
</card>\
<card w="*" h="auto" cardCornerRadius="15dp"\
cardElevation="2dp" marginBottom="5dp">\
<ScrollView bg="#ffffff" >\
<frame padding="10 10" id="使用教程">\
<text text="使用教程" textColor="#000000" textSize="15sp" layout_gravity="center_vertical|center_horizontal" />\
<img w="30" h="30" tint="#DCDCDC" layout_gravity="center_vertical|center_horizontal|right" src="@drawable/ic_keyboard_arrow_right_black_48dp" />\
</frame>\
</ScrollView>\
</card>\
<card w="*" h="auto" cardCornerRadius="15dp"\
cardElevation="2dp" marginBottom="5dp">\
<ScrollView bg="#ffffff">\
<frame padding="10 10" id="退出登陆">\
<text text="退出登陆" textColor="#000000" textSize="15sp" layout_gravity="center_vertical|center_horizontal" />\
<img w="30" h="30" tint="#DCDCDC" layout_gravity="center_vertical|center_horizontal|right" src="@drawable/ic_keyboard_arrow_right_black_48dp" />\
</frame>\
</ScrollView>\
</card>\
<horizontal gravity="center" bg="#87CEFA">\
<text text="免责声明" />\
</horizontal>\
<horizontal gravity="center">\
<text text="-----免责声明:本软件仅供学习交流使用,更多脚本访问网站:rz3w.com-----" h="auto" textColor="purple"></text>\
</horizontal>\
</vertical>\
</frame>\
</viewpager>\
<com.google.android.material.bottomnavigation.BottomNavigationView\
id="bnv"\
h="56"\
layout_alignParentBottom="true"\
layout_centerHorizontal="true"\
bg="#FAFAFA" />\
</relative>\
<frame layout_gravity="left" bg="#C1CDCD" w="220" h="*">\
<vertical bg="#C1CDCD" w="*" >\
<img w="100" h="100" circle="true" src="' + icon_url + '" layout_gravity="center" />\
<horizontal id = "跳无障碍" bg="#FFFAFA" w="*" h="auto" marginTop="5" padding="8 10">\
<img w="15" h="15" src="@drawable/ic_android_black_48dp" tint="#696969" marginTop="2" />\
<text textSize="13sp" text="跳转到无障碍服务设置页面" textColor="#696969" marginLeft="8" />\
</horizontal>\
<horizontal id="跳悬浮窗" bg="#FFFAFA" w="*" h="auto" marginTop="5" padding="8 10">\
<img w="15" h="15" src="@drawable/ic_extension_black_48dp" tint="#696969" marginTop="2" />\
<text textSize="13sp" text="跳转到悬浮窗权限设置页面1" textColor="#696969" marginLeft="8" />\
</horizontal>\
<horizontal id="跳悬浮窗2" bg="#FFFAFA" w="*" h="auto" marginTop="5" padding="8 10">\
<img w="15" h="15" src="@drawable/ic_extension_black_48dp" tint="#696969" marginTop="2" />\
<text textSize="13sp" text="跳转到悬浮窗权限设置页面2" textColor="#696969" marginLeft="8" />\
</horizontal>\
<horizontal id="跳查看日志" bg="#FFFAFA" w="*" h="auto" marginTop="5" padding="8 10">\
<img w="15" h="15" src="@drawable/ic_assignment_black_48dp" tint="#696969" marginTop="2" />\
<text textSize="13sp" text="查看日志(有问题反馈管理员)" textColor="#696969" marginLeft="8" />\
</horizontal>\
</vertical>\
<frame layout_gravity="bottom" bg="#FFFAFA" w="*" h="auto" padding="20 5">\
<horizontal id="设置">\
<img w="30" h="30" src="ic_settings_black_48dp" tint="#696969" />\
<text textColor="#696969" textSize="19sp" text="设置" marginLeft="8" />\
</horizontal>\
</frame>\
</frame>\
</drawer >'
);
var arr_adapter = new ArrayAdapter(context, android.R.layout.simple_spinner_dropdown_item, new ArrayList(appList));
ui.spin_pingTai.setAdapter(arr_adapter);
ui.spin_pingTai.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener({
onItemSelected: function (parent, view, pos) {
更改图标(appList[pos])
arr_adapter = new ArrayAdapter(context, android.R.layout.simple_spinner_dropdown_item, new ArrayList(软件[appList[pos]].entries));
ui.spin_moShi.setAdapter(arr_adapter);
},
}));
let bnv = ui.bnv;
let menu = bnv.getMenu();
/** ViewPager 与 BottomNavigationView 联动*/
/** 监听BottomNavigationView切换选中事件 */
bnv.setOnNavigationItemSelectedListener({
onNavigationItemSelected: function (item) {
//跳转到对应的页面
ui.vp.setCurrentItem(item.getItemId());
return true;
}
});
ui.vp.addOnPageChangeListener({
onPageSelected: function (position) {
// 将当前的页面对应的底部标签设为选中状态
menu.getItem(position).setChecked(true);
if (menu.getItem(position) == "话术") {
ui.viewpager.setTitles(["打招呼", "通用回复", "关键词回复"])
ui.tabs.setupWithViewPager(ui.viewpager)
let 模式 = storage.get("视频话术模式", false)
// log(模式)
if (模式) {
ui.视频话术.checked = true
ui.打招呼语多行.setText(storage.get("视频打招呼语数组").join("\n"))
ui.通用回复多行.setText(storage.get("视频通用回复语数组").join("\n"))
ui.关键词回复多行.setText(storage.get("视频关键词回复数组").join("\n"))
} else {
ui.聊天话术.checked = true
ui.打招呼语多行.setText(storage.get("聊天打招呼语数组").join("\n"))
ui.通用回复多行.setText(storage.get("聊天通用回复语数组").join("\n"))
ui.关键词回复多行.setText(storage.get("聊天关键词回复数组").join("\n"))
}
}
}
});
ui.模糊搜索btn.click(() => {
let 关键词 = ui.模糊搜索.getText().toString()
var app数组 = []
for (let i = 0; i < appList.length; i++) {
if (appList[i].indexOf(关键词) > -1) {
app数组.push(appList[i])
}
}
if (app数组.length > 0) {
dialogs.build({
title: "请选择您要找的app",
items: app数组,
itemsSelectMode: "single",
}).on("single_choice", (index, item) => {
toast("您选择的是" + item);
let index = getArrIndex(appList, item)
ui.spin_pingTai.setSelection(index)
app记录 = item
// storage.put("app索引",index)
// storage.put("app",item)
}).show();
} else {
alert("没找到你搜索的平台,可以联系卖家提供你要的平台")
}
})
ui.autoService.on("check", function (checked) {
if (checked && auto.service == null) {
app.startActivity({
action: "android.settings.ACCESSIBILITY_SETTINGS"
});
}
if (!checked && auto.service != null) {
auto.service.disableSelf();
}
});
ui.emitter.on('resume', () => {//加载界面
if (storage.get("运行状态") == 2) {
toastLog("欢迎回来")
try { 引擎.getEngine().forceStop() } catch (e) { }
}
ui.运行.setClickable(true)
ui.autoService.checked = auto.service != null;
if (getPackageName(app记录) != null) {//通过app名字找包名
ui.详情.setText(app记录 + "(已安装)");
ui.下载app.attr("w", "0dp");
} else {
检查重名app(app记录)
}
});
/**
* 获取资源ID
* @param {*} name
* @param {*} type
*/
function getResID(name, type) {
return context.getResources().getIdentifier(name, type, context.getPackageName());
}
/*标题抽屉栏*/
// 让工具栏左上角可以打开侧拉菜单
ui.跳无障碍.click(() => {
alert("正在跳转到无障碍服务设置页面", "此脚本由无障碍模式开发\n务必开启无障碍服务").then(() => {
app.startActivity({
action: "android.settings.ACCESSIBILITY_SETTINGS"
});
});
})
ui.跳悬浮窗.click(() => {
alert("正在跳转到悬浮窗权限设置页面", "脚本需要悬浮窗权限\n务必开启悬浮窗权限\n1.进入脚本权限设置界面\n2.找到《显示悬浮窗》《后台弹出界面》并给予权限").then(() => {
app.startActivity({
action: "android.settings.action.MANAGE_OVERLAY_PERMISSION"
});
});
})
ui.跳悬浮窗2.click(() => {
alert("正在跳转到悬浮窗权限设置页面", "脚本需要悬浮窗权限\n务必开启悬浮窗权限\n1.进入脚本权限设置界面\n2.找到《显示悬浮窗》《后台弹出界面》并给予权限").then(() => {
floaty.requestPermission()
});
})
ui.跳查看日志.click(() => {
toast("查看日志");
app.startActivity("console");
})
ui.设置.on("click", () => {
app.startActivity("settings");
})
/**下载平台按钮点击事件 */
ui.下载app.on("click", () => {
app.openUrl(软件[app记录].下载链接)
})
ui.运行.on("click", () => {
app记录 = ui.spin_pingTai.getSelectedItem().toString()
if (app记录 == "未选择") {
alert("还未选择app")
return
}
if (!$power_manager.isIgnoringBatteryOptimizations()) {
toastLog("请点允许后再次启动");
$power_manager.requestIgnoreBatteryOptimizations();
return
}
if (auto.service == null) {
toastLog("请授权无障碍权限");
app.startActivity({
action: "android.settings.ACCESSIBILITY_SETTINGS"
});
return;
}
if (!floaty.checkPermission()) {
toastLog("请开启悬浮窗或其他应用上层显示或后台弹出界面权限");
floaty.requestPermission()
return;
}
ui.运行.setClickable(false)
storage.put("运行状态", 0)
storage.put("name_guoLv", ui.name_guoLv.getText().toString())
storage.put("time", ui.t1.getText().toString())
storage.put("strip", ui.strip.getText().toString())
storage.put("app", app记录)
app子选项 = ui.spin_moShi.getSelectedItemPosition()
storage.put("app子选项", app子选项)
storage.put(app记录 + "子选项", app子选项)
// home();
threads.start(function () {
getnmb(软件[app记录].download)
for (let i = 0; i < 10; i++) {
sleep(500)
if (storage.get("运行状态") == 1) {
home()
sleep(500)
storage.put("运行状态", 2)
return
}
}
alert("网络异常,请重试")
ui.运行.setClickable(true)
})
})
/*登录数据*/
ui.获取卡密.on("click", function () {
//客服ui("首页ui");
alert("请联系管理员")
})
ui.使用教程.on("click", function () {
if (jbname == "髙山系统") {
app.openUrl("https://www.bilibili.com/video/BV16v411x7Nu/")
} else {
alert("请联系管理员")
}
})
ui.退出登陆.on("click", () => {
if (ui.激活码_text.getText() == "激活码:") {
toast("操作太快啦!")
return;
} else {
toast("退出登陆");
threads.start(function () {
var 退出登陆 = LogoutNeedle();
if (退出登陆[0] != false) {
storage.put("oldNeedle", false);
dialogs.alert("退出提示", 退出登陆[1]);
exit();
} else {
dialogs.alert("退出提示", 退出登陆[1]);
}
})
}
});
/*话术按钮界面配置*/
//关键词回复多行,打招呼语多行,通用回复多行
ui.视频话术.on("check", (checked) => {
if (checked) {
//toast("选择了视频话术模式")
ui.打招呼语多行.setText(storage.get("视频打招呼语数组").join("\n"))
ui.通用回复多行.setText(storage.get("视频通用回复语数组").join("\n"))
ui.关键词回复多行.setText(storage.get("视频关键词回复数组").join("\n"))
storage.put("视频话术模式", true)
} else {
//toast("选择了聊天话术模式")
ui.打招呼语多行.setText(storage.get("聊天打招呼语数组").join("\n"))
ui.通用回复多行.setText(storage.get("聊天通用回复语数组").join("\n"))
ui.关键词回复多行.setText(storage.get("聊天关键词回复数组").join("\n"))
storage.put("视频话术模式", false)
}
})
ui.招呼语恢复默认话术.on("click", () => {
threads.start(function () {
初始化话术(ui.打招呼语多行, "视频打招呼语数组", "SP_DZH", "聊天打招呼语数组", "LT_DZH")
})
})
ui.通用回复恢复默认话术.on("click", () => {
threads.start(function () {
初始化话术(ui.通用回复多行, "视频通用回复语数组", "SP_HF", "聊天通用回复语数组", "LT_HF")
})
})
ui.关键词回复恢复默认话术.on("click", () => {
threads.start(function () {
初始化话术(ui.关键词回复多行, "视频关键词回复数组", "SP_GJC", "聊天关键词回复数组", "LT_GJC")
})
})
ui.招呼语保存.on("click", () => {
保存话术(ui.打招呼语多行, "视频打招呼语数组", "聊天打招呼语数组")
})
ui.通用回复保存.on("click", () => {
保存话术(ui.通用回复多行, "视频通用回复语数组", "聊天通用回复语数组")
})
ui.关键词回复保存.on("click", () => {
保存话术(ui.关键词回复多行, "视频关键词回复数组", "聊天关键词回复数组")
})
ui.xqbcf.on("check", function (checked) {
if (checked) {
storage.put("xqbcf", true)
toast("要再发一条文字")
} else {
storage.put("xqbcf", false)
toast("只发一条语音")
}
})
ui.fawandashipin.on("check", function (checked) {
if (checked) {
storage.put("fawandashipin", true)
toast("开启亲密度到了打视频过去")
} else {
storage.put("fawandashipin", false)
toast("亲密度到了不打视频")
}
})
ui.dlyuyin.on("check", function (checked) {
if (checked) {
storage.put("dlyuyin", true)
toast("发文字")
} else {
storage.put("dlyuyin", false)
toast("发语音")
}
})
ui.hyyuyin.on("check", function (checked) {
if (checked) {
storage.put("hyyuyin", true)
toast("发平台录制的语音")
} else {
storage.put("hyyuyin", false)
toast("发1.mp3的语音")
}
})
ui.lkjujieting.on("check", function (checked) {
if (checked) {
storage.put("lkjujieting", true)
toast("一天同个用户接听一次")
} else {
storage.put("lkjujieting", false)
toast("所有用户都自动接听")
}
})
ui.zdjieting.on("check", function (checked) {
if (checked) {
storage.put("zdjieting", true)
toast("开启了")
} else {
storage.put("zdjieting", false)
toast("关闭了")
}
})
ui.jishihuif.on("check", function (checked) {
if (checked) {
storage.put("jishihuif", true)
toast("开启了")
} else {
storage.put("jishihuif", false)
toast("关闭了")
}
})
ui.yaofayuyin.on("check", function (checked) {
if (checked) {
storage.put("yaofayuyin", true)
toast("选择发1.mp3语音")
} else {
storage.put("yaofayuyin", false)
toast("选择发文字私信")
}
})
let index = getArrIndex(appList, app记录)
ui.spin_pingTai.setSelection(index)
setTimeout(() => {
ui.toolbar.setTitle(jbname);
ui.spin_moShi.setSelection(app子选项)
}, 900)
setTimeout(() => {
/*底部菜单栏*/
bnv.setLabelVisibilityMode(LabelVisibilityMode.LABEL_VISIBILITY_LABELED);//1 不开动画 0 动画
/** 添加item */
menu.add(0, 0, 0, "首页").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
menu.getItem(0).setIcon(getResID('ic_home_black_48dp', 'drawable'));
menu.add(0, 1, 1, "设置").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
menu.getItem(1).setIcon(getResID('ic_settings_black_48dp', 'drawable
更多推荐
所有评论(0)