提交 524ab7d4 编写于 作者: zhaofengliang920817's avatar zhaofengliang920817

Merge branch 'dev' into dev-share

......@@ -49,15 +49,15 @@
// 统计上报 - 应用启动
// #ifdef APP-ANDROID || APP-IOS || WEB
uni.report({
name: 'uni-app-launch',
options: res,
success(res_data) {
console.log(res_data);
}, fail(err) {
console.log(err);
}
})
// uni.report({
// name: 'uni-app-launch',
// options: res,
// success(res_data) {
// console.log(res_data);
// }, fail(err) {
// console.log(err);
// }
// })
// #endif
// #ifdef APP
if (process.env.NODE_ENV !== 'development') { //真机运行可以注释此条件
......@@ -90,14 +90,14 @@
// #ifdef APP-ANDROID || APP-IOS || WEB
// 统计上报 - 应用显示
uni.report({
name: 'uni-app-show',
success(res_data) {
console.log(res_data);
}, fail(err) {
console.log(err);
}
})
// uni.report({
// name: 'uni-app-show',
// success(res_data) {
// console.log(res_data);
// }, fail(err) {
// console.log(err);
// }
// })
// #endif
},
onHide: function () {
......@@ -107,14 +107,14 @@
// #ifdef APP-ANDROID || APP-IOS || WEB
// 统计上报 - 应用进入后台
uni.report({
name: 'uni-app-hide',
success(res) {
console.log(res);
}, fail(err) {
console.log(err);
}
})
// uni.report({
// name: 'uni-app-hide',
// success(res) {
// console.log(res);
// }, fail(err) {
// console.log(err);
// }
// })
// #endif
},
// #ifdef APP-ANDROID
......@@ -139,20 +139,20 @@
onExit() {
console.log('App Exit')
},
onError(err : any) {
// #ifdef APP-ANDROID || APP-IOS || WEB
// 统计上报 - 应用发生错误
uni.report({
name: 'uni-app-error',
options: err,
success(res) {
console.log(res);
}, fail(err) {
console.log(err);
}
})
// #endif
},
// onError(err : any) {
// // #ifdef APP-ANDROID || APP-IOS || WEB
// // 统计上报 - 应用发生错误
// uni.report({
// name: 'uni-app-error',
// options: err,
// success(res) {
// console.log(res);
// }, fail(err) {
// console.log(err);
// }
// })
// // #endif
// },
// #endif
methods: {
increasetLifeCycleNum() {
......
// 仅测试 console.log 时机问题
import './test-main-console.uts'
// #ifdef APP-ANDROID || APP-IOS || WEB
import { uniStat } from '@/uni_modules/uni-stat/plugin.uts'
// import { uniStat } from '@/uni_modules/uni-stat/plugin.uts'
// #endif
import App from './App.uvue'
import { createSSRApp } from 'vue'
// 统计配置
const collectItems = {
uniStatPageLog: true
}
// // 统计配置
// const collectItems = {
// uniStatPageLog: true
// }
const statOptions = {
debug: false,
collectItems: collectItems,
}
// const statOptions = {
// debug: false,
// collectItems: collectItems,
// }
export function createApp() {
const app = createSSRApp(App)
// #ifdef APP-ANDROID || APP-IOS || WEB
app.use(uniStat, statOptions)
// #endif
// // #ifdef APP-ANDROID || APP-IOS || WEB
// app.use(uniStat, statOptions)
// // #endif
// app.mixin({
// onReady() {
// setTimeout(() => {
......
......@@ -2,8 +2,8 @@
"name": "Hello uni-app x",
"appid": "__UNI__HelloUniAppX",
"description": "",
"versionName": "1.6",
"versionCode": 10600,
"versionName": "1.6.3",
"versionCode": 10603,
"uni-app-x": {},
/* 快应用特有相关 */
"quickapp": {},
......
此差异已折叠。
......@@ -6,6 +6,13 @@ const FIRST_PAGE_PATH = '/pages/API/dialog-page/dialog-page'
const NEXT_PAGE_PATH = '/pages/API/dialog-page/next-page'
describe('dialog page', () => {
if (process.env.UNI_AUTOMATOR_APP_WEBVIEW == 'true') {
it('skip app-webview', () => {
expect(1).toBe(1)
})
return
}
let page;
let initLifeCycleNum;
let lifecycleNum;
......
......@@ -90,6 +90,7 @@
url: '/pages/API/dialog-page/dialog-1?name=dialog1',
success(res) {
console.log('openDialogPage1ToHomePage success', res)
uni.showToast({title: '在首页打开了 dialogPage'})
},
fail(err) {
console.log('openDialogPage1ToHomePage fail', err)
......@@ -107,4 +108,4 @@
}
}
}
</script>
</script>
......@@ -15,6 +15,9 @@
<button class="privacy-button" type="primary" @tap="resetPrivacyAuthorization">
重置隐私协议授权状态
</button>
<button class="privacy-button" @tap="openPrivacyDialog">
显示隐私政策弹框
</button>
</view>
</view>
</template>
......@@ -63,6 +66,11 @@
},
resetPrivacyAuthorization(){
uni.resetPrivacyAuthorization()
},
openPrivacyDialog(){
uni.openDialogPage({
url: '/pages/component/button/privacy',
})
}
}
}
......
......@@ -38,6 +38,11 @@
uni.navigateTo({
url: 'buttonstatus',
})
},
openPrivacyDialog() {
uni.openDialogPage({
url: '/pages/component/button/privacy',
})
},
//用于自动化测试
checkUniButtonElement() : boolean {
......@@ -71,7 +76,10 @@
<enum-data :items="type_enum" title="按钮的类型" @change="radio_change_type_enum"></enum-data>
<input-data :defaultValue="text" title="按钮的文案" type="text" @confirm="confirm_text_input"></input-data>
<view style="height: 10px;"></view>
<button @click="navigateToChild">更多示例</button>
<button @click="openPrivacyDialog">open-type实现隐私政策弹框</button>
<view style="height: 10px;"></view>
<button @click="navigateToChild">更多示例</button>
<view style="height: 10px;"></view>
</view>
</scroll-view>
</template>
......
<template>
<view class="dialog-container">
<view class="dialog-content">
<view style="width: 100%;justify-content: center;align-items: center;">
<view style="width: 100%;justify-content: center;align-items: center;background-color: #fff;">
<image src="../image/logo.png" style="margin-top: 25px;width: 60px;height: 60px;"></image>
</view>
<text style="text-align: center;margin-top: 20px;font-size: 20px;color: black;"> 个人信息保护指引</text>
<scroll-view style="flex: 1;align-content: center;margin-top: 10px;margin-left: 25px;margin-right: 25px;"
<text style="text-align: center;padding-top: 20px;font-size: 20px;color: black;background-color: #fff;"> 个人信息保护指引</text>
<scroll-view style="flex: 1;align-content: center;padding-top: 10px;padding-left: 25px;padding-right: 25px;background-color: #fff;"
show-scrollbar="false">
<rich-text style="font-size: 14px;color: red;" :nodes="htmlString" @itemclick="itemClick"></rich-text>
</scroll-view>
......@@ -67,9 +67,9 @@
}
.dialog-content {
height: 43%;
height: 60%;
width: 80%;
background-color: #fff;
/* background-color: #fff; */
border-radius: 12px;
}
......@@ -80,10 +80,10 @@
.button {
border: 0px;
border-radius: 0px;
font-size: 20px;
font-size: 15px;
color: lightgrey;
text-align: center;
line-height: 60px;
line-height: 40px;
}
.button-hover1 {
......
<template>
<view>
<view>
<text class="tips">说明:如果本地无 uts 插件编译环境请提交打包自定义基座查看效果</text>
<!-- native-button 通过 native-view 绑定原生button 实现的UTS插件-标准模式组件 -->
<native-button class="native-button" style="width: 200px; height: 100px;" :text="buttonText" @buttonTap="ontap"
@load="onload"></native-button>
<!-- native-time-picker 通过 native-view 绑定原生time-picker 实现的UTS插件-标准模式组件 -->
<native-time-picker class="native-time-picker" :hour=2 :minute=3 @changed="onChanged"></native-time-picker>
</view>
</template>
......@@ -38,7 +41,15 @@
}
</script>
<style>
<style>
.tips {
font-size: 14px;
color: #BEBEBE;
margin: 25px auto 25px auto;
text-align: center;
}
.native-button {
height: 100px;
width: 100px;
......
const PAGE_PATH = '/pages/component/rich-text/rich-text'
const PAGE_PATH = '/pages/component/rich-text/rich-text'
describe('rich-text-test', () => {
// 先屏蔽 android 及 web 平台
......@@ -9,12 +9,12 @@ describe('rich-text-test', () => {
})
return
}
let page
beforeAll(async () => {
page = await program.reLaunch(PAGE_PATH)
await page.waitFor(1500);
})
let page
beforeAll(async () => {
page = await program.reLaunch(PAGE_PATH)
await page.waitFor(1500);
})
it('richt-text-height', async () => {
......@@ -54,5 +54,13 @@ describe('rich-text-test', () => {
autoTest: false
});
});
})
it('rich-text parent click', async () => {
const element = await page.$('#rich-text-parent')
await element.tap()
await page.waitFor(500)
const element2 = await page.$('#rich-text-str')
expect(await element2.text()).toBe("true")
})
})
......@@ -16,12 +16,16 @@
<text class="uni-subtitle-text">selectable</text>
<button type="default" @click="changeText">修改文本内容</button>
</view>
<view class="text-box">
<view class="text-box" id="rich-text-parent" @click="richTextParentClick">
<rich-text id="richtext" style="border: 1px; border-style: solid; border-color: red;" :selectable="true"
:nodes="text"></rich-text>
<view>
<text>rich-text-parent</text>
<text id='rich-text-str'>{{richTextStr}}</text>
</view>
</view>
</view>
</view>
</view>
<rich-text v-if="autoTest" id="test-rich-text" :nodes="testNodes" :selectable="true" @itemclick="itemClickForTest" style="position: fixed;width: 100px;height: 100px;"></rich-text>
</template>
......@@ -31,11 +35,12 @@
return {
text: "<span>hello uni-app x!</span><br/><span>uni-app x,终极跨平台方案</span>",
richTextHeight: 0,
richTextElement: null as UniElement | null,
// 自动化测试
autoTest: false,
testNodes: '<img src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/uni@2x.png"></img>',
isItemClickTrigger: false
richTextElement: null as UniElement | null,
// 自动化测试
autoTest: false,
testNodes: '<img src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/uni@2x.png"></img>',
isItemClickTrigger: false,
richTextStr: false
}
},
onReady() {
......@@ -61,16 +66,19 @@
this.richTextHeight = elRect.height
console.log('richTextHeight:', this.richTextHeight)
}
},
// 自动化测试
itemClickForTest(_ : RichTextItemClickEvent) {
this.isItemClickTrigger = true;
},
getBoundingClientRectForTest() : DOMRect {
return uni.getElementById('test-rich-text')?.getBoundingClientRect()!;
},
getWindowInfoForTest() : GetWindowInfoResult {
return uni.getWindowInfo();
},
// 自动化测试
itemClickForTest(_ : RichTextItemClickEvent) {
this.isItemClickTrigger = true;
},
getBoundingClientRectForTest() : DOMRect {
return uni.getElementById('test-rich-text')?.getBoundingClientRect()!;
},
getWindowInfoForTest() : GetWindowInfoResult {
return uni.getWindowInfo();
},
richTextParentClick() {
this.richTextStr = true;
}
}
}
......@@ -81,4 +89,4 @@
padding: 20px 0;
background-color: white;
}
</style>
</style>
......@@ -10,7 +10,7 @@
:http-cache="httpCache" :play-strategy="playStrategy" :danmu-list="danmuList" @play="onPlay" @pause="onPause"
@ended="onEnded" @timeupdate="onTimeUpdate" @waiting="onWaiting" @error="onError" @progress="onProgress"
@fullscreenclick="onFullScreenClick" @controlstoggle="onControlsToggle" @fullscreenchange="onFullScreenChange">
<!-- #ifdef APP-ANDROID -->
<!-- #ifdef APP -->
<image v-if="subCompEnable && subCompShow" class="img-fast-backward"
src="../../../static/test-video/fast-backward.png" @tap="fastBackward"></image>
<image v-if="subCompEnable && subCompShow" class="img-fast-forward"
......@@ -26,7 +26,7 @@
<button type="primary" @click="pause">视频格式示例</button>
</navigator>
</view>
<!-- #ifdef APP-ANDROID -->
<!-- #ifdef APP -->
<view class="uni-flex uni-btn-v" style="justify-content: space-between;align-items: center;">
<text class="uni-title" style="width: 80%;">子组件实现快进、快退、发送弹幕功能(全屏后显示)</text>
<switch :checked="subCompEnable" @change="onSubCompEnableChange" />
......
......@@ -270,12 +270,12 @@ const pages = [
'/pages/template/custom-long-list/custom-long-list',
'/pages/template/test-background-color-content/test-background-color-content',
'/pages/template/slider-100/slider-100',
]
if (isAndroid && isWeb) {
pages.push(
'/pages/API/get-battery-info/get-battery-info',
)
]
if (isAndroid && isWeb) {
pages.push(
'/pages/API/get-battery-info/get-battery-info',
)
}
if (isApp && !isAppWebview) {
......@@ -417,6 +417,6 @@ describe("page screenshot test", () => {
return `__pages_test__/${currentPagePath.replace(/\//g, "-").substring(1)}`
}
})
await page.waitFor(500);
await page.waitFor(800);
});
});
<template>
<!-- #ifdef APP -->
<scroll-view style="flex: 1; background-color: #f8f8f8" enable-back-to-top="true">
<scroll-view style="flex: 1;" enable-back-to-top="true">
<!-- #endif -->
<view class="uni-container">
<view v-if="!hasLeftWin" class="uni-header-logo">
......@@ -79,11 +79,7 @@
goPage(url : string) {
if (url == '/set-tab-bar') {
this.showPop()
}else if (url == '/show-privacy-dialog') {
uni.openDialogPage({
url: '/pages/component/button/privacy',
})
} else {
}else {
if (this.hasLeftWin) {
uni.reLaunch({ url })
} else {
......
<template>
<!-- #ifdef APP -->
<scroll-view style="flex: 1; background-color: #f8f8f8" enable-back-to-top="true">
<scroll-view style="flex: 1;" enable-back-to-top="true">
<!-- #endif -->
<view class="uni-container">
<view v-if="!hasLeftWin" class="uni-header-logo">
......
<template>
<!-- #ifdef APP -->
<scroll-view style="flex: 1; background-color: #f8f8f8" enable-back-to-top="true">
<scroll-view style="flex: 1;" enable-back-to-top="true">
<!-- #endif -->
<view class="uni-container">
<view v-if="!hasLeftWin" class="uni-header-logo">
......@@ -113,7 +113,19 @@
// #endif
onReady() {
// #ifdef UNI-APP-X && APP
checkUpdate(this.$refs['upgradePopup'] as UniUpgradeCenterAppComponentPublicInstance)
uni.getPrivacySetting({
success(res) {
if (res.needAuthorization) {
uni.onPrivacyAuthorizationChange((res) => {
if (!res.needAuthorization) {
checkUpdate(this.$refs['upgradePopup'] as UniUpgradeCenterAppComponentPublicInstance)
}
})
} else {
checkUpdate(this.$refs['upgradePopup'] as UniUpgradeCenterAppComponentPublicInstance)
}
}
})
// #endif
},
onShow() {
......@@ -132,4 +144,4 @@
.item {
margin-bottom: 12px;
}
</style>
</style>
......@@ -157,17 +157,6 @@ function addSetTabBarPage(menuItem : MenuItem) {
},
group: null,
items: []
} as MenuItem)
menuItem.items.push({
id: 'show-privacy-dialog',
name: '隐私政策',
index: 0,
path: 'show-privacy-dialog',
style: {
navigationBarTitleText: '隐私政策弹框'
},
group: null,
items: []
} as MenuItem)
}
}
<template>
<!-- #ifdef APP -->
<scroll-view style="flex: 1; background-color: #f8f8f8" enable-back-to-top="true">
<scroll-view style="flex: 1;" enable-back-to-top="true">
<!-- #endif -->
<view class="uni-container">
<view v-if="!hasLeftWin" class="uni-header-logo">
......
## 0.8.5(2024-10-26)
- 优化 去除不必要代码
## 0.8.4(2024-10-26)
- 修复 uni-app x 项目升级到 4.31 alpha 后中间有空隙的Bug
## 0.8.3(2024-07-31)
- 修复 部分类型报错
## 0.8.2(2024-07-15)
......
......@@ -8,6 +8,8 @@
src="/uni_modules/uni-upgrade-center-app/static/app/bg_top.png"></image>
</view>
<view class="content-space"></view>
<view class="content-body">
<view class="content-body-title">
<text class="text title">{{subTitle}}</text>
......@@ -372,6 +374,15 @@
border-bottom-style: solid;
}
.content-space {
width: 100%;
height: 50px;
background-color: #fff;
position: absolute;
top: 140px;
z-index: -1;
}
.content-top-image {
width: 100%;
position: relative;
......
{
"id": "uni-upgrade-center-app",
"displayName": "升级中心 uni-upgrade-center - App",
"version": "0.8.3",
"version": "0.8.5",
"description": "uni升级中心 - 客户端检查更新",
"keywords": [
"uniCloud",
......@@ -47,8 +47,10 @@
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "y"
"app-vue": "y",
"app-nvue": "y",
"app-harmony": "u",
"app-uvue": "y"
},
"H5-mobile": {
"Safari": "n",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册