Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello uni-app x
提交
109286b7
H
hello uni-app x
项目概览
DCloud
/
hello uni-app x
通知
5995
Star
90
Fork
162
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
18
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello uni-app x
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
18
Issue
18
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
109286b7
编写于
1月 20, 2024
作者:
H
hdx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
pages/template: rpx to px
上级
b0603133
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
108 addition
and
108 deletion
+108
-108
pages/template/drop-card/card/card.uvue
pages/template/drop-card/card/card.uvue
+3
-3
pages/template/drop-card/drop-card@old.uvue
pages/template/drop-card/drop-card@old.uvue
+6
-6
pages/template/list-news/detail/detail.uvue
pages/template/list-news/detail/detail.uvue
+52
-52
pages/template/list-news/list-news.uvue
pages/template/list-news/list-news.uvue
+13
-13
pages/template/pull-zoom-image/pull-zoom-image.uvue
pages/template/pull-zoom-image/pull-zoom-image.uvue
+2
-2
pages/template/schema/schema.uvue
pages/template/schema/schema.uvue
+26
-25
pages/template/scroll-fold-nav/scroll-fold-nav.uvue
pages/template/scroll-fold-nav/scroll-fold-nav.uvue
+1
-1
pages/template/scroll-sticky/scroll-sticky.uvue
pages/template/scroll-sticky/scroll-sticky.uvue
+1
-1
pages/template/share/share.uvue
pages/template/share/share.uvue
+2
-2
pages/template/swiper-vertical-video/swiper-vertical-video.uvue
...template/swiper-vertical-video/swiper-vertical-video.uvue
+2
-3
未找到文件。
pages/template/drop-card/card/card.uvue
浏览文件 @
109286b7
...
@@ -209,7 +209,7 @@
...
@@ -209,7 +209,7 @@
position: absolute;
position: absolute;
top: 0;
top: 0;
left: 0;
left: 0;
margin: 0
25r
px;
margin: 0
12
px;
margin-top: 50px;
margin-top: 50px;
border-radius: 10px;
border-radius: 10px;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
...
@@ -225,8 +225,8 @@
...
@@ -225,8 +225,8 @@
}
}
.state {
.state {
top:
20r
px;
top:
10
px;
left:
20r
px;
left:
10
px;
width: 650rpx;
width: 650rpx;
padding: 4px;
padding: 4px;
position: absolute;
position: absolute;
...
...
pages/template/drop-card/drop-card@old.uvue
浏览文件 @
109286b7
...
@@ -112,20 +112,20 @@
...
@@ -112,20 +112,20 @@
width: 700rpx;
width: 700rpx;
height: 750rpx;
height: 750rpx;
position: absolute;
position: absolute;
margin: 0
25r
px;
margin: 0
12
px;
margin-top: 30px;
margin-top: 30px;
border-radius: 10px;
border-radius: 10px;
color: #FFF;
color: #FFF;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
}
.user-img{
.user-img{
border-radius: 10px;
border-radius: 10px;
}
}
.state {
.state {
top:
20r
px;
top:
10
px;
left:
20r
px;
left:
10
px;
width: 650rpx;
width: 650rpx;
padding: 4px;
padding: 4px;
position: absolute;
position: absolute;
...
@@ -141,4 +141,4 @@
...
@@ -141,4 +141,4 @@
border-radius: 100px;
border-radius: 100px;
box-shadow: 0 0 1px #EBEBEB;
box-shadow: 0 0 1px #EBEBEB;
}
}
</style>
</style>
\ No newline at end of file
pages/template/list-news/detail/detail.uvue
浏览文件 @
109286b7
<template>
<template>
<!-- #ifdef APP -->
<!-- #ifdef APP -->
<scroll-view style="flex: 1">
<scroll-view style="flex: 1">
<!-- #endif -->
<!-- #endif -->
<view class="banner">
<view class="banner">
<image class="banner-img" :src="cover"></image>
<image class="banner-img" :src="cover"></image>
<text class="banner-title">{{title}}</text>
<text class="banner-title">{{title}}</text>
</view>
</view>
<rich-text :nodes="htmlNodes" style="padding: 3px"></rich-text>
<rich-text :nodes="htmlNodes" style="padding: 3px"></rich-text>
<!-- #ifdef APP -->
<!-- #ifdef APP -->
</scroll-view>
</scroll-view>
<!-- #endif -->
<!-- #endif -->
</template>
</template>
<script>
<script>
export default {
export default {
data() {
data() {
return {
return {
htmlNodes: "",
htmlNodes: "",
title: '',
title: '',
cover: "",
cover: "",
post_id: "",
post_id: "",
}
}
},
},
onLoad(event
: OnLoadOptions) {
onLoad(event
: OnLoadOptions) {
this.post_id = event["post_id"] ?? "";
this.post_id = event["post_id"] ?? "";
this.cover = event["cover"] ?? "";
this.cover = event["cover"] ?? "";
this.title = event["title"] ?? "";
this.title = event["title"] ?? "";
this.getDetail();
this.getDetail();
},
},
methods: {
methods: {
getDetail() {
getDetail() {
uni.request({
uni.request({
url: 'https://unidemo.dcloud.net.cn/api/news/36kr/' + this.post_id,
url: 'https://unidemo.dcloud.net.cn/api/news/36kr/' + this.post_id,
success: (data) => {
success: (data) => {
if (data.statusCode == 200) {
if (data.statusCode == 200) {
const result = data.data as UTSJSONObject
const result = data.data as UTSJSONObject
// console.log(result["content"]);
// console.log(result["content"]);
this.htmlNodes = result["content"] as string;
this.htmlNodes = result["content"] as string;
}
}
},
},
fail: () => {
fail: () => {
console.log('fail');
console.log('fail');
}
}
});
});
},
},
}
}
}
}
</script>
</script>
<style>
<style>
.banner {
.banner {
height: 360r
px;
height: 180
px;
overflow: hidden;
overflow: hidden;
position: relative;
position: relative;
background-color: #ccc;
background-color: #ccc;
}
}
.banner-img {
.banner-img {
width: 100%;
width: 100%;
}
}
.banner-title {
.banner-title {
max-height: 84r
px;
max-height: 42
px;
overflow: hidden;
overflow: hidden;
position: absolute;
position: absolute;
left: 30r
px;
left: 15
px;
bottom: 30r
px;
bottom: 15
px;
width: 90%;
width: 90%;
font-size: 32r
px;
font-size: 16
px;
font-weight: 400;
font-weight: 400;
line-height: 42r
px;
line-height: 21
px;
color: white;
color: white;
}
}
</style>
</style>
pages/template/list-news/list-news.uvue
浏览文件 @
109286b7
...
@@ -148,7 +148,7 @@
...
@@ -148,7 +148,7 @@
<style>
<style>
.banner {
.banner {
height:
360r
px;
height:
180
px;
overflow: hidden;
overflow: hidden;
position: relative;
position: relative;
background-color: #ccc;
background-color: #ccc;
...
@@ -159,20 +159,20 @@
...
@@ -159,20 +159,20 @@
}
}
.banner-title {
.banner-title {
max-height:
84r
px;
max-height:
42
px;
overflow: hidden;
overflow: hidden;
position: absolute;
position: absolute;
left:
30r
px;
left:
15
px;
bottom:
30r
px;
bottom:
15
px;
width: 90%;
width: 90%;
font-size:
32r
px;
font-size:
16
px;
font-weight: 400;
font-weight: 400;
line-height:
42r
px;
line-height:
21
px;
color: white;
color: white;
}
}
.uni-media-list {
.uni-media-list {
padding:
22rpx 30r
px;
padding:
11px 15
px;
box-sizing: border-box;
box-sizing: border-box;
display: flex;
display: flex;
width: 100%;
width: 100%;
...
@@ -180,19 +180,19 @@
...
@@ -180,19 +180,19 @@
}
}
.uni-media-list-logo {
.uni-media-list-logo {
width:
180r
px;
width:
90
px;
height:
140r
px;
height:
70
px;
}
}
.uni-media-list-body {
.uni-media-list-body {
flex: 1;
flex: 1;
padding-left:
15r
px;
padding-left:
7
px;
justify-content: space-around;
justify-content: space-around;
}
}
.uni-media-list-text-top {
.uni-media-list-text-top {
/* height:
74r
px; */
/* height:
37
px; */
font-size:
28r
px;
font-size:
14
px;
lines: 2;
lines: 2;
overflow: hidden;
overflow: hidden;
}
}
...
@@ -205,6 +205,6 @@
...
@@ -205,6 +205,6 @@
.uni-media-list-text {
.uni-media-list-text {
color: #9D9D9F;
color: #9D9D9F;
font-size:
25r
px;
font-size:
13
px;
}
}
</style>
</style>
pages/template/pull-zoom-image/pull-zoom-image.uvue
浏览文件 @
109286b7
...
@@ -127,8 +127,8 @@
...
@@ -127,8 +127,8 @@
}
}
.user-info .user-avatar {
.user-info .user-avatar {
width:
150r
px;
width:
75
px;
height:
150r
px;
height:
75
px;
border-radius: 100px;
border-radius: 100px;
border: 3px solid #FFF;
border: 3px solid #FFF;
}
}
...
...
pages/template/schema/schema.uvue
浏览文件 @
109286b7
<template>
<template>
<view>
<view>
<button class="button" @click="openSchema('https://uniapp.dcloud.io/uni-app-x')">使用外部浏览器打开指定URL</button>
<button class="button" @click="openSchema('https://uniapp.dcloud.io/uni-app-x')">使用外部浏览器打开指定URL</button>
<button class="button" @click="openSchema('market://details?id=com.tencent.mm')">使用应用商店打开指定App</button>
<button class="button" @click="openSchema('market://details?id=com.tencent.mm')">使用应用商店打开指定App</button>
<button class="button" @click="openSchema('androidamap://viewMap?sourceApplication=Hello%20uni-app&poiname=DCloud&lat=39.9631018208&lon=116.3406135236&dev=0')">打开地图坐标</button>
<button class="button"
</view>
@click="openSchema('androidamap://viewMap?sourceApplication=Hello%20uni-app&poiname=DCloud&lat=39.9631018208&lon=116.3406135236&dev=0')">打开地图坐标</button>
</view>
</template>
</template>
<script>
<script>
import Intent from 'android.content.Intent';
import Intent from 'android.content.Intent';
import Uri from 'android.net.Uri';
import Uri from 'android.net.Uri';
export default {
export default {
data() {
data() {
return {
return {
}
}
},
},
methods: {
methods: {
openSchema(url:
string) {
openSchema(url :
string) {
const context = UTSAndroid.getUniActivity()!;
const context = UTSAndroid.getUniActivity()!;
const uri = Uri.parse(url)
const uri = Uri.parse(url)
const intent = new Intent(Intent.ACTION_VIEW, uri)
const intent = new Intent(Intent.ACTION_VIEW, uri)
intent.setData(uri);
intent.setData(uri);
context.startActivity(intent);
context.startActivity(intent);
}
}
}
}
}
}
</script>
</script>
<style>
<style>
.button {
.button {
margin: 30r
px;
margin: 15
px;
}
}
</style>
</style>
pages/template/scroll-fold-nav/scroll-fold-nav.uvue
浏览文件 @
109286b7
...
@@ -185,7 +185,7 @@
...
@@ -185,7 +185,7 @@
border: 1px solid #fbdf0d;
border: 1px solid #fbdf0d;
height: 35px;
height: 35px;
border-radius: 100px;
border-radius: 100px;
margin: 0
25r
px;
margin: 0
12
px;
padding: 8px;
padding: 8px;
flex-direction: row;
flex-direction: row;
align-items: center;
align-items: center;
...
...
pages/template/scroll-sticky/scroll-sticky.uvue
浏览文件 @
109286b7
...
@@ -104,7 +104,7 @@
...
@@ -104,7 +104,7 @@
border: 1px solid #fbdf0d;
border: 1px solid #fbdf0d;
height: 35px;
height: 35px;
border-radius: 100px;
border-radius: 100px;
margin: 0
25r
px;
margin: 0
12
px;
padding: 8px;
padding: 8px;
flex-direction: row;
flex-direction: row;
align-items: center;
align-items: center;
...
...
pages/template/share/share.uvue
浏览文件 @
109286b7
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<script>
<script>
import Intent from 'android.content.Intent';
import Intent from 'android.content.Intent';
import File from 'java.io.File';
import File from 'java.io.File';
export default {
export default {
data() {
data() {
...
@@ -55,6 +55,6 @@
...
@@ -55,6 +55,6 @@
<style>
<style>
.button {
.button {
margin:
30r
px;
margin:
15
px;
}
}
</style>
</style>
pages/template/swiper-vertical-video/swiper-vertical-video.uvue
浏览文件 @
109286b7
...
@@ -199,7 +199,6 @@
...
@@ -199,7 +199,6 @@
<style>
<style>
.page {
.page {
width: 750rpx;
flex: 1;
flex: 1;
}
}
...
@@ -228,8 +227,8 @@
...
@@ -228,8 +227,8 @@
}
}
.play-btn {
.play-btn {
width:
80r
px;
width:
40
px;
height:
80r
px;
height:
40
px;
}
}
.video-info {
.video-info {
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录