order-payment.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. <template>
  2. <view class="container cashier">
  3. <cu-custom :navbar-data='nvabarData'></cu-custom>
  4. <view class="container-cash clearfix" :style="{marginTop:CustomBar+'px'}">
  5. <view class="container-wrapper">
  6. <view class="pay-title">
  7. <text>订单提交成功,请支付订单</text>
  8. </view>
  9. <view class="pay-content">
  10. <view class="pay-p"><text>待付金额</text></view>
  11. <view class="pay-money">
  12. <text class="pay-sm">¥</text>
  13. <text class="pay-bg">{{payableAmount}}</text>
  14. </view>
  15. </view>
  16. <view class="pay-check">
  17. <view class="check-title">
  18. <view class="text">选择支付方式</view>
  19. <view class="icon" @click="showTips">i</view>
  20. </view>
  21. <view class="pay-checked">
  22. <view class="pay-item" :class="{ 'current' : tabCurrentIndex === 0}" @click="tabClick(0)" >
  23. <view class="item-l">
  24. <view class="item-icon"><text class="iconfont icon-weixinzhifu"></text></view>
  25. <view class="item-texts"><text>微信支付</text></view>
  26. </view>
  27. <view class="item-r">
  28. <text class="iconfont icon-gougou"></text>
  29. </view>
  30. </view>
  31. <view class="pay-item" :class="{ 'current' : tabCurrentIndex === 1}" @click="tabClick(1)" >
  32. <view class="item-l">
  33. <view class="item-icon"><text class="iconfont icon-yinlianzhifu"></text></view>
  34. <view class="item-text">
  35. <view class="txt-p">企业网银支付</view>
  36. <view class="txt-t">需要在电脑端汇款</view>
  37. </view>
  38. </view>
  39. <view class="item-r">
  40. <text class="iconfont icon-gougou"></text>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <view class="pay-button">
  47. <view class="btn" @click.stop="goOrderCash">{{buttonText}}</view>
  48. </view>
  49. </view>
  50. <view class="alert spec" :class="specClass" v-if="isShowTip">
  51. <!-- 选择支付弹窗说明 -->
  52. <view class="freight-alert" @tap="hideTips">
  53. <view class="content">
  54. <view class="title">
  55. <text>提示</text>
  56. <text class="iconfont icon-iconfontguanbi" @click.stop="hideTips"></text>
  57. </view>
  58. <view class="text-content">
  59. <view class="text">除了以下两种支付方式,您还可以通过线下直接转账的方式付款。获取转账信息请联系您的采美销售人员或直接拨打客服热线。</view>
  60. <view class="text-p">客服热线:</view>
  61. <view class="text-p">0755-22907771 / 15338851365</view>
  62. <view class="text-p">(周一至周五 09:00-18:00)</view>
  63. </view>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. </template>
  69. <script>
  70. export default{
  71. data(){
  72. return{
  73. orderID:'',
  74. stateType:'',
  75. payableAmount:0,
  76. emptyWrapperH: '',
  77. nvabarData: { //顶部自定义导航
  78. haveBack:false,
  79. showCapsule:1, // 是否显示左上角图标 1表示显示 0表示不显示,
  80. showSearch: 0,
  81. title: '选择支付方式', // 导航栏 中间的标题
  82. textLeft:true
  83. },
  84. isIphoneX:this.$store.state.isIphoneX,
  85. CustomBar:this.CustomBar,// 顶部导航栏高度
  86. tabCurrentIndex:0,
  87. isShowTip:false,
  88. buttonText:'使用微信支付',
  89. }
  90. },
  91. onLoad(option) {
  92. this.initData(option)
  93. },
  94. methods:{
  95. initData(e){
  96. let data = JSON.parse(e.data);
  97. console.log(data)
  98. this.orderID = parseInt(data.data.orderID)
  99. this.payableAmount = data.data.payableAmount
  100. },
  101. goOrderCash(){
  102. switch(this.tabCurrentIndex){
  103. case 0:
  104. this.$api.navigateTo(`/pages/user/order/order-pay?type=0&orderID=${this.orderID}`)
  105. break;
  106. case 1:
  107. this.$api.navigateTo(`/pages/user/order/order-pay?type=1&orderID=${this.orderID}`)
  108. break;
  109. }
  110. },
  111. tabClick(index) {//tab切换
  112. this.tabCurrentIndex = index;
  113. switch(index){
  114. case 0:
  115. this.buttonText='使用微信支付';
  116. break;
  117. case 1:
  118. this.buttonText='使用网银支付';
  119. break;
  120. }
  121. },
  122. showTips(){
  123. this.isShowTip=true
  124. },
  125. hideTips(){
  126. this.isShowTip=false
  127. }
  128. },
  129. onShow() {
  130. }
  131. }
  132. </script>
  133. <style lang="scss">
  134. page{
  135. height: auto !important;
  136. }
  137. .container-cash{
  138. width: 100%;
  139. .container-wrapper{
  140. width:662rpx;
  141. margin: 0 auto;
  142. .pay-title{
  143. font-size: $font-size-32;
  144. line-height: 44rpx;
  145. text-align: center;
  146. color: #2A86FF;
  147. margin: 54rpx 0;
  148. width: 100%;
  149. float: left;
  150. }
  151. .pay-content{
  152. width: 574rpx;
  153. height: 136rpx;
  154. padding: 52rpx 44rpx;
  155. background: url(https://admin-b.caimei365.com/userfiles/1/images/photo/2020/05/%E4%BB%A3%E4%BB%98%E9%87%91%E9%A2%9Dbg%402x.png) no-repeat;
  156. background-size: cover;
  157. float: left;
  158. margin-bottom: 40rpx;
  159. .pay-p{
  160. font-size: $font-size-26;
  161. color: #FFFFFF;
  162. line-height: 36rpx;
  163. }
  164. .pay-money{
  165. color: #FFFFFF;
  166. line-height: 84rpx;
  167. font-weight: bold;
  168. .pay-sm{
  169. font-size: $font-size-26;
  170. }
  171. .pay-bg{
  172. font-size: 50rpx;
  173. }
  174. }
  175. }
  176. .pay-check{
  177. width: 100%;
  178. height: auto;
  179. float: left;
  180. .check-title{
  181. width: 622rpx;
  182. height: 40rpx;
  183. line-height: 40rpx;
  184. padding: 0 20rpx;
  185. margin-top: 24rpx;
  186. .text{
  187. font-size: $font-size-28;
  188. color: $text-color;
  189. text-align: left;
  190. float: left;
  191. }
  192. .icon{
  193. width: 40rpx;
  194. height: 40rpx;
  195. border-radius: 50%;
  196. line-height: 40rpx;
  197. text-align: center;
  198. color: #FFFFFF;
  199. font-size: $font-size-24;
  200. background: radial-gradient(circle,rgba(225,86,22,1) 0%,rgba(255,170,0,1) 67%,rgba(249,185,156,1) 100%);
  201. float: right;
  202. }
  203. }
  204. .pay-checked{
  205. width: 100%;
  206. height: auto;
  207. .pay-item{
  208. width: 618rpx;
  209. height: 96rpx;
  210. border: 2px solid #F5F5F5;
  211. border-radius: 30rpx;
  212. padding: 20rpx;
  213. margin: 24rpx 0;
  214. display: flex;
  215. &.current{
  216. border-color:$color-system;
  217. .item-r{
  218. .icon-gougou{
  219. color: $color-system;
  220. }
  221. }
  222. }
  223. .item-l{
  224. flex: 8;
  225. .item-icon{
  226. width: 96rpx;
  227. height: 96rpx;
  228. float: left;
  229. text-align: center;
  230. line-height: 96rpx;
  231. margin-right: 20rpx;
  232. .iconfont{
  233. font-size:88rpx;
  234. }
  235. .icon-weixinzhifu{
  236. color: #09BB07;
  237. }
  238. .icon-yinlianzhifu{
  239. color: #034582;
  240. }
  241. }
  242. .item-texts{
  243. line-height: 96rpx;
  244. font-size:$font-size-26;
  245. color: $text-color;
  246. }
  247. .item-text{
  248. line-height: 48rpx;
  249. font-size:$font-size-26;
  250. .txt-p{
  251. color: $text-color;
  252. }
  253. .txt-t{
  254. color: #999999;
  255. }
  256. }
  257. }
  258. .item-r{
  259. flex: 2;
  260. text-align: right;
  261. line-height: 96rpx;
  262. .icon-gougou{
  263. font-size: 66rpx;
  264. color: #FFFFFF;
  265. }
  266. }
  267. }
  268. }
  269. }
  270. }
  271. .pay-button{
  272. width: 100%;
  273. float: left;
  274. margin-top: 100rpx;
  275. .btn{
  276. width: 662rpx;
  277. height: 88rpx;
  278. border-radius: 14rpx;
  279. font-size: $font-size-28;
  280. line-height: 88rpx;
  281. color: #FFFFFF;
  282. margin: 0 auto;
  283. text-align: center;
  284. background:$btn-confirm;
  285. }
  286. }
  287. }
  288. .freight-alert{
  289. width: 100%;
  290. height: 100%;
  291. background: rgba(0,0,0,.5);
  292. position: fixed;
  293. top: 0;
  294. left: 0;
  295. z-index: 8888;
  296. transition: all 0.4s;
  297. &.none{
  298. display: none;
  299. }
  300. &.show{
  301. display: block;
  302. }
  303. .content{
  304. width: 422rpx;
  305. height:434rpx;
  306. position: absolute;
  307. background: $bg-color;
  308. left: 0;
  309. right: 0;
  310. bottom: 0;
  311. top: 0;
  312. margin: auto;
  313. padding: 20rpx 32rpx;
  314. border-radius: 12rpx;
  315. .title{
  316. width: 100%;
  317. height: 68rpx;
  318. line-height: 68rpx;
  319. font-size: $font-size-28;
  320. color: $text-color;
  321. text-align: center;
  322. position: relative;
  323. .icon-iconfontguanbi{
  324. width: 68rpx;
  325. height: 68rpx;
  326. text-align: center;
  327. line-height: 68rpx;
  328. position: absolute;
  329. right: 0;
  330. top: 0;
  331. font-size: $font-size-36;
  332. color: #999999;
  333. }
  334. }
  335. .text-content{
  336. width: 100%;
  337. height: auto;
  338. .text{
  339. padding: 20rpx 0;
  340. line-height: 44rpx;
  341. font-size: $font-size-26;
  342. color:#666666;
  343. text-align: justify;
  344. }
  345. .text-p{
  346. line-height: 44rpx;
  347. font-size: $font-size-26;
  348. color:$color-system;
  349. text-align: left;
  350. }
  351. }
  352. }
  353. }
  354. </style>