index.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. <route lang="json">
  2. {
  3. "style": {
  4. "navigationStyle": "custom",
  5. "navigationBarTitleText": "%home.select%"
  6. }
  7. }
  8. </route>
  9. <template>
  10. <view class="select-country-main-wrap">
  11. <view class="top-header">
  12. <view class="left-nav"></view>
  13. {{ t('home.select') }}
  14. </view>
  15. <view class="content" @click.stop="showArea = true">
  16. <view class="content-title">{{ t('home.area') }}</view>
  17. <view class="area">Serbia</view>
  18. <wd-img
  19. class="right-nav"
  20. width="48rpx"
  21. height="48rpx"
  22. src="/static/images/home/right.svg"
  23. ></wd-img>
  24. </view>
  25. <view class="map"></view>
  26. <view class="bottom-footer">{{ t('commonPopup.confirm') }}</view>
  27. <CommonIndexBar
  28. :areaData="areaData"
  29. @handleClick="handleClick"
  30. v-model="showArea"
  31. @close="showArea = false"
  32. />
  33. </view>
  34. </template>
  35. <script setup lang="ts">
  36. import { t } from '@/locale'
  37. const showArea = ref(false) // 是否显示地区
  38. const areaData = ref([
  39. {
  40. index: 'A',
  41. data: ['阿坝', '阿拉善', '阿里', '安康', '安庆', '鞍山', '安顺', '安阳', '澳门'],
  42. },
  43. {
  44. index: 'B',
  45. data: [
  46. '北京',
  47. '白银',
  48. '保定',
  49. '宝鸡',
  50. '保山',
  51. '包头',
  52. '巴中',
  53. '北海',
  54. '蚌埠',
  55. '本溪',
  56. '毕节',
  57. '滨州',
  58. '百色',
  59. '亳州',
  60. ],
  61. },
  62. {
  63. index: 'C',
  64. data: [
  65. '重庆',
  66. '成都',
  67. '长沙',
  68. '长春',
  69. '沧州',
  70. '常德',
  71. '昌都',
  72. '长治',
  73. '常州',
  74. '巢湖',
  75. '潮州',
  76. '承德',
  77. '郴州',
  78. '赤峰',
  79. '池州',
  80. '崇左',
  81. '楚雄',
  82. '滁州',
  83. '朝阳',
  84. ],
  85. },
  86. {
  87. index: 'D',
  88. data: [
  89. '大连',
  90. '东莞',
  91. '大理',
  92. '丹东',
  93. '大庆',
  94. '大同',
  95. '大兴安岭',
  96. '德宏',
  97. '德阳',
  98. '德州',
  99. '定西',
  100. '迪庆',
  101. '东营',
  102. ],
  103. },
  104. {
  105. index: 'E',
  106. data: ['鄂尔多斯', '恩施', '鄂州'],
  107. },
  108. {
  109. index: 'F',
  110. data: ['福州', '防城港', '佛山', '抚顺', '抚州', '阜新', '阜阳'],
  111. },
  112. {
  113. index: 'G',
  114. data: ['广州', '桂林', '贵阳', '甘南', '赣州', '甘孜', '广安', '广元', '贵港', '果洛'],
  115. },
  116. {
  117. index: 'H',
  118. data: [
  119. '杭州',
  120. '哈尔滨',
  121. '合肥',
  122. '海口',
  123. '呼和浩特',
  124. '海北',
  125. '海东',
  126. '海南',
  127. '海西',
  128. '邯郸',
  129. '汉中',
  130. '鹤壁',
  131. '河池',
  132. '鹤岗',
  133. '黑河',
  134. '衡水',
  135. '衡阳',
  136. '河源',
  137. '贺州',
  138. '红河',
  139. '淮安',
  140. '淮北',
  141. '怀化',
  142. '淮南',
  143. '黄冈',
  144. '黄南',
  145. '黄山',
  146. '黄石',
  147. '惠州',
  148. '葫芦岛',
  149. '呼伦贝尔',
  150. '湖州',
  151. '菏泽',
  152. ],
  153. },
  154. ])
  155. const handleClick = ({ index, city }) => {
  156. console.log(index, city)
  157. }
  158. </script>
  159. <style lang="scss" scoped>
  160. .select-country-main-wrap {
  161. box-sizing: border-box;
  162. padding: 0 32rpx;
  163. .top-header {
  164. position: relative;
  165. box-sizing: border-box;
  166. display: flex;
  167. align-items: center;
  168. justify-content: center;
  169. width: 100%;
  170. height: 88rpx;
  171. padding: 6rpx 0;
  172. font-family: 'PingFang SC';
  173. font-size: 36rpx;
  174. font-style: normal;
  175. font-weight: 600;
  176. line-height: 52rpx; /* 144.444% */
  177. color: var(--333, $shop-text-3);
  178. text-align: center;
  179. text-transform: capitalize;
  180. .left-nav {
  181. position: absolute;
  182. top: 50%;
  183. left: 0;
  184. width: 60rpx;
  185. height: 60rpx;
  186. background-image: url(@/static/images/home/left.svg);
  187. background-size: cover;
  188. transform: translateY(-50%);
  189. }
  190. }
  191. .content {
  192. position: relative;
  193. box-sizing: border-box;
  194. flex: 1 0 0;
  195. width: 100%;
  196. height: 148rpx;
  197. padding: 24rpx 0 24rpx 0rpx;
  198. margin: 24rpx 0;
  199. font-family: 'PingFang SC';
  200. font-size: 32rpx;
  201. font-style: normal;
  202. font-weight: 400;
  203. line-height: 48rpx; /* 150% */
  204. color: var(--333, $shop-text-3);
  205. border-bottom: 1rpx solid var(--Gray-Gray3, #e7e7e7);
  206. .area {
  207. font-family: 'PingFang SC';
  208. font-size: 28rpx;
  209. line-height: 44rpx; /* 157.143% */
  210. color: var(--666, $shop-text-6);
  211. }
  212. .right-nav {
  213. position: absolute;
  214. top: 50%;
  215. right: 0;
  216. transform: translateY(-50%);
  217. }
  218. }
  219. .map {
  220. display: flex;
  221. flex-direction: column;
  222. flex-shrink: 0;
  223. align-items: flex-start;
  224. width: 100%;
  225. height: 457.334rpx;
  226. background-image: url(@/static/images/home/test-map.svg);
  227. background-size: cover;
  228. }
  229. .bottom-footer {
  230. position: fixed;
  231. bottom: 0;
  232. box-sizing: border-box;
  233. display: flex;
  234. flex: 1 0 0;
  235. align-items: center;
  236. justify-content: center;
  237. width: 100%;
  238. height: 84rpx;
  239. padding: 10rpx 66rpx;
  240. margin-top: 500rpx;
  241. font-family: 'PingFang SC';
  242. font-size: 32rpx;
  243. font-style: normal;
  244. font-weight: 600;
  245. line-height: 48rpx; /* 150% */
  246. color: $shop-white;
  247. text-align: center;
  248. text-transform: capitalize;
  249. background: var(
  250. --ff-4-c-1-bfc-7-b-1-c,
  251. linear-gradient(270deg, $shop-primary 0%, $shop-help 100%)
  252. );
  253. border-radius: 160rpx;
  254. }
  255. }
  256. </style>