COMMENT
如果使用本指令,默认您同意下面条款:
1. 本指令仅供学习交流使用,请勿用于商业用途和非法行为,否则一切后果皆由使用者承担
2. 本指令不会上传您的任何个人信息给任何第三方,所有账户密码和车辆信息都保存在本地和iCloud
3. 本指令与BMW公司无关
TEXT
我同意

Text
COMMENT
1. 请在下面词典中输入MyBMW用户名和登录密码,用户名为86加手机号,如8613528687351
2. 第一次运行需要允许权限,后面设置快捷指令自动化运行即可
3. 免责声明:本指令仅供交流使用,不可作为商业用途
4. 发布者:吹雪;技术指导:胡总(530 dev)
DICTIONARY

Dictionary
DICTIONARY

Dictionary
NETWORK
Get contents of
https://note.youdao.com/yws/api/note/120a7d6fd8d4196f8760e1c3adc8f8e9
Options Under Construction

Contents of URL
SCRIPTING
Set name of
URL的内容
to
a.txt

Renamed Item
TEXT
Match
\{.*?\}
in
重新命名的项目

Matches
VARIABLES
Set variable
update
to
匹配
DOCUMENTS
Replace
v
with
World
in
update

Updated Text
VARIABLES
Set variable
version
to
更新后的文本
SCRIPTING
If
version
is greater than
Version
REMINDERS
Add
update
to
提醒事项
with
Alert
At Time
Current Date
Options Under Construction

New Reminder
SCRIPTING
Otherwise
SCRIPTING
End If

If Result
DOCUMENTS
Replace
\s+
with
World
in
词典

Updated Text
VARIABLES
Set variable
username
to
更新后的文本
DOCUMENTS
Replace
\s+
with
World
in
词典

Updated Text
VARIABLES
Set variable
password
to
更新后的文本
SCRIPTING
If
文本
is not
我同意
SCRIPTING
Show
因您不同意本条款,故无法使用本指令,如需继续使用请在条款下的文本中填入“我同意 ”三个字(没有引号)
SCRIPTING
Exit shortcut with
Result
SCRIPTING
Otherwise
SCRIPTING
End If

If Result
SCRIPTING
Count
Characters
in
username

Count
SCRIPTING
If
数量
is not
13
NOTIFICATIONS
Show notification
Input
Options Under Construction
SCRIPTING
Exit shortcut with
Result
SCRIPTING
Otherwise
SCRIPTING
End If

If Result
TEXT
Match
^86
in
username

Matches
SCRIPTING
If
匹配
does not have any value
NOTIFICATIONS
Show notification
Input
Options Under Construction
SCRIPTING
Exit shortcut with
Result
SCRIPTING
Otherwise
SCRIPTING
End If

If Result
SCRIPTING
Count
Characters
in
password

Count
SCRIPTING
If
数量
is
0
NOTIFICATIONS
Show notification
Input
Options Under Construction
SCRIPTING
Exit shortcut with
Result
SCRIPTING
Otherwise
SCRIPTING
If
数量
is less than
8
NOTIFICATIONS
Show notification
Input
Options Under Construction
SCRIPTING
Exit shortcut with
Result
SCRIPTING
Otherwise
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
MATHS
Random number between
1
and
15

Random Number
SCRIPTING
Wait
随机数
DOCUMENTS
Get File
File Path
/Shortcuts/example.txt

File
SCRIPTING
If
文件
does not have any value
TEXT
false

Text
VARIABLES
Set variable
token
to
文本
SCRIPTING
Otherwise
NETWORK
Get contents of
https://myprofile.bmw.com.cn/eadrax-coas/v1/oauth/token
Options Under Construction

Contents of URL
SCRIPTING
If
URL的内容
does not have any value
TEXT
false

Text
VARIABLES
Set variable
token
to
文本
SCRIPTING
Otherwise
TEXT
true

Text
VARIABLES
Set variable
token
to
文本
VARIABLES
Set variable
refresh_token
to
URL的内容
DICTIONARY

Dictionary
DOCUMENTS
Save
词典
Destination Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'value': 'mybmw_refresh_token-', 'class': 'text'}, {'class': 'magic', 'value': 'username', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}, {'value': '.json', 'class': 'text'}]Overwrite If File Exists

Saved File
VARIABLES
Set variable
access_token
to
URL的内容
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
SCRIPTING
If
token
is
false
NETWORK
Get contents of
https://myprofile.bmw.com.cn/eadrax-coas/v1/cop/publickey
Options Under Construction

Contents of URL
DOCUMENTS
Replace
\s+
with
World
in
URL的内容

Updated Text
DOCUMENTS
Replace
PUBLIC
with
PUBLIC
in
更新后的文本

Updated Text
VARIABLES
Set variable
publicKey
to
更新后的文本
NETWORK
Get contents of
https://gitee.com/ichuixue/bmw_shortcuts/raw/master/BMW_JSEncrypt.js
Options Under Construction

Contents of URL
MISSING
Under Construction
NETWORK
Get contents of
https://myprofile.bmw.com.cn/eadrax-coas/v1/login/pwd
Options Under Construction

Contents of URL
SCRIPTING
If
URL的内容
does not have any value
TEXT

Matches
SCRIPTING
If
匹配
has any value
NOTIFICATIONS
Show notification
Input
Options Under Construction
SCRIPTING
Exit shortcut with
Result
SCRIPTING
Otherwise
TEXT

Matches
SCRIPTING
If
匹配
has any value
NOTIFICATIONS
Show notification
Input
Options Under Construction
SCRIPTING
Exit shortcut with
Result
SCRIPTING
Otherwise
NOTIFICATIONS
Show notification
Input
Options Under Construction
SCRIPTING
Exit shortcut with
Result
SCRIPTING
End If

If Result
SCRIPTING
End If

If Result
SCRIPTING
Otherwise
SCRIPTING
End If

If Result
VARIABLES
Set variable
access_token
to
URL的内容
VARIABLES
Set variable
refresh_token
to
URL的内容
DICTIONARY

Dictionary
DOCUMENTS
Save
词典
Destination Path
[{'value': '/Shortcuts/', 'class': 'text'}, {'value': 'mybmw_refresh_token-', 'class': 'text'}, {'class': 'magic', 'value': 'username', 'glyph': 'assets/cat/Variable.svg', 'UUID': ''}, {'value': '.json', 'class': 'text'}]Overwrite If File Exists

Saved File
SCRIPTING
Otherwise
SCRIPTING
End If

If Result
TEXT
{"signDate":null}

Text
NETWORK
Get contents of
https://myprofile.bmw.com.cn/cis/eadrax-community/private-api/v1/mine/check-in
Options Under Construction

Contents of URL