order-pay.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806
  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 class="copy" @click.stop="copyClipboard(bigPayInfo.receiveName)"><text class="iconfont icon-fuzhi_o"></text></view>
  89. </view>
  90. <view class="tui-prompt-item">
  91. <text class="text">收款账号:</text>
  92. {{ bigPayInfo.receiveAccountNo }}
  93. <view class="copy" @click.stop="copyClipboard(bigPayInfo.receiveAccountNo)"><text class="iconfont icon-fuzhi_o"></text></view>
  94. </view>
  95. <view class="tui-prompt-item">
  96. <text class="text">银行:</text>
  97. {{ bigPayInfo.accountName }}
  98. </view>
  99. <view class="tui-prompt-item">
  100. <text class="text">收款方开户地:</text>
  101. {{ bigPayInfo.areaInfo }}
  102. </view>
  103. <view class="tui-prompt-item">
  104. <text class="text">收款网点:</text>
  105. {{ bigPayInfo.accountName }}
  106. </view>
  107. </view>
  108. <view class="tui-prompt-flex">
  109. <view class="btn btn-confirm" @click="handleClick">已完成转账,请点击</view>
  110. <view class="btn btn-cancel" @click="hideMobel">关闭</view>
  111. </view>
  112. </view>
  113. </tui-modal>
  114. </view>
  115. </template>
  116. <script>
  117. import authorize from '@/common/config/authorize.js'
  118. import thorui from '@/components/clipboard/clipboard.thorui.js'
  119. export default{
  120. components: {
  121. // keyboard
  122. },
  123. data(){
  124. return{
  125. orderId:'',
  126. payType:'',
  127. payWay:'',
  128. isRepuest:false,
  129. payableAmount:0,
  130. receiptAmount:0,
  131. balanceAmount:0,
  132. payTotalFee:0,
  133. payAmount:0,
  134. nvabarData: { //顶部自定义导航
  135. showCapsule:1, // 是否显示左上角图标 1表示显示 0表示不显示,
  136. showSearch: 0,
  137. title: '收银台', // 导航栏 中间的标题
  138. haveBack:true,
  139. textLeft:this.$store.state.isIphone
  140. },
  141. idCardList:[],
  142. isIphoneX:this.$store.state.isIphoneX,
  143. CustomBar:this.CustomBar,// 顶部导航栏高度
  144. tabCurrentIndex:0,
  145. isShowTip:false,
  146. buttonText:'去支付',
  147. btnColor:'#09BB07',
  148. discernReceipt:[],
  149. showDigitKeyboard:false,
  150. payHttpUrl:'',
  151. bigPayInfo:{},// 大额网银转账
  152. mbOrderId:0, // 支付记录订单Id
  153. modal:false,
  154. }
  155. },
  156. onLoad(option) {
  157. this.initData(option)
  158. },
  159. filters: {
  160. NumFormat(value) {
  161. if(!value) return '0.00'
  162. /*原来用的是Number(value).toFixed(0),这样取整时有问题,例如0.51取整之后为1,感谢Nils指正*/
  163. /*后来改成了 Number(value)|0,但是输入超过十一位就为负数了,具体见评论 */
  164. var intPart = Number(value) - Number(value)%1 //获取整数部分(这里是windy93的方法)
  165. var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') //将整数部分逢三一断
  166. var floatPart = '.00' //预定义小数部分
  167. var value2Array = value.toString().split('.')
  168. //=2表示数据有小数位
  169. if(value2Array.length == 2) {
  170. floatPart = value2Array[1].toString() //拿到小数部分
  171. if(floatPart.length == 1) { //补0,实际上用不着
  172. return intPartFormat + '.' + floatPart + '0'
  173. } else {
  174. return intPartFormat + '.' + floatPart
  175. }
  176. } else {
  177. return intPartFormat + floatPart
  178. }
  179. }
  180. },
  181. methods:{
  182. initData(e){
  183. this.payType = e.type
  184. console.log(this.payType)
  185. this.orderId = e.orderId
  186. switch(this.payType){
  187. case '0':
  188. this.payWay = 'WEIXIN'
  189. this.btnColor='#09BB07'
  190. this.buttonText = '去支付'
  191. break
  192. case '1':
  193. this.payWay = 'UNIONPAY'
  194. this.btnColor='#034582'
  195. this.buttonText = '生成企业网银支付链接'
  196. break
  197. case '2':
  198. this.payWay = 'UNIONPAY'
  199. this.btnColor='#034582'
  200. this.buttonText = '生成个人网银支付链接'
  201. break
  202. case '3':
  203. this.payWay = 'UNIONPAY'
  204. this.btnColor='#034582'
  205. this.buttonText = '去转账'
  206. break
  207. }
  208. this.GetPayOrderInfo()
  209. },
  210. GetPayOrderInfo(){//初始化支付信息
  211. this.PayService.PayOrderCheckoutCounter({orderId:this.orderId}).then(response =>{
  212. this.isRepuest = true
  213. this.discernReceipt = response.data.discernReceipt // 支付记录
  214. this.payTotalFee = response.data.order.payTotalFee // 订单总额
  215. this.receiptAmount = response.data.order.receiptAmount // 已付金额
  216. this.payableAmount = (response.data.order.payableAmount*100 - this.receiptAmount*100)/100// 已付金额
  217. this.payAmount = this.toFixedFn(this.payableAmount) // 自定义金额
  218. console.log('this.payAmount',this.payAmount)
  219. this.balanceAmount = this.payableAmount - this.payAmount // 计算剩余支付金额
  220. }).catch(error =>{
  221. this.$util.msg(error.msg,2000)
  222. })
  223. },
  224. buttonSubMit(){
  225. switch(this.payType){
  226. case '0':
  227. this.MiniWxPayFor()
  228. break
  229. case '1':
  230. this.BuildCatenate()
  231. break
  232. case '2':
  233. this.BuildCatenate()
  234. break
  235. case '3':
  236. this.LargePayment()
  237. break
  238. }
  239. },
  240. LargePayment(){// 大额银联
  241. if(this.payAmount == 0){
  242. this.$util.msg('请输入本次支付的金额',2000)
  243. return
  244. }
  245. if(this.payAmount <=10){
  246. this.$util.msg('网银支付的金额必须大于¥12.00',2000)
  247. return
  248. }
  249. this.PayService.PayOrderTransferUnion({payAmount:this.accMul(this.payAmount,100),orderId:this.orderId}).then(response =>{
  250. this.bigPayInfo = JSON.parse(response.data.data.payInfo)
  251. this.mbOrderId = response.data.data.mbOrderId
  252. this.modal = true
  253. console.log('PayInfo',this.bigPayInfo)
  254. })
  255. },
  256. handleClick(){// 查询是否支付成功
  257. this.PayService.PayOrderFindOrderStatus({mbOrderId:this.mbOrderId}).then(response =>{
  258. let data = {
  259. payAmount:this.payAmount,
  260. orderId:this.orderId,
  261. type:response.data.data === '1' ? 'success' : 'error'
  262. }
  263. this.$api.navigateTo(`/pages/user/order/order-success?data=${JSON.stringify({ data: data })}`)
  264. })
  265. },
  266. hideMobel(){
  267. this.modal = false
  268. },
  269. BuildCatenate(){// 企业网银 个人网银
  270. if(this.payAmount == 0){
  271. this.$util.msg('请输入本次支付的金额',2000)
  272. return
  273. }
  274. if(this.payAmount <=10){
  275. this.$util.msg('网银支付的金额必须大于¥10.00',2000)
  276. return
  277. }
  278. this.PayService.PayOrderPayLink({unpaidAmount:this.payAmount,orderId:this.orderId,payType:this.payType}).then(response =>{
  279. this.payHttpUrl = response.data
  280. this.isShowTip = true
  281. })
  282. },
  283. MiniWxPayFor(){// 微信支付
  284. authorize.getCode('weixin').then(wechatcode =>{
  285. if(this.payAmount > 5000){
  286. this.$util.modal('','本次支付金额已超出微信支付限额,请输入小于5千的金额进行支付','知道了','',false,() =>{})
  287. return
  288. }
  289. if(this.payAmount == 0){
  290. this.$util.msg('请输入本次支付的金额',2000)
  291. return
  292. }
  293. if(this.payAmount*100 < 2){
  294. this.$util.msg('本次支付的金额必须大于¥0.02',2000)
  295. return
  296. }
  297. console.log('this.payAmount',this.payAmount)
  298. let params ={
  299. payAmount:this.accMul(this.payAmount,100),
  300. payWay:'WEIXIN',
  301. code:wechatcode,
  302. orderId:this.orderId
  303. }
  304. this.PayService.WeChatMiniWxPay(params).then(response =>{
  305. // 友盟埋点收集微信支付
  306. if(process.env.NODE_ENV != 'development'){
  307. this.$uma.trackEvent('Um_Event_ConfirmWechatPay', {
  308. Um_Key_PageName: '微信支付',
  309. Um_Key_SourcePage: '线上支付',
  310. Um_Key_PayName:`${this.buttonText}`,
  311. Um_Key_PayOrderID:`${this.orderId}`
  312. })
  313. }
  314. let PayInfo = JSON.parse(response.data.data.payInfo)
  315. this.WxRequestPayment(PayInfo)
  316. }).catch(error =>{
  317. this.$util.msg(error.msg,2000)
  318. })
  319. })
  320. },
  321. WxRequestPayment(data){
  322. let self = this
  323. wx.requestPayment({
  324. 'timeStamp': data.timeStamp,
  325. 'nonceStr': data.nonceStr,
  326. 'package': data.package,
  327. 'signType': data.signType,
  328. 'paySign': data.paySign,
  329. 'success':function(res){
  330. wx.reLaunch({url: '/pages/tabBar/user/user'})
  331. },
  332. 'fail':function(res){
  333. self.$util.msg('用户取消支付~')
  334. },
  335. 'complete':function(res){
  336. }
  337. })
  338. },
  339. accMul(value1, value2) {
  340. if (value1 == 0 || value2 == 0) {
  341. return 0
  342. }
  343. let m = 0
  344. let v1 = value1.toString()
  345. let v2 = value2.toString()
  346. m += v1.split('.')[1] ? v1.split('.')[1].length : 0
  347. m += v2.split('.')[1] ? v2.split('.')[1].length : 0
  348. let _v1 = Number(v1.replace('.', ''))
  349. let _v2 = Number(v2.replace('.', ''))
  350. return (_v1 * _v2) / Math.pow(10, m)
  351. },
  352. confirmEvent(value){//点击自定义键盘完成的回调函数
  353. this.chechValue(value)
  354. this.showDigitKeyboard = false
  355. },
  356. blurInput(e){
  357. this.chechValue(e.detail.value)
  358. },
  359. focusInput(){
  360. // this.showDigitKeyboard = true
  361. },
  362. hideKeyboard(){
  363. this.showDigitKeyboard = false
  364. },
  365. chechValue(value){
  366. let patern = /\d+\.\d+/g
  367. if(value && value.split('.').length > 2) {
  368. value= patern.exec(value)
  369. }
  370. if(value == '' || value <0 ){
  371. this.payAmount = ''
  372. this.balanceAmount = this.payableAmount
  373. }else if( value > this.payableAmount){
  374. this.payAmount = this.toFixedFn(this.payableAmount)
  375. this.balanceAmount = this.toFixedFn(this.payableAmount - this.payAmount)
  376. }else{
  377. this.payAmount = this.toFixedFn(value)
  378. this.balanceAmount = this.toFixedFn(this.payableAmount - this.payAmount)
  379. }
  380. },
  381. hanldNavigateBack(){//页面返回
  382. uni.navigateBack({
  383. delta: 1
  384. })
  385. },
  386. payTypeText (state){//处理支付记录文字
  387. let stateText = '',
  388. stateTextObject={
  389. 12:'企业网银',
  390. 13:'微信支付',
  391. 14:'支付宝',
  392. 15:'微信支付',
  393. 16:'余额抵扣',
  394. }
  395. Object.keys(stateTextObject).forEach(key => {
  396. if(key == state){
  397. stateText = stateTextObject[key]
  398. }
  399. })
  400. return stateText
  401. },
  402. hideTips(){//隐藏弹窗
  403. this.isShowTip = false
  404. },
  405. toFixedFn(text){//处理小数点后两位数
  406. return Number(text).toFixed(2)
  407. },
  408. copyClipboard(data){
  409. //复制账号
  410. thorui.getClipboardData(data, (res) => {
  411. if (res) {
  412. this.$util.msg('已复制',2000)
  413. } else {
  414. this.$util.msg('复制失败',2000)
  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)
  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)
  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. .copy{
  764. height: 38rpx;
  765. box-sizing: border-box;
  766. padding: 0 24rpx;
  767. text-align: center;
  768. line-height: 36rpx;
  769. display: inline-block;
  770. .iconfont{
  771. font-size: $font-size-40;
  772. color: #666666;
  773. }
  774. }
  775. }
  776. }
  777. .tui-prompt-flex{
  778. width: 100%;
  779. height: auto;
  780. margin-top: 20rpx;
  781. box-sizing: border-box;
  782. padding: 0 35rpx;
  783. .btn{
  784. width: 100%;
  785. line-height: 84rpx;
  786. font-size: $font-size-26;
  787. text-align: center;
  788. color: #FFFFFF;
  789. border-radius: 44rpx;
  790. margin: 20rpx 0;
  791. &.btn-cancel{
  792. background: #FFFFFF;
  793. color: #333333;
  794. border: 1px solid #979797;
  795. }
  796. &.btn-confirm{
  797. background: $btn-confirm;
  798. }
  799. }
  800. }
  801. </style>