修改
This commit is contained in:
parent
944486e7f4
commit
1193d1ae5c
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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'
|
||||
})
|
||||
}
|
||||
|
||||
@ -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'
|
||||
})
|
||||
}
|
||||
|
||||
@ -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'
|
||||
})
|
||||
}
|
||||
|
||||
@ -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" : {
|
||||
|
||||
@ -346,6 +346,14 @@
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#ffffff"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/classification/classification",
|
||||
"style": {
|
||||
"navigationBarTitleText": "分类",
|
||||
"enablePullDownRefresh": false
|
||||
// "disableScroll": true
|
||||
}
|
||||
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
||||
@ -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">
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
434
pages/classification/classification.vue
Normal file
434
pages/classification/classification.vue
Normal 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>
|
||||
@ -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: {
|
||||
|
||||
168
pages/toptabbar/toptabbar.vue
Normal file
168
pages/toptabbar/toptabbar.vue
Normal 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>
|
||||
@ -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;
|
||||
|
||||
@ -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
BIN
static/fenlei.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Loading…
Reference in New Issue
Block a user