景徳镇旅游微信小程序
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.

166 lines
2.7 KiB

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