This commit is contained in:
曹辉 2023-02-13 15:24:21 +08:00
parent 944486e7f4
commit 1193d1ae5c
14 changed files with 872 additions and 113 deletions

View File

@ -1,37 +1,37 @@
{
"version" : "1",
"prompt" : "template",
"title" : "服务协议和隐私政策",
"message" : "请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"\">《服务协议》</a>和<a href=\"\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept" : "同意并接受",
"buttonRefuse" : "暂不同意",
"hrefLoader" : "system|default",
"second" : {
"title" : "确认提示",
"message" : "进入应用前,你需先同意<a href=\"\">《服务协议》</a>和<a href=\"\">《隐私政策》</a>,否则将退出应用。",
"buttonAccept" : "同意并继续",
"buttonRefuse" : "退出应用"
},
"disagreeMode" : {
"support" : false,
"loadNativePlugins" : false,
"visitorEntry" : true,
"showAlways" : true
},
"styles" : {
"backgroundColor" : "#ffffff",
"borderRadius" : "5px",
"title" : {
"color" : "#ff00ff"
},
"buttonAccept" : {
"color" : "#ffff00"
},
"buttonRefuse" : {
"color" : "#00ffff"
},
"buttonVisitor" : {
"color" : "#00ffff"
}
}
"version": "1",
"prompt": "template",
"title": "用户协议与隐私政策",
"message": "请你务必审慎阅读、充分理解“用户协议与隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/>  你可阅读<a href=\"https://app.xinelu.cn/privacypolicy/content.html\">《用户协议与隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept": "同意并接受",
"buttonRefuse": "暂不同意",
"hrefLoader": "system|default",
"second": {
"title": "确认提示",
"message": "进入应用前,你需先同意<a href=\"https://app.xinelu.cn/privacypolicy/content.html\">《用户协议与隐私政策》</a>,否则将退出应用。",
"buttonAccept": "同意并继续",
"buttonRefuse": "退出应用"
},
"disagreeMode": {
"support": false,
"loadNativePlugins": false,
"visitorEntry": false,
"showAlways": false
},
"styles": {
"backgroundColor": "#ffffff",
"borderRadius": "5px",
"title": {
"color": "#000000"
},
"buttonAccept": {
"color": "#000000"
},
"buttonRefuse": {
"color": "#000000"
},
"buttonVisitor": {
"color": "#000000"
}
}
}

View File

@ -5,4 +5,13 @@ export function goodsList(pageSize,pageNum,goodsCategoryId,goodsName) {
url: `/nurseApplet/nursingStationGoods/goodsList?pageSize=${pageSize}&pageNum=${pageNum}&goodsCategoryId=${goodsCategoryId}&goodsName=${goodsName}`,
method: 'GET'
})
}
}
//查询商品分类二级分类上边列表 小程序
export function getGoodsCategoryNameList(goodsCategoryId) {
return request({
url: `/nurseApplet/nursingStationGoods/getGoodsCategoryNameList?goodsCategoryId=${goodsCategoryId}`,
method: 'GET'
})
}

View File

@ -2,7 +2,7 @@ import request from "../request.js"
export function goodsCategoryList(pageSize,pageNum) {
return request({
url: `/nurseApplet/nursingStationGoods/goodsCategoryList?pageSize=${pageSize}&pageNum=${pageNum}`,
url: `/nurseApplet/nursingStationGoods/goodsCategoryList?pageSize=${pageSize}&pageNum=${pageNum}&categoryLevel=${1}`,
method: 'GET'
})
}

View File

@ -4,4 +4,12 @@ export function appPersonal(patientId) {
url: `/nurseApp/login/appPersonal?patientId=${patientId}`,
method: 'GET'
})
}
}
//注销
export function accountCancellation(patientId) {
return request({
url: `/nurseApplet/login/accountCancellation?patientId=${patientId}`,
method: 'GET'
})
}

View File

@ -1,9 +1,9 @@
{
"name" : "泉医到家APP",
"name" : "泉医到家",
"appid" : "__UNI__D6F049F",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"versionCode" : 100,
"transformPx" : false,
/* 5+App */
"app-plus" : {
@ -19,7 +19,8 @@
/* */
"modules" : {
"Maps" : {},
"Geolocation" : {}
"Geolocation" : {},
"Camera" : {}
},
/* */
"distribute" : {

View File

@ -346,6 +346,14 @@
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#ffffff"
}
}, {
"path": "pages/classification/classification",
"style": {
"navigationBarTitleText": "分类",
"enablePullDownRefresh": false
// "disableScroll": true
}
}
],
"globalStyle": {

View File

@ -13,12 +13,12 @@
我的订单
</view>
</view>
<view class="item" style="background-color: #00C176 ;">
<!-- <view class="item" style="background-color: #00C176 ;">
<image src="../../static/home.png" mode=""></image>
<view class="title" style="font-size: 42rpx;">
我的家庭
</view>
</view>
</view> -->
<view class="item">
</view>
<view class="item">

View File

@ -1,5 +1,10 @@
<template>
<view class="app">
<view class="" v-if='GoodsCategorychildrenlist.length>1'>
<top-tabbar :tabIndex="tabIndex" :tabBars="GoodsCategorychildrenlist" @toggleToptab="toggleTab"
selectedBottomColor="#D43953" selectedTextColor="#D43953" textColor="#000000" bgColor="#ffffff">
</top-tabbar>
</view>
<view class="inputs">
<i class="icon"></i>
<input v-model="goodsName" type="text" name="" id="" class="input" placeholder="请输入商品名称">
@ -17,7 +22,7 @@
{{item.goodsPrice}}
</view>
</view>
<view style="width:45%" v-if="goodsList.length%2!=0">
<view style="width: 45%;" v-if="goodsList.length%2!=0">
</view>
</view>
<view class="noorder" v-if='goodsList.length==0'>
@ -26,17 +31,25 @@
暂无商品
</view>
</view>
<u-back-top :scroll-top="scrollTop"></u-back-top>
</view>
</template>
<script>
import {
goodsList
goodsList,
getGoodsCategoryNameList
} from '@/api/ProductList/ProductList.js';
import baseurl from '@/api/baseurl.js'
import topTabbar from '../toptabbar/toptabbar.vue'
export default {
components: {
topTabbar
},
data() {
return {
//tabIndex便
tabIndex: 0,
baseurl: '',
title: '医路优品', //
pageNum: 1,
@ -45,31 +58,98 @@
goodsList: [], //list
total: 0, //list
goodsName: '',
GoodsCategorychildrenlist: [], //list
GoodsCategorychildrenid: null,
scrollTop: 0,
};
},
watch: { //
goodsName() {
this.pageNum = 1;
goodsList(this.pageSize, this.pageNum, this.goodsCategoryId, this.goodsName).then(res => {
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(res => {
this.goodsList = res.rows
this.total = res.total
})
},
},
onShow() {
var that = this
try {
const value3 = uni.getStorageSync('Refresh');
if (value3) {
that.goodsListinfo();
}
} catch (e) {}
},
onLoad(options) { //
this.title = options.title //
if (options.title) {
this.title = options.title //
}
this.goodsCategoryId = options.goodsCategoryId //id
this.GoodsCategorychildrenid = options.goodsCategoryId //id
this.baseurl = baseurl;
this.goodsListinfo()
this.GoodsCategorychildren(this.goodsCategoryId);
},
methods: {
onPageScroll(e) {
this.scrollTop = e.scrollTop;
},
//
toggleTab(index) {
if (index == 1111111111111) {
uni.navigateTo({
url: `/pages/classification/classification?goodsCategoryId=${this.goodsCategoryId}&index=${this.tabIndex}&GoodsCategorychildrenid=${this.GoodsCategorychildrenid}`
})
} else if (index == 0) {
this.GoodsCategorychildrenid = this.goodsCategoryId
this.tabIndex = index
this.pageNum = 1
goodsList(this.pageSize, this.pageNum, this.goodsCategoryId, this.goodsName).then(
res => {
if (res.code == 200) {
this.goodsList = res.rows
this.total = res.total
}
uni.removeStorageSync('Refresh');
})
} else {
this.GoodsCategorychildrenid = this.GoodsCategorychildrenlist[index].id
this.tabIndex = index
this.pageNum = 1
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(
res => {
if (res.code == 200) {
this.goodsList = res.rows
this.total = res.total
}
uni.removeStorageSync('Refresh');
})
}
},
//id
GoodsCategorychildren(value) {
getGoodsCategoryNameList(value).then(res => {
this.GoodsCategorychildrenlist = [{
goodsCategoryName: '全部',
id: 99999999999999999,
}]
res.data.forEach(e => {
this.GoodsCategorychildrenlist.push(e)
})
})
},
//
goodsListinfo() {
goodsList(this.pageSize, this.pageNum, this.goodsCategoryId, this.goodsName).then(res => {
res.rows.forEach(e => {
this.goodsList.push(e)
})
this.total = res.total
this.pageNum = 1;
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(res => {
if (res.code == 200) {
res.rows.forEach(e => {
this.goodsList.push(e)
})
this.total = res.total
}
uni.removeStorageSync('Refresh');
})
},
//
@ -87,19 +167,45 @@
onReachBottom() { //
if (this.goodsList.length >= this.total) {} else {
this.pageNum++;
this.goodsListinfo()
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(res => {
if (res.code == 200) {
res.rows.forEach(e => {
this.goodsList.push(e)
})
}
})
}
},
onPullDownRefresh() { //
this.pageNum = 1;
goodsList(this.pageSize, this.pageNum, this.goodsCategoryId, this.goodsName).then(res => {
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(res => {
this.goodsList = res.rows
this.total = res.total
})
setTimeout(function() {
uni.stopPullDownRefresh();
}, 1000);
}
},
//1.
onShareAppMessage(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
url = decodeURIComponent(url)
return {
title: '泉医到家',
path: url,
}
},
//2.
onShareTimeline(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
url = decodeURIComponent(url)
return {
title: '泉医到家',
path: url,
}
},
}
</script>
@ -171,7 +277,6 @@
box-shadow: 0px 4rpx 8rpx 4rpx rgba(199, 200, 202, 0.8);
margin-bottom: 40rpx;
.price {
font-size: 36rpx;
color: #D43953;
@ -203,9 +308,9 @@
}
image {
border-radius: 25rpx 25rpx 0 0;
width: 100%;
height: 340rpx;
border-radius: 25rpx 25rpx 0 0;
}
}
}

View File

@ -0,0 +1,434 @@
<template>
<view class="apps">
<view class="" style="background-color: #fff;position: fixed;width: 100%;height: 85rpx;">
<view class="inputs">
<i class="icon"></i>
<input v-model="goodsName" type="text" name="" id="" class="input" placeholder="请输入商品名称">
</view>
</view>
<view class="tabbar">
<view class="lefttabbar">
<view class="lefttabbarlist">
<view class="item" v-for="(item,index) in GoodsCategorychildrenlist" :key='item.id'
@tap='tapscroll(item,index)'>
<view :class="tabIndex==index?'actives':'active'">
{{item.goodsCategoryName}}
</view>
</view>
</view>
</view>
<view class="righttabbar">
<view class="productlist" v-if='goodsList.length>0' @touchstart="start" @touchend="end"
@touchmove="move">
<view class="item" @tap='goCommodityDetails(item)' v-for="(item,index) in goodsList" :key="index">
<image :src="baseurl+item.goodsPictureUrl" mode=""></image>
<view class="title">
{{item.goodsName}}
</view>
<view class="text">
{{item.attributeDetailsName}}
</view>
<view class="price">
{{item.goodsPrice}}
</view>
</view>
<view style="width: 45%;" v-if="goodsList.length%2!=0">
</view>
<view v-if="goodsList.length <total">
用力上滑加载更多
</view>
</view>
<view class="noorder" v-if='goodsList.length==0'>
<image src="../../static/noorder.png" mode=""></image>
<view class="">
暂无商品
</view>
</view>
</view>
</view>
<!-- <view class="lefttabbar">
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
@scrolltolower="lower" @scroll="scroll">
<view class="scroll-view-item" v-for="(item,index) in GoodsCategorychildrenlist" :key='item.id'
@tap='tapscroll(item,index)'>
<view :class="tabIndex==index?'actives':'active'">
{{item.goodsCategoryName}}
</view>
</view>
</scroll-view>
</view> -->
</view>
</template>
<script>
import {
goodsList,
getGoodsCategoryNameList
} from '@/api/ProductList/ProductList.js';
import baseurl from '@/api/baseurl.js'
export default {
data() {
return {
//tabIndex便
baseurl: '',
pageNum: 1,
pageSize: 10,
goodsCategoryId: '', //
goodsList: [], //list
total: 0, //list
goodsName: '',
tabIndex: 0,
GoodsCategorychildrenlist: [], //list
GoodsCategorychildrenid: null,
scrollTop: 0,
old: {
scrollTop: 0
},
startData: {
clientX: '',
clientY: '',
},
moveX: 0,
touch: {},
};
},
watch: { //
goodsName() {
this.pageNum = 1;
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(res => {
this.goodsList = res.rows
this.total = res.total
})
},
},
onShow() {
var that = this
try {
const value3 = uni.getStorageSync('Refresh');
if (value3) {
that.goodsListinfo();
}
} catch (e) {}
},
onLoad(options) { //
this.goodsCategoryId = options.goodsCategoryId //id
this.GoodsCategorychildrenid = options.GoodsCategorychildrenid //id
this.tabIndex = options.index
this.baseurl = baseurl;
this.goodsListinfo()
this.GoodsCategorychildren(this.goodsCategoryId);
},
methods: {
// touch
start(e) { //@touchstart
console.log(e)
this.startData.pageY = e.changedTouches[0].pageY; //Y
},
end(e) { //@touchend
if ((this.startData.pageY - this.touch.pageY) > 100) { //
if (this.goodsList.length >= this.total) {} else {
this.pageNum++;
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(res => {
if (res.code == 200) {
res.rows.forEach(e => {
this.goodsList.push(e)
})
}
})
}
} else {
// this.touch = {};
}
},
move(event) { //@touchmove
console.log(event, 2)
let touch = event.touches[0]; // Objcet
this.touch = touch;
},
tapscroll(item, index) {
this.tabIndex = index
if (index == 0) {
this.GoodsCategorychildrenid = this.goodsCategoryId
this.tabIndex = index
this.pageNum = 1
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(
res => {
if (res.code == 200) {
this.goodsList = res.rows
this.total = res.total
}
uni.removeStorageSync('Refresh');
})
} else {
this.GoodsCategorychildrenid = this.GoodsCategorychildrenlist[index].id
this.tabIndex = index
this.pageNum = 1
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(
res => {
if (res.code == 200) {
this.goodsList = res.rows
this.total = res.total
}
uni.removeStorageSync('Refresh');
})
}
},
upper: function(e) {},
lower: function(e) {},
scroll: function(e) {
this.old.scrollTop = e.detail.scrollTop
},
//id
GoodsCategorychildren(value) {
getGoodsCategoryNameList(value).then(res => {
this.GoodsCategorychildrenlist = [{
goodsCategoryName: '全部',
id: 99999999999999999,
}]
res.data.forEach(e => {
this.GoodsCategorychildrenlist.push(e)
})
})
},
//
goodsListinfo() {
this.pageNum = 1;
goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(res => {
if (res.code == 200) {
res.rows.forEach(e => {
this.goodsList.push(e)
})
this.total = res.total
}
uni.removeStorageSync('Refresh');
})
},
//
goCommodityDetails(item) {
uni.navigateTo({
url: `/pages/CommodityDetails/CommodityDetails?goodsPrice=${item.goodsPrice}&goodsInfoId=${item.goodsInfoId}&buySource=${'SHOPPING_MALL'}&goodsAttributeId=${item.goodsAttributeId}`
})
},
},
// onReachBottom() { //
// if (this.goodsList.length >= this.total) {} else {
// this.pageNum++;
// goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(res => {
// if (res.code == 200) {
// res.rows.forEach(e => {
// this.goodsList.push(e)
// })
// }
// })
// }
// },
// onPullDownRefresh() { //
// this.pageNum = 1;
// goodsList(this.pageSize, this.pageNum, this.GoodsCategorychildrenid, this.goodsName).then(res => {
// this.goodsList = res.rows
// this.total = res.total
// })
// setTimeout(function() {
// uni.stopPullDownRefresh();
// }, 1000);
// },
//1.
onShareAppMessage(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
url = decodeURIComponent(url)
return {
title: '泉医到家',
path: url,
}
},
//2.
onShareTimeline(res) {
let pages = getCurrentPages();
let url = pages[pages.length - 1].$page.fullPath
url = decodeURIComponent(url)
return {
title: '泉医到家',
path: url,
}
},
}
</script>
<style lang="scss">
.apps {
width: 100%;
background-color: #F4F5F7;
color: #000000;
.inputs {
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
border: 1px solid #f0f0f0;
width: 90%;
height: 65rpx;
margin: 10rpx 0 10rpx 50%;
transform: translateX(-50%);
border-radius: 20rpx;
background-color: #f0f0f0;
z-index: 999;
.input {
margin: 0 auto;
position: absolute;
height: 65rpx;
// top: 8%;
left: 10%;
width: 90%;
font-size: 26rpx;
color: #000000;
}
.icon {
background: url(@/static/sousuo.png) no-repeat;
width: 30rpx;
height: 28rpx;
background-size: cover;
position: absolute;
top: 30%;
left: 3%;
}
}
::-webkit-scrollbar {
display: none;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
background: transparent;
color: transparent;
}
.tabbar {
display: flex;
padding-top: 100rpx;
height: 100vh;
width: 100%;
.righttabbar {
width: 70%;
// display: inline-block;
// height: calc(100vh - 85rpx);
height: 100%;
.productlist {
padding-bottom: 40rpx;
overflow: scroll;
width: 100%;
height: 100%;
margin: 0 auto;
padding-top: 15rpx;
border-radius: 25rpx;
display: flex;
flex-wrap: wrap;
justify-content: space-evenly;
background-color: #ffffff;
.item {
width: 45%;
background: #FFFFFF;
border-radius: 25rpx;
padding-bottom: 10rpx;
box-shadow: 0px 4rpx 8rpx 4rpx rgba(199, 200, 202, 0.8);
margin-bottom: 30rpx;
height: 450rpx;
.price {
font-size: 28rpx;
color: #D43953;
line-height: 50rpx;
padding-left: 10rpx;
}
.text {
font-size: 22rpx;
padding: 0 10rpx;
// text-overflow: ellipsis;
// overflow: hidden;
// white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.title {
font-size: 28rpx;
color: #000000;
line-height: 50rpx;
padding-left: 10rpx;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
image {
border-radius: 25rpx 25rpx 0 0;
width: 100%;
height: 270rpx;
}
}
}
}
.lefttabbar {
width: 30%;
// display: inline-block;
height: 100%;
padding-top: 20rpx;
.lefttabbarlist {
overflow: scroll;
height: 100%;
}
.actives {
color: red;
font-size: 34rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
background-color: #ffffff;
// border-radius: 25rpx 0 0 25rpx;
}
.active {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.item {
color: #000000;
height: 80rpx;
line-height: 80rpx;
text-align: center;
font-size: 30rpx;
width: 100%;
}
}
}
.noorder {
view {
text-align: center;
font-size: 40rpx;
color: #BFBFBF;
}
image {
display: block;
margin: 20% auto 50rpx;
width: 160rpx;
height: 200rpx;
}
}
}
</style>

View File

@ -1,7 +1,7 @@
<template>
<view class="app">
<view class="cards">
<view class="item" :style="{background:listcolor[index]}" @tap='goProductList(item)'
<view class="item" :style="{background:listcolor[index % listcolor.length]}" @tap='goProductList(item)'
v-for="(item,index) in goodsCategoryList" :key="index">
<image :src="item.goodsCategoryPicture" mode=""></image>
<view class="title" style="font-size:42rpx">
@ -38,12 +38,11 @@
img: '../../static/cp.png',
},
],
listcolor: ['#00C176', '#D43953', '#E1AE3C', '#4C7BC9', '#9e4dd0', '#00C176', '#D43953', '#E1AE3C',
'#4C7BC9', '#9e4dd0',
], //
listcolor: ['#00C176', '#D43953', '#E1AE3C', '#4C7BC9', '#9e4dd0'], //
};
},
onLoad(options) { //
this.pageNum = 1
this.goodsCategory()
},
methods: {

View File

@ -0,0 +1,168 @@
<template>
<view style="position: relative;">
<!--顶部导航栏-->
<view class="uni-top-tabbar">
<scroll-view scroll-x="true" class="uni-swiper-tab" :style="{backgroundColor:bgColor}">
<view v-for="(tabBar,index) in tabBars" :key="index" class="swiper-tab-list"
:class="{'active': tabIndex==index}" :style="{color:tabIndex==index?selectedTextColor:textColor}"
@tap="toggleTab(index)">
<view class="title">
{{tabBar.goodsCategoryName}}
</view>
<view class="swiper-tab-line"
:style="{backgroundColor:tabIndex==index?selectedBottomColor:bgColor}"></view>
</view>
</scroll-view>
<view class="fenlei" @tap='toggleTab(1111111111111)'>
<image src="../../static/fenlei.png" mode=""></image>
<view class="">
分类
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: "topTabbar",
props: {
//
tabIndex: {
type: Number,
default: 0
},
//
tabBars: {
type: Array,
default: [{
goodsCategoryName: '标签1',
id: 1
},
{
goodsCategoryName: '标签2',
id: 2
},
{
goodsCategoryName: '标签3',
id: 3
},
{
goodsCategoryName: '标签4',
id: 4
},
{
goodsCategoryName: '标签5',
id: 5
},
{
goodsCategoryName: '标签6',
id: 6
}
]
},
//
selectedBottomColor: {
type: String,
default: '#D43953'
},
//
bgColor: {
type: String,
default: '#ffffff'
},
//
selectedTextColor: {
type: String,
default: '#D43953'
},
//
textColor: {
type: String,
default: '#000000'
}
},
data() {
return {}
},
methods: {
//
toggleTab(index) {
this.$emit("toggleToptab", index)
}
}
}
</script>
<style lang="scss">
.fenlei {
width: 25%;
display: inline-block;
background-color: #fff;
line-height: 70rpx;
font-weight: normal;
height: 75rpx;
text-align: center;
color: #000000;
position: absolute;
right: 0;
top: 0;
font-size: 32rpx;
view {
position: absolute;
right: 25%;
}
image {
width: 45rpx;
height: 45rpx;
position: absolute;
left: 18%;
top: 50%;
transform: translateY(-55%);
}
}
.title {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
}
.uni-top-tabbar {
/* 以下3项设置用于开启底部阴影显示 */
/* position: relative;
z-index: 1;
overflow: visible; */
width: 75%;
.uni-swiper-tab {
height: 75rpx;
//
//box-shadow: rgba(170, 170, 170, 0.5) 0 2rpx 8rpx 0;
white-space: nowrap;
.swiper-tab-list {
font-size: 32rpx;
font-weight: normal;
line-height: 70rpx;
padding: 0 15rpx;
//
text-align: center;
display: inline-block;
}
.active {
.swiper-tab-line {
height: 4rpx;
width: 100%;
margin: auto;
}
}
}
}
</style>

View File

@ -2,6 +2,28 @@
font-size: 35rpx;
padding: 0 0 200rpx 0;
position: relative;
.mask{
width: 80%;
height: 200rpx;
background-color: #fff;
position: absolute;
top:50%;
left:50%;
transform: translate(-50%,-50%);
.cancellation{
background: #FFFFFF;
height: 100rpx;
line-height: 100rpx;
text-align: center;
}
.out{
color: #FFFFFF;
height: 100rpx;
line-height: 100rpx;
text-align: center;
background-color: #969394;
}
}
.signout{
// position: absolute;
// bottom: 60rpx;

View File

@ -81,35 +81,20 @@
v-for="(item,index) in appPersonallist.patientDiseaseInfoList"
:key="index">{{item.diseaseName}}</span>
</view>
<view class="signout" @tap='remove'>
退出账号
<view class="signout" @tap='removeshow=true'>
账号管理
</view>
<u-mask :show="removeshow" @tap="removeshow = false" class='masks'>
<view class="mask">
<view class="out" @tap='remove'>
退出账号
</view>
<view class="cancellation" @tap="remove('cancellation')">
注销账号
</view>
</view>
</u-mask>
</view>
<!-- <view class="External" style="margin: 200rpx auto 0;">
<view class="lefttext">
积分:
</view>
<view class="righttext">
{{appPersonallist.integral}}
</view>
<image src="../../static/jiantou.png" mode=""></image>
</view>
<view class="External">
<view class="lefttext">
健康档案
</view>
<view class="righttext">
</view>
<image src="../../static/jiantou.png" mode=""></image>
</view>
<view class="External">
<view class="lefttext">
我的设备
</view>
<view class="righttext">
</view>
<image src="../../static/jiantou.png" mode=""></image>
</view> -->
<u-toast ref="uToast" />
</view>
</template>
@ -117,6 +102,7 @@
<script>
import {
appPersonal,
accountCancellation
} from '@/api/user/user.js';
import baseurl from '@/api/baseurl.js'
import {
@ -125,9 +111,11 @@
export default {
data() {
return {
removeshow: false,
baseurl: '',
appPersonallist: [], //
timer: null,
patientId: null,
}
},
onShow() {
@ -137,23 +125,47 @@
onLoad(options) {}, //
methods: {
//退
remove() {
remove(row) {
let that = this
uni.showModal({
title: '提示',
content: '确认要退出此账号吗',
success: function(res) {
if (res.confirm) {
that.removeS();
} else if (res.cancel) {
that.$refs.uToast.show({
title: '取消退出账号',
type: 'error',
duration: '1000'
})
if (row == 'cancellation') {
uni.showModal({
title: '提示',
content: '确认要注销此账号吗',
success: function(res) {
if (res.confirm) {
accountCancellation(that.patientId).then(res => {
if (res.code == 200) {
uni.reLaunch({
url: "/pages/login/login"
})
}
})
} else if (res.cancel) {
that.$refs.uToast.show({
title: '取消注销账号',
type: 'error',
duration: '1000'
})
}
}
}
});
});
} else {
uni.showModal({
title: '提示',
content: '确认要退出此账号吗',
success: function(res) {
if (res.confirm) {
that.removeS();
} else if (res.cancel) {
that.$refs.uToast.show({
title: '取消退出账号',
type: 'error',
duration: '1000'
})
}
}
});
}
},
//
myInfo() {
@ -161,6 +173,7 @@
try {
const value = uni.getStorageSync('patientId');
if (value) {
that.patientId = value
getExistPatientByPatientId(value).then(res => {
if (res.code == 200 && res.msg == 'LOGIN') {
appPersonal(value).then(response => {
@ -185,9 +198,7 @@
}
})
}
} catch (e) {
// error
}
} catch (e) {}
// uni.getStorage({
// key: 'patientId',
// success: function(res) {
@ -218,13 +229,7 @@
})
}
},
onBackPress(options) {
// if (options.from === 'navigateBack') {
// return false;
// }
// this.back();
// return true;
},
onBackPress(options) {},
}
</script>
<style lang="scss">

BIN
static/fenlei.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB