recharge.html 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692
  1. {extend name="layout/pay" /}
  2. {block name="title"}<title>祈盟文化</title>{/block}
  3. {block name="header"}
  4. <!-- 引入样式 -->
  5. <!-- import CSS -->
  6. <!--引入 element-ui 的样式,-->
  7. <!--<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">-->
  8. <!--&lt;!&ndash; 必须先引入vue, 后使用element-ui &ndash;&gt;-->
  9. <!--<script src="https://cdn.jsdelivr.net/npm/vue@2.5.17/dist/vue.js"></script>-->
  10. <!--&lt;!&ndash; 引入element 的组件库&ndash;&gt;-->
  11. <!--<script src="https://unpkg.com/element-ui/lib/index.js"></script>-->
  12. <link rel="stylesheet" href="__STATIC__/vue/theme-chalk/index.css">
  13. <!-- 必须先引入vue, 后使用element-ui -->
  14. <script src="__STATIC__/vue/vue.js"></script>
  15. <!-- 引入element 的组件库-->
  16. <script src="__STATIC__/vue/theme-chalk/index.js"></script>
  17. <script src="__STATIC__/js/jquery v1.11.3.min.js"></script>
  18. <link rel="stylesheet" href="__STATIC__/css/coin/topup.css">
  19. {/block}
  20. {block name="content"}
  21. <div id="app" class="coin" v-loading="loading" element-loading-text="支付中..." element-loading-spinner="el-icon-loading"
  22. element-loading-background="rgba(0, 0, 0, 0.8)">
  23. <div class="classifyincreased_b">
  24. <div class="box">
  25. <!-- <div class="title" @click="topHide">-->
  26. <!-- <img src="__STATIC__/images/coin/组 430@2x.png" alt=""/>-->
  27. <!-- </div>-->
  28. <div class="outer-div">
  29. <header class="header">
  30. <ul class="tab-tilte" @click="handleTabs">
  31. <li v-for="(item, index) in payList" :class="{ active: tab == item.tab }" @click="tab = item.tab">
  32. <div class="li_a">
  33. <img :src=item.image alt=""/><span>{{item.name}}</span>
  34. </div>
  35. </li>
  36. </ul>
  37. </header>
  38. <div class="tab-content">
  39. <div v-show="tab == 'zfbsmzf' || tab == 'kdsm' || tab =='kdh5' || tab=='wxsmzf' || tab == 'xzzfbzf' || tab=='wx-wap'">
  40. <!-- 账号: -->
  41. <div class="info">
  42. <div>
  43. <el-select v-model="accountType" class="info_select" placeholder="请选择账号" @change="handleValue"
  44. >
  45. <el-option v-for="item in account" :key="item.value" :label="item.label"
  46. :value="item.value">
  47. </el-option>
  48. </el-select>
  49. <span class="b" v-if="accountType==1">{$userinfo['username'] ?? ''}</span>
  50. <span v-if="accountType==2">
  51. <input type="text" placeholder="请输入账号" v-model="username" style="height: 34px;">
  52. 确认账号: <input type="text" placeholder="确认账号" v-model="passusername"
  53. @change="handleChangeUserName" style="height: 34px;">
  54. </span>
  55. </div>
  56. <div v-if="accountType==1">
  57. <span>平台币余额: </span><span span class="b" v-html="coin_amount"></span>
  58. </div>
  59. <div class="c">
  60. <!-- 充值流水-->
  61. </div>
  62. </div>
  63. <div class="but"></div>
  64. <!-- 请选择充值对象: -->
  65. <div class="info_item">请选择充值对象:</div>
  66. <div class="xz">
  67. <el-radio v-model="checkType" label="1">平台币</el-radio>
  68. <el-radio v-model="checkType" label="2">游戏</el-radio>
  69. </div>
  70. <div class="ptb" v-show="checkType == 2">
  71. <div class="ptb_item">请选择需要充值的游戏:</div>
  72. <div class="ptb_index">
  73. <el-select v-model="gameid" placeholder="请选择" @change="handleChangeGame">
  74. <el-option v-for="item in gameList" :key="item.id" :label="item.name"
  75. :value="item.id">
  76. </el-option>
  77. </el-select>
  78. <el-select v-model="serverid" placeholder="请选择区服" @change="handleChangeServer">
  79. <el-option v-for="item in serverList" :key="item.serverid" :label="item.servername"
  80. :value="item.serverid">
  81. </el-option>
  82. </el-select>
  83. <el-select v-model="roleid" placeholder="请选择角色">
  84. <el-option v-for="item in roleList" :key="item.roleid" :label="item.rolename"
  85. :value="item.roleid">
  86. </el-option>
  87. </el-select>
  88. </div>
  89. </div>
  90. <!-- 请选择充值金额: -->
  91. <div class="jo">
  92. <div class="jo_a">
  93. <img src="__STATIC__/images/coin/路径 627@2x.png" alt=""/>
  94. <div class="foot_item">
  95. <div class="foot">兑换比例: 1元=1平台币</div>
  96. </div>
  97. </div>
  98. <span class="jo_b">请选择充值金额:
  99. <div class="foot_index">
  100. <div class="foot">金额将直接充值到所选游戏中</div>
  101. </div>
  102. </span>
  103. </div>
  104. <div class="jo_item">
  105. <el-radio-group v-model="radio" @change="handleChange">
  106. <el-radio :label="10">10元</el-radio>
  107. <el-radio :label="20" style="margin-left: 7px">20元</el-radio>
  108. <el-radio :label="50" style="margin-left: 8px">50元</el-radio>
  109. <el-radio :label="100" style="margin-left: 8px">100元</el-radio>
  110. </el-radio-group>
  111. </div>
  112. <div class="jo_item">
  113. <el-radio-group v-model="radio" @change="handleChange">
  114. <el-radio :label="200">200元</el-radio>
  115. <el-radio :label="400">400元</el-radio>
  116. <el-radio :label="800">800元</el-radio>
  117. <el-radio :label="1200">1200元</el-radio>
  118. </el-radio-group>
  119. </div>
  120. <div class="jo_item">
  121. <el-radio-group v-model="radio" @change="handleChange">
  122. <el-radio :label="-1">其他金额:</el-radio>
  123. </el-radio-group>
  124. <div class="ji_index">¥<input type="text" v-model="amount" name="amount" id="amount"
  125. @change="handleAmount" @focus="handleAmount"/></div>
  126. </div>
  127. <div class="butt" >
  128. <div class="butt_item" @click="handleCenterDialogVisible">立即充值</div>
  129. </div>
  130. <el-dialog title="提示" :visible.sync="centerDialogVisible" append-to-body width="30%" center>
  131. <span>需要注意的是内容是默认不居中的</span>
  132. <span slot="footer" class="dialog-footer">
  133. <el-button @click="centerDialogVisible = false">取 消</el-button>
  134. <el-button type="primary" @click="loadingmen">确 定</el-button>
  135. </span>
  136. </el-dialog>
  137. </div>
  138. <div v-show="tab == 'coinpay'">
  139. <!-- 账号: -->
  140. <div class="info">
  141. <div>
  142. <span class="a">账号:</span><span class="b">{$userinfo['username']??''}</span>
  143. </div>
  144. <div>
  145. <span>平台币余额:</span><span span class="b">{$userinfo['amount']??''}</span>
  146. </div>
  147. <div class="c">
  148. <!-- 充值流水-->
  149. </div>
  150. </div>
  151. <div class="but"></div>
  152. <!-- 请选择充值对象: -->
  153. <div class="ptb">
  154. <div class="ptb_item">请选择需要充值的游戏:</div>
  155. <div class="ptb_index">
  156. <el-select v-model="gameid" placeholder="请选择" @change="handleChangeGame">
  157. <el-option v-for="item in gameList" :key="item.id" :label="item.name"
  158. :value="item.id">
  159. </el-option>
  160. </el-select>
  161. <el-select v-model="serverid" placeholder="请选择区服" @change="handleChangeServer">
  162. <el-option v-for="item in serverList" :key="item.serverid" :label="item.servername"
  163. :value="item.serverid">
  164. </el-option>
  165. </el-select>
  166. <el-select v-model="roleid" placeholder="请选择角色">
  167. <el-option v-for="item in roleList" :key="item.roleid" :label="item.rolename"
  168. :value="item.roleid">
  169. </el-option>
  170. </el-select>
  171. </div>
  172. </div>
  173. <!-- 请选择充值金额: -->
  174. <div class="jo">
  175. <div class="jo_a">
  176. <img src="__STATIC__/images/coin/路径 627@2x.png" alt=""/>
  177. <div class="foot_item">
  178. <div class="foot">兑换比例: 1元=1平台币</div>
  179. </div>
  180. </div>
  181. <span class="jo_b">请选择充值金额:
  182. <div class="foot_index">
  183. <div class="foot">金额将直接充值到所选游戏中</div>
  184. </div>
  185. </span>
  186. </div>
  187. <div class="jo_item">
  188. <el-radio-group v-model="radio" @change="handleChange">
  189. <el-radio :label="10">10元</el-radio>
  190. <el-radio :label="20" style="margin-left: 7px">20元</el-radio>
  191. <el-radio :label="50" style="margin-left: 8px">50元</el-radio>
  192. <el-radio :label="100" style="margin-left: 8px">100元</el-radio>
  193. </el-radio-group>
  194. </div>
  195. <div class="jo_item">
  196. <el-radio-group v-model="radio" @change="handleChange">
  197. <el-radio :label="200">200元</el-radio>
  198. <el-radio :label="400">400元</el-radio>
  199. <el-radio :label="800">800元</el-radio>
  200. <el-radio :label="1200">1200元</el-radio>
  201. </el-radio-group>
  202. </div>
  203. <div class="jo_item">
  204. <el-radio-group v-model="radio" @change="handleChange">
  205. <el-radio :label="-1">其他金额:</el-radio>
  206. </el-radio-group>
  207. <div class="ji_index">¥<input type="text" v-model="amount" name="amount" id="amount"
  208. @change="handleAmount" @focus="handleAmount"/></div>
  209. </div>
  210. <div v-if="mixValue!==0">
  211. <div class="mix">平台币余额不足,还需支付:<span v-html="pay_amount"></span>元</div>
  212. <div class="mix_item">请选择充值方式:<span style="color: red">(平台币订单如果提交未付款余额将在半小时后退回账户中) </span> </div>
  213. <ul class="mix_index">
  214. <li v-for="(item, index) in payCoinList" :class="{ actives: payRadio == item.tab }"
  215. @click="payRadio = item.tab">
  216. <img :src=item.image alt=""/>
  217. </li>
  218. </ul>
  219. <!-- <ul class="mix_index">-->
  220. <!-- <li :class="{ actives: tabs == 1 }" @click="tabs = 1"><img src="./assets//img/组 5@2x.png" alt="" ></li>-->
  221. <!-- <li :class="{ actives: tabs == 2 }" @click="tabs = 2"><img src="./assets//img/组 508@2x.png" alt=""></li>-->
  222. <!-- </ul>-->
  223. </div>
  224. <!-- <div class="jo_item ">-->
  225. <!-- 还需支付:<input type="text" v-model="pay_amount" name="pay_amount" id="pay_amount"/>-->
  226. <!-- </div>-->
  227. <!-- <div class="jo_item payCoinT">-->
  228. <!-- <el-radio-group v-model="payRadio">-->
  229. <!-- <el-radio :label='"zfbsmzf"'>微信</el-radio>-->
  230. <!-- <el-radio :label='"kdsm"'>支付宝</el-radio>-->
  231. <!-- </el-radio-group>-->
  232. <!-- </div>-->
  233. <div class="butt" >
  234. <div class="butt_item" @click="handleCenterDialogVisible">立即充值</div>
  235. </div>
  236. <el-dialog title="提示" :visible.sync="centerDialogVisible" append-to-body width="30%" center>
  237. <span v-html="payHtml">需要注意的是内容是默认不居中的</span>
  238. <span slot="footer" class="dialog-footer">
  239. <el-button @click="centerDialogVisible = false">取 消</el-button>
  240. <el-button type="primary" @click="loadingmen">确 定</el-button>
  241. </span>
  242. </el-dialog>
  243. </div>
  244. </div>
  245. </div>
  246. </div>
  247. </div>
  248. </div>
  249. {/block}
  250. {block name="detail_js"}
  251. <script>
  252. username3 = "{$userinfo['username'] ?? ''}"
  253. new Vue({
  254. el: '#app',
  255. data: function () {
  256. return {
  257. istoday: true,
  258. tab: "zfbsmzf",
  259. radio: 10,
  260. amount: 10, //总金额
  261. pay_amount: 0, //还需支付金额
  262. coin_amt: 0, //平台币支付金额
  263. coin_amount: 0, //平台币余额
  264. accountType: "1",
  265. isxsyc: false,
  266. checkType: "1",
  267. username: "",
  268. passusername: "",
  269. payRadio: 'zfbsmzf',
  270. mixValue: 0,
  271. account: [
  272. {
  273. value: '1',
  274. label: "当前账号:"
  275. },
  276. {
  277. value: '2',
  278. label: "其他账号:"
  279. },
  280. ],
  281. payList: [
  282. {
  283. tab: 'zfbsmzf',
  284. name: "支付宝支付",//现在
  285. image: "__STATIC__/images/coin/m1.png"
  286. },
  287. // {
  288. // tab: 'xzzfbzf',
  289. // name: "支付宝H5支付(现在)",
  290. // image: "__STATIC__/images/coin/m1.png"
  291. // },
  292. // {
  293. // tab: 'wxsmzf',
  294. // name: "微信支付",//(汇付宝)扫码
  295. // image: "__STATIC__/images/coin/m2.png"
  296. // },
  297. {
  298. tab: 'kdsm',
  299. name: "微信支付",//酷点扫码
  300. image: "__STATIC__/images/coin/m2.png"
  301. },
  302. // {
  303. //
  304. // tab: 'wx-wap',
  305. // name: "微信支付",//(汇付宝)H5
  306. // image: "__STATIC__/images/coin/m2.png"
  307. // },
  308. // {
  309. // tab: 'kdh5',
  310. // name: "微信支付", //酷点H5
  311. // image: "__STATIC__/images/coin/m2.png"
  312. // },
  313. {
  314. tab: 'coinpay',
  315. name: "平台币支付",
  316. image: "__STATIC__/images/coin/m3.png"
  317. },
  318. ],
  319. payCoinList: [
  320. {
  321. tab: 'zfbsmzf',
  322. name: "支付宝支付",//现在
  323. image: "__STATIC__/images/coin/zfb.png"
  324. },
  325. {
  326. tab: 'kdsm',
  327. name: "微信支付",//酷点扫码
  328. image: "__STATIC__/images/coin/wx.png"
  329. },
  330. ],
  331. gameList: [],
  332. serverList: [],
  333. roleList: [],
  334. options: [],
  335. gameid: "",
  336. serverid: "",
  337. roleid: "",
  338. verifyUserNameStatus: 0,
  339. loading: false,
  340. centerDialogVisible: false,
  341. payHtml:''
  342. };
  343. },
  344. components: {},
  345. mounted() {
  346. // this.getPaytype()
  347. this.getGameList()
  348. this.pay_amount_fun()
  349. this.getCoin()
  350. },
  351. methods: {
  352. handleTabs(val) {
  353. console.log(val)
  354. console.log(this.tab)
  355. if(this.tab=='coinpay'){
  356. if (this.accountType != 1) {
  357. that = this
  358. that.gameid = ''
  359. that.serverid = ''
  360. that.roleid = ''
  361. that.serverName = ""
  362. that.roleName = ""
  363. }
  364. if (!username3) {
  365. alert('当前未登录请先登陆')
  366. }
  367. this.value = '当前账号'
  368. this.accountType = "1"
  369. this.pay_amount_fun()
  370. }
  371. },
  372. handleValue() {
  373. if (this.accountType == 1) {
  374. if (!username3) {
  375. alert('当前未登录请先登陆')
  376. }
  377. this.username = ''
  378. this.passusername = ''
  379. that.verifyUserNameStatus = 0
  380. }
  381. this.gameid = ''
  382. this.serverid = ''
  383. this.roleid = ''
  384. this.gameName = ""
  385. this.serverName = ""
  386. this.roleName = ""
  387. this.serverList = []
  388. this.roleList = []
  389. },
  390. getCoin() {
  391. $.ajax({
  392. url: '/coin/getCoin',
  393. type: 'post',
  394. data: {},
  395. success: function (data) {
  396. if (data.code == 1) {
  397. that.coin_amount = data.data.amount
  398. } else {
  399. alert(data.msg)
  400. }
  401. }
  402. })
  403. },
  404. pay_amount_fun() { // 还需支付金额
  405. money = parseFloat(this.amount);
  406. if(!money){
  407. money = 0;
  408. }
  409. if (money <= parseFloat(this.coin_amount) && this.accountType == 1) {
  410. this.pay_amount = 0
  411. this.coin_amt = this.amount
  412. this.mixValue = 0
  413. } else {
  414. if (this.accountType == 2) {
  415. counp_money = 0;
  416. } else {
  417. counp_money = parseFloat(this.coin_amount);
  418. }
  419. real_money = money - counp_money;
  420. real_money = real_money.toFixed(2);
  421. this.pay_amount = real_money;
  422. this.coin_amt = this.coin_amount
  423. this.mixValue = 1
  424. }
  425. },
  426. handleAmount() {
  427. if (this.amount && parseFloat(this.amount) > 0) {
  428. this.amount = parseFloat(this.amount).toFixed(0);
  429. }
  430. this.radio = -1
  431. this.pay_amount_fun()
  432. },
  433. handleChange(val) {
  434. if (parseFloat(val) > 0) {
  435. this.amount = parseFloat(val).toFixed(0);
  436. this.pay_amount_fun()
  437. } else {
  438. this.amount = null
  439. }
  440. },
  441. handleChangeGame(val) {
  442. that = this
  443. that.serverid = ''
  444. that.roleid = ''
  445. if (this.accountType == 2 && this.verifyUserNameStatus != 1) {
  446. alert('请先输入账号验证')
  447. return
  448. }
  449. $.ajax({
  450. url: '/coin/getServerList',
  451. type: 'post',
  452. data: {gameid: that.gameid},
  453. success: function (data) {
  454. if (data.code == 1) {
  455. that.serverList = data.data
  456. } else {
  457. alert(data.msg)
  458. }
  459. }
  460. })
  461. },
  462. handleChangeServer() {
  463. that = this
  464. that.roleid = ''
  465. if (this.accountType == 2 && this.verifyUserNameStatus != 1) {
  466. alert('请先输入账号验证')
  467. return
  468. }
  469. if(this.accountType == 1 && !username3){
  470. alert('未登录,请先登录')
  471. return
  472. }
  473. $.ajax({
  474. url: '/coin/getRoleList',
  475. type: 'post',
  476. data: {
  477. gameid: that.gameid,
  478. serverid: that.serverid,
  479. accountType: that.accountType,
  480. username: that.username
  481. },
  482. success: function (data) {
  483. if (data.code == 1) {
  484. that.roleList = data.data
  485. that.pay_amount_fun()
  486. } else {
  487. alert(data.msg)
  488. }
  489. }
  490. })
  491. },
  492. handleChangeUserName() {
  493. that = this
  494. that.verifyUserNameStatus = 0
  495. if (that.username != that.passusername) {
  496. alert("两次输入的账号不一致")
  497. } else {
  498. that = this
  499. that.gameid = ''
  500. that.serverid = ''
  501. that.roleid = ''
  502. $.ajax({
  503. url: '/coin/verifyUserName',
  504. type: 'post',
  505. data: {username: that.username},
  506. success: function (data) {
  507. if (data.code == 1) {
  508. that.verifyUserNameStatus = 1
  509. that.pay_amount_fun()
  510. } else {
  511. alert(data.msg)
  512. }
  513. }
  514. })
  515. }
  516. },
  517. getGameList() {
  518. that = this
  519. $.ajax({
  520. url: '/coin/getGameList',
  521. type: 'post',
  522. success: function (data) {
  523. if (data.code == 1) {
  524. that.gameList = data.data
  525. } else {
  526. alert(data.msg)
  527. }
  528. }
  529. })
  530. },
  531. // getPaytype() {
  532. // $.ajax({
  533. // url: '/coin/getPayType',
  534. // type: 'post',
  535. // success: function (data) {
  536. // console.log(data)
  537. // }
  538. // })
  539. // },
  540. // 隐藏与显示
  541. changeIxsyc() {
  542. this.isxsyc = !this.isxsyc;
  543. },
  544. topHide() {
  545. $('.coin').hide();
  546. },
  547. handleCenterDialogVisible(done) {
  548. that = this
  549. if (this.accountType == 2 && this.verifyUserNameStatus != 1) {
  550. alert('请先输入账号验证')
  551. return
  552. }
  553. console.log(this.accountType)
  554. if (this.accountType == 2){
  555. username = that.username
  556. }else{
  557. username = username3
  558. }
  559. if (that.tab == 'coinpay') {
  560. if (!username3) {
  561. alert('未登录,请先登录')
  562. return
  563. }
  564. if (that.pay_amount > 0) {
  565. if (that.payRadio == '') {
  566. alert('请先输入选择支付方式')
  567. return
  568. }
  569. }
  570. }
  571. if(!that.amount){
  572. alert('请先输入金额')
  573. return
  574. }
  575. this.payHtml = " 您要充值的账号:<span style='color: #00a0e9'><b>"+username+"</b></span> 金额:<span style='color: #00a0e9'><b>"+that.amount+"</b></span>元"
  576. this.centerDialogVisible=true
  577. },
  578. loadingmen(){
  579. this.centerDialogVisible=false
  580. this.loading=true
  581. that.pay()
  582. },
  583. pay() {
  584. if (this.accountType == 2 && this.verifyUserNameStatus != 1) {
  585. alert('请先输入账号验证')
  586. return
  587. }
  588. that = this
  589. var tab = that.tab
  590. if (that.tab == 'coinpay') {
  591. if(!username3){
  592. alert('未登录,请先登录')
  593. return
  594. }
  595. if (that.pay_amount > 0) {
  596. if (that.payRadio == '') {
  597. alert('请先输入选择支付方式')
  598. return
  599. }
  600. tab = 'coin-' + that.payRadio
  601. }
  602. that.checkType = 2
  603. }else{
  604. that.coin_amt = 0;
  605. }
  606. // if(that.checkType == 1 || that.accountType == 2){
  607. // that.coin_amt = 0;
  608. // }
  609. $.ajax({
  610. url: '/coin/pay',
  611. type: 'post',
  612. data: {
  613. type: that.checkType,
  614. paytype: tab,
  615. amount: that.amount,
  616. coin_amt: that.coin_amt,
  617. accountType: that.accountType,
  618. username: that.username,
  619. gameid: that.gameid,
  620. serverid: that.serverid,
  621. roleid: that.roleid
  622. },
  623. success: function (data) {
  624. this.loading=false
  625. paytype = tab
  626. if (data.code == 1) {
  627. if (paytype == 'zfbsmzf' || paytype == 'coin-zfbsmzf') { //支付宝扫码(支付宝官方扫码)
  628. const div = document.createElement('div')
  629. div.innerHTML = data.data.zfbsmzf_param.mweb_url
  630. console.log(data.data.zfbsmzf_param)
  631. document.body.appendChild(div)
  632. document.forms[0].submit()
  633. } else if (paytype == 'xzzfbzf') { //支付宝 扫码 (现在支付)
  634. window.location.href = data.data.xzzfbzf_param.mweb_url
  635. } else if (paytype == 'wxsmzf') { //微信扫码(汇付宝)
  636. window.location.href = data.data.wxpaysm_param.mweb_url
  637. } else if (paytype == 'kdsm' || paytype == 'coin-kdsm') { //微信扫码(ku_param)
  638. window.location.href = data.data.kdsm_param.mweb_url
  639. } else if (paytype == 'coinpay') {
  640. alert(data.msg)
  641. window.location.href = window.location.href
  642. }
  643. } else {
  644. alert(data.msg)
  645. }
  646. }
  647. })
  648. }
  649. },
  650. })
  651. </script>
  652. {/block}