洛阳学员端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

189 lines
4.3 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
8 months ago
8 months ago
8 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <view class="pageBg">
  3. <view class="pad">
  4. <view class="card">
  5. <view class="orderInfo">
  6. <view class="schoolName">翔力驾校</view>
  7. <view class="price">
  8. <text class="uint"></text>{{ info.a }}
  9. </view>
  10. <!-- <view class="num">交易单号65465879312</view> -->
  11. </view>
  12. <view class="li border">
  13. <view class="lab">订单金额</view>
  14. <view class="val"> {{info.a}}</view>
  15. </view>
  16. <view class="li">
  17. <view class="lab">订单编号</view>
  18. <view class="val">{{info.a}}</view>
  19. </view>
  20. </view>
  21. <view class="card">
  22. <view class="pay">
  23. <!-- <view class="h2">选择支付方式</view> -->
  24. <!-- <view class="row border">
  25. <view class="wxIcon">
  26. <image src="@/static/images/carIcon/xfbIcon.png" mode=""></image>
  27. </view>
  28. <view class="text">支付宝</view>
  29. <view class="icon">
  30. <!-- <image src="@/static/images/index/noSelect.png" mode=""></image> -->
  31. <!-- <image src="@/static/images/carIcon/isSelect.png" mode=""></image>
  32. </view> -->
  33. </view>
  34. <view class="row">
  35. <view class="wxIcon">
  36. <image src="@/static/images/carIcon/wxIcon.png" mode=""></image>
  37. </view>
  38. <view class="text">微信</view>
  39. <view class="icon">
  40. <!-- <image src="@/static/images/index/noSelect.png" mode=""></image> -->
  41. <image src="@/static/images/carIcon/isSelect.png" mode=""></image>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. <view class="footerBtn pad">
  47. <view class="btnBg" @click="paySubmit">确认支付</view>
  48. </view>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. import { getStudentByPayment } from '@/config/api.js'
  54. export default {
  55. data() {
  56. return {
  57. trainingApplyId: '',
  58. info: {
  59. a: '待对接'
  60. }
  61. }
  62. },
  63. onLoad(options) {
  64. if(options.trainingApplyId) {
  65. this.trainingApplyId = options.trainingApplyId
  66. }
  67. this.getStudentByPayment()
  68. this.initWx()
  69. },
  70. methods: {
  71. initWx() {
  72. // #ifdef APP-PLUS
  73. plus.share.getServices((s) => {
  74. var shares = {};
  75. for (var i = 0; i < s.length; i++) {
  76. var t = s[i];
  77. console.log("...........", t);
  78. shares[t.id] = t;
  79. }
  80. var sweixin = shares['weixin'];
  81. this.sweixin = sweixin
  82. }, function(e) {
  83. console.log("获取分享服务列表失败:" + e.message);
  84. });
  85. // #endif
  86. },
  87. wxPay() {
  88. // #ifdef APP-PLUS
  89. this.sweixin ? this.sweixin.launchMiniProgram({
  90. // path: '/pages/payment/payment?tokenCode=' + this.payInfo.tokenCode, //跳转小程序页面路径 pages/index/index
  91. path: '/' , //跳转小程序页面路径 pages/index/index
  92. type: 0, //可取值: 0-正式版; 1-测试版; 2-体验版。 默认值为0。
  93. id: 'gh_012fd4bda1c2' //小程序的原始id
  94. }) : plus.nativeUI.alert('当前环境不支持微信操作!');
  95. // #endif
  96. },
  97. async getStudentByPayment() {
  98. const {data: res} = await getStudentByPayment({trainingApplyId: this.trainingApplyId})
  99. this.$store.dispatch('getUserInfo')
  100. },
  101. paySubmit() {
  102. console.log('这是什么')
  103. console.log(this.sweixin)
  104. this.wxPay()
  105. // this.$goPage('/pages/indexEntry/enroll/paymentSuccess/paymentSuccess')
  106. }
  107. }
  108. }
  109. </script>
  110. <style lang="scss" scoped>
  111. .card {
  112. width: 100%;
  113. margin-bottom: 20rpx;
  114. padding: 0 20rpx;
  115. .orderInfo {
  116. text-align: center;
  117. .schoolName {
  118. font-size: 28rpx;
  119. color: #ccc;
  120. padding: 40rpx 0 20rpx 0;
  121. }
  122. .price {
  123. font-size: 72rpx;
  124. font-weight: 600;
  125. text.uint {
  126. font-size: 44rpx;
  127. font-weight: 600;
  128. }
  129. }
  130. .num {
  131. font-size: 24rpx;
  132. color: #ADADAD;
  133. }
  134. }
  135. .li {
  136. display: flex;
  137. height: 88rpx;
  138. line-height: 88rpx;
  139. &.border{
  140. border-bottom: 1px solid #F6F7FA;
  141. }
  142. .lab {
  143. color: #ccc;
  144. width: 230rpx;
  145. }
  146. .val {
  147. font-weight: 500;
  148. flex: 1;
  149. text-align: right;
  150. }
  151. }
  152. }
  153. .pay {
  154. .h2 {
  155. font-size: 32rpx;
  156. font-weight: 500;
  157. margin-bottom: 24rpx;
  158. }
  159. .row {
  160. display: flex;
  161. justify-content: space-between;
  162. align-items: center;
  163. height: 88rpx;
  164. &.border{
  165. border-bottom: 1px solid #F6F7FA;
  166. }
  167. .wxIcon {
  168. width: 40rpx;
  169. height: 40rpx;
  170. }
  171. .text {
  172. margin-left: 20rpx;
  173. flex: 1;
  174. text-align: left;
  175. font-size: 28rpx;
  176. color: #333;
  177. }
  178. .icon {
  179. width: 40rpx;
  180. height: 40rpx;
  181. }
  182. }
  183. }
  184. </style>