product.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. <!DOCTYPE html>
  2. <html class="">
  3. <!--STATUS OK-->
  4. <head>
  5. <meta name="referrer" content="always" />
  6. <meta charset='utf-8' />
  7. <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  8. <meta http-equiv="x-dns-prefetch-control" content="on">
  9. <meta name="description" content="">
  10. <meta name="format-detection" content="telephone=no" />
  11. <link rel="stylesheet" type="text/css" href="../css/api.css" />
  12. <link rel="stylesheet" type="text/css" href="../css/aui-win.css" />
  13. <link rel="stylesheet" type="text/css" href="css/vant-ui.css" />
  14. <link rel="stylesheet" type="text/css" href="css/iconfont.css">
  15. <link rel="stylesheet" type="text/css" href="css/main.css" />
  16. <link rel="stylesheet" type="text/css" href="css/countdown.css"/>
  17. <script type="text/javascript" src="../script/aui-tab.js"></script>
  18. <script src="js/vue.js"></script>
  19. <script src="js/vant-ui.js"></script>
  20. <script src="js/main.js"></script>
  21. <script src="js/countdown.js"></script>
  22. <title></title>
  23. </head>
  24. <style>
  25. .settle {
  26. position: absolute;
  27. bottom: 0;
  28. background-color: #fff;
  29. width: 100%
  30. }
  31. .settle-main {
  32. display: flex;
  33. justify-content: space-between;
  34. margin: .15rem 0;
  35. }
  36. .settle-left {
  37. margin: 0 .2rem;
  38. display: flex;
  39. flex-direction: row;
  40. align-items: center;
  41. }
  42. .settle-right {
  43. display: flex;
  44. flex-direction: row;
  45. }
  46. .buttom-buy{
  47. background-color: #fb5609;
  48. color: #ffffff;
  49. display: flex;
  50. justify-content: center;
  51. align-items: center;
  52. font-size: .34rem;
  53. border-radius: .7rem;
  54. padding:.15rem .4rem ;
  55. margin-right: .2rem;
  56. }
  57. .buttom-cart{
  58. background-color: rgba(0, 159, 233, 1);
  59. color: #ffffff;
  60. display: flex;
  61. justify-content: center;
  62. align-items: center;
  63. font-size: .34rem;
  64. border-radius: .7rem;
  65. padding:.15rem .4rem ;
  66. margin-right: .2rem;
  67. }
  68. .popup_title{
  69. margin: .4rem .2rem;
  70. text-align: center;
  71. }
  72. .price{
  73. color: #fb5609;
  74. font-size:.5rem;
  75. }
  76. .price .icon{
  77. font-size: .25rem;
  78. }
  79. .intro_title{
  80. font-size: .3rem;
  81. margin: .2rem;
  82. }
  83. .intro{
  84. background-color: #f5f5f5;
  85. margin: .2rem;
  86. display: flex;
  87. justify-content: center;
  88. align-items: center;
  89. font-size: .25rem;
  90. border-radius: .7rem;
  91. padding:.1rem .2rem ;
  92. width:1.5rem;
  93. }
  94. .popupbutton{
  95. position: absolute;
  96. bottom: 0.2rem;
  97. left:0.2rem;
  98. right:0rem;
  99. }
  100. .productBanner{
  101. position: relative;
  102. }
  103. .productBanner .price{
  104. color: #fff;
  105. font-size:.4rem;
  106. position: absolute;
  107. top:.1rem;
  108. left:1.35rem;
  109. }
  110. .productBanner.price .icon{
  111. font-size: .25rem;
  112. }
  113. .xg{
  114. background-size: cover;
  115. background: url(image/xg_bg.png) no-repeat center;
  116. background-size:100% 100%;
  117. position: absolute;
  118. top:.2rem;
  119. left:3rem;
  120. font-size: .2rem;
  121. color:#666666;
  122. padding: .05rem .1rem;
  123. }
  124. .downcount{
  125. color: #fff;
  126. font-size:.3rem;
  127. position: absolute;
  128. top:.1rem;
  129. right:0.2rem;
  130. }
  131. .times{
  132. color:#fff;
  133. font-size: .23rem;
  134. }
  135. .hms{
  136. background-color: #ffffff;
  137. color: #fb5609;
  138. font-size: .23rem;
  139. display: inline-block;
  140. text-align: center;
  141. }
  142. .price2{
  143. color: #fb5609;
  144. font-size:.4rem;
  145. position: absolute;
  146. bottom:.2rem;
  147. left:.35rem;
  148. font-weight: bold;
  149. }
  150. .price2 .icon{
  151. font-size: .25rem;
  152. }
  153. .price2 .title{
  154. font-size: .25rem;
  155. font-weight: normal;
  156. }
  157. .couponInfo{
  158. position: absolute;
  159. bottom:.2rem;
  160. right: .3rem;
  161. top:0.8rem;
  162. text-align: right;
  163. width:4.2rem;
  164. }
  165. .coupon{
  166. font-size: .2rem;
  167. color: #fb5609;
  168. background-color: #fee1d3;
  169. border-radius: .3rem;
  170. padding: 0rem .1rem;
  171. }
  172. .productTitle{
  173. font-size: .34rem;
  174. padding: .3rem .2rem;
  175. display: flex;
  176. align-items: center;
  177. border-bottom: 1px solid #f5f5f5;
  178. }
  179. .zhiying{
  180. font-size: .26rem;
  181. color: #8f5e01;
  182. background-color: #f3cb7e;
  183. border-radius: .3rem;
  184. padding: .05rem .1rem;
  185. margin-right: .1rem;
  186. }
  187. .productCount{
  188. display: flex;
  189. justify-content: space-between;
  190. flex-direction: row;
  191. padding: .3rem .2rem;
  192. font-size: .28rem;
  193. }
  194. .detail{
  195. background-color: #fff;
  196. margin:.2rem 0rem;
  197. padding:.2rem;
  198. }
  199. </style>
  200. <body>
  201. <div id="app" style="background-color:#f5f5f5;overflow : scroll;padding-bottom: 2rem;" >
  202. <div>
  203. <img src="image/cart_goods.png" style="width:100%">
  204. </div>
  205. <div class="productBanner">
  206. <img src="image/product_banner.png" style="width:100%">
  207. <div class="price">
  208. <span class="icon">¥</span>240.00
  209. </div>
  210. <div class="xg">
  211. <span style="margin-right: .06rem"><img src="image/xiangou.png" style="height:.2rem;width:.2rem"></span> 限购5条
  212. </div>
  213. <div class="downcount">
  214. <van-count-down :time="time">
  215. <template #default="timeData">
  216. <span class="times">距结束剩{{ timeData.days>0?timeData.days+"天":'' }}</span>
  217. <span class="hms">{{ timeData.hours>9? timeData.hours :"0"+timeData.hours }}</span>
  218. <span class="times">:</span>
  219. <span class="hms">{{ timeData.minutes>9?timeData.minutes:"0"+timeData.minutes }}</span>
  220. <span class="times">:</span>
  221. <span class="hms">{{ timeData.seconds>9?timeData.seconds:"0"+timeData.seconds }}</span>
  222. </template>
  223. </van-count-down>
  224. </div>
  225. <div class="price2">
  226. <div class="title">
  227. 预估到手价
  228. </div>
  229. <div>
  230. <span class="icon">¥</span>200.00
  231. </div>
  232. </div>
  233. <div class="couponInfo">
  234. <span class="coupon">爆款优惠券15元</span>
  235. <span class="coupon">注册优惠券10元</span>
  236. <span class="coupon">预计奖励4元</span>
  237. <span class="coupon">50积分</span>
  238. </div>
  239. </div>
  240. <div style="background-color: #fff; ">
  241. <div class="productTitle">
  242. <span class="zhiying">工厂直营 </span> 赛轮轮胎 205/60R16S SU58
  243. </div>
  244. <div class="productCount">
  245. <div>
  246. 已选 1条
  247. </div>
  248. <div style="color: #666666">
  249. 可购2条/已购3条
  250. </div>
  251. </div>
  252. </div>
  253. <div class="detail">
  254. 图文详情
  255. </div>
  256. <div class="settle">
  257. <div class="settle-main">
  258. <div class="settle-left" >
  259. <van-icon name="shopping-cart-o" badge="9" size=".8rem" color="#666666" v-on:click="gocar"/>
  260. </div>
  261. <div class="settle-right">
  262. <div class="buttom-cart" v-on:click="showPopup" >加入购物车</div>
  263. <div class="buttom-buy" v-on:click="showPopup">立即下单</div>
  264. </div>
  265. </div>
  266. </div>
  267. <van-popup v-model="show" closeable position="bottom" :style="{ height: '60%' }">
  268. <div class="popup_title">
  269. <div class="price" >
  270. <span class="icon">¥</span>200.00
  271. </div>
  272. </div>
  273. <div class="intro_title">
  274. 尺寸
  275. </div>
  276. <div class="intro" >15寸</div>
  277. <div class="intro_title">
  278. 花纹
  279. </div>
  280. <div class="intro" >SH56</div>
  281. <div style="text-align: right;margin-right: .2rem" >
  282. <van-stepper input-width=".6rem" button-size=".5rem"
  283. integer min="1" max="999" />
  284. </div>
  285. <div class="popupbutton">
  286. <div class="buttom-cart">加入购物车</div>
  287. </div>
  288. </van-popup>
  289. </div>
  290. </div>
  291. </body>
  292. <script type="text/javascript" src="./js/qrcode.min.js"></script>
  293. <script type="text/javascript" src="../script/aui-scroll.js"></script>
  294. <script type="text/javascript" src="./mescroll/mescroll.min.js"></script>
  295. <script type="text/javascript" src="../script/api.js"></script>
  296. <script type="text/javascript" src="../script/httpRequest.js"></script>
  297. <script type="text/javascript" src="../script/vue_plugins.js"></script>
  298. <script type="text/javascript">
  299. apiready = function () {
  300. api.parseTapmode();
  301. new Vue({
  302. el: '#app',
  303. data: {
  304. show:false,
  305. time:30 * 60 * 60 * 1000,
  306. },
  307. methods: {
  308. init: function () {
  309. this.userId = $api.getStorage('userid');
  310. // this.storeId = $api.getStorage('userid');
  311. this.loginId = $api.getStorage('loginid');
  312. this.status = $api.getStorage('status');
  313. var _this = this;
  314. },
  315. gocar:function(){
  316. this.sendEvent("gotocart");
  317. api.closeToWin({
  318. name:'root'
  319. }) ;
  320. },
  321. showPopup: function () {
  322. this.show = true;
  323. // var data = {
  324. // "url": "json",
  325. // "type": "body",
  326. // "storeId": this.storeId,
  327. // "addressType": "1",
  328. // "isDel": 0
  329. // },
  330. // _this = this,
  331. // url = "getReceiptAddress";
  332. // this.$post(url, data, function (ret) {
  333. // if (ret.code == 0 || ret.code == '0') {
  334. // _this.addresslist = ret.list;
  335. // for (var i = 0; i < _this.addresslist.length; i++) {
  336. // if (_this.addresslist[i].beDefault == 1) {
  337. // _this.radio = _this.addresslist[i].mainId
  338. // } else {
  339. // _this.radio = _this.addresslist[0].mainId
  340. // }
  341. // }
  342. // }
  343. // })
  344. },
  345. downTime:function(){
  346. var o = {
  347. el : 'time',
  348. st : 0,
  349. ed : 5400000,
  350. hh: 'hh',
  351. mm: 'mm',
  352. ss: 'ss',
  353. ms: 'ms'
  354. }
  355. var d = new countdown(o);
  356. d.downsElement();
  357. }
  358. },
  359. watch: {
  360. },
  361. computed: {
  362. },
  363. mounted: function () {
  364. this.init();
  365. // this.downTime();
  366. }
  367. })
  368. }
  369. </script>
  370. </html>