签到需要优化
This commit is contained in:
@@ -14,3 +14,7 @@ unaipp多端im+会议+积分商城
|
||||
|
||||
```https://ext.dcloud.net.cn/plugin?id=3935```
|
||||
```https://z-paging.zxlee.cn/start/use.html#%E5%BB%B6%E8%BF%9F%E5%8A%A0%E8%BD%BD%E5%88%97%E8%A1%A8%E7%A4%BA%E4%BE%8B```
|
||||
|
||||
### TUILiveKit 文档地址
|
||||
|
||||
```https://trtc.io/zh/document/60034?platform=ios&product=live```
|
||||
@@ -52,15 +52,28 @@
|
||||
return styles
|
||||
})
|
||||
|
||||
/** 上传 */
|
||||
const uploadFile = async file => {
|
||||
const url = await uploadSingleFile(file, {
|
||||
url: '/api/common/admin/upload/up/single'
|
||||
})
|
||||
imageValue.value.push(url)
|
||||
}
|
||||
|
||||
const onSelect = async e => {
|
||||
e.tempFiles.forEach(v => {
|
||||
uploadFile(v.path)
|
||||
})
|
||||
|
||||
return
|
||||
const upData = e.tempFiles.map(v => v.path)[0]
|
||||
imageValue.value = await uploadSingleFile(upData, {
|
||||
url: '/api/common/admin/upload/up/single'
|
||||
})
|
||||
}
|
||||
|
||||
const onDelete = () => {
|
||||
imageValue.value = ''
|
||||
const onDelete = e => {
|
||||
imageValue.value.splice(e.index, 1)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -220,6 +220,13 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/discover/dynamic/release",
|
||||
"style": {
|
||||
"navigationBarTitleText": "发布朋友圈",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/discover/company",
|
||||
"style": {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script setup>
|
||||
import { reactive, ref } from 'vue'
|
||||
import { onPageScroll } from '@dcloudio/uni-app'
|
||||
import { navigateTo } from '@/utils/router'
|
||||
|
||||
const MAX_SCROLL = 446
|
||||
|
||||
@@ -42,6 +43,7 @@
|
||||
:color="topIcon.rightColor"
|
||||
type="camera"
|
||||
size="24"
|
||||
@click="navigateTo('/pages/discover/dynamic/release')"
|
||||
></uni-icons>
|
||||
</template>
|
||||
</nav-bar>
|
||||
|
||||
77
pages/discover/dynamic/release.vue
Normal file
77
pages/discover/dynamic/release.vue
Normal file
@@ -0,0 +1,77 @@
|
||||
<script setup>
|
||||
import { reactive } from 'vue'
|
||||
|
||||
const placeholderStyle = `font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
line-height: 40rpx;
|
||||
font-style: normal;
|
||||
text-transform: none;`
|
||||
|
||||
const formData = reactive({
|
||||
txt: '',
|
||||
listImg: []
|
||||
})
|
||||
|
||||
const onUpData = () => {
|
||||
console.log(formData)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="release-box">
|
||||
<nav-bar isPlaceholder>
|
||||
<template #right>
|
||||
<text class="right-btn" @click="onUpData">发布</text>
|
||||
</template>
|
||||
</nav-bar>
|
||||
|
||||
<view class="content">
|
||||
<textarea
|
||||
v-model="formData.txt"
|
||||
focus
|
||||
:placeholder-style="placeholderStyle"
|
||||
placeholder="请输入朋友圈文字..."
|
||||
class="textarea"
|
||||
></textarea>
|
||||
<view class="upload-box">
|
||||
<cb-file-picker
|
||||
v-model="formData.listImg"
|
||||
limit="9"
|
||||
></cb-file-picker>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.right-btn {
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #ffffff;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
background: linear-gradient(0deg, #00d993 0%, #00d9c5 100%);
|
||||
padding: 12rpx 36rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 32rpx 58rpx;
|
||||
.textarea {
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
line-height: 40rpx;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
.upload-box {
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,8 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
|
||||
const weekList = ['一', '二', '三', '四', '五', '六', '日']
|
||||
|
||||
const indexData = ref([1, 2, 3, 4])
|
||||
|
||||
const onItem = item => {
|
||||
@@ -43,8 +45,20 @@
|
||||
<text>天</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 切换 -->
|
||||
<view class="switch-box">
|
||||
<text class="date">2025年12月</text>
|
||||
<view class="btn">
|
||||
<uni-icons type="left" size="22" color="#666666"></uni-icons>
|
||||
<uni-icons type="right" size="22" color="#666666"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 签到列表 -->
|
||||
<view class="list-box">
|
||||
<view v-for="(item, index) in weekList" :key="index" class="item">
|
||||
<text class="bottom-name">{{ item }}</text>
|
||||
</view>
|
||||
<view
|
||||
v-for="item in 30"
|
||||
:key="item"
|
||||
@@ -69,15 +83,18 @@
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './styles/index.scss';
|
||||
.right-icon {
|
||||
right: -86rpx !important;
|
||||
}
|
||||
.punch-box {
|
||||
padding: 0 24rpx;
|
||||
.top-title {
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.title {
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
@@ -99,6 +116,26 @@
|
||||
}
|
||||
}
|
||||
|
||||
.switch-box {
|
||||
margin: 50rpx 0 40rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.date {
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #666666;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
.btn {
|
||||
width: 180rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
|
||||
.list-box {
|
||||
margin-top: 38rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
|
||||
@@ -104,7 +104,7 @@ export const uploadSingleFile = (filePath, config = {}) => {
|
||||
console.log('总大小:', res.totalBytesExpectedToSend, '字节')
|
||||
if (res.progress !== 100) {
|
||||
uni.showLoading({
|
||||
title: `업로드 진행: ${res.progress}`,
|
||||
title: `上传进度: ${res.progress}`,
|
||||
mask: true // 防止触摸穿透
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user