index.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <template>
  2. <view class="content">
  3. <u-swiper height="320" :list="imageTopList"></u-swiper>
  4. <!-- 导航按钮 -->
  5. <view class="nav">
  6. <u-grid :col="4" :border="false" @click="toPage">
  7. <u-grid-item :index="0">
  8. <u-image width="72rpx" height="72rpx" src="/static/zhinan.png"></u-image>
  9. <view class="grid-text">分类指南</view>
  10. </u-grid-item>
  11. <u-grid-item :index="1">
  12. <u-image width="72rpx" height="72rpx" src="/static/liucheng.png"></u-image>
  13. <view class="grid-text">投递流程</view>
  14. </u-grid-item>
  15. <u-grid-item :index="2">
  16. <u-image width="72rpx" height="72rpx" src="/static/shouyi.png"></u-image>
  17. <view class="grid-text">乐豆收益</view>
  18. </u-grid-item>
  19. <u-grid-item :index="3">
  20. <u-image width="72rpx" height="72rpx" src="/static/hexiao.png"></u-image>
  21. <view class="grid-text">扫码核销</view>
  22. </u-grid-item>
  23. </u-grid>
  24. </view>
  25. <!-- 网点 -->
  26. <view class="storeList">
  27. <u-section title="附近的网点" :right="false" line-color="#01c9b2"></u-section>
  28. <view class="stores-box">
  29. <view class="stores-item" v-for="item in 3" @click="viewStore(item)">
  30. <view class="s-name">
  31. <view>
  32. 网点名称啊撒地方就拉萨附近士大夫
  33. </view>
  34. </view>
  35. <view class="s-address">
  36. <view><text>陕西西安高新二路十字103号</text></view>
  37. <view><u-icon name="map-fill" color="#01c9b2" size="30"></u-icon> 1.3KM</view>
  38. </view>
  39. <view class="s-time">
  40. <view>
  41. 营业时间:<text>9:00 - 11:00 , 12:00 - 17:00</text>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. import {
  51. checkLogin
  52. } from '@/api/login.js'
  53. import {
  54. getMapStoreList
  55. } from '@/api/store.js'
  56. import {
  57. getLookUpDatas
  58. } from '@/api/data.js'
  59. import {
  60. getUnFinishedOrder
  61. } from '@/api/order.js'
  62. export default {
  63. components: {
  64. },
  65. data() {
  66. return {
  67. imageTopList:[
  68. {image:'/static/banner.png'},
  69. {image:'/static/banner1.png'}
  70. ],
  71. goodsList:[
  72. {
  73. id: 21312312321,
  74. name: '啊撒旦解放拉萨酱豆腐爱丽丝反对萨拉地方就',
  75. src: '/static/goods.png',
  76. price: 300,
  77. status: 0
  78. },
  79. {
  80. id: 6465465465,
  81. name: '啊撒旦解放拉萨酱豆腐爱丽丝反对萨拉地方就',
  82. src: '/static/goods.png',
  83. price: 50,
  84. status: 1
  85. },
  86. ]
  87. }
  88. },
  89. onReady() {
  90. },
  91. onShow() {
  92. },
  93. onLoad() {
  94. },
  95. methods: {
  96. // 更多商品
  97. toGoods(clsId){
  98. uni.navigateTo({
  99. url:"/pages/goods/goods?id="+clsId
  100. })
  101. },
  102. // 快速导航
  103. toPage(e){
  104. let path=[
  105. '/pages/userCenter/zhinan',
  106. '/pages/userCenter/liucheng',
  107. '/pages/userCenter/ledouRecord',
  108. ''
  109. ]
  110. if(path[e]!=''){
  111. uni.navigateTo({
  112. url: path[e]
  113. })
  114. }else{
  115. // 核销
  116. this.smHx()
  117. }
  118. },
  119. // 扫码核销
  120. smHx(){
  121. uni.navigateTo({
  122. url: '/pages/checkOut/checkOut'
  123. })
  124. return
  125. uni.scanCode({
  126. success(e) {
  127. console.log(e)
  128. },
  129. fail(err) {
  130. console.log(err)
  131. }
  132. })
  133. },
  134. // 查看网点
  135. viewStore(item){
  136. uni.navigateTo({
  137. url: "/pages/store/store"
  138. })
  139. }
  140. }
  141. }
  142. </script>
  143. <style lang="scss" scoped>
  144. .content {
  145. background: url(../../static/topBg.png) no-repeat top center;
  146. background-size: 100%;
  147. width: 100%;
  148. .nav{
  149. margin: 20upx 0;
  150. border-radius: 15upx;
  151. box-shadow: 0upx 3upx 6upx #eee;
  152. overflow: hidden;
  153. .grid-text{
  154. padding-top: 10upx;
  155. }
  156. }
  157. .storeList{
  158. padding: 25upx 20upx 20upx;
  159. background: #FFFFFF;
  160. border-radius: 15upx;
  161. box-shadow: 0upx 3upx 6upx #eee;
  162. .stores-box{
  163. padding-top: 5upx;
  164. .stores-item{
  165. border-bottom: 1px solid #F8F8F8;
  166. padding: 20upx 10upx;
  167. &:last-child{
  168. border: 0;
  169. }
  170. > view{
  171. padding: 10upx 0;
  172. display: flex;
  173. align-items: center;
  174. }
  175. .s-address,.s-time{
  176. justify-content: space-between;
  177. color: #666;
  178. font-size: 24rpx;
  179. }
  180. .s-address{
  181. > view{
  182. &:last-child{
  183. font-size: 24rpx;
  184. width: 30%;
  185. display: flex;
  186. align-items: center;
  187. justify-content: flex-end;
  188. }
  189. }
  190. }
  191. }
  192. }
  193. }
  194. }
  195. </style>