Commit b39fa85e authored by 高宇's avatar 高宇

修改小程序端

parent 2ea8a35e
<template> <template>
<view class="IntegralRule-module"> <view class="IntegralRule-module">
<view class="title">一、积分获取规则</view> <view class="swiper">
<u-swiper :list="list2" keyName="randUrl" height="100%" :autoplay="false" @change="handleChange" circular></u-swiper>
</view>
<view class="test">~会员权益~</view>
<view class="description">
<image :src="src" style="width: 100%; min-height: 57vh;"></image>
</view>
<!-- <view class="title">一、积分获取规则</view>
<view class="oneContent" v-for="(item,index) in integrallist" :key="index"> <view class="oneContent" v-for="(item,index) in integrallist" :key="index">
<span class="oneSpan"> 每当您消费金额到达{{item.amount}}元时将会获取{{item.integral}}积分。</span> <span class="oneSpan"> 每当您消费金额到达{{item.amount}}元时将会获取{{item.integral}}积分。</span>
</view> </view>
<view class="twotitle">二、会员折扣规则</view> <view class="twotitle">二、会员折扣规则</view>
<view class="twoContent" v-for="(item,index) in memberList" :key="index"> <view class="twoContent" v-for="(item,index) in memberList" :key="index">
<span class="twoSpan"> 每当您积分累计到达{{item.integral}}时将达成{{item.name}}将会享受{{item.discount}}%的折扣</span> <span class="twoSpan"> 每当您积分累计到达{{item.integral}}时将达成{{item.name}}将会享受{{item.discount}}%的折扣</span>
</view> </view> -->
</view> </view>
</template> </template>
<script> <script>
import { queryIntegralList, queryMemberBenefits } from "../../api/my/myintegral/integralrule"; import {
queryIntegralList,
queryMemberBenefits
} from "../../api/my/myintegral/integralrule";
export default{ export default {
data(){ data() {
return{ return {
bashUrl: 'http://192.144.239.97:20043/file/',
src: '',
list2: [],
// 积分获取列表 // 积分获取列表
integrallist:[], integrallist: [],
// 会员折扣列表 // 会员折扣列表
memberList: [], memberList: [],
value:''
} }
}, },
onShow() { onShow() {
this.getintegrallist() this.getintegrallist()
this.getmemberList() this.getmemberList()
}, },
methods:{ methods: {
handleChange(value){
console.log('value',value.current)
console.log('res',this.list2[value.current])
this.src = this.list2[value.current].memberUrl
},
getintegrallist() { getintegrallist() {
queryIntegralList().then(res => { queryIntegralList().then(res => {
console.log('积分获取列表',res) console.log('积分获取列表', res)
if(res.code === 200) { if (res.code === 200) {
this.integrallist = res.data this.integrallist = res.data
} }
}) })
}, },
getmemberList(){ getmemberList() {
queryMemberBenefits().then(res => { queryMemberBenefits().then(res => {
console.log('会员等级列表',res) console.log('会员等级列表', res)
if(res.code === 200) { if (res.code === 200) {
this.memberList = res.data this.memberList = res.data
res.data.forEach(item => {
if(item.memberUrl !== null) {
item.memberUrl = this.bashUrl + item.memberUrl
} else {
item.memberUrl = 'http://192.144.239.97:20043/file/static/images/login/denglu_icon_logo.png'
}
if(item.randUrl !== null) {
item.randUrl = this.bashUrl + item.randUrl
} else {
item.randUrl = 'http://192.144.239.97:20043/file/static/images/login/denglu_icon_logo.png'
}
})
console.log('data',res.data)
this.list2 = res.data
this.src = res.data[0].memberUrl
} }
}) })
} }
...@@ -49,37 +83,58 @@ ...@@ -49,37 +83,58 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.IntegralRule-module{ .IntegralRule-module {
background: #fff; background: #fff;
min-height: 100vh; min-height: 100vh;
padding: 0 34rpx;
.title{ .swiper {
font-size: 40rpx; margin: 0 34rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN; height: 30vh;
font-weight: 500; border: 1px solid red;
color: #333333;
margin-bottom: 21rpx;
}
.twotitle{
font-size: 40rpx;
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
font-weight: 500;
color: #333333;
margin-bottom: 21rpx;
margin-top: 21rpx;
} }
.oneContent{
font-family: Source Han Sans CN-Medium, Source Han Sans CN; .test {
font-weight: 500;
color: #333333;
text-align: center; text-align: center;
margin-top: 12rpx; padding: 42rpx 0;
font-size: 13px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #B9B9B9;
} }
.twoContent{
font-family: Source Han Sans CN-Medium, Source Han Sans CN; .description {
font-weight: 500; margin: 0 34rpx;
color: #333333; min-height: 57vh;
margin-top: 12rpx; // border: 1px solid red;
} }
// .title{
// font-size: 40rpx;
// font-family: Source Han Sans CN-Medium, Source Han Sans CN;
// font-weight: 500;
// color: #333333;
// margin-bottom: 21rpx;
// }
// .twotitle{
// font-size: 40rpx;
// font-family: Source Han Sans CN-Medium, Source Han Sans CN;
// font-weight: 500;
// color: #333333;
// margin-bottom: 21rpx;
// margin-top: 21rpx;
// }
// .oneContent{
// font-family: Source Han Sans CN-Medium, Source Han Sans CN;
// font-weight: 500;
// color: #333333;
// text-align: center;
// margin-top: 12rpx;
// }
// .twoContent{
// font-family: Source Han Sans CN-Medium, Source Han Sans CN;
// font-weight: 500;
// color: #333333;
// margin-top: 12rpx;
// }
} }
</style> </style>
\ No newline at end of file
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<view v-if="isdata" class="nodatacard"> <view v-if="isdata" class="nodatacard">
<view class="text">暂无数据</view> <view class="text">暂无数据</view>
</view> </view>
<view v-else class="card"> <view v-else class="card">
<view class="recommendation-card" v-for="item in businessList" @click="gotoBusinessDetail(item)"> <view class="recommendation-card" v-for="item in businessList" @click="gotoBusinessDetail(item)">
<view class="card-image"> <view class="card-image">
<image class="img" :src="baseURL + item.imgUrl"> <image class="img" :src="baseURL + item.imgUrl">
...@@ -278,7 +278,21 @@ ...@@ -278,7 +278,21 @@
.recommendation { .recommendation {
padding: 0 34rpx; padding: 0 34rpx;
.nodatacard{
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.text{
text-align: center;
padding: 42rpx 0;
font-size: 13px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #B9B9B9;
}
}
.recommendation-top { .recommendation-top {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -315,19 +329,7 @@ ...@@ -315,19 +329,7 @@
} }
.nodatacard{
display: grid;
grid-template-columns: 330rpx 330rpx;
grid-column-gap: 22rpx;
.text{
text-align: center;
padding: 42rpx 0;
font-size: 13px;
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
font-weight: 400;
color: #B9B9B9;
}
}
.card { .card {
display: grid; display: grid;
grid-template-columns: 330rpx 330rpx; grid-template-columns: 330rpx 330rpx;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment