Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
闫晓茹 2022-10-20 09:12:04 +08:00
commit 2dca906482
4 changed files with 157 additions and 44 deletions

View File

@ -48,7 +48,7 @@
</view>
<!-- 弹框 -->
<view class="frame">
<u-popup v-model="show" mode="bottom" length="50%" border-radius="14">
<u-popup v-model="show" mode="bottom" length="50%" border-radius="30">
<view class="payment">
<span>请选择支付方式</span>
<view class="cencel" @tap="show = false">
@ -104,10 +104,6 @@
}
.app {
background-color: #F4F5F7;
width: 100%;
height: 100vh;
position: relative;
padding: 3%;
//
@ -252,6 +248,6 @@
color: #FFFFFF;
text-align: center;
margin: 0 auto;
margin-top: 40%;
margin-top: 25%;
}
</style>

View File

@ -1,7 +1,17 @@
<template>
<view class="app">
<view class="productlist">
<view class="item" @tap='goCommodityDetails'>
<view class="item" @tap='goCommodityDetails' v-for="(item,index) in goodsList" :key="index">
<!-- <image src="../../static/shoppingcs.png" mode=""></image> -->
<image :src="baseUrl + item.goodsPictureUrl" mode=""></image>
<view class="title">
{{item.goodsName}}
</view>
<view class="price">
{{item.goodsPrice}}
</view>
</view>
<!-- <view class="item">
<image src="../../static/shoppingcs.png" mode=""></image>
<view class="title">
燕麦麸皮 1
@ -27,25 +37,24 @@
<view class="price">
42.9
</view>
</view>
<view class="item">
<image src="../../static/shoppingcs.png" mode=""></image>
<view class="title">
燕麦麸皮 1
</view>
<view class="price">
42.9
</view>
</view>
</view> -->
</view>
</view>
</template>
<script>
import {
goodsList
} from '@/api/ProductList/ProductList.js';
import baseurl from '@/api/baseurl.js'
export default {
data() {
return {
title: '医路优品', //
pageNum: 1,
pageSize: 999,
goodsCategoryId:"",
goodsList:[],
};
},
onReady() {
@ -56,9 +65,17 @@
},
onLoad(options) {
//
console.log(options)
this.title = options.title
this.goodsListinfo()
},
methods: {
goodsListinfo(){
goodsList(this.pageSize, this.pageNum,this.goodsCategoryId).then(res => {
this.goodsList = res.data
console.log(this.goodsCategoryList)
})
},
//
goCommodityDetails() {
uni.navigateTo({

View File

@ -7,9 +7,34 @@
</view>
</view>
<view class="evaluate">
<view class="evaluate" @tap="show=true">
<text>评价</text>
</view>
<!-- 弹框 -->
<view class="frame">
<u-popup v-model="show" mode="bottom" length="65%" border-radius="30">
<view class="cencel" @tap="show = false">
<image src="../../static/gb.png" mode=""></image>
</view>
<view class="satisfied">
<view class="satisfieds">
满意
</view>
<view class="commonly">
一般
</view>
<view class="commonly">
不满意
</view>
</view>
<view class="submit">
提交
</view>
</u-popup>
</view>
</view>
</template>
@ -17,7 +42,7 @@
export default {
data() {
return {
show:false
}
},
methods: {
@ -28,10 +53,7 @@
<style lang="scss">
.app {
background-color: #F4F5F7;
width: 100%;
height: 100vh;
position: relative;
padding: 3%;
.advice {
width: 95%;
@ -69,8 +91,61 @@
color: #FFFFFF;
text-align: center;
float: right;
margin-top: 140rpx;
margin-top: 12%;
// margin-bottom: 30rpx;
margin-right: 30rpx;
}
//
.cencel image {
width: 31rpx;
height: 31rpx;
// float: right;
margin: 53rpx 53rpx 0rpx 90%;
}
.satisfied{
// width: 217px;
display: flex;
justify-content: space-around;
border-radius: 25rpx;
margin-top: 15%;
// padding-right: 5rpx;
.satisfieds{
width: 217rpx;
height: 222rpx;
line-height: 222rpx;
background: #4C7BC9;
border-radius: 25rpx;
text-align: center;
font-size: 50rpx;
color: #FCFCFC;
}
.commonly{
width: 217rpx;
height: 222rpx;
line-height: 222rpx;
background: #BFBFBF;
border-radius: 25rpx;
text-align: center;
font-size: 50rpx;
color: #FCFCFC;
}
}
.submit{
margin: 0 auto;
width: 501rpx;
height: 71rpx;
line-height: 71rpx;
background: #4C7BC9;
border-radius: 26rpx;
font-size: 34rpx;
color: #FFFFFF;
text-align: center;
margin-top: 20%;
}
}
</style>

View File

@ -1,19 +1,17 @@
<template>
<view class="app">
<view class="cards">
<view class="item" style="background-color: #00C176;" @tap='goProductList(1)'>
<image src="../../static/sp.png" mode=""></image>
<view class="item" :style="{background:listcolor[index]}" @tap='goProductList(item)'
v-for="(item,index) in goodsCategoryList" :key="index">
<!-- <image src="../../static/sp.png" mode=""></image> -->
<image :src="item.goodsCatrgoryPicture" mode=""></image>
<view class="title">
特医食品
{{item.goodsCategoryName}}
</view>
</view>
<view class=" item" style="background-color: #D43953;">
<image src="../../static/yyss.png" mode=""></image>
<view class="title">
营养膳食
</view>
<view class=" item">
</view>
<view class="item" style="background-color: #E1AE3C;">
<!-- <view class="item" style="background-color: #E1AE3C;">
<image src="../../static/znsb.png" mode=""></image>
<view class="title" style="font-size: 42rpx;">
可穿戴医疗设备
@ -24,27 +22,54 @@
<view class="title" style="font-size: 42rpx;">
适老化改造
</view>
</view>
</view> -->
</view>
</view>
</template>
<script>
import {
goodsCategoryList
} from '@/api/shopping/shopping.js';
import baseurl from '@/api/baseurl.js'
export default {
data() {
return {};
return {
pageNum: 1,
pageSize: 999,
goodsCategoryList: [],
// goodsCategoryId:"",
listcolor: ['#00C176', '#D43953', '#E1AE3C', '#4C7BC9', '#00C176'],
};
},
onLoad(options) {
this.goodsCategory()
},
methods: {
//
goProductList(number) {
if (number == 1) {
var titlename = '特医食品'
uni.navigateTo({
url: `/pages/ProductList/ProductList?title=${titlename}`
})
}
goProductList(item) {
console.log(item)
// if (number == 1) {
// var titlename = ''
// uni.navigateTo({
// url: `/pages/ProductList/ProductList?title=${titlename}&goodsCategoryId=${this.id}`
// })
// }
uni.navigateTo({
url: `/pages/ProductList/ProductList?title=${item.goodsCategoryName}&goodsCategoryId=${item.id}`
})
},
//
goodsCategory() {
goodsCategoryList(this.pageSize, this.pageNum, ).then(res => {
res.data.forEach(e => {
e.goodsCatrgoryPicture = baseurl + e.goodsCatrgoryPicture
})
this.goodsCategoryList = res.data
})
}
},
}
</script>
@ -56,6 +81,6 @@
// height: 100vh;
// position: relative;
}
</style>
</style>