| | |
| | | <view class="pl-item-info-data"> |
| | | <view class="pl-item-info-data-time">{{item.createDate }}</view> |
| | | <view class="pl-item-info-data-list"> |
| | | <view class="pl-item-info-data-list-item" @click="openTwo(item.id, item)"> |
| | | <image src="/static/icon/ic_reply2@2x.png" mode="widthFix"></image> |
| | | <view class="pl-item-info-data-list-item" > |
| | | <button open-type="getPhoneNumber" style="border:none;" plain="true" @getphonenumber="getphonenumber" v-if="!userInfo ||!userInfo.id"> |
| | | <image v-if="!userInfo ||!userInfo.id" src="/static/icon/ic_reply2@2x.png" mode="widthFix" ></image> |
| | | </button> |
| | | <image v-if="userInfo && userInfo.id" src="/static/icon/ic_reply2@2x.png" mode="widthFix" @click="openTwo(item.id, item)"></image> |
| | | </view> |
| | | <view class="pl-item-info-data-list-item" @click.stop="dianzanpl(item)"> |
| | | <image src="/static/icon/dianzan.png" mode="widthFix" v-if="!item.zanStatus || item.zanStatus == 0"></image> |
| | | <image src="/static/icon/detail_ic_zan_sel@2x.png" mode="widthFix" v-else></image> |
| | | <text :style="{color: (!item.zanStatus || item.zanStatus == 0) ? '#AAAAAA' : '#004096'}">{{item.zanCount}}</text> |
| | | <view class="pl-item-info-data-list-item" > |
| | | <template v-if="userInfo && userInfo.id" > |
| | | <image src="/static/icon/dianzan.png" mode="widthFix" v-if="!item.zanStatus || item.zanStatus == 0" @click.stop="dianzanpl(item)"></image> |
| | | <image src="/static/icon/detail_ic_zan_sel@2x.png" mode="widthFix" v-else @click.stop="dianzanpl(item)"></image> |
| | | <text :style="{color: (!item.zanStatus || item.zanStatus == 0) ? '#AAAAAA' : '#004096'}" @click.stop="dianzanpl(item)">{{item.zanCount}}</text> |
| | | </template> |
| | | <template v-else> |
| | | <button open-type="getPhoneNumber" style="border:none;" plain="true" @getphonenumber="getphonenumber" v-if="!userInfo ||!userInfo.id"> |
| | | <image src="/static/icon/dianzan.png" mode="widthFix" ></image> |
| | | <text :style="{color: (!item.zanStatus || item.zanStatus == 0) ? '#AAAAAA' : '#004096'}" >{{item.zanCount}}</text> |
| | | </button> |
| | | </template> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | export default { |
| | | components: { Login }, |
| | | computed: { |
| | | ...mapState(['userInfo', 'token']) |
| | | ...mapState(['userInfo', 'token','recshopid','recuserid']) |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | // 授权手机号 |
| | | getphonenumber(e) { |
| | | if (e.detail.errMsg === 'getPhoneNumber:ok') { |
| | | this.$u.api.wxPhone({ |
| | | code: e.detail.code, |
| | | shopId:this.recshopid, |
| | | recId:this.recuserid, |
| | | openid: this.openid |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$store.commit('setUserInfo', res.data.member) |
| | | this.$store.commit('setToken', res.data.token) |
| | | this.$store.commit('setRecShopId','') |
| | | this.$store.commit('setRecUserId','') |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | // 点赞 |
| | | dianzanpl(item) { |
| | | if (!this.userInfo) { |