Commit d06edf78 by 冷斌

Merge remote-tracking branch 'origin/master'

parents ad488e7f f3c708db
......@@ -899,4 +899,39 @@ div::-webkit-scrollbar {
/* Goods Detail */
.goods_detail_top {
}
/* 真题 */
.zhenti_my_collect_list_container {
position: relative;
box-sizing: border-box;
padding-top: 2.25rem;
}
.zhenti_tab {
position: fixed !important;
top: 2.75rem;
width: 100%;
height: 2.25rem;
}
.zhenti_tab_normal {
font-size:14px;
font-weight:600;
color:rgba(51,51,51,1);
}
.zhenti_tab_selected {
font-size:14px;
font-weight:600;
color:rgba(101,192,0,1);
}
.zhenti_my_collect_cell {
padding: 0.75rem;
margin-bottom: 0.5rem;
}
.zhenti_my_collect_cell_time {
margin-top: 0.75rem;
}
\ No newline at end of file
......@@ -180,7 +180,6 @@
<div @click="onHotKeyword('{$vo.video_title|mStr=10}')" class="search_flex_item layout_center">
<span class="text_14_400 color_999999">{$vo.video_title|mStr=10}</span>
</div>
<!-- <li><a <eq name="vo.type" value="1">href="{:U('course/Video/view',array('id'=>$vo['id']))}"<else/>href="{:U('live/Index/view',array('id'=>$vo['id']))}"</eq>>{$vo.video_title|mStr=10}</a></li> -->
</volist>
</div>
</div>
......
......@@ -139,7 +139,9 @@
<van-tabbar-item>
<span class="text_10_400">真题题库</span>
<template #icon="props">
<img :src="props.active ? '__THEME__/img/zhenti.png' : '__THEME__/img/zhenti_s.png'" />
<a href="{:U('home/Home/exams')}">
<img :src="props.active ? '__THEME__/img/zhenti.png' : '__THEME__/img/zhenti_s.png'" />
</a>
</template>
</van-tabbar-item>
<van-tabbar-item>
......
......@@ -103,7 +103,9 @@
<van-tabbar-item>
<span class="text_10_400">真题题库</span>
<template #icon="props">
<img :src="props.active ? '__THEME__/img/zhenti.png' : '__THEME__/img/zhenti_s.png'" />
<a href="{:U('home/Home/exams')}">
<img :src="props.active ? '__THEME__/img/zhenti.png' : '__THEME__/img/zhenti_s.png'" />
</a>
</template>
</van-tabbar-item>
<van-tabbar-item>
......
......@@ -423,7 +423,7 @@ class GoodsAction extends Action
$this->assign('sple_score', $sple_score);
$this->assign('split_score_pro', $split_score['sple_score']);
$this->assign($data);
$this->assign('data', $data);
$this->assign('address', $address);
$this->assign('address_list', $address_list);
$this->assign('credit', (int)$credit['score']);
......
......@@ -35,6 +35,45 @@
finished-text="没有更多了"
@load="onLoad">
<template v-if="tab == 0">
<div @click="onItem(item)" v-for="(item, idx) in options[0].items" :key="idx" class="home_class_item layout_v">
<div class="layout_h">
<van-image
style="margin-right: 0.75rem;"
height="72"
width="128"
fit="cover"
:src="item.cover">
</van-image>
<div class="weight_full layout_v">
<span class="text_14_600 color_333333 van-multi-ellipsis--l2">{{item.title}}</span>
<span class="text_14_600 color_FF3B3B" style="margin-top: 0.5rem;">{{item.price}}</span>
<span class="text_12_400 color_999999">{{item.count}}人正在学习</span>
</div>
</div>
</div>
</template>
<template v-if="tab == 1">
<div v-for="(item, idx) in options[1].items" :key="idx" class="layout_v home_question_item">
<div v-if="item.price == 0" class="layout_h">
<div class="home_item_mark_green layout_center">免费</div>
<span class="text_14_600 color_333333 weight_full van-multi-ellipsis--l2" style="margin-right: 1.5rem;margin-left: 0.625rem;">{{item.title}}</span>
<div @click="onItem(item)" class="home_button_green layout_center">开始做题</div>
</div>
<div v-else class="layout_h">
<div class="home_item_mark_orange layout_center">付费</div>
<span class="text_14_600 color_333333 weight_full van-multi-ellipsis--l2" style="margin-right: 1.5rem;margin-left: 0.625rem;">{{item.title}}</span>
<div @click="onItem(item)" class="home_button_orange layout_center">¥{{item.price}}</div>
</div>
<div class="layout_h_b" style="margin-top: 0.5rem;">
<span class="text_14_600 color_FF3B3B">¥{{item.price}}</span>
<van-image src="__THEME__/img/down_load_icon.png" width="13" height="16" ></van-image>
</div>
<div class="home_divider divider"></div>
</div>
</template>
<template v-if="tab == 2">
<div @click="onItem(item)" v-for="(item, idx) in options[2].items" :key="idx" class="home_item_goods layout_h">
<van-image
......@@ -181,6 +220,11 @@
if(this.tab == 2) {
let url = "{:U('mall/Goods/view')}"
window.location.href = url.replace(/\[.*?\]/g, item.uid)
} else if(this.tab == 0) {
let url = "{:U('course/Video/view')}"
window.location.href = url.replace(/\[.*?\]/g, item.id)
} else {
}
},
onTab: function(idx) {
......@@ -206,7 +250,6 @@
success: function (data) {
that.loading = false
let res = data
let opt = that.options[2]
opt.items = opt.items.concat(res.data.map( r => { return {
uid: r.uid,
title: r.title,
......@@ -219,11 +262,57 @@
}
})
} else if(that.tab == 1) {
$.ajax({
type: "GET",
url: "{:U('exams/Index/paper')}" + "&api=1",
dataType: "json",
success: function(data) {
that.loading = false
let res = data
let opt = that.options[1]
if(res.status == 1) {
let result = res.data
let array = result.data.length > 0 ? result.data : []
opt.items = array.map( r => {
return {
id: r.exams_paper_id,
title: r.exams_paper_title,
price: r.price
}
})
opt.page = result.nowPage
opt.finished = result.nowPage >= result.totalPages
that.finished = result.nowPage >= result.totalPages
}
}
})
} else {
let on = "{$marketConf['order_switch']}" == 1
$.ajax({
type: "GET",
url: "{:U('course/Video/index')}" + "?api=1",
dataType: "json",
success: function(data) {
that.loading = false
let res = data
let array = res.data.length > 0 ? res.data : []
opt.items = array.map( r => {
let pi = r.mz_price
return {
id: r.id,
title: r.video_title,
cover: r.image_url,
price: pi.price == 0 ? '免费' : ('¥' + pi.price),
count: on ? r.video_order_count_mark : r.video_order_count
}
})
opt.page = res.nowPage
opt.finished = res.nowPage >= res.totalPages
that.finished = res.nowPage >= res.totalPages
}
})
}
}
},
}
})
......
......@@ -6,7 +6,7 @@
</style>
<div id="app">
<div class="layout_v">
<div class="layout_v" style="padding-bottom: 5rem;">
<div class="goods_detail_top layout_v">
<van-image width="100%" height="160" :src="info.cover" ></van-image>
<span class="text_18_600 color_333333" style="margin: 0.75rem;margin-bottom: 0;">{{info.title}}</span>
......@@ -27,21 +27,20 @@
<div class="weight_full layout_h_r">
<div @click="onBuy" class="vip_buy_pay_button layout_center"><span class="text_14_400 color_white">立即购买</span></div>
<span style="margin-right: 0.75rem;" class="text_12_400 color_999999 self_center">0</span>
<span style="margin-right: 0.75rem;" class="text_12_400 color_999999 self_center">{{info.num}}人已购买</span>
</div>
</div>
</div>
<script>
let uid = '{$uid}'
new Vue({
el: "#app",
created:function(){
this.info = {:json_encode($data)};
this.order = {:json_encode($goodsOrder)};
console.log(this.info)
console.log(this.order)
},
data: function() {
......@@ -53,8 +52,32 @@
methods: {
onBuy: function() {
}
if(uid<=0) {
ui.confirm('请先登录', {
yes: function () {
window.location.href = "{:U('basic/Passport/login')}"
}
})
} else {
$.ajax({
type: "POST",
url: "{:U('mall/Goods/getPayUrl')}",
data:{
count: 1,
goods_id: this.info.uid,
},
dataType:"json",
success:function(res){
var res = getResponseData(res);
if(res.status == 1){
window.location.href = res.data;
}else{
ui.error(res.message);
}
}
})
}
},
}
})
</script>
......
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