mirror of
https://github.com/ZZZure/ZZZ-Plugin.git
synced 2025-12-16 05:07:46 +00:00
自定义默认设备信息
This commit is contained in:
parent
a3ca1bb11e
commit
103661a4c5
3 changed files with 73 additions and 6 deletions
7
defSet/device.yaml
Normal file
7
defSet/device.yaml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# lib/mysapi/tool.js
|
||||
productName:
|
||||
productType:
|
||||
modelName:
|
||||
oaid:
|
||||
deviceInfo:
|
||||
board:
|
||||
|
|
@ -195,6 +195,64 @@ export function supportGuoba() {
|
|||
placeholder: '请输入数字1~7',
|
||||
},
|
||||
},
|
||||
{
|
||||
component: 'Divider',
|
||||
label: '默认设备信息设置',
|
||||
},
|
||||
{
|
||||
field: 'device.productName',
|
||||
label: 'productName',
|
||||
bottomHelpMessage: '设置默认设备productName字段',
|
||||
component:'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入productName',
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'device.productType',
|
||||
label: 'productType',
|
||||
bottomHelpMessage: '设置默认设备productType字段',
|
||||
component:'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入productType',
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'device.modelName',
|
||||
label: 'modelName',
|
||||
bottomHelpMessage: '设置默认设备modelName字段',
|
||||
component:'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入modelName',
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'device.oaid',
|
||||
label: 'oaid',
|
||||
bottomHelpMessage: '设置默认设备oaid字段',
|
||||
component:'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入oaid',
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'device.deviceInfo',
|
||||
label: 'deviceInfo',
|
||||
bottomHelpMessage: '设置默认设备deviceInfo字段',
|
||||
component:'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入deviceInfo',
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'device.board',
|
||||
label: 'board',
|
||||
bottomHelpMessage: '设置默认设备board字段',
|
||||
component:'Input',
|
||||
componentProps: {
|
||||
placeholder: '请输入board',
|
||||
}
|
||||
},
|
||||
{
|
||||
component: 'Divider',
|
||||
label: '优先级设置(-1000~1000)',
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
import { generateSeed, randomString } from '../../utils/data.js';
|
||||
import settings from '../settings.js';
|
||||
import _ from 'lodash';
|
||||
import crypto from 'crypto';
|
||||
/**
|
||||
* derived from miao-yunzai
|
||||
|
|
@ -75,12 +77,12 @@ export default class ZZZApiTool {
|
|||
|
||||
getUrlMap = (data = {}) => {
|
||||
const {
|
||||
productName = 'J9110',
|
||||
deviceType = 'J9110',
|
||||
modelName = 'Sony',
|
||||
oaid = 'e3ba65d61709d17074a306072a7c3a2ec70e6d374ca6d29eb6b1b965cbb68e23',
|
||||
deviceInfo = `Sony\/J9110\/J9110:11\/55.2.A.4.332\/055002A004033203408384484:user\/release-keys`,
|
||||
board = 'msmnile',
|
||||
productName = _.get(settings.getConfig('device'), 'productName', 'J9110'),
|
||||
deviceType = _.get(settings.getConfig('device'), 'productType', 'J9110'),
|
||||
modelName = _.get(settings.getConfig('device'), 'modelName', 'Sony'),
|
||||
oaid = _.get(settings.getConfig('device'), 'oaid', 'e3ba65d61709d17074a306072a7c3a2ec70e6d374ca6d29eb6b1b965cbb68e23'),
|
||||
deviceInfo = _.get(settings.getConfig('device'), 'deviceInfo', 'Sony/J9110/J9110:11/55.2.A.4.332/055002A004033203408384484:user/release-keys'),
|
||||
board = _.get(settings.getConfig('device'), 'board', 'msmnile'),
|
||||
} = data;
|
||||
const deviceBrand = deviceInfo.split('/')[0];
|
||||
let urlMap = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue