product.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591
  1. <template name="product">
  2. <gracePage headerBG="#FFFFFF" footerBg="#FFFFFF" :customHeader="false">
  3. <view slot="gBody" style="padding-bottom:120rpx;">
  4. <!-- 轮播图 -->
  5. <swiper class="grace-swiper" autoplay="true" indicator-dots
  6. indicator-color="rgba(255, 255, 255, 1)" indicator-active-color="#3688FF"
  7. style="height:399rpx" interval="5000">
  8. <swiper-item class="grace-swiper-item" v-for="(v, k) in item.goods.pic" :key="k">
  9. <image :src="v" mode="widthFix" class="grace-swiper-image" style="height:auto"></image>
  10. </swiper-item>
  11. </swiper>
  12. <!-- 商品标题 分享按钮 -->
  13. <view class="grace-product-padding grace-space-between grace-flex-vcenter">
  14. <text class="grace-product-title grace-bold">{{item.goods.name}}</text>
  15. </view>
  16. <!-- 价格 -->
  17. <view class="grace-product-padding">
  18. <view class="grace-nowrap grace-flex-vcenter">
  19. <text class="grace-product-price">¥{{item.goods.price.min.price}}</text>
  20. <text class="grace-text grace-gray grace-line-through" style="margin-left:30rpx;">¥{{item.goods.price.min.s_price}}</text>
  21. </view>
  22. <view class="grace-space-between grace-flex-vcenter" v-if="item.goods.platform == 1">
  23. <text class="grace-text-small grace-gray" v-if="item.goods.freight && item.goods.freight.price">运费 ¥{{item.goods.freight.price}}</text>
  24. <text class="grace-text-small grace-gray">已售 {{item.goods.sell_num}} 件</text>
  25. </view>
  26. </view>
  27. <view class="grace-common-line"></view>
  28. <!-- 底部信息切换导航 -->
  29. <view class="grace-product-padding">
  30. <graceNavBar :items="navItems" lineHeight="80rpx" :isCenter="true"
  31. :currentIndex="active" :size="200" activeLineBg="#FF7900" textAlign="center"
  32. activeColor="#FF7900" activeLineWidth="200rpx" activeLineHeight="2rpx"
  33. :margin="10" @change="navChange"></graceNavBar>
  34. </view>
  35. <!-- 详情 请根据项目情况自行改进 可以使用 富文本-->
  36. <view class="grace-product-padding" v-if="active == 0">
  37. <dever-content :item="item.goods.content_array" :pics="item.goods.content_pic" :skeleton="false"></dever-content>
  38. </view>
  39. <!-- 评论区 -->
  40. <view class="cu-list menu-avatar" v-if="active == 1">
  41. <view class="cu-item " v-for="(v, k) in fetch.order" :key="k">
  42. <view class="cu-avatar radius lg" :style="{backgroundImage:'url('+v.user.avatar+')'}"></view>
  43. <view class="content">
  44. <view class="text-pink"><view class="text-cut"><text v-if="v.user.author" style="margin-right:10rpx;color: #00B3FF;">[{{v.user.author}}]</text>{{v.user.username}}</view><text v-if="v.user.title" style="margin-left:10rpx">({{v.user.title}})</text></view>
  45. <view class="text-gray text-sm flex"> <view class="text-cut">{{v.date}}</view></view>
  46. </view>
  47. <view class="action">
  48. <view class="text-grey text-xs">{{v.price}}</view>
  49. <view class="cu-tag round bg-red sm" v-if="v.status == 1">{{v.status_name}}</view>
  50. <view class="cu-tag round bg-blue sm" v-if="v.status == 2 || v.status > 3">{{v.status_name}}</view>
  51. <view class="cu-tag round bg-black sm" v-if="v.status == 3">{{v.status_name}}</view>
  52. </view>
  53. </view>
  54. </view>
  55. <!-- 评论区 -->
  56. <view class="grace-comments grace-product-padding" v-if="active == 2">
  57. <view class="grace-comments-items" v-for="(v, k) in fetch.info" :key="k">
  58. <image :src="v.user.avatar" class="grace-comments-face"></image>
  59. <view class="grace-comments-body">
  60. <view class="grace-comments-header">
  61. <text class="grace-comments-header-text"><text v-if="v.user.author" style="margin-right:10rpx;color: #00B3FF;">[{{v.user.author}}]</text>{{v.user.username}}<text v-if="v.user.title" style="margin-left:10rpx">({{v.user.title}})</text></text>
  62. <text class="grace-comments-info-text">{{v.cdate_string}}</text>
  63. </view>
  64. <text class="grace-comments-content">{{v.content}}</text>
  65. <view class="grace-comments-imgs" v-if="v.pic">
  66. <view class="grace-comments-image" v-for="(v1, k1) in v.pic" :key="k1">
  67. <image :src="v1" mode="widthFix" class="grace-comments-img" @click="Dever.viewPic(v.pic, v1)" style="height:auto"></image>
  68. </view>
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. <!-- 属性选择 -->
  74. <graceBottomDialog :show="attrIsShow" @closeDialog="closeAttr">
  75. <form @submit="attrSubmit" style="box-sizing:border-box; padding:10rpx 25rpx;" class="grace-form" slot="content">
  76. <!-- 关闭按钮 -->
  77. <view class="grace-nowrap grace-flex-end">
  78. <text class="grace-icons icon-close" @tap="closeAttr"></text>
  79. </view>
  80. <!-- 头部商品信息 -->
  81. <view class="grace-product-attr-info">
  82. <image class= "grace-product-attr-info-image" mode="widthFix"
  83. :src="item.goods.pic_cover" style="height:auto"></image>
  84. <view class="grace-product-attr-info-body">
  85. <text class="grace-product-attr-info-title">{{item.goods.name}}</text>
  86. <view class="grace-nowrap grace-flex-vcenter">
  87. <text class="grace-product-price">¥{{payPrice}}</text>
  88. <text class="grace-text" style="margin-left:30rpx;" v-if="freight_price > 0">运费 ¥{{freight_price}}</text>
  89. <text class="grace-text grace-gray" style="margin-left:30rpx;">库存:{{kuNum}}件</text>
  90. </view>
  91. </view>
  92. </view>
  93. <view v-if="item.goods.mode > 0">
  94. <view class="grace-form-item grace-border-b">
  95. <text class="grace-form-label">配送方式</text>
  96. <view class="grace-form-body" style="padding:20rpx 0;">
  97. <radio-group name="danxuan" @change="setMode">
  98. <label class="grace-check-item-v" v-if="item.goods.mode == 1 || item.goods.mode == 3"><radio value="1" checked></radio><text style="margin-left:10rpx;">快递</text></label>
  99. <label class="grace-check-item-v" v-if="store_state && (item.goods.mode == 2 || item.goods.mode == 3)"><radio value="2"></radio><text style="margin-left:10rpx;">自提</text></label>
  100. </radio-group>
  101. </view>
  102. </view>
  103. <view class="grace-wrap" style="margin-top: 20rpx;">
  104. <view class="grace-capsule margin" v-if="(item.goods.mode == 1 || item.goods.mode == 3) && mode == 1" @click="openDialog">
  105. <text class="grace-capsule-icon">地址</text>
  106. <text class="grace-capsule-text" v-if="fetch.area_id">{{fetch.area_name}}{{fetch.address}}</text>
  107. <text class="grace-capsule-text" v-if="!fetch.area_id">您还没有收货地址,请点此填写地址</text>
  108. </view>
  109. <view class="grace-capsule margin" v-if="(item.goods.mode == 2 || item.goods.mode == 3) && mode == 2">
  110. <text class="grace-capsule-icon grace-icon-br" style="background:#E76B61;">自提</text>
  111. <picker @change="storeChange" :value="store_index" :range="store_data" v-if="store_state">
  112. <text class="picker grace-capsule-text grace-text-br" style="border-color:#E76B61; color:#E76B61;">
  113. {{store_data[store_index]}}
  114. </text>
  115. </picker>
  116. <text class="grace-capsule-text grace-text-br" style="border-color:#E76B61; color:#E76B61;" v-if="!store_state" @click="openDialog">
  117. 暂无自提点,点此更换地址
  118. </text>
  119. </view>
  120. </view>
  121. </view>
  122. <!-- 属性列表区 -->
  123. <scroll-view style="height:700rpx;" scroll-y>
  124. <block v-for="(v, k) in item.goods.sell_attr" :key="k" v-if="item.goods.price_type == 2">
  125. <view class="grace-title grace-margin-top">{{v.name}}</view>
  126. <view><graceSelectTags selectedColor="#FF0036" :items="v.option_sku" type="radio" @change="change"></graceSelectTags></view>
  127. </block>
  128. <block v-if="kuNum > 0">
  129. <view class="grace-margin-top"><text class="grace-title">购买数量</text></view>
  130. <view style="margin-bottom: 40rpx;">
  131. <graceNumberBox :minNum="1" :maxNum="kuNum" :value="buyNum" v-on:change="buyNumChange"></graceNumberBox>
  132. </view>
  133. </block>
  134. <block else>
  135. <view class="grace-margin-top"><text class="grace-title">已售空</text></view>
  136. </block>
  137. </scroll-view>
  138. <view class="grace-product-attr-btn">
  139. <button type="warn" style="background-color:#FF0036;" class="grace-button grace-border-radius" formType="submit">立即购买</button>
  140. </view>
  141. </form>
  142. </graceBottomDialog>
  143. <graceDialog ref="graceDialog" :isTitle="true" :isCloseBtn="false" :show="address_state" :title="`收货地址`" v-on:closeDialog="closeDialog">
  144. <view class="content2" slot="content">
  145. <form class="grace-form grace-margin-top">
  146. <view class="grace-form-item grace-border-b">
  147. <text class="grace-form-label">您的姓名</text>
  148. <view class="grace-form-body">
  149. <input type="text" class="grace-form-input" name="name" v-model="fetch.address_contact" placeholder="请填写联系姓名"></input>
  150. </view>
  151. </view>
  152. <view class="grace-form-item grace-border-b">
  153. <text class="grace-form-label">联系电话</text>
  154. <view class="grace-form-body">
  155. <input type="number" class="grace-form-input" name="mobile" v-model="fetch.address_mobile" placeholder="请填写联系电话"></input>
  156. </view>
  157. </view>
  158. <view class="grace-form-item grace-border-b">
  159. <text class="grace-form-label">所在地区</text>
  160. <view class="grace-form-body" @tap="openPicker">
  161. <input type="text" class="grace-form-input" name="area" :value="fetch.area_name" disabled placeholder="请选择所在地区"></input>
  162. </view>
  163. </view>
  164. <view class="grace-form-item">
  165. <text class="grace-form-label">详细地址</text>
  166. <view class="grace-form-body">
  167. <input type="text" class="grace-form-input" name="address" v-model="fetch.address" placeholder="请填写详细地址"></input>
  168. </view>
  169. </view>
  170. </form>
  171. </view>
  172. <view slot="btns" class="grace-space-between">
  173. <text class="grace-dialog-buttons" @tap="closeDialog">关闭</text>
  174. <text class="grace-dialog-buttons grace-blue" @tap="setAddress">确认</text>
  175. </view>
  176. </graceDialog>
  177. <y-Fab :bottom="20" :right="140" v-if="!attrIsShow" @click="buyNow" bgColor="#e55d52" text="购买"></y-Fab>
  178. <y-Fab :bottom="20" :right="260" v-if="!attrIsShow" @click="showModal" bgColor="#0fa5e5" text="评价"></y-Fab>
  179. <block v-if="index == -1">
  180. <y-Fab :bottom="20" :right="20" v-if="!attrIsShow" @click="back" text="返回"></y-Fab>
  181. </block>
  182. <view v-if="showComment">
  183. <dever-publish :title="title" :is_upload="true" @hideModal="hideModal" @getRefresh="getRefresh" :type="key" :type_id="item.goods.id" :api="api"></dever-publish>
  184. </view>
  185. <graceAddressPicker :value="address_default" :show="graceAddressPickerShow" @confirm="pickerConfirm" @close="closePicker" cancelTColor="关闭"></graceAddressPicker>
  186. </view>
  187. <!-- 底部 -->
  188. </gracePage>
  189. </template>
  190. <script>
  191. import deverContent from '@/lib/dever/components/content.vue';
  192. import deverPublish from '@/lib/dever/components/publish.vue';
  193. import copyText from "@/lib/clipboard.thorui.js";
  194. export default {
  195. name: "product",
  196. props: {
  197. control : {
  198. type : Object,
  199. value : null
  200. },
  201. bottom : {
  202. type : Object,
  203. value : null
  204. },
  205. item : {
  206. type : Object,
  207. value : null
  208. },
  209. index : 0
  210. },
  211. data() {
  212. return {
  213. title : '发表新评价',
  214. api : 'app/community/?l=api.addComment',
  215. key : 'content/product',
  216. // 切换导航
  217. navItems : ['商品详情', '跟单列表', '最新评价'],
  218. active:0,
  219. // 购买选择属性层展示
  220. attrIsShow : false,
  221. attr : '',
  222. attrKey : '',
  223. skuId : 0,
  224. attrSelect : {},
  225. payPrice : 0,
  226. buyNum : 1,
  227. kuNum : 0,
  228. showComment : false,
  229. fetch : {
  230. info : [],
  231. address : '',
  232. area_name : '',
  233. store : [],
  234. },
  235. mode : -1,
  236. store_state : false,
  237. store_data : [],
  238. store_index : 0,
  239. store_relation : [],
  240. freight_price : 0,
  241. old_freight_price : 0,
  242. graceAddressPickerShow : false,
  243. address_default : [],
  244. address_state : false,
  245. }
  246. },
  247. created() {
  248. },
  249. mounted() {
  250. this.bottom[this.index] = this;
  251. if (this.item.goods.freight) {
  252. this.freight_price = this.item.goods.freight.price;
  253. }
  254. if (this.item.goods.mode == 1 || this.item.goods.mode == 3) {
  255. this.mode = 1;
  256. } else if (this.item.goods.mode == 2 || this.item.goods.mode == 3) {
  257. this.mode = 2;
  258. }
  259. this.getInfo();
  260. //this.getData(1);
  261. },
  262. methods:{
  263. openPicker : function() {
  264. this.graceAddressPickerShow = true;
  265. },
  266. pickerConfirm : function(e){
  267. if (e.names[0] == e.names[1]) {
  268. this.fetch.area_name = e.names[1] + ' ' + e.names[2];
  269. } else {
  270. this.fetch.area_name = e.names[0] + ' ' + e.names[1] + ' ' + e.names[2];
  271. }
  272. this.fetch.area_name += ' ';
  273. this.fetch.area_id = e.codes[0] + ',' + e.codes[1] + ',' + e.codes[2];
  274. this.closePicker();
  275. },
  276. closePicker : function () {
  277. this.graceAddressPickerShow = false;
  278. },
  279. // 获取地理位置,运费等信息
  280. getInfo : function() {
  281. var self = this;
  282. var data = {};
  283. data.goods_id = this.item.goods.id;
  284. data.noloading = 1;
  285. this.Dever.get(this, 'app/user/?l=api.goods', data, function(t) {
  286. self.address_default = self.fetch.area_id.split(',');
  287. self.setStore(t.store);
  288. });
  289. /*
  290. this.Dever.getLocation('wgs84', '', function(t) {
  291. if (t && t.longitude && t.longitude) {
  292. }
  293. });
  294. */
  295. },
  296. setStore : function(store) {
  297. var data = Object.keys(store);
  298. if (data.length > 0) {
  299. var j = 0;
  300. for (var i in store) {
  301. this.store_data[j] = store[i].name;
  302. this.store_relation[j] = i;
  303. j++;
  304. }
  305. this.store_state = true;
  306. } else {
  307. this.store_data = [];
  308. this.store_relation = [];
  309. this.store_index = 0;
  310. this.store_state = false;
  311. }
  312. },
  313. getData : function(page) {
  314. if (this.active == 0) {
  315. return;
  316. }
  317. if (this.active == 1) {
  318. //跟单列表
  319. this.Dever.page([page, 'order'], this, 'app/user/?l=api.goods_order', {info_id:this.item.goods.id, code:this.Dever.config.code});
  320. } else {
  321. //评价列表
  322. this.Dever.page([page, 'info'], this, 'app/community/?l=api.comment', {type:this.key,type_id:this.item.goods.id,user:true, code:this.Dever.config.code});
  323. }
  324. },
  325. // 导航切换
  326. navChange : function(e){
  327. this.active = e;
  328. if (e == 1 || e == 2) {
  329. // 获取下单列表
  330. this.getData(1);
  331. }
  332. },
  333. storeChange : function(e) {
  334. this.store_index = e.detail.value;
  335. },
  336. //打开属性视图
  337. buyNow : function() {
  338. if (this.item.goods.platform == 1) {
  339. this.attrIsShow = true;
  340. } else {
  341. //this.Dever.alert('加入到口袋里');
  342. var name = this.item.goods.platform_name;
  343. uni.showModal({
  344. content: '该商品是'+name+'平台商品,是否立刻去购买?',
  345. cancelText: '取消',
  346. confirmText: '去购买',
  347. success: res => {
  348. if (res.confirm) {
  349. if (this.item.goods.platform == 2 || this.item.goods.platform == 4) {
  350. this.copy(this.item.goods.code);
  351. this.Dever.alert('已复制,请打开' + name + 'APP即可购买该商品');
  352. } else {
  353. this.Dever.location(this.item.goods.link);
  354. }
  355. }
  356. }
  357. });
  358. }
  359. },
  360. copy : function(value) {
  361. var self = this;
  362. copyText.getClipboardData(value, function(res) {
  363. });
  364. },
  365. back : function() {
  366. uni.navigateBack();
  367. },
  368. // 关闭属性
  369. closeAttr : function() {
  370. this.attrIsShow = false;
  371. },
  372. // 属性选择
  373. change : function (e) {
  374. var temp = e.split('-');
  375. this.attrSelect[temp[0]] = e;
  376. this.getAttrKey();
  377. },
  378. // 购买数量变化
  379. buyNumChange : function (e) {
  380. this.buyNum = e[0];
  381. this.getAttrKey();
  382. },
  383. // 支付
  384. attrSubmit : function(e) {
  385. var data = {};
  386. data.goods_id = this.item.goods.id;
  387. data.price = this.payPrice;
  388. data.num = this.buyNum;
  389. data.sku = this.skuId;
  390. data.code = this.Dever.config.code;
  391. data.mode = this.mode;
  392. if (this.mode == 2) {
  393. if (this.store_data.length < 0) {
  394. this.Dever.alert('暂无自提点,请选择快递');
  395. return;
  396. }
  397. var store = this.fetch.store[this.store_relation[this.store_index]].id;
  398. data.store_id = store;
  399. }
  400. if (this.kuNum <= 0) {
  401. this.Dever.alert('商品已售空');
  402. return;
  403. }
  404. //如果想关闭属性
  405. //this.closeAttr();
  406. var location = 'dream/view?code='+this.Dever.config.code + '&name=' + this.Dever.config.name;
  407. data.refer = this.Dever.host + '/' + location;
  408. var self = this;
  409. this.Dever.post('app/user/?l=pay.product', data, function(t) {
  410. self.Dever.pay(t, location, '支付失败');
  411. });
  412. },
  413. // 获取属性key
  414. getAttrKey : function() {
  415. var key = [];
  416. for (var i in this.attrSelect) {
  417. key.push(this.attrSelect[i]);
  418. }
  419. this.attrKey = key.join('_');
  420. if (this.item.goods.price_type == 1) {
  421. this.kuNum = parseInt(this.item.goods.num);
  422. this.skuId = 0;
  423. this.payPrice = parseFloat(this.item.goods.price.min.price) * this.buyNum;
  424. } else if (this.item.goods.price_type == 2 && this.item.goods.price.list[this.attrKey]) {
  425. this.kuNum = parseInt(this.item.goods.price.list[this.attrKey].num);
  426. this.skuId = this.item.goods.price.list[this.attrKey].id;
  427. this.payPrice = parseFloat(this.item.goods.price.list[this.attrKey].price) * this.buyNum;
  428. }
  429. if (this.item.goods.freight) {
  430. var freight_price = 0;
  431. this.item.goods.freight.first_num = parseInt(this.item.goods.freight.first_num);
  432. var price = parseFloat(this.item.goods.freight.first_price);
  433. if (this.buyNum > this.item.goods.freight.first_num) {
  434. var num = this.buyNum - this.item.goods.freight.first_num;
  435. price = parseFloat(price + (this.item.goods.freight.next_price*num));
  436. }
  437. if (this.item.goods.freight.type == 2) {
  438. freight_price = this.payPrice*(price/100);
  439. freight_price = freight_price.toFixed(2);
  440. } else {
  441. freight_price = price;
  442. }
  443. if (this.mode == 2) {
  444. this.old_freight_price = freight_price;
  445. } else {
  446. this.freight_price = freight_price;
  447. }
  448. } else {
  449. this.freight_price = 0;
  450. }
  451. return true;
  452. },
  453. showModal : function() {
  454. this.showComment = true;
  455. },
  456. hideModal : function() {
  457. this.showComment = false;
  458. },
  459. getRefresh : function(cate_id, type, type_id, content) {
  460. this.getData(1);
  461. this.hideModal();
  462. },
  463. setMode : function(e) {
  464. this.mode = e.detail.value;
  465. if (this.mode == 2) {
  466. //获取当前位置的自提点
  467. this.old_freight_price = this.freight_price;
  468. this.freight_price = 0;
  469. } else {
  470. this.freight_price = this.old_freight_price;
  471. }
  472. },
  473. openDialog : function() {
  474. this.address_state = true;
  475. },
  476. closeDialog : function() {
  477. this.address_state = false;
  478. },
  479. setAddress : function() {
  480. var data = {};
  481. data.code = this.Dever.config.code;
  482. data.goods_id = this.item.goods.id;
  483. data.price = this.payPrice;
  484. data.num = this.buyNum;
  485. data.address_contact = this.fetch.address_contact;
  486. data.address_mobile = this.fetch.address_mobile;
  487. data.address = this.fetch.address;
  488. data.area_id = this.fetch.area_id;
  489. //data.noloading = 1;
  490. var self = this;
  491. this.Dever.post('app/user/?l=api.saveAddress', data, function(t) {
  492. self.closeDialog();
  493. self.item.goods.freight = t.freight;
  494. self.setStore(t.store);
  495. self.getAttrKey();
  496. });
  497. }
  498. },
  499. components:{deverContent, deverPublish, copyText}
  500. }
  501. </script>
  502. <style>
  503. .grace-common-line{height:16rpx;}
  504. .grace-product-padding{padding:20rpx 25rpx;}
  505. .grace-product-title{line-height:44rpx; font-size:28rpx;}
  506. .grace-product-share{width:80rpx; height:80rpx; text-align:center; font-size:40rpx; color:#FF7900; line-height:80rpx; flex-shrink:0; margin-left:12px;}
  507. .grace-product-share:after{width:0; height:0;}
  508. .grace-product-price{color:#FF7900; line-height:60rpx; font-size:30rpx; font-weight:bold;}
  509. .grace-product-info-img{width:100%;}
  510. .grace-product-attr-info{overflow:hidden; display:flex; justify-content:space-between; border-bottom:1px solid #F1F1F3; padding-bottom:26rpx;}
  511. .grace-product-attr-info-image{width:120rpx; height:auto; margin-right:10px; flex-shrink:0;}
  512. .grace-product-attr-info-body{width:700rpx;}
  513. .grace-product-attr-info-title{width:100%; font-size:28rpx; color:#333333; display:block;}
  514. .grace-product-attr-info-stone{width:100%; font-size:20rpx; margin-top:8rpx; color:#666666; display:block;}
  515. .icon-close{font-size:30rpx; line-height:80rpx; color:#888888;}
  516. /* 调整宫格大小 */
  517. .grace-grids-items{padding:6rpx 0; width:120rpx;}
  518. .grace-grids-icon{height:50rpx; line-height:50rpx; font-size:40rpx; color:#6B7375;}
  519. .grace-grids-text{line-height:28rpx; font-size:20rpx; margin-top:2px; color:#6B7375;}
  520. .grace-footer-active{color:#FF0036;}
  521. .page-buy {
  522. position: fixed;
  523. right: 120rpx;
  524. bottom: 30rpx;
  525. width: 80rpx;
  526. height: 80rpx;
  527. background: rgb(229, 93, 82);
  528. border-radius: 80rpx;
  529. color: #fff;
  530. font-size: 30rpx;
  531. line-height: 80rpx;
  532. text-align: center;
  533. z-index: 2000;
  534. }
  535. .block1{line-height:80rpx; display:block; width:100%; text-align:center; font-size:28rpx;}
  536. .block2{line-height:66rpx; display:block; width:100%; text-align:center; font-size:28rpx;}
  537. .margin{margin:10rpx 10rpx 0 0;}
  538. .grace-border-b{border-color:#F8F8F8;}
  539. .grace-check-item-v{width:100%; padding:15rpx 15rpx;}
  540. .content1{padding:25rpx; font-size:26rpx; text-align:center; line-height:60rpx;background-color:#F8F8F8; display:block;}
  541. .content2{padding-left:30rpx; padding-right:80rpx; line-height:50rpx; font-size:26rpx;}
  542. /* 图片形式 */
  543. .demo-img{width:580rpx; height:850rpx;}
  544. .grace-dialog-buttons{width:700rpx; line-height:88rpx; height:88rpx; display:block; overflow:hidden; text-align:center; font-size:26rpx; color:#999999;}
  545. .grace-capsule-icon {
  546. white-space: nowrap;
  547. line-height: 34rpx;
  548. text-overflow: ellipsis;
  549. display: -webkit-box; /** 对象作为伸缩盒子模型显示 **/
  550. -webkit-box-orient: vertical; /** 设置或检索伸缩盒对象的子元素的排列方式 **/
  551. -webkit-line-clamp: 1; /** 显示的行数 **/
  552. }
  553. .grace-capsule-text {
  554. line-height : 34rpx;
  555. overflow: hidden;
  556. text-overflow: ellipsis;
  557. word-break: break-all;
  558. display: -webkit-box; /** 对象作为伸缩盒子模型显示 **/
  559. -webkit-box-orient: vertical; /** 设置或检索伸缩盒对象的子元素的排列方式 **/
  560. -webkit-line-clamp: 1; /** 显示的行数 **/
  561. }
  562. </style>