|
@@ -0,0 +1,123 @@
|
|
|
|
+<template name="cm-price">
|
|
|
|
+ <!-- 商品详情价格判断 -->
|
|
|
|
+ <view class="wrap-main">
|
|
|
|
+ <template v-if="!hasLogin">
|
|
|
|
+ <view class="p-login grade tui-skeleton-fillet">
|
|
|
|
+ <view class="floor-item-btn" v-if="product.detailTalkFlag !=2">
|
|
|
|
+ <view class="btn" @click.stop="loginClick">登录查看价格</view>
|
|
|
|
+ </view>
|
|
|
|
+ <template v-else>
|
|
|
|
+ <text class="p-no">¥</text>
|
|
|
|
+ <text class="txt big" >价格详聊</text>
|
|
|
|
+ </template>
|
|
|
|
+
|
|
|
|
+ </view>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else>
|
|
|
|
+ <view class="wrap-main-item">
|
|
|
|
+ <view class="p-price tui-skeleton-fillet">
|
|
|
|
+ <text class="txt sm">¥</text>
|
|
|
|
+ <text class="txt big" v-if="product.detailTalkFlag==2">价格详聊</text>
|
|
|
|
+ <text class="txt big" v-else>{{product.price1Str}}</text>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+
|
|
|
|
+ </template>
|
|
|
|
+
|
|
|
|
+ </view>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+ import { mapState,mapMutations } from 'vuex'
|
|
|
|
+ export default{
|
|
|
|
+ name:'cm-price',
|
|
|
|
+ props:{
|
|
|
|
+ product:{
|
|
|
|
+ type:Object,
|
|
|
|
+ },
|
|
|
|
+ userIdentity: {
|
|
|
|
+ type: Number,
|
|
|
|
+ default: 2
|
|
|
|
+ },
|
|
|
|
+ ladderPriceList:{
|
|
|
|
+ type: Array,
|
|
|
|
+ },
|
|
|
|
+ promotions:{
|
|
|
|
+ type:Object,
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return{
|
|
|
|
+ popupShow:false,
|
|
|
|
+ promotionsType:0,
|
|
|
|
+ isIphoneX:this.$store.state.isIphoneX,
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ filters: {
|
|
|
|
+ NumFormat:function(text) {//处理金额
|
|
|
|
+ return Number(text).toFixed(2);
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ ...mapState(['hasLogin','isWxAuthorize'])
|
|
|
|
+ },
|
|
|
|
+ methods:{
|
|
|
|
+ clickPopupShow(type){
|
|
|
|
+ this.popupShow = true
|
|
|
|
+ this.promotionsType = type
|
|
|
|
+ },
|
|
|
|
+ hidePopup(){
|
|
|
|
+ this.popupShow = false
|
|
|
|
+ },
|
|
|
|
+ PromotionsFormat(promo){//促销活动类型数据处理
|
|
|
|
+ if(promo!=null){
|
|
|
|
+ if(promo.type == 1 && promo.mode == 1){
|
|
|
|
+ return true
|
|
|
|
+ }else{
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return false
|
|
|
|
+ },
|
|
|
|
+ goUpgradeApply(){
|
|
|
|
+ this.$api.navigateTo('/pages/login/apply')
|
|
|
|
+ },
|
|
|
|
+ loginClick(){
|
|
|
|
+ this.$api.navigateTo('/pages/login/login')
|
|
|
|
+ },
|
|
|
|
+ goGoodActiveFn(id){
|
|
|
|
+ this.$parent.popupShow = false
|
|
|
|
+ this.$api.navigateTo('/pages/goods/goods-active?id='+id)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style lang="scss">
|
|
|
|
+
|
|
|
|
+</style>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|