main
parent
c67f0d09c5
commit
9cc39b2054
|
@ -27,6 +27,14 @@ export const fetchNav = async () => {
|
|||
export const fetchCon = async (params) => {
|
||||
return await http.get('/api/health/share/information/v1/findInformationList', params)
|
||||
}
|
||||
// 咨询收藏
|
||||
export const fetchZxLike = async (params) => {
|
||||
return await http.post('/api/health/user/verify/v1/addInfoCollection', params)
|
||||
}
|
||||
// 取消咨询收藏
|
||||
export const fetchZxNoLike = async (params) => {
|
||||
return await http.delete('/api/health/user/verify/v1/cancelInfoCollection', params)
|
||||
}
|
||||
// 首页跳转常见药品标题--根据药品类目查询查询常见药品
|
||||
export const fetchYao = async (params) => {
|
||||
return await http.get('/api/health/share/knowledgeBase/v1/findDrugsKnowledgeList', params)
|
||||
|
@ -55,6 +63,12 @@ export const fetchConsult = async (infoId) => {
|
|||
export const fetchVidio = async (params) => {
|
||||
return await http.get('/api//health/user/video/v1/findVideoVoList', params)
|
||||
}
|
||||
// 视频科目
|
||||
export const fetchVidioNav = async () => {
|
||||
return await http.get('/api/health/user/video/v1/findVideoCategoryList')
|
||||
}
|
||||
|
||||
|
||||
// 热门搜索const---热门搜索
|
||||
export const fetchHotSearch = async () => {
|
||||
return await http.get('/api/health/share/v1/popularSearch')
|
||||
|
@ -200,8 +214,8 @@ export const fetchImage = async (params) => {
|
|||
})
|
||||
}
|
||||
// 删除文档
|
||||
export const fetchDelete=async(params)=>{
|
||||
return await http.delete('/api/health/user/verify/v1/deleteUserArchives',params)
|
||||
export const fetchDelete = async (params) => {
|
||||
return await http.delete('/api/health/user/verify/v1/deleteUserArchives', params)
|
||||
}
|
||||
// 编辑文档
|
||||
export const fetchEditProfile = async (params) => {
|
||||
|
@ -217,27 +231,67 @@ export const fetchGetProfile = async (params) => {
|
|||
}
|
||||
// 收藏病友圈
|
||||
|
||||
export const fetchPatientSave=async(params)=>{
|
||||
return await http.post('/api/health/user/verify/v1/addUserSickCollection',params)
|
||||
export const fetchPatientSave = async (params) => {
|
||||
return await http.post('/api/health/user/verify/v1/addUserSickCollection', params)
|
||||
}
|
||||
//取消 收藏病友圈
|
||||
|
||||
export const fetchPatientNoSave=async(params)=>{
|
||||
return await http.delete('/api/health/user/verify/v1/cancelSickCollection',params)
|
||||
export const fetchPatientNoSave = async (params) => {
|
||||
return await http.delete('/api/health/user/verify/v1/cancelSickCollection', params)
|
||||
}
|
||||
// 查看收藏病友圈
|
||||
export const fetchSeeCirle=async(params)=>{
|
||||
return await http.get('/api/health/user/verify/v1/findUserSickCollectionList',params)
|
||||
|
||||
// 提现记录 网路异常?
|
||||
export const fetchGetList = async (params) => {
|
||||
return await http.get('/api/health/user/verify/v1/findUserDrawRecordList', params)
|
||||
}
|
||||
// 查询用户id信息
|
||||
export const fetchIdUser = async () => {
|
||||
return await http.get('/api/health/user/verify/v1/getUserInfoById')
|
||||
}
|
||||
// 修改昵称
|
||||
export const fetchNick = async (params) => {
|
||||
return await http.put('/api/health/user/verify/v1/modifyNickName', params)
|
||||
}
|
||||
// 患者发送消息
|
||||
export const fetchMessage = async (params) => {
|
||||
return await http.post('/api/health/user/inquiry/verify/v1/pushMessage', params)
|
||||
}
|
||||
// 查询聊天信息列表
|
||||
export const fetchChatList = async (params) => {
|
||||
return await http.get('/api/health/user/inquiry/verify/v1/findInquiryRecordList', params)
|
||||
}
|
||||
// 视频收藏接口
|
||||
export const fetchVideoLike = async (params) => {
|
||||
return await http.post('/api/health/user/video/verify/v1/addUserVideoCollection', params)
|
||||
}
|
||||
// 我的收藏
|
||||
|
||||
// 查看收藏咨询
|
||||
export const fetchSeeAsk=async(params)=>{
|
||||
return await http.get('/api/health/user/verify/v1/findVideoCollectionList',params)
|
||||
export const fetchSeeAsk = async (params) => {
|
||||
return await http.get('/api/health/user/verify/v1/findUserInfoCollectionList', params)
|
||||
}
|
||||
// 查看收藏视屏
|
||||
export const fetchSeeVideo=async(params)=>{
|
||||
return await http.get('/api/health/user/verify/v1/findVideoCollectionList',params)
|
||||
export const fetchSeeVideo = async (params) => {
|
||||
return await http.get('/api/health/user/verify/v1/findVideoCollectionList', params)
|
||||
}
|
||||
// 提现记录 网路异常?
|
||||
export const fetchGetList=async(params)=>{
|
||||
return await http.get('/api/health/user/verify/v1/findUserDrawRecordList',params)
|
||||
// 查看收藏病友圈
|
||||
export const fetchSeeCirle = async (params) => {
|
||||
return await http.get('/api/health/user/verify/v1/findUserSickCollectionList', params)
|
||||
}
|
||||
// 绑定身份证
|
||||
export const fetchPerson = async (params) => {
|
||||
return await http.post('/api/health/user/verify/v1/bindUserIdCard', params, {
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
})
|
||||
}
|
||||
// 修改密码
|
||||
|
||||
export const fetchUserPwd = async (params) => {
|
||||
return await http.put('/api/health/user/verify/v1/updateUserPwd', params)
|
||||
}
|
||||
// 关注医生列表
|
||||
export const fetchDoctorList = async (params) => {
|
||||
return await http.get('/api/health/user/verify/v1/findUserDoctorFollowList', params)
|
||||
}
|
|
@ -6,7 +6,7 @@ Vue.use(VueRouter)
|
|||
const routes = [
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/my/myLogin'
|
||||
redirect: '/home'
|
||||
},
|
||||
// -------------------------首页--------------------------
|
||||
// 一级home页面
|
||||
|
@ -41,7 +41,7 @@ const routes = [
|
|||
name: 'search',
|
||||
component: () => import('../views/home/search/search.vue')
|
||||
},
|
||||
{
|
||||
{
|
||||
path: 'new/:id/:code',
|
||||
name: 'new',
|
||||
component: () => import('../views/home/new/new.vue')
|
||||
|
@ -61,10 +61,15 @@ const routes = [
|
|||
name: 'consultationServer',
|
||||
component: () => import('../views/consultation/consultationServer/consultationServer.vue'),
|
||||
children: [{
|
||||
path: 'consultationChat',
|
||||
path: 'consultationChat/:doctorId/:recordId',
|
||||
name: 'consultationChat',
|
||||
component: () => import('../views/consultation/consultationServer/chat/chat.vue')
|
||||
},
|
||||
{
|
||||
path: 'historyChat',
|
||||
name: 'historyChat',
|
||||
component: () => import('../views/consultation/consultationServer/historyChat/historyChat.vue')
|
||||
},
|
||||
{
|
||||
path: 'consultationCommentList',
|
||||
name: 'consultationCommentList',
|
||||
|
@ -198,7 +203,7 @@ const routes = [
|
|||
{
|
||||
path: '/my',
|
||||
name: 'my',
|
||||
component:()=>import('../views/my/my.vue'),
|
||||
component: () => import('../views/my/my.vue'),
|
||||
children: [{
|
||||
path: 'myAdoptIdea',
|
||||
name: 'myAdoptIdea',
|
||||
|
@ -273,12 +278,12 @@ const routes = [
|
|||
{
|
||||
path: 'myProFile',
|
||||
name: 'myProFile',
|
||||
component:()=>import('../views/my/proFile/proFile.vue'),
|
||||
component: () => import('../views/my/proFile/proFile.vue'),
|
||||
children: [{
|
||||
path: 'myProFileAddModifyProfile',
|
||||
name: 'myProFileAddModifyProfile',
|
||||
component: () => import('../views/my/proFile/addModifyProfile/addModifyProfile.vue')
|
||||
},{
|
||||
}, {
|
||||
path: 'editProFile/:arr',
|
||||
name: 'editProFile',
|
||||
component: () => import('../views/my/proFile/editProFile/editProFile.vue')
|
||||
|
@ -302,6 +307,11 @@ const routes = [
|
|||
name: 'bindBankCard',
|
||||
component: () => import('../views/set/bindBankCard/bindBankCard.vue')
|
||||
},
|
||||
{
|
||||
path: 'ss',
|
||||
name: 'ss',
|
||||
component: () => import('../views/set/ss/ss.vue')
|
||||
},
|
||||
{
|
||||
path: 'bindConfirm',
|
||||
name: 'bindConfirm',
|
||||
|
@ -371,9 +381,10 @@ router.beforeEach((to, from, next) => {
|
|||
if (to.path === '/my/myLogin') {
|
||||
return next()
|
||||
}
|
||||
// if (!localStorage.getItem('token')) {
|
||||
// return next('/login')
|
||||
// }
|
||||
|
||||
if (!localStorage.getItem('userId')) {
|
||||
return next('/my/myLogin')
|
||||
}
|
||||
next()
|
||||
})
|
||||
export default router
|
||||
|
|
|
@ -1,13 +1,153 @@
|
|||
<template>
|
||||
<div>chat</div>
|
||||
<div>
|
||||
<MyTop> <template slot="collection">聊天室</template></MyTop>
|
||||
<div class="con">
|
||||
<div class="con-list" v-for="(v, i) in list" :key="i">
|
||||
<p>2023.10.27</p>
|
||||
<dl>
|
||||
<dd>{{ v.content }}</dd>
|
||||
<dt><img src="../../../../img/10.jpg" /></dt>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="send">
|
||||
<input placeholder="发送" v-model="value" /><button @click="getMessage">
|
||||
发送
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MyTop from "@/components/MyTop.vue";
|
||||
import { fetchRecord, fetchMessage, fetchChatList } from "@/api";
|
||||
export default {
|
||||
components: {
|
||||
MyTop,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
recordId: 0,
|
||||
doctorId: 0,
|
||||
value: "",
|
||||
list: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 当前id相关数据
|
||||
// async getGet() {
|
||||
// const resp = await fetchRecord();
|
||||
// console.log(resp);
|
||||
|
||||
}
|
||||
// this.recordId = resp.data.result.recordId;
|
||||
// this.doctorId = resp.data.result.doctorId;
|
||||
// // console.log( resp.data.result.recordId);
|
||||
// },
|
||||
// 发送消息
|
||||
async getMessage() {
|
||||
const resp = await fetchMessage({
|
||||
inquiryId: this.recordId,
|
||||
content: this.value,
|
||||
type: 1,
|
||||
doctorId: this.doctorId,
|
||||
});
|
||||
this.getChat();
|
||||
console.log(resp);
|
||||
},
|
||||
// 历史记录
|
||||
async getChat() {
|
||||
const resp = await fetchChatList({
|
||||
params: {
|
||||
inquiryId: this.recordId,
|
||||
page: 1,
|
||||
count: 5,
|
||||
},
|
||||
});
|
||||
console.log(resp);
|
||||
console.log(this.recordId);
|
||||
this.list = resp.data.result.reverse();
|
||||
},
|
||||
},
|
||||
created() {
|
||||
// this.getGet();
|
||||
// this.getChat();
|
||||
const { doctorId, recordId } = this.$route.params;
|
||||
console.log(doctorId, recordId);
|
||||
this.recordId = recordId * 1;
|
||||
this.doctorId = doctorId * 1;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.con {
|
||||
width: 100vw;
|
||||
height: 700px;
|
||||
// background-color: pink;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
.con-list {
|
||||
margin-top: 20px;
|
||||
// background-color: #ccc;
|
||||
height: 80px;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
// align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
p {
|
||||
height: 25px;
|
||||
// background-color: pink;
|
||||
}
|
||||
dl {
|
||||
// background-color: green;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: end;
|
||||
padding: 0 10px;
|
||||
dt {
|
||||
img {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
dd {
|
||||
flex: 1;
|
||||
margin: 0 2px;
|
||||
width: 50px;
|
||||
// line-height: px;
|
||||
height: 100%;
|
||||
// background-color: green;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: end;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.send {
|
||||
display: flex;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0%;
|
||||
align-items: center;
|
||||
height: 50px;
|
||||
width: 90%;
|
||||
margin-left: 5%;
|
||||
// background-color: green;
|
||||
margin-top: 20px;
|
||||
border: none;
|
||||
input {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
border: none;
|
||||
}
|
||||
button {
|
||||
width: 80px;
|
||||
height: 50px;
|
||||
}
|
||||
}
|
||||
</style>
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,131 @@
|
|||
<template>
|
||||
<div>
|
||||
<MyTop> <template slot="collection">聊天室</template></MyTop>
|
||||
<div class="con">
|
||||
<div class="con-list" v-for="(v, i) in list" :key="i">
|
||||
<p>2023.10.27 </p>
|
||||
<dl>
|
||||
<dd>{{ v.content }}</dd>
|
||||
<dt><img src="../../../../img/10.jpg" /></dt>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MyTop from "@/components/MyTop.vue";
|
||||
import { fetchRecord, fetchMessage, fetchChatList } from "@/api";
|
||||
export default {
|
||||
components: {
|
||||
MyTop,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
recordId: 0,
|
||||
doctorId: 0,
|
||||
value: "",
|
||||
list: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// 当前
|
||||
async getGet() {
|
||||
const resp = await fetchRecord();
|
||||
console.log(resp);
|
||||
this.recordId = resp.data.result.recordId;
|
||||
this.doctorId = resp.data.result.doctorId;
|
||||
},
|
||||
async getChat() {
|
||||
const resp = await fetchChatList({
|
||||
params: {
|
||||
inquiryId: this.recordId,
|
||||
page: 1,
|
||||
count: 5,
|
||||
},
|
||||
});
|
||||
console.log(resp);
|
||||
this.list = resp.data.result.reverse();
|
||||
},
|
||||
},
|
||||
created() {
|
||||
// this.getGet();
|
||||
this.getChat()
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.con {
|
||||
width: 100vw;
|
||||
height: 700px;
|
||||
// background-color: pink;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
.con-list {
|
||||
margin-top: 20px;
|
||||
// background-color: #ccc;
|
||||
height: 80px;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
// align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
p {
|
||||
height: 25px;
|
||||
// background-color: pink;
|
||||
}
|
||||
dl {
|
||||
// background-color: green;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: end;
|
||||
padding: 0 10px;
|
||||
dt {
|
||||
img {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
dd {
|
||||
flex: 1;
|
||||
margin: 0 2px;
|
||||
width: 50px;
|
||||
// line-height: px;
|
||||
height: 100%;
|
||||
// background-color: green;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: end;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.send {
|
||||
display: flex;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0%;
|
||||
align-items: center;
|
||||
height: 50px;
|
||||
width: 90%;
|
||||
margin-left: 5%;
|
||||
// background-color: green;
|
||||
margin-top: 20px;
|
||||
border: none;
|
||||
input {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
border: none;
|
||||
}
|
||||
button {
|
||||
width: 80px;
|
||||
height: 50px;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,9 +1,15 @@
|
|||
<template>
|
||||
<div>
|
||||
<div class="box">
|
||||
<h3>{{ title }}</h3>
|
||||
<div v-html="consult"></div>
|
||||
<img :src="xin" class="xin"/>
|
||||
<img :src="lianjie" class="lianjie"/>
|
||||
|
||||
<div class="fix">
|
||||
<div>
|
||||
<img :src="xinn" class="xinn" v-if="isLike" @click="handleLike" />
|
||||
<img :src="xin" class="xin" v-else @click="handleLike" />
|
||||
</div>
|
||||
|
||||
<div><img :src="lianjie" class="lianjie" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -11,7 +17,8 @@
|
|||
import xin from "@/assets/images/icon/common resource/xxhdpi/comment_list_icon_adoption_n.png";
|
||||
import xinn from "@/assets/images/icon/common resource/xxhdpi/comment_list_icon_adoption_s.png";
|
||||
import lianjie from "@/assets/images/icon/common resource/xxhdpi/common_button_share_n.png";
|
||||
import { fetchConsult } from "../../../api/index";
|
||||
import { fetchConsult, fetchZxLike, fetchZxNoLike } from "../../../api/index";
|
||||
import { Toast } from "vant";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -19,6 +26,9 @@ export default {
|
|||
xinn: xinn,
|
||||
lianjie: lianjie,
|
||||
consult: {},
|
||||
id: 0,
|
||||
isLike: false,
|
||||
title: "",
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -28,6 +38,21 @@ export default {
|
|||
const resp = await fetchConsult({ params: { infoId: this.id } });
|
||||
console.log(resp);
|
||||
this.consult = resp.data.result.content;
|
||||
this.id = resp.data.result.id;
|
||||
this.title = resp.data.result.title;
|
||||
},
|
||||
async handleLike() {
|
||||
if (this.isLike === false) {
|
||||
const resp = await fetchZxLike({ infoId: this.id });
|
||||
console.log(resp);
|
||||
Toast.success("收藏成功");
|
||||
this.isLike = true;
|
||||
} else {
|
||||
const resp = await fetchZxNoLike({ params: { infoId: this.id } });
|
||||
console.log(resp);
|
||||
Toast.success("取消收藏");
|
||||
this.isLike = false;
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
|
@ -39,17 +64,53 @@ export default {
|
|||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.xin{
|
||||
position: static;
|
||||
left: 200px;
|
||||
top: 200px;
|
||||
|
||||
<style scoped lang="scss">
|
||||
.box {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
// position: relative;
|
||||
h3{
|
||||
margin: 5px 0;
|
||||
}
|
||||
.lianjie{
|
||||
.fix {
|
||||
// position: absolute;
|
||||
position: fixed;
|
||||
right: 0;
|
||||
bottom: 100px;
|
||||
z-index: 100;
|
||||
right: 80px;
|
||||
bottom: 200px;
|
||||
width: 80px;
|
||||
height: 120px;
|
||||
// background-color: pink;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
.xin {
|
||||
width: 55px;
|
||||
height: 55px;
|
||||
background-color: #fff;
|
||||
border-radius: 50%;
|
||||
object-fit: contain;
|
||||
}
|
||||
div {
|
||||
width: 55px;
|
||||
border-radius: 50%;
|
||||
height: 55px;
|
||||
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
.lianjie {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
object-fit: cover;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,15 +1,154 @@
|
|||
<template>
|
||||
<div>
|
||||
attention
|
||||
<div class="box">
|
||||
<MyTop>
|
||||
<template slot="collection">我的关注</template>
|
||||
</MyTop>
|
||||
<div class="con">
|
||||
<dl class="dll" v-for="(v, i) in list" :key="i">
|
||||
<dt>
|
||||
<img :src="v.imagePic" />
|
||||
</dt>
|
||||
<dd>
|
||||
<p>
|
||||
{{ v.doctorName }}<span>{{ v.jobTitle }}</span>
|
||||
</p>
|
||||
<p>{{ v.inauguralHospital }}</p>
|
||||
<p><span>好评率:50%</span><span>好评率:50%</span></p>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
import MyTop from "@/components/MyTop.vue";
|
||||
import { fetchDoctorList } from "@/api";
|
||||
|
||||
}
|
||||
export default {
|
||||
components: {
|
||||
MyTop,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
page: 1,
|
||||
count: 5,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async getDoctorList() {
|
||||
const resp = await fetchDoctorList({
|
||||
params: { page: this.page, count: this.count },
|
||||
});
|
||||
this.list = resp.data.result;
|
||||
console.log(resp);
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getDoctorList();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style lang="scss" scoped>
|
||||
.box{
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
background-color: #eee;
|
||||
}
|
||||
.con {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
width: 100vw;
|
||||
height: auto;
|
||||
// width: 375px;
|
||||
// background-color: yellow;
|
||||
p {
|
||||
height: 40px;
|
||||
// background-color: #ccc;
|
||||
width: 100vw;
|
||||
line-height: 40px;
|
||||
font-size: 12px;
|
||||
text-align: left;
|
||||
padding: 0 10px;
|
||||
}
|
||||
.dll {
|
||||
height: auto;
|
||||
margin-top: 20px;
|
||||
// background-color: pink;
|
||||
width: 100vw;
|
||||
// width: 375px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
|
||||
dt {
|
||||
// background-color: green;
|
||||
height: 100%;
|
||||
width: 35%;
|
||||
|
||||
margin: 0 5px;
|
||||
img {
|
||||
width: 80%;
|
||||
height: 90%;
|
||||
object-fit: contain; /* 可以是contain、cover等值 */
|
||||
}
|
||||
}
|
||||
dd {
|
||||
width: 100px;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
// align-items: center;
|
||||
flex-direction: column;
|
||||
// background-color: red;
|
||||
justify-content: space-between;
|
||||
flex: 1;
|
||||
p:nth-child(1) {
|
||||
height: 20px;
|
||||
width: 50%;
|
||||
// background-color: green;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0;
|
||||
justify-content: space-between;
|
||||
}
|
||||
p:nth-child(2) {
|
||||
width: 100%;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
display: flex;
|
||||
// align-items: center;
|
||||
flex-direction: column;
|
||||
|
||||
// background-color: orange;
|
||||
}
|
||||
p:nth-child(3) {
|
||||
height: 20px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
line-height: 20px;
|
||||
// background-color: green;
|
||||
}
|
||||
button {
|
||||
width: 100px;
|
||||
height: 30px;
|
||||
display: flex;
|
||||
border: none;
|
||||
line-height: 40px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: white;
|
||||
margin-left: 5px;
|
||||
border-radius: 10px;
|
||||
margin-bottom: 10px;
|
||||
background-color: #3087ea;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -3,19 +3,67 @@
|
|||
<MyTop>
|
||||
<template slot="collection">我的收藏</template>
|
||||
</MyTop>
|
||||
<div class="inner">
|
||||
<ul>
|
||||
<li
|
||||
v-for="(v, i) in nav"
|
||||
:key="i"
|
||||
:class="ind === i ? 'active' : ''"
|
||||
@click="handleInd(i)"
|
||||
>
|
||||
{{ v }}
|
||||
</li>
|
||||
</ul>
|
||||
<div class="con"></div>
|
||||
</div>
|
||||
|
||||
<van-tabs v-model="active" @click="handleInd">
|
||||
<van-tab title="健康咨询">
|
||||
<div class="con-list">
|
||||
<div v-for="(v, i) in con" :key="i" class="bot">
|
||||
<dl class="three" v-if="v.thumbnail.length === 3">
|
||||
<dd>
|
||||
<p class="title">{{ v.title }}</p>
|
||||
<div class="word">
|
||||
<span class="wordspan">{{ v.releaseTime | timeFormat }}</span>
|
||||
</div>
|
||||
</dd>
|
||||
<dt>
|
||||
<img
|
||||
v-for="(index, item) in v.thumbnail"
|
||||
:key="item"
|
||||
:src="index"
|
||||
/>
|
||||
</dt>
|
||||
</dl>
|
||||
<dl class="one" v-else-if="v.thumbnail.length === 1">
|
||||
<dt><img :src="v.thumbnail" /></dt>
|
||||
<dd>
|
||||
<p class="title">{{ v.title }}</p>
|
||||
<div class="word">
|
||||
<span class="wordspan">{{ v.releaseTime | timeFormat }}</span>
|
||||
</div>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</van-tab>
|
||||
<van-tab title="健康视频">
|
||||
<div class="con1">
|
||||
<div class="con1-list" v-for="(v, i) in con1" :key="i">
|
||||
<video
|
||||
class="video"
|
||||
muted="muted"
|
||||
type="video.mp4"
|
||||
autoplay="autoplay"
|
||||
controls="controls"
|
||||
loop="-1"
|
||||
:src="v.originalUrl"
|
||||
></video>
|
||||
<div>152121</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-tab>
|
||||
<van-tab title="病友圈">
|
||||
<div class="con2">
|
||||
<div class="con2-list" v-for="(v,i) in con2" :key="i">
|
||||
<h3>{{ v.title }}</h3>
|
||||
<p>{{ v.disease }}</p>
|
||||
<div>
|
||||
<span>收藏0</span><span>建议</span>
|
||||
<p>2分钟</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -32,29 +80,54 @@ export default {
|
|||
ind: 0,
|
||||
page: 1,
|
||||
count: 5,
|
||||
active: 0,
|
||||
con: [],
|
||||
con1: [],
|
||||
con2: [],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async getss() {
|
||||
const resp = await fetchSeeAsk({
|
||||
params: { page: this.page, count: this.count },
|
||||
});
|
||||
// 是否存在你更多数据
|
||||
if (resp.data.result.length > 0) {
|
||||
// 数据二次请求
|
||||
resp.data.result.forEach((v) => {
|
||||
v.thumbnail = v.thumbnail.split(";");
|
||||
// console.log(v.thumbnail);
|
||||
});
|
||||
}
|
||||
this.con = resp.data.result;
|
||||
console.log(resp);
|
||||
console.log(141425);
|
||||
},
|
||||
async handleInd(i) {
|
||||
this.ind = i;
|
||||
console.log(i);
|
||||
if (i === 0) {
|
||||
const resp = await fetchSeeCirle({
|
||||
params: { page: this.page, count: this.count },
|
||||
});
|
||||
console.log(resp);
|
||||
// console.log(resp);
|
||||
|
||||
this.getss();
|
||||
} else if (i === 1) {
|
||||
const resp = await fetchSeeAsk({
|
||||
params: { page: this.page, count: this.count },
|
||||
});
|
||||
console.log(resp);
|
||||
} else if (i === 2) {
|
||||
const resp = await fetchSeeVideo({
|
||||
params: { page: this.page, count: this.count },
|
||||
});
|
||||
this.con1 = resp.data.result;
|
||||
console.log(resp);
|
||||
} else if (i === 2) {
|
||||
const resp = await fetchSeeCirle({
|
||||
params: { page: this.page, count: this.count },
|
||||
});
|
||||
this.con2 = resp.data.result;
|
||||
console.log(resp);
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getss();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -85,8 +158,164 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
.con{
|
||||
.con-list {
|
||||
display: flex;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
// background-color: pink;
|
||||
.bot {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
// background-color: #ccc;
|
||||
|
||||
flex-wrap: wrap;
|
||||
margin-top: 23px;
|
||||
.three {
|
||||
height: 300px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
// justify-content: space-between;
|
||||
// background-color: green;
|
||||
margin-top: 5px;
|
||||
border-bottom: 2px solid #eee;
|
||||
dt {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
height: 100px;
|
||||
// background-color: green;
|
||||
img {
|
||||
width: 30%;
|
||||
}
|
||||
}
|
||||
dd {
|
||||
height: 65px;
|
||||
width: 100%;
|
||||
|
||||
// background-color: green;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
p {
|
||||
width: 100%;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
height: 30px;
|
||||
align-items: center;
|
||||
// background-color: red;
|
||||
justify-content: space-between;
|
||||
padding: 0 10px;
|
||||
text-align: left;
|
||||
}
|
||||
div {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// background-color: red;
|
||||
justify-content: space-between;
|
||||
|
||||
p {
|
||||
font-weight: normal;
|
||||
}
|
||||
span {
|
||||
width: 50px;
|
||||
// background-color: orange;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.one {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
margin: 5px;
|
||||
border-bottom: 1px solid #eee;
|
||||
// background-color: pink;
|
||||
margin-top: 5px;
|
||||
dt {
|
||||
width: 35%;
|
||||
// background-color: green;
|
||||
height: 100px;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
dd {
|
||||
width: 65%;
|
||||
height: 45px;
|
||||
text-align: left;
|
||||
display: flex;
|
||||
height: 100px;
|
||||
// background-color: green;
|
||||
justify-content: space-between;
|
||||
flex-direction: column;
|
||||
.title {
|
||||
margin-top: 5px;
|
||||
height: 55px;
|
||||
width: 100%;
|
||||
font-weight: bolder;
|
||||
}
|
||||
.word {
|
||||
margin-bottom: 5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
justify-content: space-between;
|
||||
.wordp {
|
||||
margin: 5px;
|
||||
}
|
||||
.wordspan {
|
||||
margin: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.con1 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
width: 100vw;
|
||||
height: auto;
|
||||
.con1-list {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
// background-color: pink;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
.video {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.con2 {
|
||||
width: 100vw;
|
||||
height: auto;
|
||||
// background-color: pink;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
.con2-list {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
display: flex;
|
||||
align-items: start;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
background-color: #fff;
|
||||
margin-top: 5px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,7 +1,5 @@
|
|||
<template>
|
||||
<div>
|
||||
forgetPassword1
|
||||
</div>
|
||||
<div></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
|
|
@ -39,10 +39,12 @@
|
|||
<img :src="v.img" /><span>{{ v.name }}</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-else>
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -212,6 +212,7 @@ export default {
|
|||
.an-nav-bar {
|
||||
width: 98%;
|
||||
margin-left: 1%;
|
||||
|
||||
}
|
||||
.con {
|
||||
width: 100vw;
|
||||
|
|
|
@ -105,13 +105,14 @@ export default {
|
|||
this.list = resp.data.result;
|
||||
this.length = resp.data.result.length;
|
||||
console.log(this.length);
|
||||
this.treatmentStartTime = moment(this.list.treatmentStartTime).format(
|
||||
this.treatmentStartTime = moment(this.list[0].treatmentStartTime).format(
|
||||
"YYYY.M.D"
|
||||
);
|
||||
console.log(this.treatmentStartTime);
|
||||
this.treatmentEndTime = moment(this.list.treatmentEndTime).format(
|
||||
console.log(this.list.treatmentStartTime);
|
||||
this.treatmentEndTime = moment(this.list[0].treatmentEndTime).format(
|
||||
"YYYY.M.D"
|
||||
);
|
||||
console.log(this.list.treatmentEndTime);
|
||||
this.timer = this.treatmentStartTime + "-" + this.treatmentEndTime;
|
||||
console.log(this.timer);
|
||||
},
|
||||
|
|
|
@ -1,15 +1,94 @@
|
|||
<template>
|
||||
<div>
|
||||
changePassword
|
||||
<div class="box">
|
||||
<MyTop>
|
||||
<template slot=""></template>
|
||||
</MyTop>
|
||||
<input placeholder="请输入旧密码" type="password" v-model="value1" />
|
||||
<input placeholder="请输入新密码" type="password" v-model="value2" />
|
||||
<input placeholder="请再次输入新密码" type="password" v-model="value3" />
|
||||
<button @click="getPaw">确认修改</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
import MyTop from "@/components/MyTop.vue";
|
||||
import { fetchUserPwd } from "@/api";
|
||||
import JSEencrypt from "jsencrypt";
|
||||
import { Toast } from "vant";
|
||||
|
||||
}
|
||||
export default {
|
||||
components: {
|
||||
MyTop,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
value1: "",
|
||||
value2: "",
|
||||
value3: "",
|
||||
value11: "",
|
||||
value22: "",
|
||||
value33: "",
|
||||
publicKey: `MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCuQd3gESx7VdIyRYUWjmjg61VIgUK6F45hClmqUMZ7xNiT5rlLM6e78osMvBF/yP7cVm7pK+NMCDWoVS1/AETpxJYqUlIC77ZAU8/MnP96IupnJL87vqhPcpdv7+VqLM38ls++yuD/F/HSoOQTv/leJh+dgE/4EYAJjOWFAbYfXwIDAQAB`,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async getPaw() {
|
||||
this.value11 = this.encrypt(this.publicKey, this.value1);
|
||||
this.value22 = this.encrypt(this.publicKey, this.value2);
|
||||
console.log(this.value1, this.value2);
|
||||
if (this.value2 === this.value3) {
|
||||
const resp = await fetchUserPwd({
|
||||
oldPwd: this.value11,
|
||||
newPwd: this.value22,
|
||||
});
|
||||
}
|
||||
if (resp.status === 200) {
|
||||
Toast.success("修改密码成功,请重新登录");
|
||||
localStorage.removeItem("userId");
|
||||
localStorage.removeItem("sessionId");
|
||||
this.$router.push(`/my/myLogin`);
|
||||
console.log(resp);
|
||||
}
|
||||
},
|
||||
encrypt(publicKey, data) {
|
||||
// 新建JSEncrypt对象
|
||||
const encryptor = new JSEencrypt();
|
||||
// 设置公钥
|
||||
encryptor.setPublicKey(publicKey);
|
||||
// 加密数据
|
||||
return encryptor.encrypt(data);
|
||||
},
|
||||
},
|
||||
created() {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
|
||||
position: relative;
|
||||
input {
|
||||
width: 90%;
|
||||
height: 50px;
|
||||
margin-top: 10px;
|
||||
border: none;
|
||||
}
|
||||
button {
|
||||
background-color: #3087ea;
|
||||
color: #fff;
|
||||
width: 90%;
|
||||
height: 50px;
|
||||
position: absolute;
|
||||
bottom: 30px;
|
||||
left: 0;
|
||||
text-align: center;
|
||||
margin-left: 5%;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -3,13 +3,20 @@
|
|||
<MyTop>
|
||||
<template slot="collection">个人设置</template>
|
||||
</MyTop>
|
||||
<van-cell class="van-cell1" title="呵呵呵" :icon="img" is-link to="/set/personInfomation"/>
|
||||
<van-cell class="van-cell" title="修改密码" is-link to="index" />
|
||||
<van-cell
|
||||
class="van-cell1"
|
||||
title="呵呵呵"
|
||||
:icon="img"
|
||||
is-link
|
||||
to="/set/personInfomation"
|
||||
/>
|
||||
<van-cell class="van-cell" title="修改密码" is-link to="/set/changePassword" />
|
||||
<van-cell class="van-cell" title="清除缓存" is-link to="" value="100M" />
|
||||
<van-cell class="van-cell" title="版本检测" is-link to="index" />
|
||||
<van-cell class="van-cell" title="帮助中心" is-link to="index" />
|
||||
<van-cell class="van-cell" title="关于我们" is-link to="index" />
|
||||
<van-cell class="van-cell" title="邀请好友" is-link to="index" />
|
||||
<button @click="button">退出登录</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -25,10 +32,25 @@ export default {
|
|||
img: localStorage.getItem("headPic"),
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
button() {
|
||||
localStorage.removeItem("userId");
|
||||
localStorage.removeItem("sessionId");
|
||||
this.$router.push("/my/myLogin");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
button {
|
||||
width: 90%;
|
||||
height: 50px;
|
||||
color: red;
|
||||
background-color: #fff;
|
||||
margin-top: 10px;
|
||||
border: none;
|
||||
}
|
||||
.box {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
|
@ -44,15 +66,15 @@ export default {
|
|||
.van-icon {
|
||||
margin-left: -12px;
|
||||
}
|
||||
.van-cell__title{
|
||||
.van-cell__title {
|
||||
margin-left: 18px;
|
||||
}
|
||||
.van-icon {
|
||||
// width: 40px;
|
||||
// height: 40px;
|
||||
img{
|
||||
// width: 40px;
|
||||
// height: 40px;
|
||||
img {
|
||||
width: 40px;
|
||||
height:40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
|
|
@ -2,22 +2,74 @@
|
|||
<div class="box">
|
||||
<MyTop><template slot="collection">个人信息页</template></MyTop>
|
||||
<div class="con">
|
||||
<van-cell class="tou" title="头像">
|
||||
<van-cell class="tou" title="头像" @click="showPopup">
|
||||
<!-- 使用 right-icon 插槽来自定义右侧图标 -->
|
||||
<template #right-icon>
|
||||
<img :src="img" />
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell class="nick" title="昵称" is-link to="/set/setNickname" />
|
||||
<van-cell class="nick" title="性别" is-link to="/set/setNickname" />
|
||||
<van-cell class="nick" title="体征" is-link to="/set/setNickname" />
|
||||
<van-cell title="绑定微信" class="nick" is-link value="去绑定" />
|
||||
<van-cell title="实名认证" class="nick" is-link value="去认证" to="/set/viewAuthenticationInformation"/>
|
||||
<van-cell title="绑定银行卡" class="nick" is-link value="去绑定" to="/set/viewBankCards"/>
|
||||
<van-cell class="nick" title="邮箱" is-link to="/set/setNickname" />
|
||||
<van-cell
|
||||
class="nick"
|
||||
title="昵称"
|
||||
is-link
|
||||
to="/set/setNickname"
|
||||
:value="list.nickName"
|
||||
/>
|
||||
<!-- <van-cell class="nick" title="性别" is-link to="/set/setNickname" /> -->
|
||||
|
||||
|
||||
<van-cell title="性别" class="sex" is-link>
|
||||
<!-- 使用 right-icon 插槽来自定义右侧图标 -->
|
||||
<template #right-icon>
|
||||
<img :src="nv" />
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="体征" class="tou">
|
||||
<!-- 使用 right-icon 插槽来自定义右侧图标 -->
|
||||
<template #right-icon>
|
||||
<div class="sdf">
|
||||
<div><span>身高</span><span>cm</span></div>
|
||||
<div><span>体重</span><span>kg</span></div>
|
||||
<div><span>年龄</span><span>岁</span></div>
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
|
||||
<!-- <van-cell class="nick" title="体征" is-link to="/set/setNickname" /> -->
|
||||
<van-cell title="绑定微信" class="nick" is-link value="去绑定" />
|
||||
<van-cell
|
||||
title="实名认证"
|
||||
class="nick"
|
||||
is-link
|
||||
value="去认证"
|
||||
to="/set/viewAuthenticationInformation"
|
||||
/>
|
||||
<van-cell
|
||||
title="绑定银行卡"
|
||||
class="nick"
|
||||
is-link
|
||||
value="去绑定"
|
||||
to="/set/viewBankCards"
|
||||
/>
|
||||
<van-cell class="nick" title="邮箱" is-link to="/set/setNickname" />
|
||||
</div>
|
||||
<!-- 圆角弹框 -->
|
||||
<van-popup
|
||||
v-model="show"
|
||||
round
|
||||
position="bottom"
|
||||
:style="{ height: '30%' }"
|
||||
>
|
||||
<!-- <button>拍照</button>
|
||||
<button>从相册中选择</button>
|
||||
<button>取消</button> -->
|
||||
<van-uploader>
|
||||
<van-button type="primary">拍照</van-button>
|
||||
</van-uploader>
|
||||
<van-uploader>
|
||||
<van-button type="primary">从相册中选择</van-button>
|
||||
</van-uploader>
|
||||
<button>取消</button>
|
||||
</van-popup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -27,22 +79,36 @@ import nv from "@/assets/images/icon/common resource/xxhdpi/common_icon_girl_n.p
|
|||
import sex1 from "@/assets/images/image/hdpi/girl.png";
|
||||
import sex2 from "@/assets/images/image/hdpi/boy.png";
|
||||
|
||||
import brank1 from "@/assets/images/image/hdpi/id_card_back.png";
|
||||
import brank2 from "@/assets/images/image/hdpi/id_card_front.png";
|
||||
|
||||
import { fetchIdUser } from "@/api";
|
||||
export default {
|
||||
components: {
|
||||
MyTop,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
nv:nv,
|
||||
sex1:sex1,
|
||||
sex2:sex2,
|
||||
brank1:brank1,
|
||||
brank2:brank2,
|
||||
nv: nv,
|
||||
sex1: sex1,
|
||||
sex2: sex2,
|
||||
|
||||
img: localStorage.getItem("headPic"),
|
||||
list: {},
|
||||
show: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async getIdUser() {
|
||||
const resp = await fetchIdUser();
|
||||
console.log(resp);
|
||||
this.list = resp.data.result;
|
||||
},
|
||||
showPopup() {
|
||||
this.show = true;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getIdUser();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -56,7 +122,7 @@ export default {
|
|||
flex-direction: column;
|
||||
.con {
|
||||
margin-top: 20px;
|
||||
padding:0;
|
||||
padding: 0;
|
||||
// background-color: pink;
|
||||
width: 100vw;
|
||||
height: 800px;
|
||||
|
@ -67,7 +133,7 @@ export default {
|
|||
width: 100vw;
|
||||
height: 80px;
|
||||
display: flex;
|
||||
|
||||
|
||||
align-items: center;
|
||||
// background-color: #ccc;
|
||||
img {
|
||||
|
@ -81,11 +147,29 @@ export default {
|
|||
flex: 1;
|
||||
}
|
||||
}
|
||||
.sex {
|
||||
width: 100vw;
|
||||
height: 80px;
|
||||
display: flex;
|
||||
|
||||
align-items: center;
|
||||
// background-color: #ccc;
|
||||
img {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
.van-cell__title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
.nick {
|
||||
width: 100vw;
|
||||
height: 50px;
|
||||
display: flex;
|
||||
margin-top: 1px;
|
||||
margin-top: 1px;
|
||||
align-items: center;
|
||||
// background-color: #ccc;
|
||||
|
||||
|
@ -96,6 +180,50 @@ export default {
|
|||
flex: 1;
|
||||
}
|
||||
}
|
||||
.sdf {
|
||||
// background-color: green;
|
||||
width: 150px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
justify-content: space-around;
|
||||
div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
}
|
||||
.van-popup {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
padding: 10px 0;
|
||||
button {
|
||||
width: 100%;
|
||||
// margin: 20px;
|
||||
background-color: #fff;
|
||||
color: #3087ea;
|
||||
height: 40px;
|
||||
border: none;
|
||||
}
|
||||
button:nth-child(1) {
|
||||
margin-top: 0;
|
||||
margin-top: 40px;
|
||||
border: none;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
button:nth-child(2) {
|
||||
margin-top: 0;
|
||||
border: none;
|
||||
}
|
||||
button:nth-child(1) {
|
||||
margin-top: 5px;
|
||||
border: 1px solid #ccc;
|
||||
border: none;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,15 +1,66 @@
|
|||
<template>
|
||||
<div>
|
||||
setNickname
|
||||
<div class="box">
|
||||
<div class="top">
|
||||
<img :src="jiantou" @click="$router.go(-1)" /><span>设置昵称</span>
|
||||
<button @click="getNick">设置</button>
|
||||
</div>
|
||||
<input placeholder="请输入昵称" v-model="value" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
import jiantou from "@/assets/images/icon/common resource/xxhdpi/common_icon_white_n.png";
|
||||
import { Toast } from 'vant';
|
||||
import MyTop from "@/components/MyTop.vue";
|
||||
import { fetchNick } from "@/api";
|
||||
|
||||
}
|
||||
export default {
|
||||
components: {
|
||||
MyTop,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
jiantou: jiantou,
|
||||
value:''
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
async getNick() {
|
||||
const resp = await fetchNick({nickName:this.value});
|
||||
console.log(resp);
|
||||
Toast.success('修改昵称成功');
|
||||
this.$router.go(-1)
|
||||
},
|
||||
|
||||
},
|
||||
created() {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #eee;
|
||||
.top {
|
||||
height: 55px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
justify-content: space-between;
|
||||
width: 100vw;
|
||||
background-color: #fff;
|
||||
padding: 0 10px;
|
||||
img {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
input {
|
||||
width: 95%;
|
||||
border: none;
|
||||
height: 40px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,15 @@
|
|||
<template>
|
||||
<div>
|
||||
gbhm
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -1,15 +1,135 @@
|
|||
<template>
|
||||
<div>
|
||||
viewAuthenticationInformation
|
||||
<div class="box">
|
||||
<MyTop>
|
||||
<template slot="collection">实名认证</template>
|
||||
</MyTop>
|
||||
<div class="back"><van-uploader :after-read="afterRead1" /></div>
|
||||
<div class="face"><van-uploader :after-read="afterRead2" /></div>
|
||||
<button @click="getNext">下一步</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JSEencrypt from "jsencrypt";
|
||||
import MyTop from "@/components/MyTop.vue";
|
||||
import brank1 from "@/assets/images/image/hdpi/id_card_back.png";
|
||||
import brank2 from "@/assets/images/image/hdpi/id_card_front.png";
|
||||
import { fetchPerson } from "@/api";
|
||||
export default {
|
||||
components: {
|
||||
MyTop,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
brank1: brank1,
|
||||
brank2: brank2,
|
||||
publicKey: `MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCuQd3gESx7VdIyRYUWjmjg61VIgUK6F45hClmqUMZ7xNiT5rlLM6e78osMvBF/yP7cVm7pK+NMCDWoVS1/AETpxJYqUlIC77ZAU8/MnP96IupnJL87vqhPcpdv7+VqLM38ls++yuD/F/HSoOQTv/leJh+dgE/4EYAJjOWFAbYfXwIDAQAB`,
|
||||
|
||||
}
|
||||
userId: localStorage.getItem("userId"),
|
||||
name: "史建月",
|
||||
sex: "女",
|
||||
nation: "汉",
|
||||
birthday: "20000-20-12",
|
||||
address: "江苏省淮安市",
|
||||
idNumber: "3208042000020122906",
|
||||
issueOffice: "公安局",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
afterRead1(file) {
|
||||
// 此时可以自行将文件上传至服务器
|
||||
console.log(file);
|
||||
},
|
||||
afterRead2(file) {
|
||||
// 此时可以自行将文件上传至服务器
|
||||
console.log(file);
|
||||
},
|
||||
async getNext() {
|
||||
// this.$router.push('/set/ss')
|
||||
// return
|
||||
// this.userId = this.encrypt(this.publicKey, this.userId);
|
||||
// this.name = this.encrypt(this.publicKey, this.name);
|
||||
// this.sex = this.encrypt(this.publicKey, this.sex);
|
||||
// this.nation = this.encrypt(this.publicKey, this.nation);
|
||||
// this.birthday = this.encrypt(this.publicKey, this.birthday);
|
||||
// this.address = this.encrypt(this.publicKey, this.address);
|
||||
this.idNumber = this.encrypt(this.publicKey, this.idNumber);
|
||||
// this.issueOffice = this.encrypt(this.publicKey, this.issueOffice);
|
||||
const resp = await fetchPerson({
|
||||
userId: this.userId,
|
||||
name: this.userId,
|
||||
sex: this.sex,
|
||||
nation: this.nation,
|
||||
birthday: this.birthday,
|
||||
address: this.address,
|
||||
idNumber: this.idNumber,
|
||||
issueOffice: this.issueOffice,
|
||||
});
|
||||
console.log(resp);
|
||||
},
|
||||
encrypt(publicKey, data) {
|
||||
// 新建JSEncrypt对象
|
||||
const encryptor = new JSEencrypt();
|
||||
// 设置公钥
|
||||
encryptor.setPublicKey(publicKey);
|
||||
// 加密数据
|
||||
return encryptor.encrypt(data);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style lang="scss" scoped>
|
||||
.box {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: #eee;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.face {
|
||||
width: 95%;
|
||||
height: 250px;
|
||||
border-radius: 5px;
|
||||
margin-top: 20px;
|
||||
background-color: #ccc;
|
||||
background: url("@/assets/images/image/hdpi/id_card_back.png");
|
||||
// // position: relative;
|
||||
// .van-uploader{
|
||||
// position: absolute;
|
||||
// left: 0;
|
||||
// top: 0;
|
||||
// right: 0;
|
||||
// bottom: 0;
|
||||
// background: green;
|
||||
// margin: auto;
|
||||
// }
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.back {
|
||||
width: 95%;
|
||||
height: 250px;
|
||||
border-radius: 5px;
|
||||
margin-top: 20px;
|
||||
background-color: #ccc;
|
||||
background: url("@/assets/images/image/hdpi/id_card_front.png");
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
button {
|
||||
margin-top: 50px;
|
||||
background-color: #3087ea;
|
||||
color: white;
|
||||
height: 40px;
|
||||
border: none;
|
||||
width: 90%;
|
||||
}
|
||||
</style>
|
|
@ -1,32 +1,66 @@
|
|||
<template>
|
||||
<div>
|
||||
<video
|
||||
class="video"
|
||||
muted="muted"
|
||||
type="video.mp4"
|
||||
ref="startvideo"
|
||||
autoplay="autoplay"
|
||||
controls="controls"
|
||||
loop="-1"
|
||||
:src="v.originalUrl"
|
||||
v-for="(v, i) in list"
|
||||
:key="i"
|
||||
></video>
|
||||
<div class="box">
|
||||
<div class="inner">
|
||||
<ul class="nav">
|
||||
<li
|
||||
v-for="(v, i) in nav"
|
||||
:key="i"
|
||||
@click="changeInd(v.id)"
|
||||
:class="active === v.id ? 'active' : ''"
|
||||
>
|
||||
{{ v.name }}
|
||||
</li>
|
||||
</ul>
|
||||
<div class="con">
|
||||
<div v-for="(v, i) in list" :key="i" class="con-list">
|
||||
<video
|
||||
class="video"
|
||||
muted="muted"
|
||||
type="video.mp4"
|
||||
ref="startvideo"
|
||||
autoplay="autoplay"
|
||||
controls="controls"
|
||||
loop="-1"
|
||||
:src="v.originalUrl"
|
||||
></video>
|
||||
<div class="fix">
|
||||
<img :src="xinn" @click="handleLike(v.id)" v-if="isLike" />
|
||||
<img :src="xin" @click="handleLike(v.id)" v-else />
|
||||
<img :src="money" />
|
||||
<img :src="message" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div @click.stop="startvideo"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { fetchVidio } from "@/api";
|
||||
import xin from "@/assets/images/icon/common resource/hdpi/common_button_collection_large_n.png";
|
||||
import xinn from "@/assets/images/icon/common resource/hdpi/common_button_collection_large_s.png";
|
||||
import money from "@/assets/images/icon/common resource/hdpi/common_icon_toll_n.png";
|
||||
import message from "@/assets/images/icon/common resource/hdpi/common_icon_open_live_commenting_n.png";
|
||||
|
||||
import { fetchVidio, fetchVideoLike, fetchVidioNav } from "@/api";
|
||||
import { Toast } from "vant";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
active: 1,
|
||||
xin: xin,
|
||||
xinn: xinn,
|
||||
money: money,
|
||||
message: message,
|
||||
params: {
|
||||
categoryId: 1,
|
||||
page: 1,
|
||||
count: 5,
|
||||
},
|
||||
list: [],
|
||||
videoId: 0,
|
||||
nav: [],
|
||||
isLike: false,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -42,16 +76,107 @@ export default {
|
|||
this.$refs.startvideo.pause();
|
||||
}
|
||||
},
|
||||
|
||||
async getVideoNav() {
|
||||
const resp = await fetchVidioNav();
|
||||
console.log(resp);
|
||||
this.nav = resp.data.result;
|
||||
},
|
||||
changeInd(index) {
|
||||
this.active = index;
|
||||
this.params.categoryId = index;
|
||||
this.getVidio();
|
||||
},
|
||||
async handleLike(videoId) {
|
||||
console.log(videoId);
|
||||
console.log(this.active, videoId);
|
||||
if (this.isLike === false) {
|
||||
const resp = await fetchVideoLike({ videoId: videoId });
|
||||
console.log(resp);
|
||||
this.isLike = true;
|
||||
Toast.success("收藏成功");
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getVidio();
|
||||
this.getVideoNav();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.video{
|
||||
// .video {
|
||||
// width: 100vw;
|
||||
// height: 100vh;
|
||||
// overflow: scroll;
|
||||
// }
|
||||
.box {
|
||||
width: 100vw;
|
||||
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
.inner {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
.nav {
|
||||
width: 100%;
|
||||
height: 55px;
|
||||
background-color: #eee;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 2;
|
||||
li {
|
||||
height: 100%;
|
||||
line-height: 55px;
|
||||
}
|
||||
.active {
|
||||
border-bottom: 3px solid #3087ea;
|
||||
}
|
||||
}
|
||||
.con {
|
||||
margin-top: 20px;
|
||||
flex: 1;
|
||||
width: 99%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
// background-color: green;
|
||||
|
||||
.con-list {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.fix {
|
||||
width: 60px;
|
||||
height: 150px;
|
||||
position: absolute;
|
||||
|
||||
right: 0;
|
||||
bottom: 260px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
img {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue