Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_54239399
hello-uniapp
提交
3819e781
H
hello-uniapp
项目概览
weixin_54239399
/
hello-uniapp
与 Fork 源项目一致
从无法访问的项目Fork
通知
4
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello-uniapp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
3819e781
编写于
7月 16, 2020
作者:
d-u-a
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
回滚错误合并提交(master to dev)
7b1f02c0
上级
9853f853
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
169 addition
and
37 deletion
+169
-37
App.vue
App.vue
+6
-14
README.md
README.md
+19
-19
components/page-foot.vue
components/page-foot.vue
+38
-0
components/page-head.vue
components/page-head.vue
+16
-0
components/uLink.vue
components/uLink.vue
+59
-0
main.js
main.js
+7
-0
pages.json
pages.json
+1
-4
pages/about/about.vue
pages/about/about.vue
+5
-0
pages/component/input/input.nvue
pages/component/input/input.nvue
+4
-0
pages/tabBar/API/API.nvue
pages/tabBar/API/API.nvue
+2
-0
pages/tabBar/component/component.nvue
pages/tabBar/component/component.nvue
+4
-0
pages/tabBar/extUI/extUI.nvue
pages/tabBar/extUI/extUI.nvue
+4
-0
pages/tabBar/template/template.nvue
pages/tabBar/template/template.nvue
+4
-0
未找到文件。
App.vue
浏览文件 @
3819e781
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
onLaunch
:
function
()
{
onLaunch
:
function
()
{
console
.
log
(
'
App Launch
'
);
console
.
log
(
'
App Launch
'
);
// #ifdef APP-PLUS
// #ifdef APP-PLUS
// 检测升级
,服务端代码是通过uniCloud的云函数实现的,详情可参考:https://ext.dcloud.net.cn/plugin?id=2226
// 检测升级
uni
.
request
({
uni
.
request
({
url
:
'
https://
7a3e3fa9-7820-41d0-be80-11927ac2026c.bspapp.com/http
/update
'
,
//检查更新的服务器地址
url
:
'
https://
uniapp.dcloud.io
/update
'
,
//检查更新的服务器地址
data
:
{
data
:
{
appid
:
plus
.
runtime
.
appid
,
appid
:
plus
.
runtime
.
appid
,
version
:
plus
.
runtime
.
version
,
version
:
plus
.
runtime
.
version
,
...
@@ -13,13 +13,14 @@
...
@@ -13,13 +13,14 @@
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
if
(
res
.
statusCode
==
200
&&
res
.
data
.
isUpdate
)
{
if
(
res
.
statusCode
==
200
&&
res
.
data
.
isUpdate
)
{
let
openUrl
=
plus
.
os
.
name
===
'
iOS
'
?
res
.
data
.
iOS
:
res
.
data
.
Android
;
// 提醒用户更新
// 提醒用户更新
uni
.
showModal
({
uni
.
showModal
({
title
:
'
更新提示
'
,
title
:
'
更新提示
'
,
content
:
res
.
data
.
note
?
res
.
data
.
note
:
'
是否选择更新
'
,
content
:
res
.
data
.
note
?
res
.
data
.
note
:
'
是否选择更新
'
,
success
:
(
ee
)
=>
{
success
:
(
showResult
)
=>
{
if
(
ee
.
confirm
)
{
if
(
showResult
.
confirm
)
{
plus
.
runtime
.
openURL
(
res
.
data
.
u
rl
);
plus
.
runtime
.
openURL
(
openU
rl
);
}
}
}
}
})
})
...
@@ -81,13 +82,4 @@
...
@@ -81,13 +82,4 @@
}
}
/* #endif*/
/* #endif*/
/* #ifdef MP-360 */
::-webkit-scrollbar
{
width
:
4px
;
height
:
4px
;
background-color
:
transparent
;}
::-webkit-scrollbar-track
{
background-color
:
transparent
;}
::-webkit-scrollbar-thumb
{
background-color
:
#ddd
;}
::-webkit-scrollbar-thumb:hover
{
background-color
:
#ccc
;}
::-webkit-scrollbar-thumb:active
{
background-color
:
#bbb
;}
::-webkit-scrollbar-corner
{
background
:
#ffffff
;}
/* #endif*/
</
style
>
</
style
>
README.md
浏览文件 @
3819e781
# hello-uniapp
# hello-uniapp
`uni-app`
框架示例,一套代码,同时发行到iOS、Android、H5、小程序等多个平台,请使用手机扫码快速体验
`uni-app`
的强大功能。
`uni-app`
框架示例,一套代码,同时发行到iOS、Android、H5、小程序等多个平台,请使用手机扫码快速体验
`uni-app`
的强大功能。
<div
class=
"quick"
>
<div
class=
"quick"
>
<h3
id=
"快速体验"
><a
href=
"/README?id=%e5%bf%ab%e9%80%9f%e4%bd%93%e9%aa%8c"
data-id=
"快速体验"
class=
"anchor"
><span>
快速体验
</span></a></h3>
<h3
id=
"快速体验"
><a
href=
"/README?id=%e5%bf%ab%e9%80%9f%e4%bd%93%e9%aa%8c"
data-id=
"快速体验"
class=
"anchor"
><span>
快速体验
</span></a></h3>
<p>
一套代码编到10个平台,这不是梦想。眼见为实,扫描10个二维码,亲自体验最全面的跨平台效果!
</p>
<p>
一套代码编到10个平台,这不是梦想。眼见为实,扫描10个二维码,亲自体验最全面的跨平台效果!
</p>
<div
class=
"flex-img-group-view"
>
<div
class=
"flex-img-group-view"
>
<a
href=
"//m3w.cn/uniapp"
target=
"_blank"
class=
"clear-style barcode-view"
>
<a
href=
"//m3w.cn/uniapp"
target=
"_blank"
class=
"clear-style barcode-view"
>
<div
class=
"barcode-img-box"
>
<div
class=
"barcode-img-box"
>
<img
src=
"https://
vkceyugu.cdn.bspapp.com/VKCEYUGU-uni-app-doc/7c946930-bcf2-11ea-b997-9918a5dda011
.png"
width=
"160"
/>
<img
src=
"https://
img-cdn-qiniu.dcloud.net.cn/uniapp/doc/uni-android
.png"
width=
"160"
/>
</div>
</div>
<b>
Android版
</b>
<b>
Android版
</b>
</a>
</a>
<a
href=
"https://itunes.apple.com/cn/app/hello-uni-app/id1417078253?mt=8"
target=
"_blank"
class=
"clear-style barcode-view"
>
<a
href=
"https://itunes.apple.com/cn/app/hello-uni-app/id1417078253?mt=8"
target=
"_blank"
class=
"clear-style barcode-view"
>
<div
class=
"barcode-img-box"
>
<div
class=
"barcode-img-box"
>
<img
src=
"https://
vkceyugu.cdn.bspapp.com/VKCEYUGU-uni-app-doc/7c910dd0-bcf2-11ea-b680-7980c8a877b8
.png"
width=
"160"
/>
<img
src=
"https://
img-cdn-qiniu.dcloud.net.cn/uniapp/doc/uni-ios
.png"
width=
"160"
/>
</div>
</div>
<b>
iOS版
</b>
<b>
iOS版
</b>
</a>
</a>
...
@@ -29,13 +29,13 @@
...
@@ -29,13 +29,13 @@
<b>
微信小程序版
</b>
<b>
微信小程序版
</b>
</a>
</a>
<a
href=
"//m3w.cn/uniapp"
target=
"_blank"
class=
"clear-style barcode-view"
>
<a
href=
"//m3w.cn/uniapp"
target=
"_blank"
class=
"clear-style barcode-view"
>
<div
class=
"barcode-img-box"
><img
src=
"https://
vkceyugu.cdn.bspapp.com/VKCEYUGU-uni-app-doc/30112940-bcf2-11ea-a30b-e311646dfaf2
.png"
width=
"160"
/></div>
<div
class=
"barcode-img-box"
><img
src=
"https://
img-cdn-qiniu.dcloud.net.cn/img/alipay1
.png"
width=
"160"
/></div>
<b>
支付宝小程序版
</b>
<b>
支付宝小程序版
</b>
</a>
</a>
</div>
</div>
<div
class=
"flex-img-group-view"
style=
"margin-top: 20px;"
>
<div
class=
"flex-img-group-view"
style=
"margin-top: 20px;"
>
<a
href=
"//m3w.cn/uniapp"
target=
"_blank"
class=
"clear-style barcode-view"
>
<a
href=
"//m3w.cn/uniapp"
target=
"_blank"
class=
"clear-style barcode-view"
>
<div
class=
"barcode-img-box"
><img
src=
"https://
vkceyugu.cdn.bspapp.com/VKCEYUGU-uni-app-doc/e7fc6700-bcf1-11ea-b680-7980c8a877b8
.png"
width=
"160"
/></div>
<div
class=
"barcode-img-box"
><img
src=
"https://
img-cdn-qiniu.dcloud.net.cn/uniapp/doc/baidu-uniapp
.png"
width=
"160"
/></div>
<b>
百度小程序版
</b>
<b>
百度小程序版
</b>
</a>
</a>
<a
href=
"//m3w.cn/uniapp"
target=
"_blank"
class=
"clear-style barcode-view"
>
<a
href=
"//m3w.cn/uniapp"
target=
"_blank"
class=
"clear-style barcode-view"
>
...
@@ -63,14 +63,14 @@
...
@@ -63,14 +63,14 @@
<b>
360小程序
</b>
<b>
360小程序
</b>
</a>
</a>
</div>
</div>
<p>
</div
>
<em>
注:某些平台不能提交简单demo,故补充了一些其他功能;hello uni-app示例代码可从
[
github
](
https://github.com/dcloudio/hello-uniapp
)
获取
</em></br
>
<em>
快应用仅支持 vivo 、oppo、华为
</em></br>
> 注:某些平台不能提交简单demo,故补充了一些其他功能;hello uni-app示例代码可从[github](https://github.com/dcloudio/hello-uniapp)获取
<em>
360小程序仅 windows平台支持,需要在360浏览器中打开
</em></br>
> - 快应用仅支持 vivo 、oppo、华为
</p>
> - 360小程序仅 windows平台支持,需要在360浏览器中打开
</div>
`uni-app`
官网文档详见
[
https://uniapp.dcloud.io
](
https://uniapp.dcloud.io
)
`uni-app`
官网文档详见
[
https://uniapp.dcloud.io
](
https://uniapp.dcloud.io
)
更多uni-app的模板、示例详见
[
插件市场
](
https://ext.dcloud.net.cn/
)
更多uni-app的模板、示例详见
[
插件市场
](
https://ext.dcloud.net.cn/
)
components/page-foot.vue
0 → 100644
浏览文件 @
3819e781
<
template
name=
"page-foot"
>
<view
class=
"page-share-title"
>
<text>
感谢
{{
name
}}
提供本示例,
</text>
<text
class=
"submit"
@
tap=
"submit"
>
我也提交
</text>
</view>
</
template
>
<
script
>
export
default
{
name
:
"
page-foot
"
,
props
:
{
name
:
{
type
:
String
,
default
:
""
}
},
methods
:
{
submit
()
{
uni
.
showModal
({
content
:
"
hello uni-app开源地址为https://github.com/dcloudio/uni-app/tree/master/examples,请在这个开源项目上贡献你的代码
"
,
showCancel
:
false
})
}
}
}
</
script
>
<
style
>
.page-share-title
{
text-align
:
center
;
font-size
:
30
rpx
;
color
:
#BEBEBE
;
padding
:
20
rpx
0
;
}
.submit
{
border-bottom
:
1
rpx
solid
#BEBEBE
;
}
</
style
>
components/page-head.vue
0 → 100644
浏览文件 @
3819e781
<
template
name=
"page-head"
>
<view
class=
"uni-page-head"
>
<view
class=
"uni-page-head-title"
>
{{
title
}}
</view>
</view>
</
template
>
<
script
>
export
default
{
name
:
"
page-head
"
,
props
:
{
title
:
{
type
:
String
,
default
:
""
}
}
}
</
script
>
components/uLink.vue
0 → 100644
浏览文件 @
3819e781
<
template
>
<text
style=
"text-decoration:underline"
:href=
"href"
@
click=
"openURL"
:inWhiteList=
"inWhiteList"
>
{{
text
}}
</text>
</
template
>
<
script
>
/**
* @description u-link是一个外部网页超链接组件,在小程序内打开内部web-view组件或复制url,在app内打开外部浏览器,在h5端打开新网页
* @property {String} href 点击后打开的外部网页url,小程序中必须以https://开头
* @property {String} text 显示的文字
* @property {Boolean} inWhiteList 是否在小程序白名单中,如果在的话,在小程序端会直接打开内置web-view,否则会只会复制url,提示在外部打开
* @example * <u-link href="https://ext.dcloud.net.cn" text="https://ext.dcloud.net.cn" :inWhiteList="true"></u-link>
*/
export
default
{
name
:
'
u-link
'
,
props
:
{
href
:
{
type
:
String
,
default
:
''
},
text
:
{
type
:
String
,
default
:
''
},
inWhiteList
:
{
type
:
Boolean
,
default
:
false
}
},
methods
:
{
openURL
()
{
// #ifdef APP-PLUS
plus
.
runtime
.
openURL
(
this
.
href
)
//这里默认使用外部浏览器打开而不是内部web-view组件打开
// #endif
// #ifdef H5
window
.
open
(
this
.
href
)
// #endif
// #ifdef MP
if
(
this
.
inWhiteList
)
{
//如果在小程序的网址白名单中,会走内置webview打开,否则会复制网址提示在外部浏览器打开
uni
.
navigateTo
({
url
:
'
/pages/component/web-view/web-view?url=
'
+
this
.
href
});
}
else
{
uni
.
setClipboardData
({
data
:
this
.
href
});
uni
.
showModal
({
content
:
'
本网址无法直接在小程序内打开。已自动复制网址,请在手机浏览器里粘贴该网址
'
,
showCancel
:
false
});
}
// #endif
}
}
}
</
script
>
<
style
>
</
style
>
main.js
浏览文件 @
3819e781
import
Vue
from
'
vue
'
import
Vue
from
'
vue
'
import
App
from
'
./App
'
import
App
from
'
./App
'
import
pageHead
from
'
./components/page-head.vue
'
import
pageFoot
from
'
./components/page-foot.vue
'
import
uLink
from
'
@/components/uLink.vue
'
import
store
from
'
./store
'
import
store
from
'
./store
'
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
...
@@ -13,6 +16,10 @@ Vue.prototype.$backgroundAudioData = {
...
@@ -13,6 +16,10 @@ Vue.prototype.$backgroundAudioData = {
}
}
Vue
.
prototype
.
$adpid
=
"
1111111111
"
Vue
.
prototype
.
$adpid
=
"
1111111111
"
Vue
.
component
(
'
page-head
'
,
pageHead
)
Vue
.
component
(
'
page-foot
'
,
pageFoot
)
Vue
.
component
(
'
uLink
'
,
uLink
)
App
.
mpType
=
'
app
'
App
.
mpType
=
'
app
'
const
app
=
new
Vue
({
const
app
=
new
Vue
({
...
...
pages.json
浏览文件 @
3819e781
...
@@ -1153,10 +1153,7 @@
...
@@ -1153,10 +1153,7 @@
]
]
}
}
],
],
"globalStyle"
:
{
"globalStyle"
:
{
//
#ifdef
MP
-360
"navigationStyle"
:
"custom"
,
//
#endif
"pageOrientation"
:
"portrait"
,
"pageOrientation"
:
"portrait"
,
"navigationBarTextStyle"
:
"white"
,
"navigationBarTextStyle"
:
"white"
,
"navigationBarTitleText"
:
"Hello uniapp"
,
"navigationBarTitleText"
:
"Hello uniapp"
,
...
...
pages/about/about.vue
浏览文件 @
3819e781
...
@@ -35,7 +35,12 @@
...
@@ -35,7 +35,12 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
uLink
from
"
@/components/uLink.vue
"
export
default
{
export
default
{
components
:
{
uLink
},
data
()
{
data
()
{
return
{
return
{
providerList
:
[],
providerList
:
[],
...
...
pages/component/input/input.nvue
浏览文件 @
3819e781
...
@@ -106,7 +106,11 @@
...
@@ -106,7 +106,11 @@
</view>
</view>
</template>
</template>
<script>
<script>
import pageHead from '@/components/page-head.vue'
export default {
export default {
components: {
pageHead
},
data() {
data() {
return {
return {
title: 'input',
title: 'input',
...
...
pages/tabBar/API/API.nvue
浏览文件 @
3819e781
...
@@ -28,9 +28,11 @@
...
@@ -28,9 +28,11 @@
</view>
</view>
</template>
</template>
<script>
<script>
import uLink from '@/components/uLink.vue'
import setTabBar from '@/components/api-set-tabbar.nvue';
import setTabBar from '@/components/api-set-tabbar.nvue';
export default {
export default {
components: {
components: {
uLink,
setTabBar
setTabBar
},
},
data() {
data() {
...
...
pages/tabBar/component/component.nvue
浏览文件 @
3819e781
...
@@ -32,7 +32,11 @@
...
@@ -32,7 +32,11 @@
});
});
// #endif
// #endif
import uLink from '@/components/uLink.vue'
export default {
export default {
components: {
uLink
},
data() {
data() {
return {
return {
list: [{
list: [{
...
...
pages/tabBar/extUI/extUI.nvue
浏览文件 @
3819e781
...
@@ -16,7 +16,11 @@
...
@@ -16,7 +16,11 @@
</view>
</view>
</template>
</template>
<script>
<script>
import uLink from "@/components/uLink.vue"
export default {
export default {
components: {
uLink
},
data() {
data() {
return {
return {
navigateFlag: false,
navigateFlag: false,
...
...
pages/tabBar/template/template.nvue
浏览文件 @
3819e781
...
@@ -22,7 +22,11 @@
...
@@ -22,7 +22,11 @@
</view>
</view>
</template>
</template>
<script>
<script>
import uLink from '@/components/uLink.vue'
export default {
export default {
components: {
uLink
},
data() {
data() {
return {
return {
list: [
list: [
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录