|
|
@@ -15,24 +15,20 @@
|
|
|
<view class="card margin-top-30">
|
|
|
<view class="margin-bottom-20">
|
|
|
<text class="title">积分价值</text>
|
|
|
- <text class="sub_title">(例:1000积分=10元)</text>
|
|
|
+ <text class="sub_title">(例:1 元= 10 积分)</text>
|
|
|
</view>
|
|
|
<view class="flex">
|
|
|
- <view class="center" style="width: 45%;">
|
|
|
+ <view class="center" style="width: 25%;">
|
|
|
+ <text class="text-bold text-base" style="font-size: 40rpx;">1</text>
|
|
|
+ <text style="margin: 0 20rpx;">元</text>
|
|
|
+ <text style="margin: 0 20rpx;">=</text>
|
|
|
+ </view>
|
|
|
+ <view class="center" style="width: 45%;margin-left: 20rpx;">
|
|
|
<u-input height="50" :border="true" :clearable="false" v-model="form.point" placeholder="请输入积分数"/>
|
|
|
<view class="cu-tag bg-color radius">
|
|
|
积分
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="center" style="margin: 0 20rpx;">
|
|
|
- <text>=</text>
|
|
|
- </view>
|
|
|
- <view class="center" style="width: 45%;">
|
|
|
- <u-input height="50" :border="true" :clearable="false" v-model="form.pointValue" placeholder="请输入积分价值" />
|
|
|
- <view class="cu-tag bg-color radius">
|
|
|
- 元
|
|
|
- </view>
|
|
|
- </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -41,7 +37,7 @@
|
|
|
<text class="title">积分规则</text>
|
|
|
</view>
|
|
|
<view class="flex">
|
|
|
- <view class="center">
|
|
|
+ <view class="center" style="width: 25%;">
|
|
|
<text>消费1元赠送</text>
|
|
|
</view>
|
|
|
<view class="center" style="width: 45%;margin-left: 20rpx;">
|
|
|
@@ -71,7 +67,6 @@
|
|
|
return {
|
|
|
form:{
|
|
|
point:'',
|
|
|
- pointValue:'',
|
|
|
consumeOnePoint:''
|
|
|
}
|
|
|
}
|
|
|
@@ -82,25 +77,22 @@
|
|
|
this.$u.toast('请输入积分数')
|
|
|
return
|
|
|
}
|
|
|
- if (this.$isEmpty(this.form.pointValue)) {
|
|
|
- this.$u.toast('请输入积分值')
|
|
|
- return
|
|
|
- }
|
|
|
if (this.$isEmpty(this.form.consumeOnePoint)) {
|
|
|
this.$u.toast('请输入积分规则')
|
|
|
return
|
|
|
}
|
|
|
-
|
|
|
- let id=this.vuex_shopId
|
|
|
- this.$api.shop.submit({
|
|
|
+ let id=this.vuex_mallId
|
|
|
+ this.$api.mall.submit({
|
|
|
id,
|
|
|
- sendPointUnit: this.form.consumeOnePoint,
|
|
|
- pointRate: 0.01,
|
|
|
- isOpenMember: 1
|
|
|
+ sendPointUnnit: this.form.consumeOnePoint,
|
|
|
+ pointRate: this.$digital.keepTwoDecimalFull(1/this.form.point),
|
|
|
+ useMember: 1
|
|
|
}).then(res=>{
|
|
|
if (res.success) {
|
|
|
this.$dialog.showModal('创建成功',false).then(res=>{
|
|
|
- this.$jump('/pages/member/member')
|
|
|
+ uni.redirectTo({
|
|
|
+ url:"/pages/member-center/member-center"
|
|
|
+ })
|
|
|
})
|
|
|
}else{
|
|
|
this.$u.toast(res.msg)
|