Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

weChatPay.vue 8.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. <template>
  2. <div class="app-container">
  3. <div class="buyStepIndex">
  4. <buy-steps :currentStep="3"></buy-steps>
  5. <div class="buy-step3" v-if="type == 1">
  6. <div class="title">微信扫码支付</div>
  7. <div class="shop"><span class="shop-key">订购机构:</span> <span class="shop-val">{{OrgName}}</span></div>
  8. <div class="price"><span class="price-key">应付金额:</span> <span class="price-val">{{price}}元</span></div>
  9. <div class="wechat">
  10. <div id="qrcode" class="wechat-qr">
  11. </div>
  12. <div class="wechat-right">
  13. <div class="wechat-tips">请使用微信扫码,支付成功后自动开通服务</div>
  14. <div class="wechat-btn_wrap">
  15. <span class="wechat-btn"><div @click="jump">我已完成支付</div></span>
  16. </div>
  17. <a href="javascript:void(0)" @click="$router.back(-1)" class="go-back-btn-1">&lt;选择其他支付方式</a>
  18. </div>
  19. </div>
  20. </div>
  21. <div class="buy-step3" v-if="type == 2">
  22. <div class="title">
  23. 对公转账
  24. </div>
  25. <div class="shop">
  26. <span class="shop-key">订购机构:</span>
  27. <span class="shop-val">{{OrgName}}</span>
  28. </div>
  29. <div class="price">
  30. <span class="price-key">应付金额:</span>
  31. <span class="price-val">{{price}}元</span>
  32. </div>
  33. <div class="zz">
  34. <div class="zz-rect">
  35. <div class="zz-tips">
  36. 您需要转账
  37. <span data-v-db8f6a5c="">{{price}}元</span>至以下帐户,转账成功后填写相应信息并提交审核
  38. </div>
  39. <div class="zz-item">
  40. <span class="zz-item_key">收款户名</span>
  41. <span class="zz-item_val">深圳市健康互动科技有限公司</span>
  42. </div>
  43. <div class="zz-item">
  44. <span class="zz-item_key">收款银行</span>
  45. <span class="zz-item_val">755926838810901</span>
  46. </div>
  47. <div class="zz-item">
  48. <span class="zz-item_key">银行账号</span>
  49. <span class="zz-item_val">招商银行高新园支行</span>
  50. </div>
  51. </div>
  52. <div class="zz-btn_wrap">
  53. <a href="javascript:void(0)" class="go-back-btn-2" @click="$router.back(-1)">&lt;选择其他支付方式</a>
  54. <span class="zz-btn" @click="comfirm">已转账汇款</span>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. </template>
  61. <script>
  62. import BuySteps from "./components/buySteps";
  63. import QRCode from 'qrcodejs2'
  64. import {getPayUrl, getOrderInfo, postOrderPayType} from "@/api/service"
  65. export default {
  66. name: "weChatPay",
  67. created() {
  68. this.type = this.$route.query.type
  69. if (this.type == 1) {
  70. this.GetPayUrl()
  71. } else {
  72. this.GetOrderInfo()
  73. }
  74. },
  75. data() {
  76. return {
  77. id: "",
  78. type: "",
  79. price: '',
  80. OrgName: '',
  81. payUrl:'',
  82. };
  83. },
  84. methods: {
  85. qrcode (){
  86. let qrcode = new QRCode('qrcode', {
  87. width: 100,
  88. height: 100, // 高度
  89. text: this.payUrl
  90. })
  91. },
  92. GetPayUrl: function () {
  93. let params = {
  94. 'id': this.$route.query.id
  95. }
  96. getPayUrl(params).then(response => {
  97. if (response.data.state == 0) {
  98. this.$message.error(response.data.msg);
  99. return false;
  100. } else {
  101. this.payUrl = response.data.data.payUrl
  102. this.price = response.data.data.price
  103. this.OrgName = response.data.data.OrgName
  104. this.qrcode()
  105. }
  106. })
  107. }, GetOrderInfo: function () {
  108. let params = {
  109. 'id': this.$route.query.id
  110. }
  111. getOrderInfo(params).then(response => {
  112. if (response.data.state == 0) {
  113. this.$message.error(response.data.msg);
  114. return false;
  115. } else {
  116. this.OrgName = response.data.data.OrgName
  117. this.price = response.data.data.total
  118. }
  119. })
  120. }, comfirm: function () {
  121. let params = {
  122. 'id': this.$route.query.id
  123. }
  124. postOrderPayType(params).then(response => {
  125. if (response.data.state == 0) {
  126. this.$message.error(response.data.msg);
  127. return false;
  128. } else {
  129. this.$notify({
  130. title: "成功",
  131. message: response.data.data.msg,
  132. type: "success",
  133. duration: 2000
  134. });
  135. this.$router.push("/service/completeOrder?type=" + this.type + "&id=" + this.$route.query.id);
  136. }
  137. })
  138. },jump:function () {
  139. this.$router.push("/service/completeOrder?type=" + this.type + "&id=" + this.$route.query.id);
  140. }
  141. },
  142. components: {
  143. BuySteps
  144. },
  145. };
  146. </script>
  147. <style rel="stylesheet/scss" lang="scss" scoped>
  148. .app-container {
  149. padding: 20px;
  150. background: #f6f8f9;
  151. overflow: hidden;
  152. .buyStepIndex {
  153. color: #353535;
  154. padding: 0 40px 30px;
  155. font-size: 14px;
  156. background: #fff;
  157. .buy-step3 {
  158. width: 600px;
  159. overflow: hidden;
  160. margin: 0 auto;
  161. .title {
  162. height: 28px;
  163. line-height: 28px;
  164. font-size: 20px;
  165. font-weight: bold;
  166. margin: 50px 0 30px;
  167. text-align: center;
  168. color: #888;
  169. }
  170. .shop {
  171. height: 20px;
  172. line-height: 20px;
  173. .shop-key {
  174. margin: 0 20px 0 0;
  175. }
  176. .shop-val {
  177. font-size: 14px;
  178. }
  179. }
  180. .price {
  181. height: 58px;
  182. line-height: 28px;
  183. margin: 16px 0 0;
  184. padding: 0 0 30px;
  185. border-bottom: 1px solid #eee;
  186. .price-key {
  187. margin: 0 20px 0 0;
  188. }
  189. .price-val {
  190. display: inline-block;
  191. height: 28px;
  192. color: #fb6161;
  193. vertical-align: top;
  194. font-size: 20px;
  195. font-weight: bold;
  196. }
  197. }
  198. .zz {
  199. .zz-rect {
  200. overflow: hidden;
  201. height: 192px;
  202. margin: 30px 0 20px;
  203. padding: 0 20px;
  204. background: #f6f8fa;
  205. .zz-tips {
  206. height: 25px;
  207. line-height: 25px;
  208. margin: 16px 0 20px;
  209. span {
  210. display: inline-block;
  211. height: inherit;
  212. font-size: 18px;
  213. vertical-align: top;
  214. color: #fb6161;
  215. margin: 0 5px;
  216. font-weight: bold;
  217. }
  218. }
  219. .zz-item {
  220. height: 20px;
  221. line-height: 20px;
  222. margin: 0 0 15px;
  223. .zz-item_val {
  224. margin: 0 0 0 30px;
  225. font-weight: bold;
  226. }
  227. }
  228. }
  229. .zz-btn_wrap {
  230. overflow: hidden;
  231. .go-back-btn-2 {
  232. height: 36px;
  233. line-height: 36px;
  234. display: inline-block;
  235. font-size: 14px;
  236. color: #2a75ed;
  237. }
  238. .zz-btn {
  239. float: right;
  240. width: 190px;
  241. height: 36px;
  242. line-height: 36px;
  243. text-align: center;
  244. background: #409eff;
  245. color: #fff;
  246. border-radius: 2px;
  247. cursor: pointer;
  248. }
  249. }
  250. }
  251. .wechat {
  252. display: flex;
  253. .wechat-qr {
  254. width: 200px;
  255. height: 200px;
  256. margin: 30px 50px 0 0;
  257. }
  258. .wechat-right {
  259. position: relative;
  260. .wechat-tips {
  261. height: 20px;
  262. line-height: 20px;
  263. margin: 30px 0 10px;
  264. }
  265. .wechat-btn_wrap {
  266. display: flex;
  267. justify-content: flex-start;
  268. height: 36px;
  269. .wechat-btn {
  270. width: 120px;
  271. height: 36px;
  272. line-height: 36px;
  273. text-align: center;
  274. background: #409eff;
  275. color: #fff;
  276. border-radius: 2px;
  277. cursor: pointer;
  278. }
  279. }
  280. .go-back-btn-1 {
  281. height: 20px;
  282. font-size: 14px;
  283. color: #2a75ed;
  284. position: absolute;
  285. bottom: 0;
  286. left: 0;
  287. }
  288. }
  289. }
  290. }
  291. }
  292. }
  293. </style>