@ -0,0 +1,85 @@ | |||||
<template> | |||||
<uv-popup | |||||
round="40rpx" | |||||
:safeAreaInsetBottom="false" | |||||
:closeOnClickOverlay="false" | |||||
ref="popup"> | |||||
<view class="toast"> | |||||
<view class="title"> | |||||
提示 | |||||
</view> | |||||
<view class="content"> | |||||
本小程序需要登录之后才可以正常使用 | |||||
</view> | |||||
<view class="btnstwo"> | |||||
<view class="btn c" | |||||
@click="cancel"> | |||||
取消 | |||||
</view> | |||||
<view class="btn" | |||||
@click="login"> | |||||
登录 | |||||
</view> | |||||
</view> | |||||
</view> | |||||
</uv-popup> | |||||
</template> | |||||
<script> | |||||
export default { | |||||
name : 'toast', | |||||
methods : { | |||||
checkLogin(){ | |||||
if(!uni.getStorageSync('token')){ | |||||
this.$refs.popup.open(); | |||||
} | |||||
}, | |||||
cancel(){ | |||||
this.$refs.popup.close(); | |||||
uni.redirectTo({ | |||||
url: '/pages/index/index' | |||||
}) | |||||
}, | |||||
login(){ | |||||
this.$store.commit('login') | |||||
this.$refs.popup.close() | |||||
}, | |||||
} | |||||
} | |||||
</script> | |||||
<style lang="scss" scoped> | |||||
.toast{ | |||||
width: 500rpx; | |||||
.title{ | |||||
min-height: 70rpx; | |||||
display: flex; | |||||
justify-content: center; | |||||
align-items: center; | |||||
font-size: 32rpx; | |||||
} | |||||
.content{ | |||||
font-size: 28rpx; | |||||
min-height: 200rpx; | |||||
display: flex; | |||||
flex-direction: column; | |||||
justify-content: center; | |||||
align-items: center; | |||||
} | |||||
.btnstwo{ | |||||
display: flex; | |||||
.btn{ | |||||
flex: 1; | |||||
background: $uni-linear-gradient-btn-color; | |||||
color: #fff; | |||||
padding: 20rpx 0; | |||||
text-align: center; | |||||
} | |||||
.c{ | |||||
background: #fff; | |||||
border-top: 1px solid #999; | |||||
color: #333; | |||||
} | |||||
} | |||||
} | |||||
</style> |
@ -0,0 +1,118 @@ | |||||
<template> | |||||
<uv-popup ref="privacyPopup"> | |||||
<view class="privacyPopup"> | |||||
<view class="title"> | |||||
<view class="title_circle"></view> | |||||
<view>{{ title }}</view> | |||||
</view> | |||||
<view class="content_pri"> | |||||
<text>在你使用【{{ title }}】服务之前,请仔细阅读</text> | |||||
<text style="color: #1793ee;" @click="goToPrivacy">《{{ title }}小程序隐私保护指引》</text>。 | |||||
<text>如你同意{{ title }}小程序隐私保护指引,请点击“同意”开始使用【{{ title }}】。</text> | |||||
</view> | |||||
<view class="pri_btn"> | |||||
<button class="confuse_btn" @click="confusePrivacy">拒绝</button> | |||||
<button class="confirm_btn" id="agree-btn" open-type="agreePrivacyAuthorization" | |||||
@agreeprivacyauthorization="handleAgreePrivacyAuthorization">同意</button> | |||||
</view> | |||||
</view> | |||||
</uv-popup> | |||||
</template> | |||||
<script> | |||||
export default { | |||||
data(){ | |||||
return{ | |||||
title : '帧视界', | |||||
} | |||||
}, | |||||
methods:{ | |||||
init(resolve){ | |||||
this.$refs.privacyPopup.open() | |||||
this.resolvePrivacyAuthorization = resolve | |||||
}, | |||||
// 打开隐私协议 | |||||
goToPrivacy(){ | |||||
wx.openPrivacyContract({ | |||||
success: () => { | |||||
console.log('打开成功'); | |||||
}, // 打开成功 | |||||
fail: () => { | |||||
uni.showToast({ | |||||
title:'打开失败,稍后重试', | |||||
icon: 'none' | |||||
}) | |||||
} // 打开失败 | |||||
}) | |||||
}, | |||||
// 拒绝 | |||||
confusePrivacy(){ | |||||
this.$refs.privacyPopup.close() | |||||
this.resolvePrivacyAuthorization({ event:'disagree' }) | |||||
}, | |||||
// 同意 | |||||
handleAgreePrivacyAuthorization(){ | |||||
// 告知平台用户已经同意,参数传同意按钮的id | |||||
this.resolvePrivacyAuthorization({ buttonId: 'agree-btn', event: 'agree' }) | |||||
this.$refs.privacyPopup.close() | |||||
} | |||||
} | |||||
} | |||||
</script> | |||||
<style scoped lang="scss"> | |||||
*{ | |||||
box-sizing: border-box; | |||||
} | |||||
.privacyPopup{ | |||||
width: 520rpx; | |||||
/* height: 500rpx; */ | |||||
background-color: #fff; | |||||
border-radius: 50rpx; | |||||
padding: 20rpx 40rpx; | |||||
} | |||||
.title{ | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: start; | |||||
margin: 20rpx 0; | |||||
font-size: 38rpx; | |||||
font-weight: 600; | |||||
} | |||||
.title .title_circle{ | |||||
width: 60rpx; | |||||
height: 60rpx; | |||||
background-color: #efefef; | |||||
border-radius: 50%; | |||||
margin-right: 20rpx; | |||||
} | |||||
.content_pri{ | |||||
width: 480rpx; | |||||
margin: 0 auto; | |||||
font-size: 34rpx; | |||||
line-height: 1.5; | |||||
} | |||||
.pri_btn{ | |||||
width: 100%; | |||||
height: 158rpx; | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: space-evenly; | |||||
} | |||||
.pri_btn .confuse_btn,.pri_btn .confirm_btn{ | |||||
width: 200rpx; | |||||
height: 90rpx; | |||||
border-radius: 20rpx; | |||||
font-size: 34rpx; | |||||
} | |||||
.pri_btn .confuse_btn{ | |||||
background-color: #eee; | |||||
color: #52bf6b; | |||||
} | |||||
.pri_btn .confirm_btn{ | |||||
background-color: #52bf6b; | |||||
color: #fff; | |||||
} | |||||
</style> |
@ -0,0 +1,94 @@ | |||||
<template> | |||||
<uv-popup | |||||
:safeAreaInsetBottom="false" | |||||
round="40rpx" | |||||
ref="popup"> | |||||
<view class="toast"> | |||||
<view class="title"> | |||||
{{ title }} | |||||
</view> | |||||
<view class="content"> | |||||
<slot></slot> | |||||
</view> | |||||
<view class="btns" v-if="!cancel"> | |||||
<view class="btn" | |||||
@click="$emit('confirm')"> | |||||
{{ confirmText }} | |||||
</view> | |||||
</view> | |||||
<view class="btnstwo" v-else> | |||||
<view class="btn c"> | |||||
取消 | |||||
</view> | |||||
<view class="btn"> | |||||
{{ confirmText }} | |||||
</view> | |||||
</view> | |||||
</view> | |||||
</uv-popup> | |||||
</template> | |||||
<script> | |||||
export default { | |||||
name : 'toast', | |||||
props : { | |||||
title : { | |||||
default : '' | |||||
}, | |||||
confirmText : { | |||||
default : '确认' | |||||
}, | |||||
cancel : { | |||||
default : false | |||||
} | |||||
}, | |||||
methods : { | |||||
open(){ | |||||
this.$refs.popup.open(); | |||||
}, | |||||
} | |||||
} | |||||
</script> | |||||
<style lang="scss" scoped> | |||||
.toast{ | |||||
width: 500rpx; | |||||
.title{ | |||||
min-height: 70rpx; | |||||
display: flex; | |||||
justify-content: center; | |||||
align-items: center; | |||||
font-size: 32rpx; | |||||
} | |||||
.content{ | |||||
// min-height: 300rpx; | |||||
} | |||||
.btns{ | |||||
display: flex; | |||||
padding: 30rpx; | |||||
.btn{ | |||||
flex: 1; | |||||
background: $uni-linear-gradient-btn-color; | |||||
border-radius: 20rpx; | |||||
color: #fff; | |||||
padding: 20rpx 0; | |||||
text-align: center; | |||||
} | |||||
} | |||||
.btnstwo{ | |||||
display: flex; | |||||
.btn{ | |||||
flex: 1; | |||||
background: $uni-linear-gradient-btn-color; | |||||
color: #fff; | |||||
padding: 20rpx 0; | |||||
text-align: center; | |||||
} | |||||
.c{ | |||||
background: #fff; | |||||
border-top: 1px solid #999; | |||||
color: #333; | |||||
} | |||||
} | |||||
} | |||||
</style> |
@ -1,19 +0,0 @@ | |||||
<template> | |||||
<view> | |||||
</view> | |||||
</template> | |||||
<script> | |||||
export default { | |||||
data() { | |||||
return { | |||||
}; | |||||
} | |||||
} | |||||
</script> | |||||
<style lang="scss"> | |||||
</style> |
@ -0,0 +1,141 @@ | |||||
<template> | |||||
<view class="login"> | |||||
<view class="title"> | |||||
帧视界 | |||||
</view> | |||||
<view class="title"> | |||||
申请获取你的头像、昵称 | |||||
</view> | |||||
<button | |||||
class="chooseAvatar" | |||||
open-type="chooseAvatar" | |||||
@chooseavatar="onChooseAvatar"> | |||||
<view class="line"> | |||||
<view class=""> | |||||
头像 | |||||
</view> | |||||
<view class=""> | |||||
<image :src="userInfo.headImage" | |||||
v-if="userInfo.headImage" | |||||
style="width: 60rpx;height: 60rpx;" | |||||
mode=""></image> | |||||
<image src="/static/image/tabbar/6.png" | |||||
v-else | |||||
style="width: 50rpx;height: 50rpx;" | |||||
mode=""></image> | |||||
</view> | |||||
</view> | |||||
</button> | |||||
<view class="line"> | |||||
<view class=""> | |||||
昵称 | |||||
</view> | |||||
<view class=""> | |||||
<input type="nickname" placeholder="请输入昵称" | |||||
style="text-align: right;" | |||||
id="nickName" | |||||
v-model="userInfo.nickName" | |||||
/> | |||||
</view> | |||||
</view> | |||||
<view class="btn" | |||||
@click="submit"> | |||||
确认 | |||||
</view> | |||||
</view> | |||||
</template> | |||||
<script> | |||||
export default { | |||||
data() { | |||||
return { | |||||
userInfo : { | |||||
headImage : '', | |||||
nickName : '', | |||||
} | |||||
}; | |||||
}, | |||||
onShow(){ | |||||
}, | |||||
computed : { | |||||
}, | |||||
methods : { | |||||
onChooseAvatar(res){ | |||||
let self = this | |||||
self.$Oss.ossUpload(res.target.avatarUrl) | |||||
.then(url => { | |||||
self.userInfo.headImage = url | |||||
}) | |||||
}, | |||||
submit(){ | |||||
let self = this | |||||
uni.createSelectorQuery().in(this) | |||||
.select("#nickName") | |||||
.fields({ | |||||
properties: ["value"], | |||||
}) | |||||
.exec((res) => { | |||||
const nickName = res?.[0]?.value | |||||
self.userInfo.nickName = nickName | |||||
}) | |||||
if(this.$utils.verificationAll(this.userInfo, { | |||||
headImage : '请选择头像', | |||||
nickName : '请填写昵称', | |||||
})){ | |||||
return | |||||
} | |||||
this.$api('infoUpdateInfo', this.userInfo, res => { | |||||
if(res.code == 200){ | |||||
uni.navigateBack(-1) | |||||
} | |||||
}) | |||||
}, | |||||
} | |||||
} | |||||
</script> | |||||
<style lang="scss" scoped> | |||||
.login{ | |||||
display: flex; | |||||
flex-direction: column; | |||||
justify-content: center; | |||||
align-items: center; | |||||
height: 80vh; | |||||
.title{ | |||||
line-height: 45rpx; | |||||
font-weight: 900; | |||||
} | |||||
.line{ | |||||
display: flex; | |||||
justify-content: space-between; | |||||
align-items: center; | |||||
width: 80%; | |||||
border-bottom: 1px solid #00000023; | |||||
padding: 30rpx 0; | |||||
margin: 0 auto; | |||||
} | |||||
.chooseAvatar{ | |||||
width: 100%; | |||||
padding: 0; | |||||
margin: 0; | |||||
margin-top: 10vh; | |||||
border: none; | |||||
} | |||||
.btn{ | |||||
background: $uni-linear-gradient-btn-color; | |||||
color: #fff; | |||||
width: 80%; | |||||
padding: 20rpx 0; | |||||
text-align: center; | |||||
border-radius: 15rpx; | |||||
margin-top: 10vh; | |||||
} | |||||
} | |||||
</style> |
@ -1,145 +1,166 @@ | |||||
<template> | <template> | ||||
<view style="display: flex;flex-direction: column; width: 100vw;height: 100vh;"> | |||||
<tabber :select="2"/> | |||||
<!-- 顶部 --> | |||||
<view style="width: 100%;height: 30%;"> | |||||
<image src="/static/image/center/1.png" style="width: 100%;height: 100%;"></image> | |||||
</view> | |||||
<view style="display: flex;flex-direction: column; width: 100vw;height: 100vh;"> | |||||
<tabber :select="2" /> | |||||
<!-- 顶部 --> | |||||
<view style="width: 100%;height: 30%;"> | |||||
<image src="/static/image/center/1.png" style="width: 100%;height: 100%;"></image> | |||||
</view> | |||||
<!--中部 用户信息--> | |||||
<view | |||||
style="border-radius: 20rpx;position: absolute;top: 20%;left: 10%; width:80%;height: 12%;z-index: 1;background: white;"> | |||||
<!--头像--> | |||||
<view | |||||
style="position: absolute;z-index:2;width:33%;height:100%;border-radius: 50%;overflow: hidden;top: -32%;left: 0%;"> | |||||
<image src="/static/image/center/tyx.png" style="width: 100%;height: 100%;"></image> | |||||
</view> | |||||
<!--福利中心--> | |||||
<view style="position: absolute;z-index:2;width:33%;height:30%;top: 13%;right: 2%;"> | |||||
<image src="/static/image/center/flzx.png" style="width: 100%;height: 100%;"></image> | |||||
</view> | |||||
<!-- 未认证--> | |||||
<view style="position: absolute;z-index:2;width:15%;height:20%;top: 33%;left: 28%;"> | |||||
<image src="/static/image/center/wrz.png" style="width: 100%;height: 100%;"></image> | |||||
</view> | |||||
<!-- 去认证 --> | |||||
<view style="position: absolute;z-index:2;width:55%;height:20%;top: 32%;left: 44%;"> | |||||
<span style="font-size: 26rpx;" class="textColor" @click="$utils.navigateTo('/mine/authOption')">去认证</span> | |||||
</view> | |||||
<!-- 用户信息 --> | |||||
<view style="position: absolute;z-index:2;width:55%;height:20%;top: 60%;left: 7%;"> | |||||
<view> | |||||
<span style="font-size: 35rpx;margin-right: 5rpx">海绵宝贝</span> | |||||
<span style="font-size: 18rpx">15012142563</span> | |||||
</view> | |||||
</view> | |||||
<!-- 点赞量 --> | |||||
<view | |||||
style="display: flex;flex-direction: column;gap:2rpx ;position: absolute;z-index:2;width:15%;height:40%;top: 55%;right: 3%;"> | |||||
<view style="display: flex;justify-content: center;align-items: center;width: 100%;height: 100%;"> | |||||
<image src="/static/image/center/dianZan.svg" style="width: 40%;height: 84%;"></image> | |||||
</view> | |||||
<view style="display: flex;justify-content: center ;font-size: 20rpx;color:#777777">点赞量</view> | |||||
</view> | |||||
</view> | |||||
<!--中部 用户信息--> | |||||
<view | |||||
style="border-radius: 20rpx;position: absolute;top: 20%;left: 10%; width:80%;height: 12%;z-index: 1;background: white;"> | |||||
<!--头像--> | |||||
<view | |||||
style="position: absolute;z-index:2;width:33%;height:100%;border-radius: 50%;overflow: hidden;top: -32%;left: 0%;"> | |||||
<image :src="userInfo.headImage" style="width: 100%;height: 100%;"></image> | |||||
</view> | |||||
<!--福利中心--> | |||||
<view style="position: absolute;z-index:2;width:33%;height:30%;top: 13%;right: 2%;"> | |||||
<image src="/static/image/center/flzx.png" style="width: 100%;height: 100%;"></image> | |||||
</view> | |||||
<!-- 未认证--> | |||||
<view style="position: absolute;z-index:2;width:15%;height:20%;top: 33%;left: 28%;"> | |||||
<image src="/static/image/center/wrz.png" style="width: 100%;height: 100%;"></image> | |||||
</view> | |||||
<!-- 去认证 --> | |||||
<view style="position: absolute;z-index:2;width:55%;height:20%;top: 32%;left: 44%;"> | |||||
<span style="font-size: 26rpx;" class="textColor" | |||||
@click="$utils.navigateTo('/mine/authOption')">去认证</span> | |||||
</view> | |||||
<!-- 用户信息 --> | |||||
<view style="position: absolute;z-index:2;width:55%;height:20%;top: 60%;left: 7%;"> | |||||
<view> | |||||
<span style="font-size: 35rpx;margin-right: 5rpx">{{ userInfo.nickName }}</span> | |||||
<span style="font-size: 18rpx">{{ userInfo.phone }}</span> | |||||
</view> | |||||
</view> | |||||
<!-- 点赞量 --> | |||||
<view | |||||
style="display: flex;flex-direction: column;gap:2rpx ;position: absolute;z-index:2;width:15%;height:40%;top: 55%;right: 3%;"> | |||||
<view style="display: flex;justify-content: center;align-items: center;width: 100%;height: 100%;"> | |||||
<image src="/static/image/center/dianZan.svg" style="width: 40%;height: 84%;"></image> | |||||
</view> | |||||
<view style="display: flex;justify-content: center ;font-size: 20rpx;color:#777777">点赞量</view> | |||||
</view> | |||||
</view> | |||||
<!-- 下部 --> | |||||
<view style="width: 100%;height: 70%;padding-top:150rpx"> | |||||
<view> | |||||
<!--上GridView--> | |||||
<view> | |||||
<uv-grid :col="4"> | |||||
<uv-grid-item v-for="(item,index) in baseList" :key="index" @click="goToPage(item)"> | |||||
<img :src="item.imageUrl" :alt="item.title" | |||||
:style="{ width: '80rpx', height: '80rpx',marginBottom: '10rpx'}"/> | |||||
<text style="font-size: 30rpx;color: #333333;">{{ item.title }} | |||||
</text> | |||||
</uv-grid-item> | |||||
</uv-grid> | |||||
</view> | |||||
<!-- 下部 --> | |||||
<view style="width: 100%;height: 70%;padding-top:150rpx"> | |||||
<view> | |||||
<!--上GridView--> | |||||
<view> | |||||
<uv-grid :col="4"> | |||||
<uv-grid-item v-for="(item,index) in baseList" :key="index" @click="goToPage(item)"> | |||||
<img :src="item.imageUrl" :alt="item.title" | |||||
:style="{ width: '80rpx', height: '80rpx',marginBottom: '10rpx'}" /> | |||||
<text style="font-size: 30rpx;color: #333333;">{{ item.title }} | |||||
</text> | |||||
</uv-grid-item> | |||||
</uv-grid> | |||||
</view> | |||||
<!--其他--> | |||||
<view style="margin:50rpx 0 0 50rpx;font-size: 40rpx;color: #333333;">其他</view> | |||||
<!--其他--> | |||||
<view style="margin:50rpx 0 0 50rpx;font-size: 40rpx;color: #333333;">其他</view> | |||||
<!--下GridView--> | |||||
<view style="margin-top: 50rpx;"> | |||||
<uv-grid :col="4"> | |||||
<uv-grid-item v-for="(item,index) in otherList" :key="index" @click="goToPage(item)"> | |||||
<img :src="item.imageUrl" :alt="item.title" | |||||
:style="{ width: '80rpx', height: '80rpx',marginBottom: '10rpx'}"/> | |||||
<text style="font-size: 30rpx;color: #333333;">{{ item.title }} | |||||
</text> | |||||
</uv-grid-item> | |||||
</uv-grid> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
<!--下GridView--> | |||||
<view style="margin-top: 50rpx;"> | |||||
<uv-grid :col="4"> | |||||
<uv-grid-item v-for="(item,index) in otherList" :key="index" @click="goToPage(item)"> | |||||
<img :src="item.imageUrl" :alt="item.title" | |||||
:style="{ width: '80rpx', height: '80rpx',marginBottom: '10rpx'}" /> | |||||
<text style="font-size: 30rpx;color: #333333;">{{ item.title }} | |||||
</text> | |||||
</uv-grid-item> | |||||
</uv-grid> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
</template> | </template> | ||||
<script> | <script> | ||||
import tabber from '@/components/base/tabbar.vue' | |||||
import {mapState} from 'vuex' | |||||
import tabber from '@/components/base/tabbar.vue' | |||||
import { | |||||
mapState | |||||
} from 'vuex' | |||||
export default { | |||||
components: { | |||||
tabber | |||||
}, | |||||
computed: { | |||||
...mapState(['count']), | |||||
}, | |||||
data() { | |||||
return { | |||||
// 基础列表 | |||||
baseList: [ | |||||
{ | |||||
name: 'photo', | |||||
imageUrl: '/static/image/center/1.png', | |||||
title: '我的发布', | |||||
gotoPageUrl: '/mine/releaseRecord' | |||||
}, | |||||
{ | |||||
name: 'lock', imageUrl: '/static/image/center/1.png', title: '我的推广', | |||||
gotoPageUrl: '/mine/promotionRecord' | |||||
}, | |||||
{name: 'star', imageUrl: '/static/image/center/1.png', title: '我的银行卡', | |||||
gotoPageUrl: '/mine/addBankCard' | |||||
}, | |||||
{name: 'star', imageUrl: '/static/image/center/1.png', title: '我的钱包', | |||||
gotoPageUrl: '/mine/purse'}, | |||||
], | |||||
// 其他列表 | |||||
otherList: [ | |||||
{name: 'photo', imageUrl: '/static/image/center/1.png', title: '实名信息'}, | |||||
{name: 'lock', imageUrl: '/static/image/center/1.png', title: '帮助反馈'}, | |||||
], | |||||
} | |||||
}, | |||||
methods: { | |||||
export default { | |||||
components: { | |||||
tabber | |||||
}, | |||||
computed: { | |||||
...mapState(['userInfo']), | |||||
}, | |||||
data() { | |||||
return { | |||||
// 基础列表 | |||||
baseList: [{ | |||||
name: 'photo', | |||||
imageUrl: '/static/image/center/1.png', | |||||
title: '我的发布', | |||||
gotoPageUrl: '/mine/releaseRecord' | |||||
}, | |||||
{ | |||||
name: 'lock', | |||||
imageUrl: '/static/image/center/1.png', | |||||
title: '我的推广', | |||||
gotoPageUrl: '/mine/promotionRecord' | |||||
}, | |||||
{ | |||||
name: 'star', | |||||
imageUrl: '/static/image/center/1.png', | |||||
title: '我的银行卡', | |||||
gotoPageUrl: '/mine/addBankCard' | |||||
}, | |||||
{ | |||||
name: 'star', | |||||
imageUrl: '/static/image/center/1.png', | |||||
title: '我的钱包', | |||||
gotoPageUrl: '/mine/purse' | |||||
}, | |||||
], | |||||
// 其他列表 | |||||
otherList: [{ | |||||
name: 'photo', | |||||
imageUrl: '/static/image/center/1.png', | |||||
title: '实名信息' | |||||
}, | |||||
{ | |||||
name: 'lock', | |||||
imageUrl: '/static/image/center/1.png', | |||||
title: '帮助反馈' | |||||
}, | |||||
], | |||||
} | |||||
}, | |||||
onShow() { | |||||
// 获取用户个人信息 | |||||
this.$store.commit('getUserInfo') | |||||
}, | |||||
methods: { | |||||
// 点击列表跳转页面 | |||||
goToPage(item) { | |||||
this.$utils.navigateTo(item.gotoPageUrl) | |||||
}, | |||||
// 点击列表跳转页面 | |||||
goToPage(item) { | |||||
this.$utils.navigateTo(item.gotoPageUrl) | |||||
}, | |||||
} | |||||
} | |||||
} | |||||
} | |||||
</script> | </script> | ||||
<style lang="scss" scoped> | <style lang="scss" scoped> | ||||
* { | |||||
box-sizing: border-box; | |||||
margin: 0; | |||||
padding: 0; | |||||
} | |||||
.textColor { | |||||
background: $uni-linear-gradient-color; | |||||
-webkit-background-clip: text; /*将设置的背景颜色限制在文字中*/ | |||||
-webkit-text-fill-color: transparent; /*给文字设置成透明*/ | |||||
} | |||||
</style> | |||||
* { | |||||
box-sizing: border-box; | |||||
margin: 0; | |||||
padding: 0; | |||||
} | |||||
.textColor { | |||||
background: $uni-linear-gradient-color; | |||||
-webkit-background-clip: text; | |||||
/*将设置的背景颜色限制在文字中*/ | |||||
-webkit-text-fill-color: transparent; | |||||
/*给文字设置成透明*/ | |||||
} | |||||
</style> |
@ -0,0 +1,92 @@ | |||||
<template> | |||||
<view class="payOrder"> | |||||
<navbar | |||||
leftClick | |||||
@leftClick="$utils.navigateBack" | |||||
title="订单支付"/> | |||||
<view class="pay"> | |||||
<view class=""> | |||||
金额 | |||||
</view> | |||||
<view class=""> | |||||
¥100 | |||||
</view> | |||||
</view> | |||||
<view class="submit" | |||||
@click="submit"> | |||||
支付 | |||||
</view> | |||||
<confirmationPopup | |||||
ref="confirmationPopup" | |||||
title="提示" | |||||
confirmText="确认"> | |||||
<view class="confirmationPopup"> | |||||
<!-- <image src="/static/image/publish/upload.png" | |||||
style="width: 150rpx;height: 150rpx;" | |||||
mode=""></image> --> | |||||
<view> | |||||
支付成功 | |||||
</view> | |||||
</view> | |||||
</confirmationPopup> | |||||
</view> | |||||
</template> | |||||
<script> | |||||
import confirmationPopup from '@/components/toast/confirmationPopup.vue' | |||||
export default { | |||||
components : { | |||||
confirmationPopup, | |||||
}, | |||||
data() { | |||||
return { | |||||
} | |||||
}, | |||||
methods: { | |||||
submit(){ | |||||
this.$refs.confirmationPopup.open() | |||||
}, | |||||
} | |||||
} | |||||
</script> | |||||
<style scoped lang="scss"> | |||||
.payOrder{ | |||||
padding: 30rpx; | |||||
.pay{ | |||||
display: flex; | |||||
color: #999; | |||||
justify-content: space-between; | |||||
padding: 20rpx 0; | |||||
border-bottom: 1px solid #999; | |||||
} | |||||
.submit{ | |||||
background: $uni-linear-gradient-btn-color; | |||||
color: #fff; | |||||
padding: 20rpx 0; | |||||
text-align: center; | |||||
margin-top: 100rpx; | |||||
} | |||||
.confirmationPopup{ | |||||
display: flex; | |||||
flex-direction: column; | |||||
align-items: center; | |||||
justify-content: center; | |||||
width: 100%; | |||||
height: 200rpx; | |||||
image{ | |||||
margin-top: 40rpx; | |||||
} | |||||
.info{ | |||||
margin-top: 40rpx; | |||||
font-size: 26rpx; | |||||
} | |||||
} | |||||
} | |||||
</style> |
@ -0,0 +1,152 @@ | |||||
<template> | |||||
<view class="postDetail"> | |||||
<navbar leftClick @leftClick="$utils.navigateBack" /> | |||||
<view class="swipe"> | |||||
<uv-swiper | |||||
:list="item.image && | |||||
item.image.split(',')" | |||||
indicator | |||||
height="320rpx"></uv-swiper> | |||||
</view> | |||||
<view class="box"> | |||||
<view class="topInfo"> | |||||
<view class="title"> | |||||
{{ item.title }} | |||||
</view> | |||||
</view> | |||||
<view class="createBy"> | |||||
<view class=""> | |||||
发布人:{{ item.userId }} | |||||
</view> | |||||
<view class=""> | |||||
发布时间:{{ item.createTime }} | |||||
</view> | |||||
</view> | |||||
<view class="controls"> | |||||
<contentControls/> | |||||
</view> | |||||
<view class="content"> | |||||
<uv-parse :content="item.content"></uv-parse> | |||||
</view> | |||||
<view class="works"> | |||||
<view class="item" | |||||
v-for="(item, index) in 10" | |||||
:key="index"> | |||||
<view class="item-title"> | |||||
代表作品夏 | |||||
</view> | |||||
<view class="item-image"> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
</view> | |||||
</template> | |||||
<script> | |||||
import contentControls from '@/components/content/contentControls.vue' | |||||
export default { | |||||
components : { | |||||
contentControls | |||||
}, | |||||
data() { | |||||
return { | |||||
item: { | |||||
title: "这是一条动态", | |||||
createTime: '2024-08-22 09:00:00', | |||||
createBy: "小飞", | |||||
content: '这是一条动态这是一条动态这是一条动态这是一条动态这是一条动态这是一条动态这是一条动态这是一条动态这是一条动态这是一条动态这是一条动态', | |||||
}, | |||||
} | |||||
}, | |||||
onLoad(options) { | |||||
// this.$route.query的参数 | |||||
console.log(options) | |||||
// this.getData(options.id) | |||||
}, | |||||
methods: { | |||||
getData(id){ | |||||
this.$api('indexGetTrendsDetail', { | |||||
id | |||||
}, res => { | |||||
if(res.code == 200){ | |||||
this.item = res.result | |||||
} | |||||
}) | |||||
}, | |||||
} | |||||
} | |||||
</script> | |||||
<style lang="scss" scoped> | |||||
.postDetail { | |||||
.box { | |||||
padding: 20rpx; | |||||
.title { | |||||
font-size: 30rpx; | |||||
font-weight: 600; | |||||
color: #000; | |||||
} | |||||
.createBy { | |||||
display: flex; | |||||
margin-top: auto; | |||||
margin-bottom: 10rpx; | |||||
font-size: 24rpx; | |||||
margin-top: 20rpx; | |||||
color: #555; | |||||
&>view { | |||||
display: flex; | |||||
align-items: center; | |||||
justify-content: center; | |||||
padding-right: 20rpx; | |||||
} | |||||
} | |||||
.controls { | |||||
margin-top: 30rpx; | |||||
} | |||||
.content { | |||||
margin-top: 30rpx; | |||||
color: #777; | |||||
} | |||||
.works{ | |||||
display: flex; | |||||
flex-wrap: wrap; | |||||
margin-top: 20rpx; | |||||
.item{ | |||||
width: 320rpx; | |||||
margin: 15rpx; | |||||
.item-title{ | |||||
padding-bottom: 10rpx; | |||||
color: #000; | |||||
} | |||||
.item-image{ | |||||
background-color: #999; | |||||
width: 100%; | |||||
height: 250rpx; | |||||
image{ | |||||
width: 100%; | |||||
height: 100%; | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} | |||||
</style> |
@ -1,39 +0,0 @@ | |||||
import OSS from "ali-oss" | |||||
import utils from './utils.js' | |||||
import config from '../config.js' | |||||
function uploadFileToOSS(file) { | |||||
uni.showLoading({ | |||||
title: '上传中...' | |||||
}); | |||||
return new Promise((resolve,reject) => { | |||||
// 创建OSS实例 | |||||
const client = new OSS(config.aliOss.config); | |||||
// 设置文件名和文件目录 | |||||
const suffix = '.' + file.name.split('.').pop(); | |||||
const fileName = utils.generateUUID() + suffix; // 注意:文件名需要是唯一的 | |||||
// 使用put接口上传文件 | |||||
client.multipartUpload(fileName, file, { | |||||
headers: { | |||||
'Content-Disposition': 'inline', | |||||
'Content-Type': file.type | |||||
} | |||||
}).then(res => { | |||||
uni.hideLoading(); | |||||
resolve(config.aliOss.url + res.name); | |||||
}).catch(err => { | |||||
uni.hideLoading(); | |||||
reject(err) | |||||
}) | |||||
}) | |||||
} | |||||
export default uploadFileToOSS |