|
|
@@ -142,7 +142,7 @@
|
|
|
</el-select>
|
|
|
</td>
|
|
|
<td style="text-align: center" class="finlly-price">
|
|
|
- {{ total }} 积分
|
|
|
+ {{ money?userInfo.surplusIntegral:total }} 积分
|
|
|
<span style="color: red;" v-if="money">+{{ money }}元</span>
|
|
|
</td>
|
|
|
</tr>
|
|
|
@@ -282,7 +282,7 @@
|
|
|
<div class="listItem">
|
|
|
<div class="itemName">合计</div>
|
|
|
<div class="itemValue">
|
|
|
- {{ total }}
|
|
|
+ {{ money?userInfo.surplusIntegral:total }}
|
|
|
<span style="color: red;" v-if="money">+{{ money }}元</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -386,7 +386,7 @@
|
|
|
</div>
|
|
|
<div v-if="activeName == 'goodsNotice'" class="listItem">
|
|
|
<div class="itemName">合计</div>
|
|
|
- <div class="itemValue">{{ total }}<span style="color: red;" v-if="money">+{{ money }}元</span></div>
|
|
|
+ <div class="itemValue">{{ money?userInfo.surplusIntegral:total }}<span style="color: red;" v-if="money">+{{ money }}元</span></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
@@ -423,6 +423,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
import QRCode from 'qrcodejs2';
|
|
|
import { getWxPayCode, queryWxPayStatus } from "@/api/pay";
|
|
|
import { integralInfo, start, kill, couponList } from "@/api/allApi";
|
|
|
@@ -540,12 +541,18 @@ export default {
|
|
|
formLabelWidth: "80px",
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ // 将 getter 映射到当前组件的计算属性
|
|
|
+ ...mapGetters(['userInfo'])
|
|
|
+ },
|
|
|
watch: {
|
|
|
total(val) {
|
|
|
let surplusIntegral = this.$store.getters.userInfo.surplusIntegral;
|
|
|
let money = (val - surplusIntegral) / 10;
|
|
|
if (money >= 0) {
|
|
|
this.money = money
|
|
|
+ }else{
|
|
|
+ this.money = 0
|
|
|
}
|
|
|
console.log(this.money);
|
|
|
}
|