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',
|
path: 'index',
|
||||||
aliasPath: '/statement',
|
aliasPath: '/statement',
|
||||||
style: {
|
style: {
|
||||||
navigationBarTitleText: '产品服务协议',
|
navigationBarTitleText: '',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,9 @@ import { appName } from '@/configs/index'
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
shareAppMessageProps: {},
|
shareAppMessageProps: {
|
||||||
|
imageUrl: 'https://pei-zhen.oss-cn-shanghai.aliyuncs.com/5531711684145_.pic.jpg',
|
||||||
|
},
|
||||||
shareTimelineProps: {},
|
shareTimelineProps: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@
|
||||||
"path": "index",
|
"path": "index",
|
||||||
"aliasPath": "/statement",
|
"aliasPath": "/statement",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "产品服务协议"
|
"navigationBarTitleText": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
width="100rpx"
|
width="100rpx"
|
||||||
height="100rpx"
|
height="100rpx"
|
||||||
:duration="100"
|
:duration="100"
|
||||||
:src="$assets(listItem.icon)"
|
:src="item.iconPath || $assets(listItem.icon)"
|
||||||
/>
|
/>
|
||||||
<text class="text-28rpx !font-normal mt-12rpx mb-34rpx text-#333">{{
|
<text class="text-28rpx !font-normal mt-12rpx mb-34rpx text-#333">{{
|
||||||
listItem.title
|
listItem.title
|
||||||
|
|
@ -93,6 +93,7 @@ import Order from '../order/index.vue'
|
||||||
|
|
||||||
const { $Router, $api, $store } = getCurrentInstance().proxy
|
const { $Router, $api, $store } = getCurrentInstance().proxy
|
||||||
const userRole = computed(() => $store.user.userInfo.roleName ?? 'simple')
|
const userRole = computed(() => $store.user.userInfo.roleName ?? 'simple')
|
||||||
|
const isLogin = computed(() => !!$store.user.token)
|
||||||
const searchVal = ref('')
|
const searchVal = ref('')
|
||||||
const swiperList = ref([])
|
const swiperList = ref([])
|
||||||
// {
|
// {
|
||||||
|
|
@ -169,10 +170,29 @@ const gridList = ref([
|
||||||
title: '在线咨询',
|
title: '在线咨询',
|
||||||
icon: '/home-icon/h-icon-8.png',
|
icon: '/home-icon/h-icon-8.png',
|
||||||
path: ''
|
path: ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '成为陪诊师',
|
||||||
|
// icon: '/personal/qiehuan.png',
|
||||||
|
iconPath: 'https://pei-zhen.oss-cn-shanghai.aliyuncs.com/h-icon-11.png',
|
||||||
|
path: ''
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
const handleGridClick = (path, query = {}) => {
|
const handleGridClick = (path, query = {}) => {
|
||||||
|
if (!isLogin.value) {
|
||||||
|
$dialog('请先登录', {
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonText: '去登录',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
confirmColor: '#FF8CA6'
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
$Router.push('/personal')
|
||||||
|
})
|
||||||
|
.catch(() => '')
|
||||||
|
return
|
||||||
|
}
|
||||||
if (path) {
|
if (path) {
|
||||||
$Router.push({
|
$Router.push({
|
||||||
path,
|
path,
|
||||||
|
|
|
||||||
|
|
@ -302,7 +302,7 @@ onShow(() => {
|
||||||
confirmColor: '#FF8CA6'
|
confirmColor: '#FF8CA6'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// $Router.push('/personal')
|
return $Router.push('/personal')
|
||||||
$store.user.login().then((user) => {
|
$store.user.login().then((user) => {
|
||||||
// $store.user.setUserInfo(user)
|
// $store.user.setUserInfo(user)
|
||||||
!user.nickName
|
!user.nickName
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<button
|
<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"
|
open-type="contact"
|
||||||
></button>
|
></button>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -138,6 +138,50 @@
|
||||||
</view>
|
</view>
|
||||||
</u-modal>
|
</u-modal>
|
||||||
</view>
|
</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 />
|
<tabbar />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -148,6 +192,8 @@ import { onShow } from '@dcloudio/uni-app'
|
||||||
const instance = getCurrentInstance()
|
const instance = getCurrentInstance()
|
||||||
const { $api, $store, $Router, $loading, $dialog, $toast, $u } = instance.proxy
|
const { $api, $store, $Router, $loading, $dialog, $toast, $u } = instance.proxy
|
||||||
|
|
||||||
|
const show = ref(false)
|
||||||
|
const checked = ref([false])
|
||||||
const userStore = $store.user
|
const userStore = $store.user
|
||||||
const isLogin = computed(() => !!$store.user.token)
|
const isLogin = computed(() => !!$store.user.token)
|
||||||
const userInfo = computed(() => $store.user.userInfo)
|
const userInfo = computed(() => $store.user.userInfo)
|
||||||
|
|
@ -193,13 +239,17 @@ const listConst = [
|
||||||
{
|
{
|
||||||
icon: '/personal/guanyu.png',
|
icon: '/personal/guanyu.png',
|
||||||
text: '关于我们',
|
text: '关于我们',
|
||||||
path: '/pages/contact/index'
|
// path: '/pages/contact/index'
|
||||||
},
|
path: '/pages/statement/index',
|
||||||
{
|
query: {
|
||||||
icon: '/personal/lianxi.png',
|
type: 100
|
||||||
text: '帮助中心',
|
}
|
||||||
path: '/pages/contact/index'
|
|
||||||
}
|
}
|
||||||
|
// {
|
||||||
|
// icon: '/personal/lianxi.png',
|
||||||
|
// text: '帮助中心',
|
||||||
|
// path: '/pages/contact/index'
|
||||||
|
// }
|
||||||
]
|
]
|
||||||
const menuList = ref([])
|
const menuList = ref([])
|
||||||
const cashModel = 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(() => {
|
watchEffect(() => {
|
||||||
const { roleName, roleList = [] } = userInfo.value
|
const { roleName, roleList = [] } = userInfo.value
|
||||||
list.simple[1].text = roleList.includes('common') ? '切换身份' : '成为陪诊师'
|
list.simple[1].text = roleList.includes('common') ? '切换身份' : '成为陪诊师'
|
||||||
|
|
@ -240,6 +294,27 @@ watchEffect(() => {
|
||||||
|
|
||||||
const handleInfo = async (item) => {
|
const handleInfo = async (item) => {
|
||||||
const { roleName, roleList = [] } = userInfo.value
|
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 (
|
if (
|
||||||
!item.path ||
|
!item.path ||
|
||||||
(item.path === '/pages/other/switch' && roleList.includes('common'))
|
(item.path === '/pages/other/switch' && roleList.includes('common'))
|
||||||
|
|
@ -304,21 +379,26 @@ const handleWithdraw = async () => {
|
||||||
|
|
||||||
const handleLogin = async () => {
|
const handleLogin = async () => {
|
||||||
if (!isLogin.value) {
|
if (!isLogin.value) {
|
||||||
$loading(true)
|
show.value = true
|
||||||
userStore.login().then((user) => {
|
|
||||||
$loading(false)
|
|
||||||
!user.nickName
|
|
||||||
? $Router.push({
|
|
||||||
path: '/pages/other/edit-userinfo'
|
|
||||||
})
|
|
||||||
: userStore.setUserInfo(user)
|
|
||||||
})
|
|
||||||
} else
|
} else
|
||||||
$Router.push({
|
$Router.push({
|
||||||
path: '/pages/other/edit-userinfo'
|
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 loading = ref(true)
|
||||||
const getUserInfo = async () => {
|
const getUserInfo = async () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
@ -335,6 +415,10 @@ const getUserInfo = async () => {
|
||||||
} else userStore.logout()
|
} else userStore.logout()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const goStatement = (type) => {
|
||||||
|
$Router.push('/pages/statement/index?type=' + type)
|
||||||
|
}
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
getUserInfo()
|
getUserInfo()
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
activeColor="#FF8CA6"
|
activeColor="#FF8CA6"
|
||||||
shape="square"
|
shape="square"
|
||||||
placement="row"
|
placement="row"
|
||||||
:disabled="model.status === 0"
|
:disabled="model.status === 0"
|
||||||
>
|
>
|
||||||
<u-radio name="0" label="男"></u-radio>
|
<u-radio name="0" label="男"></u-radio>
|
||||||
<u-radio name="1" label="女" class="ml-50rpx"></u-radio>
|
<u-radio name="1" label="女" class="ml-50rpx"></u-radio>
|
||||||
|
|
@ -51,7 +51,7 @@
|
||||||
placeholder=""
|
placeholder=""
|
||||||
maxlength="300"
|
maxlength="300"
|
||||||
:autoHeight="false"
|
:autoHeight="false"
|
||||||
:disabled="model.status === 0"
|
:disabled="model.status === 0"
|
||||||
/>
|
/>
|
||||||
<view class="mt-32rpx mb-20rpx text-28rpx">
|
<view class="mt-32rpx mb-20rpx text-28rpx">
|
||||||
<view class=""
|
<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"
|
class="fixed bg-#fff bottom-0 pb-8 left-0 right-0 text-white pt-12rpx border-t-1px border-solid border-#E5E5E5"
|
||||||
><view
|
><view
|
||||||
@click="$u.throttle(handleSubmit, 1000)"
|
@click="$u.throttle(handleSubmit, 1000)"
|
||||||
class=" rounded-24rpx w-660rpx h-80rpx text-center leading-80rpx hover:shadow-md mx-auto"
|
class="rounded-24rpx w-660rpx h-80rpx text-center leading-80rpx hover:shadow-md mx-auto"
|
||||||
:class="model.status === 0 ? 'bg-#ccc' : 'bg-#FF8CA6'"
|
:class="model.status === 0 ? 'bg-#ccc' : 'bg-#FF8CA6'"
|
||||||
>{{model.status === 0 ? '申请中' : '提交申请'}}</view
|
>{{ model.status === 0 ? '申请中' : '提交申请' }}</view
|
||||||
></view
|
></view
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -261,13 +261,13 @@ const init = async () => {
|
||||||
const images = res.doctor.images.split(',')
|
const images = res.doctor.images.split(',')
|
||||||
imageObj.value.ren = images[0]
|
imageObj.value.ren = images[0]
|
||||||
imageObj.value.fan = images[1]
|
imageObj.value.fan = images[1]
|
||||||
agreed.value = true
|
agreed.value = true
|
||||||
}
|
}
|
||||||
$loading(false)
|
$loading(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleChooseImage = async (key) => {
|
const handleChooseImage = async (key) => {
|
||||||
if(model.value.status === 0) return
|
if (model.value.status === 0) return
|
||||||
let filePath = ''
|
let filePath = ''
|
||||||
try {
|
try {
|
||||||
const ret = await chooseImage({
|
const ret = await chooseImage({
|
||||||
|
|
|
||||||
|
|
@ -1,20 +1,41 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="h-full p-4">
|
<view class="h-full p-4">
|
||||||
<view class="space-y-4">
|
<view class="space-y-4 pb-8">
|
||||||
<view class=""> 项目 </view>
|
<u-parse :content="content"></u-parse>
|
||||||
<view class=""> 使用本项目的用户需要遵守如下条款: </view>
|
|
||||||
<view class="">
|
|
||||||
特此授权,免费得以任何目的的使用、复制、修改、合并、出版、发行、散布、再授权及贩售软件及软件的副本,及授予前述权利的许可,无论是否为商业目的。
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
上述软件是按「原样」提供,作者不作任何明示或暗示的保证,包括但不限于对适销性和特定目的的适用性的保证。在任何情况下,无论是在合同诉讼、侵权行为或其它方面,作者都不对因使用本软件或其中所包含的内容所产生的任何直接、间接、偶然、特殊及后果性损害(包括但不限于替代商品或服务的采购、使用、数据或利润损失、或业务中断)承担责任。
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script setup>
|
||||||
export default {}
|
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>
|
</script>
|
||||||
|
|
||||||
<style></style>
|
<style></style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue