|
@@ -5,335 +5,366 @@ namespace app\index;
|
|
|
|
|
|
class item_price extends BaseUser
|
|
|
{
|
|
|
- function getlist()
|
|
|
- {
|
|
|
- $_var_0 = SafeRequest("type", "get") ?: 0;
|
|
|
- $_var_1 = SafeRequest("gid", "get") ?: 0;
|
|
|
- $_var_1 = is_numeric($_var_1) ? $_var_1 : bees_decrypt($_var_1);
|
|
|
- if ($_var_1) {
|
|
|
- $_var_2 = SafeRequest("recommended", "get") ?: 0;
|
|
|
- $_var_3[] = ["recommended", "=", $_var_2];
|
|
|
- }
|
|
|
- $_var_3[] = ["type", "=", $_var_0];
|
|
|
- $_var_3[] = ["status", "=", "1"];
|
|
|
- $_var_4 = db("item")->where($_var_3)->select();
|
|
|
- reJSON(["list" => $_var_4]);
|
|
|
- }
|
|
|
- function index()
|
|
|
- {
|
|
|
- $_var_5 = SafeRequest("type", "get") ?: 0;
|
|
|
- $_var_6 = SafeRequest("gid", "get") ?: 0;
|
|
|
- $_var_7 = SafeRequest("ump_notify", "get") ?: "";
|
|
|
- if (!IN_SUPER && $_var_5 > 3 || $_var_5 == 3 && !$_var_6 || $_var_5 > 4 && IN_SUPER && !IN_SUPER_PRV) {
|
|
|
- redirect();
|
|
|
- }
|
|
|
- $_var_6 = is_numeric($_var_6) ? $_var_6 : bees_decrypt($_var_6);
|
|
|
- if ($_var_6) {
|
|
|
- $_var_8 = db("appid")->where("in_id", $_var_6)->find();
|
|
|
- }
|
|
|
- $_var_9[] = ["type", "=", $_var_5];
|
|
|
- $_var_9[] = ["status", "=", "1"];
|
|
|
- $_var_10 = json_decode(IN_ITEM_TYPE, true);
|
|
|
- ?> <!doctype html>
|
|
|
+ function getlist()
|
|
|
+ {
|
|
|
+ $_var_0 = SafeRequest("type", "get") ?: 0;
|
|
|
+ $_var_1 = SafeRequest("gid", "get") ?: 0;
|
|
|
+ $_var_1 = is_numeric($_var_1) ? $_var_1 : bees_decrypt($_var_1);
|
|
|
+ if ($_var_1) {
|
|
|
+ $_var_2 = SafeRequest("recommended", "get") ?: 0;
|
|
|
+ $_var_3[] = ["recommended", "=", $_var_2];
|
|
|
+ }
|
|
|
+ $_var_3[] = ["type", "=", $_var_0];
|
|
|
+ $_var_3[] = ["status", "=", "1"];
|
|
|
+ $_var_4 = db("item")->where($_var_3)->select();
|
|
|
+ reJSON(["list" => $_var_4]);
|
|
|
+ }
|
|
|
+ function index()
|
|
|
+ {
|
|
|
+ $_var_5 = SafeRequest("type", "get") ?: 0;
|
|
|
+ $_var_6 = SafeRequest("gid", "get") ?: 0;
|
|
|
+ $_var_7 = SafeRequest("ump_notify", "get") ?: "";
|
|
|
+ if (!IN_SUPER && $_var_5 > 3 || $_var_5 == 3 && !$_var_6 || $_var_5 > 4 && IN_SUPER && !IN_SUPER_PRV) {
|
|
|
+ redirect();
|
|
|
+ }
|
|
|
+ $_var_6 = is_numeric($_var_6) ? $_var_6 : bees_decrypt($_var_6);
|
|
|
+ if ($_var_6) {
|
|
|
+ $_var_8 = db("appid")->where("in_id", $_var_6)->find();
|
|
|
+ }
|
|
|
+ $_var_9[] = ["type", "=", $_var_5];
|
|
|
+ $_var_9[] = ["status", "=", "1"];
|
|
|
+ $_var_10 = json_decode(IN_ITEM_TYPE, true);
|
|
|
+ $_var_imgs = ['Mask', 'pengpaibi', 'huiyuan','', 'public', 'private']
|
|
|
+?>
|
|
|
+ <!doctype html>
|
|
|
<html lang="">
|
|
|
+
|
|
|
<head>
|
|
|
<meta charset="utf-8">
|
|
|
- <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"/>
|
|
|
- <meta name="keywords" content="<?php echo IN_KEYWORDS;?>"/>
|
|
|
- <meta name="description" content="<?php echo IN_DESCRIPTION;?>"/>
|
|
|
- <title>商品购买 - <?php echo IN_NAME;?> - 免费应用内测托管平台|iOS应用Beta测试分发|Android应用内测分发</title>
|
|
|
- <?php
|
|
|
- $this->static_();
|
|
|
- ?> <style> [v-cloak] {
|
|
|
+ <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0" />
|
|
|
+ <meta name="keywords" content="<?php echo IN_KEYWORDS; ?>" />
|
|
|
+ <meta name="description" content="<?php echo IN_DESCRIPTION; ?>" />
|
|
|
+ <title>商品购买 - <?php echo IN_NAME; ?> - 免费应用内测托管平台|iOS应用Beta测试分发|Android应用内测分发</title>
|
|
|
+ <?php
|
|
|
+ $this->static_();
|
|
|
+ ?> <style>
|
|
|
+ [v-cloak] {
|
|
|
display: none;
|
|
|
}
|
|
|
</style>
|
|
|
+
|
|
|
<body>
|
|
|
- <?php
|
|
|
- $this->header();
|
|
|
- ?> <main v-cloak>
|
|
|
- <div class="price-pay-wrap">
|
|
|
- <div class="container">
|
|
|
- <div class="price-pay">
|
|
|
- <div class="crumbs">
|
|
|
- <a href="###">价格</a><span>/</span>商品购买
|
|
|
- </div>
|
|
|
- <div class="con">
|
|
|
- <div class="common">
|
|
|
- <div class="tit">选择套餐内容</div>
|
|
|
- <?php
|
|
|
- if ($_var_5 != 3) {
|
|
|
- ?> <ul class="clearfix list3">
|
|
|
- <?php
|
|
|
- foreach ($_var_10 as $_var_11 => $_var_12) {
|
|
|
- if ($_var_11 < 3 || IN_SUPER && ($_var_11 == 4 || IN_SUPER_PRV && $_var_11 == 5)) {
|
|
|
- ?> <li class="clearfix" :class="{active:type==<?php echo $_var_11;?>}" @click="type=<?php echo $_var_11;?>">
|
|
|
- <?php echo $_var_12;?><span class="radio-checked icon icon-checkbox"></span>
|
|
|
- </li>
|
|
|
- <?php
|
|
|
- }
|
|
|
- }
|
|
|
- ?> </ul>
|
|
|
- <?php
|
|
|
- } elseif ($_var_6 && $_var_8) {
|
|
|
- ?> <ul class="clearfix list3">
|
|
|
- <li class="clearfix <?php echo $_var_5 == 3 ? "active" : "";?>" style="padding-right: 15px">
|
|
|
- <img src="/data/image/app/<?php echo $_var_8["in_icon"];?>" width="35" height="35" onerror="javascript:this.src='/static/index/image/iOS.png'" style="margin-right: 15px"/>
|
|
|
- <?php echo $_var_8["in_name"];?> <span class="radio-checked icon icon-checkbox"></span>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- <ul class="clearfix list3">
|
|
|
- <li class="clearfix" :class="{active:recommended==0}" @click="recommended=0">
|
|
|
- 基础版
|
|
|
- <span class="radio-checked icon icon-checkbox"></span>
|
|
|
- </li>
|
|
|
- <li class="clearfix" :class="{active:recommended==1}" @click="recommended=1">
|
|
|
- 稳定版
|
|
|
- <span class="radio-checked icon icon-checkbox"></span>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- <?php
|
|
|
- }
|
|
|
- ?> <ul class="clearfix list1">
|
|
|
- <li v-for="(v,k) in list" class="clearfix" :class="{active:k==active}" @click="active=k">
|
|
|
- <div class="fl left">
|
|
|
- <div class="text1">{{v.name}}</div>
|
|
|
- <div class="text2">{{fnote(v)}}</div>
|
|
|
- </div>
|
|
|
- <div class="fr right">{{v.price|pf}}<span>元</span></div>
|
|
|
- <span class="radio-checked icon icon-checkbox"></span>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
- </div>
|
|
|
- <div class="common">
|
|
|
- <div class="tit">数量</div>
|
|
|
- <ul class="clearfix list2">
|
|
|
- <li class="clearfix active" data-num="1">
|
|
|
- <span class="icon icon-radio fl"></span><span>1个</span>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
+ <?php
|
|
|
+ $this->header();
|
|
|
+ ?> <main v-cloak>
|
|
|
+ <div class="price-pay-wrap">
|
|
|
+ <div class="container">
|
|
|
+ <div class="price-pay">
|
|
|
+ <div class="crumbs">
|
|
|
+ <a href="###">我的应用</a><span>/</span>充值
|
|
|
</div>
|
|
|
- <div class="common">
|
|
|
- <div class="tit">选择支付方式</div>
|
|
|
- <ul class="clearfix list3" id="list3">
|
|
|
- <?php
|
|
|
- $_var_13 = json_decode(IN_PAY, true);
|
|
|
- $_var_14 = $_var_13[1];
|
|
|
- if (in_array(1, $_var_13)) {
|
|
|
- ?> <li class="clearfix" :class="{active:pay_type==1}" @click="pay_type=1">
|
|
|
- <img src="/static/index/image/pay-1.jpg" alt="">
|
|
|
- <span class="radio-checked icon icon-checkbox"></span>
|
|
|
- </li>
|
|
|
- <?php
|
|
|
- }
|
|
|
- ?> <?php
|
|
|
- if (in_array(2, $_var_13)) {
|
|
|
- ?> <li class="clearfix" :class="{active:pay_type==2}" @click="pay_type=2">
|
|
|
- <img src="/static/index/image/pay-2.jpg" alt="">
|
|
|
- <span class="radio-checked icon icon-checkbox"></span>
|
|
|
- </li>
|
|
|
- <?php
|
|
|
- }
|
|
|
- ?> <?php
|
|
|
- if (in_array(3, $_var_13)) {
|
|
|
- ?> <li class="clearfix" :class="{active:pay_type==3}" @click="pay_type=3">
|
|
|
- <img src="/static/index/image/pay-3.jpg" alt="">
|
|
|
+ <div class="con">
|
|
|
+ <div class="common">
|
|
|
+ <div class="tit" style="padding-top: 20px; border: none">选择充值内容</div>
|
|
|
+ <!-- <pre>
|
|
|
+ <?php var_dump($_var_5);var_dump($_var_6);var_dump($_var_8) ?>
|
|
|
+ </pre> -->
|
|
|
+ <?php
|
|
|
+ if ($_var_5 != 3) {
|
|
|
+ ?> <ul class="clearfix list3 1" style="padding-top: 10px;">
|
|
|
+ <?php
|
|
|
+ // var_dump($_var_10);
|
|
|
+ foreach ($_var_10 as $_var_11 => $_var_12) {
|
|
|
+ if ($_var_11 < 3 || IN_SUPER && ($_var_11 == 4 || IN_SUPER_PRV && $_var_11 == 5)) {
|
|
|
+ ?> <li class="clearfix" :class="{active:type==<?php echo $_var_11; ?>}" @click="type=<?php echo $_var_11; ?>">
|
|
|
+ <div class="price-type">
|
|
|
+ <img style="margin-bottom: 10px;" src="/images/icon/<?php echo $_var_imgs[$_var_11]?>.svg" alt="">
|
|
|
+ <br>
|
|
|
+ <div class="price-type"><?php echo $_var_12; ?></div>
|
|
|
+ </div>
|
|
|
+ <span class="radio-checked icon icon-checkbox"></span>
|
|
|
+ </li>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ?> </ul>
|
|
|
+ <?php
|
|
|
+ } elseif ($_var_6 && $_var_8) {
|
|
|
+ ?> <ul class="clearfix list3 2" style="padding-top: 10px;">
|
|
|
+ <li class="clearfix <?php echo $_var_5 == 3 ? "active" : ""; ?>" style="padding-right: 15px">
|
|
|
+ <img src="/data/image/app/<?php echo $_var_8["in_icon"]; ?>" width="35" height="35" onerror="javascript:this.src='/static/index/image/iOS.png'" style="margin-right: 15px" />
|
|
|
+ <?php echo $_var_8["in_name"]; ?> <span class="radio-checked icon icon-checkbox"></span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <ul class="clearfix list3">
|
|
|
+ <li class="clearfix" :class="{active:recommended==0}" @click="recommended=0">
|
|
|
+ 基础版
|
|
|
+ <span class="radio-checked icon icon-checkbox"></span>
|
|
|
+ </li>
|
|
|
+ <li class="clearfix" :class="{active:recommended==1}" @click="recommended=1">
|
|
|
+ 稳定版
|
|
|
+ <span class="radio-checked icon icon-checkbox"></span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?>
|
|
|
+ <div class="tit" style="border: none;padding-bottom: 10px">选择数量</div>
|
|
|
+ <ul class="clearfix list1">
|
|
|
+ <li v-for="(v,k) in list" class="clearfix" :class="{active:k==active}" @click="active=k">
|
|
|
+ <div class="fl left">
|
|
|
+ <div class="text1">{{v.name}}</div>
|
|
|
+ <div class="text2">{{fnote(v)}}</div>
|
|
|
+ </div>
|
|
|
+ <div class="fr right">{{v.price|pf}}<span>元</span></div>
|
|
|
<span class="radio-checked icon icon-checkbox"></span>
|
|
|
</li>
|
|
|
- <?php
|
|
|
- }
|
|
|
- ?> <?php
|
|
|
- if (in_array(4, $_var_13)) {
|
|
|
- ?> <li class="clearfix" :class="{active:pay_type==4}" @click="pay_type=4">
|
|
|
- <img src="/static/index/image/pay-4.jpg" alt="">
|
|
|
- <span class="radio-checked icon icon-checkbox"></span>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <!-- <div class="common">
|
|
|
+ <div class="tit">数量</div>
|
|
|
+ <ul class="clearfix list2">
|
|
|
+ <li class="clearfix active" data-num="1">
|
|
|
+ <span class="icon icon-radio fl"></span><span>1个</span>
|
|
|
</li>
|
|
|
- <?php
|
|
|
- }
|
|
|
- ?> <?php
|
|
|
- if (in_array(5, $_var_13)) {
|
|
|
- ?> <li class="clearfix" :class="{active:pay_type==5}" @click="pay_type=5">
|
|
|
- <img src="/static/index/image/pay-5.jpg" alt="">
|
|
|
+ </ul>
|
|
|
+ </div> -->
|
|
|
+ <div class="common">
|
|
|
+ <div class="tit" style="border: none;padding-bottom: 10px">选择支付方式</div>
|
|
|
+ <ul class="clearfix list3" id="list3">
|
|
|
+ <li class="clearfix" style="width: 270px;height: 88px" :class="{active:pay_type==2}" @click="pay_type=2">
|
|
|
+ <img src="/images/icon/weixipay.svg" alt="">
|
|
|
<span class="radio-checked icon icon-checkbox"></span>
|
|
|
</li>
|
|
|
- <?php
|
|
|
- }
|
|
|
- ?> <?php
|
|
|
- if (in_array(7, $_var_13)) {
|
|
|
- ?> <li class="clearfix" :class="{active:pay_type==7}" @click="pay_type=7">
|
|
|
- <img src="/static/index/image/pay-7.jpg" alt="">
|
|
|
+ <li class="clearfix" style="width: 270px;height: 88px" :class="{active:pay_type==1}" @click="pay_type=1">
|
|
|
+ <img src="/images/icon/zfb.svg" alt="">
|
|
|
<span class="radio-checked icon icon-checkbox"></span>
|
|
|
</li>
|
|
|
- <?php
|
|
|
- }
|
|
|
- ?> <?php
|
|
|
- if (in_array(6, $_var_13)) {
|
|
|
- ?> <li v-if="type>0" class="clearfix" :class="{active:pay_type==6}" @click="pay_type=6">
|
|
|
- 余额支付
|
|
|
+ <li v-if="type>0" style="width: 270px;height: 88px" class="clearfix" :class="{active:pay_type==6}" @click="pay_type=6">
|
|
|
+ <img src="/images/icon/yuepay.svg" alt="">
|
|
|
<span class="radio-checked icon icon-checkbox"></span>
|
|
|
</li>
|
|
|
- <?php
|
|
|
- }
|
|
|
- ?> </ul>
|
|
|
- </div>
|
|
|
- <div class="pay-money">
|
|
|
- <div class="money">应支付<span>¥{{pay_money}}</span></div>
|
|
|
- <a href="javascript:;" class="ms-btn-primary ms-btn toPay" @click="action()">去支付</a>
|
|
|
+ </ul>
|
|
|
+ <!-- <ul class="clearfix list3" id="list3">
|
|
|
+ <?php
|
|
|
+ $_var_13 = json_decode(IN_PAY, true);
|
|
|
+ $_var_14 = $_var_13[1];
|
|
|
+ var_dump($_var_13);
|
|
|
+ if (in_array(1, $_var_13)) {
|
|
|
+ ?> <li class="clearfix" :class="{active:pay_type==1}" @click="pay_type=1">
|
|
|
+ <img src="/static/index/image/pay-1.jpg" alt="">
|
|
|
+ <span class="radio-checked icon icon-checkbox"></span>
|
|
|
+ </li>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?> <?php
|
|
|
+ if (in_array(2, $_var_13)) {
|
|
|
+ ?> <li class="clearfix" :class="{active:pay_type==2}" @click="pay_type=2">
|
|
|
+ <img src="/static/index/image/pay-2.jpg" alt="">
|
|
|
+ <span class="radio-checked icon icon-checkbox"></span>
|
|
|
+ </li>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?> <?php
|
|
|
+ if (in_array(3, $_var_13)) {
|
|
|
+ ?> <li class="clearfix" :class="{active:pay_type==3}" @click="pay_type=3">
|
|
|
+ <img src="/static/index/image/pay-3.jpg" alt="">
|
|
|
+ <span class="radio-checked icon icon-checkbox"></span>
|
|
|
+ </li>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?> <?php
|
|
|
+ if (in_array(4, $_var_13)) {
|
|
|
+ ?> <li class="clearfix" :class="{active:pay_type==4}" @click="pay_type=4">
|
|
|
+ <img src="/static/index/image/pay-4.jpg" alt="">
|
|
|
+ <span class="radio-checked icon icon-checkbox"></span>
|
|
|
+ </li>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?> <?php
|
|
|
+ if (in_array(5, $_var_13)) {
|
|
|
+ ?> <li class="clearfix" :class="{active:pay_type==5}" @click="pay_type=5">
|
|
|
+ <img src="/static/index/image/pay-5.jpg" alt="">
|
|
|
+ <span class="radio-checked icon icon-checkbox"></span>
|
|
|
+ </li>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?> <?php
|
|
|
+ if (in_array(7, $_var_13)) {
|
|
|
+ ?> <li class="clearfix" :class="{active:pay_type==7}" @click="pay_type=7">
|
|
|
+ <img src="/static/index/image/pay-7.jpg" alt="">
|
|
|
+ <span class="radio-checked icon icon-checkbox"></span>
|
|
|
+ </li>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?> <?php
|
|
|
+ if (in_array(6, $_var_13)) {
|
|
|
+ ?> <li v-if="type>0" class="clearfix" :class="{active:pay_type==6}" @click="pay_type=6">
|
|
|
+ 余额支付
|
|
|
+ <span class="radio-checked icon icon-checkbox"></span>
|
|
|
+ </li>
|
|
|
+ <?php
|
|
|
+ }
|
|
|
+ ?> </ul> -->
|
|
|
+ </div>
|
|
|
+ <div class="pay-money">
|
|
|
+ <div class="money"><span style="font-size: 14px;font-weight:500;color:#000000;">应支付</span><span>¥{{pay_money}}</span></div>
|
|
|
+ <a href="javascript:;" class="ms-btn-primary ms-btn toPay price-btn" @click="action()">去支付</a>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
- <div class="modal fade ms-modal" id="myModalPay" tabindex="-1" role="dialog">
|
|
|
- <div class="modal-dialog" role="document">
|
|
|
- <div class="modal-content">
|
|
|
- <div class="modal-header">
|
|
|
- <h4 class="modal-title">购买</h4>
|
|
|
- </div>
|
|
|
- <div class="modal-body">
|
|
|
- <div class="font18 color-333">
|
|
|
- 是否完成了购买?
|
|
|
+ <div class="modal fade ms-modal" id="myModalPay" tabindex="-1" role="dialog">
|
|
|
+ <div class="modal-dialog" role="document">
|
|
|
+ <div class="modal-content">
|
|
|
+ <div class="modal-header">
|
|
|
+ <h4 class="modal-title">购买</h4>
|
|
|
+ </div>
|
|
|
+ <div class="modal-body">
|
|
|
+ <div class="font18 color-333">
|
|
|
+ 是否完成了购买?
|
|
|
+ </div>
|
|
|
+ <p class="mt15">
|
|
|
+ 请在新打开的页面中完成购买,购买完成后,请根据购买结果点击下面的按钮
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <div class="modal-footer">
|
|
|
+ <input type="hidden" name="order_sn" value="">
|
|
|
+ <button type="button" class="ms-btn ms-btn-primary complete-pay">支付成功</button>
|
|
|
+ <button type="button" class="ms-btn ms-btn-default fail-pay" data-dismiss="modal">支付遇到问题
|
|
|
+ </button>
|
|
|
</div>
|
|
|
- <p class="mt15">
|
|
|
- 请在新打开的页面中完成购买,购买完成后,请根据购买结果点击下面的按钮
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- <div class="modal-footer">
|
|
|
- <input type="hidden" name="order_sn" value="">
|
|
|
- <button type="button" class="ms-btn ms-btn-primary complete-pay">支付成功</button>
|
|
|
- <button type="button" class="ms-btn ms-btn-default fail-pay" data-dismiss="modal">支付遇到问题
|
|
|
- </button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- </main>
|
|
|
- <script src="/static/index/js/vue.js"></script>
|
|
|
- <script>
|
|
|
-
|
|
|
- var app = new Vue({
|
|
|
- el: 'main',
|
|
|
- data: {
|
|
|
- type: '<?php echo $_var_5;?>',
|
|
|
- gid: '<?php echo $_var_6;?>',
|
|
|
- recommended: 0,
|
|
|
- list: [],
|
|
|
- active: 0,
|
|
|
- pay_type: '<?php echo $_var_14;?>'
|
|
|
- },
|
|
|
- computed: {
|
|
|
- pay_money: function () {
|
|
|
- return this.list[this.active] ? this.list[this.active].price : 0;
|
|
|
- }
|
|
|
- },
|
|
|
- filters: {
|
|
|
- pf: function (v) {
|
|
|
- return parseFloat(v)
|
|
|
- },
|
|
|
- },
|
|
|
- methods: {
|
|
|
- fnote: function (v) {
|
|
|
- return v.note || (v.number + ['元', '个', '年', '月', '台', '台'][v.type]);
|
|
|
+ </main>
|
|
|
+ <script src="/static/index/js/vue.js"></script>
|
|
|
+ <script>
|
|
|
+ var app = new Vue({
|
|
|
+ el: 'main',
|
|
|
+ data: {
|
|
|
+ type: '<?php echo $_var_5; ?>',
|
|
|
+ gid: '<?php echo $_var_6; ?>',
|
|
|
+ recommended: 0,
|
|
|
+ list: [],
|
|
|
+ active: 0,
|
|
|
+ pay_type: '<?php echo $_var_14; ?>'
|
|
|
},
|
|
|
- action: function () {
|
|
|
- var discount_id = this.list[this.active].id;
|
|
|
- if (!discount_id) {
|
|
|
- alert('请选择需要购买的套餐');
|
|
|
- return;
|
|
|
- }
|
|
|
- var pay_type = this.pay_type;
|
|
|
- if (!pay_type) {
|
|
|
- return alert('请选择支付渠道');
|
|
|
+ computed: {
|
|
|
+ pay_money: function() {
|
|
|
+ return this.list[this.active] ? this.list[this.active].price : 0;
|
|
|
}
|
|
|
- var type = this.type;
|
|
|
- var sign_id = this.gid;
|
|
|
- if (type == '3' && !sign_id) {
|
|
|
- return alert('没有可用的APP,请先上传IPA包');
|
|
|
- }
|
|
|
- $.post('/index/ajax_profile/pay', {
|
|
|
- discount_id,
|
|
|
- sign_id,
|
|
|
- pay_type,
|
|
|
- }, function (result) {
|
|
|
- $(".pay-money a:last").removeClass("disabled");
|
|
|
- $(".pay-money a:last").addClass("toPay");
|
|
|
- if (result.code != 200) {
|
|
|
- if (result.code == -10001) {
|
|
|
- alert(result.msg, function () {
|
|
|
- window.location.href = '/index/login';
|
|
|
- });
|
|
|
- } else {
|
|
|
- alert(result.msg);
|
|
|
- }
|
|
|
+ },
|
|
|
+ filters: {
|
|
|
+ pf: function(v) {
|
|
|
+ return parseFloat(v)
|
|
|
+ },
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ fnote: function(v) {
|
|
|
+ return v.note || (v.number + ['元', '个', '年', '月', '台', '台'][v.type]);
|
|
|
+ },
|
|
|
+ action: function() {
|
|
|
+ var discount_id = this.list[this.active].id;
|
|
|
+ if (!discount_id) {
|
|
|
+ alert('请选择需要购买的套餐');
|
|
|
return;
|
|
|
}
|
|
|
- if (result.msg) {
|
|
|
- alert(result.msg, function () {
|
|
|
- Do_submit(result);
|
|
|
- });
|
|
|
- } else {
|
|
|
- Do_submit(result);
|
|
|
+ var pay_type = this.pay_type;
|
|
|
+ if (!pay_type) {
|
|
|
+ return alert('请选择支付渠道');
|
|
|
}
|
|
|
-
|
|
|
- function Do_submit(result) {
|
|
|
- // $('#myModalPay').modal('show');
|
|
|
- // $('#myModalPay').find('input[name="order_sn"]').val(result.data.trade_id);
|
|
|
- form = $("<form></form>");
|
|
|
- form.attr('action', '/index/to_pay');
|
|
|
- form.attr('method', 'get');
|
|
|
- form.append($("<input type='hidden' name='trade_id' value='" + result.data.trade_id + "'/>"));
|
|
|
- form.append($("<input type='hidden' name='pay_type' value='" + result.data.pay_type + "' />"));
|
|
|
- form.appendTo("body");
|
|
|
- form.submit();
|
|
|
+ var type = this.type;
|
|
|
+ var sign_id = this.gid;
|
|
|
+ if (type == '3' && !sign_id) {
|
|
|
+ return alert('没有可用的APP,请先上传IPA包');
|
|
|
}
|
|
|
- }, 'json');
|
|
|
+ $.post('/index/ajax_profile/pay', {
|
|
|
+ discount_id,
|
|
|
+ sign_id,
|
|
|
+ pay_type,
|
|
|
+ }, function(result) {
|
|
|
+ $(".pay-money a:last").removeClass("disabled");
|
|
|
+ $(".pay-money a:last").addClass("toPay");
|
|
|
+ if (result.code != 200) {
|
|
|
+ if (result.code == -10001) {
|
|
|
+ alert(result.msg, function() {
|
|
|
+ window.location.href = '/index/login';
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ alert(result.msg);
|
|
|
+ }
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (result.msg) {
|
|
|
+ alert(result.msg, function() {
|
|
|
+ Do_submit(result);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ Do_submit(result);
|
|
|
+ }
|
|
|
+
|
|
|
+ function Do_submit(result) {
|
|
|
+ // $('#myModalPay').modal('show');
|
|
|
+ // $('#myModalPay').find('input[name="order_sn"]').val(result.data.trade_id);
|
|
|
+ form = $("<form></form>");
|
|
|
+ form.attr('action', '/index/to_pay');
|
|
|
+ form.attr('method', 'get');
|
|
|
+ form.append($("<input type='hidden' name='trade_id' value='" + result.data.trade_id + "'/>"));
|
|
|
+ form.append($("<input type='hidden' name='pay_type' value='" + result.data.pay_type + "' />"));
|
|
|
+ form.appendTo("body");
|
|
|
+ form.submit();
|
|
|
+ }
|
|
|
+ }, 'json');
|
|
|
+ },
|
|
|
+ getList: function() {
|
|
|
+ app = this;
|
|
|
+ $.get('/index/item_price/getlist', {
|
|
|
+ type: this.type,
|
|
|
+ gid: this.gid,
|
|
|
+ recommended: this.recommended
|
|
|
+ }, function(ret) {
|
|
|
+ if (ret.data) {
|
|
|
+ app.list = ret.data.list;
|
|
|
+ }
|
|
|
+ }, 'json')
|
|
|
+ }
|
|
|
},
|
|
|
- getList: function () {
|
|
|
- app = this;
|
|
|
- $.get('/index/item_price/getlist', {
|
|
|
- type: this.type,
|
|
|
- gid: this.gid,
|
|
|
- recommended: this.recommended
|
|
|
- }, function (ret) {
|
|
|
- if (ret.data) {
|
|
|
- app.list = ret.data.list;
|
|
|
- }
|
|
|
- }, 'json')
|
|
|
- }
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.getList();
|
|
|
- });
|
|
|
- },
|
|
|
- watch: {
|
|
|
- recommended: function () {
|
|
|
- this.active = 0;
|
|
|
- this.getList();
|
|
|
+ mounted() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
},
|
|
|
- type: function () {
|
|
|
- this.active = 0;
|
|
|
- this.getList();
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- var user_money = parseFloat("0.00");
|
|
|
- </script>
|
|
|
- <?php
|
|
|
- $this->footer();
|
|
|
- ?> <script>
|
|
|
- var ump_notify = '<?php echo $_var_7;?>';
|
|
|
- if (ump_notify) {
|
|
|
- alert(ump_notify == 'error' ? '支付失败' : '支付成功', function () {
|
|
|
- if (ump_notify == 'success') {
|
|
|
- location.href = '/index/user_order';
|
|
|
+ watch: {
|
|
|
+ recommended: function() {
|
|
|
+ this.active = 0;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ type: function() {
|
|
|
+ this.active = 0;
|
|
|
+ this.getList();
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
- }
|
|
|
- </script>
|
|
|
+ var user_money = parseFloat("0.00");
|
|
|
+ </script>
|
|
|
+ <?php
|
|
|
+ $this->footer();
|
|
|
+ ?> <script>
|
|
|
+ var ump_notify = '<?php echo $_var_7; ?>';
|
|
|
+ if (ump_notify) {
|
|
|
+ alert(ump_notify == 'error' ? '支付失败' : '支付成功', function() {
|
|
|
+ if (ump_notify == 'success') {
|
|
|
+ location.href = '/index/user_order';
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ </script>
|
|
|
</body>
|
|
|
+
|
|
|
</html>
|
|
|
- <?php
|
|
|
- }
|
|
|
-}
|
|
|
+<?php
|
|
|
+ }
|
|
|
+}
|