orderDetail.vue 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  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>{{dataMoney.address}}</text></view>
  10. </view>
  11. <view class="flex btnBox">
  12. <!-- #ifdef APP -->
  13. <view class="btn margin-r-30" @click="domImage">保存相册</view>
  14. <!-- #endif -->
  15. <view class="btn" @click="copy">复制地址</view>
  16. </view>
  17. </view>
  18. <view class="login_text">
  19. <view class="login_input flex">
  20. <view class="login_img"><text>打款凭证</text></view>
  21. <view class="login_name" @click="scImg">
  22. <image :src="img"></image>
  23. </view>
  24. </view>
  25. <view class="login_input flex" style="padding-top: 45rpx;border-bottom: none;">
  26. <view class="login_img">备注</view>
  27. <view class="login_name"><input class="uni-input" type="text" v-model="remark"
  28. placeholder="例如:备注用户账号" /></view>
  29. </view>
  30. <view class="submission"><button class="golden" type="golden" hover-class="none"
  31. @click="submission">确认提交</button></view>
  32. </view>
  33. </view>
  34. </template>
  35. <script type="text/javascript">
  36. // import { show_cb,do_cb } from '@/api/recharge.js';
  37. // import { upload } from '@/api/real.js';
  38. import {
  39. qianBao
  40. } from '@/api/wallet.js';
  41. import {
  42. copyText
  43. } from '@/utils/rocessor.js';
  44. export default {
  45. data() {
  46. return {
  47. uid: '',
  48. list: '',
  49. account: '',
  50. money: '',
  51. address: '',
  52. er_code: '',
  53. remark: '',
  54. img: '/static/image/img19.png',
  55. dataMoney: {},
  56. uid: '',
  57. account: '',
  58. money: '',
  59. address: '',
  60. remark: '',
  61. img: '/static/image/img19.png',
  62. val: "", // 要生成的二维码值
  63. size: 200, // 二维码大小
  64. unit: 'upx', // 单位
  65. background: '#FFF', // 背景色
  66. foreground: '#000', // 前景色
  67. pdground: '#000', // 角标色
  68. icon: '', // 二维码图标
  69. iconsize: 40, // 二维码图标大小
  70. lv: 3, // 二维码容错级别 , 一般不用设置,默认就行
  71. onval: true, // val值变化时自动重新生成二维码
  72. loadMake: true, // 组件加载完成后自动生成二维码
  73. src: '', // 二维码生成后的图片地址或base64
  74. codeShow: false,
  75. cid: '1',
  76. codeIcon: '', // 二维码图标
  77. };
  78. },
  79. onLoad() {
  80. this.uid = uni.getStorageSync('uid');
  81. this.qianBao();
  82. },
  83. methods: {
  84. //获取数据
  85. qianBao() {
  86. const that = this;
  87. qianBao({}).then(
  88. (res) => {
  89. that.dataMoney = res.data.back.USDT.money
  90. that.val = that.dataMoney.address;
  91. console.log(that.dataMoney, 'dataMoney');
  92. }
  93. ).catch(
  94. (res) => {
  95. console.log(res,'err');
  96. }
  97. )
  98. },
  99. // 下载图片
  100. domImage() {
  101. uni.downloadFile({
  102. url: this.er_code,
  103. success(re) {
  104. console.log(re.tempFilePath, 're');
  105. uni.showToast({
  106. title: '下载成功'
  107. });
  108. }
  109. })
  110. },
  111. // 复制地址
  112. copy() {
  113. copyText(this.dataMoney.address)
  114. },
  115. // 二维码生成
  116. qrR(res) {
  117. this.er_code = res;
  118. },
  119. //确认提交
  120. submission() {
  121. let obj = this;
  122. uni.showLoading({
  123. title: '充币中...',
  124. mask: true
  125. });
  126. //确认充值调接口,成功跳转页面
  127. do_cb({
  128. uid: obj.uid,
  129. img: obj.img,
  130. address: obj.address,
  131. money: obj.money,
  132. bz: obj.remark,
  133. })
  134. .then(function(e) {
  135. uni.showToast({
  136. title: '请耐心等待系统审核通过',
  137. duration: 1500,
  138. mask: false,
  139. icon: 'none'
  140. });
  141. uni.hideLoading();
  142. })
  143. .catch(function(e) {
  144. console.log(e);
  145. });
  146. },
  147. //上传图片
  148. scImg() {
  149. upload({
  150. file: ''
  151. }).then((e) => {
  152. console.log(e, 55)
  153. this.img = e[0].url;
  154. });
  155. },
  156. }
  157. };
  158. </script>
  159. <style lang="scss">
  160. /* page {
  161. min-height: 100%;
  162. background: linear-gradient(-28deg, rgba(44, 45, 53, 1), rgba(59, 62, 74, 1));
  163. } */
  164. .body_content {
  165. width: 100%;
  166. height: 100%;
  167. }
  168. .login_text {
  169. width: 100%;
  170. color: #fff !important;
  171. font-size: 28rpx !important;
  172. background-color: #1F2A4A;
  173. margin: 25rpx 0rpx;
  174. padding: 0rpx 25rpx;
  175. padding-bottom: 15rpx;
  176. }
  177. .recharge {
  178. text-align: center;
  179. color: #85858e;
  180. font-size: 30rpx;
  181. background-color: #1F2A4A;
  182. }
  183. .example-title {
  184. text-align: left !important;
  185. padding: 25rpx 25rpx;
  186. border-bottom: 2rpx solid #2F364E;
  187. color: #0C5AFA;
  188. .titleTip {
  189. width: 5rpx;
  190. height: 30rpx;
  191. background: linear-gradient(90deg, #0C5AFA, #1356FF);
  192. border-radius: 3rpx;
  193. margin-right: 15rpx;
  194. }
  195. }
  196. .infoBox {
  197. text-align: left;
  198. padding: 28rpx 51rpx;
  199. .tplName {
  200. font-family: PingFang SC;
  201. font-weight: bold;
  202. font-size: 32rpx;
  203. color: #FFFFFF;
  204. line-height: 24rpx;
  205. }
  206. .tplNum {
  207. margin: 30rpx 0rpx;
  208. padding: 15rpx 30rpx;
  209. border-radius: 10rpx;
  210. border: 1px solid #1356FF;
  211. font-family: PingFang SC;
  212. font-size: 26rpx;
  213. color: #1356FF;
  214. display: inline-block;
  215. }
  216. .tplAddr {
  217. color: #fff;
  218. font-size: 32rpx;
  219. text {
  220. padding-left: 15rpx;
  221. font-size: 26rpx;
  222. color: #FFFFFF;
  223. }
  224. }
  225. }
  226. .login_input {
  227. border-bottom: 1px solid #464755;
  228. padding: 35rpx;
  229. }
  230. .uni-input {
  231. width: 100%;
  232. text-align: left !important;
  233. }
  234. .code {
  235. width: 277rpx;
  236. height: 277rpx;
  237. margin: 25rpx auto;
  238. margin-bottom: 35rpx;
  239. background: #0C5AFA;
  240. }
  241. .code image {
  242. width: 100%;
  243. height: 100%;
  244. }
  245. .btnBox {
  246. justify-content: center;
  247. padding-bottom: 50rpx;
  248. padding-top: 30rpx;
  249. .btn {
  250. margin-right: 50rpx;
  251. font-family: PingFang SC;
  252. font-weight: bold;
  253. font-size: 26rpx;
  254. color: #0C5AFA;
  255. border: 1rpx solid #0C5AFA;
  256. padding: 15rpx 45rpx;
  257. border-radius: 15rpx;
  258. }
  259. }
  260. .submission {
  261. padding: 30rpx 25rpx;
  262. .golden {
  263. background: #0C5AFA;
  264. color: #fff;
  265. }
  266. }
  267. .login_name {
  268. width: 480rpx;
  269. color: #ffffff;
  270. }
  271. .login_name image {
  272. width: 100rpx;
  273. height: 100rpx;
  274. }
  275. .tip {
  276. padding: 29rpx 31rpx;
  277. line-height: 55rpx;
  278. font-size: 24rpx;
  279. }
  280. .select_img {
  281. width: 28rpx;
  282. height: 32rpx;
  283. }
  284. .select_img image {
  285. width: 100%;
  286. height: 100%;
  287. }
  288. .scann {
  289. margin-bottom: 35rpx;
  290. margin-top: 15rpx;
  291. }
  292. .scanning {
  293. background-color: #6f6f78;
  294. color: #ffffff;
  295. padding: 10rpx 30rpx;
  296. border-radius: 15rpx;
  297. font-size: 28rpx;
  298. }
  299. .address_code {
  300. padding: 25rpx 0rpx;
  301. color: #ffffff;
  302. }
  303. .input-placeholder {
  304. color: #fff !important;
  305. }
  306. </style>