goods.js 537 B

1234567891011121314151617181920212223242526272829303132
  1. export default {
  2. data() {
  3. return {
  4. textCost: false
  5. }
  6. },
  7. computed: {
  8. iphonePlatform() {
  9. const systemInfo = this.$store.getters.systemInfo
  10. if (systemInfo && Object.keys(systemInfo).length > 0) {
  11. return systemInfo.model.indexOf('iPhone') !== -1
  12. }
  13. return false
  14. },
  15. goodsPrice() {
  16. return (price) => {
  17. if (price > 0) {
  18. if (this.iphonePlatform) {
  19. this.textCost = true
  20. return '需要申请'
  21. }
  22. return '¥' + price
  23. }
  24. this.textCost = true
  25. return '免费'
  26. }
  27. }
  28. }
  29. }