修改
16
api/Personal/Personal.js
Normal file
@ -0,0 +1,16 @@
|
||||
import request from "../request.js"
|
||||
export function appPersonal(patientId) {
|
||||
return request({
|
||||
url: `/nurseApp/login/appPersonal?patientId=${patientId}`,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
//邀请
|
||||
export function inviteFriends(patientId) {
|
||||
return request({
|
||||
url: `/nurseApplet/patientInfo/inviteFriends?inviteId=${patientId}`,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
@ -1,8 +1,16 @@
|
||||
import request from "../request.js"
|
||||
|
||||
export function goodsList(pageSize,pageNum,goodsCategoryId,goodsName) {
|
||||
export function goodsList(pageSize, pageNum, goodsCategoryId, goodsName) {
|
||||
return request({
|
||||
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'
|
||||
})
|
||||
}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import request from "../request.js"
|
||||
|
||||
export function goodsCategoryList(pageSize,pageNum) {
|
||||
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'
|
||||
})
|
||||
}
|
||||
|
||||
@ -101,6 +101,7 @@
|
||||
"navigationBarTitleText": "医路优品",
|
||||
"navigationBarBackgroundColor": "#ffffff",
|
||||
"onReachBottomDistance": 40, //距离底部多远时触发 单位为px
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": true //设置参数为true
|
||||
}
|
||||
}, {
|
||||
@ -141,7 +142,8 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人中心",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationBarBackgroundColor": "#ffffff"
|
||||
"navigationBarBackgroundColor": "#ffffff",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<view class="item" @tap='show=true'>退款原因
|
||||
<span v-if="dictname==''">请选择</span>
|
||||
<span v-else style='color: #000000;'>{{dictname}}</span>
|
||||
<image src="../../static/pic.png" mode=""></image>
|
||||
<image src="../../static/huijiantou.png" mode=""></image>
|
||||
</view>
|
||||
<view class="priceinfo">退款金额
|
||||
<view class="priceback">¥{{order.totalPrice}}
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
<view class="content">
|
||||
{{updata.goodsAttributeName}}
|
||||
</view>
|
||||
<image src="../../static/jiantou.png" mode=""></image>
|
||||
<image src="../../static/huijiantou.png" mode=""></image>
|
||||
</view>
|
||||
<view class="Discount common">
|
||||
<view class="selected">
|
||||
@ -28,7 +28,7 @@
|
||||
<!-- <view class="content">
|
||||
购买最多可获得3积分
|
||||
</view>
|
||||
<image src="../../static/jiantou.png" mode=""></image> -->
|
||||
<image src="../../static/huijiantou.png" mode=""></image> -->
|
||||
</view>
|
||||
<view class="service common">
|
||||
<view class="selected">
|
||||
@ -40,7 +40,7 @@
|
||||
<view class="content" style="display: block;">
|
||||
· 仅工作日发货
|
||||
</view>
|
||||
<!-- <image src="../../static/jiantou.png" mode=""></image> -->
|
||||
<!-- <image src="../../static/huijiantou.png" mode=""></image> -->
|
||||
</view>
|
||||
<view class="picture">
|
||||
<view class="selected">
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<view class="" v-if="total>0">
|
||||
<view class="Apayment" v-for='(item,index) in orderlist' :key="index">
|
||||
<view class="names">店铺名称
|
||||
<image class="picture" src="/static/pic.png" mode=""></image>
|
||||
<image class="picture" src="/static/huijiantou.png" mode=""></image>
|
||||
<span v-if="item.orderStatus=='WAIT_PAY'">待付款</span>
|
||||
<span v-if="item.orderStatus=='WAIT_REFUND'">退款中</span>
|
||||
<span v-if="item.orderStatus=='CANCEL'">已取消</span>
|
||||
|
||||
@ -36,13 +36,13 @@
|
||||
</view>
|
||||
<view class="case">
|
||||
<span class="text">病例上传</span>
|
||||
<image src="../../static/jiantou.png" mode=""></image>
|
||||
<!-- <img src="/static/jiantou.png" alt=""> -->
|
||||
<image src="../../static/huijiantou.png" mode=""></image>
|
||||
<!-- <img src="/static/huijiantou.png" alt=""> -->
|
||||
</view>
|
||||
<view class="case">
|
||||
<span class="text">化验单上传</span>
|
||||
<image src="../../static/jiantou.png" mode=""></image>
|
||||
<!-- <img src="/static/jiantou.png" alt=""> -->
|
||||
<image src="../../static/huijiantou.png" mode=""></image>
|
||||
<!-- <img src="/static/huijiantou.png" alt=""> -->
|
||||
</view>
|
||||
<view class="btn" @tap='show=true'>确认</view>
|
||||
</view>
|
||||
|
||||
@ -1,143 +1,560 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="cards">
|
||||
<view class="item" style="background-color: #9E4DD0;" @tap='gouser'>
|
||||
<image src="../../static/user.png" mode=""></image>
|
||||
<view class="title">
|
||||
个人信息
|
||||
<view class="user" v-if="appPersonallist">
|
||||
<image v-if="appPersonallist.headPictureUrl" class="img" :src="baseurl+appPersonallist.headPictureUrl"
|
||||
mode=""></image>
|
||||
<image class="img" v-else src="../../static/user.png" mode=""></image>
|
||||
<image class="bjimg" :src="bjimg" mode=""></image>
|
||||
<view class="phone" v-if="appPersonallist.patientName">
|
||||
{{appPersonallist.patientName}}
|
||||
</view>
|
||||
<view class="nickname" style="top:200rpx">
|
||||
<span style='padding-right: 10rpx;' v-if="appPersonallist.age!=null&&appPersonallist.age>=0">
|
||||
{{appPersonallist.age}}
|
||||
</span>
|
||||
<span style='padding-right: 30rpx;' v-if="appPersonallist.age!=null&&appPersonallist.age>=0">
|
||||
岁
|
||||
</span>
|
||||
{{appPersonallist.sex=='MALE'?'男':''}}
|
||||
{{appPersonallist.sex=='FEMALE'?'女':''}}
|
||||
</span>
|
||||
</view>
|
||||
<view class="nickname">
|
||||
{{appPersonallist.phone}}
|
||||
</view>
|
||||
<view class="modify" @tap='updatainfo()'>
|
||||
修改信息
|
||||
<image src="../../static/xg.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="user" v-else>
|
||||
<image class="img" src="../../static/user.png" mode=""></image>
|
||||
<image class="bjimg" :src="bjimg" mode=""></image>
|
||||
<view class="login" @tap='gologin'>
|
||||
登录
|
||||
</view>
|
||||
</view>
|
||||
<view class="userinfo">
|
||||
<view class="item" @tap='goHealthrecords'>
|
||||
<image src="../../static/jkda.png" mode=""></image>
|
||||
<view class="text">
|
||||
健康档案
|
||||
</view>
|
||||
</view>
|
||||
<view class=" item" style="background-color: #E1AE3C ;" @tap='goorder'>
|
||||
<image src="../../static/dingdan.png" mode=""></image>
|
||||
<view class="title">
|
||||
我的订单
|
||||
<view class="item" @tap='gointegral' v-if="appPersonallist">
|
||||
<image src="../../static/jifen.png" mode=""></image>
|
||||
<view class="text">
|
||||
积分
|
||||
<span style='padding:0 5rpx' v-if="appPersonallist.integral&&appPersonallist.integral>=0">
|
||||
{{appPersonallist.integral}}</span>
|
||||
<span style='padding:0 5rpx' v-else>
|
||||
0</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="item" @tap="gocoupon" v-if="appPersonallist">
|
||||
<image src="../../static/yhj.png" mode=""></image>
|
||||
<view class="text">
|
||||
优惠券
|
||||
<span style='padding:0 5rpx'
|
||||
v-if="appPersonallist.patientCouponCount&&appPersonallist.patientCouponCount>=0">
|
||||
{{appPersonallist.patientCouponCount}}</span>
|
||||
<span style='padding:0 5rpx' v-else>
|
||||
0</span>张
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="CommodityOrder" @tap="goorder">
|
||||
<view class="title">
|
||||
商品订单
|
||||
</view>
|
||||
<view class="text">
|
||||
查看全部
|
||||
<image src="../../static/huijiantou.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="center">
|
||||
<view class="OrderStatus" @tap="gopaid('WAIT_PAY')" v-if="appPersonallist">
|
||||
<image src="/static/Tobepaid.png" mode=""></image>
|
||||
<view class="title">待付款</view>
|
||||
<view class="orderCount" v-if="appPersonallist.waitPayCount>0&&appPersonallist.waitPayCount<100">
|
||||
{{appPersonallist.waitPayCount}}
|
||||
</view>
|
||||
<view class="orderCount" style="width: 57rpx;border-radius: 17rpx;right:25rpx"
|
||||
v-if="appPersonallist.waitPayCount>=100">
|
||||
99+
|
||||
</view>
|
||||
</view>
|
||||
<view class="OrderStatus" @tap="goreceive('WAIT_RECEIVED_GOODS')" v-if="appPersonallist">
|
||||
<image src="/static/received.png" mode=""></image>
|
||||
<view class="title">待收货</view>
|
||||
<view class="orderCount"
|
||||
v-if="appPersonallist.waitReceivedGoodsCount>0&&appPersonallist.waitReceivedGoodsCount<100">
|
||||
{{appPersonallist.waitReceivedGoodsCount}}
|
||||
</view>
|
||||
<view class="orderCount" style="width: 57rpx;border-radius: 17rpx;right:25rpx"
|
||||
v-if="appPersonallist.waitReceivedGoodsCount>=100">
|
||||
99+
|
||||
</view>
|
||||
</view>
|
||||
<view class="OrderStatus" @tap="gocompleted('RECEIVED_GOODS')" v-if="appPersonallist">
|
||||
<image src="/static/evaluated.png" mode=""></image>
|
||||
<view class="title">待评价</view>
|
||||
<view class="orderCount"
|
||||
v-if="appPersonallist.receivedGoodsCount>0&&appPersonallist.receivedGoodsCount<100">
|
||||
{{appPersonallist.receivedGoodsCount}}
|
||||
</view>
|
||||
<view class="orderCount" style="width: 57rpx;border-radius: 17rpx;right:25rpx"
|
||||
v-if="list.receivedGoodsCount>=100">
|
||||
99+
|
||||
</view>
|
||||
</view>
|
||||
<view class="OrderStatus" @tap="goEVALUATED('EVALUATED')" v-if="appPersonallist">
|
||||
<image src="/static/finished.png" mode=""></image>
|
||||
<view class="title">已完成</view>
|
||||
<!-- <view class="orderCount" v-if="list.evaluatedCount>0&&list.evaluatedCount<100">
|
||||
{{list.evaluatedCount}}
|
||||
</view>
|
||||
<view class="orderCount" v-if="list.evaluatedCount>=100">
|
||||
99+
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="service" @tap="gonursestation">
|
||||
<view class="serviceorder">护理站服务订单</view>
|
||||
<image src="../../static/huijiantou.png" mode=""></image>
|
||||
</view>
|
||||
<view class="service" style="top:1040rpx" @tap='remove'>
|
||||
<view class="serviceorder">退出账号</view>
|
||||
<image src="../../static/huijiantou.png" mode=""></image>
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getExistPatientByPatientId
|
||||
appPersonal,
|
||||
} from '@/api/Personal/Personal.js';
|
||||
import {
|
||||
existPatientInfo
|
||||
} from '@/api/startup/index.js'
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
baseurl: '',
|
||||
appPersonallist: null, //获取个人信息
|
||||
timer: null,
|
||||
};
|
||||
list: {},
|
||||
bjimg: '',
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.bjimg = baseurl + '/profile/appletPicture/inviteFriendsOne.png'
|
||||
let that = this
|
||||
this.baseurl = baseurl
|
||||
this.myInfo()
|
||||
const value = uni.getStorageSync('patientId');
|
||||
if (value) {} else {
|
||||
that.appPersonallist = null
|
||||
that.$refs.uToast.show({
|
||||
title: '请先登录',
|
||||
type: 'error',
|
||||
duration: '1000',
|
||||
})
|
||||
}
|
||||
},
|
||||
onLoad(options) {},
|
||||
methods: {
|
||||
goorder() {
|
||||
remove() {
|
||||
let that = this
|
||||
const value = uni.getStorageSync('patientId');
|
||||
var that = this
|
||||
if (value) {
|
||||
getExistPatientByPatientId(value).then(res => {
|
||||
if (res.code == 200) {
|
||||
if (res.msg == 'LOGIN') {
|
||||
uni.navigateTo({
|
||||
url: '/pages/order/order'
|
||||
})
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认要退出此账号吗',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.removeStorageSync('patientId');
|
||||
uni.removeStorageSync('phone');
|
||||
that.$refs.uToast.show({
|
||||
title: '当前用户信息不存在,请重新登录',
|
||||
type: 'error',
|
||||
duration: '1500'
|
||||
title: '退出账号成功',
|
||||
type: 'success',
|
||||
duration: '1000'
|
||||
})
|
||||
that.remove();
|
||||
if (that.timer) {
|
||||
clearTimeout(that.timer)
|
||||
}
|
||||
that.timer = setTimeout(e => {
|
||||
uni.switchTab({
|
||||
url: '/pages/homepage/homepage'
|
||||
})
|
||||
}, 1000)
|
||||
}
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '登录异常,请重新登录',
|
||||
type: 'error',
|
||||
duration: '1500'
|
||||
})
|
||||
that.remove();
|
||||
}
|
||||
})
|
||||
});
|
||||
} else {
|
||||
that.remove();
|
||||
that.$refs.uToast.show({
|
||||
title: '请重新登录',
|
||||
title: '您未登录',
|
||||
type: 'error',
|
||||
duration: '1500'
|
||||
duration: '1000'
|
||||
})
|
||||
}
|
||||
},
|
||||
remove() {
|
||||
var that = this
|
||||
removes() {
|
||||
this.appPersonallist = null
|
||||
uni.removeStorageSync('patientId');
|
||||
uni.removeStorageSync('phone');
|
||||
uni.removeStorageSync('password');
|
||||
if (that.timer) {
|
||||
clearTimeout(that.timer)
|
||||
}
|
||||
that.timer = setTimeout(e => {
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}, 1500)
|
||||
uni.removeStorageSync('Refresh');
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
//跳转个人信息页面
|
||||
gouser() {
|
||||
const value = uni.getStorageSync('patientId');
|
||||
//获取个人信息
|
||||
myInfo() {
|
||||
var that = this
|
||||
if (value) {
|
||||
getExistPatientByPatientId(value).then(res => {
|
||||
if (res.code == 200) {
|
||||
if (res.msg == 'LOGIN') {
|
||||
uni.navigateTo({
|
||||
url: '/pages/user/user'
|
||||
})
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '当前用户信息不存在,请重新登录',
|
||||
type: 'error',
|
||||
duration: '1500'
|
||||
})
|
||||
that.remove();
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value2) {
|
||||
appPersonal(value2).then(Response => {
|
||||
if (Response.code == 200) {
|
||||
that.appPersonallist = Response.data
|
||||
if (!that.appPersonallist.integral) {
|
||||
that.appPersonallist.integral = 0
|
||||
}
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '登录异常,请重新登录',
|
||||
type: 'error',
|
||||
duration: '1500'
|
||||
})
|
||||
that.remove();
|
||||
that.appPersonallist.homeLatitude = Number(that.appPersonallist
|
||||
.homeLatitude)
|
||||
that.appPersonallist.homeLongitude = Number(that.appPersonallist
|
||||
.homeLongitude)
|
||||
} else if (Response.code == 9999) {} else {
|
||||
that.removes();
|
||||
}
|
||||
})
|
||||
} else {
|
||||
that.$refs.uToast.show({
|
||||
title: '请重新登录',
|
||||
type: 'error',
|
||||
duration: '1500'
|
||||
})
|
||||
that.remove();
|
||||
}
|
||||
},
|
||||
updatainfo() {
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value2) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/modify/modify`
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
},
|
||||
//护理站服务订单
|
||||
gonursestation() {
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value2) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/Nursingstationserviceorder/Nursingstationserviceorder'
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
},
|
||||
//待收货
|
||||
goreceive(item) {
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value2) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
},
|
||||
//全部订单
|
||||
goorder() {
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value2) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/CommodityOrder/CommodityOrder'
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
},
|
||||
//去登陆
|
||||
gologin() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
},
|
||||
//优惠券
|
||||
gocoupon() {
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value2) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/coupon/coupon'
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
},
|
||||
//积分页面
|
||||
gointegral() {
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value2) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/integral/integral?integral=${this.appPersonallist.integral}`
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
},
|
||||
//已完成
|
||||
goEVALUATED(item) {
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value2) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
},
|
||||
//待评价
|
||||
gocompleted(item) {
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value2) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
},
|
||||
//待付款
|
||||
gopaid(item) {
|
||||
const value2 = uni.getStorageSync('patientId');
|
||||
if (value2) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/CommodityOrder/CommodityOrder?orderStatus=${item}`
|
||||
})
|
||||
} else {
|
||||
this.gologin();
|
||||
}
|
||||
},
|
||||
//健康档案
|
||||
goHealthrecords() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/Healthrecords/Healthrecords'
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
font-size: 35rpx;
|
||||
padding: 0 0 200rpx 0;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
|
||||
.cards {
|
||||
padding: 22px 0 20px 0;
|
||||
.service {
|
||||
position: absolute;
|
||||
top: 915rpx;
|
||||
left: 2%;
|
||||
width: 96%;
|
||||
height: 100rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 10rpx;
|
||||
|
||||
.item {
|
||||
image {
|
||||
width: 13rpx;
|
||||
height: 23rpx;
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.serviceorder {
|
||||
font-size: 32rpx;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
position: absolute;
|
||||
left: 31rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
position: absolute;
|
||||
top: 590rpx;
|
||||
left: 2%;
|
||||
width: 96%;
|
||||
height: 300rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0rpx 9rpx 31rpx 9rpx rgba(0, 0, 0, 0.03);
|
||||
border-radius: 10rpx;
|
||||
|
||||
.center {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding-top: 50rpx;
|
||||
|
||||
.OrderStatus {
|
||||
position: relative;
|
||||
height: 180rpx;
|
||||
width: 25%;
|
||||
|
||||
.title {
|
||||
position: absolute;
|
||||
top: 80rpx;
|
||||
width: 100%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
image {
|
||||
width: 71rpx;
|
||||
height: 63rpx;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.orderCount {
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
background: #FFFFFF;
|
||||
border: 3rpx solid #DC222F;
|
||||
position: absolute;
|
||||
top: -20rpx;
|
||||
right: 35rpx;
|
||||
font-size: 22rpx;
|
||||
border-radius: 50%;
|
||||
line-height: 35rpx;
|
||||
color: #DC222F;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.CommodityOrder {
|
||||
font-size: 32rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
position: relative;
|
||||
|
||||
.title {
|
||||
width: 80%;
|
||||
top: 60%;
|
||||
position: absolute;
|
||||
left: 31rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
font-size: 26rpx;
|
||||
color: #969494;
|
||||
|
||||
image {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
padding-left: 10rpx;
|
||||
width: 13rpx;
|
||||
height: 23rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.userinfo {
|
||||
position: absolute;
|
||||
top: 340rpx;
|
||||
left: 2%;
|
||||
display: flex;
|
||||
width: 96%;
|
||||
height: 220rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
box-shadow: 0rpx 0rpx 24rpx 0rpx rgba(101, 176, 249, 0.41);
|
||||
|
||||
.item {
|
||||
width: 33%;
|
||||
height: 100%;
|
||||
padding-top: 40rpx;
|
||||
|
||||
.text {
|
||||
font-size: 30rpx;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
|
||||
image {
|
||||
// margin-left: 50%;
|
||||
// transform: translateX(-50%);
|
||||
width: 85rpx;
|
||||
height: 74rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.user {
|
||||
width: 100%;
|
||||
height: 400rpx;
|
||||
position: relative;
|
||||
color: #FFFFFF;
|
||||
font-size: 39rpx;
|
||||
|
||||
.modify {
|
||||
position: absolute;
|
||||
right: 3%;
|
||||
top: 200rpx;
|
||||
font-size: 28rpx;
|
||||
|
||||
image {
|
||||
width: 23rpx;
|
||||
height: 23rpx;
|
||||
padding-left: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.login {
|
||||
position: absolute;
|
||||
top: 170rpx;
|
||||
left: 35%;
|
||||
font-size: 36rpx;
|
||||
width: 180rpx;
|
||||
line-height: 70rpx;
|
||||
border: 1rpx solid #fff;
|
||||
height: 70rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.nickname {
|
||||
position: absolute;
|
||||
top: 250rpx;
|
||||
left: 35%;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.phone {
|
||||
position: absolute;
|
||||
top: 130rpx;
|
||||
left: 35%;
|
||||
}
|
||||
|
||||
.bjimg {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.img {
|
||||
z-index: 999;
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
border-radius: 50%;
|
||||
background: #F6F6F6;
|
||||
position: absolute;
|
||||
top: 130rpx;
|
||||
left: 8%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,13 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<u-tabs :list="GoodsCategorychildrenlist" :current="tabIndex" @change="toggleTab"
|
||||
v-if="GoodsCategorychildrenlist.length>=2"></u-tabs>
|
||||
<view class="fenlei" @tap='toggleTab(1111111111111)' v-if="GoodsCategorychildrenlist.length>=2">
|
||||
<image src="../../static/fenlei.png" mode=""></image>
|
||||
<view class="">
|
||||
分类
|
||||
</view>
|
||||
</view>
|
||||
<view class="inputs">
|
||||
<i class="icon"></i>
|
||||
<input v-model="goodsName" type="text" name="" id="" class="input" placeholder="请输入商品名称">
|
||||
@ -17,7 +25,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 +34,22 @@
|
||||
暂无商品
|
||||
</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'
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
//将选中标签的索引绑定为tabIndex,以便后续的调用
|
||||
tabIndex: 0,
|
||||
baseurl: '',
|
||||
title: '医路优品', //导航栏标题
|
||||
pageNum: 1,
|
||||
@ -45,31 +58,99 @@
|
||||
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 = [{
|
||||
name: '全部',
|
||||
id: 99999999999999999,
|
||||
}]
|
||||
res.data.forEach(e => {
|
||||
e.name = e.goodsCategoryName
|
||||
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,26 +168,85 @@
|
||||
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>
|
||||
|
||||
<style lang="scss">
|
||||
::v-deep .u-tabs {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.app {
|
||||
padding: 0;
|
||||
|
||||
.fenlei {
|
||||
width: 20%;
|
||||
display: inline-block;
|
||||
background-color: #fff;
|
||||
line-height: 86rpx;
|
||||
font-weight: normal;
|
||||
height: 86rpx;
|
||||
text-align: center;
|
||||
color: #000000;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
font-size: 32rpx;
|
||||
|
||||
view {
|
||||
position: absolute;
|
||||
right: 20%;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 45rpx;
|
||||
height: 45rpx;
|
||||
position: absolute;
|
||||
left: 10%;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
.noorder {
|
||||
view {
|
||||
text-align: center;
|
||||
@ -171,7 +311,6 @@
|
||||
box-shadow: 0px 4rpx 8rpx 4rpx rgba(199, 200, 202, 0.8);
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
|
||||
.price {
|
||||
font-size: 36rpx;
|
||||
color: #D43953;
|
||||
@ -203,9 +342,9 @@
|
||||
}
|
||||
|
||||
image {
|
||||
border-radius: 25rpx 25rpx 0 0;
|
||||
width: 100%;
|
||||
height: 340rpx;
|
||||
border-radius: 25rpx 25rpx 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -329,6 +329,7 @@
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-evenly;
|
||||
background-color: #ffffff;
|
||||
align-content: flex-start;
|
||||
|
||||
.item {
|
||||
width: 45%;
|
||||
|
||||
@ -3,24 +3,26 @@
|
||||
<view class="title">
|
||||
长按识别二维码
|
||||
</view>
|
||||
<image src="../../static/kefuzx.jpg" mode="" :show-menu-by-longpress="true"></image>
|
||||
<image :src="img" mode="" :show-menu-by-longpress="true"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import baseurl from '@/api/baseurl.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
imageUrl: [
|
||||
'../../static/kefuzx.jpg'
|
||||
]
|
||||
img: '',
|
||||
};
|
||||
},
|
||||
onShow() {
|
||||
this.img = baseurl + '/profile/appletPicture/customer.jpg'
|
||||
},
|
||||
methods: {
|
||||
previewImage(e) {
|
||||
uni.previewImage({
|
||||
// 需要预览的图片链接列表。若无需预览,可以注释urls
|
||||
urls: this.imageUrl,
|
||||
urls: this.img,
|
||||
// 为当前显示图片的链接/索引值
|
||||
current: 0,
|
||||
// 图片指示器样式
|
||||
@ -39,7 +41,25 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
},
|
||||
//1.分享给朋友
|
||||
onShareAppMessage(res) {
|
||||
let pages = getCurrentPages();
|
||||
let url = pages[pages.length - 1].$page.fullPath
|
||||
return {
|
||||
title: '泉医到家',
|
||||
path: url,
|
||||
}
|
||||
},
|
||||
//2.分享到朋友圈
|
||||
onShareTimeline(res) {
|
||||
let pages = getCurrentPages();
|
||||
let url = pages[pages.length - 1].$page.fullPath
|
||||
return {
|
||||
title: '泉医到家',
|
||||
path: url,
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<!-- <u-swiper :list="swiperImgUrls" effect3d='true' height='400' interval='5000' duration='2000'></u-swiper> -->
|
||||
|
||||
|
||||
<!-- <swiper class="swiper-block" :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000"
|
||||
:circular='true' previous-margin='90rpx' next-margin='90rpx' current='0' @change="swiperChange">
|
||||
<swiper-item class="swiper-item" v-for="(item,index) in swiperImgUrls">
|
||||
@ -12,8 +10,8 @@
|
||||
</swiper> -->
|
||||
<view class="container">
|
||||
<view>
|
||||
<swiper :indicator-dots="true" :current="currentIndex" :circular="true" previous-margin="80rpx"
|
||||
next-margin="80rpx" :autoplay="autoplay" interval="3000" duration="1000" show-center-play-btn="true"
|
||||
<swiper :indicator-dots="true" :current="currentIndex" :circular="true" previous-margin="55rpx"
|
||||
next-margin="55rpx" :autoplay="autoplay" interval="3000" duration="1000" show-center-play-btn="true"
|
||||
class="swiper-block" circular='true' @change="swiperChange">
|
||||
<swiper-item v-for="(item ,index) in swiperImgUrls" :key="index" class="swiper-item">
|
||||
<view v-show="!splits(item)" wx-if="{item}">
|
||||
@ -32,8 +30,6 @@
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="items">
|
||||
<view class="item" @tap="gosite">
|
||||
<image src="../../static/hlz.png" mode=""></image>
|
||||
@ -173,8 +169,9 @@
|
||||
e.image = baseurl + e.posterPictureUrl
|
||||
this.swiperImgUrls.push(e.image)
|
||||
})
|
||||
if(res.data.poserInfoList[0].video){
|
||||
res.data.poserInfoList[0].video = baseurl + res.data.poserInfoList[0].posterVideoUrl
|
||||
if (res.data.poserInfoList[0].video) {
|
||||
res.data.poserInfoList[0].video = baseurl + res.data.poserInfoList[0]
|
||||
.posterVideoUrl
|
||||
this.swiperImgUrls.push(res.data.poserInfoList[0].video)
|
||||
}
|
||||
}
|
||||
@ -264,8 +261,13 @@
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.app {
|
||||
padding: 100rpx 0 0 0;
|
||||
padding: 0 0 0 0;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
|
||||
.container {
|
||||
background-color: #fff
|
||||
}
|
||||
|
||||
.swiper-block {
|
||||
height: 500rpx;
|
||||
width: 100%;
|
||||
@ -280,16 +282,16 @@
|
||||
}
|
||||
|
||||
.slide-image {
|
||||
height: 300rpx;
|
||||
width: 520rpx;
|
||||
height: 270rpx;
|
||||
width: 580rpx;
|
||||
border-radius: 9rpx;
|
||||
box-shadow: 0px 0px 30rpx rgba(0, 0, 0, 0.2);
|
||||
margin: 0rpx 30rpx;
|
||||
margin: 0 0 0 30rpx;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.active {
|
||||
transform: scale(1.2);
|
||||
transform: scale(1.10);
|
||||
transition: all 0.2s ease-in 0s;
|
||||
z-index: 20;
|
||||
}
|
||||
@ -367,11 +369,15 @@
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
left: 0;
|
||||
width: 50%;
|
||||
width: 65%;
|
||||
font-size: 30rpx;
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 5; //行数需设置
|
||||
line-clamp: 5;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<view class="item" style="height: 200rpx; " @tap='uploadImag'>
|
||||
<span style='height:200rpx;line-height: 200rpx;'>头像:</span>
|
||||
<image class="picture" :src="img" mode=""></image>
|
||||
<image class="pictureA" src="../../static/jiantou.png" mode=""></image>
|
||||
<image class="pictureA" src="../../static/huijiantou.png" mode=""></image>
|
||||
</view>
|
||||
<view class="item">
|
||||
<span>姓名:</span>
|
||||
@ -36,7 +36,7 @@
|
||||
</view>
|
||||
<view class="disease" style="border: none;" @tap="godisease">
|
||||
<view style="display: block;line-height: 120rpx;">疾病类型:</view>
|
||||
<image class="pictureA" src="../../static/jiantou.png" mode=""></image>
|
||||
<image class="pictureA" src="../../static/huijiantou.png" mode=""></image>
|
||||
<view class="" style="padding-right: 10rpx" v-for="(item,index) in patientDiseaseInfoList">
|
||||
{{item.diseaseName}}
|
||||
</view>
|
||||
|
||||
@ -53,7 +53,7 @@
|
||||
<!-- <view class="area" @tap='areashow=true'> -->
|
||||
<u-field v-model="infolist.address" label="区域" placeholder="请选择" class="items" disabled>
|
||||
</u-field>
|
||||
<image src="../../static/jiantou.png" mode=""></image>
|
||||
<image src="../../static/huijiantou.png" mode=""></image>
|
||||
</view>
|
||||
<u-field v-model="infolist.receiveAddress" label-width="170" label="详细地址" placeholder="如街道、门牌号、小区等"
|
||||
class="items" maxlength='50'>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<view class="app">
|
||||
<view class="content">
|
||||
<view class="CommodityOrder" @tap="goorder">商品订单
|
||||
<image class="picture" src="../../static/jiantou.png" mode=""></image>
|
||||
<image class="picture" src="../../static/huijiantou.png" mode=""></image>
|
||||
</view>
|
||||
<view class="center" v-if="list">
|
||||
<view class="OrderStatus" @tap="gopaid('WAIT_PAY')">
|
||||
@ -50,7 +50,7 @@
|
||||
<view class="service" @tap="gonursestation">
|
||||
<view class="serviceorder">护理站服务订单</view>
|
||||
<view class="pictures">
|
||||
<image src="../../static/jiantou.png" mode=""></image>
|
||||
<image src="../../static/huijiantou.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<u-toast ref="uToast" />
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<view class="content">
|
||||
<view class="name">
|
||||
店铺名称
|
||||
<image src="../../static/rowsright.png" mode=""></image>
|
||||
<image src="../../static/huijiantou.png" mode=""></image>
|
||||
</view>
|
||||
<view class="details">
|
||||
<view class="detailslist">
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<view class="content">
|
||||
<view class="name">
|
||||
店铺名称
|
||||
<image src="../../static/rowsright.png" mode=""></image>
|
||||
<image src="../../static/huijiantou.png" mode=""></image>
|
||||
</view>
|
||||
<view class="details">
|
||||
<view class="detailslist">
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
<view>我要退款(无需退货)</view>
|
||||
<view class="text">没收到货</view>
|
||||
</view>
|
||||
<image class="picture pictures" src="../../static/rowsright.png" mode=""></image>
|
||||
<image class="picture pictures" src="../../static/huijiantou.png" mode=""></image>
|
||||
|
||||
</view>
|
||||
<view class="myrefund" @tap='goApplforrefund(2)'>
|
||||
@ -40,7 +40,7 @@
|
||||
<view>我要退货退款</view>
|
||||
<view class="text">已收到货,需要退还收到的货物</view>
|
||||
</view>
|
||||
<image class="picture" src="../../static/rowsright.png" mode=""></image>
|
||||
<image class="picture" src="../../static/huijiantou.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<view class="app">
|
||||
<view class="cards">
|
||||
<view class="item" :style="{background:listcolor[index]}" @tap='goProductList(item)'
|
||||
<view class="card">
|
||||
<view class="items" :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">
|
||||
<view class="titles" style="font-size:42rpx">
|
||||
{{item.goodsCategoryName}}
|
||||
</view>
|
||||
</view>
|
||||
@ -25,14 +25,40 @@
|
||||
pageSize: 10, //列
|
||||
total: 0, //list总长度
|
||||
goodsCategoryList: [], //商品列表list
|
||||
listcolor: ['#00C176', '#D43953', '#E1AE3C', '#4C7BC9', '#9e4dd0', '#00C176', '#D43953', '#E1AE3C',
|
||||
'#4C7BC9', '#9e4dd0',
|
||||
], //颜色随动
|
||||
listcolor: ['#E69874', '#09C87E', '#E4B958', '#6592DC', '#EF6A80'] //颜色随动
|
||||
};
|
||||
},
|
||||
onLoad(options) { //初始化加载
|
||||
//1.分享给朋友
|
||||
onShareAppMessage(res) {
|
||||
let pages = getCurrentPages();
|
||||
let url = pages[pages.length - 1].$page.fullPath
|
||||
return {
|
||||
title: '泉医到家',
|
||||
path: url,
|
||||
}
|
||||
},
|
||||
//2.分享到朋友圈
|
||||
onShareTimeline(res) {
|
||||
let pages = getCurrentPages();
|
||||
let url = pages[pages.length - 1].$page.fullPath
|
||||
return {
|
||||
title: '泉医到家',
|
||||
path: url,
|
||||
}
|
||||
},
|
||||
//初始化加载
|
||||
onLoad(options) {
|
||||
this.pageNum = 1
|
||||
this.goodsCategory()
|
||||
},
|
||||
onShow() {
|
||||
let that = this
|
||||
this.pageNum = 1
|
||||
const value = uni.getStorageSync('Refresh');
|
||||
if (value) {
|
||||
that.goodsCategory();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//跳转到商品列表页面
|
||||
goProductList(item) {
|
||||
@ -43,18 +69,27 @@
|
||||
//获取商城信息
|
||||
goodsCategory() {
|
||||
goodsCategoryList(this.pageSize, this.pageNum).then(res => {
|
||||
res.rows.forEach(e => {
|
||||
e.goodsCategoryPicture = baseurl + e.goodsCategoryPicture
|
||||
this.goodsCategoryList.push(e)
|
||||
})
|
||||
this.total = res.total
|
||||
uni.removeStorageSync('Refresh');
|
||||
if (res.code == 200) {
|
||||
res.rows.forEach(e => {
|
||||
e.goodsCategoryPicture = baseurl + e.goodsCategoryPicture
|
||||
})
|
||||
this.goodsCategoryList = res.rows
|
||||
this.total = res.total
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onReachBottom() { //下滑加载
|
||||
if (this.goodsCategoryList.length >= this.total) {} else {
|
||||
this.pageNum++;
|
||||
this.goodsCategory()
|
||||
goodsCategoryList(this.pageSize, this.pageNum).then(res => {
|
||||
res.rows.forEach(e => {
|
||||
e.goodsCategoryPicture = baseurl + e.goodsCategoryPicture
|
||||
this.goodsCategoryList.push(e)
|
||||
})
|
||||
this.total = res.total
|
||||
})
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() { //下拉刷新
|
||||
@ -74,4 +109,41 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.app {
|
||||
padding: 40rpx 0 0;
|
||||
background-color: #fff;
|
||||
|
||||
.card {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.items {
|
||||
width: 45%;
|
||||
height: 360rpx;
|
||||
margin-bottom: 40rpx;
|
||||
z-index: 1;
|
||||
border-radius: 25rpx;
|
||||
position: relative;
|
||||
|
||||
image {
|
||||
border-radius: 25rpx;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.titles {
|
||||
width: 90%;
|
||||
font-size: 36rpx;
|
||||
color: #FCFCFC;
|
||||
position: absolute;
|
||||
top: 30rpx;
|
||||
left: 30rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.1 KiB |
BIN
static/cp.png
|
Before Width: | Height: | Size: 2.7 KiB |
BIN
static/daohang.png
Normal file
|
After Width: | Height: | Size: 368 B |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
BIN
static/jfgz.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
BIN
static/jifen.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
static/jifenbeij.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
static/jkda.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 82 KiB |
BIN
static/lnb.png
Normal file
|
After Width: | Height: | Size: 4.9 KiB |
BIN
static/pic.png
|
Before Width: | Height: | Size: 729 B |
BIN
static/qiandao.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 638 B |
BIN
static/user.png
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 3.8 KiB |
BIN
static/userl.png
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
BIN
static/xg.png
Normal file
|
After Width: | Height: | Size: 393 B |
BIN
static/yaoqing.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
static/yhj.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
static/zbglzbgl.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |