index.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <template>
  2. <view class="content">
  3. <!--轮播图-->
  4. <view class="banner">
  5. <swiper :autoplay="true" :circular="true" :interval="3000" class="swiper" :indicator-dots="true">
  6. <swiper-item class="swiperItem" v-for="(item,index) in slideshowLinks" :key="index">
  7. <view class="swiperImgView ">
  8. <image class="swiperImg" :src="item"></image>
  9. </view>
  10. </swiper-item>
  11. </swiper>
  12. </view>
  13. <!--商品文字信息-->
  14. <view class="goods flex-col ">
  15. <view class=" flex-row justify-between">
  16. <view class="goodsPrice">
  17. <text>¥700</text>
  18. </view>
  19. <view class="aixinView ">
  20. <image class=" aixinImg" src="/static/imageIcon/aixin.png"></image>
  21. </view>
  22. </view>
  23. <view class="goodsName">
  24. <text>商品名字商品名字商品名字商商品名字商品名字商品字商品名字商</text>
  25. </view>
  26. <view class="goodsImgTitle">
  27. <text>商品说明商品名字商品名字字商品名字商品名字商</text>
  28. </view>
  29. </view>
  30. <!--商品详情-->
  31. <view class="flex-col">
  32. <view class="goodsDetail flex-row justify-center">
  33. <text>商品详情</text>
  34. </view>
  35. <view class="goodsDetailImgView flex-col" v-for="i in 10" :key="i">
  36. <image class="goodsDetailImg" mode="widthFix" src="/static/0e733b67a401b9b5776b5196cd5b38e0.jpg"></image>
  37. </view>
  38. </view>
  39. <view :style="{'height':'50px'}"></view>
  40. <!--底部导航-->
  41. <view class="goods-carts">
  42. <uni-goods-nav :options="options" :fill="true" :button-group="buttonGroup" @click="onClick"
  43. @buttonClick="buttonClick" />
  44. </view>
  45. </view>
  46. </template>
  47. <script>
  48. export default {
  49. data() {
  50. return {
  51. options: [{
  52. icon: 'chat',
  53. text: '客服'
  54. }, {
  55. icon: 'shop',
  56. text: '店铺',
  57. info: 2,
  58. infoBackgroundColor: '#007aff',
  59. infoColor: "#f5f5f5"
  60. }, {
  61. icon: 'cart',
  62. text: '购物车',
  63. info: 2
  64. }],
  65. buttonGroup: [{
  66. text: '加入购物车',
  67. backgroundColor: 'linear-gradient(90deg, #FFCD1E, #FF8A18)',
  68. color: '#fff'
  69. },
  70. {
  71. text: '立即购买',
  72. backgroundColor: 'linear-gradient(90deg, #FE6035, #EF1224)',
  73. color: '#fff'
  74. }
  75. ],
  76. customButtonGroup: [{
  77. text: '加入购物车',
  78. backgroundColor: 'linear-gradient(90deg, #1E83FF, #0053B8)',
  79. color: '#fff'
  80. },
  81. {
  82. text: '立即购买',
  83. backgroundColor: 'linear-gradient(90deg, #60F3FF, #088FEB)',
  84. color: '#fff'
  85. }
  86. ],
  87. slideshowLinks: [
  88. 'http://rredu.obs.cn-southwest-2.myhuaweicloud.com/upload/20230709/b1a1d6fcfb8b30f13b20607739e1b344.png',
  89. 'http://rredu.obs.cn-southwest-2.myhuaweicloud.com/upload/20230709/c3d1ebde245651d602211ba7af4d1a92.png',
  90. 'http://rredu.obs.cn-southwest-2.myhuaweicloud.com/upload/20230709/ee83d2c5934cea4d66a43a3a34d2cf86.png'
  91. ],
  92. }
  93. },
  94. onLoad() {
  95. this.getmessage()
  96. },
  97. methods: {
  98. onClick(e) {
  99. uni.showToast({
  100. title: `点击${e.content.text}`,
  101. icon: 'none'
  102. })
  103. },
  104. buttonClick(e) {
  105. console.log(e)
  106. this.options[2].info++
  107. },
  108. getmessage(){
  109. this.$api.payTheBill({}).then(res =>{
  110. console.log(res)
  111. })
  112. }
  113. }
  114. }
  115. </script>
  116. <style>
  117. @import '/common/css/common.css';
  118. @import './index.rpx.css';
  119. </style>