123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <template name="second-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" v-if="identity == 1">
- <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.price | NumFormat}}</text>
- </view>
- </view>
- <view class="wrap-main-item" v-else>
- <view class="p-price tui-skeleton-fillet">
- <text class="txt sm">¥</text>
- <text class="txt big">{{product.price | NumFormat}}</text>
- </view>
- </view>
- </template>
- </view>
- </template>
- <script>
- import { mapState,mapMutations } from 'vuex'
- export default{
- name:'second-price',
- props:{
- product:{
- type:Object,
- },
- },
- data() {
- return{
-
- }
- },
- filters: {
- NumFormat:function(text) {//处理金额
- return Number(text).toFixed(2);
- },
- },
- created() {
- console.log(this.product)
- },
- computed: {
- ...mapState(['hasLogin','isWxAuthorize','identity'])
- },
- methods:{
- loginClick(){
- this.$api.navigateTo('/pages/login/login')
- },
- },
-
- }
- </script>
- <style lang="scss">
- </style>
|