product.vue 22 KB

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