Skip to content

Commit

Permalink
'sentry'
Browse files Browse the repository at this point in the history
  • Loading branch information
lujiehui committed Oct 29, 2019
1 parent 57b4fd2 commit 3875811
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 11 deletions.
2 changes: 1 addition & 1 deletion mock/article.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Mock from 'mockjs'

const List = []
const count = 100
const count = 20

const baseContent = '<p>I am testing data, I am testing data.</p><p><img src="https://wpimg.wallstcn.com/4c69009c-0fd4-4153-b112-6cb53d1cf943"></p>'
const imageUri = 'https://wpimg.wallstcn.com/e4558086-631c-425c-9430-56ffb46e70b3'
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"
},
"dependencies": {
"@sentry/browser": "^5.7.1",
"@sentry/integrations": "^5.7.1",
"axios": "^0.19.0",
"core-js": "2.6.5",
"dayjs": "^1.8.16",
Expand Down
7 changes: 3 additions & 4 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,14 @@ export default {
.router {
width: 100%;
height: 100%;
overflow: scroll;
position: absolute;
overflow: hidden !important;
overflow-y: auto !important;
overflow-x: hidden;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: #fff;
// background-color: #fff;
}
</style>
4 changes: 3 additions & 1 deletion src/components/FooterTabbar.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<template>
<van-tabbar route>
<van-tabbar route
:safe-area-inset-bottom="true">
<van-tabbar-item icon="home-o"
replace
to="/">首页</van-tabbar-item>
<van-tabbar-item icon="orders-o"
replace
to="/article">文章</van-tabbar-item>
</van-tabbar>

</template>
<script>
import { Tabbar, TabbarItem } from 'vant'
Expand Down
7 changes: 7 additions & 0 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import '@/icons' // icon
import '@/style/common.scss'
import { Lazyload } from 'vant'
import defaultSettings from '@/settings'
import * as Sentry from '@sentry/browser'
import * as Integrations from '@sentry/integrations'

/**
* If you don't want to use mock-server
Expand All @@ -20,6 +22,11 @@ import defaultSettings from '@/settings'
* please remove it before going online! ! !
*/
import { mockXHR } from '../mock'

Sentry.init({
dsn: 'https://[email protected]/1800421',
integrations: [new Integrations.Vue({ Vue, attachProps: true })]
})
if (process.env.NODE_ENV === 'production') {
mockXHR()
}
Expand Down
2 changes: 1 addition & 1 deletion src/style/_variables.scss
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$color-main:red;
$tabbarHeight: 50px;
4 changes: 2 additions & 2 deletions src/style/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ $--transition-time: 300ms;
}
.back-enter {
opacity: 0.75;
transform: translate3d(-100%, 0, 0) !important;
transform: translate3d(-50%, 0, 0) !important;
}
.back-enter-active {
z-index: -1 !important;
Expand All @@ -55,6 +55,6 @@ $--transition-time: 300ms;
.forward-leave-active {
z-index: -1;
opacity: 0.65;
transform: translate3d(-100%, 0, 0) !important;
transform: translate3d(-50%, 0, 0) !important;
transition: transform $--transition-time;
}
7 changes: 6 additions & 1 deletion src/views/Home.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="home">
<div class="container">
<div class="banner">
<van-swipe :autoplay="3000">
<van-swipe-item v-for="(image, index) in images"
Expand Down Expand Up @@ -99,6 +99,11 @@ export default {
}
</script>
<style lang="scss" scoped>
.container{
height: auto;
width: 100%;
padding-bottom: 50px;
}
.banner {
width: 100%;
height: auto;
Expand Down
63 changes: 62 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,67 @@
resolved "https://registry.npm.taobao.org/@nodelib/fs.stat/download/@nodelib/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b"
integrity sha1-K1o6s/kYzKSKjHVMCBaOPwPrphs=

"@sentry/browser@^5.7.1":
version "5.7.1"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-5.7.1.tgz#1f8435e2a325d7a09f830065ebce40a2b3c708a4"
integrity sha512-K0x1XhsHS8PPdtlVOLrKZyYvi5Vexs9WApdd214bO6KaGF296gJvH1mG8XOY0+7aA5i2A7T3ttcaJNDYS49lzw==
dependencies:
"@sentry/core" "5.7.1"
"@sentry/types" "5.7.1"
"@sentry/utils" "5.7.1"
tslib "^1.9.3"

"@sentry/[email protected]":
version "5.7.1"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.7.1.tgz#3eb2b7662cac68245931ee939ec809bf7a639d0e"
integrity sha512-AOn3k3uVWh2VyajcHbV9Ta4ieDIeLckfo7UMLM+CTk2kt7C89SayDGayJMSsIrsZlL4qxBoLB9QY4W2FgAGJrg==
dependencies:
"@sentry/hub" "5.7.1"
"@sentry/minimal" "5.7.1"
"@sentry/types" "5.7.1"
"@sentry/utils" "5.7.1"
tslib "^1.9.3"

"@sentry/[email protected]":
version "5.7.1"
resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.7.1.tgz#a52acd9fead7f3779d96e9965c6978aecc8b9cad"
integrity sha512-evGh323WR073WSBCg/RkhlUmCQyzU0xzBzCZPscvcoy5hd4SsLE6t9Zin+WACHB9JFsRQIDwNDn+D+pj3yKsig==
dependencies:
"@sentry/types" "5.7.1"
"@sentry/utils" "5.7.1"
tslib "^1.9.3"

"@sentry/integrations@^5.7.1":
version "5.7.1"
resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-5.7.1.tgz#53ff804e2cb4f069d69c491cf20190f6aac6682e"
integrity sha512-LMKVVfB4VlpPE5I8OyD2soj/iNaicnpWObpBxfPDfsJAnXo5sV7zkWwEfvCia2dcXCXkpE2Xz77tiZubK7zrMQ==
dependencies:
"@sentry/types" "5.7.1"
"@sentry/utils" "5.7.1"
tslib "^1.9.3"

"@sentry/[email protected]":
version "5.7.1"
resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.7.1.tgz#56afc537737586929e25349765e37a367958c1e1"
integrity sha512-nS/Dg+jWAZtcxQW8wKbkkw4dYvF6uyY/vDiz/jFCaux0LX0uhgXAC9gMOJmgJ/tYBLJ64l0ca5LzpZa7BMJQ0g==
dependencies:
"@sentry/hub" "5.7.1"
"@sentry/types" "5.7.1"
tslib "^1.9.3"

"@sentry/[email protected]":
version "5.7.1"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.7.1.tgz#4c4c1d4d891b6b8c2c3c7b367d306a8b1350f090"
integrity sha512-tbUnTYlSliXvnou5D4C8Zr+7/wJrHLbpYX1YkLXuIJRU0NSi81bHMroAuHWILcQKWhVjaV/HZzr7Y/hhWtbXVQ==

"@sentry/[email protected]":
version "5.7.1"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.7.1.tgz#cf37ad55f78e317665cd8680f202d307fa77f1d0"
integrity sha512-nhirUKj/qFLsR1i9kJ5BRvNyzdx/E2vorIsukuDrbo8e3iZ11JMgCOVrmC8Eq9YkHBqgwX4UnrPumjFyvGMZ2Q==
dependencies:
"@sentry/types" "5.7.1"
tslib "^1.9.3"

"@soda/friendly-errors-webpack-plugin@^1.7.1":
version "1.7.1"
resolved "https://registry.npm.taobao.org/@soda/friendly-errors-webpack-plugin/download/@soda/friendly-errors-webpack-plugin-1.7.1.tgz#706f64bcb4a8b9642b48ae3ace444c70334d615d"
Expand Down Expand Up @@ -8370,7 +8431,7 @@ tryer@^1.0.1:
resolved "https://registry.npm.taobao.org/tryer/download/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8"
integrity sha1-8shUBoALmw90yfdGW4HqrSQSUvg=

tslib@^1.9.0:
tslib@^1.9.0, tslib@^1.9.3:
version "1.10.0"
resolved "https://registry.npm.taobao.org/tslib/download/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
integrity sha1-w8GflZc/sKYpc/sJ2Q2WHuQ+XIo=
Expand Down

0 comments on commit 3875811

Please sign in to comment.