orderDetail.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  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" v-if="baseData.status!=1">
  20. <view class="example-title flex_item">
  21. <view class="titleTip"></view>
  22. <view class="">打款凭证</view>
  23. </view>
  24. <view class="login_input">
  25. <!-- <view class="login_img"><text>打款凭证</text></view> -->
  26. <view class="login_name" @click="scImg" v-if="!baseData.voucher">
  27. <image :src="img||'/static/image/img19.png'"></image>
  28. </view>
  29. <view class="login_name" v-else>
  30. <image class="showImage" mode="widthFix" :src="baseData.voucher"></image>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="submission" v-if="baseData.status==3 && tab == 1"><button class="golden" type="golden" hover-class="none"
  35. @click="submission">确认提交</button></view>
  36. <view class="submission" v-if="baseData.status==5 && tab == 0"><button class="golden" type="golden" hover-class="none"
  37. @click="comirOrder">确认订单</button></view>
  38. <view class="submission" v-if="baseData.status==1 && tab == 0"><button class="golden" type="golden" hover-class="none"
  39. @click="cancel">取消订单</button></view>
  40. </view>
  41. </template>
  42. <script type="text/javascript">
  43. // import { show_cb,do_cb } from '@/api/recharge.js';
  44. import {
  45. upload
  46. } from '@/api/order.js';
  47. import {
  48. getSell,
  49. setSellVoucher,
  50. cancelLog,
  51. comfirLog
  52. } from '@/api/game.js';
  53. import {
  54. copyText
  55. } from '@/utils/rocessor.js';
  56. export default {
  57. data() {
  58. return {
  59. img: '',
  60. remark: '',
  61. id: '',
  62. baseData: {},
  63. allmoney: 0,
  64. tab:0
  65. };
  66. },
  67. onLoad(opt) {
  68. this.id = opt.id;
  69. this.tab = opt.tab;
  70. this.getData();
  71. },
  72. methods: {
  73. //获取数据
  74. getData() {
  75. const that = this;
  76. //确认充值调接口,成功跳转页面
  77. getSell({
  78. id: that.id,
  79. })
  80. .then(function(e) {
  81. that.baseData = e.data.info
  82. that.baseData.num = that.baseData.num * 1;
  83. that.baseData.price = that.baseData.price * 1;
  84. that.allmoney = +(that.baseData.num * that.baseData.price).toFixed(8);
  85. console.log(that.allmoney);
  86. })
  87. .catch(function(e) {
  88. console.log(e);
  89. });
  90. },
  91. //取消挂出
  92. cancel(id){
  93. const that = this;
  94. cancelLog({
  95. id:that.id,
  96. }).then(res => {
  97. if(res.status == 200){
  98. uni.showToast({
  99. title: res.msg,
  100. icon: 'none',
  101. })
  102. setTimeout(()=>{
  103. uni.navigateBack()
  104. },1000)
  105. }else{
  106. uni.showToast({
  107. title: res.msg,
  108. icon: 'none',
  109. })
  110. }
  111. });
  112. },
  113. comirOrder(){
  114. const that = this;
  115. comfirLog({
  116. id:that.id,
  117. }).then(res => {
  118. if(res.status == 200){
  119. uni.showToast({
  120. title: res.msg,
  121. icon: 'none',
  122. })
  123. setTimeout(()=>{
  124. uni.navigateBack()
  125. },1000)
  126. }else{
  127. uni.showToast({
  128. title: res.msg,
  129. icon: 'none',
  130. })
  131. }
  132. });
  133. },
  134. // 下载图片
  135. domImage() {
  136. uni.downloadFile({
  137. url: this.er_code,
  138. success(re) {
  139. console.log(re.tempFilePath, 're');
  140. uni.showToast({
  141. title: '下载成功'
  142. });
  143. }
  144. })
  145. },
  146. // 复制地址
  147. copy() {
  148. copyText(this.dataMoney.address)
  149. },
  150. // 二维码生成
  151. qrR(res) {
  152. this.er_code = res;
  153. },
  154. //确认提交
  155. submission() {
  156. let obj = this;
  157. uni.showLoading({
  158. title: '提交中...',
  159. mask: true
  160. });
  161. //确认充值调接口,成功跳转页面
  162. setSellVoucher({
  163. id: obj.id,
  164. image: obj.img,
  165. })
  166. .then(function(e) {
  167. uni.hideLoading();
  168. uni.showToast({
  169. title: e.msg
  170. });
  171. setTimeout(()=>{
  172. uni.navigateBack()
  173. },1500)
  174. })
  175. .catch(function(e) {
  176. console.log(e, '错误');
  177. uni.hideLoading();
  178. });
  179. },
  180. //上传图片
  181. scImg() {
  182. upload({
  183. file: ''
  184. }).then((e) => {
  185. console.log(e, 55)
  186. this.img = e[0].url;
  187. });
  188. },
  189. }
  190. };
  191. </script>
  192. <style lang="scss">
  193. /* page {
  194. min-height: 100%;
  195. background: linear-gradient(-28deg, rgba(44, 45, 53, 1), rgba(59, 62, 74, 1));
  196. } */
  197. .body_content {
  198. width: 100%;
  199. height: 100%;
  200. }
  201. .login_text {
  202. width: 100%;
  203. color: #fff !important;
  204. font-size: 28rpx !important;
  205. background-color: #1F2A4A;
  206. margin: 25rpx 0rpx;
  207. padding-bottom: 15rpx;
  208. }
  209. .recharge {
  210. text-align: center;
  211. color: #85858e;
  212. font-size: 30rpx;
  213. background-color: #1F2A4A;
  214. }
  215. .example-title {
  216. text-align: left !important;
  217. padding: 25rpx 25rpx;
  218. border-bottom: 2rpx solid #2F364E;
  219. color: #0C5AFA;
  220. .titleTip {
  221. width: 5rpx;
  222. height: 30rpx;
  223. background: linear-gradient(90deg, #0C5AFA, #1356FF);
  224. border-radius: 3rpx;
  225. margin-right: 15rpx;
  226. }
  227. }
  228. .infoBox {
  229. text-align: left;
  230. padding: 28rpx 51rpx;
  231. .tplName {
  232. font-family: PingFang SC;
  233. font-weight: bold;
  234. font-size: 32rpx;
  235. color: #FFFFFF;
  236. line-height: 24rpx;
  237. }
  238. .tplNum {
  239. margin: 30rpx 0rpx;
  240. padding: 15rpx 30rpx;
  241. border-radius: 10rpx;
  242. border: 1px solid #1356FF;
  243. font-family: PingFang SC;
  244. font-size: 26rpx;
  245. color: #1356FF;
  246. display: inline-block;
  247. }
  248. .tplAddr {
  249. color: #e3e3e3;
  250. font-size: 26rpx;
  251. margin-bottom: 10rpx;
  252. text {
  253. padding-left: 15rpx;
  254. font-size: 26rpx;
  255. color: #FFFFFF;
  256. }
  257. }
  258. }
  259. .login_input {
  260. // border-bottom: 1px solid #464755;
  261. padding: 35rpx;
  262. }
  263. .uni-input {
  264. width: 100%;
  265. text-align: left !important;
  266. }
  267. .code {
  268. width: 277rpx;
  269. height: 277rpx;
  270. margin: 25rpx auto;
  271. margin-bottom: 35rpx;
  272. background: #0C5AFA;
  273. }
  274. .code image {
  275. width: 100%;
  276. height: 100%;
  277. }
  278. .btnBox {
  279. justify-content: center;
  280. padding-bottom: 50rpx;
  281. padding-top: 30rpx;
  282. .btn {
  283. margin-right: 50rpx;
  284. font-family: PingFang SC;
  285. font-weight: bold;
  286. font-size: 26rpx;
  287. color: #0C5AFA;
  288. border: 1rpx solid #0C5AFA;
  289. padding: 15rpx 45rpx;
  290. border-radius: 15rpx;
  291. }
  292. }
  293. .submission {
  294. padding: 30rpx 25rpx;
  295. .golden {
  296. background: #0C5AFA;
  297. color: #fff;
  298. }
  299. }
  300. .login_name {
  301. width: 100%;
  302. color: #ffffff;
  303. .showImage {
  304. width: 100%;
  305. border: 1px solid #FFF;
  306. }
  307. }
  308. .login_name image {
  309. width: 100rpx;
  310. height: 100rpx;
  311. }
  312. .tip {
  313. padding: 29rpx 31rpx;
  314. line-height: 55rpx;
  315. font-size: 24rpx;
  316. }
  317. .select_img {
  318. width: 28rpx;
  319. height: 32rpx;
  320. }
  321. .select_img image {
  322. width: 100%;
  323. height: 100%;
  324. }
  325. .scann {
  326. margin-bottom: 35rpx;
  327. margin-top: 15rpx;
  328. }
  329. .scanning {
  330. background-color: #6f6f78;
  331. color: #ffffff;
  332. padding: 10rpx 30rpx;
  333. border-radius: 15rpx;
  334. font-size: 28rpx;
  335. }
  336. .address_code {
  337. padding: 25rpx 0rpx;
  338. color: #ffffff;
  339. }
  340. .input-placeholder {
  341. color: #fff !important;
  342. }
  343. </style>