提交 3819e781 编写于 作者: d-u-a's avatar d-u-a

回滚错误合并提交(master to dev) 7b1f02c0

上级 9853f853
...@@ -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.url); plus.runtime.openURL(openUrl);
} }
} }
}) })
...@@ -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>
# 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/)
<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: 30rpx;
color: #BEBEBE;
padding: 20rpx 0;
}
.submit {
border-bottom: 1rpx solid #BEBEBE;
}
</style>
<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>
<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>
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({
......
...@@ -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",
......
...@@ -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: [],
......
...@@ -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',
......
...@@ -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() {
......
...@@ -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: [{
......
...@@ -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,
......
...@@ -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.
先完成此消息的编辑!
想要评论请 注册