feat:first commit
This commit is contained in:
11
src/pages/404.vue
Normal file
11
src/pages/404.vue
Normal file
@@ -0,0 +1,11 @@
|
||||
<template>
|
||||
<div>404</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'NotFound'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
398
src/pages/index/index.vue
Normal file
398
src/pages/index/index.vue
Normal file
@@ -0,0 +1,398 @@
|
||||
<template>
|
||||
<view class="page_class">
|
||||
<view class="top_nav">
|
||||
<nav-bar :showBack="false">
|
||||
<template #title>
|
||||
<text>首页</text>
|
||||
</template>
|
||||
</nav-bar>
|
||||
</view>
|
||||
<tab-bar :pagePath="'/pages/index/index'"></tab-bar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
},
|
||||
onShow() {
|
||||
},
|
||||
onReachBottom() {},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import '@/static/style/public';
|
||||
|
||||
.page_class {
|
||||
font-family: 'PingFang SC';
|
||||
|
||||
.top_nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.nav_box {
|
||||
width: 100%;
|
||||
padding: 0 30rpx;
|
||||
margin-top: -215rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.index_img {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 430rpx;
|
||||
}
|
||||
|
||||
.index_content {
|
||||
z-index: 9;
|
||||
|
||||
.sift_content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 32rpx;
|
||||
|
||||
.sift_name {
|
||||
flex: 1;
|
||||
padding: 16rpx 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 50rpx;
|
||||
background: #fff7df;
|
||||
box-shadow: 0 10rpx 10rpx 0 #d59d004d;
|
||||
margin-right: 30rpx;
|
||||
|
||||
.sift_name_icon {
|
||||
flex-shrink: 0;
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
|
||||
.sift_name_text {
|
||||
width: 100%;
|
||||
font-size: 28rpx;
|
||||
line-height: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.sift_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 50rpx;
|
||||
background: #ecb100;
|
||||
box-shadow: 0 10rpx 10rpx 0 #d59d004d;
|
||||
padding: 26rpx 40rpx;
|
||||
|
||||
.sift_box_icon {
|
||||
width: 27rpx;
|
||||
height: 27rpx;
|
||||
flex-shrink: 0;
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
|
||||
.sift_box_text {
|
||||
color: #ffffff;
|
||||
font-size: 28rpx;
|
||||
line-height: 30rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.checkup_box {
|
||||
padding: 55rpx 32rpx;
|
||||
margin-top: 30rpx;
|
||||
border-radius: 40rpx 40rpx 0 0;
|
||||
background: #f2f3f5;
|
||||
|
||||
.sift_tabs {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
overflow: auto;
|
||||
|
||||
.sift_tabs_item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
text-align: center;
|
||||
flex-shrink: 0;
|
||||
color: #1d2129;
|
||||
font-size: 30rpx;
|
||||
font-weight: 400;
|
||||
line-height: 32rpx;
|
||||
margin-right: 50rpx;
|
||||
height: 60rpx;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 50rpx;
|
||||
}
|
||||
|
||||
.item_img {
|
||||
width: 55rpx;
|
||||
height: 21rpx;
|
||||
margin-left: 12%;
|
||||
}
|
||||
}
|
||||
|
||||
.tabs_item_active {
|
||||
color: #1d2129;
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.not_data {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
text-align: center;
|
||||
|
||||
.not_icon {
|
||||
width: 306rpx;
|
||||
height: 300rpx;
|
||||
}
|
||||
|
||||
.not_text {
|
||||
color: #999999;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
line-height: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.sift_list {
|
||||
padding-top: 30rpx;
|
||||
|
||||
.sift_item {
|
||||
padding: 40rpx 30rpx 33rpx;
|
||||
margin-bottom: 30rpx;
|
||||
border-radius: 20rpx;
|
||||
background: #fff;
|
||||
box-shadow: 0 0 15rpx 0 #0000000d;
|
||||
|
||||
&:last-child {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.item_head {
|
||||
font-family: 'PingFang SC';
|
||||
font-size: 28rpx;
|
||||
line-height: 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 30rpx;
|
||||
border-bottom: 1rpx solid #eaeaee;
|
||||
}
|
||||
|
||||
.item_content {
|
||||
margin: 30rpx 0;
|
||||
font-family: 'PingFang SC';
|
||||
line-height: 32rpx;
|
||||
|
||||
.info_box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #333333;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
margin-bottom: 25rpx;
|
||||
}
|
||||
|
||||
.info_class {
|
||||
color: #333333;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
|
||||
.item_foot {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #666666;
|
||||
text-align: justify;
|
||||
font-family: 'PingFang SC';
|
||||
font-size: 24rpx;
|
||||
font-weight: 400;
|
||||
line-height: 26rpx;
|
||||
|
||||
.foot_btn {
|
||||
border-radius: 50rpx;
|
||||
border: 1rpx solid #ccc;
|
||||
padding: 15rpx 17rpx;
|
||||
}
|
||||
|
||||
.foot_btn_active {
|
||||
margin-right: 15rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.search_box {
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
position: fixed;
|
||||
|
||||
.search_content {
|
||||
padding: 40rpx;
|
||||
border-radius: 0 0 20rpx 20rpx;
|
||||
background: #fff;
|
||||
box-shadow: 0 4rpx 18rpx 0 #ffb2001a;
|
||||
|
||||
.head {
|
||||
padding: 0 20rpx 24rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #1d2129;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
line-height: 36rpx;
|
||||
|
||||
view {
|
||||
margin-right: 30rpx;
|
||||
|
||||
&:first-child {
|
||||
width: 53%;
|
||||
}
|
||||
|
||||
&:nth-child(2) {
|
||||
width: 15%;
|
||||
margin-right: 44rpx;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.class_list {
|
||||
width: 100%;
|
||||
color: #888888;
|
||||
font-size: 30rpx;
|
||||
line-height: 36rpx;
|
||||
display: flex;
|
||||
max-height: 408rpx;
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
.item_box {
|
||||
margin-right: 10rpx;
|
||||
height: 408rpx;
|
||||
overflow: auto;
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.class_item {
|
||||
padding: 17rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.item_school_text {
|
||||
width: 100%;
|
||||
@include text_multiline(1);
|
||||
}
|
||||
|
||||
.class_item_active {
|
||||
background: #fef5eb;
|
||||
color: #f58300;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.consent_box {
|
||||
padding: 40rpx 40rpx calc(env(safe-area-inset-bottom) + 18rpx);
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
background: #fff;
|
||||
box-shadow: 0 4rpx 18rpx 0 #ffb2001a;
|
||||
|
||||
.consent_head {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
color: #1d2129;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
line-height: 40rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.consent_title {
|
||||
margin-right: 227rpx;
|
||||
}
|
||||
|
||||
.consent_icon {
|
||||
width: 27rpx;
|
||||
height: 27rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.consent_info {
|
||||
color: #333333;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
line-height: 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.consent_list {
|
||||
.consent_item {
|
||||
padding: 34rpx 0;
|
||||
border-top: 1rpx solid #eeeff2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
line-height: 32rpx;
|
||||
|
||||
&:last-child {
|
||||
padding: 15rpx 0;
|
||||
}
|
||||
|
||||
.item_title {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.sign_img {
|
||||
width: 176rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .input-placeholder {
|
||||
color: #e3b841;
|
||||
}
|
||||
|
||||
::v-deep .uni-popup__wrapper {
|
||||
pointer-events: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
170
src/pages/login/index.vue
Normal file
170
src/pages/login/index.vue
Normal file
@@ -0,0 +1,170 @@
|
||||
<template>
|
||||
<view class="page_class" :style="{ paddingTop: `${getNavHeightCss()}px` }">
|
||||
<view class="top_nav">
|
||||
<nav-bar :showBack="false" background-color="#fff">
|
||||
<template #title>
|
||||
<text>登录</text>
|
||||
</template>
|
||||
</nav-bar>
|
||||
</view>
|
||||
<button @click="goto('/pages/index/index',JumpType.switchTab)">去首页</button>
|
||||
<!-- 隐私协议 -->
|
||||
<uni-popup ref="protocolPopup" type="center" :is-mask-click="false" style="z-index: 99999">
|
||||
<view class="popup">
|
||||
<view class="popup_title">用户隐私保护提示</view>
|
||||
<view class="popup_text">
|
||||
亲爱的用户,感谢您的信任!您使用本小程序提供的产品服务前应当阅读并同意
|
||||
<text style="color: #f96fb8; display: inline-block" @click="handOpenPrivacyContract">{{ miniText }}</text>
|
||||
当您点击同意并开始使用产品服务时,即表示你已理解并同息该条款内容,该条款将对您产生法律约束力。如您拒绝,将退出小程序。
|
||||
</view>
|
||||
<view class="btn_box">
|
||||
<view class="cancel_btn" @click="closeMiniPrograms">不同意</view>
|
||||
<button class="confirm_btn" open-type="agreePrivacyAuthorization" @agreeprivacyauthorization="handleAgreePrivacyAuthorization">同意</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {JumpType} from "@/utils/common";
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
openId: '',
|
||||
miniText: '',
|
||||
isConfirmProtocol: true,
|
||||
protocolCheck: null,
|
||||
codeInterval: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
JumpType() {
|
||||
return JumpType
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
wx.getPrivacySetting({
|
||||
success: (result) => {
|
||||
if (result?.needAuthorization) {
|
||||
this.miniText = result.privacyContractName
|
||||
}
|
||||
},
|
||||
fail: () => {},
|
||||
complete: () => {}
|
||||
})
|
||||
|
||||
uni.login({
|
||||
success: async ({ code } = {}) => {
|
||||
// 获取 openId
|
||||
// const openIdResult = await getOpenId(code)
|
||||
// if (openIdResult?.data) {
|
||||
// const { openId } = openIdResult.data
|
||||
// this.openId = openId
|
||||
// }
|
||||
}
|
||||
})
|
||||
},
|
||||
onReachBottom() {},
|
||||
methods: {
|
||||
handleAgreePrivacyAuthorization() {
|
||||
this.$refs.protocolPopup.close()
|
||||
this.isConfirmProtocol = true
|
||||
},
|
||||
|
||||
authorization() {
|
||||
this.$refs.protocolPopup.open()
|
||||
wx.getPrivacySetting({
|
||||
success: (result) => {
|
||||
if (result?.needAuthorization) {
|
||||
this.miniText = result.privacyContractName
|
||||
this.$refs.protocolPopup.open()
|
||||
}
|
||||
},
|
||||
fail: () => {},
|
||||
complete: () => {}
|
||||
})
|
||||
},
|
||||
closeMiniPrograms() {
|
||||
this.isConfirmProtocol = false
|
||||
this.$refs.protocolPopup.close()
|
||||
},
|
||||
handOpenPrivacyContract() {
|
||||
// 打开隐私协议页面
|
||||
wx.openPrivacyContract({
|
||||
success: () => {}, // 打开成功
|
||||
fail: () => {}, // 打开失败
|
||||
complete: () => {}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.page_class {
|
||||
background-color: white;
|
||||
.top_nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-bottom: 1rpx solid #e5e6eb;
|
||||
.nav_box {
|
||||
width: 100%;
|
||||
padding: 0 30rpx;
|
||||
margin-top: -215rpx;
|
||||
}
|
||||
}
|
||||
.popup {
|
||||
margin: 0 auto;
|
||||
width: 70%;
|
||||
padding: 30rpx;
|
||||
background-color: white;
|
||||
text-align: center;
|
||||
border-radius: 30rpx;
|
||||
.popup_title {
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.popup_text {
|
||||
text-align: left;
|
||||
word-break: break-all;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.btn_box {
|
||||
display: flex;
|
||||
align-content: center;
|
||||
justify-content: space-around;
|
||||
.cancel_btn {
|
||||
border-radius: 30rpx;
|
||||
background-color: #f4f4f4;
|
||||
font-size: 26rpx;
|
||||
width: 200rpx;
|
||||
text-align: center;
|
||||
color: black;
|
||||
line-height: 66rpx;
|
||||
}
|
||||
.confirm_btn {
|
||||
border-radius: 30rpx;
|
||||
background-color: #fcbd00;
|
||||
color: white;
|
||||
font-size: 26rpx;
|
||||
line-height: 66rpx;
|
||||
text-align: center;
|
||||
}
|
||||
button {
|
||||
border: none;
|
||||
width: 200rpx;
|
||||
font-size: 26rpx;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .placeholder-class {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
</style>
|
||||
73
src/pages/login/protocol.vue
Normal file
73
src/pages/login/protocol.vue
Normal file
@@ -0,0 +1,73 @@
|
||||
<template>
|
||||
<view class="page_class" :style="{ paddingTop: `${getNavHeightCss()}px` }">
|
||||
<view class="top_nav">
|
||||
<nav-bar background-color="#fff" @leftClick="goBack">
|
||||
<template #title>
|
||||
<text>{{ titleType[title] }}</text>
|
||||
</template>
|
||||
</nav-bar>
|
||||
</view>
|
||||
<view class="content">
|
||||
<rich-text :nodes="formatHtmlContent(content)"></rich-text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import userApi from '@/request/module/userApi'
|
||||
import { get } from '@/request'
|
||||
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
content: '',
|
||||
protocolCheck: false,
|
||||
titleType: {
|
||||
privacy: '隐私协议',
|
||||
user: '用户协议'
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (options?.type) {
|
||||
this.title = options.type
|
||||
this.getDetail(options.typeId)
|
||||
}
|
||||
},
|
||||
onReachBottom() {},
|
||||
methods: {
|
||||
async getDetail(type) {
|
||||
const res = await get({
|
||||
url: userApi.agreement,
|
||||
data: { type }
|
||||
})
|
||||
if (res) {
|
||||
this.content = res.data.content
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.page_class {
|
||||
background-color: white;
|
||||
.top_nav {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-bottom: 1rpx solid #e5e6eb;
|
||||
.nav_box {
|
||||
width: 100%;
|
||||
padding: 0 30rpx;
|
||||
margin-top: -215rpx;
|
||||
}
|
||||
}
|
||||
.content {
|
||||
word-break: break-all;
|
||||
padding: 40rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
76
src/pages/mine/index.vue
Normal file
76
src/pages/mine/index.vue
Normal file
@@ -0,0 +1,76 @@
|
||||
<template>
|
||||
<view class="page_class">
|
||||
<nav-bar :showBack="false">
|
||||
<template #title>
|
||||
<text>我的</text>
|
||||
</template>
|
||||
</nav-bar>
|
||||
<double-confirm ref="bookingPopup" title="确定要退出登录吗?" cancelText="取消" confirmText="确定" @confirm="confirmOutLogin" />
|
||||
<tab-bar :pagePath="'/pages/mine/index'"></tab-bar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import DoubleConfirm from '@/components/doubleConfirm/index.vue'
|
||||
import { mobileFormat } from '@/utils/util'
|
||||
|
||||
export default {
|
||||
name: 'Mine',
|
||||
components: { DoubleConfirm },
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
info: (state) => state.UserStore.userInfo
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
this.getUserInfoData()
|
||||
},
|
||||
methods: {
|
||||
mobileFormat,
|
||||
async getUserInfoData() {
|
||||
// const result = await getUserInfo()
|
||||
// if (result?.data) {
|
||||
// await store.dispatch('UserStore/setUserInfo', result.data)
|
||||
// }
|
||||
},
|
||||
async confirmOutLogin() {
|
||||
const result = await logout()
|
||||
|
||||
if (result) {
|
||||
uni.clearStorageSync()
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/index'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/static/style/public';
|
||||
.page_class {
|
||||
width: 100%;
|
||||
|
||||
.top_header {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 500rpx;
|
||||
z-index: 0;
|
||||
|
||||
&_image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
23
src/pages/webView/index.vue
Normal file
23
src/pages/webView/index.vue
Normal file
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<web-view :src="url" allow :title="title" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'cusWebView',
|
||||
data() {
|
||||
return {
|
||||
url: '',
|
||||
title: ''
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
this.url = decodeURIComponent(options?.url)
|
||||
},
|
||||
onReady() {
|
||||
uni.setNavigationBarTitle({
|
||||
title: this.title
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user