second_terrace.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494
  1. <template>
  2. <view>
  3. <!--标题栏-->
  4. <bar-title bgColor='bg-white'>
  5. <block slot="content" v-if="barShow">商品详情</block>
  6. <block slot="content" v-else>
  7. <text class="text-price text-red text-xxl">3999</text>
  8. </block>
  9. <block slot="right">
  10. <text class="cuIcon-forward"/>
  11. <text class="cuIcon-more"/>
  12. </block>
  13. </bar-title>
  14. <!--Tab栏,由于无法获取元素距离顶部,所以,暂时不启用此功能-->
  15. <view class="bg-white zaiui-scroll-tab-view" v-if="!barShow">
  16. <scroll-view scroll-x class="nav z text-center">
  17. <block v-for="(item,index) in tabListData" :key="index">
  18. <view class="cu-item" :class="index==TabCur?'text-black select':''" @tap="tabSelect" :data-id="index">
  19. <view>{{item}}</view>
  20. <view class="tab-dot bg-red"/>
  21. </view>
  22. </block>
  23. </scroll-view>
  24. </view>
  25. <!--Tab栏占位-->
  26. <view class="zaiui-scroll-height-view" v-if="!barShow"/>
  27. <!--商品简介-->
  28. <view class="bg-white padding zaiui-goods-synopsis-view">
  29. <view class="user-view">
  30. <view class="cu-avatar sm round" style="background-image:url(/static/images/avatar/1.jpg);"/>
  31. <view class="text-black text-name">仔仔</view>
  32. <view class="cu-tag text-right-view">
  33. <text>今天寄存在平台</text>
  34. <text class="cuIcon-right icon-text"/>
  35. </view>
  36. </view>
  37. <view class="margin-tb-lg price-view">
  38. <text class="text-price text-red">3899</text>
  39. <view class="cu-tag line-orange sm radius">
  40. <text class="cuIcon-refresharrow icon-text"/>
  41. <text>已降12元</text>
  42. </view>
  43. <view class="cu-tag line-blue sm radius">7天无理由</view>
  44. <view class="cu-tag line-blue sm radius">一口价</view>
  45. </view>
  46. <view class="text-xl text-black">iPhoneX苹果银色256G其他版本9成新无拆修有发票有配</view>
  47. <view class="text-sm margin-top-sm zaiui-row-view">
  48. <text class="cuIcon-refresharrow text-red icon-text"/>
  49. <text class="text-gray margin-left-xs">比同型号商品便宜712元,值得入手!</text>
  50. </view>
  51. <!--活动-->
  52. <view class="margin-top zaiui-hot-view-box">
  53. <view class="flex flex-wrap">
  54. <view class="basis-1">
  55. <text class="text-gray">活动</text>
  56. </view>
  57. <view class="basis-8">
  58. <view class="tag-view-box">
  59. <text class="cu-tag line-red sm radius">赠品</text>
  60. <text class="text-sm margin-left-xs">本商品赠送转转专属包装及品胜配件</text>
  61. </view>
  62. <view class="tag-view-box">
  63. <text class="cu-tag line-red sm radius">分期</text>
  64. <text class="text-sm margin-left-xs">¥455/月 花呗/微信组合支付</text>
  65. </view>
  66. </view>
  67. <view class="basis-1">
  68. <view class="text-gray text-right icon-view">
  69. <text class="cuIcon-right icon"/>
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. </view>
  75. <!--服务-->
  76. <view class="margin-top padding bg-white zaiui-service-view-box">
  77. <view class="flex flex-wrap">
  78. <view class="basis-1">
  79. <text class="text-gray">服务</text>
  80. </view>
  81. <view class="basis-8">
  82. <view class="tag-view-box">
  83. <text class="cu-tag bg-white tag-view">
  84. <text class="cuIcon-roundcheck text-red"/>
  85. <text class="margin-left-xs">已验机</text>
  86. </text>
  87. <text class="cu-tag bg-white tag-view">
  88. <text class="cuIcon-roundcheck text-red"/>
  89. <text class="margin-left-xs">24小时内发货</text>
  90. </text>
  91. <text class="cu-tag bg-white tag-view">
  92. <text class="cuIcon-roundcheck text-red"/>
  93. <text class="margin-left-xs">7天无理由退货</text>
  94. </text>
  95. <text class="cu-tag bg-white tag-view">
  96. <text class="cuIcon-roundcheck text-red"/>
  97. <text class="margin-left-xs">30天质保</text>
  98. </text>
  99. <text class="cu-tag bg-white tag-view">
  100. <text class="cuIcon-roundcheck text-red"/>
  101. <text class="margin-left-xs">质检消毒</text>
  102. </text>
  103. </view>
  104. </view>
  105. <view class="basis-1">
  106. <view class="text-gray text-right icon-view">
  107. <text class="cuIcon-right icon"/>
  108. </view>
  109. </view>
  110. </view>
  111. </view>
  112. <!--商品详情-->
  113. <view class="margin-top padding bg-white zaiui-details-view-box">
  114. <view class="text-xl title-view">
  115. <text class="cuIcon-titles text-red"/>
  116. <text class="text-black">商品详情</text>
  117. </view>
  118. <view class="text-black zaiui-text-content-view">iphoneX,美版256G,原装正品,无拆修,配件齐全,功能正常使用</view>
  119. <view class="zaiui-img-box">
  120. <image src="/static/images/home/goods/11.png" mode="widthFix"/>
  121. <image src="/static/images/home/goods/12.png" mode="widthFix"/>
  122. </view>
  123. <view class="zaiui-border-view"/>
  124. <view class="text-black title-view">买家自荐</view>
  125. <view class="bg-gray padding radius zaiui-bubble-view">
  126. <view class="cuIcon-usefullfill usefull-icon"/>
  127. <view class="text-black text-sm">苹果iPhone Xs Max 256G深空灰色</view>
  128. <view class="text-orange text-sm margin-top-sm">
  129. <text class="cuIcon-infofill"/>
  130. <text class="margin-left-xs">卖家描述仅供参考,实际情况以验机报告为准。</text>
  131. </view>
  132. </view>
  133. <view class="text-right text-gray margin-top text-sm">
  134. <text>1人想要</text>
  135. <text class="cuIcon-titles margin-lr-xs"/>
  136. <text>106次浏览</text>
  137. </view>
  138. </view>
  139. <!--关于卖家-->
  140. <view class="margin-top bg-white zaiui-selll-user-view-box">
  141. <view class="padding text-xl title-view">
  142. <text class="cuIcon-titles text-red"/>
  143. <text class="text-black">关于卖家</text>
  144. </view>
  145. <view class="cu-list menu-avatar ">
  146. <view class="cu-item">
  147. <view class="cu-avatar round" style="background-image:url(/static/images/avatar/1.jpg);"/>
  148. <view class="content">
  149. <view class="text-black">
  150. <view class="text-cut">仔仔</view>
  151. <view class="cu-tag radius bg-grey sm">
  152. <text class="cuIcon-selectionfill"/>
  153. <text class="margin-left-xs">银牌卖家</text>
  154. </view>
  155. <view class="cu-tag radius bg-orange sm just">
  156. <text class="cuIcon-radiobox"/>
  157. </view>
  158. <view class="cu-tag radius bg-blue sm just">
  159. <text class="cuIcon-myfill"/>
  160. </view>
  161. </view>
  162. <view class="flex">
  163. <text class="text-sm text-gray">90后 白羊座 女生 </text>
  164. <text class="cuIcon-titles text-gray margin-lr-xs"/>
  165. <text class="text-sm text-gray">好评率</text>
  166. <text class="text-sm text-red">87.50%</text>
  167. </view>
  168. </view>
  169. <view class="action">
  170. <view class="cuIcon-right text-gray"/>
  171. </view>
  172. </view>
  173. </view>
  174. <view class="padding zaiui-grid-tab-view">
  175. <view class="grid text-center col-3 bg-gray">
  176. <view class="item-view">
  177. <view class="text-lg">43</view>
  178. <view class="text-gray text-sm">在售宝贝</view>
  179. </view>
  180. <view class="item-view">
  181. <view class="text-lg">188</view>
  182. <view class="text-gray text-sm">累计交易</view>
  183. </view>
  184. <view class="item-view">
  185. <view class="text-lg">80%</view>
  186. <view class="text-gray text-sm">回复率</view>
  187. </view>
  188. </view>
  189. </view>
  190. <!-- #ifndef MP-TOUTIAO -->
  191. <view class="zaiui-goods-swiper-view">
  192. <swiper class="screen-swiper square-dot" indicator-dots circular :autoplay="false">
  193. <swiper-item v-for="(item,index) in goodsList.length / 4" :key="index">
  194. <view class="grid col-4">
  195. <block v-for="(items,indexs) in goodsList" :key="indexs" v-if="setSwiperItem(indexs,index)">
  196. <view class="goods-item">
  197. <view class="cu-avatar radius xl" :style="[{backgroundImage:'url('+ items.img +')'}]"/>
  198. <text class="text-sm text-price-view">¥{{items.price}}</text>
  199. </view>
  200. </block>
  201. </view>
  202. </swiper-item>
  203. </swiper>
  204. </view>
  205. <!-- #endif -->
  206. </view>
  207. <!--互动-->
  208. <view class="margin-top padding bg-white zaiui-interaction-view-box">
  209. <view class="text-xl title-view">
  210. <text class="cuIcon-titles text-red"/>
  211. <text class="text-black">互动</text>
  212. </view>
  213. <view class="text-center zaiui-interaction-view">
  214. <view class="text-gray text-sm">卖家已将商品寄送到平台,互动暂时关闭。</view>
  215. </view>
  216. <view class="zaiui-border-view"/>
  217. <view class="padding-bottom text-black text-lg">大家都想问</view>
  218. <view class="flex flex-wrap margin-bottom">
  219. <view class="basis-1">
  220. <text class="cu-tag bg-grey radius sm">问</text>
  221. </view>
  222. <view class="basis-9">
  223. <view class="margin-bottom-xs text-black">手机是正品吗?有保障吗?</view>
  224. <view class="text-sm text-gray">转转自营的每部二手手机皆经过质检工程师51项专业质检并出具了详细的配套验机评估报告,且提供7天试用和180天售后质保服务;成色为[全新]的手机,为官方全新原装手机,与官方门店购买的没有任何差别,享受官方质保与转转提供的180天售后质保服务,可以放心选购哦</view>
  225. </view>
  226. </view>
  227. <view class="flex flex-wrap margin-bottom">
  228. <view class="basis-1">
  229. <text class="cu-tag bg-grey radius sm">问</text>
  230. </view>
  231. <view class="basis-9">
  232. <view class="margin-bottom-xs text-black">都有哪些渠道版本的手机?</view>
  233. <view class="text-sm text-gray">版本包括:国行、港澳、国际版(包括美欧日韩等版本)。其中除了零售机还包括:演示机,官换机,官翻机。</view>
  234. </view>
  235. </view>
  236. <view class="zaiui-border-view"/>
  237. <view class="text-center text-blue">查看更多问答</view>
  238. </view>
  239. <!--相关推荐-->
  240. <view class="margin-tb zaiui-resemble-goods-box">
  241. <view class="flex flex-wrap">
  242. <view class="basis-sm text-right">
  243. <image class="img-aau" src="/static/zaiui/img/aau.png" lazy-load mode="widthFix"/>
  244. </view>
  245. <view class="basis-xs text-center">
  246. <text class="text-black text-lg">相关推荐</text>
  247. </view>
  248. <view class="basis-sm text-left">
  249. <image class="img-aau" src="/static/zaiui/img/aau.png" lazy-load mode="widthFix"/>
  250. </view>
  251. </view>
  252. <view class="margin-top-sm grid col-2">
  253. <view class="grid-item-box">
  254. <view class="bg-white item-view">
  255. <view class="cu-avatar radius lg" style="background-image:url(/static/images/home/goods/1.png);"/>
  256. <view class="padding-sm zaiui-text-view">
  257. <view class="text-cut text-black text-sm">99新 苹果 iPhoneX 256G 银色</view>
  258. <view class="text-sm text-gray text-cut tag-view-box">
  259. <text>银色</text> <text>256G</text>
  260. <text>苹果</text> <text>99</text>
  261. </view>
  262. <view class="text-price-view">
  263. <text class="text-price text-lg text-red">2280</text>
  264. <text class="cu-tag light bg-red sm radius">已验机</text>
  265. </view>
  266. <view class="gps-right-view">
  267. <text class="text-sm text-gray">重庆 渝北区</text>
  268. <text class="text-sm text-gray text-right">当前在线</text>
  269. </view>
  270. </view>
  271. </view>
  272. </view>
  273. <view class="grid-item-box">
  274. <view class="bg-white item-view">
  275. <view class="cu-avatar radius lg" style="background-image:url(/static/images/home/goods/4.png);"/>
  276. <view class="padding-sm zaiui-text-view">
  277. <view class="text-cut text-black text-sm">99新 苹果 iPhoneX 256G 银色</view>
  278. <view class="text-sm text-gray text-cut tag-view-box">
  279. <text>银色</text> <text>256G</text>
  280. <text>苹果</text> <text>99</text>
  281. </view>
  282. <view class="text-price-view">
  283. <text class="text-price text-lg text-red">2280</text>
  284. <text class="cu-tag line-blue sm radius">支持验机</text>
  285. </view>
  286. <view class="gps-right-view">
  287. <text class="text-sm text-gray">正品保障 7天无理由</text>
  288. </view>
  289. </view>
  290. </view>
  291. </view>
  292. <view class="grid-item-box">
  293. <view class="bg-white item-view">
  294. <view class="cu-avatar radius lg" style="background-image:url(/static/images/home/goods/11.png);"/>
  295. <view class="padding-sm zaiui-text-view">
  296. <view class="text-cut text-black text-sm">99新 苹果 iPhoneX 256G 银色</view>
  297. <view class="text-sm text-gray text-cut tag-view-box">
  298. <text>银色</text> <text>256G</text>
  299. <text>苹果</text> <text>99</text>
  300. </view>
  301. <view class="text-price-view">
  302. <text class="text-price text-lg text-red">2280</text>
  303. <text class="cu-tag light bg-red sm radius">已验机</text>
  304. </view>
  305. <view class="gps-right-view">
  306. <text class="text-sm text-gray">重庆 渝北区</text>
  307. <text class="text-sm text-gray text-right">当前在线</text>
  308. </view>
  309. </view>
  310. </view>
  311. </view>
  312. <view class="grid-item-box">
  313. <view class="bg-white item-view">
  314. <view class="cu-avatar radius lg" style="background-image:url(/static/images/home/goods/10.png);"/>
  315. <view class="padding-sm zaiui-text-view">
  316. <view class="text-cut text-black text-sm">99新 苹果 iPhoneX 256G 银色</view>
  317. <view class="text-sm text-gray text-cut tag-view-box">
  318. <text>银色</text> <text>256G</text>
  319. <text>苹果</text> <text>99</text>
  320. </view>
  321. <view class="text-price-view">
  322. <text class="text-price text-lg text-red">2280</text>
  323. <text class="cu-tag light bg-red sm radius">已验机</text>
  324. </view>
  325. <view class="gps-right-view">
  326. <text class="text-sm text-gray">重庆 渝北区</text>
  327. <text class="text-sm text-gray text-right">当前在线</text>
  328. </view>
  329. </view>
  330. </view>
  331. </view>
  332. </view>
  333. </view>
  334. <!--占位底部距离-->
  335. <view class="cu-tabbar-height"/>
  336. <!--底部操作-->
  337. <view class="bg-white zaiui-footer-fixed zaiui-foot-padding-bottom">
  338. <view class="cu-bar">
  339. <view class="flex flex-wrap">
  340. <view class="basis-xs">
  341. <view class="text-center">
  342. <view class="cuIcon-like"/>
  343. <view class="text-sm">想要</view>
  344. </view>
  345. </view>
  346. <view class="basis-xs">
  347. <view class="text-center">
  348. <view class="cuIcon-service"/>
  349. <view class="text-sm">客服</view>
  350. </view>
  351. </view>
  352. <view class="basis-sm">
  353. <view class="btn-view">
  354. <button class="cu-btn bg-orange radius shadow-blur">买前聊一聊</button>
  355. </view>
  356. </view>
  357. <view class="basis-sm">
  358. <view class="btn-view">
  359. <button class="cu-btn bg-red radius shadow-blur">马上买</button>
  360. </view>
  361. </view>
  362. </view>
  363. </view>
  364. </view>
  365. </view>
  366. </template>
  367. <script>
  368. import barTitle from '@/components/zaiui-common/basics/bar-title';
  369. import _goods_data from '@/static/zaiui/data/goods.js'; //虚拟数据
  370. import _tool from '@/static/zaiui/util/tools.js'; //工具函数
  371. export default {
  372. components: {
  373. barTitle,
  374. },
  375. data() {
  376. return {
  377. bannerCur: 0, bannerList: [], bottomModal: false, modalTitle: '', modalType: 'promotion', selectType: '',
  378. goodsList: [], interaction: true, barShow: true, TabCur: 0, tabListData: ['宝贝','卖家','互动','推荐']
  379. }
  380. },
  381. onLoad() {
  382. //this.bannerList = _goods_data.bannerListData();
  383. this.goodsList = _goods_data.goodsList();
  384. },
  385. onReady() {
  386. _tool.setBarColor(true);
  387. uni.pageScrollTo({
  388. scrollTop: 0,
  389. duration: 0
  390. });
  391. },
  392. methods: {
  393. getttImgUrl(url) {
  394. return _tool.getttImgUrl(url);
  395. },
  396. serviceTap() {
  397. this.modalTitle = "服务";
  398. this.modalType = 'service';
  399. this.showModal();
  400. },
  401. showModal() {
  402. this.bottomModal = true;
  403. },
  404. hideModal(e) {
  405. this.bottomModal = false;
  406. this.modalTitle = "";
  407. this.modalType = '';
  408. },
  409. setSwiperItem(indexs,index) {
  410. let max = (index + 1) * 4;
  411. let min = max - 4;
  412. let num = indexs + 1;
  413. if(num > min && num <= max) {
  414. return true;
  415. } else {
  416. return false;
  417. }
  418. },
  419. tabSelect(e) {
  420. let index = e.currentTarget.dataset.id;
  421. this.TabCur = index;
  422. if(index == 0) {
  423. uni.pageScrollTo({
  424. scrollTop: 300,
  425. duration: 200
  426. });
  427. }
  428. if(index == 1) {
  429. uni.pageScrollTo({
  430. scrollTop: 1418,
  431. duration: 200
  432. });
  433. }
  434. if(index == 2) {
  435. uni.pageScrollTo({
  436. scrollTop: 1723,
  437. duration: 200
  438. });
  439. }
  440. if(index == 3) {
  441. uni.pageScrollTo({
  442. scrollTop: 2413,
  443. duration: 200
  444. });
  445. }
  446. }
  447. },
  448. onPageScroll(e) {
  449. this.scrollY = e.scrollTop;
  450. //console.log(e.scrollTop);
  451. //由于无法获取元素距离顶部的距离,所以,暂时关闭以下功能。
  452. /*if (this.scrollY < 270) {
  453. this.TabCur = 0;
  454. this.barShow = true;
  455. }
  456. if (this.scrollY >= 310 && this.scrollY < 1418) {
  457. this.TabCur = 0;
  458. this.barShow = false;
  459. }
  460. if (this.scrollY >= 1418 && this.scrollY < 1723) {
  461. this.TabCur = 1;
  462. }
  463. if (this.scrollY >= 1723 && this.scrollY < 2413) {
  464. this.TabCur = 2;
  465. }
  466. if (this.scrollY >= 2413) {
  467. this.TabCur = 3;
  468. }*/
  469. },
  470. }
  471. </script>
  472. <style lang="scss">
  473. /* #ifdef APP-PLUS */
  474. @import "../../static/colorui/main.css";
  475. @import "../../static/colorui/icon.css";
  476. @import "../../static/zaiui/style/app.scss";
  477. /* #endif */
  478. @import "../../static/zaiui/style/second_terrace.scss";
  479. </style>