景徳镇旅游微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

159 lines
2.6 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <view class="submit">
  3. <view class=""
  4. @click="$refs.contactActionSheet.open()"
  5. v-if="!article">
  6. <button
  7. class="share">
  8. <uv-icon
  9. size="40rpx"
  10. name="chat"></uv-icon>
  11. <!-- star-fill -->
  12. <view class="">
  13. 客服
  14. </view>
  15. </button>
  16. </view>
  17. <view class=""
  18. @click="addCollection">
  19. <button
  20. class="share">
  21. <uv-icon
  22. size="40rpx"
  23. name="star"></uv-icon>
  24. <!-- star-fill -->
  25. <view class="">
  26. 收藏
  27. </view>
  28. </button>
  29. </view>
  30. <view class=""
  31. @click="openLocation(detail)"
  32. v-if="article">
  33. <button
  34. class="share">
  35. <image src="/static/image/tourGuide/f.png"
  36. style="width: 40rpx;height: 40rpx;"
  37. mode=""></image>
  38. <!-- star-fill -->
  39. <view class="">
  40. 导航
  41. </view>
  42. </button>
  43. </view>
  44. <view class=""
  45. v-if="!article">
  46. <button
  47. open-type="share"
  48. class="share">
  49. <uv-icon
  50. size="40rpx"
  51. name="share-square"></uv-icon>
  52. <view class="">
  53. 分享
  54. </view>
  55. </button>
  56. </view>
  57. <view class="btn"
  58. v-if="isPay"
  59. @click="$emit('submit')">
  60. {{ submiitTitle }}
  61. </view>
  62. <contactActionSheet ref="contactActionSheet"/>
  63. </view>
  64. </template>
  65. <script>
  66. import contactActionSheet from '@/components/base/contactActionSheet.vue'
  67. export default {
  68. components : {
  69. contactActionSheet,
  70. },
  71. name:"submit",
  72. props : {
  73. submiitTitle : {
  74. default : '立即购买',
  75. type : String,
  76. },
  77. article : {
  78. default : false
  79. },
  80. detail : {
  81. default : {}
  82. },
  83. collectType : {
  84. },
  85. isPay : {
  86. default : true,
  87. }
  88. },
  89. data() {
  90. return {
  91. }
  92. },
  93. methods: {
  94. // 添加收藏
  95. addCollection(){
  96. this.$api('addCollection', {
  97. itemId : this.detail.id,
  98. collectionType : this.collectType,
  99. }, res => {
  100. if(res.code == 200){
  101. this.$emit('getData')
  102. uni.showToast({
  103. title: res.message,
  104. icon:'none'
  105. })
  106. }
  107. })
  108. },
  109. openLocation(n){
  110. uni.openLocation({
  111. latitude: n.experienceLatitude,
  112. longitude: n.experienceLongitude,
  113. })
  114. },
  115. }
  116. }
  117. </script>
  118. <style lang="scss" scoped>
  119. .submit{
  120. position: fixed;
  121. bottom: 0;
  122. left: 0;
  123. width: 100vw;
  124. background-color: #fff;
  125. height: 100rpx;
  126. display: flex;
  127. justify-content: center;
  128. align-items: center;
  129. font-size: 24rpx;
  130. .btn{
  131. background: $uni-color;
  132. width: 600rpx;
  133. height: 80rpx;
  134. color: #fff;
  135. border-radius: 40rpx;
  136. font-size: 28rpx;
  137. }
  138. view{
  139. width: 100rpx;
  140. margin: 0 10rpx;
  141. display: flex;
  142. justify-content: center;
  143. align-items: center;
  144. flex-direction: column;
  145. }
  146. }
  147. </style>