|
|
@@ -38,7 +38,7 @@
|
|
|
<view class="padding-sm">
|
|
|
<view class="flex padding-xs">
|
|
|
<text class="flex justify-center align-center">现金值:</text>
|
|
|
- <u-number-box :input-width="200" :min="0" :max="+detail.cashValue" v-model="data.cashValue">
|
|
|
+ <u-number-box :input-width="200" :min="0" :step="cashStep" :positive-integer="cashPositive" :max="+detail.cashValue" v-model="data.cashValue">
|
|
|
</u-number-box>
|
|
|
<view v-if="data.cashValue!=0" class="padding-left-sm text-red flex justify-center align-center">
|
|
|
=
|
|
|
@@ -48,7 +48,7 @@
|
|
|
|
|
|
<view class="flex padding-xs">
|
|
|
<text class="flex justify-center align-center">热力值:</text>
|
|
|
- <u-number-box :disabled="$u.test.isEmpty(proportion.usableHot)" :step="10" @change="hotValueChange" :input-width="200" :min="0" :max="+proportion.usableHot" v-model="data.hotValue">
|
|
|
+ <u-number-box :disabled="$u.test.isEmpty(proportion.usableHot)" :step="otherStep" :positive-integer="otherPositive" @change="hotValueChange" :input-width="200" :min="0" :max="+proportion.usableHot" v-model="data.hotValue">
|
|
|
</u-number-box>
|
|
|
<view v-if="changeCash.hotCash!=0" class="padding-left-sm text-red flex justify-center align-center">
|
|
|
=
|
|
|
@@ -58,7 +58,7 @@
|
|
|
|
|
|
<view class="flex padding-xs">
|
|
|
<text class="flex justify-center align-center">积分值:</text>
|
|
|
- <u-number-box :disabled="$u.test.isEmpty(proportion.usablePoints)" @change="pointsValueChange" :input-width="200" :min="0" :max="+proportion.usablePoints" v-model="data.pointsValue">
|
|
|
+ <u-number-box :disabled="$u.test.isEmpty(proportion.usablePoints)" :step="otherStep" :positive-integer="otherPositive" @change="pointsValueChange" :input-width="200" :min="0" :max="+proportion.usablePoints" v-model="data.pointsValue">
|
|
|
</u-number-box>
|
|
|
<view v-if="changeCash.pointsCash!=0" class="padding-left-sm text-red flex justify-center align-center">
|
|
|
=
|
|
|
@@ -125,6 +125,11 @@
|
|
|
hotCash: 0,
|
|
|
pointsCash: 0
|
|
|
},
|
|
|
+
|
|
|
+ cashStep:1,
|
|
|
+ cashPositive:true,
|
|
|
+ otherStep:10,
|
|
|
+ otherPositive:true,
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
@@ -146,6 +151,19 @@
|
|
|
this.getAddress()
|
|
|
},
|
|
|
methods: {
|
|
|
+ initStep(){
|
|
|
+ let cashValue=parseFloat(this.detail.cashValue)
|
|
|
+ let equalPoints=parseFloat(this.detail.equalPoints)
|
|
|
+ if (cashValue<1.0) {
|
|
|
+ this.cashStep=0.1
|
|
|
+ this.cashPositive=false
|
|
|
+ }
|
|
|
+ if (equalPoints<1.0) {
|
|
|
+ this.otherStep=0.1
|
|
|
+ this.otherPositive=false
|
|
|
+ }
|
|
|
+ console.log(this.cashStep,this.otherStep);
|
|
|
+ },
|
|
|
getAddress(){
|
|
|
this.$u.api.user.userAddress({userId: this.userId}).then(res => {
|
|
|
this.address = res.records[0];
|
|
|
@@ -154,7 +172,7 @@
|
|
|
fetchGoodsDetail() {
|
|
|
this.$u.api.pointsGoods.list({id: this.id}).then(res => {
|
|
|
this.detail = res.records[0];
|
|
|
- console.log(this.detail);
|
|
|
+ this.initStep()
|
|
|
})
|
|
|
},
|
|
|
getUsableHotAndPoints() {
|
|
|
@@ -219,7 +237,7 @@
|
|
|
}
|
|
|
|
|
|
},
|
|
|
- toPay() {
|
|
|
+ toPay(info) {
|
|
|
WeixinJSBridge.invoke('getBrandWCPayRequest', info, (res) => {
|
|
|
if (res.err_msg == "get_brand_wcpay_request:ok" ) {
|
|
|
this.$u.api.boost.billRecord({
|