confirm_success.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  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="config.gzhImage">
  26. <image :src="$method.splitImgHost(config.gzhImage)" 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. console.log(this.config.gzhImage);
  99. /* if(this.current === 2 && this.$method.isLogin()){
  100. this.$refs.refMy.init();
  101. } */
  102. },
  103. methods: {
  104. // 返回我的网课
  105. backMyStudent() {
  106. uni.redirectTo({
  107. url: "/pages2/wd/class",
  108. });
  109. },
  110. // 继续本次的考试预约
  111. gots() {
  112. uni.redirectTo({
  113. url: `/pages2/appointment/index?goodsId=${this.getDatas.goodsId}&gradeId=${this.getDatas.gradeId}&orderGoodsId=${this.getDatas.orderGoodsId}&applyId=${this.getDatas.applyId}`,
  114. });
  115. },
  116. goCourse() {
  117. if (this.isHaveJy) {
  118. this.$store.state.current = 3
  119. uni.switchTab({
  120. url: '/pages/course/index'
  121. });
  122. // uni.reLaunch({
  123. // url: "/pages/information/index",
  124. // });
  125. return;
  126. }
  127. uni.switchTab({
  128. url: "/pages/course/index",
  129. });
  130. },
  131. goOrder() {
  132. if (this.isHaveJy) {
  133. uni.redirectTo({
  134. url: "/pages2/wd/stuff",
  135. });
  136. return;
  137. }
  138. uni.switchTab({
  139. url: "/pages/learn/index",
  140. });
  141. },
  142. radioChange(e) {
  143. // console.log(e);
  144. },
  145. // 选中任一radio时,由radio-group触发
  146. radioGroupChange(e) {
  147. // console.log(e);
  148. },
  149. cMenu(index) {
  150. this.menuIndex = index;
  151. },
  152. change(index) {
  153. this.current = index;
  154. },
  155. },
  156. onReachBottom() {},
  157. computed: {
  158. ...mapGetters(["userInfo", "shoppingCartList", "config"]),
  159. isHaveJy() {
  160. return this.shoppingCartList.some((e) => e.goodsType == 8);
  161. },
  162. },
  163. };
  164. </script>
  165. <style>
  166. ::-webkit-scrollbar {
  167. width: 0;
  168. height: 0;
  169. color: transparent;
  170. }
  171. </style>
  172. <style lang="scss" scoped>
  173. page {
  174. background-color: #ffffff;
  175. }
  176. .btn2 {
  177. padding: 0rpx 30rpx;
  178. height: 76rpx;
  179. background: #007aff;
  180. border-radius: 100rpx;
  181. font-size: 28rpx;
  182. color: #ffffff;
  183. text-align: center;
  184. line-height: 76rpx;
  185. }
  186. .btn1 {
  187. padding: 0 30rpx;
  188. height: 76rpx;
  189. border-radius: 100rpx;
  190. border: 1px solid #828282;
  191. box-sizing: border-box;
  192. font-size: 28rpx;
  193. color: #222222;
  194. line-height: 76rpx;
  195. margin-right: 48rpx;
  196. }
  197. .pay_icon {
  198. width: 64rpx;
  199. height: 64rpx;
  200. margin-right: 10rpx;
  201. }
  202. .box3 {
  203. width: 100%;
  204. background: #ffffff;
  205. border-radius: 16rpx;
  206. margin-top: 30rpx;
  207. }
  208. .tip {
  209. text-align: center;
  210. font-size: 28rpx;
  211. color: #999999;
  212. height: 40rpx;
  213. line-height: 40rpx;
  214. color: #7c7c7c;
  215. margin: 24rpx 0 48rpx;
  216. }
  217. .collect {
  218. width: 89%;
  219. background: #e7f1ff;
  220. padding: 30rpx 40rpx;
  221. margin-left: 34rpx;
  222. border-radius: 24rpx;
  223. &:nth-of-type(2) {
  224. image {
  225. width: 112rpx;
  226. height: 112rpx;
  227. }
  228. }
  229. text {
  230. margin-left: 32rpx;
  231. color: #222222;
  232. font-size: 30rpx;
  233. line-height: 44rpx;
  234. }
  235. }
  236. .txt_right_sn {
  237. color: #666666;
  238. }
  239. .txt_right_price {
  240. font-weight: bold;
  241. color: #eb5757;
  242. }
  243. .txt_left {
  244. color: #444444;
  245. }
  246. .txt_right {
  247. width: 70%;
  248. text-align: right;
  249. color: #666666;
  250. }
  251. .list_item {
  252. display: flex;
  253. justify-content: space-between;
  254. align-items: center;
  255. margin-top: 40rpx;
  256. }
  257. .title2 {
  258. font-weight: bold;
  259. color: #222222;
  260. }
  261. .box2 {
  262. margin: 0 40rpx;
  263. margin-top: 64rpx;
  264. font-size: 32rpx;
  265. }
  266. .box1_t2 {
  267. font-size: 24rpx;
  268. color: #999999;
  269. text-align: center;
  270. }
  271. .box1_t1 {
  272. font-size: 30rpx;
  273. font-weight: bold;
  274. color: #333333;
  275. height: 70rpx;
  276. display: flex;
  277. align-items: center;
  278. justify-content: center;
  279. image {
  280. width: 72rpx;
  281. height: 72rpx;
  282. }
  283. }
  284. .box1 {
  285. width: 100%;
  286. background: #ffffff;
  287. border-radius: 16rpx;
  288. padding: 56rpx 0 80rpx;
  289. text {
  290. margin-left: 8rpx;
  291. font-weight: bold;
  292. color: #222222;
  293. font-size: 36rpx;
  294. }
  295. }
  296. .bottomBtn {
  297. position: fixed;
  298. bottom: 0;
  299. width: 100%;
  300. height: 98rpx;
  301. background: linear-gradient(0deg, #015eea, #00c0fa);
  302. color: #ffffff;
  303. text-align: center;
  304. line-height: 98rpx;
  305. font-weight: bold;
  306. font-size: 30rpx;
  307. }
  308. </style>