index.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  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.scanCode({
  122. success(e) {
  123. console.log(e)
  124. },
  125. fail(err) {
  126. console.log(err)
  127. }
  128. })
  129. },
  130. // 查看网点
  131. viewStore(item){
  132. uni.navigateTo({
  133. url: "/pages/store/store"
  134. })
  135. }
  136. }
  137. }
  138. </script>
  139. <style lang="scss" scoped>
  140. .content {
  141. background: url(../../static/topBg.png) no-repeat top center;
  142. background-size: 100%;
  143. width: 100%;
  144. .nav{
  145. margin: 20upx 0;
  146. border-radius: 15upx;
  147. box-shadow: 0upx 3upx 6upx #eee;
  148. overflow: hidden;
  149. .grid-text{
  150. padding-top: 10upx;
  151. }
  152. }
  153. .storeList{
  154. padding: 25upx 20upx 20upx;
  155. background: #FFFFFF;
  156. border-radius: 15upx;
  157. box-shadow: 0upx 3upx 6upx #eee;
  158. .stores-box{
  159. padding-top: 5upx;
  160. .stores-item{
  161. border-bottom: 1px solid #F8F8F8;
  162. padding: 20upx 10upx;
  163. &:last-child{
  164. border: 0;
  165. }
  166. > view{
  167. padding: 10upx 0;
  168. display: flex;
  169. align-items: center;
  170. }
  171. .s-address,.s-time{
  172. justify-content: space-between;
  173. color: #666;
  174. font-size: 24rpx;
  175. }
  176. .s-address{
  177. > view{
  178. &:last-child{
  179. font-size: 24rpx;
  180. width: 30%;
  181. display: flex;
  182. align-items: center;
  183. justify-content: flex-end;
  184. }
  185. }
  186. }
  187. }
  188. }
  189. }
  190. }
  191. </style>