108 lines
1.9 KiB
Vue
108 lines
1.9 KiB
Vue
|
<template>
|
||
|
<view class="content">
|
||
|
<view class="container">
|
||
|
<view class="my-header">
|
||
|
<view class="my-icons" @click="goback"> <uni-icons type="left" size="16"></uni-icons> </view>
|
||
|
<view class="my-text">积分规则</view>
|
||
|
<view class="my-icons"></view>
|
||
|
</view>
|
||
|
<!-- 顶部区域 -->
|
||
|
<u-empty v-if="!setting.pointsRules" style="margin: 5px auto;" mode="data"
|
||
|
icon="http://cdn.uviewui.com/uview/empty/data.png">
|
||
|
</u-empty>
|
||
|
<view class="centen-siez">
|
||
|
<u-parse :content="setting.pointsRules"></u-parse>
|
||
|
</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import config from '@/config'
|
||
|
import request from '../../utils/request'
|
||
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
title: '',
|
||
|
setting: {},
|
||
|
storeId: uni.getStorageSync('storeId'),
|
||
|
|
||
|
pointsRules: '',
|
||
|
}
|
||
|
},
|
||
|
|
||
|
components: {
|
||
|
|
||
|
},
|
||
|
async onLoad() {
|
||
|
await this.getSettings();
|
||
|
},
|
||
|
methods: {
|
||
|
|
||
|
// 根据店铺查询积分设置
|
||
|
// business/integral/integralSettings/getSettings
|
||
|
getSettings() {
|
||
|
console.log("store", this.storeId)
|
||
|
request({
|
||
|
url: '/business/integral/integralSettings/getByStoreId',
|
||
|
method: 'get',
|
||
|
params: {
|
||
|
storeId: this.storeId
|
||
|
}
|
||
|
}).then((res) => {
|
||
|
if (res.code == 200) {
|
||
|
this.setting = res.data
|
||
|
}
|
||
|
})
|
||
|
},
|
||
|
goback() {
|
||
|
uni.navigateBack()
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style scoped lang="scss">
|
||
|
.content {
|
||
|
width: 100%;
|
||
|
background: #f4f5f6;
|
||
|
background: #ffffff;
|
||
|
}
|
||
|
|
||
|
|
||
|
.container {
|
||
|
width: 100%;
|
||
|
height: 100vh;
|
||
|
box-sizing: border-box;
|
||
|
padding-top: 88px;
|
||
|
}
|
||
|
|
||
|
.my-header {
|
||
|
width: 100%;
|
||
|
height: 88px;
|
||
|
background: #ffffff;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
justify-content: space-between;
|
||
|
color: #000;
|
||
|
box-sizing: border-box;
|
||
|
padding: 0px 15px;
|
||
|
padding-top: 40px;
|
||
|
|
||
|
.my-icons {
|
||
|
width: 20px;
|
||
|
|
||
|
}
|
||
|
|
||
|
position: fixed;
|
||
|
top: 0px;
|
||
|
}
|
||
|
|
||
|
.centen-siez {
|
||
|
width: 100%;
|
||
|
margin: 10px auto;
|
||
|
box-sizing: border-box;
|
||
|
padding: 10px;
|
||
|
|
||
|
}
|
||
|
</style>
|