order-pay.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808
  1. <template>
  2. <view class="container cashier" v-show="isRepuest">
  3. <cu-custom :navbar-data='nvabarData' @navigateBack="hanldNavigateBack"></cu-custom>
  4. <view class="container-cash clearfix" :style="{marginTop:CustomBar+'px'}">
  5. <view class="container-wrapper">
  6. <view class="pay-content">
  7. <view class="pay-top">
  8. <view class="pay-paid">
  9. <text class="txt-m">待付金额</text>
  10. <text class="txt-b"><text class="small">¥</text>{{payableAmount | NumFormat}}</text>
  11. </view>
  12. <view class="pay-payd">
  13. <view class="pay-paids">
  14. <text class="txt-m">应付总额</text>
  15. <text class="txt-b">¥{{payableAmount | NumFormat}}</text>
  16. </view>
  17. <view class="pay-paids">
  18. <text class="txt-m">已支付金额</text>
  19. <text class="txt-b">¥{{receiptAmount | NumFormat}}</text>
  20. </view>
  21. </view>
  22. </view>
  23. <view class="pay-bot">
  24. <view class="bot-title"><text>本次支付金额</text></view>
  25. <view class="bot-input">
  26. <text>¥</text>
  27. <!-- <view class="input" @click.stop="focusInput">
  28. <text class="text" v-if="payAmount>=0">{{payAmount}}</text>
  29. <text class="none" v-else>输入金额不能大于待付金额</text>
  30. </view> -->
  31. <input class="input"
  32. type="digit"
  33. v-model="payAmount"
  34. @focus="focusInput"
  35. @blur="blurInput"
  36. placeholder="输入金额不能大于待付金额"
  37. placeholder-class="placeholder"/>
  38. </view>
  39. <view class="bot-resid">
  40. <text>应付剩余¥{{balanceAmount|NumFormat}}</text>
  41. </view>
  42. </view>
  43. </view>
  44. <view class="pay-record" :style="{paddingBottom:isIphoneX ? '156rpx' : '112rpx'}">
  45. <view class="record-title"><text>支付记录</text></view>
  46. <view class="record-list">
  47. <view class="list-main" v-if="discernReceipt.length>0">
  48. <view class="list-item" v-for="(item,index) in discernReceipt" :key="index">
  49. <text class="text row-1">¥{{item.receiptAmount | NumFormat}}</text>
  50. <text class="text row-2">{{payTypeText(item.payType)}}</text>
  51. <text class="text row-3">{{item.receiptDate}}</text>
  52. </view>
  53. </view>
  54. <view class="list-none" v-else>暂无支付记录</view>
  55. </view>
  56. </view>
  57. </view>
  58. <view class="pay-button" :style="{paddingBottom:isIphoneX ? '68rpx' : '24rpx'}">
  59. <view class="btn" @click.stop="buttonSubMit" :style="{'background':btnColor}">{{buttonText}}</view>
  60. </view>
  61. </view>
  62. <view class="alert spec" :class="specClass" v-if="isShowTip">
  63. <!-- 选择支付弹窗说明 -->
  64. <view class="freight-alert" @tap="hideTips">
  65. <view class="content">
  66. <view class="title">
  67. <text>支付链接</text>
  68. <text class="iconfont icon-iconfontguanbi" @click.stop="hideTips"></text>
  69. </view>
  70. <view class="text-content">
  71. <view class="text">请复制以下链接,并发送至电脑端,在浏览器访问该链接并选择银行尽快完成支付</view>
  72. <view class="text-p">{{payHttpUrl}}</view>
  73. <view class="text-b">链接有效期为72小时</view>
  74. </view>
  75. <view class="text-button" @click.stop="clipboard(payHttpUrl)">复制链接</view>
  76. </view>
  77. </view>
  78. </view>
  79. <!--大额转账弹窗 -->
  80. <tui-modal :show="modal" :padding="'30rpx 30rpx'" @cancel="hideMobel(0)" :custom="true" fadeIn >
  81. <view class="tui-modal-custom">
  82. <view class="tui-prompt-title">大额银联转账信息</view>
  83. <view class="tui-prompt-text">
  84. <view class="tui-prompt-tips">请使用银行手机app或者网银输入以下信息进行转账。每次发起支付请求,收款账号都会变化,请使用最新的收款账号进行转账。</view>
  85. <view class="tui-prompt-item">
  86. <text class="text">户名:</text>
  87. {{ bigPayInfo.receiveName }}
  88. </view>
  89. <view class="tui-prompt-item">
  90. <text class="text">收款账号:</text>
  91. {{ bigPayInfo.receiveAccountNo }}
  92. <view class="clipboard" @click.stop="copyClipboard(bigPayInfo)">复制</view>
  93. </view>
  94. <view class="tui-prompt-item">
  95. <text class="text">银行:</text>
  96. {{ bigPayInfo.accountName }}
  97. </view>
  98. <view class="tui-prompt-item">
  99. <text class="text">收款方开户地:</text>
  100. {{ bigPayInfo.areaInfo }}
  101. </view>
  102. <view class="tui-prompt-item">
  103. <text class="text">收款网点:</text>
  104. {{ bigPayInfo.accountName }}
  105. </view>
  106. </view>
  107. <view class="tui-prompt-flex">
  108. <view class="btn btn-confirm" @click="handleClick">已完成转账,请点击</view>
  109. <view class="btn btn-cancel" @click="hideMobel">关闭</view>
  110. </view>
  111. </view>
  112. </tui-modal>
  113. </view>
  114. </template>
  115. <script>
  116. import authorize from '@/common/config/authorize.js'
  117. import thorui from '@/components/clipboard/clipboard.thorui.js'
  118. export default{
  119. components: {
  120. // keyboard
  121. },
  122. data(){
  123. return{
  124. orderId:'',
  125. payType:'',
  126. payWay:'',
  127. isRepuest:false,
  128. payableAmount:0,
  129. receiptAmount:0,
  130. balanceAmount:0,
  131. payTotalFee:0,
  132. payAmount:0,
  133. nvabarData: { //顶部自定义导航
  134. showCapsule:1, // 是否显示左上角图标 1表示显示 0表示不显示,
  135. showSearch: 0,
  136. title: '收银台', // 导航栏 中间的标题
  137. haveBack:true,
  138. textLeft:this.$store.state.isIphone
  139. },
  140. idCardList:[],
  141. isIphoneX:this.$store.state.isIphoneX,
  142. CustomBar:this.CustomBar,// 顶部导航栏高度
  143. tabCurrentIndex:0,
  144. isShowTip:false,
  145. buttonText:'去支付',
  146. btnColor:'#09BB07',
  147. discernReceipt:[],
  148. showDigitKeyboard:false,
  149. payHttpUrl:'',
  150. bigPayInfo:{},// 大额网银转账
  151. mbOrderId:0, // 支付记录订单Id
  152. modal:false,
  153. }
  154. },
  155. onLoad(option) {
  156. this.initData(option)
  157. },
  158. filters: {
  159. NumFormat(value) {
  160. if(!value) return '0.00'
  161. /*原来用的是Number(value).toFixed(0),这样取整时有问题,例如0.51取整之后为1,感谢Nils指正*/
  162. /*后来改成了 Number(value)|0,但是输入超过十一位就为负数了,具体见评论 */
  163. var intPart = Number(value) - Number(value)%1 //获取整数部分(这里是windy93的方法)
  164. var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') //将整数部分逢三一断
  165. var floatPart = '.00' //预定义小数部分
  166. var value2Array = value.toString().split('.')
  167. //=2表示数据有小数位
  168. if(value2Array.length == 2) {
  169. floatPart = value2Array[1].toString() //拿到小数部分
  170. if(floatPart.length == 1) { //补0,实际上用不着
  171. return intPartFormat + '.' + floatPart + '0'
  172. } else {
  173. return intPartFormat + '.' + floatPart
  174. }
  175. } else {
  176. return intPartFormat + floatPart
  177. }
  178. }
  179. },
  180. methods:{
  181. initData(e){
  182. this.payType = e.type
  183. console.log(this.payType)
  184. this.orderId = e.orderId
  185. switch(this.payType){
  186. case '0':
  187. this.payWay = 'WEIXIN'
  188. this.btnColor='#09BB07'
  189. this.buttonText = '去支付'
  190. break
  191. case '1':
  192. this.payWay = 'UNIONPAY'
  193. this.btnColor='#034582'
  194. this.buttonText = '生成企业网银支付链接'
  195. break
  196. case '2':
  197. this.payWay = 'UNIONPAY'
  198. this.btnColor='#034582'
  199. this.buttonText = '生成个人网银支付链接'
  200. break
  201. case '3':
  202. this.payWay = 'UNIONPAY'
  203. this.btnColor='#034582'
  204. this.buttonText = '去转账'
  205. break
  206. }
  207. this.GetPayOrderInfo()
  208. },
  209. GetPayOrderInfo(){//初始化支付信息
  210. this.PayService.PayOrderCheckoutCounter({orderId:this.orderId}).then(response =>{
  211. this.isRepuest = true
  212. this.discernReceipt = response.data.discernReceipt // 支付记录
  213. this.payTotalFee = response.data.order.payTotalFee // 订单总额
  214. this.receiptAmount = response.data.order.receiptAmount // 已付金额
  215. this.payableAmount = (response.data.order.payableAmount*100 - this.receiptAmount*100)/100// 已付金额
  216. this.payAmount = this.toFixedFn(this.payableAmount) // 自定义金额
  217. console.log('this.payAmount',this.payAmount)
  218. this.balanceAmount = this.payableAmount - this.payAmount // 计算剩余支付金额
  219. }).catch(error =>{
  220. this.$util.msg(error.msg,2000)
  221. })
  222. },
  223. buttonSubMit(){
  224. switch(this.payType){
  225. case '0':
  226. this.MiniWxPayFor()
  227. break
  228. case '1':
  229. this.BuildCatenate()
  230. break
  231. case '2':
  232. this.BuildCatenate()
  233. break
  234. case '3':
  235. this.LargePayment()
  236. break
  237. }
  238. },
  239. LargePayment(){// 大额银联
  240. if(this.payAmount == 0){
  241. this.$util.msg('请输入本次支付的金额',2000)
  242. return
  243. }
  244. if(this.payAmount <=10){
  245. this.$util.msg('网银支付的金额必须大于¥12.00',2000)
  246. return
  247. }
  248. this.PayService.PayOrderTransferUnion({payAmount:this.accMul(this.payAmount,100),orderId:this.orderId}).then(response =>{
  249. this.bigPayInfo = JSON.parse(response.data.data.payInfo)
  250. this.mbOrderId = response.data.data.mbOrderId;
  251. this.modal = true
  252. console.log('PayInfo',this.bigPayInfo)
  253. })
  254. },
  255. handleClick(){// 查询是否支付成功
  256. this.PayService.PayOrderFindOrderStatus({mbOrderId:this.mbOrderId}).then(response =>{
  257. let data = {
  258. payAmount:this.payAmount,
  259. orderId:this.orderId,
  260. type:response.data.data === '1' ? 'success' : 'error'
  261. }
  262. this.$api.navigateTo(`/pages/user/order/order-success?data=${JSON.stringify({ data: data })}`)
  263. })
  264. },
  265. hideMobel(){
  266. this.modal = false
  267. },
  268. BuildCatenate(){// 企业网银 个人网银
  269. if(this.payAmount == 0){
  270. this.$util.msg('请输入本次支付的金额',2000)
  271. return
  272. }
  273. if(this.payAmount <=10){
  274. this.$util.msg('网银支付的金额必须大于¥10.00',2000)
  275. return
  276. }
  277. this.PayService.PayOrderPayLink({unpaidAmount:this.payAmount,orderId:this.orderId,payType:this.payType}).then(response =>{
  278. this.payHttpUrl = response.data
  279. this.isShowTip = true
  280. })
  281. },
  282. MiniWxPayFor(){// 微信支付
  283. authorize.getCode('weixin').then(wechatcode =>{
  284. if(this.payAmount > 5000){
  285. this.$util.modal('','本次支付金额已超出微信支付限额,请输入小于5千的金额进行支付','知道了','',false,() =>{})
  286. return
  287. }
  288. if(this.payAmount == 0){
  289. this.$util.msg('请输入本次支付的金额',2000)
  290. return
  291. }
  292. if(this.payAmount*100 < 2){
  293. this.$util.msg('本次支付的金额必须大于¥0.02',2000)
  294. return
  295. }
  296. console.log('this.payAmount',this.payAmount)
  297. let params ={
  298. payAmount:this.accMul(this.payAmount,100),
  299. payWay:'WEIXIN',
  300. code:wechatcode,
  301. orderId:this.orderId
  302. }
  303. this.PayService.WeChatMiniWxPay(params).then(response =>{
  304. // 友盟埋点收集微信支付
  305. if(process.env.NODE_ENV != 'development'){
  306. this.$uma.trackEvent('Um_Event_ConfirmWechatPay', {
  307. Um_Key_PageName: '微信支付',
  308. Um_Key_SourcePage: '线上支付',
  309. Um_Key_PayName:`${this.buttonText}`,
  310. Um_Key_PayOrderID:`${this.orderId}`
  311. })
  312. }
  313. let PayInfo = JSON.parse(response.data.data.payInfo)
  314. this.WxRequestPayment(PayInfo)
  315. }).catch(error =>{
  316. this.$util.msg(error.msg,2000)
  317. })
  318. })
  319. },
  320. WxRequestPayment(data){
  321. let self = this
  322. wx.requestPayment({
  323. 'timeStamp': data.timeStamp,
  324. 'nonceStr': data.nonceStr,
  325. 'package': data.package,
  326. 'signType': data.signType,
  327. 'paySign': data.paySign,
  328. 'success':function(res){
  329. wx.reLaunch({url: '/pages/tabBar/user/user'})
  330. },
  331. 'fail':function(res){
  332. self.$util.msg('用户取消支付~')
  333. },
  334. 'complete':function(res){
  335. }
  336. })
  337. },
  338. accMul(value1, value2) {
  339. if (value1 == 0 || value2 == 0) {
  340. return 0
  341. }
  342. let m = 0
  343. let v1 = value1.toString()
  344. let v2 = value2.toString()
  345. m += v1.split('.')[1] ? v1.split('.')[1].length : 0
  346. m += v2.split('.')[1] ? v2.split('.')[1].length : 0
  347. let _v1 = Number(v1.replace('.', ''))
  348. let _v2 = Number(v2.replace('.', ''))
  349. return (_v1 * _v2) / Math.pow(10, m)
  350. },
  351. confirmEvent(value){//点击自定义键盘完成的回调函数
  352. this.chechValue(value)
  353. this.showDigitKeyboard = false
  354. },
  355. blurInput(e){
  356. this.chechValue(e.detail.value)
  357. },
  358. focusInput(){
  359. // this.showDigitKeyboard = true
  360. },
  361. hideKeyboard(){
  362. this.showDigitKeyboard = false
  363. },
  364. chechValue(value){
  365. let patern = /\d+\.\d+/g
  366. if(value && value.split('.').length > 2) {
  367. value= patern.exec(value)
  368. }
  369. if(value == '' || value <0 ){
  370. this.payAmount = ''
  371. this.balanceAmount = this.payableAmount
  372. }else if( value > this.payableAmount){
  373. this.payAmount = this.toFixedFn(this.payableAmount)
  374. this.balanceAmount = this.toFixedFn(this.payableAmount - this.payAmount)
  375. }else{
  376. this.payAmount = this.toFixedFn(value)
  377. this.balanceAmount = this.toFixedFn(this.payableAmount - this.payAmount)
  378. }
  379. },
  380. hanldNavigateBack(){//页面返回
  381. uni.navigateBack({
  382. delta: 1
  383. })
  384. },
  385. payTypeText (state){//处理支付记录文字
  386. let stateText = '',
  387. stateTextObject={
  388. 12:'企业网银',
  389. 13:'微信支付',
  390. 14:'支付宝',
  391. 15:'微信支付',
  392. 16:'余额抵扣',
  393. }
  394. Object.keys(stateTextObject).forEach(key => {
  395. if(key == state){
  396. stateText = stateTextObject[key]
  397. }
  398. })
  399. return stateText
  400. },
  401. hideTips(){//隐藏弹窗
  402. this.isShowTip = false
  403. },
  404. toFixedFn(text){//处理小数点后两位数
  405. return Number(text).toFixed(2)
  406. },
  407. copyClipboard(data){
  408. //复制账号
  409. let thoruiData = data.receiveName + '' + data.receiveAccountNo
  410. thorui.getClipboardData(thoruiData, (res) => {
  411. if (res) {
  412. this.$util.msg('复制成功',2000,true,'success')
  413. } else {
  414. this.$util.msg('复制失败',2000,true,'none')
  415. }
  416. })
  417. },
  418. clipboard(data) {//复制链接
  419. console.log('data',data)
  420. thorui.getClipboardData(data, (res) => {
  421. if (res) {
  422. this.isShowTip = false
  423. this.$util.msg('复制成功',2000,true,'success')
  424. // 友盟埋点收集复制网银链接
  425. if(process.env.NODE_ENV != 'development'){
  426. this.$uma.trackEvent('Um_Event_CopyUnionPay', {
  427. Um_Key_PageName: '网银支付',
  428. Um_Key_SourcePage: '线上支付',
  429. Um_Key_PayName:`${this.buttonText}`,
  430. Um_Key_PayOrderID:`${this.orderId}`
  431. })
  432. }
  433. } else {
  434. this.$util.msg('复制失败',2000,true,'none')
  435. }
  436. })
  437. },
  438. discard(){
  439. //丢弃
  440. }
  441. },
  442. onShow() {
  443. }
  444. }
  445. </script>
  446. <style lang="scss">
  447. page{height: auto !important;background-color: #FFFFFF;}
  448. .container-cash{
  449. width: 100%;
  450. .container-wrapper{
  451. width:100%;
  452. margin: 0 auto;
  453. .pay-content{
  454. width: 662rpx;
  455. height: 420rpx;
  456. padding: 64rpx 44rpx 0 44rpx;
  457. background: url(https://img.caimei365.com/group1/M00/03/BD/Cmis218elN6AY6VeAAqw4n3n4nw186.png) no-repeat;
  458. background-size: cover;
  459. float: left;
  460. position: relative;
  461. .pay-top{
  462. width: 100%;
  463. height: auto;
  464. float: left;
  465. margin-bottom: 44rpx;
  466. .pay-paid{
  467. width: 100%;
  468. height: auto;
  469. margin-bottom: 38rpx;
  470. text{
  471. line-height: 48rpx;
  472. text-align: left;
  473. color: #FFFFFF;
  474. width: 100%;
  475. }
  476. .txt-m{
  477. font-size: $font-size-26;
  478. opacity: 0.7;
  479. display: inline-block;
  480. }
  481. .txt-b{
  482. font-size: $font-size-48;
  483. display: inline-block;
  484. .small{
  485. font-size: $font-size-32;
  486. }
  487. }
  488. }
  489. .pay-payd{
  490. width: 100%;
  491. height: auto;
  492. .pay-paids{
  493. height: auto;
  494. float: left;
  495. margin-right: 48rpx;
  496. text{
  497. line-height: 48rpx;
  498. text-align: left;
  499. color: #FFFFFF;
  500. }
  501. .txt-m{
  502. width: 100%;
  503. display: inline-block;
  504. font-size: $font-size-26;
  505. opacity: 0.7;
  506. }
  507. .txt-b{
  508. width: 100%;
  509. display: inline-block;
  510. font-size: $font-size-32;
  511. }
  512. }
  513. }
  514. }
  515. .pay-bot{
  516. width: 614rpx;
  517. height: 184rpx;
  518. padding: 24rpx;
  519. background: #FFFFFF;
  520. border-radius: 20rpx;
  521. box-shadow:0 2px 6px rgba(255, 77, 0, .17);
  522. position: absolute;
  523. bottom: -92rpx;
  524. left:44rpx;
  525. .bot-title{
  526. line-height: 36rpx;
  527. font-size: $font-size-26;
  528. color: #666666;
  529. }
  530. .bot-input{
  531. width: 100%;
  532. height: 66rpx;
  533. margin: 15rpx 0;
  534. border-bottom: 1px solid #EBEBEB;
  535. line-height: 66rpx;
  536. font-size: $font-size-32;
  537. color: $text-color;
  538. text{
  539. display: block;
  540. float: left;
  541. }
  542. .input{
  543. font-size: $font-size-40;
  544. width: 500rpx;
  545. height: 66rpx;
  546. padding: 0 10rpx;
  547. line-height: 66rpx;
  548. float: left;
  549. .none{
  550. color:$text-color;
  551. opacity: 0.3;
  552. }
  553. .text{
  554. color:$text-color;
  555. }
  556. }
  557. .placeholder{
  558. font-size: $font-size-26;
  559. }
  560. }
  561. .bot-resid{
  562. line-height: 36rpx;
  563. font-size: $font-size-26;
  564. color: #666666;
  565. margin-top: 24rpx;
  566. color: $color-system;
  567. }
  568. }
  569. }
  570. .pay-record{
  571. float: left;
  572. background: #FFFFFF;
  573. width: 702rpx;
  574. height: auto;
  575. padding: 0 24rpx;
  576. margin-top: 112rpx;
  577. .record-title{
  578. width: 100%;
  579. float: left;
  580. font-size: $font-size-28;
  581. color: $text-color;
  582. line-height: 80rpx;
  583. height: 80rpx;
  584. border-bottom: 1px solid #F8F8F8;
  585. }
  586. .record-list{
  587. width: 100%;
  588. height: auto;
  589. float: left;
  590. .list-none{
  591. line-height: 80rpx;
  592. font-size: $font-size-26;
  593. color: #999999;
  594. text-align: left;
  595. }
  596. .list-main{
  597. height: auto;
  598. display: flex;
  599. flex-direction:column;
  600. .list-item{
  601. width: 100%;
  602. height:80rpx;
  603. display: flex;
  604. flex: 1;
  605. line-height: 80rpx;
  606. font-size: $font-size-26;
  607. color: $text-color;
  608. .text{
  609. &.row-1{
  610. flex: 3;
  611. }
  612. &.row-2{
  613. flex: 3;
  614. }
  615. &.row-3{
  616. flex: 4;
  617. text-align: right;
  618. color: #999999;
  619. }
  620. }
  621. }
  622. }
  623. }
  624. }
  625. }
  626. .pay-button{
  627. width: 100%;
  628. background-color: #FFFFFF;
  629. position: fixed;
  630. height: 88rpx;
  631. padding-top: 24rpx;
  632. bottom: 0;
  633. .btn{
  634. width: 702rpx;
  635. height: 88rpx;
  636. border-radius: 44rpx;
  637. font-size: $font-size-28;
  638. line-height: 88rpx;
  639. color: #FFFFFF;
  640. margin: 0 auto;
  641. text-align: center;
  642. background: $btn-confirm;
  643. }
  644. }
  645. }
  646. .freight-alert{
  647. width: 100%;
  648. height: 100%;
  649. background: rgba(0,0,0,.5);
  650. position: fixed;
  651. top: 0;
  652. left: 0;
  653. z-index: 8888;
  654. transition: all 0.4s;
  655. &.none{
  656. display: none;
  657. }
  658. &.show{
  659. display: block;
  660. }
  661. .content{
  662. width: 422rpx;
  663. height:434rpx;
  664. position: absolute;
  665. background: $bg-color;
  666. left: 0;
  667. right: 0;
  668. bottom: 0;
  669. top: 0;
  670. margin: auto;
  671. padding: 20rpx 32rpx;
  672. border-radius: 12rpx;
  673. .title{
  674. width: 100%;
  675. height: 68rpx;
  676. line-height: 68rpx;
  677. font-size: $font-size-28;
  678. color: $text-color;
  679. text-align: center;
  680. position: relative;
  681. .icon-iconfontguanbi{
  682. width: 68rpx;
  683. height: 68rpx;
  684. text-align: center;
  685. line-height: 68rpx;
  686. position: absolute;
  687. right: 0;
  688. top: 0;
  689. font-size: $font-size-36;
  690. color: #999999;
  691. }
  692. }
  693. .text-content{
  694. width: 100%;
  695. height: auto;
  696. .text{
  697. padding: 20rpx 0 0 0;
  698. line-height: 44rpx;
  699. font-size: $font-size-26;
  700. color:#666666;
  701. text-align: justify;
  702. }
  703. .text-p{
  704. width: 100%;
  705. line-height: 44rpx;
  706. font-size: $font-size-26;
  707. color:$color-system;
  708. text-align: left;
  709. text-overflow:ellipsis;
  710. display: -webkit-box;
  711. word-break: break-all;
  712. -webkit-box-orient: vertical;
  713. -webkit-line-clamp: 1;
  714. overflow: hidden;
  715. }
  716. .text-b{
  717. line-height: 44rpx;
  718. font-size: $font-size-24;
  719. color:#999999;
  720. text-align: left;
  721. }
  722. }
  723. .text-button{
  724. width: 100%;
  725. height: 88rpx;
  726. line-height: 88rpx;
  727. background: $btn-confirm;
  728. font-size: $font-size-28;
  729. border-radius: 44rpx;
  730. color:#FFFFFF;
  731. text-align: center;
  732. margin-top: 20rpx;
  733. }
  734. }
  735. }
  736. .tui-prompt-title{
  737. width: 100%;
  738. height: 44rpx;
  739. line-height: 44rpx;
  740. padding: 20rpx 0;
  741. text-align: center;
  742. color: #333333;
  743. border-bottom: 1px solid #E2E7EF;
  744. }
  745. .tui-prompt-text{
  746. padding-top: 20rpx;
  747. .tui-prompt-tips{
  748. width: 100%;
  749. line-height: 36rpx;
  750. font-size: $font-size-22;
  751. color: #E15616;
  752. text-align: justify;
  753. margin-bottom: 24rpx;
  754. }
  755. .tui-prompt-item{
  756. width: 100%;
  757. line-height: 60rpx;
  758. color: #333333;
  759. font-size: $font-size-26;
  760. .text{
  761. font-weight: bold;
  762. }
  763. .clipboard{
  764. height: 38rpx;
  765. box-sizing: border-box;
  766. padding: 0 24rpx;
  767. background:#FFE6DC;
  768. text-align: center;
  769. font-size: $font-size-22;
  770. color: #E15616;
  771. border-radius: 18rpx;
  772. line-height: 36rpx;
  773. display: inline-block;
  774. margin-left: 20rpx;
  775. border: 1px solid #E15616;
  776. }
  777. }
  778. }
  779. .tui-prompt-flex{
  780. width: 100%;
  781. height: auto;
  782. margin-top: 20rpx;
  783. box-sizing: border-box;
  784. padding: 0 35rpx;
  785. .btn{
  786. width: 100%;
  787. line-height: 84rpx;
  788. font-size: $font-size-26;
  789. text-align: center;
  790. color: #FFFFFF;
  791. border-radius: 44rpx;
  792. margin: 20rpx 0;
  793. &.btn-cancel{
  794. background: #FFFFFF;
  795. color: #333333;
  796. border: 1px solid #979797;
  797. }
  798. &.btn-confirm{
  799. background: $btn-confirm;
  800. }
  801. }
  802. }
  803. </style>