Browse Source

上传登录

master
前端-胡立永 11 months ago
parent
commit
d661d1fb41
59 changed files with 1133 additions and 230 deletions
  1. +3
    -6
      api/api.js
  2. +4
    -2
      api/http.js
  3. +85
    -0
      components/config/showLogin.vue
  4. +118
    -0
      components/config/showPrivacyAgreement.vue
  5. +6
    -3
      components/content/submit.vue
  6. +4
    -1
      components/post/actorList.vue
  7. +3
    -1
      components/post/postList.vue
  8. +94
    -0
      components/toast/confirmationPopup.vue
  9. +1
    -1
      config.js
  10. +21
    -8
      pages.json
  11. +0
    -19
      pages/auth/login.vue
  12. +141
    -0
      pages/auth/wxUserInfo.vue
  13. +150
    -129
      pages/index/center.vue
  14. +91
    -5
      pages/index/index.vue
  15. +9
    -3
      pages/index/publish.vue
  16. +92
    -0
      pages/order/payOrder.vue
  17. +152
    -0
      pages/publish/actorDetail.vue
  18. +35
    -3
      pages/publish/actorRelease.vue
  19. +6
    -2
      pages/publish/postDetail.vue
  20. +67
    -3
      pages/publish/publishPost.vue
  21. BIN
      static/image/index/123123.png
  22. BIN
      static/image/index/a1.png
  23. BIN
      static/image/index/a2.png
  24. BIN
      static/image/index/a3.png
  25. BIN
      static/image/index/p1.png
  26. BIN
      static/image/index/p2.png
  27. BIN
      static/image/index/p3.png
  28. BIN
      static/image/publish/pay.png
  29. BIN
      static/image/publish/upload.png
  30. BIN
      static/image/素材8.21/icon/画板 1 (2).png
  31. BIN
      static/image/素材8.21/icon/画板 1.png
  32. BIN
      static/image/素材8.21/icon/画板 1@2x (2).png
  33. BIN
      static/image/素材8.21/icon/画板 1@2x.png
  34. BIN
      static/image/素材8.21/icon/画板 1@2x(1).png
  35. BIN
      static/image/素材8.21/icon/画板 1(1).png
  36. BIN
      static/image/素材8.21/icon/画板 3.png
  37. BIN
      static/image/素材8.21/icon/画板 3@2x.png
  38. BIN
      static/image/素材8.21/icon/首页 (2).png
  39. BIN
      static/image/素材8.21/icon/首页.png
  40. BIN
      static/image/素材8.21/icon/首页@2x (2).png
  41. BIN
      static/image/素材8.21/icon/首页@2x.png
  42. BIN
      static/image/素材8.21/分组 2.png
  43. BIN
      static/image/素材8.21/分组 2@2x.png
  44. BIN
      static/image/素材8.21/分组 4.png
  45. BIN
      static/image/素材8.21/分组 4@2x.png
  46. BIN
      static/image/素材8.21/分组 5.png
  47. BIN
      static/image/素材8.21/分组 5@2x.png
  48. BIN
      static/image/素材8.21/画板 .png
  49. BIN
      static/image/素材8.21/画板 1.png
  50. BIN
      static/image/素材8.21/画板 3.png
  51. BIN
      static/image/素材8.21/矩形 2938.png
  52. BIN
      static/image/素材8.21/矩形 2938@2x.png
  53. BIN
      static/image/素材8.21/蒙版组 7.png
  54. BIN
      static/image/素材8.21/蒙版组 7@2x.png
  55. BIN
      static/image/素材8.21/蒙版组 8.png
  56. BIN
      static/image/素材8.21/蒙版组 8@2x.png
  57. +34
    -0
      store/store.js
  58. +0
    -39
      utils/upload.js
  59. +17
    -5
      utils/utils.js

+ 3
- 6
api/api.js View File

@ -157,7 +157,6 @@ const config = {
loginLogin: {
url: '/api/login/login',
method: 'GET',
auth: true
},
// 退出接口
loginLogout: {
@ -169,13 +168,11 @@ const config = {
loginRegister: {
url: '/api/login/register',
method: 'GET',
auth: true
},
// 发送验证码接口
loginSendcode: {
url: '/api/login/sendCode',
method: 'GET',
auth: true
},
}
@ -209,9 +206,9 @@ export function api(key, data, callback, loadingTitle) {
//必须登录
if (req.auth) {
if (!uni.getStorageSync('token')) {
uni.navigateTo({
url: '/pages/auth/login'
})
// uni.navigateTo({
// url: '/pages/auth/login'
// })
console.error('需要登录')
return
}


+ 4
- 2
api/http.js View File

@ -29,15 +29,17 @@ function http(uri, data, callback, method = 'GET', showLoading, title) {
uni.removeStorageSync('token')
console.error('登录过期');
uni.navigateTo({
url: '/pages/auth/login'
url: '/pages/index/index'
})
}
if(res.statusCode == 200 && res.data.code != 200){
if(res.statusCode == 200 &&
res.data.code != 200){
uni.showToast({
mask: true,
duration: 1000,
title: res.data.message,
icon:'none'
});
}


+ 85
- 0
components/config/showLogin.vue View File

@ -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>

+ 118
- 0
components/config/showPrivacyAgreement.vue View File

@ -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>

+ 6
- 3
components/content/submit.vue View File

@ -1,6 +1,7 @@
<template>
<view class="submit">
<view class="">
<view class=""
@click="$emit('draft')">
<uv-icon
size="40rpx"
name="file-text"></uv-icon>
@ -8,7 +9,8 @@
存草稿
</view>
</view>
<view class="">
<view class=""
@click="$emit('preview')">
<uv-icon
size="40rpx"
name="eye-fill"></uv-icon>
@ -16,7 +18,8 @@
预览
</view>
</view>
<view class="btn">
<view class="btn"
@click="$emit('submit')">
{{ submiitTitle }}
</view>
</view>


+ 4
- 1
components/post/actorList.vue View File

@ -3,7 +3,10 @@
<view class="item" v-for="(item, index) in list"
@click="$utils.navigateTo('/publish/postDetail?id=123')"
:key="index">
<image :src="item.image" mode="aspectFill"></image>
<image
:src="item.image &&
item.image.split(',')[0]"
mode="aspectFill"></image>
<view class="text">
<view class="title">
<view class="t">


+ 3
- 1
components/post/postList.vue View File

@ -3,7 +3,9 @@
<view class="item" v-for="(item, index) in list"
@click="$utils.navigateTo('/publish/postDetail?id=' + item.id)"
:key="index">
<image :src="item.image" mode="aspectFill"></image>
<image
:src="item.image &&
item.image.split(',')[0]" mode="aspectFill"></image>
<view class="text">
<view class="title">
{{ item.title }}


+ 94
- 0
components/toast/confirmationPopup.vue View File

@ -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
- 1
config.js View File

@ -11,7 +11,7 @@ const type = 'dev'
// 环境配置
const config = {
dev : {
baseUrl : 'http://admin.anqi.shop/a-notice-api',
baseUrl : 'http://h5.xzaiyp.top/a-notice-api',
},
prod : {
baseUrl : 'http://admin.anqi.shop/a-notice-api',


+ 21
- 8
pages.json View File

@ -6,6 +6,27 @@
"navigationBarTitleText": ""
}
},
{
"path" : "pages/publish/actorDetail",
"style" :
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/order/payOrder",
"style" :
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/auth/wxUserInfo",
"style" :
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/publish/actorRelease",
"style" :
@ -118,13 +139,6 @@
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/auth/login",
"style" :
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/mine/sonPage/promotion/promotionDetail",
"style" :
@ -153,7 +167,6 @@
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {


+ 0
- 19
pages/auth/login.vue View File

@ -1,19 +0,0 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="scss">
</style>

+ 141
- 0
pages/auth/wxUserInfo.vue View File

@ -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>

+ 150
- 129
pages/index/center.vue View File

@ -1,145 +1,166 @@
<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>
<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>
<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>

+ 91
- 5
pages/index/index.vue View File

@ -48,10 +48,34 @@
</view>
</view>
<view class="ACTORS">
<uv-swiper
:list="actorList"
keyName="logo"
height="320rpx"></uv-swiper>
<swiper class="swiper-box"
:autoplay="true"
:duration="500">
<swiper-item v-for="(item, index) in actorList" :key="index">
<view class="swiper-item">
<image
class="logo"
:src="item.logo"
mode="aspectFill" />
<view class="swiper-item-content">
<view class="left">
<view class="title">
{{ item.name }}
</view>
<view class="info-from">
<text>{{ item.userId }}</text>
<text style="margin-left: 30rpx;">{{ item.createTime }}</text>
</view>
</view>
<view class="right">
查看
</view>
</view>
</view>
</swiper-item>
</swiper>
</view>
</view>
@ -73,16 +97,26 @@
</view>
<tabber :select="0"/>
<showPrivacyAgreement
ref="showPrivacy">
</showPrivacyAgreement>
<showLogin/>
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
import postList from '@/components/post/postList.vue'
import showPrivacyAgreement from '@/components/config/showPrivacyAgreement.vue'
import showLogin from '@/components/config/showLogin.vue'
export default {
components : {
tabber,
postList
postList,
showPrivacyAgreement,
showLogin,
},
data() {
return {
@ -96,6 +130,18 @@
},
onShow() {
this.getData()
if(wx.onNeedPrivacyAuthorization){
console.log('onNeedPrivacyAuthorization');
wx.onNeedPrivacyAuthorization(resolve => {
console.log('onNeedPrivacyAuthorization');
//
//
this.resolvePrivacyAuthorization = resolve
this.$refs.showPrivacy.init(resolve)
})
}
},
methods: {
getData(){
@ -187,6 +233,46 @@
color: #777;
}
}
.ACTORS{
.swiper-item{
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
width: 100%;
image{
width: 450rpx;
height: 180rpx;
}
.swiper-item-content{
margin-top: 15rpx;
display: flex;
width: 80%;
.left{
.title{
font-weight: 900;
font-size: 30rpx;
}
.info-from{
font-size: 26rpx;
color: #777;
}
}
.right{
background: $uni-linear-gradient-color;
color: #fff;
padding: 0 40rpx;
font-size: 28rpx;
margin-left: auto;
border-radius: 15rpx;
height: 60rpx;
display: flex;
justify-content: center;
align-items: center;
}
}
}
}
}
}
</style>

+ 9
- 3
pages/index/publish.vue View File

@ -1,6 +1,6 @@
<template>
<view class="publish">
<view class="top">
<view class="top" v-if="">
<view class="title">
发布
</view>
@ -19,24 +19,30 @@
</view>
<tabber :select="1" />
<showLogin ref="showLogin"/>
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
import showLogin from '@/components/config/showLogin.vue'
import {
mapState
} from 'vuex'
export default {
components: {
tabber
tabber,
showLogin
},
computed: {
...mapState(['count']),
},
onShow() {
this.$refs.showLogin.checkLogin()
},
data() {
return {
};
}
}


+ 92
- 0
pages/order/payOrder.vue View File

@ -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>

+ 152
- 0
pages/publish/actorDetail.vue View File

@ -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>

+ 35
- 3
pages/publish/actorRelease.vue View File

@ -68,7 +68,7 @@
labelSize="28rpx"
name="0">
</uv-radio>
</uvuv-radio-group>
</uv-radio-group>
</view>
</view>
<view class="form-item-content">
@ -91,7 +91,7 @@
labelSize="28rpx"
name="0">
</uv-radio>
</uvuv-radio-group>
</uv-radio-group>
</view>
</view>
<view class="form-item-content">
@ -114,7 +114,7 @@
labelSize="28rpx"
name="0">
</uv-radio>
</uvuv-radio-group>
</uv-radio-group>
</view>
</view>
@ -141,14 +141,30 @@
@preview="preview"
@draft="draft"
/>
<confirmationPopup
ref="confirmationPopupUpload"
title="提示"
confirmText="确认">
<view class="confirmationPopup">
<image src="/static/image/publish/upload.png"
style="width: 150rpx;height: 150rpx;"
mode=""></image>
<view class="info">
已由平台进行审核时间周期为24小时
</view>
</view>
</confirmationPopup>
</view>
</template>
<script>
import submit from '@/components/content/submit.vue'
import confirmationPopup from '@/components/toast/confirmationPopup.vue'
export default {
components : {
submit,
confirmationPopup
},
data() {
return {
@ -221,5 +237,21 @@
}
}
}
.confirmationPopup{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 300rpx;
image{
margin-top: 40rpx;
}
.info{
margin-top: 40rpx;
font-size: 26rpx;
}
}
}
</style>

+ 6
- 2
pages/publish/postDetail.vue View File

@ -3,7 +3,11 @@
<navbar leftClick @leftClick="$utils.navigateBack" />
<view class="swipe">
<uv-swiper :list="list" keyName="url" indicator height="320rpx"></uv-swiper>
<uv-swiper
:list="item.image &&
item.image.split(',')"
indicator
height="320rpx"></uv-swiper>
</view>
<view class="box">
@ -92,7 +96,7 @@
display: flex;
margin-top: auto;
margin-bottom: 10rpx;
font-size: 26rpx;
font-size: 24rpx;
margin-top: 20rpx;
color: #555;


+ 67
- 3
pages/publish/publishPost.vue View File

@ -55,22 +55,60 @@
</uv-radio-group>
</view>
<view class="configBtn"
@click="$refs.configPopup.open()">
发布须知
</view>
<submit
@submit="submit"
@preview="preview"
@draft="draft"
submitTitle="发布帖子"
/>
<confirmationPopup
ref="confirmationPopup"
title="提示"
confirmText="确认支付">
<view class="confirmationPopup">
<image src="/static/image/publish/pay.png"
style="width: 150rpx;height: 150rpx;"
mode=""></image>
<view class="info">
确认支付3元可置顶1天
</view>
</view>
</confirmationPopup>
<confirmationPopup
ref="confirmationPopupUpload"
title="提示"
confirmText="确认">
<view class="confirmationPopup">
<image src="/static/image/publish/upload.png"
style="width: 150rpx;height: 150rpx;"
mode=""></image>
<view class="info">
已由平台进行审核时间周期为24小时
</view>
</view>
</confirmationPopup>
<configPopup
ref="configPopup"
/>
</view>
</template>
<script>
import submit from '@/components/content/submit.vue'
import uvUpload from '@/uni_modules/uv-upload/components/uv-upload/uv-upload.vue'
import confirmationPopup from '@/components/toast/confirmationPopup.vue'
export default {
components : {
submit,
uvUpload,
confirmationPopup
},
data() {
return {
@ -118,7 +156,10 @@
})
})
},
submit(){},
submit(){
console.log(1);
this.$refs.confirmationPopup.open()
},
preview(){},
draft(){},
}
@ -176,5 +217,28 @@
}
}
}
.configBtn{
padding: 20rpx;
color: #777;
padding-top: 40rpx;
font-size: 28rpx;
}
.confirmationPopup{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 300rpx;
image{
margin-top: 40rpx;
}
.info{
margin-top: 40rpx;
font-size: 26rpx;
}
}
}
</style>

BIN
static/image/index/123123.png View File

Before After
Width: 694  |  Height: 296  |  Size: 71 KiB

BIN
static/image/index/a1.png View File

Before After
Width: 678  |  Height: 262  |  Size: 30 KiB

BIN
static/image/index/a2.png View File

Before After
Width: 676  |  Height: 262  |  Size: 32 KiB

BIN
static/image/index/a3.png View File

Before After
Width: 678  |  Height: 264  |  Size: 27 KiB

BIN
static/image/index/p1.png View File

Before After
Width: 332  |  Height: 188  |  Size: 45 KiB

BIN
static/image/index/p2.png View File

Before After
Width: 332  |  Height: 188  |  Size: 31 KiB

BIN
static/image/index/p3.png View File

Before After
Width: 332  |  Height: 188  |  Size: 90 KiB

BIN
static/image/publish/pay.png View File

Before After
Width: 70  |  Height: 70  |  Size: 1.6 KiB

BIN
static/image/publish/upload.png View File

Before After
Width: 71  |  Height: 71  |  Size: 1.3 KiB

BIN
static/image/素材8.21/icon/画板 1 (2).png View File

Before After
Width: 22  |  Height: 22  |  Size: 760 B

BIN
static/image/素材8.21/icon/画板 1.png View File

Before After
Width: 22  |  Height: 22  |  Size: 423 B

BIN
static/image/素材8.21/icon/画板 1@2x (2).png View File

Before After
Width: 44  |  Height: 44  |  Size: 1.6 KiB

BIN
static/image/素材8.21/icon/画板 1@2x.png View File

Before After
Width: 44  |  Height: 44  |  Size: 929 B

BIN
static/image/素材8.21/icon/画板 1@2x(1).png View File

Before After
Width: 40  |  Height: 40  |  Size: 748 B

BIN
static/image/素材8.21/icon/画板 1(1).png View File

Before After
Width: 20  |  Height: 20  |  Size: 390 B

BIN
static/image/素材8.21/icon/画板 3.png View File

Before After
Width: 20  |  Height: 20  |  Size: 597 B

BIN
static/image/素材8.21/icon/画板 3@2x.png View File

Before After
Width: 40  |  Height: 40  |  Size: 1.1 KiB

BIN
static/image/素材8.21/icon/首页 (2).png View File

Before After
Width: 20  |  Height: 20  |  Size: 393 B

BIN
static/image/素材8.21/icon/首页.png View File

Before After
Width: 20  |  Height: 20  |  Size: 640 B

BIN
static/image/素材8.21/icon/首页@2x (2).png View File

Before After
Width: 40  |  Height: 40  |  Size: 611 B

BIN
static/image/素材8.21/icon/首页@2x.png View File

Before After
Width: 40  |  Height: 40  |  Size: 1.1 KiB

BIN
static/image/素材8.21/分组 2.png View File

Before After
Width: 339  |  Height: 131  |  Size: 13 KiB

BIN
static/image/素材8.21/分组 2@2x.png View File

Before After
Width: 678  |  Height: 262  |  Size: 30 KiB

BIN
static/image/素材8.21/分组 4.png View File

Before After
Width: 338  |  Height: 131  |  Size: 13 KiB

BIN
static/image/素材8.21/分组 4@2x.png View File

Before After
Width: 676  |  Height: 262  |  Size: 32 KiB

BIN
static/image/素材8.21/分组 5.png View File

Before After
Width: 339  |  Height: 132  |  Size: 11 KiB

BIN
static/image/素材8.21/分组 5@2x.png View File

Before After
Width: 678  |  Height: 264  |  Size: 27 KiB

BIN
static/image/素材8.21/画板 .png View File

Before After
Width: 166  |  Height: 94  |  Size: 13 KiB

BIN
static/image/素材8.21/画板 1.png View File

Before After
Width: 166  |  Height: 94  |  Size: 30 KiB

BIN
static/image/素材8.21/画板 3.png View File

Before After
Width: 166  |  Height: 94  |  Size: 16 KiB

BIN
static/image/素材8.21/矩形 2938.png View File

Before After
Width: 347  |  Height: 148  |  Size: 28 KiB

BIN
static/image/素材8.21/矩形 2938@2x.png View File

Before After
Width: 694  |  Height: 296  |  Size: 71 KiB

BIN
static/image/素材8.21/蒙版组 7.png View File

Before After
Width: 50  |  Height: 50  |  Size: 2.2 KiB

BIN
static/image/素材8.21/蒙版组 7@2x.png View File

Before After
Width: 100  |  Height: 100  |  Size: 5.6 KiB

BIN
static/image/素材8.21/蒙版组 8.png View File

Before After
Width: 50  |  Height: 50  |  Size: 2.4 KiB

BIN
static/image/素材8.21/蒙版组 8@2x.png View File

Before After
Width: 100  |  Height: 100  |  Size: 6.7 KiB

+ 34
- 0
store/store.js View File

@ -10,6 +10,7 @@ const store = new Vuex.Store({
state: {
configList: [], //配置列表
count : 10,
userInfo : {},
},
getters: {},
mutations: {
@ -21,6 +22,39 @@ const store = new Vuex.Store({
}
})
},
login(state){
uni.login({
success(res) {
if(res.errMsg != "login:ok"){
return
}
api('loginLogin', {
code : res.code
}, res => {
if(res.code != 200){
return
}
state.userInfo = res.result.userInfo
uni.setStorageSync('token', res.result.token)
if(!state.userInfo.nickName || !state.userInfo.headImage){
uni.navigateTo({
url: '/pages/auth/wxUserInfo'
})
}
})
}
})
},
getUserInfo(state){
api('infoGetInfo', res => {
if(res.code == 200){
state.userInfo = res.result
}
})
},
},
actions: {},
})


+ 0
- 39
utils/upload.js View File

@ -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

+ 17
- 5
utils/utils.js View File

@ -34,19 +34,31 @@ function generateLightRandomColor() {
return color;
}
function verificationAll(data){
function verificationAll(data, msg){
let Msgs = {
default : msg || '表单数据未填写'
}
if(typeof msg == 'object'){
Msgs = {
default : '表单数据未填写',
...msg,
}
}
if (!data){
uni.showToast({
title: '表单数据未填写',
icon: "error"
title: Msgs.default,
icon: "none"
})
return true
}
for (let key in data) {
if (!data[key] || data[key] === "") {
uni.showToast({
title: '必填数据未填写' + key,
icon: "error"
title: (Msgs[key] || Msgs.default),
icon: "none"
})
return true
}


Loading…
Cancel
Save