珠宝小程序前端代码
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.

170 lines
2.9 KiB

5 months ago
5 months ago
4 months ago
5 months ago
5 months ago
4 months ago
3 months ago
4 months ago
5 months ago
3 months ago
3 months ago
3 months ago
3 months ago
3 months ago
5 months ago
4 months ago
4 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
3 months ago
5 months ago
5 months ago
4 months ago
5 months ago
5 months ago
5 months ago
3 months ago
3 months ago
4 months ago
5 months ago
5 months ago
3 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
4 months ago
5 months ago
5 months ago
5 months ago
5 months ago
  1. <template>
  2. <view class="submit">
  3. <!-- 联系客服 -->
  4. <!-- <view @click="$emit('service')" class="service-icon">
  5. <image src="@/pages_order/static/productDetail/service.png" mode="widthFix" class="service-icon-img">
  6. </image>
  7. <view class="title">
  8. 客服
  9. </view>
  10. </view> -->
  11. <button
  12. open-type="contact"
  13. class="service-icon">
  14. <uv-icon
  15. name="kefu-ermai"
  16. size="45rpx"
  17. ></uv-icon>
  18. <view class="title">
  19. 客服
  20. </view>
  21. </button>
  22. <button
  23. class="service-icon give"
  24. @click="$emit('toSend')">
  25. <uv-icon
  26. name="gift-fill"
  27. size="45rpx"
  28. color="#eb3300"
  29. ></uv-icon>
  30. <view class="title">
  31. 送礼
  32. </view>
  33. </button>
  34. <view class="submit-btn">
  35. <view class="l"
  36. @click="!disabled && $emit('addCart')"
  37. :class="{'disabled': disabled}">
  38. {{ disabled ? '库存不足' : '加入购物车' }}
  39. </view>
  40. <view class="r"
  41. v-if="detail.num > 0"
  42. @click="!disabled && $emit('submit')"
  43. :class="{'disabled': disabled}">
  44. {{ disabled ? '库存不足' : submiitTitle }}
  45. </view>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. export default {
  51. name: "submit",
  52. props: {
  53. submiitTitle: {
  54. default: '立即购买',
  55. type: String,
  56. },
  57. detail: {
  58. default: {}
  59. },
  60. disabled: {
  61. type: Boolean,
  62. default: false
  63. }
  64. },
  65. data() {
  66. return {
  67. }
  68. },
  69. methods: {
  70. }
  71. }
  72. </script>
  73. <style lang="scss" scoped>
  74. .submit {
  75. position: fixed;
  76. bottom: 0;
  77. left: 0;
  78. width: 100vw;
  79. background-color: #fff;
  80. height: 120rpx;
  81. display: flex;
  82. justify-content: center;
  83. align-items: center;
  84. font-size: 24rpx;
  85. padding: 0rpx 20rpx;
  86. box-sizing: border-box;
  87. // 联系客服
  88. .service-icon {
  89. padding: 0;
  90. margin: 0;
  91. background-color: transparent;
  92. display: flex;
  93. flex-direction: column;
  94. justify-content: center;
  95. margin: 0 20rpx;
  96. flex-shrink: 0;
  97. align-items: center;
  98. &::after{
  99. border: 0;
  100. }
  101. .service-icon-img {
  102. width: 45rpx;
  103. height: 45rpx;
  104. }
  105. .title {
  106. font-size: 26rpx;
  107. color: #666666;
  108. line-height: 40rpx;
  109. }
  110. }
  111. .give{
  112. background: rgba($uni-color, 0.1);
  113. padding: 6rpx 20rpx;
  114. border-radius: 15rpx;
  115. .title{
  116. color: $uni-color;
  117. }
  118. }
  119. .submit-btn {
  120. width: calc(100% - 140rpx);
  121. height: 80rpx;
  122. color: #fff;
  123. border-radius: 40rpx;
  124. font-size: 28rpx;
  125. margin-left: 40rpx;
  126. display: flex;
  127. justify-content: center;
  128. align-items: center;
  129. overflow: hidden;
  130. border: 1rpx solid $uni-color;
  131. .l {
  132. flex: 1;
  133. display: flex;
  134. justify-content: center;
  135. align-items: center;
  136. color: $uni-color;
  137. }
  138. .r {
  139. background: $uni-color;
  140. flex: 1;
  141. height: 100%;
  142. display: flex;
  143. justify-content: center;
  144. align-items: center;
  145. &.disabled {
  146. background: #cccccc;
  147. cursor: not-allowed;
  148. }
  149. }
  150. .l.disabled {
  151. color: #999999;
  152. cursor: not-allowed;
  153. }
  154. }
  155. }
  156. </style>