fix bug
parent
99cdc25e80
commit
23b0c51460
21
LICENSE
21
LICENSE
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2023 viarotel
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
|
@ -146,7 +146,7 @@ export default defineUniPages({
|
|||
path: 'index',
|
||||
aliasPath: '/statement',
|
||||
style: {
|
||||
navigationBarTitleText: '产品服务协议',
|
||||
navigationBarTitleText: '',
|
||||
},
|
||||
},
|
||||
],
|
||||
|
|
|
|||
|
|
@ -3,7 +3,9 @@ import { appName } from '@/configs/index'
|
|||
export default {
|
||||
data () {
|
||||
return {
|
||||
shareAppMessageProps: {},
|
||||
shareAppMessageProps: {
|
||||
imageUrl: 'https://pei-zhen.oss-cn-shanghai.aliyuncs.com/5531711684145_.pic.jpg',
|
||||
},
|
||||
shareTimelineProps: {},
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@
|
|||
"path": "index",
|
||||
"aliasPath": "/statement",
|
||||
"style": {
|
||||
"navigationBarTitleText": "产品服务协议"
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
width="100rpx"
|
||||
height="100rpx"
|
||||
:duration="100"
|
||||
:src="$assets(listItem.icon)"
|
||||
:src="item.iconPath || $assets(listItem.icon)"
|
||||
/>
|
||||
<text class="text-28rpx !font-normal mt-12rpx mb-34rpx text-#333">{{
|
||||
listItem.title
|
||||
|
|
@ -93,6 +93,7 @@ import Order from '../order/index.vue'
|
|||
|
||||
const { $Router, $api, $store } = getCurrentInstance().proxy
|
||||
const userRole = computed(() => $store.user.userInfo.roleName ?? 'simple')
|
||||
const isLogin = computed(() => !!$store.user.token)
|
||||
const searchVal = ref('')
|
||||
const swiperList = ref([])
|
||||
// {
|
||||
|
|
@ -169,10 +170,29 @@ const gridList = ref([
|
|||
title: '在线咨询',
|
||||
icon: '/home-icon/h-icon-8.png',
|
||||
path: ''
|
||||
},
|
||||
{
|
||||
title: '成为陪诊师',
|
||||
// icon: '/personal/qiehuan.png',
|
||||
iconPath: 'https://pei-zhen.oss-cn-shanghai.aliyuncs.com/h-icon-11.png',
|
||||
path: ''
|
||||
}
|
||||
])
|
||||
|
||||
const handleGridClick = (path, query = {}) => {
|
||||
if (!isLogin.value) {
|
||||
$dialog('请先登录', {
|
||||
showCancelButton: true,
|
||||
confirmButtonText: '去登录',
|
||||
cancelButtonText: '取消',
|
||||
confirmColor: '#FF8CA6'
|
||||
})
|
||||
.then(() => {
|
||||
$Router.push('/personal')
|
||||
})
|
||||
.catch(() => '')
|
||||
return
|
||||
}
|
||||
if (path) {
|
||||
$Router.push({
|
||||
path,
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@ onShow(() => {
|
|||
confirmColor: '#FF8CA6'
|
||||
})
|
||||
.then(() => {
|
||||
// $Router.push('/personal')
|
||||
return $Router.push('/personal')
|
||||
$store.user.login().then((user) => {
|
||||
// $store.user.setUserInfo(user)
|
||||
!user.nickName
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<button
|
||||
class="absolute bottom-224rpx bg-transparent border-transparent z-2 w-660rpx h-90rpx"
|
||||
class="absolute top-224rpx bg-transparent :hover:bg-transparent border-transparent z-2 w-660rpx h-100rpx"
|
||||
open-type="contact"
|
||||
></button>
|
||||
</view>
|
||||
|
|
@ -138,6 +138,50 @@
|
|||
</view>
|
||||
</u-modal>
|
||||
</view>
|
||||
<u-popup
|
||||
:show="show"
|
||||
:round="10"
|
||||
mode="center"
|
||||
:safeAreaInsetBottom="false"
|
||||
:customStyle="{ width: '86%' }"
|
||||
>
|
||||
<view class="w-full px-30rpx py-50rpx">
|
||||
<view class="mb-4"></view>
|
||||
<!-- <text>出淤泥而不染,濯清涟而不妖</text> -->
|
||||
<view class="flex items-start">
|
||||
<u-checkbox-group v-model="checked" @change="checkboxChange">
|
||||
<u-checkbox activeColor="#FF8CA6" :name="true"> </u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<view class="pt-6rpx">
|
||||
<text @click="checked[0] = !checked[0]">我已阅读并同意</text>
|
||||
<text class="text-#FF8CA6" @click="goStatement(1)">《用户协议》</text>
|
||||
<text>、</text>
|
||||
<text class="text-#FF8CA6" @click="goStatement(2)">《隐私协议》</text>
|
||||
<text>、</text>
|
||||
<text class="text-#FF8CA6" @click="goStatement(3)"
|
||||
>《风险告知及免责协议》</text
|
||||
>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex justify-between px-50rpx mt-50rpx">
|
||||
<u-button
|
||||
customStyle="width: 200rpx;border-radius:24rpx;"
|
||||
type="primary"
|
||||
:plain="true"
|
||||
text="取消"
|
||||
@click="show = false"
|
||||
></u-button>
|
||||
<u-button
|
||||
customStyle="width: 200rpx;border-radius:24rpx;"
|
||||
class="!w-80rpx"
|
||||
type="primary"
|
||||
:disabled="checked[0] === false"
|
||||
text="登录"
|
||||
@click="login"
|
||||
></u-button>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<tabbar />
|
||||
</template>
|
||||
|
||||
|
|
@ -148,6 +192,8 @@ import { onShow } from '@dcloudio/uni-app'
|
|||
const instance = getCurrentInstance()
|
||||
const { $api, $store, $Router, $loading, $dialog, $toast, $u } = instance.proxy
|
||||
|
||||
const show = ref(false)
|
||||
const checked = ref([false])
|
||||
const userStore = $store.user
|
||||
const isLogin = computed(() => !!$store.user.token)
|
||||
const userInfo = computed(() => $store.user.userInfo)
|
||||
|
|
@ -193,13 +239,17 @@ const listConst = [
|
|||
{
|
||||
icon: '/personal/guanyu.png',
|
||||
text: '关于我们',
|
||||
path: '/pages/contact/index'
|
||||
},
|
||||
{
|
||||
icon: '/personal/lianxi.png',
|
||||
text: '帮助中心',
|
||||
path: '/pages/contact/index'
|
||||
// path: '/pages/contact/index'
|
||||
path: '/pages/statement/index',
|
||||
query: {
|
||||
type: 100
|
||||
}
|
||||
}
|
||||
// {
|
||||
// icon: '/personal/lianxi.png',
|
||||
// text: '帮助中心',
|
||||
// path: '/pages/contact/index'
|
||||
// }
|
||||
]
|
||||
const menuList = ref([])
|
||||
const cashModel = ref({
|
||||
|
|
@ -232,6 +282,10 @@ const cashItemList = [
|
|||
}
|
||||
]
|
||||
|
||||
const checkboxChange = (n) => {
|
||||
console.log('🚀 ~ file: index.vue:294 ~ n:', n)
|
||||
checked.value = n
|
||||
}
|
||||
watchEffect(() => {
|
||||
const { roleName, roleList = [] } = userInfo.value
|
||||
list.simple[1].text = roleList.includes('common') ? '切换身份' : '成为陪诊师'
|
||||
|
|
@ -240,6 +294,27 @@ watchEffect(() => {
|
|||
|
||||
const handleInfo = async (item) => {
|
||||
const { roleName, roleList = [] } = userInfo.value
|
||||
if (
|
||||
!isLogin.value &&
|
||||
['/pages/other/switch', '/pages/other/income-details', '/order'].includes(
|
||||
item.path
|
||||
)
|
||||
) {
|
||||
// $dialog('请先登录', {
|
||||
// showCancelButton: true,
|
||||
// confirmButtonText: '去登录',
|
||||
// cancelButtonText: '取消',
|
||||
// confirmColor: '#FF8CA6'
|
||||
// })
|
||||
// .then(() => {})
|
||||
// .catch(() => '')
|
||||
uni.showToast({
|
||||
title: '请先登录',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
return
|
||||
}
|
||||
if (
|
||||
!item.path ||
|
||||
(item.path === '/pages/other/switch' && roleList.includes('common'))
|
||||
|
|
@ -304,21 +379,26 @@ const handleWithdraw = async () => {
|
|||
|
||||
const handleLogin = async () => {
|
||||
if (!isLogin.value) {
|
||||
$loading(true)
|
||||
userStore.login().then((user) => {
|
||||
$loading(false)
|
||||
!user.nickName
|
||||
? $Router.push({
|
||||
path: '/pages/other/edit-userinfo'
|
||||
})
|
||||
: userStore.setUserInfo(user)
|
||||
})
|
||||
show.value = true
|
||||
} else
|
||||
$Router.push({
|
||||
path: '/pages/other/edit-userinfo'
|
||||
})
|
||||
}
|
||||
|
||||
const login = () => {
|
||||
$loading(true)
|
||||
userStore.login().then((user) => {
|
||||
$loading(false)
|
||||
show.value = false
|
||||
!user.nickName
|
||||
? $Router.push({
|
||||
path: '/pages/other/edit-userinfo'
|
||||
})
|
||||
: userStore.setUserInfo(user)
|
||||
})
|
||||
}
|
||||
|
||||
const loading = ref(true)
|
||||
const getUserInfo = async () => {
|
||||
setTimeout(() => {
|
||||
|
|
@ -335,6 +415,10 @@ const getUserInfo = async () => {
|
|||
} else userStore.logout()
|
||||
}
|
||||
|
||||
const goStatement = (type) => {
|
||||
$Router.push('/pages/statement/index?type=' + type)
|
||||
}
|
||||
|
||||
onShow(() => {
|
||||
getUserInfo()
|
||||
})
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
activeColor="#FF8CA6"
|
||||
shape="square"
|
||||
placement="row"
|
||||
:disabled="model.status === 0"
|
||||
:disabled="model.status === 0"
|
||||
>
|
||||
<u-radio name="0" label="男"></u-radio>
|
||||
<u-radio name="1" label="女" class="ml-50rpx"></u-radio>
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
placeholder=""
|
||||
maxlength="300"
|
||||
:autoHeight="false"
|
||||
:disabled="model.status === 0"
|
||||
:disabled="model.status === 0"
|
||||
/>
|
||||
<view class="mt-32rpx mb-20rpx text-28rpx">
|
||||
<view class=""
|
||||
|
|
@ -119,9 +119,9 @@
|
|||
class="fixed bg-#fff bottom-0 pb-8 left-0 right-0 text-white pt-12rpx border-t-1px border-solid border-#E5E5E5"
|
||||
><view
|
||||
@click="$u.throttle(handleSubmit, 1000)"
|
||||
class=" rounded-24rpx w-660rpx h-80rpx text-center leading-80rpx hover:shadow-md mx-auto"
|
||||
:class="model.status === 0 ? 'bg-#ccc' : 'bg-#FF8CA6'"
|
||||
>{{model.status === 0 ? '申请中' : '提交申请'}}</view
|
||||
class="rounded-24rpx w-660rpx h-80rpx text-center leading-80rpx hover:shadow-md mx-auto"
|
||||
:class="model.status === 0 ? 'bg-#ccc' : 'bg-#FF8CA6'"
|
||||
>{{ model.status === 0 ? '申请中' : '提交申请' }}</view
|
||||
></view
|
||||
>
|
||||
</view>
|
||||
|
|
@ -261,13 +261,13 @@ const init = async () => {
|
|||
const images = res.doctor.images.split(',')
|
||||
imageObj.value.ren = images[0]
|
||||
imageObj.value.fan = images[1]
|
||||
agreed.value = true
|
||||
agreed.value = true
|
||||
}
|
||||
$loading(false)
|
||||
}
|
||||
|
||||
const handleChooseImage = async (key) => {
|
||||
if(model.value.status === 0) return
|
||||
if (model.value.status === 0) return
|
||||
let filePath = ''
|
||||
try {
|
||||
const ret = await chooseImage({
|
||||
|
|
|
|||
|
|
@ -1,20 +1,41 @@
|
|||
<template>
|
||||
<view class="h-full p-4">
|
||||
<view class="space-y-4">
|
||||
<view class=""> 项目 </view>
|
||||
<view class=""> 使用本项目的用户需要遵守如下条款: </view>
|
||||
<view class="">
|
||||
特此授权,免费得以任何目的的使用、复制、修改、合并、出版、发行、散布、再授权及贩售软件及软件的副本,及授予前述权利的许可,无论是否为商业目的。
|
||||
</view>
|
||||
<view class="">
|
||||
上述软件是按「原样」提供,作者不作任何明示或暗示的保证,包括但不限于对适销性和特定目的的适用性的保证。在任何情况下,无论是在合同诉讼、侵权行为或其它方面,作者都不对因使用本软件或其中所包含的内容所产生的任何直接、间接、偶然、特殊及后果性损害(包括但不限于替代商品或服务的采购、使用、数据或利润损失、或业务中断)承担责任。
|
||||
</view>
|
||||
<view class="space-y-4 pb-8">
|
||||
<u-parse :content="content"></u-parse>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {}
|
||||
<script setup>
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import request from '@uni-helper/uni-network'
|
||||
const content = ref('')
|
||||
|
||||
const getConter = (type) => {
|
||||
request({
|
||||
url:
|
||||
`https://pei-zhen.oss-cn-shanghai.aliyuncs.com/protocol/${type}.txt?t=` +
|
||||
Date.now(),
|
||||
method: 'GET',
|
||||
dataType: 'text',
|
||||
responseType: 'text'
|
||||
}).then((res) => {
|
||||
content.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
const titObj = {
|
||||
1: '用户协议',
|
||||
2: '隐私协议',
|
||||
3: '风险告知及免责协议',
|
||||
100: '关于我们'
|
||||
}
|
||||
onLoad(({ type = 1 }) => {
|
||||
uni.setNavigationBarTitle({
|
||||
title: titObj[type]
|
||||
})
|
||||
getConter(type)
|
||||
})
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue