orderDetail.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. <template>
  2. <view class="container">
  3. <view class="recharge">
  4. <view class="example-title flex_item">
  5. <view class="titleTip"></view>
  6. <view class="">支付信息</view>
  7. </view>
  8. <view class="infoBox">
  9. <view class="tplAddr">银行:<text>{{baseData.bank}}</text></view>
  10. <view class="tplAddr">支行:<text>{{baseData.bank_name}}</text></view>
  11. <view class="tplAddr">卡号:<text>{{baseData.bank_code}}</text></view>
  12. <view class="tplAddr">姓名:<text>{{baseData.real_name}}</text></view>
  13. <view class="tplAddr">手机号:<text>{{baseData.phone}}</text></view>
  14. <view class="tplAddr">数量:<text>{{baseData.num*1}}{{baseData.money_type}}</text></view>
  15. <view class="tplAddr">单格:<text>¥{{baseData.price*1}}</text></view>
  16. <view class="tplAddr">总价:<text>¥{{allmoney}}</text></view>
  17. </view>
  18. </view>
  19. <view class="login_text">
  20. <view class="login_input flex">
  21. <view class="login_img"><text>打款凭证</text></view>
  22. <view class="login_name" @click="scImg">
  23. <image :src="img||'/static/image/img19.png'"></image>
  24. </view>
  25. </view>
  26. <view class="submission"><button class="golden" type="golden" hover-class="none"
  27. @click="submission">确认提交</button></view>
  28. </view>
  29. </view>
  30. </template>
  31. <script type="text/javascript">
  32. // import { show_cb,do_cb } from '@/api/recharge.js';
  33. // import { upload } from '@/api/real.js';
  34. import {
  35. getSell,
  36. setSellVoucher
  37. } from '@/api/game.js';
  38. import {
  39. copyText
  40. } from '@/utils/rocessor.js';
  41. export default {
  42. data() {
  43. return {
  44. img:'',
  45. remark:'',
  46. id:'',
  47. baseData:{},
  48. allmoney:0
  49. };
  50. },
  51. onLoad(opt) {
  52. this.id = opt.id;
  53. this.getData();
  54. },
  55. methods: {
  56. //获取数据
  57. getData() {
  58. const that = this;
  59. //确认充值调接口,成功跳转页面
  60. getSell({
  61. id: that.id,
  62. })
  63. .then(function(e) {
  64. that.baseData = e.data.info
  65. that.baseData.num = that.baseData.num*1;
  66. that.baseData.price = that.baseData.price*1;
  67. that.allmoney = +(that.baseData.num*that.baseData.price).toFixed(8);
  68. console.log(that.allmoney);
  69. })
  70. .catch(function(e) {
  71. console.log(e);
  72. });
  73. },
  74. // 下载图片
  75. domImage() {
  76. uni.downloadFile({
  77. url: this.er_code,
  78. success(re) {
  79. console.log(re.tempFilePath, 're');
  80. uni.showToast({
  81. title: '下载成功'
  82. });
  83. }
  84. })
  85. },
  86. // 复制地址
  87. copy() {
  88. copyText(this.dataMoney.address)
  89. },
  90. // 二维码生成
  91. qrR(res) {
  92. this.er_code = res;
  93. },
  94. //确认提交
  95. submission() {
  96. let obj = this;
  97. uni.showLoading({
  98. title: '提交中...',
  99. mask: true
  100. });
  101. //确认充值调接口,成功跳转页面
  102. setSellVoucher({
  103. id: obj.id,
  104. img: obj.img,
  105. })
  106. .then(function(e) {
  107. uni.showToast({
  108. title: '请耐心等待审核通过',
  109. duration: 1500,
  110. mask: false,
  111. icon: 'none'
  112. });
  113. uni.hideLoading();
  114. })
  115. .catch(function(e) {
  116. console.log(e);
  117. uni.hideLoading();
  118. });
  119. },
  120. //上传图片
  121. scImg() {
  122. upload({
  123. file: ''
  124. }).then((e) => {
  125. console.log(e, 55)
  126. this.img = e[0].url;
  127. });
  128. },
  129. }
  130. };
  131. </script>
  132. <style lang="scss">
  133. /* page {
  134. min-height: 100%;
  135. background: linear-gradient(-28deg, rgba(44, 45, 53, 1), rgba(59, 62, 74, 1));
  136. } */
  137. .body_content {
  138. width: 100%;
  139. height: 100%;
  140. }
  141. .login_text {
  142. width: 100%;
  143. color: #fff !important;
  144. font-size: 28rpx !important;
  145. background-color: #1F2A4A;
  146. margin: 25rpx 0rpx;
  147. padding: 0rpx 25rpx;
  148. padding-bottom: 15rpx;
  149. }
  150. .recharge {
  151. text-align: center;
  152. color: #85858e;
  153. font-size: 30rpx;
  154. background-color: #1F2A4A;
  155. }
  156. .example-title {
  157. text-align: left !important;
  158. padding: 25rpx 25rpx;
  159. border-bottom: 2rpx solid #2F364E;
  160. color: #0C5AFA;
  161. .titleTip {
  162. width: 5rpx;
  163. height: 30rpx;
  164. background: linear-gradient(90deg, #0C5AFA, #1356FF);
  165. border-radius: 3rpx;
  166. margin-right: 15rpx;
  167. }
  168. }
  169. .infoBox {
  170. text-align: left;
  171. padding: 28rpx 51rpx;
  172. .tplName {
  173. font-family: PingFang SC;
  174. font-weight: bold;
  175. font-size: 32rpx;
  176. color: #FFFFFF;
  177. line-height: 24rpx;
  178. }
  179. .tplNum {
  180. margin: 30rpx 0rpx;
  181. padding: 15rpx 30rpx;
  182. border-radius: 10rpx;
  183. border: 1px solid #1356FF;
  184. font-family: PingFang SC;
  185. font-size: 26rpx;
  186. color: #1356FF;
  187. display: inline-block;
  188. }
  189. .tplAddr {
  190. color: #e3e3e3;
  191. font-size: 26rpx;
  192. margin-bottom: 10rpx;
  193. text {
  194. padding-left: 15rpx;
  195. font-size: 26rpx;
  196. color: #FFFFFF;
  197. }
  198. }
  199. }
  200. .login_input {
  201. border-bottom: 1px solid #464755;
  202. padding: 35rpx;
  203. }
  204. .uni-input {
  205. width: 100%;
  206. text-align: left !important;
  207. }
  208. .code {
  209. width: 277rpx;
  210. height: 277rpx;
  211. margin: 25rpx auto;
  212. margin-bottom: 35rpx;
  213. background: #0C5AFA;
  214. }
  215. .code image {
  216. width: 100%;
  217. height: 100%;
  218. }
  219. .btnBox {
  220. justify-content: center;
  221. padding-bottom: 50rpx;
  222. padding-top: 30rpx;
  223. .btn {
  224. margin-right: 50rpx;
  225. font-family: PingFang SC;
  226. font-weight: bold;
  227. font-size: 26rpx;
  228. color: #0C5AFA;
  229. border: 1rpx solid #0C5AFA;
  230. padding: 15rpx 45rpx;
  231. border-radius: 15rpx;
  232. }
  233. }
  234. .submission {
  235. padding: 30rpx 25rpx;
  236. .golden {
  237. background: #0C5AFA;
  238. color: #fff;
  239. }
  240. }
  241. .login_name {
  242. width: 480rpx;
  243. color: #ffffff;
  244. }
  245. .login_name image {
  246. width: 100rpx;
  247. height: 100rpx;
  248. }
  249. .tip {
  250. padding: 29rpx 31rpx;
  251. line-height: 55rpx;
  252. font-size: 24rpx;
  253. }
  254. .select_img {
  255. width: 28rpx;
  256. height: 32rpx;
  257. }
  258. .select_img image {
  259. width: 100%;
  260. height: 100%;
  261. }
  262. .scann {
  263. margin-bottom: 35rpx;
  264. margin-top: 15rpx;
  265. }
  266. .scanning {
  267. background-color: #6f6f78;
  268. color: #ffffff;
  269. padding: 10rpx 30rpx;
  270. border-radius: 15rpx;
  271. font-size: 28rpx;
  272. }
  273. .address_code {
  274. padding: 25rpx 0rpx;
  275. color: #ffffff;
  276. }
  277. .input-placeholder {
  278. color: #fff !important;
  279. }
  280. </style>