Browse Source

'静态demo还差一个登陆页面'

mian
hflllll 1 week ago
parent
commit
091587f235
15 changed files with 254 additions and 293 deletions
  1. +4
    -11
      api/index.js
  2. +0
    -73
      api/modules/activity.js
  3. +0
    -26
      api/modules/community.js
  4. +2
    -30
      api/modules/config.js
  5. +0
    -0
      api/modules/exhibit.js
  6. +0
    -53
      api/modules/home.js
  7. +0
    -25
      api/modules/score.js
  8. +0
    -55
      api/modules/shop.js
  9. +3
    -3
      config/index.js
  10. +2
    -2
      pages/index/home.vue
  11. +7
    -1
      pages/index/user.vue
  12. BIN
      static/logo.png
  13. +2
    -2
      subPages/home/maintainanceSubmit.vue
  14. +220
    -4
      subPages/login/login.vue
  15. +14
    -8
      subPages/repair/maintainSubmit.vue

+ 4
- 11
api/index.js View File

@ -1,19 +1,12 @@
import user from '@/api/modules/user' import user from '@/api/modules/user'
import shop from '@/api/modules/shop'
import score from '@/api/modules/score'
import config from '@/api/modules/config' import config from '@/api/modules/config'
import home from '@/api/modules/home'
import activity from '@/api/modules/activity'
import exhibit from '@/api/modules/exhibit'
import login from '@/api/modules/login' import login from '@/api/modules/login'
import community from '@/api/modules/community'
export { export {
user, user,
shop,
score,
config, config,
home,
activity,
login,
community
exhibit,
login
} }

+ 0
- 73
api/modules/activity.js View File

@ -1,73 +0,0 @@
// import request from '@/api/request'
import http from '@/api/http'
export default {
// 活动- 活动报名
async applyActivity(data) {
return http({
url: '/activity/applyActivity',
method: 'POST',
data
})
},
// 活动- 收藏活动
async collectionActivity(data) {
return http({
url: '/activity/collectionActivity',
method: 'POST',
data
})
},
// 活动- 获取活动详情
async queryActivityById(data) {
return http({
url: '/activity/queryActivityById',
method: 'GET',
data,
noToken: true
})
},
// 活动- 获取我收藏的活动列表
async queryActivityCollectionList(data) {
return http({
url: '/activity/queryActivityCollectionList',
method: 'POST',
data
})
},
// 活动- 获取活动列表
async queryActivityList(data) {
return http({
url: '/activity/queryActivityList',
method: 'GET',
data,
noToken: true,
debounce: 200,
// showLoading: true
})
},
// 我的报名- 获取我报名的活动列表
async queryApplyList(data) {
return http({
url: '/activity/queryApplyList',
method: 'POST',
data,
// showLoading: true
})
},
// 我的报名- 活动签到
async signActivity(data) {
return http({
url: '/activity/signActivity',
method: 'POST',
data,
// showToast: false
})
},
}

+ 0
- 26
api/modules/community.js View File

@ -1,26 +0,0 @@
// import request from "@/api/request";
import http from "@/api/http";
export default {
// 社区- 获取帖子列表
async queryPostList(data) {
return http({
url: '/comment/queryPostList',
method: 'GET',
data,
noToken: true,
debounce: 200,
})
},
// 社区- 上传帖子
async addPost(data) {
return http({
url: '/comment/addPost',
method: 'POST',
data,
showLoading: true,
// noToken: true
})
}
}

+ 2
- 30
api/modules/config.js View File

@ -2,13 +2,7 @@
import http from "@/api/http"; import http from "@/api/http";
export default { export default {
async queryCareerList() {
return http({
url: '/config/queryCareerList',
method: 'GET',
noToken: true
})
},
async queryConfigList() { async queryConfigList() {
return http({ return http({
@ -18,30 +12,8 @@ export default {
}) })
}, },
async queryQualificationList() {
return http({
url: '/config/queryQualificationList',
method: 'GET',
noToken: true
})
},
// 系统配置- 查询活动分类列表
async queryCategoryActivityList() {
return http({
url: '/config/queryCategoryActivityList',
method: 'GET',
noToken: true
})
},
// 系统配置- 查询商品分类列表
async queryCategoryGoodsList() {
return http({
url: '/config/queryCategoryGoodsList',
method: 'GET',
noToken: true
})
},
} }

+ 0
- 0
api/modules/exhibit.js View File


+ 0
- 53
api/modules/home.js View File

@ -1,53 +0,0 @@
// import request from "@/api/request";
import http from "@/api/http";
export default {
// 首页- 申请成为志愿者
async applyVolunteer(data) {
return http({
url: '/index/applyVolunteer',
method: 'POST',
data
})
},
// 首页- 查看志愿者信息复制接口复制文档复制地址
// POST
// / community - admin / community / index /queryVolunteer
async queryVolunteer() {
return http({
url: '/index/queryVolunteer',
method: 'POST'
})
},
// 首页- 获取banner图列表
async queryBannerList(data) {
return http({
url: '/index/queryBannerList',
method: 'GET',
noToken: true,
data
})
},
// 首页- 获取公告详情
async queryNoticeById(data) {
return http({
url: '/index/queryNoticeById',
method: 'GET',
data,
noToken: true
})
},
// 首页- 获取公告列表
async queryNoticeList(data) {
return http({
url: '/index/queryNoticeList',
method: 'GET',
data,
noToken: true
})
},
}

+ 0
- 25
api/modules/score.js View File

@ -1,25 +0,0 @@
// import request from "@/api/request";
import http from "@/api/http";
export default {
// 可用积分- 获取积分明细列表
async queryScoreList(data) {
return http({
url: '/score/queryScoreList',
method: 'POST',
data,
debounce: 300
})
},
// 首页- 积分排行榜复制接口复制文档复制地址
// POST
// / community - admin / community / score / queryScoreRank
async queryScoreRank(data) {
return http({
url: '/score/queryScoreRank',
method: 'POST',
data,
noToken: true
})
}
}

+ 0
- 55
api/modules/shop.js View File

@ -1,55 +0,0 @@
// import request from "@/api/request";
import http from "@/api/http";
export default {
// 首页-兑换商品
async buyGoods(data) {
return http({
url: '/goods/buyGoods',
method: 'POST',
data,
showLoading: true
})
},
// 首页- 收藏商品
async collectionGoods(data) {
return http({
url: '/goods/collectionGoods',
method: 'POST',
data,
showLoading: true
})
},
// 首页- 获取商品详情
async queryGoodsById(data) {
return http({
url: '/goods/queryGoodsById',
method: 'GET',
data,
noToken: true
})
},
// 商品收藏- 获取我收藏的商品列表
async queryGoodsCollectionList(data) {
return http({
url: '/goods/queryGoodsCollectionList',
method: 'POST',
data
})
},
// 首页- 获取商品列表
async queryGoodsList(data) {
return http({
url: '/goods/queryGoodsList',
method: 'GET',
data,
noToken: true,
debounce: 200,
// showLoading: true
})
}
}

+ 3
- 3
config/index.js View File

@ -14,15 +14,15 @@ const config = {
// 网络全局配置 // 网络全局配置
netConfig: { netConfig: {
development: { development: {
baseURL: 'http://augcl.natapp1.cc/community-admin/community',
baseURL: 'http://augcl.natapp1.cc/exhibit-admin/exhibit',
}, },
testing: { testing: {
baseURL: 'https://mulinyouni.augcl.com/community-admin/community',
baseURL: 'https://exhibit.augcl.com/exhibit-admin/exhibi',
}, },
production: { production: {
baseURL: 'https://www.mulinyouni.com/community-admin/community',
baseURL: '',
} }
}, },


+ 2
- 2
pages/index/home.vue View File

@ -34,7 +34,7 @@
<view class="exhibit-item" v-for="(item, index) in exhibitList" :key="index" @click="handleItemClick(item)"> <view class="exhibit-item" v-for="(item, index) in exhibitList" :key="index" @click="handleItemClick(item)">
<view class="item-header"> <view class="item-header">
<text class="item-id">{{ item.id }}</text> <text class="item-id">{{ item.id }}</text>
<img src="@/static/copy.png" alt="我是复制黏贴" class="item-icon">
<img src="@/static/copy.png" alt="我是复制黏贴" class="item-icon" @click="copyId(item.id)">
</view> </view>
<view class="item-border" /> <view class="item-border" />
<view class="item-content"> <view class="item-content">
@ -312,7 +312,7 @@ export default {
.project { .project {
// flex: 1; // flex: 1;
background: $primary-color; background: $primary-color;
border: 1px solid #707070;
// border: 1px solid #707070;
border-radius: 11rpx; border-radius: 11rpx;
color: #fff; color: #fff;
font-size: 22rpx; font-size: 22rpx;


+ 7
- 1
pages/index/user.vue View File

@ -1,7 +1,7 @@
<template> <template>
<view class="user-container"> <view class="user-container">
<!-- 顶部背景区域 --> <!-- 顶部背景区域 -->
<view class="header-bg">
<view class="header-bg" @click="goLogin">
<!-- 用户信息区域 --> <!-- 用户信息区域 -->
<view class="user-info"> <view class="user-info">
<view class="avatar-section"> <view class="avatar-section">
@ -64,6 +64,12 @@ export default {
} }
}, },
methods: { methods: {
//
goLogin() {
uni.navigateTo({
url: '/subPages/login/login'
})
},
// //
goToBasicInfo() { goToBasicInfo() {
uni.navigateTo({ uni.navigateTo({


BIN
static/logo.png View File

Before After
Width: 237  |  Height: 237  |  Size: 16 KiB Width: 93  |  Height: 94  |  Size: 4.6 KiB

+ 2
- 2
subPages/home/maintainanceSubmit.vue View File

@ -368,9 +368,9 @@ export default {
this.beforeImageList.push(result.url) this.beforeImageList.push(result.url)
} }
} catch (error) { } catch (error) {
console.error('头像上传失败:', error)
console.error('图片上传失败:', error)
uni.showToast({ uni.showToast({
title: '头像上传失败',
title: '图片上传失败',
icon: 'error' icon: 'error'
}) })
} }


+ 220
- 4
subPages/login/login.vue View File

@ -1,13 +1,229 @@
<template> <template>
<view>
登录
<view class="login-container">
<!-- 背景图 -->
<image class="bg-image" src="@/subPages/static/登录_背景图.png" mode="aspectFill"></image>
<!-- 主要内容 -->
<view class="content">
<!-- Logo和标题区域 -->
<view class="logo-section">
<image class="logo" src="@/static/logo.png" mode="aspectFit"></image>
<text class="title-text">展品维保报修小程序</text>
</view>
<!-- 登录按钮区域 -->
<view class="login-section">
<button class="login-btn" @click="handleLogin">
授权手机号登录
</button>
<button class="guest-btn" @click="handleGuestLogin">
暂不登录
</button>
<!-- 协议文本 -->
<view class="agreement-text">
<view class="agreement-content">
<view class="checkbox-container" @click="toggleAgreement">
<view class="checkbox" :class="{ 'checked': isAgreed }">
<view class="checkbox-inner" v-if="isAgreed"></view>
</view>
</view>
<text>阅读并同意我们的
<text class="link-text" @click="showServiceAgreement">服务协议与隐私条款</text>
<text></text>
<text class="link-text" @click="showPrivacyPolicy">个人信息保护指引</text>
</text>
</view>
</view>
</view>
</view>
</view> </view>
</template> </template>
<script> <script>
export default {
name: 'Login',
data() {
return {
isAgreed: false
}
},
methods: {
//
handleLogin() {
//
console.log('授权登录');
// API
// uni.getUserProfile({
// desc: '',
// success: (res) => {
// //
// uni.switchTab({
// url: '/pages/index/home'
// });
// }
// });
},
//
handleGuestLogin() {
console.log('暂不登录');
//
uni.switchTab({
url: '/pages/index/home'
});
},
//
showServiceAgreement() {
console.log('查看服务协议');
//
},
//
showPrivacyPolicy() {
console.log('查看隐私条款');
//
},
//
toggleAgreement() {
this.isAgreed = !this.isAgreed;
}
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.login-container {
position: relative;
width: 100vw;
height: 100vh;
overflow: hidden;
.bg-image {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
}
.content {
position: relative;
z-index: 2;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 0 60rpx;
.logo-section {
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 120rpx;
.logo {
width: 120rpx;
height: 120rpx;
margin-bottom: 40rpx;
}
.title-text {
font-size: 36rpx;
font-weight: 600;
color: $primary-text-color;
text-align: center;
}
}
.login-section {
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
.login-btn {
width: 630rpx;
height: 88rpx;
margin-bottom: 30rpx;
background-color: $primary-color;
border: none;
border-radius: 44rpx;
color: white;
font-size: 32rpx;
font-weight: 500;
display: flex;
align-items: center;
justify-content: center;
}
.guest-btn {
width: 630rpx;
height: 88rpx;
margin-bottom: 60rpx;
border: 2rpx solid $secondary-text-color;
border-radius: 44rpx;
color: $secondary-text-color;
font-size: 32rpx;
font-weight: 400;
background-color: transparent;
display: flex;
align-items: center;
justify-content: center;
}
.agreement-text {
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
color: $secondary-text-color;
line-height: 1.5;
.checkbox-container {
margin-right: 12rpx;
cursor: pointer;
.checkbox {
width: 29rpx;
height: 29rpx;
border: 1rpx solid $secondary-text-color;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
&.checked {
border-color: $primary-color;
background-color: $primary-color;
}
.checkbox-inner {
width: 16rpx;
height: 16rpx;
background-color: white;
border-radius: 50%;
}
}
}
.agreement-content {
flex: 1;
text-align: left;
display: flex;
.link-text {
color: $primary-color;
text-decoration: underline;
}
}
}
}
}
}
</style> </style>

+ 14
- 8
subPages/repair/maintainSubmit.vue View File

@ -496,15 +496,21 @@ export default {
}, },
// //
uploadImage() {
uni.chooseImage({
count: 9 - this.processData.imageList.length,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
this.processData.imageList.push(...res.tempFilePaths)
async uploadImage() {
try {
const result = await this.$utils.chooseAndUpload()
if (result && result.success) {
console.log(result);
this.processData.imageList.push(result.url)
} }
})
} catch (error) {
console.error('图片上传失败:', error)
uni.showToast({
title: '图片上传失败',
icon: 'error'
})
}
}, },
// //


Loading…
Cancel
Save