Commit b688d37a authored by IvyXia123's avatar IvyXia123

导航

parent 2ff7e558
......@@ -69,19 +69,6 @@
</div>
</div>
</div>
<!-- 支付方式选择 -->
<!--<div class="pay-list">
<div class="pay-choice">支付方式选择</div>
<ul class="pay">
<li v-for="item in payList" :key="item.value" @click="payListClick(item.value)">
<img :src="item.icon" alt="">
<span>{{ item.title }}</span>
<div class="icon-re">
<img :src="payIndex === item.value ? icon_re_acitve : iconRe" alt="">
</div>
</li>
</ul>
</div>-->
<footer>
<div class="sub-block">
......@@ -90,10 +77,7 @@
class="tips-price"
v-if="groupDetail.goods_desc"
>{{groupDetail.goods_desc.tips?groupDetail.goods_desc.tips:''}}</span>
<div class="pay-btn" @click="payOrder(orderFlag)"
v-clipboard:copy="payIndex !== 0 ? payUrl : ''"
v-clipboard:success="copy"
v-clipboard:error="onError">提交订单</div>
<div class="pay-btn" @click="payOrder(orderFlag)">提交订单</div>
</div>
</footer>
<transition name="slide-fade">
......@@ -136,8 +120,7 @@ import {
getwechatParam,
getStatusWechatApi,
getCouponListApi,
getCourseInfoApi,
postPayBillApi
getCourseInfoApi
} from "../../service/api";
import addAddress from "./address";
import loginPage from "./login";
......@@ -245,20 +228,6 @@ export default {
}
},
methods: {
copy(e) {
if(this.payIndex === 1) {
Toast("支付宝支付获取成功,请把粘贴到支付宝里");
}
},
onError() {
if(this.payIndex === 1) {
Toast("支付宝支付获取成功,请把粘贴到支付宝里");
}
},
// 支付方式
payListClick(val) {
this.payIndex = val
},
recursion() {
getCourseInfoApi().then(res => {
if(res.status){
......@@ -374,57 +343,7 @@ export default {
json.group_order_id = this.$route.query.group_order_id;
}
this.orderFlag = false;
/* let payTypeArr = ['WX', 'ALI', '卡分期']
let data = { pay_type: payTypeArr[this.payIndex], return_url: window.location.href, goods_id: json.goods_id, buy_type: this.groupDetail.goods_type, group_order_id: json.group_order_id, order_coupon_id:json.order_coupon_id }
postPayBillApi(data).then(res => {
if(this.payIndex === 0) {
this.orderNo = res.out_trade_no;
if (res.out_trade_no && !res.appId) {
getCourseInfoApi().then(res => {
this.userCourse = res;
localStorage.setItem(
"userCourse",
JSON.stringify(this.userCourse)
);
this.navPage(res);
});
} else {
let that = this;
this.orderNo = res.out_trade_no;
this.jsApiParameters = res;
wx.miniProgram.getEnv(function(res) {
if (res.miniprogram) {
let payParam = encodeURIComponent(JSON.stringify(json));
wx.miniProgram.navigateTo({
url: `pages/wxPay/main?payParam=${payParam}`
});
} else if (typeof WeixinJSBridge === "undefined") {
if (document.addEventListener) {
document.addEventListener(
"WeixinJSBridgeReady",
that.jsApiCall,
false
);
} else if (document.attachEvent) {
document.attachEvent("WeixinJSBridgeReady", that.jsApiCall);
document.attachEvent(
"onWeixinJSBridgeReady",
that.jsApiCall
);
}
} else {
that.jsApiCall();
}
});
}
}else if(this.payIndex === 1){
this.payUrl = res.pay_url;
}
})
return false*/
payApi(json)
.then(res => {
payApi(json).then(res => {
this.orderNo = res.out_trade_no;
if (res.out_trade_no && !res.appId) {
getCourseInfoApi().then(res => {
......
......@@ -6,13 +6,7 @@
@select="onSelect"
/>
<div class="unit-block">
<div class="course_title" @click="actionsheetShow=true">{{secActions.name}} <i class="iconfont icon-below-s"></i>
<!--<router-link :to="{path: '/promptTime', query: { periods_id: secActions.id }}">
<div class="zhongbian-kuang">
<img class="zhongbian" :src="zhong" alt="">
</div>
</router-link>-->
</div>
<div class="course_title" @click="actionsheetShow=true">{{secActions.name}} <i class="iconfont icon-below-s"></i></div>
<!--竖屏 主题栏-->
<swiper :options="swiperOption" class="banner" v-if="shopType==0&&unitList.length>0" ref="mySwiper">
<swiper-slide v-for="(data,index) in unitList" :key="index">
......@@ -185,7 +179,7 @@
</div>
</div>
</van-popup>
<bottom-tab></bottom-tab>
</div>
</template>
......@@ -203,7 +197,6 @@
import nextUnitUrl from '../../assets/newLesson/nextUnit.png'
import btn_kechegn from '../../assets/btn_kechegn.png'
import zhong from '../../assets/evaluate/timer.png'
import promptTime from './promptTime'
export default {
name: "mapDefault",
......@@ -211,8 +204,7 @@
swiper,
swiperSlide,
bottomTab,
[Actionsheet.name]:Actionsheet,
promptTime
[Actionsheet.name]:Actionsheet
},
data() {
let that = this;
......@@ -234,7 +226,7 @@
push_time:'',
course_name:'',
nextUnitUrl:nextUnitUrl,
periods_id: this.$route.query.periods_id,
// periods_id:this.$route.query.periods_id,
parent_category_id:this.$route.query.parent_category_id,
unitList:[],
more:false,
......@@ -291,7 +283,6 @@
}
},
created(){
console.log(this.periods_id, 77777)
this.initPage();
},
filters:{
......@@ -756,6 +747,9 @@
}
}
},
timerClick() {
alert(999)
}
}
}
</script>
......@@ -876,8 +870,8 @@
.zhongbian {
width: 22 * @toVw;
height: 22 * @toVw;
margin-top: 15 * @toVw;
margin-left: 34 * @toVh;
margin-top: 24 * @toVw;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment