Commit 14e72d5f by 冷斌

Merge remote-tracking branch 'origin/master'

parents 43c92228 4b3f69b6
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -139,11 +139,21 @@ div::-webkit-scrollbar {
font-weight: 600;
}
.text_18_600 {
font-size: 1.125rem;
font-weight: 600;
}
.text_26_600 {
font-size: 1.625rem;
font-weight: 600;
}
.text_apple {
font-size: 1.25rem;
color: #007AFF;
}
.divider {
height: 0.0625rem;
background: #E6E6E6;
......@@ -298,6 +308,14 @@ div::-webkit-scrollbar {
color:rgba(255,255,255,1);
}
.confirm_button:hover {
background: rgba(163,228,96,0.5);
}
.confirm_button:focus {
background: rgba(163,228,96,0.5);
}
.confirm_button_disable {
box-sizing: border-box;
height:44px;
......@@ -316,12 +334,20 @@ div::-webkit-scrollbar {
color:rgba(255,255,255,1);
}
.confirm_button:hover {
background: rgba(163,228,96,0.5);
}
.confirm_button.focus {
background: rgba(163,228,96,0.5);
.item_green_button {
display: flex;
box-sizing: border-box;
flex-direction: column;
justify-content: center;
align-items: center;
height: 1.5rem;
flex-direction: row;
background: rgba(163,228,96,1);
border-radius: 0.75rem;
min-width: 3rem;
font-size: 0.75rem;
font-weight: 400;
color:rgba(255,255,255,1);
}
.tabs_container {
......@@ -355,6 +381,62 @@ div::-webkit-scrollbar {
color:rgba(101,192,0,1);
}
.popup_top_button {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
background:rgba(248,248,248,0.82);
border-radius:14px 14px 0px 0px;
margin-left: 0.625rem;
margin-right: 0.625rem;
margin-bottom: 0.0625rem;
height:3.5625rem;
}
.popup_bottom_button {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
background:rgba(248,248,248,0.82);
border-radius:0px 0px 14px 14px;
height:3.5625rem;
margin-left: 0.625rem;
margin-right: 0.625rem;
}
.popup_cancel {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
height:3.5rem;
background:rgba(255,255,255,1);
border-radius:0.875rem;
margin: 0.625rem;
}
.area_title_style {
width: 5.625rem;
flex-grow: 0 !important;
flex-basis: auto !important;
}
.area_value_style {
flex: 1;
display: flex;
flex-direction: row-reverse;
color: #969799;
}
.area_value_style_normal {
flex: 1;
display: flex;
flex-direction: row-reverse;
color: #323233;
}
/*
* Home
*/
......@@ -423,6 +505,11 @@ div::-webkit-scrollbar {
background: #F5A623;
}
.home_item_goods {
padding: 0.75rem;
box-sizing: border-box;
}
.home_button_green {
width:80px;
height:28px;
......
......@@ -17,7 +17,7 @@
<meta name="full-screen" content="yes">
<link href="__THEME__/image/favicon.ico?v={$site.sys_version}" type="image/x-icon" rel="shortcut icon">
<!-- 引入 Bootstrap -->
<link rel="stylesheet" type="text/css" href="__THEME__/icon/iconfont.css">
<!-- <link rel="stylesheet" type="text/css" href="__THEME__/icon/iconfont.css">
<link rel="stylesheet" type="text/css" href="__APP__/css/search_3g.css">
<style>
@font-face {font-family: 'iconfontNEW';src: url('__THEME__/icon/iconfontNEW.woff?v={$site.sys_version}');}
......@@ -26,9 +26,9 @@
<style media="screen">
</style>
<script src="__THEMEW3G__/js/jquery-1.8.3.min.js"></script>
<script src="__THEMEW3G__/js/search_media.js"></script>
<script src="__THEMEW3G__/js/search_media.js"></script> -->
<script src="__THEMEW3G__/js/jquery-1.8.3.min.js"></script>
<link href="__THEMEW3G__/css/common.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.6/lib/index.css" />
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
......@@ -121,12 +121,65 @@
</van-sticky>
<template v-if="showList(0)">
<div 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="https://img.yzcdn.cn/vant/cat.jpeg">
</van-image>
<div class="weight_full layout_v">
<span class="text_14_600 color_333333 van-multi-ellipsis--l2">H5互动广告邀请函</span>
<span class="text_14_600 color_FF3B3B" style="margin-top: 0.5rem;">¥565</span>
<span class="text_12_400 color_999999">112人正在学习</span>
</div>
</div>
</div>
</template>
<template v-if="showList(1)">
<div v-for="(item, idx) in options[1].items" :key="idx" class="layout_v home_question_item">
<div 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;">2020年国家公务员《行测》试卷(省级)-名师版</span>
<div class="home_button_green layout_center">开始做题</div>
</div>
<div class="layout_h_b" style="margin-top: 0.5rem;">
<span class="text_14_600 color_FF3B3B">¥0</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="showList(2)">
<div v-for="(item, idx) in options[2].items" :key="idx" class="home_item_goods layout_h">
<van-image
style="margin-right: 0.75rem;"
height="68"
width="128"
fit="cover"
src="https://img.yzcdn.cn/vant/cat.jpeg">
</van-image>
<div class="weight_full layout_v">
<span class="text_14_600 color_333333 van-multi-ellipsis--l2">[优惠大礼包]5年高考3年模拟理综全套</span>
<div class="layout_h_b" style="margin-top: 0.5rem;">
<span class="text_14_600 color_FF3B3B self_center">¥0</span>
<div class="item_green_button">购买</div>
</div>
</div>
</div>
</template>
<!-- 热门搜索 -->
<div v-if="showHistory" class="layout_v">
<span class="search_hot_title text_12_400 color_999999">历史搜索:</span>
<div class="layout_h_wrap search_hot_title_flow">
<volist name="video" id="vo">
<div @click="onHotKeyword({$vo.video_title|mStr=10})" class="search_flex_item layout_center">
<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> -->
......@@ -221,20 +274,33 @@
showHistory: true,
tab: 0,
options: [{
title: '视频'
title: '视频',
items: [1,2]
},{
title: '真题'
title: '真题',
items: [1,2]
},{
title: '实物'
title: '实物',
items: [1,2]
}]
}
},
computed: {
showList: function() {
let tab = this.tab
let showHot = this.showHistory
return function(idx) {
return (idx == tab) && !showHot
}
}
},
methods: {
onFocus: function() {
this.showHistory = true
},
onHotKeyword: function(keyword) {
onHotKeyword: function(key) {
this.keyword = key
this.onSearch()
},
onSearch: function() {
this.showHistory = false
......
......@@ -1692,26 +1692,26 @@ class UserAction extends CommonAction
//地区
// $cityIds = t($_POST['city_ids']);
// $cityIds = explode(',', $cityIds);
$this->assign('isAdmin', 1);
if ($_POST['city_ids_hidden']) {
@list($province, $city, $area) = array_filter(explode(',', $_POST['city_ids_hidden']));
//位置信息
$save['location'] = model('Area')->getAreaName($_POST['city_ids_hidden']);
} else {
$province = intval($_POST['province']);
$city = intval($_POST['city']);
$area = intval($_POST['area']);
//位置信息
$save['location'] = model('Area')->getAreaName([$province, $city, $area]);
}
// $this->assign('isAdmin', 1);
// if ($_POST['city_ids_hidden']) {
// @list($province, $city, $area) = array_filter(explode(',', $_POST['city_ids_hidden']));
// //位置信息
// $save['location'] = model('Area')->getAreaName($_POST['city_ids_hidden']);
// } else {
// $province = intval($_POST['province']);
// $city = intval($_POST['city']);
// $area = intval($_POST['area']);
// //位置信息
// $save['location'] = model('Area')->getAreaName([$province, $city, $area]);
// }
if (!$province || !$city) {
$this->error('请选择完整地区');
}
// if (!$province || !$city) {
// $this->error('请选择完整地区');
// }
$save['province'] = $province;
$save['city'] = $city;
$save['area'] = $area;
// $save['province'] = $province;
// $save['city'] = $city;
// $save['area'] = $area;
//昵称
$user = $this->get('user');
......
<include file="__THEME__/public_header_w3g"/>
<script type="text/javascript" src="__THEME__/js/Area.js"></script>
<link rel="stylesheet" href="__APP__/css/address_w3g.css">
<!--<div class="header2">
<a href="{:U('home/UserShow/index',array('uid'=>$_SESSION['mid']))}" class="icon-back"></a>
<div>管理收货地址</div>
</div>-->
<div class="body">
<div class="covers"></div>
<if condition="($data['usedCounts'] lt 10) OR ($_GET['id'] gt 0)">
<div id="app" class="body">
<div class="layout_v">
<van-cell-group>
<van-field v-model="name" label="收货人" placeholder="收货人" input-align="right" ></van-field>
<van-field v-model="phone" label="联系方式" type="digit" input-align="right" placeholder="请输入联系电话" ></van-field>
<van-cell @click="onArea" title-class="area_title_style" :value-class="areaStyle" title="所在地区" is-link :value="areaDisplay" ></van-cell>
<van-field
v-model="address"
rows="1"
autosize
label="详细地址"
type="textarea"
input-align="right"
placeholder="请输入详细地址"
></van-field>
<div @click="saveAddress" class="confirm_button" style="margin-top: 1rem;">
<span>保存</span>
</div>
</van-cell-group>
</div>
<van-popup v-model="showPicker" round position="bottom">
<van-area @confirm="onAreaConfirm" @cancel="showPicker = false" title="收货地址" :area-list="areaList" />
</van-popup>
<!-- <div id="provinceData" style="display: none;">
<volist name="area" id="arc" >
<input class="inp01" name="{$arc['area_id']}" type="hidden" value="{$arc.title}" >
</volist>
</div> -->
<!-- <div class="covers"></div> -->
<!-- <div class="header2">
<a <if condition="$_GET['param']"> href="{:U('mall/Goods/pay',['vst'=>$_GET['param']])}" <else/> href="{:U('home/User/index')}" </if>class="icon-back"></a>
<div>新增收货地址</div>
<if condition="($data['usedCounts'] lt 10) OR ($_GET['id'] gt 0)">
<a href="javascript:;" class="save" onclick="saveAddress()" >保存</a>
</if>
</div> -->
<!-- <if condition="($data['usedCounts'] lt 10) OR ($_GET['id'] gt 0)">
<form class="addressbox" id="addressbox" method="POST" action="" onsubmit="return false;">
<div class="content">
<div class="header2">
<a <if condition="$_GET['param']"> href="{:U('mall/Goods/pay',['vst'=>$_GET['param']])}" <else/> href="{:U('home/User/index')}" </if>class="icon-back"></a>
<div>新增收货地址</div>
<if condition="($data['usedCounts'] lt 10) OR ($_GET['id'] gt 0)">
<a href="javascript:;" class="save" onclick="saveAddress()" >保存</a>
</if>
</div>
<div class="jgzlbox">
<dl>
<dd>
<label for="name">收货人</label>
<input class="inp01" placeholder="收货人" name="name" id="name" type="text" value="{$address['name']}" maxlength="10" >
<input class="inp01" name="id" id="address_id" type="hidden" value="{$address['id']}" >
</input>
<input class="inp01" name="id" id="address_id" type="hidden" value="{$address['id']}" >
</input>
</dd>
</dl>
<dl>
......@@ -43,11 +73,9 @@
<dl class="gender-box">
<dt><span class="cancel">取消</span><span class="confirm" id="ConSelect">确定</span></dt>
<dd>
<!--menu01-->
<ul class="menu01">
<volist name="area" id="arc" >
<li><a href="javascript:(0)" onclick="choiceCity(this,{$arc['area_id']})" value="{$arc['area_id']}">{$arc.title}</a>
<!--menu02-->
<ul class="menu02" id="city">
</ul>
</li>
......@@ -64,7 +92,7 @@
<div class="jgzlbox">
<dl>
<dd style="color: #393939;">设为默认地址<!--<input class="checkbox" type="checkbox" <eq name="address.is_default" value="1">checked</eq> >-->
<dd style="color: #393939;">设为默认地址
<div <eq name="address.is_default" value="1">type="true"<else/>type="flase"</eq> class="checkboxtrue"><p></p></div>
</dd>
</dl>
......@@ -76,9 +104,9 @@
<a href="{:U('home/User/index')}" class="icon-back"></a>
<div>收货地址</div>
</div>
</if>
</if> -->
<div class="adressbox">
<div class="adressbox">
<volist name="data['data']" id="vo">
<hr>
<dl>
......@@ -93,7 +121,7 @@
<div class="bot">{$vo.location} {$vo.address}</div>
</dt>
<dd>
<label><i style="color: <eq name="vo.is_default" value="1">#57BC4C; <else/>rgb(237, 237, 237);</eq>;" class="iconfontNEW"><eq name="vo.is_default" value="1">&#xe6ab;<else/>&#x15fd;</eq></i><!--<input type="checkbox" disabled <eq name="vo.is_default" value="1">checked</eq>>-->默认地址</label>
<!-- <label><i style="color: <eq name="vo.is_default" value="1">#57BC4C; <else/>rgb(237, 237, 237);</eq>;" class="iconfontNEW"><eq name="vo.is_default" value="1">&#xe6ab;<else/>&#x15fd;</eq></i>默认地址</label> -->
<a href="javascript:;" onclick ="delAddress(this,{$vo['id']})"><i class="iconfontNEW">&#xe690;</i>删除</a>
<a <if condition="$_GET['param']"> href="{:U('home/User/address',['id'=>$vo['id'],'param'=>$_GET['param']])}" <else/> href="{:U('home/User/address',array('id'=>$vo['id']))}" </if> ><i class="iconfontNEW">&#xe64b;</i>编辑</a>
</dd>
......@@ -105,6 +133,110 @@
</div>
<script>
new Vue({
el: '#app',
data: function() {
return {
id: "{$address['id']}",
name: "{$address['name']}",
phone: "{$address['phone']}",
area: "{$address.location}",
provinceCode: "{$address['province']}",
cityCode: "{$address['city']}",
areaCode: "{$address['area']}",
address: "{$address['address']}",
showPicker: false,
areaList: areaList,
selected: []
}
},
created:function(){
document.title = "我的地址"
},
computed: {
areaStyle: function() {
return this.area.length > 0 ? 'area_value_style' : 'area_value_style_normal'
},
areaDisplay: function() {
return this.area.length == 0 ? "请选择收货地区" : this.area
}
},
methods: {
onArea: function() {
let that = this
that.showPicker = true
},
onAreaConfirm: function(values) {
let that = this
that.showPicker = false
that.area = values.reduce( (v, e) => { return v.length == 0 ? e.name : (v + " " + e.name) }, "")
if(values.length > 2) {
that.provinceCode = values[0].code
that.cityCode = values[1].code
that.areaCode = values[2].code
}
if(values.lengths > 1) {
that.provinceCode = values[0].code
that.cityCode = values[1].code
that.areaCode = ''
}
},
saveAddress: function() {
let that = this
let address = that.address
let name = that.name
let phone = that.phone
let province = that.provinceCode
let city = that.cityCode
let area = that.areaCode
if(!name) {
ui.error('请输入收货人姓名')
return
}
if(!phone){
ui.error('请输入联系电话')
return
}
if(!PHONE_MATCH.test(phone)){
ui.error('请输入正确的联系电话')
return
}
if(province<=0||city<=0){
ui.error('请选择收货地区')
return
}
if(!address){
ui.error('请输入详细地址')
return
}
let data = "address=" + address + "&"
data = data + "name=" + name + "&"
data = data + "phone=" + phone + "&"
data = data + "province=" + province + "&"
data = data + "city=" + city + "&"
data = data + "area=" + area + "&"
let is_default = 0
let id = that.id
let param = "{$_GET['param']}"
$.post(U('home/User/updateAddress'), data+"&is_default="+is_default+"&id="+id , function(data){
if(data.status){
ui.success(data.info)
setTimeout(function(){
location.href="{:U('home/User/address')}"+'?'+'param'+'='+param
}, 1000)
return false
}else{
ui.error(data.info)
}
}, 'json')
},
}
})
$(function(){
$(".header").hide();
......
......@@ -60,9 +60,9 @@
<van-icon name="__THEME__/img/collect.png" size="24"></van-icon>
</template>
</van-cell>
<van-cell class="center_bottom_cell" title-class="text_14_400 color_333333 center_bottom_cell_text" title="会员信息" is-link >
<van-cell @click="onCellTap('{:U('home/User/vipCard')}')" class="center_bottom_cell" title-class="text_14_400 color_333333 center_bottom_cell_text" title="会员信息" is-link >
<template #icon>
<van-icon name="__THEME__/img/membership.png" size="24"></van-icon>
<van-icon name="__THEME__/img/membership.png" size="24"></van-icon>
</template>
</van-cell>
<van-cell class="center_bottom_cell" title-class="text_14_400 color_333333 center_bottom_cell_text" title="上传试题" is-link >
......@@ -446,6 +446,9 @@
methods: {
onChange: function(tab) {
},
onCellTap: function(url) {
window.location.href = url
}
}
})
......
<include file="__THEME__/public_header_w3g"/>
<style>
<!-- <style>
.maskbox{position:fixed;left:0;top:100px;width:100%;height:100%;z-index:99;display:none}
.one-nav-layer{width:100%;overflow:hidden;background-color:#fff;padding-bottom:20px;overflow-y:auto;height:246px;position:relative}
.one-nav-layer ul{float:left;width:33%;line-height:40px}
......@@ -15,8 +14,64 @@
.malllist .info .num{font-size:13px;line-height:13px}
.malllist .info .num:nth-child(2){font-size:12px}
</style>
<div class="maskbox"></div>
<div class="body">
<div class="maskbox"></div> -->
<style>
body {
padding: 0 !important;
}
</style>
<div id="app" style="height: 100%;">
<div class="layout_v">
<van-sticky>
<div class="tabs_container">
<div @click="onTab(idx)" v-for="(opt, idx) in options" :key="idx" :class="idx == tab ? 'tab_item_selected' : 'tab_item_normal'">
<span>{{opt.title}}</span>
</div>
</div>
</van-sticky>
<van-list
v-model="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad">
<template v-if="tab == 2">
<volist name="listData" id="vo">
<!-- <li style="width: 48%;margin:6px 1% 0">
<a href="{:U("mall/Goods/view",array('id'=>$vo['goods_id']))}">
<img src="{:getCover($vo['cover_ids'],360,360)}" class="lazyloading" alt="{$vo.title}" />
<h3>{$vo.title}</h3>
<div class="info">
<div class="num"><span><if condition="in_array('credpay',$payConfig['pay'])">{$vo.price}积分<else/>¥{$vo['price']/$sple_score}</if></span></div>
<div class="num" style="float:right;">库存:{$vo.stock}</div>
</div>
</a>
</li> -->
<a href="{:U('mall/Goods/view',array('id'=>$vo['goods_id']))}" v-for="(item, idx) in options[2].items" :key="idx" class="home_item_goods layout_h">
<van-image
style="margin-right: 0.75rem;"
height="68"
width="128"
fit="cover"
src="{:getCover($vo['cover_ids'],360,360)}">
</van-image>
<div class="weight_full layout_v">
<span class="text_14_600 color_333333 van-multi-ellipsis--l2">{$vo.title}</span>
<div class="layout_h_b" style="margin-top: 0.5rem;">
<span class="text_14_600 color_FF3B3B self_center">¥{$vo.price}</span>
<div class="item_green_button">购买</div>
</div>
</div>
</a>
</volist>
</template>
</van-list>
</div>
</div>
<!-- <div class="maskbox"></div> -->
<!-- <div class="body">
<ul class="selectul">
<li class="r02 border_sx" name="list_dl" style="width: 50%">
......@@ -84,12 +139,10 @@
<a href="{:U("mall/Goods/view",array('id'=>$vo['goods_id']))}">
<img src="{:getCover($vo['cover_ids'],360,360)}" class="lazyloading" alt="{$vo.title}" />
<h3>{$vo.title}</h3>
<!--<p>{$vo.info|msubstr=0,10, 'utf-8',true}</p>-->
<div class="info">
<div class="num"><span><if condition="in_array('credpay',$payConfig['pay'])">{$vo.price}积分<else/>¥{$vo['price']/$sple_score}</if></span></div>
<div class="num" style="float:right;">库存:{$vo.stock}</div>
</div>
<!--<div class="places">剩余<span>{$vo.stock}</span>名额</div>-->
</a>
</li>
</volist>
......@@ -101,28 +154,76 @@
</div>
</div>
</div>
</div>
</div> -->
<script>
new Vue({
el: '#app',
data: function() {
return {
tab: 0,
loading: false,
finished: false,
options: [{
title: '视频',
items: [1,2],
page: 1,
},{
title: '真题',
items: [1,2],
page: 1,
},{
title: '实物',
items: [1,2],
page: 1,
}]
}
},
created:function(){
document.title = "商城"
},
computed: {
},
methods: {
onTab: function(idx) {
this.tab = idx
},
onLoad: function() {
$.ajax({
type: "GET",
url: "{:U('mall/Goods/index')}",
data: "p=" + 1 +
"&sort_type={$_GET['sort_type']}&cateId={$_GET['cateId']}",
dataType: "json",
success: function (data) {
console.log(data)
}
})
}
}
})
/*确定点击*/
(function () {
$(".bd").on("click",".one-nav-layer ul li a",function () {
$(this).parent().parent().children().children().attr("type","");
// $(function () {
// $(".bd").on("click",".one-nav-layer ul li a",function () {
// $(this).parent().parent().children().children().attr("type","");
$(this).attr("type","chick");
});
// $(this).attr("type","chick");
// });
$(".bd").on("click",".one-nav-layer [type=button]",function(){
var typedata=[];
for (var i=0;i<$("[type=chick]").length;i++){
typedata[i]=$($("[type=chick]")[i]).attr("uid")
}
/*typedata 为uid 分类识别凭证*/
/* 请求处理程序..*/
// $(".bd").on("click",".one-nav-layer [type=button]",function(){
// var typedata=[];
// for (var i=0;i<$("[type=chick]").length;i++){
// typedata[i]=$($("[type=chick]")[i]).attr("uid")
// }
// /*typedata 为uid 分类识别凭证*/
// /* 请求处理程序..*/
});
})();
// });
// })();
$(function(){
$(".hd").click(function(){
......@@ -188,6 +289,7 @@
}
window.location.href = getRequestUrl(type,value,baseUrl);
});
function getRequestUrl(field,value,baseUrl){
//匹配是否有该参数
var reg = new RegExp("(^|&)" + field + "=([^&]*)(&|$)", "i");
......
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