second_hand.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  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">仔仔11</view>
  32. <text class="text-gray text-sm text-right-view">当前在线</text>
  33. </view>
  34. <view class="margin-tb-lg price-view">
  35. <text class="text-price text-red text-xxl">3899</text>
  36. <text class="text-through text-gray text-sm">原件¥9899</text>
  37. <text class="text-gray text-sm">包邮</text>
  38. </view>
  39. <view class="text-xl text-black">iPhoneX苹果银色256G其他版本9成新无拆修有发票有配</view>
  40. <view class="text-sm margin-top-sm zaiui-map-view">
  41. <view class="text-cut cut-view">重庆 渝北区</view>
  42. <view class="text-right-view">
  43. <text class="text-view">查看宝贝位置</text>
  44. <text class="cuIcon-right"/>
  45. </view>
  46. </view>
  47. </view>
  48. <!--服务-->
  49. <view class="margin-top padding bg-white zaiui-service-view-box">
  50. <view class="flex flex-wrap">
  51. <view class="basis-1">
  52. <text class="text-gray">服务</text>
  53. </view>
  54. <view class="basis-7">
  55. <view class="tag-view-box">
  56. <text class="tag-view">
  57. <text class="cuIcon-title text-red"/>
  58. <text>支持验机</text>
  59. </text>
  60. </view>
  61. </view>
  62. <view class="basis-2">
  63. <view class="text-gray text-right icon-view">
  64. <text class="cuIcon-right icon"/>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. <!--商品详情-->
  70. <view class="margin-top padding bg-white zaiui-details-view-box">
  71. <view class="text-black text-xl title-view">商品详情</view>
  72. <view class="grid col-2">
  73. <view class="col-item">
  74. <text class="text-gray">颜色:</text>
  75. <text class="text-black">银色</text>
  76. </view>
  77. <view class="col-item">
  78. <text class="text-gray">容量:</text>
  79. <text class="text-black">256G</text>
  80. </view>
  81. <view class="col-item">
  82. <text class="text-gray">购买渠道:</text>
  83. <text class="text-black">其他版本</text>
  84. </view>
  85. <view class="col-item">
  86. <text class="text-gray">成色:</text>
  87. <text class="text-black">9成新</text>
  88. </view>
  89. <view class="col-item">
  90. <text class="text-gray">拆修情况:</text>
  91. <text class="text-black">无拆修</text>
  92. </view>
  93. </view>
  94. <view class="text-cut col-item">
  95. <text class="text-gray">详细信息:</text>
  96. <text class="text-black">有发票,有配件,有包装</text>
  97. </view>
  98. <view class="text-black zaiui-text-content-view">iphoneX,美版256G,原装正品,无拆修,配件齐全,功能正常使用</view>
  99. <view class="zaiui-img-box">
  100. <image src="/static/images/home/goods/11.png" mode="widthFix"/>
  101. <image src="/static/images/home/goods/12.png" mode="widthFix"/>
  102. </view>
  103. <view class="zaiui-border-view"/>
  104. <view class="title-view">
  105. <text class="text-black">支持平台验机</text>
  106. <text class="text-gray text-sm margin-left">平台担保交易</text>
  107. </view>
  108. <view class="bg-white zaiui-steps-view">
  109. <view class="cu-steps steps-arrow">
  110. <view class="cu-item">
  111. <text class="cuIcon-send text-blue"/>
  112. <text class="text-black">卖家邮寄</text>
  113. <view class="text-gray text-sm">至验机中心</view>
  114. </view>
  115. <view class="cu-item">
  116. <text class="cuIcon-same text-blue"/>
  117. <text class="text-black">平台验机</text>
  118. <view class="text-gray text-sm">出具验机报告</view>
  119. </view>
  120. <view class="cu-item">
  121. <text class="cuIcon-deliver text-blue"/>
  122. <text class="text-black">买家确认</text>
  123. <view class="text-gray text-sm">平台顺丰邮寄</view>
  124. </view>
  125. </view>
  126. </view>
  127. <view class="text-right text-gray margin-top text-sm">
  128. <text>1人想要</text>
  129. <text class="cuIcon-titles margin-lr-xs"/>
  130. <text>106次浏览</text>
  131. </view>
  132. </view>
  133. <!--关于卖家-->
  134. <view class="margin-top bg-white zaiui-selll-user-view-box">
  135. <view class="padding text-black text-lg">关于卖家</view>
  136. <view class="cu-list menu-avatar ">
  137. <view class="cu-item">
  138. <view class="cu-avatar round" style="background-image:url(/static/images/avatar/1.jpg);"/>
  139. <view class="content">
  140. <view class="text-black">
  141. <view class="text-cut">仔仔</view>
  142. <view class="cu-tag radius bg-blue sm">
  143. <text class="cuIcon-myfill"/>
  144. </view>
  145. </view>
  146. <view class="flex">
  147. <text class="text-sm text-gray">90后 白羊座 女生 当前在线</text>
  148. </view>
  149. </view>
  150. <view class="action">
  151. <view class="cuIcon-right text-gray"/>
  152. </view>
  153. </view>
  154. </view>
  155. <view class="padding zaiui-grid-tab-view">
  156. <view class="grid text-center col-3 bg-gray">
  157. <view class="item-view">
  158. <view class="text-lg">1</view>
  159. <view class="text-gray text-sm">在售宝贝</view>
  160. </view>
  161. <view class="item-view">
  162. <view class="text-lg">55</view>
  163. <view class="text-gray text-sm">累计交易</view>
  164. </view>
  165. <view class="item-view">
  166. <view class="text-lg">80%</view>
  167. <view class="text-gray text-sm">回复率</view>
  168. </view>
  169. </view>
  170. </view>
  171. <!-- #ifndef MP-TOUTIAO -->
  172. <view class="zaiui-goods-swiper-view">
  173. <swiper class="screen-swiper square-dot" indicator-dots circular :autoplay="false">
  174. <swiper-item v-for="(item,index) in goodsList.length / 4" :key="index">
  175. <view class="grid col-4">
  176. <block v-for="(items,indexs) in goodsList" :key="indexs" v-if="setSwiperItem(indexs,index)">
  177. <view class="goods-item">
  178. <view class="cu-avatar radius xl" :style="[{backgroundImage:'url('+ items.img +')'}]"/>
  179. <text class="text-sm text-price-view">¥{{items.price}}</text>
  180. </view>
  181. </block>
  182. </view>
  183. </swiper-item>
  184. </swiper>
  185. </view>
  186. <!-- #endif -->
  187. </view>
  188. <!--互动-->
  189. <view class="margin-top padding bg-white zaiui-interaction-view-box">
  190. <view class="padding-bottom text-black text-lg" v-if="interaction">互动</view>
  191. <view class="padding-bottom text-black text-lg" v-else>互动( 3 )</view>
  192. <view class="zaiui-null-view" v-if="interaction">
  193. <view class="text-view-box">「问卖家」想知道更多宝贝细节</view>
  194. <button class="cu-btn bg-red round" @tap="interaction = false">点击提问</button>
  195. </view>
  196. <view class="zaiui-interaction-view" v-else>
  197. <view class="padding-tb-sm user-input-view">
  198. <view class="cu-avatar round" style="background-image:url(/static/images/avatar/1.jpg);"/>
  199. <view class="input-view-box">
  200. <view class="arrow-view"/>
  201. <input class="input-view" placeholder="问问更多细节吧~"></input>
  202. <button class="cu-btn bg-red">留言</button>
  203. </view>
  204. </view>
  205. <view class="zaiui-interaction-list-view">
  206. <view class="list-itme">
  207. <view class="cu-avatar round" style="background-image:url(/static/images/avatar/2.jpg);"/>
  208. <view class="view-box">
  209. <view class="title-box">
  210. <text class="margin-right-xs">仔仔</text>
  211. <text class="text-sm">6小时前</text>
  212. </view>
  213. <view class="text-black content-box">
  214. 特别提示:请千万不要脱离平台进行交易,避免财物损失。谨防通过微信、支付宝加好友进行商品支付、转账、付押金等欺诈行为!
  215. </view>
  216. <view class="padding-sm radius zaiui-comment-view">
  217. <view class="text-sm user-name-box">
  218. <text>仔仔111</text>
  219. <text class="cu-tag light bg-red sm radius">楼主</text>
  220. <text>5小时前</text>
  221. </view>
  222. <view class="zaiui-reply-view">
  223. <text class="text-black">回复</text>
  224. <text class="text-blue">@仔仔</text>
  225. <text class="text-black">: 是的,都写的很清楚了</text>
  226. </view>
  227. </view>
  228. </view>
  229. </view>
  230. <view class="list-itme">
  231. <view class="cu-avatar round" style="background-image:url(/static/images/avatar/3.jpg);"/>
  232. <view class="view-box">
  233. <view class="title-box">
  234. <text class="margin-right-xs">仔仔33</text>
  235. <text class="text-sm">2小时前</text>
  236. </view>
  237. <view class="text-black content-box">
  238. 测试的。
  239. </view>
  240. </view>
  241. </view>
  242. <view class="list-itme">
  243. <view class="cu-avatar round" style="background-image:url(/static/images/avatar/4.jpg);"/>
  244. <view class="view-box">
  245. <view class="title-box">
  246. <text class="margin-right-xs">仔仔444</text>
  247. <text class="text-sm">1小时前</text>
  248. </view>
  249. <view class="text-black content-box">
  250. 测试的以下效果
  251. </view>
  252. </view>
  253. </view>
  254. <view class="padding-top text-center text-blue">展开更多</view>
  255. </view>
  256. </view>
  257. <view class="zaiui-border-view"/>
  258. <view class="padding-bottom text-black text-lg">大家都想问</view>
  259. <view class="zaiui-tag-view-box">
  260. <view class="cu-tag light bg-red round">
  261. <text class="margin-right-xs">有发票吗?</text>
  262. <text class="cuIcon-creativefill"/>
  263. </view>
  264. <view class="cu-tag light bg-red round">
  265. <text class="margin-right-xs">是否包邮?</text>
  266. <text class="cuIcon-creativefill"/>
  267. </view>
  268. <view class="cu-tag light bg-red round">
  269. <text class="margin-right-xs">包装小票还在吗?</text>
  270. <text class="cuIcon-creativefill"/>
  271. </view>
  272. <view class="cu-tag light bg-red round">
  273. <text class="margin-right-xs">宝贝是全新的吗?</text>
  274. <text class="cuIcon-creativefill"/>
  275. </view>
  276. </view>
  277. <view class="zaiui-tag-text-view-box">
  278. <view class="text-cut">
  279. <text class="cu-tag line-red radius sm">问</text>
  280. <text class="text-black margin-lr-xs">能便宜点吗?</text>
  281. <text class="text-gray text-sm">答:可以小刀</text>
  282. </view>
  283. <view class="text-cut">
  284. <text class="cu-tag line-red radius sm">问</text>
  285. <text class="text-black margin-lr-xs">走平台,支持转转验机吗?</text>
  286. <text class="text-gray text-sm">答:可以小刀</text>
  287. </view>
  288. </view>
  289. <view class="zaiui-border-view"/>
  290. <view class="text-center text-blue">查看更多问答</view>
  291. </view>
  292. <!--您推荐同型号已验机商品-->
  293. <view class="margin-top padding bg-white zaiui-recommend-goods-box">
  294. <view class="text-black">为您推荐同型号已验机商品</view>
  295. <view class="margin-top zaiui-goods-info-box">
  296. <view class="goods-img-view">
  297. <view class="cu-avatar radius lg" style="background-image:url(/static/images/home/goods/1.png);"/>
  298. <view class="cu-tag bg-cyan sm radius">已出报告</view>
  299. </view>
  300. <view class="goods-info-view">
  301. <view class="text-cut text-black">8新以下苹果iPhoneX 64G银色</view>
  302. <view class="tag-view-box">
  303. <view class="cu-tag sm radius">顺丰发货</view>
  304. <view class="cu-tag sm radius">30天质保</view>
  305. <view class="cu-tag sm radius">分期付款</view>
  306. </view>
  307. <view class="text-price-view">
  308. <text class="text-price text-red text-xxl">3999</text>
  309. <text class="text-red text-sm">起</text>
  310. </view>
  311. <view class="text-cut text-sm text-gray">立即查看验机报告</view>
  312. </view>
  313. </view>
  314. </view>
  315. <!--相似商品-->
  316. <view class="margin-tb zaiui-resemble-goods-box">
  317. <view class="padding bg-white text-black text-lg text-title-view">相似商品</view>
  318. <view class="grid col-2">
  319. <view class="grid-item-box">
  320. <view class="bg-white item-view">
  321. <view class="cu-avatar radius lg" style="background-image:url(/static/images/home/goods/1.png);"/>
  322. <view class="padding-sm zaiui-text-view">
  323. <view class="text-cut text-black text-sm">99新 苹果 iPhoneX 256G 银色</view>
  324. <view class="text-sm text-gray text-cut tag-view-box">
  325. <text>银色</text> <text>256G</text>
  326. <text>苹果</text> <text>99</text>
  327. </view>
  328. <view class="text-price-view">
  329. <text class="text-price text-lg text-red">2280</text>
  330. <text class="cu-tag light bg-red sm radius">已验机</text>
  331. </view>
  332. <view class="gps-right-view">
  333. <text class="text-sm text-gray">重庆 渝北区</text>
  334. <text class="text-sm text-gray text-right">当前在线</text>
  335. </view>
  336. </view>
  337. </view>
  338. </view>
  339. <view class="grid-item-box">
  340. <view class="bg-white item-view">
  341. <view class="cu-avatar radius lg" style="background-image:url(/static/images/home/goods/4.png);"/>
  342. <view class="padding-sm zaiui-text-view">
  343. <view class="text-cut text-black text-sm">99新 苹果 iPhoneX 256G 银色</view>
  344. <view class="text-sm text-gray text-cut tag-view-box">
  345. <text>银色</text> <text>256G</text>
  346. <text>苹果</text> <text>99</text>
  347. </view>
  348. <view class="text-price-view">
  349. <text class="text-price text-lg text-red">2280</text>
  350. <text class="cu-tag line-blue sm radius">支持验机</text>
  351. </view>
  352. <view class="gps-right-view">
  353. <text class="text-sm text-gray">正品保障 7天无理由</text>
  354. </view>
  355. </view>
  356. </view>
  357. </view>
  358. <view class="grid-item-box">
  359. <view class="bg-white item-view">
  360. <view class="cu-avatar radius lg" style="background-image:url(/static/images/home/goods/11.png);"/>
  361. <view class="padding-sm zaiui-text-view">
  362. <view class="text-cut text-black text-sm">99新 苹果 iPhoneX 256G 银色</view>
  363. <view class="text-sm text-gray text-cut tag-view-box">
  364. <text>银色</text> <text>256G</text>
  365. <text>苹果</text> <text>99</text>
  366. </view>
  367. <view class="text-price-view">
  368. <text class="text-price text-lg text-red">2280</text>
  369. <text class="cu-tag light bg-red sm radius">已验机</text>
  370. </view>
  371. <view class="gps-right-view">
  372. <text class="text-sm text-gray">重庆 渝北区</text>
  373. <text class="text-sm text-gray text-right">当前在线</text>
  374. </view>
  375. </view>
  376. </view>
  377. </view>
  378. <view class="grid-item-box">
  379. <view class="bg-white item-view">
  380. <view class="cu-avatar radius lg" style="background-image:url(/static/images/home/goods/10.png);"/>
  381. <view class="padding-sm zaiui-text-view">
  382. <view class="text-cut text-black text-sm">99新 苹果 iPhoneX 256G 银色</view>
  383. <view class="text-sm text-gray text-cut tag-view-box">
  384. <text>银色</text> <text>256G</text>
  385. <text>苹果</text> <text>99</text>
  386. </view>
  387. <view class="text-price-view">
  388. <text class="text-price text-lg text-red">2280</text>
  389. <text class="cu-tag light bg-red sm radius">已验机</text>
  390. </view>
  391. <view class="gps-right-view">
  392. <text class="text-sm text-gray">重庆 渝北区</text>
  393. <text class="text-sm text-gray text-right">当前在线</text>
  394. </view>
  395. </view>
  396. </view>
  397. </view>
  398. </view>
  399. </view>
  400. <!--占位底部距离-->
  401. <view class="cu-tabbar-height"></view>
  402. <!--底部操作-->
  403. <view class="bg-white zaiui-footer-fixed zaiui-foot-padding-bottom">
  404. <view class="cu-bar">
  405. <view class="flex flex-wrap">
  406. <view class="basis-xs">
  407. <view class="text-center">
  408. <view class="cuIcon-like"/>
  409. <view class="text-sm">想要</view>
  410. </view>
  411. </view>
  412. <view class="basis-sm">
  413. <view class="btn-view">
  414. <button class="cu-btn bg-orange radius shadow-blur">聊一聊</button>
  415. </view>
  416. </view>
  417. <view class="basis-sm">
  418. <view class="btn-view">
  419. <button class="cu-btn bg-red radius shadow-blur">马上买</button>
  420. </view>
  421. </view>
  422. </view>
  423. </view>
  424. </view>
  425. </view>
  426. </template>
  427. <script>
  428. import barTitle from '@/components/zaiui-common/basics/bar-title';
  429. import _goods_data from '@/static/zaiui/data/goods.js'; //虚拟数据
  430. import _tool from '@/static/zaiui/util/tools.js'; //工具函数
  431. export default {
  432. components: {
  433. barTitle,
  434. },
  435. data() {
  436. return {
  437. bannerCur: 0, bannerList: [], bottomModal: false, modalTitle: '', modalType: 'promotion', selectType: '',
  438. goodsList: [], interaction: true, barShow: true, TabCur: 0, tabListData: ['宝贝','卖家','互动','推荐']
  439. }
  440. },
  441. onLoad() {
  442. //this.bannerList = _goods_data.bannerListData();
  443. this.goodsList = _goods_data.goodsList();
  444. },
  445. onReady() {
  446. _tool.setBarColor(true);
  447. uni.pageScrollTo({
  448. scrollTop: 0,
  449. duration: 0
  450. });
  451. },
  452. methods: {
  453. getttImgUrl(url) {
  454. return _tool.getttImgUrl(url);
  455. },
  456. serviceTap() {
  457. this.modalTitle = "服务";
  458. this.modalType = 'service';
  459. this.showModal();
  460. },
  461. showModal() {
  462. this.bottomModal = true;
  463. },
  464. hideModal(e) {
  465. this.bottomModal = false;
  466. this.modalTitle = "";
  467. this.modalType = '';
  468. },
  469. setSwiperItem(indexs,index) {
  470. let max = (index + 1) * 4;
  471. let min = max - 4;
  472. let num = indexs + 1;
  473. if(num > min && num <= max) {
  474. return true;
  475. } else {
  476. return false;
  477. }
  478. },
  479. tabSelect(e) {
  480. let index = e.currentTarget.dataset.id;
  481. this.TabCur = index;
  482. if(index == 0) {
  483. uni.pageScrollTo({
  484. scrollTop: 300,
  485. duration: 200
  486. });
  487. }
  488. if(index == 1) {
  489. uni.pageScrollTo({
  490. scrollTop: 1418,
  491. duration: 200
  492. });
  493. }
  494. if(index == 2) {
  495. uni.pageScrollTo({
  496. scrollTop: 1723,
  497. duration: 200
  498. });
  499. }
  500. if(index == 3) {
  501. uni.pageScrollTo({
  502. scrollTop: 2413,
  503. duration: 200
  504. });
  505. }
  506. }
  507. },
  508. onPageScroll(e) {
  509. this.scrollY = e.scrollTop;
  510. //console.log(e.scrollTop);
  511. //由于无法获取元素距离顶部的距离,所以,暂时关闭以下功能。
  512. /*if (this.scrollY < 270) {
  513. this.TabCur = 0;
  514. this.barShow = true;
  515. }
  516. if (this.scrollY >= 310 && this.scrollY < 1418) {
  517. this.TabCur = 0;
  518. this.barShow = false;
  519. }
  520. if (this.scrollY >= 1418 && this.scrollY < 1723) {
  521. this.TabCur = 1;
  522. }
  523. if (this.scrollY >= 1723 && this.scrollY < 2413) {
  524. this.TabCur = 2;
  525. }
  526. if (this.scrollY >= 2413) {
  527. this.TabCur = 3;
  528. }*/
  529. },
  530. }
  531. </script>
  532. <style lang="scss">
  533. /* #ifdef APP-PLUS */
  534. @import "../../static/colorui/main.css";
  535. @import "../../static/colorui/icon.css";
  536. @import "../../static/zaiui/style/app.scss";
  537. /* #endif */
  538. @import "../../static/zaiui/style/second_hand.scss";
  539. </style>