confirm_success.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. <template>
  2. <view>
  3. <nav-bar title="支付成功"></nav-bar>
  4. <view>
  5. <view>
  6. <view class="box1">
  7. <view class="box1_t1">
  8. <!-- <u-icon name="checkmark-circle" color="#34C759" size="32"></u-icon
  9. > -->
  10. <image src="../static/icon-succecc.png" mode="" />
  11. <text>订单支付成功</text>
  12. </view>
  13. <view class="tip">您可在“我的>我的订单”中查询</view>
  14. <view class="fl_c" v-if="isBK === '1'">
  15. <view class="btn1" @click="backMyStudent"> 返回我的网课 </view>
  16. <view class="btn2" @click="gots"> 继续本次的考试预约 </view>
  17. </view>
  18. <view class="fl_c" v-else>
  19. <view class="btn1" @click="goCourse"> 继续选课 </view>
  20. <view class="btn2" @click="goOrder"> 立即学习 </view>
  21. </view>
  22. </view>
  23. <!-- #ifdef H5 -->
  24. <view class="collect">
  25. <view class="fl" v-if="consultPc.accountsStatus">
  26. <image :src="$method.splitImgHost(consultPc.accountsImg)" mode="" />
  27. <text>长按二维码,关注公众号 <br />方便下次进入学习哦 </text>
  28. </view>
  29. <view class="fl" v-else>
  30. <image src="../static/icon-collect.png" mode="" />
  31. <text>收藏链接,方便下次进入学习哦</text>
  32. </view>
  33. </view>
  34. <!-- #endif -->
  35. <view class="box2">
  36. <view class="title2">订单信息</view>
  37. <view
  38. style="padding: 10rpx 0"
  39. v-for="(item, index) in shoppingCartList"
  40. :key="index"
  41. >
  42. <view class="list_item">
  43. <view class="txt_left">商品名称</view>
  44. <view class="txt_right u-line-1">{{ item.goodsName }}</view>
  45. </view>
  46. <view class="list_item">
  47. <view class="txt_left">应付金额</view>
  48. <view class="txt_right_price">¥ {{ item.standPrice }}</view>
  49. </view>
  50. <view class="list_item">
  51. <view class="txt_left">订单编号</view>
  52. <view class="txt_right_sn">{{ sn }}</view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </view>
  59. </template>
  60. <script>
  61. import { mapGetters } from "vuex";
  62. export default {
  63. components: {},
  64. data() {
  65. return {
  66. list: [
  67. {
  68. name: "网课",
  69. },
  70. {
  71. name: "题库通",
  72. },
  73. ],
  74. array: [
  75. "全部",
  76. "建设工程施工管理",
  77. "机电全科",
  78. "机电工程管理与实",
  79. "机电全科",
  80. "全科",
  81. ],
  82. current: 0,
  83. menuIndex: 0,
  84. sn: "",
  85. isBK: "", //1补考商品
  86. getDatas: {},
  87. };
  88. },
  89. onPullDownRefresh() {},
  90. onLoad(option) {
  91. this.sn = option.sn;
  92. this.isBK = option.isBk;
  93. if (option.isBk === "1") {
  94. this.getDatas = this.$store.getters.getBackPageApplyData;
  95. }
  96. },
  97. onShow() {
  98. /* if(this.current === 2 && this.$method.isLogin()){
  99. this.$refs.refMy.init();
  100. } */
  101. },
  102. methods: {
  103. // 返回我的网课
  104. backMyStudent() {
  105. uni.redirectTo({
  106. url: "/pages2/wd/class",
  107. });
  108. },
  109. // 继续本次的考试预约
  110. gots() {
  111. uni.redirectTo({
  112. url: `/pages2/appointment/index?goodsId=${this.getDatas.goodsId}&gradeId=${this.getDatas.gradeId}&orderGoodsId=${this.getDatas.orderGoodsId}&applyId=${this.getDatas.applyId}`,
  113. });
  114. },
  115. goCourse() {
  116. if (this.isHaveJy) {
  117. this.$store.state.current = 3
  118. uni.switchTab({
  119. url: '/pages/course/index'
  120. });
  121. // uni.reLaunch({
  122. // url: "/pages/information/index",
  123. // });
  124. return;
  125. }
  126. uni.switchTab({
  127. url: "/pages/course/index",
  128. });
  129. },
  130. goOrder() {
  131. if (this.isHaveJy) {
  132. uni.redirectTo({
  133. url: "/pages2/wd/stuff",
  134. });
  135. return;
  136. }
  137. uni.switchTab({
  138. url: "/pages/learn/index",
  139. });
  140. },
  141. radioChange(e) {
  142. // console.log(e);
  143. },
  144. // 选中任一radio时,由radio-group触发
  145. radioGroupChange(e) {
  146. // console.log(e);
  147. },
  148. cMenu(index) {
  149. this.menuIndex = index;
  150. },
  151. change(index) {
  152. this.current = index;
  153. },
  154. },
  155. onReachBottom() {},
  156. computed: {
  157. ...mapGetters(["userInfo", "shoppingCartList", "consultPc"]),
  158. isHaveJy() {
  159. return this.shoppingCartList.some((e) => e.goodsType == 8);
  160. },
  161. },
  162. };
  163. </script>
  164. <style>
  165. ::-webkit-scrollbar {
  166. width: 0;
  167. height: 0;
  168. color: transparent;
  169. }
  170. </style>
  171. <style lang="scss" scoped>
  172. page {
  173. background-color: #ffffff;
  174. }
  175. .btn2 {
  176. padding: 0rpx 30rpx;
  177. height: 76rpx;
  178. background: #007aff;
  179. border-radius: 100rpx;
  180. font-size: 28rpx;
  181. color: #ffffff;
  182. text-align: center;
  183. line-height: 76rpx;
  184. }
  185. .btn1 {
  186. padding: 0 30rpx;
  187. height: 76rpx;
  188. border-radius: 100rpx;
  189. border: 1px solid #828282;
  190. box-sizing: border-box;
  191. font-size: 28rpx;
  192. color: #222222;
  193. line-height: 76rpx;
  194. margin-right: 48rpx;
  195. }
  196. .pay_icon {
  197. width: 64rpx;
  198. height: 64rpx;
  199. margin-right: 10rpx;
  200. }
  201. .box3 {
  202. width: 100%;
  203. background: #ffffff;
  204. border-radius: 16rpx;
  205. margin-top: 30rpx;
  206. }
  207. .tip {
  208. text-align: center;
  209. font-size: 28rpx;
  210. color: #999999;
  211. height: 40rpx;
  212. line-height: 40rpx;
  213. color: #7c7c7c;
  214. margin: 24rpx 0 48rpx;
  215. }
  216. .collect {
  217. width: 89%;
  218. background: #e7f1ff;
  219. padding: 30rpx 40rpx;
  220. margin-left: 34rpx;
  221. border-radius: 24rpx;
  222. &:nth-of-type(2) {
  223. image {
  224. width: 112rpx;
  225. height: 112rpx;
  226. }
  227. }
  228. text {
  229. margin-left: 32rpx;
  230. color: #222222;
  231. font-size: 30rpx;
  232. line-height: 44rpx;
  233. }
  234. }
  235. .txt_right_sn {
  236. color: #666666;
  237. }
  238. .txt_right_price {
  239. font-weight: bold;
  240. color: #eb5757;
  241. }
  242. .txt_left {
  243. color: #444444;
  244. }
  245. .txt_right {
  246. width: 70%;
  247. text-align: right;
  248. color: #666666;
  249. }
  250. .list_item {
  251. display: flex;
  252. justify-content: space-between;
  253. align-items: center;
  254. margin-top: 40rpx;
  255. }
  256. .title2 {
  257. font-weight: bold;
  258. color: #222222;
  259. }
  260. .box2 {
  261. margin: 0 40rpx;
  262. margin-top: 64rpx;
  263. font-size: 32rpx;
  264. }
  265. .box1_t2 {
  266. font-size: 24rpx;
  267. color: #999999;
  268. text-align: center;
  269. }
  270. .box1_t1 {
  271. font-size: 30rpx;
  272. font-weight: bold;
  273. color: #333333;
  274. height: 70rpx;
  275. display: flex;
  276. align-items: center;
  277. justify-content: center;
  278. image {
  279. width: 72rpx;
  280. height: 72rpx;
  281. }
  282. }
  283. .box1 {
  284. width: 100%;
  285. background: #ffffff;
  286. border-radius: 16rpx;
  287. padding: 56rpx 0 80rpx;
  288. text {
  289. margin-left: 8rpx;
  290. font-weight: bold;
  291. color: #222222;
  292. font-size: 36rpx;
  293. }
  294. }
  295. .bottomBtn {
  296. position: fixed;
  297. bottom: 0;
  298. width: 100%;
  299. height: 98rpx;
  300. background: linear-gradient(0deg, #015eea, #00c0fa);
  301. color: #ffffff;
  302. text-align: center;
  303. line-height: 98rpx;
  304. font-weight: bold;
  305. font-size: 30rpx;
  306. }
  307. </style>