Skip to content

Instantly share code, notes, and snippets.

@suyanhanx
Last active January 17, 2019 05:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suyanhanx/67a1a6c962a1030a4eea94812e677314 to your computer and use it in GitHub Desktop.
Save suyanhanx/67a1a6c962a1030a4eea94812e677314 to your computer and use it in GitHub Desktop.
// 无root拉起钉钉打卡
var a = app.intent({
action: "VIEW",
data: "dingtalk://dingtalkclient/page/link?url=https://attend.dingtalk.com/attend/index.html"
});
app.startActivity(a);
//需要用到root权限 否则打不开
var TimeStamp = Math.round(new Date());
var corpId = ""; //自己想办法获取公司的ID ding开头的一串码
shell("am start -n com.alibaba.android.rimet/com.alibaba.lightapp.runtime.activity.CommonWebViewActivity"+
" -a android.intent.action.VIEW"+
" --es url 'https://attend.dingtalk.com/attend/index.html?swtrace=oa_cloud_attendance_onduty_remind&showmenu=false&_progress=false&_from=oa&corpId="+corpId+"&_biz=onDuty_remind'"+
" --el navi_to_open_mini_app "+TimeStamp+
" --es title '考勤打卡'", true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment