敢为人鲜小程序前端代码仓库
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.

241 lines
6.8 KiB

  1. <template>
  2. <view class="page">
  3. <!-- 导航栏 -->
  4. <navbar title="解绑团长" leftClick @leftClick="$utils.navigateBack" bgColor="#019245" color="#fff" />
  5. <!-- 当前取餐点 -->
  6. <view class="section">
  7. <view class="section-title">当前取餐点</view>
  8. <view class="pickup-item" v-if="currentPickupPoint">
  9. <view class="pickup-image">
  10. <image :src="currentPickupPoint.image" mode="aspectFill"></image>
  11. </view>
  12. <view class="pickup-info">
  13. <view class="pickup-name">{{ currentPickupPoint.name }}</view>
  14. <view class="pickup-address">
  15. <view class="pickup-address-icon">
  16. <uv-icon name="map-fill" color="#019245" size="24"></uv-icon>
  17. </view>
  18. <text>{{ currentPickupPoint.address }}</text>
  19. </view>
  20. <view class="pickup-phone">
  21. <uv-icon name="phone-fill" color="#019245" size="24"></uv-icon>
  22. <text>{{ currentPickupPoint.phone }}</text>
  23. </view>
  24. </view>
  25. <view class="status-icon">
  26. <uv-icon name="checkmark-circle-fill" color="#019245" size="40"></uv-icon>
  27. </view>
  28. </view>
  29. </view>
  30. <!-- 附近取餐点 -->
  31. <view class="section">
  32. <view class="section-title">附近取餐点</view>
  33. <!-- 提示信息 -->
  34. <view class="warning-tip">
  35. <uv-icon name="info-circle" color="#FF5722" size="36"></uv-icon>
  36. <text>更换取餐地址和团长,需通过平台审核方可更换!</text>
  37. </view>
  38. <!-- 取餐点列表 -->
  39. <view class="pickup-list">
  40. <view class="pickup-item" v-for="(item, index) in nearbyPickupPoints" :key="index">
  41. <view class="pickup-image">
  42. <image :src="item.spotImage" mode="aspectFill"></image>
  43. </view>
  44. <view class="pickup-info">
  45. <view class="pickup-name">{{ item.spotName }}</view>
  46. <view class="pickup-address">
  47. <view class="pickup-address-icon">
  48. <uv-icon name="map-fill" color="#019245" size="24"></uv-icon>
  49. </view>
  50. <text>{{ item.area }}</text>
  51. </view>
  52. <view class="pickup-phone">
  53. <uv-icon name="phone-fill" color="#019245" size="24"></uv-icon>
  54. <text>{{ item.phone }}</text>
  55. </view>
  56. </view>
  57. <view class="select-btn" @click="selectPickupPoint(item)">
  58. <text>选择</text>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </template>
  65. <script>
  66. import navbar from '@/components/base/navbar.vue'
  67. import { currentPickupPoint, nearbyPickupPoints } from '@/static/js/mockTeam.js'
  68. export default {
  69. components: {
  70. navbar
  71. },
  72. data() {
  73. return {
  74. // 当前取餐点
  75. currentPickupPoint:{},
  76. // 附近取餐点列表
  77. nearbyPickupPoints:[]
  78. }
  79. },
  80. methods: {
  81. // 选择取餐点
  82. selectPickupPoint(point) {
  83. uni.showModal({
  84. title: '确认选择',
  85. content: '您确定要选择该取餐点吗?需要平台审核通过后才能更换。',
  86. confirmColor: '#019245',
  87. success: (res) => {
  88. if (res.confirm) {
  89. uni.showLoading({
  90. title: '提交中...'
  91. })
  92. setTimeout(() => {
  93. uni.hideLoading()
  94. uni.showToast({
  95. title: '申请已提交,等待平台审核',
  96. icon: 'none',
  97. })
  98. setTimeout(() => {
  99. this.$utils.navigateBack()
  100. }, 1400)
  101. }, 1000)
  102. // 返回上一页
  103. }
  104. }
  105. })
  106. }
  107. },
  108. onLoad() {
  109. this.currentPickupPoint = currentPickupPoint
  110. this.$api('queryLeaderList', {}, res => {
  111. if (res.code == 200){
  112. this.nearbyPickupPoints = res.result.records
  113. }
  114. })
  115. }
  116. }
  117. </script>
  118. <style lang="scss" scoped>
  119. .page {
  120. // background-color: #f5f5f5;
  121. // min-height: 100vh;
  122. }
  123. .section {
  124. width: 96%;
  125. margin: 0 auto;
  126. margin-bottom: 20rpx;
  127. // border-radius: 10rpx;
  128. &-title {
  129. font-size: 32rpx;
  130. font-weight: bold;
  131. color: #333;
  132. padding: 30rpx 30rpx 20rpx;
  133. }
  134. }
  135. .pickup {
  136. &-item {
  137. background-color: #fff;
  138. padding: 20rpx 20rpx;
  139. display: flex;
  140. position: relative;
  141. margin-bottom: 2rpx;
  142. border-radius: 20rpx;
  143. }
  144. &-image {
  145. width: 170rpx;
  146. height: 170rpx;
  147. margin: auto 20rpx auto 0;
  148. overflow: hidden;
  149. image {
  150. width: 100%;
  151. height: 100%;
  152. }
  153. }
  154. &-info {
  155. flex: 1;
  156. display: flex;
  157. flex-direction: column;
  158. justify-content: space-between;
  159. }
  160. &-name {
  161. font-size: 30rpx;
  162. font-weight: bold;
  163. color: #3B3B3B;
  164. margin-bottom: 10rpx;
  165. }
  166. &-address, &-phone {
  167. font-size: 26rpx;
  168. color: $uni-color-third;
  169. display: flex;
  170. align-items: center;
  171. margin-bottom: 8rpx;
  172. width: 85%;
  173. text {
  174. margin-left: 8rpx;
  175. }
  176. &-icon {
  177. height: 100%;
  178. padding-top: 20rpx;
  179. }
  180. }
  181. }
  182. .status-icon {
  183. position: absolute;
  184. right: 30rpx;
  185. top: 50%;
  186. transform: translateY(-50%);
  187. }
  188. .select-btn {
  189. background-color: $uni-color;
  190. color: #fff;
  191. width: 100rpx;
  192. height: 60rpx;
  193. display: flex;
  194. justify-content: center;
  195. align-items: center;
  196. border-radius: 10rpx;
  197. align-self: center;
  198. font-size: 24rpx;
  199. }
  200. .warning-tip {
  201. background-color: #FFDBDB;
  202. // width: 90%;
  203. margin: 0rpx 40rpx 20rpx 30rpx;
  204. border-radius: 10rpx;
  205. padding: 15rpx 15rpx;
  206. display: flex;
  207. align-items: center;
  208. margin-bottom: 20rpx;
  209. text {
  210. font-size: 26rpx;
  211. color: $uni-color-second;
  212. margin-left: 10rpx;
  213. }
  214. }
  215. .pickup-list {
  216. gap: 20rpx;
  217. .pickup-item {
  218. margin-bottom: 20rpx;
  219. }
  220. }
  221. </style>