Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
xianyu-ufo-app-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
huzhiming
5 years ago
Commit
85962f977f9ddf2740cf7995e86cf775ef1265ee
2 parents
15ef45bf
1487082b
Merge branch 'feature/share' of
http://git.yoho.cn/fe/xianyu-ufo-app-web
into feature/share
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
2 deletions
apps/common/xianyu.js
apps/entry-client.js
apps/store/yoho/index.js
package.json
yarn.lock
apps/common/xianyu.js
View file @
85962f9
...
...
@@ -202,6 +202,17 @@ const xianyu = {
errorAction
&&
errorAction
(
error
);
});
}
},
getClientInfo
(
okAction
,
errorAction
)
{
if
(
this
.
isAliApp
&&
window
.
WindVane
)
{
window
.
WindVane
.
call
(
'WVNativeDetector'
,
'getModelInfo'
,
{},
data
=>
{
okAction
&&
okAction
(
data
);
},
error
=>
{
errorAction
&&
errorAction
(
error
);
});
}
else
{
errorAction
&&
errorAction
();
}
}
};
...
...
apps/entry-client.js
View file @
85962f9
...
...
@@ -32,6 +32,11 @@ import 'video.js/dist/video-js.css';
import
sdk
from
'yoho-activity-sdk'
;
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
const
VConsole
=
require
(
'vconsole'
);
const
vConsole
=
new
VConsole
();
}
import
{
initClient
,
initBaseLogs
...
...
@@ -78,6 +83,7 @@ Vue.use(ChangeBidPriceDialog);
initClient
(
store
);
initBaseLogs
();
store
.
$xianyu
=
xianyu
;
xianyu
.
$router
=
router
;
yoho
.
auth
=
async
(
args
)
=>
{
let
{
...
...
apps/store/yoho/index.js
View file @
85962f9
import
*
as
Types
from
'./types'
;
import
cookie
from
'yoho-cookie'
;
import
{
merge
}
from
'lodash'
;
import
{
get
,
set
,
merge
}
from
'lodash'
;
export
default
function
(
mergeState
=
{})
{
return
{
...
...
@@ -201,12 +201,38 @@ export default function(mergeState = {}) {
{
params
:
{
appop
,
param
},
asyncindx
=
false
,
retry
=
false
},
)
{
try
{
// console.log(appop)
// console.log(param)
setTimeout
(()
=>
{
// 获取设备信息
if
(
!
retry
&&
!
get
(
window
,
'appBaseLogs.device.dm'
)
&&
this
.
$xianyu
.
getClientInfo
)
{
this
.
$xianyu
.
getClientInfo
(
info
=>
{
info
=
info
||
{}
set
(
window
,
'appBaseLogs.device.dm'
,
info
.
platformName
?
info
.
platformName
:
`
$
{
info
.
brand
}
$
{
info
.
model
}
`
);
this
.
dispatch
(
'reportYas'
,
{
params
:
{
appop
,
param
},
asyncindx
,
retry
:
true
});
},
(
error
)
=>
{
error
&&
set
(
window
,
'appBaseLogs.device.dm'
,
'unknown'
);
this
.
dispatch
(
'reportYas'
,
{
params
:
{
appop
,
param
},
asyncindx
,
retry
:
true
});
});
return
;
}
if
(
window
.
_yas
&&
window
.
_yas
.
sendAppLogs
)
{
param
=
param
||
{};
...
...
package.json
View file @
85962f9
{
"name"
:
"xianyu-ufo-app-web"
,
"version"
:
"0.0.2-beta-
1
"
,
"version"
:
"0.0.2-beta-
2
"
,
"private"
:
true
,
"description"
:
"Xianyu Project With Express"
,
"repository"
:
{
...
...
@@ -131,6 +131,7 @@
"terser-webpack-plugin"
:
"^2.1.3"
,
"uglifyjs-webpack-plugin"
:
"^2.2.0"
,
"url-loader"
:
"^1.1.2"
,
"vconsole"
:
"^3.3.4"
,
"webpack"
:
"4.16.5"
,
"webpack-bundle-analyzer"
:
"^3.0.3"
,
"webpack-cli"
:
"^3.1.2"
,
...
...
yarn.lock
View file @
85962f9
...
...
@@ -10893,6 +10893,11 @@ vary@~1.1.2:
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
vconsole@^3.3.4:
version "3.3.4"
resolved "http://npm.yohops.com/vconsole/-/vconsole-3.3.4.tgz#a7dacd8887b3d3e902e8d18425cda56c34e77f51"
integrity sha1-p9rNiIez0+kC6NGEJc2lbDTnf1E=
verror@1.10.0:
version "1.10.0"
resolved "http://npm.yohops.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
...
...
Please
register
or
login
to post a comment