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