product.vue 29 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193
  1. <template>
  2. <!-- <page-meta :page-style="'overflow:'+(show?'hidden':'visible')" ></page-meta>
  3. <view>
  4. <view class="product_image_box">
  5. <image class="product_image" :src="productInfo.thumb" mode="heightFix"></image>
  6. </view>
  7. <view class="product_info">
  8. <view class="stock_price">
  9. <view class="product_price">
  10. <text>¥{{productInfo.score}} </text>
  11. </view>
  12. <view class="product_stock">剩{{productInfo.stock}}个</view>
  13. </view>
  14. <view class="product_name">{{productInfo.name}}</view>
  15. <view class="product_spec">{{productInfo.spec}}</view>
  16. </view>
  17. <view class="product_description">
  18. <rich-text :nodes="productInfo.description"></rich-text>
  19. </view>
  20. <view class="order_car">
  21. <button class="show_order" data-eventsync="true" @click="showSpecPopup(1)" >立即兑换</button>
  22. </view>
  23. <view class="to_bottom"> --- 到底了 --- </view>
  24. <uni-popup ref="specPopup" :show="true" type="bottom" class="popup" background-color="#FFFFFF" @change="popupChange">
  25. <view class="order_info">
  26. <view class="custom_addr" @click="showAddrPopup()">
  27. <view class="contact_user">
  28. <text class="contact_none" v-if="!checkedAddr.id">请选择收货地址</text>
  29. <text class="contact_name" >{{checkedAddr.contact_name}}</text>
  30. <text class="contact_phone" >{{checkedAddr.contact_phone}}</text>
  31. <text class="contact_more"> &gt;</text>
  32. </view>
  33. <view class="contact_addr">
  34. {{checkedAddr.contact_province}} {{checkedAddr.contact_city}} {{checkedAddr.contact_area}} {{checkedAddr.contact_addr}}
  35. </view>
  36. </view>
  37. <view class="car_item" >
  38. <view class="box_left">
  39. <image class="car_image" :src="productInfo.thumb" mode=""></image>
  40. </view>
  41. <view class="box_right">
  42. <view class="car_name">{{productInfo.name}}</view>
  43. <view class="stock_price">
  44. <view class="product_price">
  45. <text>{{productInfo.score}} 积分</text>
  46. </view>
  47. <view class="product_quantity_box">
  48. <button class="product_quantity_sub" @click="changeQuantity(-1)" data-eventsync="true">
  49. <image class="sub_icon" src="../../static/icon/sub_icon.png" mode=""></image>
  50. </button>
  51. <input type="number" class="product_quantity" placeholder="数量" v-model="quantity" @blur="changeQuantity(0)" ></input>
  52. <button class="product_quantity_add" @click="changeQuantity(+1)" data-eventsync="true">
  53. <image class="add_icon" src="../../static/icon/add_icon.png" mode=""></image>
  54. </button>
  55. </view>
  56. </view>
  57. <view class="product_stock">剩{{productInfo.stock}}个</view>
  58. </view>
  59. </view>
  60. <!-- 购物车增加两个撑高度
  61. <view class="to_select_coupon" ></view>
  62. <view class="to_select_coupon" ></view>
  63. <view class="order_price" >合计: {{priceTotal}} 积分</view>
  64. <view class="order_btn">
  65. <button class="to_order" @click="createOrder()" data-eventsync="true" >兑换</button>
  66. </view>
  67. </view>
  68. </uni-popup>
  69. <uni-popup ref="addrPopup" type="bottom" class="popup" background-color="#FFFFFF" >
  70. <view class="popup_title">收货地址 <navigator url="/pages/addr/index?notify=addr" class="to_addr_page">管理</navigator> </view>
  71. <view class="addr_list">
  72. <view class="addr_item" v-for="(item,index) in addrList" :key="index" @click="checkedAddrItem(item)">
  73. <view class="radio_label">
  74. <image class="radio_icon" :src="item.id == checkedAddr.id? '../../static/icon/radioed.png' : '../../static/icon/radio.png'" ></image>
  75. </view>
  76. <view class="contact_user">
  77. <text class="contact_name">{{item.contact_name}}</text>
  78. <text class="contact_phone">{{item.contact_phone}}</text>
  79. <text class="contact_default" v-if="item.is_default">默认</text>
  80. </view>
  81. <view class="contact_addr">
  82. {{item.contact_province}} {{item.contact_city}} {{item.contact_area}} {{item.contact_addr}}
  83. </view>
  84. </view>
  85. </view>
  86. <view class="create_box">
  87. <navigator url="/pages/addr/index?notify=addr&type=create" class="create_addr" >新建收货地址</navigator>
  88. </view>
  89. </uni-popup>
  90. </view> -->
  91. <page-meta :page-style="'overflow:'+(show?'hidden':'visible')" ></page-meta>
  92. <view>
  93. <view class="goback" :style="{top:StatusBarHeight+ 'px'}" @click="goBack">
  94. <uni-icons type="back" color="#fff" size="20"></uni-icons>
  95. </view>
  96. <view class="product_image_box">
  97. <image class="product_image" :src="productInfo.thumb" mode="heightFix"></image>
  98. </view>
  99. <view class="product_info">
  100. <view class="product_title_info">
  101. <view class="product_title">
  102. <text>{{productInfo.name}}</text>
  103. </view>
  104. <view class="product_subtitle">
  105. <text>我是副标题</text>
  106. </view>
  107. <view class="product_spec">
  108. <view class="spec_name">{{productInfo.score}}积分</view>
  109. <view class="product_stock">库存{{productInfo.stock}}个</view>
  110. </view>
  111. </view>
  112. </view>
  113. <view class="product_description">
  114. <rich-text :nodes="productInfo.description"></rich-text>
  115. </view>
  116. <!-- <view class="product_comment">
  117. <view class="comment_num">
  118. <view class="comment_num_title">
  119. 评论区(6000+)
  120. </view>
  121. <view class="comment_num_icon">
  122. >
  123. </view>
  124. </view>
  125. <view class="comment_list">
  126. <view class="comment_left">
  127. <view class="user_order_info">
  128. <text class="user_name">Raindfa</text>
  129. <text>黑色大款/XXL</text>
  130. </view>
  131. <view class="user_comment">
  132. 这个课程真不错这个课程真不错这个课程真不错
  133. </view>
  134. </view>
  135. <view class="comment_right">
  136. <image src="" mode=""></image>
  137. </view>
  138. </view>
  139. </view> -->
  140. <view class="order_car">
  141. <navigator url="/pages/index/index" open-type="switchTab" class="to_car" >
  142. <image src="../../static/tabbar/score.png" class="car_icon" ></image>
  143. <view class="text">
  144. 首页
  145. </view>
  146. </navigator>
  147. <!-- <navigator url="/pagesA/user/favorites" open-type="switchTab" class="to_car" >
  148. <image src="../../static/user_icon/user_favo.png" class="car_icon" ></image>
  149. <view class="text">
  150. 收藏
  151. </view>
  152. </navigator>
  153. <navigator url="/pages/car/index" open-type="switchTab" class="to_car" >
  154. <image src="../../static/icon/car.png" class="car_icon" ></image>
  155. <view class="shop_cat_text">
  156. 购物车
  157. </view>
  158. </navigator>-->
  159. <button class="show_car" data-eventsync="true" @click="showSpecPopup(2)" >立即兑换</button>
  160. </view>
  161. <view class="to_bottom"> --- 到底了 --- </view>
  162. <uni-popup ref="specPopup" :show="true" type="bottom" class="popup" background-color="#FFFFFF" @change="popupChange">
  163. <view class="order_info">
  164. <view class="custom_addr" @click="showAddrPopup()">
  165. <view class="contact_user">
  166. <text class="contact_none" v-if="!checkedAddr.id">请选择收货地址</text>
  167. <text class="contact_name" >{{checkedAddr.contact_name}}</text>
  168. <text class="contact_phone" >{{checkedAddr.contact_phone}}</text>
  169. <text class="contact_more"> &gt;</text>
  170. </view>
  171. <view class="contact_addr">
  172. {{checkedAddr.contact_province}} {{checkedAddr.contact_city}} {{checkedAddr.contact_area}} {{checkedAddr.contact_addr}}
  173. </view>
  174. </view>
  175. <view class="car_item" >
  176. <view class="box_left">
  177. <image class="car_image" :src="productInfo.thumb" mode=""></image>
  178. </view>
  179. <view class="box_right">
  180. <view class="car_name">{{productInfo.name}}</view>
  181. <view class="stock_price">
  182. <view class="product_price">
  183. <text>{{productInfo.score}} 积分</text>
  184. </view>
  185. <view class="product_quantity_box">
  186. <button class="product_quantity_sub" @click="changeQuantity(-1)" data-eventsync="true">
  187. <image class="sub_icon" src="../../static/icon/sub_icon.png" mode=""></image>
  188. </button>
  189. <input type="number" class="product_quantity" placeholder="数量" v-model="quantity" @blur="changeQuantity(0)" ></input>
  190. <button class="product_quantity_add" @click="changeQuantity(+1)" data-eventsync="true">
  191. <image class="add_icon" src="../../static/icon/add_icon.png" mode=""></image>
  192. </button>
  193. </view>
  194. </view>
  195. <view class="product_stock">剩{{productInfo.stock}}个</view>
  196. </view>
  197. </view>
  198. <!-- 购物车增加两个撑高度 -->
  199. <view class="to_select_coupon" ></view>
  200. <view class="to_select_coupon" ></view>
  201. <view class="order_price" >合计: {{priceTotal}} 积分</view>
  202. <view class="order_btn">
  203. <button class="to_order" @click="createOrder()" data-eventsync="true" >兑换</button>
  204. </view>
  205. </view>
  206. </uni-popup>
  207. <uni-popup ref="addrPopup" type="bottom" class="popup" background-color="#FFFFFF" >
  208. <view class="popup_title">收货地址 <navigator url="/pages/addr/index?notify=addr" class="to_addr_page">管理</navigator> </view>
  209. <view class="addr_list">
  210. <view class="addr_item" v-for="(item,index) in addrList" :key="index" @click="checkedAddrItem(item)">
  211. <view class="radio_label">
  212. <image class="radio_icon" :src="item.id == checkedAddr.id? '../../static/icon/radioed.png' : '../../static/icon/radio.png'" ></image>
  213. </view>
  214. <view class="contact_user">
  215. <text class="contact_name">{{item.contact_name}}</text>
  216. <text class="contact_phone">{{item.contact_phone}}</text>
  217. <text class="contact_default" v-if="item.is_default">默认</text>
  218. </view>
  219. <view class="contact_addr">
  220. {{item.contact_province}} {{item.contact_city}} {{item.contact_area}} {{item.contact_addr}}
  221. </view>
  222. </view>
  223. </view>
  224. <view class="create_box">
  225. <navigator url="/pages/addr/index?notify=addr&type=create" class="create_addr" >新建收货地址</navigator>
  226. </view>
  227. </uni-popup>
  228. </view>
  229. </template>
  230. <script>
  231. export default {
  232. data() {
  233. return {
  234. show:false, // 使用Popup组件时,阻止禁止滚动穿透
  235. productInfo:{
  236. id:0,
  237. name:"",
  238. score:0,
  239. spec:"",
  240. stock:0,
  241. thumb:"",
  242. description:"",
  243. },
  244. requestParam:{
  245. id:0,
  246. },
  247. // 数量
  248. quantity:1,
  249. // 总价
  250. priceTotal:'0.00',
  251. // 规格选择按钮类型
  252. specBtnType: 1, // 1预约。2购物车
  253. // 地址列表
  254. addrList:[],
  255. // 已选地址
  256. checkedAddr:{
  257. id:0,
  258. contact_name:"",
  259. contact_phone:"",
  260. contact_province:"",
  261. contact_city:"",
  262. contact_area:"",
  263. contact_addr:"",
  264. is_default:0,
  265. },
  266. //获取微信小程序分享按钮的信息
  267. StatusBarHeight:0,
  268. }
  269. },
  270. onLoad(param) {
  271. // 接受路由参数,产品ID
  272. this.requestParam.id = param.id;
  273. var that = this;
  274. // 监听地址变动
  275. uni.$on('addr_list_change',function(data){
  276. // 地址列表
  277. that.addrList = data.list;
  278. })
  279. },
  280. onShow() {
  281. // 如果存在产品ID的话
  282. if( this.requestParam.id > 0) {
  283. // 请求详情
  284. this.$http.request('api/score_product/get_detail',this.requestParam).then((re)=>{
  285. // 成功渲染数据
  286. if( re.code == 'success' ) {
  287. // 刷新数据
  288. this.productInfo = re.data;
  289. }
  290. });
  291. };
  292. this.getStatusBarHeight();
  293. },
  294. methods: {
  295. // 地址弹出层
  296. showAddrPopup(){
  297. // 显示下单弹出层
  298. this.$refs.addrPopup.open('bottom');
  299. },
  300. // 规格弹出层
  301. showSpecPopup(type){
  302. // 登录提示
  303. // if( !this.$checkAccess.alterLogin()) return ;
  304. // 显示下单弹出层
  305. this.$refs.specPopup.open('bottom');
  306. // 地址列表
  307. this.getAddrList();
  308. // 计算价格
  309. this.priceHandler();
  310. },
  311. // 数量调整
  312. changeQuantity(number){
  313. // 如果不是0.表示两侧按钮点击,0表示输入的修改
  314. if( number != 0 ) {
  315. // 计算个数
  316. this.quantity = this.quantity + number;
  317. }
  318. // 如果大于库存设置为库存
  319. if( this.quantity > this.productInfo.stock ) {
  320. this.quantity = this.productInfo.stock;
  321. uni.showToast({
  322. title:"库存不足",
  323. icon:"none"
  324. })
  325. }
  326. // 如果小于1.设置为1
  327. if( this.quantity < 1 ) {
  328. this.quantity = 1;
  329. uni.showToast({title:"数量不可以小于0",icon:"none"})
  330. }
  331. // 计算价格
  332. this.priceHandler();
  333. },
  334. // 创建订单
  335. createOrder(){
  336. // 不可预约
  337. if( !this.$checkAccess.alertCity() ) return;
  338. // 下单数量小于0
  339. if( this.quantity < 1 ) {
  340. uni.showToast({
  341. title:"至少兑换1个"
  342. })
  343. return;
  344. }
  345. // 如果大于库存设置为库存
  346. if( this.productInfo.stock < 1 ) {
  347. uni.showToast({
  348. title:"库存不足",
  349. icon:"none"
  350. })
  351. return;
  352. }
  353. // 地址未填
  354. if( !this.checkedAddr.id ) {
  355. uni.showToast({
  356. title:"请选择收货地址",
  357. icon:"none"
  358. })
  359. return;
  360. }
  361. //需要下单的产品信息参数传给completion页面
  362. let productInfo = [{name:this.productInfo.name}]
  363. //转成json字符串
  364. productInfo = JSON.stringify(productInfo);
  365. //加密json格式成编码数组
  366. let encodedArray = encodeURIComponent(productInfo);
  367. // 请求接口
  368. this.$http.request('api/score_orders/create',{"product_id":this.productInfo.id,'buy_num':this.quantity,'addr_id':this.checkedAddr.id},'post').then((re)=>{
  369. // 判断结果
  370. if( re.code == 'success' ) {
  371. // 处理结果
  372. this.productInfo.stock = this.productInfo.stock - this.quantity;
  373. // 关闭弹窗
  374. this.$refs.specPopup.close();
  375. // 跳转到兑换成功页
  376. uni.navigateTo({url:`/pages/score/completion?params=${encodedArray}`});
  377. return ;
  378. }else{
  379. uni.showModal({title:re.msg,showCancel:false});
  380. }
  381. });
  382. },
  383. // 计算价格
  384. priceHandler(){
  385. // 小数点保留
  386. this.priceTotal = this.productInfo.score * this.quantity;
  387. },
  388. popupChange(e){
  389. // 禁止滚动穿透
  390. this.show = e.show
  391. },
  392. // 选择地址
  393. checkedAddrItem(item){
  394. this.checkedAddr = item;
  395. this.$refs.addrPopup.close();
  396. },
  397. getAddrList(){
  398. // 判断数据
  399. this.$http.request('api/custom_addr/get_list').then((callback)=>{
  400. // 获取成功
  401. if( callback.code == 'success' ){
  402. this.addrList = callback.data;
  403. // 如果有的话
  404. if( this.addrList.length ){
  405. // 获取默认的
  406. for (let i in this.addrList) {
  407. // 如果是默认的
  408. if( this.addrList[i].is_default ) this.checkedAddr = this.addrList[i];
  409. }
  410. // 如果没有默认的话
  411. if( !this.checkedAddr.id ){
  412. this.checkedAddr = this.addrList[this.addrList.length-1];
  413. }
  414. }
  415. }
  416. });
  417. },
  418. getStatusBarHeight(){
  419. let SYSTEM_INFO = uni.getSystemInfoSync();
  420. this.StatusBarHeight = SYSTEM_INFO.statusBarHeight || 10;
  421. },
  422. goBack(){
  423. uni.navigateBack({
  424. success: () => {
  425. },
  426. fail: (err) => {
  427. uni.reLaunch({
  428. url:"/pages/index/index"
  429. })
  430. }
  431. });
  432. }
  433. }
  434. }
  435. </script>
  436. <style lang="less">
  437. // .product_image_box{
  438. // display: block;
  439. // overflow: hidden;
  440. // background: #FFFFFF;
  441. // margin: 10rpx auto;
  442. // .product_image{
  443. // display: block;
  444. // margin: 0 auto;
  445. // width: 750rpx;
  446. // height: 750rpx;
  447. // }
  448. // }
  449. // .product_info{
  450. // display: block;
  451. // background: #FFFFFF;
  452. // margin: 10rpx 0rpx;
  453. // padding: 10px 10px;
  454. // .product_name{
  455. // max-height: 80rpx;
  456. // font-size: 30rpx;
  457. // line-height: 40rpx;
  458. // overflow: hidden;
  459. // padding: 10rpx 0rpx;
  460. // }
  461. // .product_spec{
  462. // color: #999999;
  463. // font-size: 24rpx;
  464. // line-height: 30rpx;
  465. // }
  466. // .stock_price{
  467. // font-size: 20rpx;
  468. // overflow: hidden;
  469. // margin-top: 10rpx;
  470. // line-height: 30rpx;
  471. // .product_price{
  472. // float: left;
  473. // color: red;
  474. // font-size: 38rpx;
  475. // line-height: 60rpx;
  476. // .product_market{
  477. // font-size: 24rpx;
  478. // color: #999999;
  479. // line-height: 30rpx;
  480. // margin-left: 10rpx;
  481. // text-decoration: line-through;
  482. // }
  483. // }
  484. // .product_stock{
  485. // color: #333333;
  486. // float: right;
  487. // font-size: 20rpx;
  488. // line-height: 60rpx;
  489. // }
  490. // }
  491. // }
  492. .goback{
  493. position: fixed;
  494. width: 38px;
  495. height: 38px;
  496. background: rgba(0, 0, 0, 0.5);
  497. left: 30rpx;
  498. margin-left: 0;
  499. border-radius: 100px;
  500. top: 0;
  501. backdrop-filter: blur(10rpx);
  502. border:1rpx solid rgba(255,255,255,0.3);
  503. display: flex;
  504. align-items: center;
  505. justify-content: center;
  506. }
  507. .product_image_box{
  508. display: block;
  509. overflow: hidden;
  510. background: #FFFFFF;
  511. margin: 10rpx auto;
  512. .product_image{
  513. display: block;
  514. margin: 0 auto;
  515. width: 750rpx;
  516. height: 750rpx;
  517. }
  518. }
  519. .product_info{
  520. display: block;
  521. background: #FFFFFF;
  522. margin: 10rpx 0rpx;
  523. padding: 10px 10px;
  524. .product_name{
  525. max-height: 80rpx;
  526. font-size: 30rpx;
  527. line-height: 40rpx;
  528. overflow: hidden;
  529. padding: 10rpx 0rpx;
  530. }
  531. .product_title_info{
  532. .product_title{
  533. font-size: 30rpx;
  534. line-height: 40rpx;
  535. }
  536. .product_subtitle{
  537. color: #999999;
  538. line-height: 40rpx;
  539. font-size: 24rpx;
  540. }
  541. }
  542. .product_spec{
  543. color: #999999;
  544. font-size: 24rpx;
  545. line-height: 30rpx;
  546. overflow: hidden;
  547. margin-top: 20rpx;
  548. .spec_name{
  549. float: left;
  550. color: red;
  551. font-size: 38rpx;
  552. line-height: 60rpx;
  553. }
  554. .product_stock{
  555. float: right;
  556. line-height: 60rpx;
  557. }
  558. }
  559. .product_coupon{
  560. font-size: 30rpx;
  561. line-height: 30rpx;
  562. overflow: hidden;
  563. .coupon_text{
  564. float: left;
  565. line-height: 30rpx;
  566. }
  567. .coupon_info{
  568. float: right;
  569. line-height: 30rpx;
  570. overflow: hidden;
  571. padding: 0rpx 40rpx;
  572. .text{
  573. float: left;
  574. margin-right: 30rpx;
  575. }
  576. .icon{
  577. float: right;
  578. font-size: 30rpx;
  579. color: #999999;
  580. }
  581. }
  582. }
  583. }
  584. // 描述简介
  585. // .product_business{
  586. // display: block;
  587. // overflow: hidden;
  588. // padding: 20rpx 20rpx;
  589. // margin: 10rpx auto;
  590. // background: #FFFFFF;
  591. // .logopic{
  592. // float: left;
  593. // width: 80rpx;
  594. // height: 80rpx;
  595. // border-radius: 50%;
  596. // margin-right: 20rpx;
  597. // }
  598. // .business_info{
  599. // float: left;
  600. // width: 600rpx;
  601. // overflow: hidden;
  602. // .business_name{
  603. // font-size: 26rpx;
  604. // line-height: 40rpx;
  605. // }
  606. // .business_desc{
  607. // color: #999999;
  608. // font-size: 24rpx;
  609. // line-height: 40rpx;
  610. // }
  611. // }
  612. // }
  613. .product_description{
  614. width: 700rpx;
  615. display: block;
  616. overflow: hidden;
  617. background: #FFFFFF;
  618. min-height: 300rpx;
  619. font-size: 26rpx;
  620. margin: 0rpx auto;
  621. line-height: 50rpx;
  622. padding: 10rpx 25rpx;
  623. [alt]{ //web_view图片
  624. max-width: 100%; // 避免图片超宽
  625. vertical-align: bottom; // 避免图片之间间隙
  626. }
  627. }
  628. .product_poster{
  629. display: block;
  630. overflow: hidden;
  631. padding: 10rpx 0rpx;
  632. margin: 10rpx auto;
  633. background: #FFFFFF;
  634. .product_image{
  635. width: 750rpx;
  636. display: block;
  637. }
  638. }
  639. .product_comment{
  640. display: block;
  641. background: #FFFFFF;
  642. margin: 10rpx 0rpx;
  643. padding: 10px 10px;
  644. background: #FFFFFF;
  645. .comment_num{
  646. overflow: hidden;
  647. line-height: 30rpx;
  648. .comment_num_title{
  649. float: left;
  650. line-height: 30rpx;
  651. }
  652. .comment_num_icon{
  653. float: right;
  654. line-height: 1.5;
  655. margin-right: 40rpx;
  656. }
  657. }
  658. .comment_list{
  659. overflow: hidden;
  660. .comment_left{
  661. float: left;
  662. width: 400rpx;
  663. .user_order_info{
  664. color: #999999;
  665. margin-top: 20rpx;
  666. .user_name{
  667. color: #000000;
  668. margin-right: 20rpx;
  669. }
  670. }
  671. .user_comment{
  672. margin-top: 20rpx;
  673. font-size: 30rpx;
  674. line-height: 50rpx;
  675. }
  676. }
  677. .comment_right{
  678. float: right;
  679. width: 200rpx;
  680. height: 200rpx;
  681. background-color: aqua;
  682. border-radius: 20rpx;
  683. }
  684. }
  685. }
  686. // .order_car{
  687. // left: 0rpx;
  688. // width: 750rpx;
  689. // height: 140rpx;
  690. // display: block;
  691. // position: fixed;
  692. // padding-top: 20rpx;
  693. // background: #FFFFFF;
  694. // bottom: var(--window-bottom);
  695. // border-top: 2rpx solid #DDDDDD;
  696. // .show_order{
  697. // width: 700rpx;
  698. // height: 80rpx;
  699. // display: block;
  700. // color: #FFFFFF;
  701. // font-size: 30rpx;
  702. // overflow: hidden;
  703. // line-height: 80rpx;
  704. // padding: 0rpx 0rpx;
  705. // text-align: center;
  706. // margin: 0rpx auto;
  707. // border-radius: 40rpx;
  708. // background-color: #E03519;
  709. // }
  710. // }
  711. .order_car{
  712. left: 0rpx;
  713. width: 750rpx;
  714. height: 160rpx;
  715. display: block;
  716. position: fixed;
  717. padding-top: 20rpx;
  718. background: #FFFFFF;
  719. bottom: var(--window-bottom);
  720. border-top: 2rpx solid #DDDDDD;
  721. .show_car{
  722. float: right;
  723. width: 550rpx;
  724. height: 90rpx;
  725. display: block;
  726. color: #FFFFFF;
  727. font-size: 30rpx;
  728. overflow: hidden;
  729. line-height: 90rpx;
  730. padding: 0rpx 0rpx;
  731. text-align: center;
  732. background-color: #ff5900;
  733. border-radius: 20rpx;
  734. }
  735. .to_car{
  736. float: left;
  737. width: 100rpx;
  738. height: 90rpx;
  739. display: block;
  740. text-align: center;
  741. margin-left: 20rpx;
  742. .car_icon{
  743. text-align: center;
  744. float: left;
  745. width: 60rpx;
  746. height: 60rpx;
  747. display: block;
  748. }
  749. .text{
  750. float: left;
  751. padding-left: 8rpx;
  752. text-align: center;
  753. line-height: 30rpx;
  754. font-size: 24rpx;
  755. }
  756. .shop_cat_text{
  757. float: left;
  758. text-align: center;
  759. line-height: 30rpx;
  760. font-size: 24rpx;
  761. }
  762. }
  763. }
  764. .popup{
  765. overflow: hidden;
  766. .popup_title{
  767. display: block;
  768. overflow: hidden;
  769. margin: 0rpx auto;
  770. font-size: 36rpx;
  771. height: 120rpx;
  772. line-height: 120rpx;
  773. padding: 0rpx 20rpx;
  774. border-bottom: 10rpx solid #F8F8F8;
  775. .to_addr_page{
  776. float: right;
  777. color: #F59A23;
  778. display: block;
  779. height: 120rpx;
  780. line-height: 120rpx;
  781. font-size: 26rpx;
  782. padding: 0rpx 10rpx;
  783. }
  784. }
  785. .order_info{
  786. overflow: hidden;
  787. background: #FFFFFF;
  788. .custom_addr{
  789. width: 680rpx;
  790. display: block;
  791. font-size: 24rpx;
  792. overflow: hidden;
  793. margin: 0rpx auto;
  794. line-height: 40rpx;
  795. padding: 20rpx 35rpx;
  796. background-color: #FFFFFF;
  797. border-bottom: 2rpx solid #dddddd;
  798. .contact_user{
  799. display: block;
  800. font-size: 24rpx;
  801. line-height: 50rpx;
  802. .contact_none{
  803. color: #E03519;
  804. font-size: 26rpx;
  805. font-weight: bold;
  806. }
  807. .contact_name{
  808. font-size: 26rpx;
  809. font-weight: bold;
  810. margin-right: 16rpx;
  811. }
  812. .contact_more{
  813. float: right;
  814. font-size: 40rpx;
  815. font-weight: bold;
  816. }
  817. }
  818. .contact_addr{
  819. width: 620rpx;
  820. display: block;
  821. font-size: 24rpx;
  822. line-height: 30rpx;
  823. padding: 10rpx 5rpx;
  824. }
  825. }
  826. .min600{
  827. min-height: 600rpx;
  828. }
  829. .car_item{
  830. height: 200rpx;
  831. display: block;
  832. background: #FFFFFF;
  833. margin: 20rpx auto;
  834. .box_left{
  835. float: left;
  836. width: 160rpx;
  837. height: 200rpx;
  838. margin-left: 35rpx;
  839. .car_image{
  840. width: 160rpx;
  841. height: 160rpx;
  842. margin: 20rpx 0rpx;
  843. border-radius: 5rpx;
  844. }
  845. }
  846. .box_right{
  847. float: left;
  848. width: 485rpx;
  849. margin-left: 35rpx;
  850. padding-top: 20rpx;
  851. .car_name{
  852. max-height: 80rpx;
  853. font-size: 30rpx;
  854. line-height: 40rpx;
  855. overflow: hidden;
  856. padding: 0rpx 0rpx;
  857. }
  858. .car_spec{
  859. color: #999999;
  860. font-size: 24rpx;
  861. line-height: 30rpx;
  862. padding: 0rpx 0rpx;
  863. }
  864. .stock_price{
  865. width: 485rpx;
  866. color: #dddddd;
  867. font-size: 20rpx;
  868. overflow: hidden;
  869. margin-top: 10rpx;
  870. line-height: 30rpx;
  871. .product_price{
  872. float: left;
  873. color: red;
  874. font-size: 30rpx;
  875. line-height: 60rpx;
  876. .car_market{
  877. font-size: 24rpx;
  878. color: #999999;
  879. line-height: 30rpx;
  880. vertical-align: middle;
  881. text-decoration: line-through;
  882. }
  883. }
  884. .product_quantity_box{
  885. float: right;
  886. color: #333333;
  887. overflow: hidden;
  888. font-size: 24rpx;
  889. margin-top: 10rpx;
  890. text-align: center;
  891. .product_quantity_sub{
  892. float: left;
  893. border: none;
  894. height: 36rpx;
  895. background: none;
  896. text-align: center;
  897. line-height: 36rpx;
  898. padding: 10rpx 10rpx;
  899. .sub_icon{
  900. width: 22rpx;
  901. height: 22rpx;
  902. display: block;
  903. }
  904. }
  905. .product_quantity_sub::after{
  906. border: none;
  907. background: none;
  908. }
  909. .product_quantity{
  910. float: left;
  911. width: 100rpx;
  912. height: 36rpx;
  913. font-size: 24rpx;
  914. min-height: 36rpx;
  915. line-height: 36rpx;
  916. padding: 0rpx 0rpx;
  917. border-radius: 8rpx;
  918. border: 2rpx solid #dddddd;
  919. }
  920. .product_quantity_add{
  921. float: left;
  922. border: none;
  923. height: 36rpx;
  924. background: none;
  925. text-align: center;
  926. padding: 10rpx 10rpx;
  927. line-height: 36rpx;
  928. .add_icon{
  929. width: 22rpx;
  930. height: 22rpx;
  931. display: block;
  932. }
  933. }
  934. .product_quantity_add::after{
  935. border: none;
  936. background: none;
  937. }
  938. }
  939. }
  940. .product_stock{
  941. font-size: 20rpx;
  942. line-height: 60rpx;
  943. }
  944. }
  945. }
  946. .to_select_coupon{
  947. font-size: 28rpx;
  948. padding: 30rpx 35rpx;
  949. margin-bottom: 20rpx;
  950. .coupon_deduction{
  951. color: red;
  952. float: right;
  953. }
  954. }
  955. .order_price{
  956. font-size: 28rpx;
  957. text-align: right;
  958. margin: 0rpx 35rpx;
  959. padding: 20rpx 0rpx;
  960. border-top: 2rpx solid #DDDDDD;
  961. .coupon_deduction{
  962. color: red;
  963. float: right;
  964. }
  965. }
  966. .order_btn{
  967. width: 700rpx;
  968. height: 100rpx;
  969. display: block;
  970. margin: 0 auto;
  971. margin-top: 70rpx;
  972. line-height: 80rpx;
  973. text-align: center;
  974. font-size: 30rpx;
  975. .to_car{
  976. color: #FFFFFF;
  977. float: right;
  978. width: 700rpx;
  979. height: 80rpx;
  980. display: block;
  981. overflow: hidden;
  982. font-size: 30rpx;
  983. line-height: 80rpx;
  984. padding: 0rpx 0rpx;
  985. border-radius: 40rpx;
  986. border: 0rpx solid transparent;
  987. background-color: #F59A23;
  988. }
  989. .to_car::after{
  990. border: 0rpx solid transparent;
  991. }
  992. .to_order{
  993. color: #FFFFFF;
  994. float: right;
  995. width: 700rpx;
  996. height: 80rpx;
  997. display: block;
  998. font-size: 30rpx;
  999. overflow: hidden;
  1000. line-height: 80rpx;
  1001. padding: 0rpx 0rpx;
  1002. border-radius: 40rpx;
  1003. background-color: #E03519;
  1004. border: 0rpx solid transparent;
  1005. }
  1006. .to_order::after{
  1007. border: 0rpx solid transparent;
  1008. }
  1009. }
  1010. }
  1011. .coupon_list{
  1012. display: block;
  1013. overflow: hidden;
  1014. min-height: 600rpx;
  1015. margin: 10rpx auto;
  1016. background: #FFFFFF;
  1017. padding-bottom: 50rpx;
  1018. .coupon_item{
  1019. height: 200rpx;
  1020. display: block;
  1021. margin: 10rpx auto;
  1022. border-bottom: 2rpx solid #DDDDDD;
  1023. .box_left{
  1024. float: left;
  1025. width: 160rpx;
  1026. height: 160rpx;
  1027. font-size: 20rpx;
  1028. text-align: center;
  1029. margin-left: 35rpx;
  1030. line-height: 60rpx;
  1031. margin-top: 20rpx;
  1032. background: pink;
  1033. .rebate{
  1034. width: 120rpx;
  1035. height: 60rpx;
  1036. margin: 0rpx auto;
  1037. line-height: 60rpx;
  1038. margin-top: 20rpx;
  1039. overflow: hidden;
  1040. white-space: nowrap;
  1041. text-overflow: ellipsis;
  1042. }
  1043. }
  1044. .box_right{
  1045. float: left;
  1046. width: 485rpx;
  1047. margin-left: 35rpx;
  1048. padding-top: 20rpx;
  1049. .coupon_title{
  1050. width: 485rpx;
  1051. max-height: 80rpx;
  1052. font-size: 30rpx;
  1053. overflow: hidden;
  1054. line-height: 40rpx;
  1055. padding: 0rpx 0rpx;
  1056. .coupon_name{
  1057. float: left;
  1058. height: 40rpx;
  1059. width: 380rpx;
  1060. }
  1061. .coupon_status{
  1062. width: 85rpx;
  1063. float: right;
  1064. color: #999999;
  1065. font-size: 24rpx;
  1066. }
  1067. }
  1068. .product_scope{
  1069. width: 485rpx;
  1070. height: 80rpx;
  1071. color: #999999;
  1072. font-size: 24rpx;
  1073. overflow: hidden;
  1074. line-height: 80rpx;
  1075. .check_label{
  1076. float: right;
  1077. display: block;
  1078. overflow: hidden;
  1079. padding: 20rpx 20rpx;
  1080. .isstd{
  1081. line-height: 40rpx;
  1082. }
  1083. .checkbox{
  1084. float: right;
  1085. width: 40rpx;
  1086. height: 40rpx;
  1087. }
  1088. }
  1089. }
  1090. .coupon_info{
  1091. width: 485rpx;
  1092. max-height: 80rpx;
  1093. font-size: 30rpx;
  1094. overflow: hidden;
  1095. line-height: 40rpx;
  1096. padding: 0rpx 0rpx;
  1097. .coupon_exp{
  1098. float: left;
  1099. font-size: 20rpx;
  1100. }
  1101. }
  1102. }
  1103. }
  1104. .coupon_item:last-child{
  1105. border-bottom: none;
  1106. }
  1107. }
  1108. .addr_list{
  1109. width: 730rpx;
  1110. display: block;
  1111. overflow: hidden;
  1112. margin: 0rpx auto;
  1113. min-height: 500rpx;
  1114. .addr_item{
  1115. display: block;
  1116. font-size: 24rpx;
  1117. overflow: hidden;
  1118. line-height: 40rpx;
  1119. padding: 15rpx 10rpx;
  1120. border-radius: 15rpx;
  1121. border-bottom: 2rpx solid #dddddd;
  1122. .radio_label{
  1123. width: 40rpx;
  1124. float: left;
  1125. height: 50rpx;
  1126. padding-top: 30rpx;
  1127. margin-right: 20rpx;
  1128. .radio_icon{
  1129. float: left;
  1130. width: 40rpx;
  1131. height: 40rpx;
  1132. }
  1133. }
  1134. .contact_user{
  1135. float: left;
  1136. width: 640rpx;
  1137. display: block;
  1138. height: 50rpx;
  1139. font-size: 24rpx;
  1140. line-height: 50rpx;
  1141. .contact_name{
  1142. font-size: 26rpx;
  1143. font-weight: bold;
  1144. margin-right: 16rpx;
  1145. }
  1146. .contact_default{
  1147. color: #F59A23;
  1148. font-size: 20rpx;
  1149. margin-left: 16rpx;
  1150. border: 1rpx solid #F59A23;
  1151. }
  1152. }
  1153. .contact_addr{
  1154. float: left;
  1155. width: 640rpx;
  1156. display: block;
  1157. font-size: 24rpx;
  1158. line-height: 30rpx;
  1159. padding: 10rpx 5rpx;
  1160. }
  1161. }
  1162. }
  1163. .create_box{
  1164. height: 140rpx;
  1165. display: block;
  1166. .create_addr{
  1167. width: 700rpx;
  1168. height: 80rpx;
  1169. display: block;
  1170. color: #FFFFFF;
  1171. font-size: 30rpx;
  1172. overflow: hidden;
  1173. line-height: 80rpx;
  1174. padding: 0rpx 0rpx;
  1175. text-align: center;
  1176. margin: 0rpx auto;
  1177. margin-top: 20rpx;
  1178. border-radius: 40rpx;
  1179. background-color: #E03519;
  1180. }
  1181. }
  1182. }
  1183. </style>