|
@@ -12,14 +12,21 @@
|
|
|
|
|
|
|
|
<block v-else>
|
|
<block v-else>
|
|
|
<view class="top-menu">
|
|
<view class="top-menu">
|
|
|
- <view class="">
|
|
|
|
|
- <text>{{detail.memberCount}}</text>
|
|
|
|
|
- <text>会员数量</text>
|
|
|
|
|
|
|
+ <view class="leftFixed">{{selectedMall.point}}积分等于{{selectedMall.pointValue}}元</view>
|
|
|
|
|
+ <view class="u-flex u-row-between">
|
|
|
|
|
+ <view class="item">
|
|
|
|
|
+ <text>{{detail.memberCount}}</text>
|
|
|
|
|
+ <text>会员数量</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+
|
|
|
|
|
+ <view class="item">
|
|
|
|
|
+ <text>{{detail.totalPointValue}}</text>
|
|
|
|
|
+ <text>积分总价值</text>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
- <view class="">
|
|
|
|
|
- <text>{{detail.totalPointValue}}</text>
|
|
|
|
|
- <text>积分总价值</text>
|
|
|
|
|
|
|
+ <view class="u-m-t-50 u-flex u-col-center u-row-center">
|
|
|
|
|
+ <text class="u-font-24 u-m-r-20">规则:消费1元赠送{{selectedMall.consumeOnePoint}}积分</text>
|
|
|
|
|
+ <u-button size="mini" shape="circle" @click="showPopup=true">更改规则</u-button>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="padding-20 text-bold text-xl">
|
|
<view class="padding-20 text-bold text-xl">
|
|
@@ -62,6 +69,47 @@
|
|
|
</mescroll-body>
|
|
</mescroll-body>
|
|
|
</view>
|
|
</view>
|
|
|
</block>
|
|
</block>
|
|
|
|
|
+ <u-popup v-model="showPopup" mode="center" border-radius="20">
|
|
|
|
|
+ <view class="u-popup-content">
|
|
|
|
|
+ <text>更改积分规则</text>
|
|
|
|
|
+ <u-form>
|
|
|
|
|
+ <view class="u-flex">
|
|
|
|
|
+ <u-input
|
|
|
|
|
+ v-model="selectedMall.point"
|
|
|
|
|
+ border="true"
|
|
|
|
|
+ border-color="#eaeaea"
|
|
|
|
|
+ type="number"
|
|
|
|
|
+ :clearable="false"
|
|
|
|
|
+ placeholder="请输入积分"
|
|
|
|
|
+ />
|
|
|
|
|
+ <view style="width: 150rpx;">积分</view>
|
|
|
|
|
+ <view style="width: 150rpx;">等于</view>
|
|
|
|
|
+ <u-input
|
|
|
|
|
+ v-model="selectedMall.pointValue"
|
|
|
|
|
+ border="true"
|
|
|
|
|
+ border-color="#eaeaea"
|
|
|
|
|
+ type="number"
|
|
|
|
|
+ :clearable="false"
|
|
|
|
|
+ placeholder="请输入金额"
|
|
|
|
|
+ />
|
|
|
|
|
+ <view>元</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <u-form-item label-width="180" label="消费1元赠送">
|
|
|
|
|
+ <u-input
|
|
|
|
|
+ v-model="selectedMall.consumeOnePoint"
|
|
|
|
|
+ border="true"
|
|
|
|
|
+ border-color="#eaeaea"
|
|
|
|
|
+ type="number"
|
|
|
|
|
+ :clearable="false"
|
|
|
|
|
+ placeholder="请输入积分数"
|
|
|
|
|
+ />
|
|
|
|
|
+ <view slot="right" style="color: #D18C42;">积分</view>
|
|
|
|
|
+ </u-form-item>
|
|
|
|
|
+ </u-form>
|
|
|
|
|
+ <u-button size="medium" shape="circle" :custom-style="customStyle1" @click="update">确定</u-button>
|
|
|
|
|
+ <u-button size="medium" shape="circle" :custom-style="customStyle2" @click="showPopup=false">取消</u-button>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </u-popup>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -84,6 +132,17 @@
|
|
|
use: true,
|
|
use: true,
|
|
|
auto: false // 不自动加载
|
|
auto: false // 不自动加载
|
|
|
},
|
|
},
|
|
|
|
|
+ showPopup:false,
|
|
|
|
|
+ consumeOnePoint:'',
|
|
|
|
|
+ customStyle1:{
|
|
|
|
|
+ backgroundColor:'#D18C42',
|
|
|
|
|
+ color:'#fff',
|
|
|
|
|
+ marginBottom:'20rpx',
|
|
|
|
|
+ width:'400rpx'
|
|
|
|
|
+ },
|
|
|
|
|
+ customStyle2:{
|
|
|
|
|
+ width:'400rpx'
|
|
|
|
|
+ },
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
watch:{
|
|
watch:{
|
|
@@ -111,8 +170,21 @@
|
|
|
},
|
|
},
|
|
|
onReady() {
|
|
onReady() {
|
|
|
this.getElInfo()
|
|
this.getElInfo()
|
|
|
|
|
+ this.selectedMall = this.$cache.get("selectedMall")
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ update(){
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ id: this.vuex_shopId,
|
|
|
|
|
+ consumeOnePoint:this.selectedMall.consumeOnePoint,
|
|
|
|
|
+ point:this.selectedMall.point,
|
|
|
|
|
+ pointValue:this.selectedMall.pointValue
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$api.memberCenter.update(params).then(res => {
|
|
|
|
|
+ this.$cache.put("selectedMall",this.selectedMall)
|
|
|
|
|
+ this.showPopup = false
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
async getElInfo() {
|
|
async getElInfo() {
|
|
|
let rectInfo = await this.$u.getRect('.tableTitle');
|
|
let rectInfo = await this.$u.getRect('.tableTitle');
|
|
|
this.height=this.$u.sys().windowHeight - rectInfo.top + 'px'
|
|
this.height=this.$u.sys().windowHeight - rectInfo.top + 'px'
|
|
@@ -179,29 +251,53 @@
|
|
|
border-radius: 20rpx;
|
|
border-radius: 20rpx;
|
|
|
margin: 30rpx 20rpx;
|
|
margin: 30rpx 20rpx;
|
|
|
padding: 50rpx;
|
|
padding: 50rpx;
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-around;
|
|
|
|
|
background-image: linear-gradient(to right, #272A46, #30355D);
|
|
background-image: linear-gradient(to right, #272A46, #30355D);
|
|
|
-
|
|
|
|
|
- view {
|
|
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ .leftFixed{
|
|
|
|
|
+ padding:0 10rpx;
|
|
|
|
|
+ font-size: 22rpx;
|
|
|
|
|
+ height: 40rpx;
|
|
|
|
|
+ line-height: 40rpx;
|
|
|
|
|
+ background-color: $base-color;
|
|
|
|
|
+ color: #fff;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: 20rpx;
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ border-top-right-radius: 25px;
|
|
|
|
|
+ border-bottom-right-radius: 25px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .item {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
-
|
|
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ flex:1;
|
|
|
|
|
+ margin-top: 30rpx;
|
|
|
text:first-child {
|
|
text:first-child {
|
|
|
margin-bottom: 10rpx;
|
|
margin-bottom: 10rpx;
|
|
|
color: #FFFFFF;
|
|
color: #FFFFFF;
|
|
|
font-weight: 800;
|
|
font-weight: 800;
|
|
|
font-size: 40rpx;
|
|
font-size: 40rpx;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
text:last-child {
|
|
text:last-child {
|
|
|
font-size: 26rpx;
|
|
font-size: 26rpx;
|
|
|
color: #D0D4EE;
|
|
color: #D0D4EE;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ .u-popup-content{
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ padding: 30rpx;
|
|
|
|
|
+ u-form{
|
|
|
|
|
+ margin: 60rpx 0;
|
|
|
|
|
+ width: 500rpx;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
.card {
|
|
.card {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
background-color: #FFFFFF;
|
|
background-color: #FFFFFF;
|