|
@@ -37,7 +37,15 @@
|
|
|
<text class="calc-discount-label">{{ formatDiscountZheLabel(discountZhe) }}后</text>
|
|
<text class="calc-discount-label">{{ formatDiscountZheLabel(discountZhe) }}后</text>
|
|
|
<text class="calc-discount-val">{{ formatMoney(stackDiscountedAmount) }}</text>
|
|
<text class="calc-discount-val">{{ formatMoney(stackDiscountedAmount) }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view
|
|
|
|
|
+ class="gather-pin-entry"
|
|
|
|
|
+ :class="{ 'gather-pin-entry--on': gatheringPinTop }"
|
|
|
|
|
+ @tap.stop="toggleGatheringPin"
|
|
|
|
|
+ hover-class="gather-pin-entry--hover"
|
|
|
|
|
+ >
|
|
|
|
|
+ <view class="iconfont iconzhiding gather-pin-entry__icon"></view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
<view class="rcv-pay-block">
|
|
<view class="rcv-pay-block">
|
|
|
<view class="rcv-pay-title">收款方式</view>
|
|
<view class="rcv-pay-title">收款方式</view>
|
|
@@ -228,6 +236,8 @@
|
|
|
const CALC_HISTORY_STORAGE_KEY = 'hdPad_selectPrice_calcHistory'
|
|
const CALC_HISTORY_STORAGE_KEY = 'hdPad_selectPrice_calcHistory'
|
|
|
const DISCOUNT_CUSTOM_STORAGE_KEY = 'hdPad_selectPrice_customDiscountZhe'
|
|
const DISCOUNT_CUSTOM_STORAGE_KEY = 'hdPad_selectPrice_customDiscountZhe'
|
|
|
const DISCOUNT_SELECTED_STORAGE_KEY = 'hdPad_selectPrice_discountZhe'
|
|
const DISCOUNT_SELECTED_STORAGE_KEY = 'hdPad_selectPrice_discountZhe'
|
|
|
|
|
+/** 计算器弹层置顶:须在 console.vue 中使用同名常量 */
|
|
|
|
|
+const GATHERING_PIN_TOP_STORAGE_KEY = 'hdPad_selectPrice_gatheringPinTop'
|
|
|
export default {
|
|
export default {
|
|
|
name: 'selectPrice',
|
|
name: 'selectPrice',
|
|
|
props: {
|
|
props: {
|
|
@@ -276,7 +286,9 @@ export default {
|
|
|
{ name: '线下支付宝', id: 1 },
|
|
{ name: '线下支付宝', id: 1 },
|
|
|
{ name: '现金', id: 4 },
|
|
{ name: '现金', id: 4 },
|
|
|
{ name: '银行卡', id: 5 }
|
|
{ name: '银行卡', id: 5 }
|
|
|
- ]
|
|
|
|
|
|
|
+ ],
|
|
|
|
|
+ /** 计算器置顶:persist 见 GATHERING_PIN_TOP_STORAGE_KEY */
|
|
|
|
|
+ gatheringPinTop: false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -341,8 +353,33 @@ export default {
|
|
|
mounted() {
|
|
mounted() {
|
|
|
this.loadCalcHistoryFromStorage()
|
|
this.loadCalcHistoryFromStorage()
|
|
|
this.loadDiscountFromStorage()
|
|
this.loadDiscountFromStorage()
|
|
|
|
|
+ this.loadGatheringPinFromStorage()
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ loadGatheringPinFromStorage() {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const v = uni.getStorageSync(GATHERING_PIN_TOP_STORAGE_KEY)
|
|
|
|
|
+ this.gatheringPinTop = v === true || v === 1 || v === '1' || String(v) === 'true'
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ this.gatheringPinTop = false
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ persistGatheringPinTop() {
|
|
|
|
|
+ try {
|
|
|
|
|
+ if (this.gatheringPinTop) {
|
|
|
|
|
+ uni.setStorageSync(GATHERING_PIN_TOP_STORAGE_KEY, '1')
|
|
|
|
|
+ } else {
|
|
|
|
|
+ uni.removeStorageSync(GATHERING_PIN_TOP_STORAGE_KEY)
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (e) {
|
|
|
|
|
+ console.warn('[selectPrice] persistGatheringPinTop', e)
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ toggleGatheringPin() {
|
|
|
|
|
+ this.tapVoice()
|
|
|
|
|
+ this.gatheringPinTop = !this.gatheringPinTop
|
|
|
|
|
+ this.persistGatheringPinTop()
|
|
|
|
|
+ },
|
|
|
loadCalcHistoryFromStorage() {
|
|
loadCalcHistoryFromStorage() {
|
|
|
try {
|
|
try {
|
|
|
const raw = uni.getStorageSync(CALC_HISTORY_STORAGE_KEY)
|
|
const raw = uni.getStorageSync(CALC_HISTORY_STORAGE_KEY)
|
|
@@ -1426,9 +1463,11 @@ export default {
|
|
|
opacity: 0.9;
|
|
opacity: 0.9;
|
|
|
}
|
|
}
|
|
|
.calc-section {
|
|
.calc-section {
|
|
|
|
|
+ position: relative;
|
|
|
border: 1upx solid #eeeeee;
|
|
border: 1upx solid #eeeeee;
|
|
|
border-radius: 6upx;
|
|
border-radius: 6upx;
|
|
|
padding: 10upx;
|
|
padding: 10upx;
|
|
|
|
|
+ padding-bottom: 52upx;
|
|
|
margin-top: 0;
|
|
margin-top: 0;
|
|
|
margin-bottom: 10upx;
|
|
margin-bottom: 10upx;
|
|
|
&.calc-section-active {
|
|
&.calc-section-active {
|
|
@@ -1436,6 +1475,37 @@ export default {
|
|
|
background: #f8fff8;
|
|
background: #f8fff8;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ .gather-pin-entry {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: 8upx;
|
|
|
|
|
+ bottom: 8upx;
|
|
|
|
|
+ z-index: 2;
|
|
|
|
|
+ width: 40upx;
|
|
|
|
|
+ height: 40upx;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: row;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ border-radius: 8upx;
|
|
|
|
|
+ background: rgba(250, 250, 250, 0.98);
|
|
|
|
|
+ border: 1upx solid #dddddd;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ }
|
|
|
|
|
+ .gather-pin-entry--on {
|
|
|
|
|
+ border-color: #09c567;
|
|
|
|
|
+ background: rgba(240, 255, 245, 0.95);
|
|
|
|
|
+ }
|
|
|
|
|
+ .gather-pin-entry--hover {
|
|
|
|
|
+ opacity: 0.85;
|
|
|
|
|
+ }
|
|
|
|
|
+ .gather-pin-entry__icon {
|
|
|
|
|
+ font-size: 20upx;
|
|
|
|
|
+ color: #999999;
|
|
|
|
|
+ line-height: 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ .gather-pin-entry--on .gather-pin-entry__icon {
|
|
|
|
|
+ color: #09c567;
|
|
|
|
|
+ }
|
|
|
.calc-title {
|
|
.calc-title {
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
font-size: 13upx;
|
|
font-size: 13upx;
|