|
@@ -19,7 +19,8 @@ import {
|
|
|
Icon,
|
|
|
Badge,
|
|
|
Toast,
|
|
|
- Popup
|
|
|
+ Popup,
|
|
|
+ SubmitBar
|
|
|
} from 'vant'
|
|
|
import { defineComponent } from 'vue'
|
|
|
import styles from './index.module.less'
|
|
@@ -73,6 +74,13 @@ export default defineComponent({
|
|
|
}
|
|
|
})
|
|
|
return skuStockList
|
|
|
+ },
|
|
|
+ getPrice() {
|
|
|
+ let item = this.skuStockList.filter(n => n.id == this.radio) as any
|
|
|
+ if (item && Array.isArray(item) && item.length) {
|
|
|
+ return item[0].price
|
|
|
+ }
|
|
|
+ return 0
|
|
|
}
|
|
|
},
|
|
|
async mounted() {
|
|
@@ -208,7 +216,7 @@ export default defineComponent({
|
|
|
<div class={styles.priceGroup}>
|
|
|
<span class={styles.price}>
|
|
|
<i>¥</i>
|
|
|
- {moneyFormat(product.price)}
|
|
|
+ {moneyFormat(this.getPrice)}
|
|
|
</span>
|
|
|
<del class={styles.delPrice}>
|
|
|
¥{moneyFormat(product.originalPrice)}
|
|
@@ -278,35 +286,39 @@ export default defineComponent({
|
|
|
)}
|
|
|
|
|
|
{!this.loading && (
|
|
|
- <ActionBar class={styles.actionBar}>
|
|
|
- <ActionBarIcon
|
|
|
- icon="cart-o"
|
|
|
- // text="购物车"
|
|
|
- onClick={() => {
|
|
|
- this.$router.push('/cart')
|
|
|
- }}
|
|
|
- v-slots={{
|
|
|
- icon: () => (
|
|
|
- <Badge content={this.cartCount} showZero={false}>
|
|
|
- <Icon name={iconShopCart} size={30} />
|
|
|
- </Badge>
|
|
|
- )
|
|
|
- }}
|
|
|
- />
|
|
|
- <div class={styles.buyGroup}>
|
|
|
- <ActionBarButton
|
|
|
- type="primary"
|
|
|
- class={styles.addCertBtn}
|
|
|
- text="加入购物车"
|
|
|
- onClick={() => this.onShowCart()}
|
|
|
- />
|
|
|
- <ActionBarButton
|
|
|
- type="primary"
|
|
|
- text="立即购买"
|
|
|
- onClick={() => this.onShowCart('cartConfirm')}
|
|
|
+ <>
|
|
|
+
|
|
|
+ <ActionBar class={styles.actionBar}>
|
|
|
+ <ActionBarIcon
|
|
|
+ icon="cart-o"
|
|
|
+ // text="购物车"
|
|
|
+ onClick={() => {
|
|
|
+ this.$router.push('/cart')
|
|
|
+ }}
|
|
|
+ v-slots={{
|
|
|
+ icon: () => (
|
|
|
+ <Badge content={this.cartCount} showZero={false}>
|
|
|
+ <Icon name={iconShopCart} size={30} />
|
|
|
+ </Badge>
|
|
|
+ )
|
|
|
+ }}
|
|
|
/>
|
|
|
- </div>
|
|
|
- </ActionBar>
|
|
|
+ <div class={styles.buyGroup}>
|
|
|
+ <ActionBarButton
|
|
|
+ type="primary"
|
|
|
+ class={styles.addCertBtn}
|
|
|
+ text="加入购物车"
|
|
|
+ onClick={() => this.onShowCart()}
|
|
|
+ />
|
|
|
+ <ActionBarButton
|
|
|
+ type="primary"
|
|
|
+ text="立即购买"
|
|
|
+ onClick={() => this.onShowCart('cartConfirm')}
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </ActionBar>
|
|
|
+ <SubmitBar style={{display: 'none'}}></SubmitBar>
|
|
|
+ </>
|
|
|
)}
|
|
|
<Popup
|
|
|
show={this.addGoodsShow}
|