add-sylive-item
This commit is contained in:
@@ -56,6 +56,7 @@ class Plan extends CI_Controller
|
||||
$plan[] = array('url' => base_url(array('plan', 'syt', 'api_viewlog')), 'interval' => 5); //私域通直播间播放日志数据同步
|
||||
$plan[] = array('url' => base_url(array('plan', 'syt', 'out_time')), 'interval' => 1); //订单过期
|
||||
$plan[] = array('url' => base_url(array('plan', 'syt', 'union_user')), 'interval' => 1); //直播数据关联用户
|
||||
|
||||
$this->plan = $plan;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,13 +45,20 @@ class Syt extends CI_Controller
|
||||
$res = $this->mdSytSubscribemsg->select($where, 'id asc', 1, 100);
|
||||
$log = array();
|
||||
if ($res) {
|
||||
$this->load->model('market/market_sylive_activity_model', 'mdSytActivity');
|
||||
$wechatS = new WechatServer($this->options);
|
||||
$wechatS->checkAuth();
|
||||
$act_ids = implode(',',array_unique(array_column($res,'activityId')));
|
||||
$act_rows = [];
|
||||
if($act_ids){
|
||||
$where = [
|
||||
"activityId in ($act_ids)" => null
|
||||
];
|
||||
$act_rows = $this->market_sylive_activity_model->map('activityId','',$where,'',0,0,'activityId,title');
|
||||
}
|
||||
foreach ($res as $key => $value) {
|
||||
$re_a = $this->mdSytActivity->get(array("activityId" => $value['a_id'], "status" => 0));
|
||||
if ($re_a) {
|
||||
$content = '您预约“' . $re_a['title'] . '”直播已经开始啦!赶紧进入直播间观看直播领取福利吧~';
|
||||
$act = $act_rows['activityId'] ? $act_rows['activityId'][0] : [];
|
||||
if ($act) {
|
||||
$content = '您预约“' . $act['title'] . '”直播已经开始啦!赶紧进入直播间观看直播领取福利吧~';
|
||||
$temp_arr = array(
|
||||
'touser' => $value['openId'],
|
||||
'template_id' => $value['templateId'],
|
||||
@@ -69,6 +76,8 @@ class Syt extends CI_Controller
|
||||
$log[] = $value['a_id'] . '=' . $value['openid'];
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$this->mdSytSubscribemsg->update(['status' => -1], ['id' => $value['id']]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -260,7 +269,7 @@ class Syt extends CI_Controller
|
||||
$where = [
|
||||
'expireTime>' => 0,
|
||||
'expireTime<' => time(),
|
||||
'status' => 0
|
||||
'status' => 0,
|
||||
];
|
||||
$rows = $this->market_sylive_order_model->select($where,'id asc',1,20);
|
||||
if($rows){
|
||||
@@ -432,4 +441,34 @@ class Syt extends CI_Controller
|
||||
}
|
||||
echo '更新完成';
|
||||
}
|
||||
|
||||
//更新经销商地址
|
||||
public function tem_bizinfo(){
|
||||
require_once COMMPATH . '/third_party/PHPExcel/IOFactory.php';
|
||||
$this->load->model('market/market_sylive_activity_bizinfo_model');
|
||||
$file = FCPATH.'pdf/bizinfo.xlsx';
|
||||
$reader = \PHPExcel_IOFactory::createReader('Excel2007'); // 读取 excel 文档
|
||||
$PHPExcel = $reader->load($file); // 文档名称
|
||||
$objWorksheet = $PHPExcel->getActiveSheet();
|
||||
$rowCnt = $objWorksheet->getHighestRow(); //获取总行数
|
||||
for ($i = 2; $i <= $rowCnt; $i++) { //读取内容
|
||||
$areaName = $objWorksheet->getCell('A' . $i)->getValue();
|
||||
$bizName = $objWorksheet->getCell('B' . $i)->getValue();
|
||||
$provinceName = $objWorksheet->getCell('C' . $i)->getValue();
|
||||
$cityName = $objWorksheet->getCell('D' . $i)->getValue();
|
||||
$addData = [
|
||||
'activityId' => 4,
|
||||
'areaName' => $areaName,
|
||||
'bizName' => $bizName,
|
||||
'provinceName' => $provinceName,
|
||||
'cityName' => $cityName,
|
||||
];
|
||||
if(!$this->market_sylive_activity_bizinfo_model->count($addData)){
|
||||
$addData['createTime'] = date('Y-m-d H:i:s');
|
||||
$this->market_sylive_activity_bizinfo_model->add($addData);
|
||||
}
|
||||
|
||||
}
|
||||
echo '执行结束';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Market_sylive_activity_bizinfo_model extends HD_Model
|
||||
{
|
||||
private $table_name = 'lc_market_sylive_activity_bizinfo';
|
||||
|
||||
public function __construct(){
|
||||
parent::__construct($this->table_name, 'default');
|
||||
}
|
||||
}
|
||||
@@ -115,17 +115,15 @@ class Act extends Wx {
|
||||
}else{
|
||||
$info['live_url'] = "https://live.haodian.cn/watch/{$row['channelId']}?userid={$userid}&ts={$ts}&sign={$sign}";
|
||||
}
|
||||
//判断是否支付商品
|
||||
$is_pay = $this->market_sylive_order_model->count(['itemId'=>$a_id,'status'=>1,'userId'=>$this->uid]);
|
||||
//微信分享
|
||||
$wx_info = $this->share_info($row);
|
||||
$info['is_pay'] = $is_pay ? 1 : 0;
|
||||
$info['show_code'] = $is_show_code ? 1 : 0;
|
||||
$info['alert_code'] = $alert_code ? 1 : 0;
|
||||
$this->data['info'] = $info;
|
||||
$this->data['sign_package'] = $wx_info['sign_package'];
|
||||
$this->data['share'] = $wx_info['share'];
|
||||
$this->data['_title'] = $row['title'];
|
||||
$this->data['skey'] = $info['skey'];
|
||||
$this->show_view('h5/market/sylive/act/index');
|
||||
}
|
||||
|
||||
@@ -293,9 +291,9 @@ class Act extends Wx {
|
||||
}
|
||||
$jsondata = json_decode($row['jsondata'],true);
|
||||
$item = $jsondata['item'] ? $jsondata['item'] : [];
|
||||
$is_pay = $this->market_sylive_order_model->count(['itemId'=>$a_id,'status'=>1,'userId'=>$this->uid]);
|
||||
$is_pay = $this->market_sylive_order_model->count(['itemId'=>$a_id,'status'=>1,'userId'=>$this->uid,'type'=>0]);
|
||||
if($is_pay){
|
||||
$url = http_host_com('home').'/h5/market/sylive/act/ucenter?skey='.$skey;
|
||||
$url = http_host_com('home').'/h5/market/sylive/ucenter/mygift?skey='.$skey;
|
||||
redirect($url);exit;
|
||||
}
|
||||
$e_time = time() < strtotime($row['timeEnd']) ? strtotime($row['timeEnd']) - time() : 0;
|
||||
@@ -346,7 +344,7 @@ class Act extends Wx {
|
||||
$jsondata = json_decode($row['jsondata'],true);
|
||||
$item = $jsondata['item'] ? $jsondata['item'] : [];
|
||||
//判断是否已支付
|
||||
$o_row = $this->market_sylive_order_model->get(['itemId'=>$a_id,'status'=>1,'userId'=>$this->uid]);
|
||||
$o_row = $this->market_sylive_order_model->get(['itemId'=>$a_id,'status'=>1,'userId'=>$this->uid,'type'=>0]);
|
||||
if($o_row){
|
||||
$this->show_json('',400,'已支付,请勿重复支付');
|
||||
}
|
||||
@@ -357,7 +355,7 @@ class Act extends Wx {
|
||||
if($row['stock']<=0){
|
||||
$this->show_json('',400,'已售罄');
|
||||
}
|
||||
$unpay = $this->market_sylive_order_model->get(['itemId'=>$a_id,'status'=>0,'userId'=>$this->uid,'expireTime>'=>time()]);
|
||||
$unpay = $this->market_sylive_order_model->get(['itemId'=>$a_id,'status'=>0,'userId'=>$this->uid,'expireTime>'=>time(),'type'=>0]);
|
||||
if(!$unpay){
|
||||
$mb_count = $redis_obj->sCard($mb_key); //获取集合中用户数量
|
||||
if($mb_count && $mb_count>$row['stock']+10){
|
||||
@@ -413,79 +411,6 @@ class Act extends Wx {
|
||||
}
|
||||
$this->show_json($result['data'],200,'操作成功');
|
||||
}
|
||||
public function ucenter(){
|
||||
$skey = $this->input->get('skey');
|
||||
$param = $this->myencryption->base64url_decode($skey);
|
||||
$a_id = intval($param['a_id']);//活动id
|
||||
$row = $this->market_sylive_activity_model->get(['activityId'=>$a_id]);
|
||||
if(!$row){
|
||||
throw new Hd_exception('参数错误',400);
|
||||
}
|
||||
$order = $this->market_sylive_order_model->get(['userId'=>$this->uid,'status'=>1,'itemId'=>$a_id]);
|
||||
if(!$order){
|
||||
$url = http_host_com('home').'/h5/market/sylive/act/item?skey='.$skey;
|
||||
redirect($url);exit;
|
||||
}
|
||||
$jsondata = json_decode($row['jsondata'],true);
|
||||
$item = $jsondata['item'] ? $jsondata['item'] : [];
|
||||
$validity = '';
|
||||
if($item['useTimeStart'] || $item['useTimeEnd']){
|
||||
$useTimeStart = date('Y-m-d',strtotime($item['useTimeStart']));
|
||||
$useTimeEnd = date('Y-m-d',strtotime($item['useTimeEnd']));
|
||||
$validity = "有效期 {$useTimeStart} - {$useTimeEnd}";
|
||||
}
|
||||
$order = [
|
||||
'uname' => $order['uname'] ? $order['uname'] : '',
|
||||
'utel' => $order['mobile'] ? $order['mobile'] : '',
|
||||
'slogan' => '尊享您的直播好礼',
|
||||
'valid_time' => $validity,
|
||||
'oid' => $order['sid'],
|
||||
'c_time' => date('Y-m-d H:i:s'),
|
||||
];
|
||||
$if_pid = 0;
|
||||
$ac_user = $this->act_user_model->get(['userId'=>$this->uid,'activityId'=>$a_id],'channelId');
|
||||
$ac_user['channelId'] && $pid_user = $this->user_model->get(['userId'=>$ac_user['channelId']],'uname,organizationId,mobile,headimg');
|
||||
$logo = $gw_tel = $gw_slogan = $gw_title = '';
|
||||
if($ac_user['channelId'] && $pid_user['organizationId']>0){
|
||||
$group_id = $this->sylive_entity->get_level($pid_user['organizationId']);
|
||||
if($group_id==3){ //顾问
|
||||
$if_pid = 1;
|
||||
$where = [
|
||||
"organizationId in (select parentId from lc_market_sylive_organization where organizationId={$pid_user['organizationId']})" => null
|
||||
];
|
||||
$org = $this->market_sylive_organization_model->get($where);
|
||||
}elseif($group_id==2){ //店长
|
||||
$if_pid = 1;
|
||||
$where = [
|
||||
"organizationId" => $pid_user['organizationId']
|
||||
];
|
||||
$org = $this->market_sylive_organization_model->get($where);
|
||||
}
|
||||
$gw_title = $pid_user['uname'];
|
||||
$gw_slogan = $org['organizationName'];
|
||||
$gw_tel = $pid_user['mobile'];
|
||||
$logo = $pid_user['headimg'];
|
||||
}
|
||||
$info = [
|
||||
'bg' => "https://qs.haodian.cn/web/images/project/H5-ShiYu/mine-bg.jpg",
|
||||
'logo' => $logo,
|
||||
'if_pid' => $if_pid,
|
||||
'title' => $gw_title,
|
||||
'slogan' => $gw_slogan,
|
||||
'cust_tel' => $gw_tel,
|
||||
'introTitle' => '权益说明',
|
||||
'content' => $item['introduction'] ? $item['introduction'] : '',
|
||||
'order' => $order,
|
||||
'skey' => $skey
|
||||
];
|
||||
$this->data['info'] = $info;
|
||||
$this->data['_title'] = $row['title'];
|
||||
//微信分享
|
||||
$wx_info = $this->share_info($row);
|
||||
$this->data['sign_package'] = $wx_info['sign_package'];
|
||||
$this->data['share'] = $wx_info['share'];
|
||||
$this->show_view('h5/market/sylive/act/ucenter');
|
||||
}
|
||||
|
||||
//获取微信用户信息
|
||||
public function userinfo(){
|
||||
|
||||
@@ -0,0 +1,259 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
require_once 'Common.php';
|
||||
|
||||
class Item extends Wx{
|
||||
|
||||
private $item_banner = ['https://qs.haodian.cn/web/images/project/H5-ShiYu/goods.jpg'];
|
||||
|
||||
public function __construct(){
|
||||
parent::__construct();
|
||||
$this->load->model('market/market_sylive_items_model');
|
||||
$this->load->model('market/market_sylive_activity_model');
|
||||
$this->load->model('market/market_sylive_order_model');
|
||||
$this->load->model('market/market_sylive_activity_bizinfo_model','msa_bizinfo_model');
|
||||
$this->load->library('market/sylive_entity');
|
||||
}
|
||||
|
||||
public function detail(){
|
||||
$itemId = $this->input->get('iid');
|
||||
$skey = $this->input->get('skey');
|
||||
$param = $this->myencryption->base64url_decode($skey);
|
||||
$a_id = intval($param['a_id']);//活动id
|
||||
$row = $this->market_sylive_items_model->get(['itemId'=>$itemId,'activityId'=>$a_id]);
|
||||
if(!$row){
|
||||
throw new Hd_exception('参数错误',400);
|
||||
}
|
||||
$imgs = json_decode($row['imgs'],true);
|
||||
if($imgs['banner']){
|
||||
$banner = [];
|
||||
foreach ($imgs['banner'] as $item) {
|
||||
$banner[] = build_qiniu_image_url($item);
|
||||
}
|
||||
}else{
|
||||
$banner = $this->item_banner;
|
||||
}
|
||||
$e_time = time() < strtotime($row['timeEnd']) ? strtotime($row['timeEnd']) - time() : 0;
|
||||
$s_time = time() < strtotime($row['timeStart']) ? strtotime($row['timeStart']) - time() : 0;
|
||||
$is_pay = $this->market_sylive_order_model->count(['itemId'=>$itemId,'status'=>1,'userId'=>$this->uid,'type'=>0]);
|
||||
if($is_pay){
|
||||
$url = http_host_com('home').'/h5/market/sylive/ucenter?skey='.$skey;
|
||||
redirect($url);exit;
|
||||
}
|
||||
|
||||
$validity = '';
|
||||
if($row['useStart']!='0000-00-00 00:00:00' || $row['useEnd']!='0000-00-00 00:00:00'){
|
||||
$useTimeStart = date('Y-m-d',strtotime($row['useStart']));
|
||||
$useTimeEnd = date('Y-m-d',strtotime($row['useEnd']));
|
||||
$validity = "有效期 {$useTimeStart} - {$useTimeEnd}";
|
||||
}
|
||||
$title = $row['title'] ? $row['title'] : '';
|
||||
$stock = $row['stock'];
|
||||
$introduction = $row['descrip'] ? $row['descrip'] : '';
|
||||
$price = $row['price'] ? $row['price'] : '';
|
||||
//是否需要选择门店
|
||||
$need_shop = 1;
|
||||
$ac_user = $this->act_user_model->get(['id'=>$this->act_uid]);
|
||||
if($ac_user['channelId']){
|
||||
$channel_user = $this->act_user_model->get(['userId'=>$ac_user['channelId'],'activityId'=>$a_id]);
|
||||
$channel_user['bizId'] && $need_shop = 0;
|
||||
}
|
||||
$need_shop = 1;
|
||||
$biz_arr = $city_arr = $province_arr = [];
|
||||
if($need_shop){
|
||||
$province_arr = $this->msa_bizinfo_model->select(['status'=>0,'activityId'=>4],'',0,0,'distinct provinceName as name');
|
||||
}
|
||||
$info = [
|
||||
'itemId' => $row['itemId'],
|
||||
'title' => $title,
|
||||
's_time' => $s_time,
|
||||
'e_time' => $e_time,
|
||||
'price' => $price,
|
||||
'content' => $introduction,
|
||||
'banner' => $banner,
|
||||
'stock' => $stock,
|
||||
'skey' => $skey,
|
||||
'validity' => $validity,
|
||||
'introTitle' => '权益说明',
|
||||
'need_shop' => $need_shop,
|
||||
];
|
||||
$this->data['province_arr'] = $province_arr;
|
||||
$this->data['city_arr'] = $city_arr;
|
||||
$this->data['biz_arr'] = $biz_arr;
|
||||
$this->data['info'] = $info;
|
||||
$this->data['_title'] = $row['title'];
|
||||
//微信分享
|
||||
$wx_info = $this->share_info($row);
|
||||
$this->data['sign_package'] = $wx_info['sign_package'];
|
||||
$this->data['share'] = $wx_info['share'];
|
||||
$this->show_view('h5/market/sylive/item/detail');
|
||||
}
|
||||
|
||||
//支付
|
||||
public function post_pay(){
|
||||
$redis = load_cache('redis');
|
||||
$redis_obj = $redis->redis();
|
||||
$skey = $this->input->post('skey');
|
||||
$name = $this->input->post('name');
|
||||
$mobile = $this->input->post('telPhone');
|
||||
$code = $this->input->post('code');
|
||||
$province = $this->input->post('province');
|
||||
$city = $this->input->post('city');
|
||||
$biz = $this->input->post('biz');
|
||||
$itemId = $this->input->post('itemId');
|
||||
$param = $this->myencryption->base64url_decode($skey);
|
||||
$a_id = intval($param['a_id']);//活动id
|
||||
$row = $this->market_sylive_items_model->get(['itemId'=>$itemId]);
|
||||
if(!$row){
|
||||
$this->show_json('',400,'参数错误');
|
||||
}
|
||||
if(time()< strtotime($row['timeStart'])){
|
||||
$this->show_json('',400,'尚未开始');
|
||||
}
|
||||
if(time() > strtotime($row['timeEnd'])){
|
||||
$this->show_json('',400,'活动已结束');
|
||||
}
|
||||
$mb_key = "SYLIVE_MEMBERS_ITEM_ID_{$itemId}"; //集合缓存key
|
||||
$code_key = "sylive_item_code_{$this->uid}_{$mobile}";//验证码
|
||||
if(!mobile_valid($mobile)){
|
||||
$this->show_json('',400,'请输入正确手机号');
|
||||
}
|
||||
if(!$code || ($redis->get($code_key)!=$code)){
|
||||
$this->show_json('',400,'请输入正确验证码');
|
||||
}
|
||||
//判断是否已支付
|
||||
$o_row = $this->market_sylive_order_model->get(['itemId'=>$itemId,'status'=>1,'userId'=>$this->uid,'type'=>0]);
|
||||
if($o_row){
|
||||
$this->show_json('',400,'已支付,请勿重复支付');
|
||||
}
|
||||
$pay_price = $row['price'];
|
||||
if($pay_price<=0){
|
||||
$this->show_json('',400,'无需支付');
|
||||
}
|
||||
if($row['stock']<=0){
|
||||
$this->show_json('',400,'已售罄');
|
||||
}
|
||||
$act_user = $this->act_user_model->get(['userId'=>$this->uid,'activityId'=>$a_id]);
|
||||
$p_user = [];
|
||||
$act_user['channelId'] && $p_user = $this->act_user_model->get(['userId'=>$act_user['channelId']]);
|
||||
$unpay = $this->market_sylive_order_model->get(['itemId'=>$itemId,'activityId'=>$a_id,'status'=>0,'userId'=>$this->uid,'expireTime>'=>time(),'type'=>0]);
|
||||
if(!$unpay){
|
||||
$mb_count = $redis_obj->sCard($mb_key); //获取集合中用户数量
|
||||
if($mb_count && $mb_count>$row['stock']+10){
|
||||
$mb = $redis_obj->sMembers($mb_key);
|
||||
$this->show_json('',400,'已售罄:'.json_encode($mb,JSON_UNESCAPED_UNICODE));
|
||||
}
|
||||
try {
|
||||
$province && $jsondata = ['biz'=>"{$province}-{$city}-{$biz}"];
|
||||
$this->market_sylive_order_model->db->trans_begin();
|
||||
//限购一件
|
||||
$u_row = $this->market_sylive_order_model->get(['itemId'=>$itemId,'activityId'=>$a_id,'status>='=>0,'userId'=>$this->uid,'expireTime>'=>time(),]);
|
||||
if($u_row){
|
||||
throw new Exception('限购一件');
|
||||
}
|
||||
$this->load->helper('order');
|
||||
$unpay = [
|
||||
'sid' => create_order_no('350200','market'),
|
||||
'activityId' => $a_id,
|
||||
'userId' => $this->uid,
|
||||
'itemId' => $itemId,
|
||||
'itemTitle' => $row['title'],
|
||||
'totalPrice' => $pay_price,
|
||||
'expireTime' => time()+5*60,//订单过期时间
|
||||
'createTime' => date('Y-m-d H:i:s')
|
||||
];
|
||||
$name && $unpay['uname'] = $name;
|
||||
$mobile && $unpay['mobile'] = $mobile;
|
||||
$p_user['teamId'] && $unpay['cfrom'] = 1;
|
||||
$p_user['areaId'] && $unpay['areaId'] = $p_user['areaId'];
|
||||
$p_user['bizId'] && $unpay['bizId'] = $p_user['bizId'];
|
||||
$p_user['userId'] && $unpay['cfUserId'] = $p_user['userId'];
|
||||
$jsondata && $unpay['jsondata'] = json_encode($jsondata,JSON_UNESCAPED_UNICODE);
|
||||
$oid = $this->market_sylive_order_model->add($unpay);
|
||||
if(!is_numeric($oid)){
|
||||
$this->market_sylive_order_model->db->trans_rollback();
|
||||
throw new Exception('创建订单失败');
|
||||
}
|
||||
$this->market_sylive_items_model->update(['stock = stock-1' =>null],['itemId'=>$itemId,'stock>'=>0]);
|
||||
$res = $this->market_sylive_items_model->db->affected_rows();
|
||||
if(!$res){
|
||||
throw new Exception('已售罄');
|
||||
}
|
||||
$this->market_sylive_order_model->db->trans_commit();
|
||||
$redis_obj->sRem($mb_key,$this->uid); //删除集合
|
||||
}catch (Exception $e){
|
||||
$redis_obj->sRem($mb_key,$this->uid); //删除集合
|
||||
$this->market_sylive_order_model->db->trans_rollback();
|
||||
$this->show_json('',400,$e->getMessage());
|
||||
}
|
||||
}else{
|
||||
$jsondata = json_decode($unpay['jsondata'],true);
|
||||
$update = ['uname'=>$name,'mobile'=>$mobile];
|
||||
if($province){
|
||||
$jsondata['biz'] = "{$province}-{$city}-{$biz}";
|
||||
$update['jsondata'] = json_encode($jsondata,JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
$this->market_sylive_order_model->update($update,['id'=>$unpay['id']]);
|
||||
}
|
||||
$user = $this->user_model->get(['userId'=>$this->uid]);
|
||||
$notify_url = http_host_com('home').'/h5/market/sylive/notify/item';
|
||||
$result = $this->unorder($unpay['sid'],$unpay['totalPrice'],$user['openid'],$unpay['itemTitle'],$notify_url,$unpay['expireTime'],['wx_type'=>'dc']);
|
||||
if(!$result['code']){
|
||||
$this->show_json('',400,$result['msg']);
|
||||
}
|
||||
//删除缓存
|
||||
$redis->delete($code_key);
|
||||
$data = [
|
||||
'wxjson' => $result['data'],
|
||||
'oid' => $unpay['id'],
|
||||
];
|
||||
$this->show_json($data,200,'操作成功');
|
||||
}
|
||||
|
||||
//获取验证码
|
||||
public function get_code(){
|
||||
$mobile = $this->input->post('mobile');
|
||||
if(!mobile_valid($mobile)){
|
||||
$this->show_json('',400,'请输入正确的手机号码');
|
||||
}
|
||||
$redis = &load_cache('redis');
|
||||
$key = "sylive_item_code_{$this->uid}_{$mobile}";
|
||||
if(!$redis->get($key)){
|
||||
$this->load->helper('string');
|
||||
$code = random_string('numeric', 4);
|
||||
$redis->save($key, $code, 60*5);
|
||||
$content = "【好店云】您的验证码为: {$code},请勿泄露于他人!";
|
||||
echo $content;exit;
|
||||
b2m_send_sms($mobile,$content);
|
||||
}
|
||||
$this->show_json('',200, '验证码已发送');
|
||||
}
|
||||
|
||||
public function biz_info(){
|
||||
$type = $this->input->get('type');
|
||||
$p_name = $this->input->get('p_name');
|
||||
$c_name = $this->input->get('c_name');
|
||||
$where = [
|
||||
'status'=>0,
|
||||
'activityId'=>4,
|
||||
];
|
||||
if($type=='city'){
|
||||
$where['provinceName'] = $p_name;
|
||||
$lists = $this->msa_bizinfo_model->select($where,'',0,0,'distinct cityName as name');
|
||||
}elseif ($type=='biz'){
|
||||
$where['provinceName'] = $p_name;
|
||||
$where['cityName'] = $c_name;
|
||||
$lists = $this->msa_bizinfo_model->select($where,'',0,0,'bizName as name');
|
||||
}else{
|
||||
$lists = $this->msa_bizinfo_model->select($where,'',0,0,'distinct provinceName as name');
|
||||
}
|
||||
$data = [
|
||||
'lists' => $lists
|
||||
];
|
||||
$this->show_json($data,200);
|
||||
}
|
||||
|
||||
public function agreement(){
|
||||
$this->show_view('h5/market/sylive/item/agreement');
|
||||
}
|
||||
}
|
||||
@@ -114,4 +114,48 @@ class Notify extends CI_Controller {
|
||||
echo '<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>';
|
||||
}
|
||||
|
||||
//商品-微信支付异步通知
|
||||
public function item(){
|
||||
try{
|
||||
$sid = $this->notify['out_trade_no'];
|
||||
if($sid){
|
||||
debug_log("[start] ". __FUNCTION__ . ": out_trade_no:".$this->notify['out_trade_no'], $this->log_file,$this->log_dir);
|
||||
$order = $this->order_model->get(array('sid'=>$sid));
|
||||
if(!$order){
|
||||
throw new Exception("{$sid}_订单不存在");
|
||||
}
|
||||
if($order['status']){
|
||||
throw new Exception("{$sid}_订单已支付");
|
||||
}
|
||||
if($this->notify['result_code'] != 'SUCCESS'){ //支付失败
|
||||
throw new Exception("支付失败,sid={$sid}");
|
||||
}else{ //支付成功
|
||||
$res = $this->order_model->update(['status'=>1,'payTime'=>date('Y-m-d H:i:s')],['id'=>$order['id']]);
|
||||
if($res){
|
||||
$act_user = $this->act_user_model->get(['userId'=>$order['uid'],'activityId'=>$order['activityId']]);
|
||||
$params = [
|
||||
'a_id' => $order['itemId'],
|
||||
'uid' => $order['userId'],
|
||||
'cf_uid' => $act_user['channelId'],
|
||||
'kpi' => 'order',
|
||||
'jsondata'=> ['order_id'=>$order['id'],'sid'=>$sid]
|
||||
];
|
||||
$sy_res = $this->sylive_entity->kpi_log($params);
|
||||
debug_log("[info] ". __FUNCTION__ . ":私域通增加记录-".json_encode($sy_res,JSON_UNESCAPED_UNICODE), $this->log_file,$this->log_dir);
|
||||
debug_log("[success] ". __FUNCTION__ . ":操作成功", $this->log_file,$this->log_dir);
|
||||
}
|
||||
}
|
||||
}
|
||||
}catch (Exception $e){
|
||||
$msg = $e->getMessage();
|
||||
debug_log("[error] ". __FUNCTION__ . ":{$msg}", $this->log_file,$this->log_dir);
|
||||
}
|
||||
if($sid){
|
||||
debug_log("[finish] ". __FUNCTION__ . ": out_trade_no-".$this->notify['out_trade_no'], $this->log_file,$this->log_dir);
|
||||
}else{
|
||||
debug_log("[finish] ". __FUNCTION__ . ": 参数错误-".json_encode($this->notify,JSON_UNESCAPED_UNICODE), $this->log_file,$this->log_dir);
|
||||
}
|
||||
echo '<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,252 @@
|
||||
<?php
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
require_once 'Common.php';
|
||||
|
||||
class Ucenter extends Wx{
|
||||
|
||||
private $a_id,$skey;
|
||||
|
||||
public function __construct(){
|
||||
parent::__construct();
|
||||
$this->load->model('market/market_sylive_items_model');
|
||||
$this->load->model('market/market_sylive_order_model');
|
||||
$this->load->model('market/market_sylive_activity_model');
|
||||
$this->load->library('market/sylive_entity');
|
||||
$this->skey = $this->input->get('skey');
|
||||
$param = $this->myencryption->base64url_decode($this->skey);
|
||||
$this->a_id = intval($param['a_id']);//活动id
|
||||
$this->data['skey'] = $this->skey;
|
||||
}
|
||||
|
||||
public function index(){
|
||||
$params = $this->input->get();
|
||||
$row = $this->market_sylive_activity_model->get(['activityId'=>$this->a_id]);
|
||||
if(!$row){
|
||||
throw new Hd_exception('参数错误',400);
|
||||
}
|
||||
$lists = [];
|
||||
if($this->a_id<4){
|
||||
//判断是否支付商品
|
||||
$is_pay = $this->market_sylive_order_model->count(['itemId'=>$this->a_id,'status'=>1,'userId'=>$this->uid,'type'=>0,'activityId<'=>4]);
|
||||
$is_pay && $lists[] = ['title'=>'我的权益','url'=>"/h5/market/sylive/ucenter/mygift?skey={$params['skey']}"];
|
||||
}
|
||||
|
||||
$lists[] = ['title'=>'我的订单','url'=>"/h5/market/sylive/ucenter/orders?skey={$params['skey']}"];
|
||||
$lists[] = ['title'=>'联系客服','url'=>"https://work.weixin.qq.com/kfid/kfc77374393839a9d9b?enc_scene=ENCAEt1rsV7GcticSp5Xyc245thCkz9T6YRm7gShvqffNqW3A89DzkZvzjusx44EinUTe"];
|
||||
$user = $this->user_model->get(['userId'=>$this->uid],'unionid,nickname,headimg');
|
||||
$info = [
|
||||
'title' => $user['nickname'],
|
||||
'logo' => Sylive_entity::DF_IMG,
|
||||
'list' => $lists
|
||||
];
|
||||
$this->data['info'] = $info;
|
||||
$this->data['params'] = $params;
|
||||
$this->show_view('h5/market/sylive/ucenter/index');
|
||||
}
|
||||
//我的权益
|
||||
public function mygift(){
|
||||
$row = $this->market_sylive_activity_model->get(['activityId'=>$this->a_id]);
|
||||
if(!$row){
|
||||
throw new Hd_exception('参数错误',400);
|
||||
}
|
||||
$order = $this->market_sylive_order_model->get(['userId'=>$this->uid,'status'=>1,'itemId'=>$this->a_id,'type'=>0]);
|
||||
if(!$order){
|
||||
$url = http_host_com('home').'/h5/market/sylive/act/item?skey='.$this->data['skey'];
|
||||
redirect($url);exit;
|
||||
}
|
||||
$jsondata = json_decode($row['jsondata'],true);
|
||||
$item = $jsondata['item'] ? $jsondata['item'] : [];
|
||||
$validity = '';
|
||||
if($item['useTimeStart'] || $item['useTimeEnd']){
|
||||
$useTimeStart = date('Y-m-d',strtotime($item['useTimeStart']));
|
||||
$useTimeEnd = date('Y-m-d',strtotime($item['useTimeEnd']));
|
||||
$validity = "有效期 {$useTimeStart} - {$useTimeEnd}";
|
||||
}
|
||||
$order_jsondata = json_decode($order['jsondata'],true);
|
||||
$order = [
|
||||
'id' => $order['id'],
|
||||
'uname' => $order['uname'] ? $order['uname'] : '',
|
||||
'utel' => $order['mobile'] ? $order['mobile'] : '',
|
||||
'slogan' => '尊享您的直播好礼',
|
||||
'valid_time' => $validity,
|
||||
'sid' => $order['sid'],
|
||||
'c_time' => date('Y-m-d H:i:s'),
|
||||
'region' => $order_jsondata['address']['region'] ? $order_jsondata['address']['region'] : '',
|
||||
'detail' => $order_jsondata['address']['detail'] ? $order_jsondata['address']['detail'] : ''
|
||||
];
|
||||
$if_pid = 0;
|
||||
$ac_user = $this->act_user_model->get(['userId'=>$this->uid,'activityId'=>$this->a_id],'channelId');
|
||||
$ac_user['channelId'] && $pid_user = $this->user_model->get(['userId'=>$ac_user['channelId']],'uname,organizationId,mobile,headimg');
|
||||
$logo = $gw_tel = $gw_slogan = $gw_title = '';
|
||||
if($ac_user['channelId'] && $pid_user['organizationId']>0){
|
||||
$group_id = $this->sylive_entity->get_level($pid_user['organizationId']);
|
||||
if($group_id==3){ //顾问
|
||||
$if_pid = 1;
|
||||
$where = [
|
||||
"organizationId in (select parentId from lc_market_sylive_organization where organizationId={$pid_user['organizationId']})" => null
|
||||
];
|
||||
$org = $this->market_sylive_organization_model->get($where);
|
||||
}elseif($group_id==2){ //店长
|
||||
$if_pid = 1;
|
||||
$where = [
|
||||
"organizationId" => $pid_user['organizationId']
|
||||
];
|
||||
$org = $this->market_sylive_organization_model->get($where);
|
||||
}
|
||||
$gw_title = $pid_user['uname'];
|
||||
$gw_slogan = $org['organizationName'];
|
||||
$gw_tel = $pid_user['mobile'];
|
||||
$logo = $pid_user['headimg'];
|
||||
}
|
||||
$info = [
|
||||
'bg' => "https://qs.haodian.cn/web/images/project/H5-ShiYu/mine-bg.jpg",
|
||||
'logo' => $logo,
|
||||
'if_pid' => $if_pid,
|
||||
'title' => $gw_title,
|
||||
'slogan' => $gw_slogan,
|
||||
'cust_tel' => $gw_tel,
|
||||
'introTitle' => '权益说明',
|
||||
'content' => $item['introduction'] ? $item['introduction'] : '',
|
||||
'order' => $order,
|
||||
'skey' => $this->data['skey']
|
||||
];
|
||||
$this->data['info'] = $info;
|
||||
$this->data['_title'] = $row['title'];
|
||||
//微信分享
|
||||
$wx_info = $this->share_info($row);
|
||||
$this->data['sign_package'] = $wx_info['sign_package'];
|
||||
$this->data['share'] = $wx_info['share'];
|
||||
$this->show_view('h5/market/sylive/ucenter/mygift');
|
||||
}
|
||||
|
||||
//我的订单
|
||||
public function orders(){
|
||||
$this->show_view('h5/market/sylive/ucenter/orders');
|
||||
}
|
||||
|
||||
//订单详情
|
||||
public function detail(){
|
||||
$oid = $this->input->get('id');
|
||||
$order = $this->market_sylive_order_model->get(['id'=>$oid,'userId' => $this->uid]);
|
||||
if(!$order){
|
||||
throw new Hd_exception('参数错误',400);
|
||||
}
|
||||
$item = $this->market_sylive_items_model->get(['itemId'=>$order['itemId']]);
|
||||
$validity = '';
|
||||
if($item['useStart'] || $item['timeEnd']){
|
||||
$useTimeStart = date('Y-m-d',strtotime($item['useStart']));
|
||||
$useTimeEnd = date('Y-m-d',strtotime($item['timeEnd']));
|
||||
$validity = "有效期 {$useTimeStart} - {$useTimeEnd}";
|
||||
}
|
||||
$order_jsondata = json_decode($order['jsondata'],true);
|
||||
$order = [
|
||||
'id' => $order['id'],
|
||||
'uname' => $order['uname'] ? $order['uname'] : '',
|
||||
'utel' => $order['mobile'] ? $order['mobile'] : '',
|
||||
'slogan' => '尊享您的直播好礼',
|
||||
'valid_time' => $validity,
|
||||
'sid' => $order['sid'],
|
||||
'c_time' => date('Y-m-d H:i:s'),
|
||||
'region' => $order_jsondata['address']['region'] ? $order_jsondata['address']['region'] : '',
|
||||
'detail' => $order_jsondata['address']['detail'] ? $order_jsondata['address']['detail'] : ''
|
||||
];
|
||||
$if_pid = 0;
|
||||
$ac_user = $this->act_user_model->get(['userId'=>$this->uid,'activityId'=>$this->a_id],'channelId');
|
||||
$ac_user['channelId'] && $pid_user = $this->user_model->get(['userId'=>$ac_user['channelId']],'uname,organizationId,mobile,headimg');
|
||||
$logo = $gw_tel = $gw_slogan = $gw_title = '';
|
||||
if($ac_user['channelId'] && $pid_user['organizationId']>0){
|
||||
$group_id = $this->sylive_entity->get_level($pid_user['organizationId']);
|
||||
if($group_id==3){ //顾问
|
||||
$if_pid = 1;
|
||||
$where = [
|
||||
"organizationId in (select parentId from lc_market_sylive_organization where organizationId={$pid_user['organizationId']})" => null
|
||||
];
|
||||
$org = $this->market_sylive_organization_model->get($where);
|
||||
}elseif($group_id==2){ //店长
|
||||
$if_pid = 1;
|
||||
$where = [
|
||||
"organizationId" => $pid_user['organizationId']
|
||||
];
|
||||
$org = $this->market_sylive_organization_model->get($where);
|
||||
}
|
||||
$gw_title = $pid_user['uname'];
|
||||
$gw_slogan = $org['organizationName'];
|
||||
$gw_tel = $pid_user['mobile'];
|
||||
$logo = $pid_user['headimg'];
|
||||
}
|
||||
$info = [
|
||||
'bg' => "https://qs.haodian.cn/web/images/project/H5-ShiYu/mine-bg.jpg",
|
||||
'logo' => $logo,
|
||||
'if_pid' => $if_pid,
|
||||
'title' => $gw_title,
|
||||
'slogan' => $gw_slogan,
|
||||
'cust_tel' => $gw_tel,
|
||||
'introTitle' => '权益说明',
|
||||
'content' => $item['descrip'] ? $item['descrip'] : '',
|
||||
'order' => $order,
|
||||
'skey' => $this->data['skey']
|
||||
];
|
||||
$this->data['info'] = $info;
|
||||
$this->show_view('h5/market/sylive/ucenter/detail');
|
||||
}
|
||||
|
||||
public function ajax_order(){
|
||||
$params = $this->input->get();
|
||||
$page = $params['page'] ? $params['page'] : 1;
|
||||
$size = $params['size'] ? $params['size'] : 20;
|
||||
$where = [
|
||||
'activityId' => $this->a_id,
|
||||
'userId' => $this->uid,
|
||||
'type' => 0,
|
||||
'status' => 1
|
||||
];
|
||||
$total = $this->market_sylive_order_model->count($where);
|
||||
$lists = [];
|
||||
if($total){
|
||||
$rows = $this->market_sylive_order_model->select($where,'id desc',$page,$size);
|
||||
$item_ids = implode(',',array_unique(array_column($rows,'itemId')));
|
||||
$item_rows = [];
|
||||
if($item_ids){
|
||||
$item_rows = $this->market_sylive_items_model->map('itemId','',["itemId in ({$item_ids})"],'',0,0,'itemId,imgs');
|
||||
}
|
||||
foreach ($rows as $val) {
|
||||
$item = $item_rows[$val['itemId']] ? $item_rows[$val['itemId']][0] : [];
|
||||
$imgs = json_decode($item['imgs'],true);
|
||||
$img = $imgs['banner'][0] ? build_qiniu_image_url($imgs['banner'][0]) : '';
|
||||
$lists[] = [
|
||||
'sid' => $val['sid'],
|
||||
'img' => $img,
|
||||
'title' => $val['itemTitle'],
|
||||
'time' => date('Y.m.d H:i:s',strtotime($val['createTime'])),
|
||||
'price' => $val['totalPrice'],
|
||||
'url' => "/h5/market/sylive/ucenter/detail?skey={$this->skey}&id={$val['id']}"
|
||||
];
|
||||
}
|
||||
}
|
||||
$data = [
|
||||
'total' => $total,
|
||||
'lists' => $lists
|
||||
];
|
||||
$this->show_json($data,200);
|
||||
}
|
||||
|
||||
//修改地址
|
||||
public function edit_address(){
|
||||
$params = $this->input->post();
|
||||
if(!$params['region']||!$params['address']){
|
||||
$this->show_json([],400,'参数错误');
|
||||
}
|
||||
$order = $this->market_sylive_order_model->get(['userId'=>$this->uid,'status'=>1,'id'=>$params['id']]);
|
||||
if(!$order){
|
||||
$this->show_json([],400,'订单不存在');
|
||||
}
|
||||
$jsondata = json_decode($order['jsondata'],true);
|
||||
$jsondata['address']['region'] = $params['region'];
|
||||
$jsondata['address']['detail'] = $params['address'];
|
||||
$update = [
|
||||
'jsondata' => json_encode($jsondata,JSON_UNESCAPED_UNICODE)
|
||||
];
|
||||
$this->market_sylive_order_model->update($update,['id'=>$order['id']]);
|
||||
$this->show_json([],200,'保存成功');
|
||||
}
|
||||
}
|
||||
@@ -19,12 +19,7 @@
|
||||
<a class="block bg-999 pt20 pb20 text-center font-36 color-fff ulib-r10" href="javascript:;">活动已结束</a>
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<a class="bottom-opt pt15 bg-1a1a1a ulib-r750 text-center color-fff" href="/h5/market/sylive/act/ucenter?skey=<?=$info['skey']?>" v-if="info.is_pay">
|
||||
<i class="iconfont icon-wode text-middle font-36"></i>
|
||||
<div class="font-22">我的</div>
|
||||
</a>
|
||||
|
||||
<? $this->load->view('h5/market/sylive/nav_my') ?>
|
||||
<!--直播字幕-->
|
||||
<div>
|
||||
<div class="notice-shadow"></div>
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
<body class="bg-f6">
|
||||
<div id="app" ref="app">
|
||||
<div class="container relative bg-no-repeat bg-size-fullwidth bg-pos-top pb40" :style="'background-image:url('+info.bg+')'">
|
||||
<div class="relative height-710">
|
||||
<div class="pt90 pl100 pr100 fn-clear">
|
||||
<div class="fn-fl font-18">订单号 {{info.order.oid}}</div>
|
||||
<div class="fn-fr font-18"><i class="iconfont icon-time"></i> {{info.order.c_time}}</div>
|
||||
</div>
|
||||
<div class="uinfo absolute box-center pt15 pb15 pl30 pr30 font-32 ulib-r750 space-nowrap">{{info.order.uname}} · {{info.order.utel}}</div>
|
||||
<div class="odslogan absolute box-center text-center color-e4bc93 space-nowrap">
|
||||
<div class="pb10 bbs-1-e4bc93 font-48">{{info.order.slogan}}</div>
|
||||
<div class="mt10 font-24">{{info.order.valid_time}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="relative bg-fff mb30 ml30 mr30 inner40 pl150 pr220 ulib-r20 box-shadow-darkGray" v-if="info.if_pid">
|
||||
<img class="absolute left-0 box-middle ml35 imgsize-90X90 ulib-r750 bds-1-eee" :src="info.logo" :alt="info.title" />
|
||||
<div>
|
||||
<span class="font-36 text-middle">{{info.title}}</span>
|
||||
<span class="inline-block pl10 pr10 line-height-15 text-middle ulib-r750 font-22 color-fff bg-1a1a1a">专属顾问</span>
|
||||
</div>
|
||||
<div class="mt10 font-22 color-999">{{info.slogan}}</div>
|
||||
<a class="absolute right-0 box-middle mr30" :href="'tel:'+info.cust_tel">
|
||||
<img class="imgsize-60X60" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/tel.png" alt="拨打电话" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="relative bg-fff mb30 ml30 mr30 inner40 ulib-r20 box-shadow-darkGray">
|
||||
<div class="pb20 text-center"><div class="inline-block relative pl10 pr10 introTitle font-36"><span class="relative z-index-1">{{info.introTitle}}</span></div></div>
|
||||
<div class="line-height-17 font-28 color-666 text-break space-pre-line rich-text-img" v-html="info.content"></div>
|
||||
</div>
|
||||
</div>
|
||||
<a class="bottom-opt pt15 bg-1a1a1a ulib-r750 text-center color-fff" href="/h5/market/sylive/act?skey=<?=$info['skey']?>">
|
||||
<i class="iconfont icon-shouye text-middle font-36"></i>
|
||||
<div class="font-22">返回</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let hostUrl = ''
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
// info:{
|
||||
// bg:"https://qs.haodian.cn/web/images/project/H5-ShiYu/mine-bg.jpg",
|
||||
// logo:"https://qs.haodian.cn/web/images/project/H5-ShiYu/goodslogo.jpg",
|
||||
// title:"东风·纳米",
|
||||
// slogan:"东风EV·您的专属的福利官",
|
||||
// cust_tel:'15355555555',
|
||||
// introTitle:'权益说明',
|
||||
// content:'纳米BOX充分考虑到了用户的用车续航焦虑问题,新车采用了高密度电池组,CLTC续航331km。此外,纳米BOX全系支持快充、慢充功能,快充30分钟可以完成30~80%的补电,慢充4小时即可满电,轻松覆盖日常用车需求。纳米BOX充分考虑到了用户的用车续航焦虑问题,新车采用了高密度电池组,CLTC续航331km。此外,纳米BOX全系支持快充、慢充功能,快充30分钟可以完成30~80%的补电,慢充4小时即可满电,轻松覆盖日常用车需求。',
|
||||
// order:{
|
||||
// uname:'张大三',
|
||||
// utel:'13459***382',
|
||||
// slogan:'尊享您的直播好礼',
|
||||
// valid_time:'2022-08-01-2022-08-31',
|
||||
// oid:'XM202210111563586',
|
||||
// c_time:'2022-10-11 15:35:52',
|
||||
// }
|
||||
// },
|
||||
info : <?=json_encode($info,JSON_UNESCAPED_UNICODE)?>,
|
||||
},
|
||||
created(){
|
||||
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
let that = this
|
||||
let swiper = new Swiper('.goods-banner .swiper-container', {
|
||||
//loop: true,
|
||||
//autoHeight: true,
|
||||
pagination: {
|
||||
el: '.swiper-pagination',
|
||||
type: 'fraction',
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.swiper-button-next',
|
||||
prevEl: '.swiper-button-prev',
|
||||
},
|
||||
on: {
|
||||
slideChangeTransitionEnd: function(){
|
||||
that.activeIndex = this.activeIndex
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
|
||||
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<?=$this->load->view('h5/market/sylive/share_script')?>
|
||||
</body>
|
||||
@@ -0,0 +1,44 @@
|
||||
<body class="bg-f6">
|
||||
<div class="height-500 fixed left-0 right-0 top-0 z-index-0 bg-1a1a1a"></div>
|
||||
<div class="bg-f6" id="app" ref="app">
|
||||
<div class="container relative">
|
||||
<div class="relative bg-fff mt30 mb30 ml30 mr30 inner40 ulib-r20 box-shadow-darkGray">
|
||||
<div class="mt10 pb20 text-center"><div class="inline-block relative pl10 pr10 introTitle font-36"><span class="relative z-index-1">关于用户门票须知</span></div></div>
|
||||
<div class="line-height-20 font-28 color-666 text-break rich-text-img">
|
||||
<div class="mt10 text-index-56">尊敬的用户:感谢您使用本平台提供的互联网信息服务,在您使用本平台提供的在线服务前,请您仔细阅读本服务条款,未成年人应在法定监护人陪同下阅读,在您熟读本条款后请勾选已阅读并同意支付,即视为接受本服务各项条款。相关条款具体规定如下:</div>
|
||||
<div class="mt10 relative pl40">
|
||||
<span class="absolute left-0 top-0">1、</span>
|
||||
您在本平台上支付的0.99元为纳米BOX 11.11对称嗨购日参与门票,支付的199元为纳米BOX 11.11对称嗨购日VIP门票费用(以下统一简称为”门票”)。门票获取开始时间为2022年11月11日9:00,截止时间为2022年11月11日22:00,一个用户账号(同一手机号码)最多可购买两种门票各一张,且门票权益不可叠加,用户可享受本平台的最高权益为199元纳米BOX 11.11对称嗨购日VIP门票权益。请您注意在规定活动时间内完成支付,本平台为官方指定独家支付平台,其他平台均不支持本项服务。</div>
|
||||
<div class="mt10 relative pl40">
|
||||
<span class="absolute left-0 top-0">2、</span>
|
||||
0.99元纳米BOX 11.11对称嗨购日参与门票和199元纳米BOX 11.11对称嗨购日VIP门票权益说明如下:</div>
|
||||
<div class="mt10 relative pl40">
|
||||
<div class="absolute left-0 top-0 mt20 ml5 imgsize-18X18 bg-333 ulib-r750"></div>
|
||||
0.99元纳米BOX 11.11对称嗨购日参与门票:当您完成支付即有机会获得平台提供的价值99元精美礼品一份。</div>
|
||||
<div class="mt10 relative pl40">
|
||||
<div class="absolute left-0 top-0 mt20 ml5 imgsize-18X18 bg-333 ulib-r750"></div>
|
||||
199元纳米BOX 11.11对称嗨购日VIP门票:当您完成支付即可获得价值100元京东卡一张以及99元精美礼品一份。</div>
|
||||
<div class="mt10 text-index-56">当您确认完成支付0.99元纳米BOX 11.11对称嗨购日参与门票,即视为您已接受平台为您提供的99元精品礼品权益锁定;当您确认完成支付199元纳米BOX 11.11对称嗨购日VIP门票,即视为您已接受平台为您提供的等值礼品权益(价值100元京东卡一张以及99元精美礼品一份)</div>
|
||||
<div class="mt10 text-index-56">感谢您的理解与支持,完成门票支付将视为您已同意接受以上各项权益说明条款,故除去不可抗力因素影响,本平台不提供退款服务。</div>
|
||||
<div class="mt10 relative pl40">
|
||||
<span class="absolute left-0 top-0">3、</span>
|
||||
当您同意接受0.99元纳米BOX 11.11对称嗨购日参与门票和199元纳米BOX 11.11对称嗨购日VIP门票权益说明,并进入支付页面时,平台支付页面将会弹出信息框,需要您在弹窗信息框内填写个人详细邮寄地址,以便我们为您邮寄权益礼品,请您注意个人信息的正确填写,若信息填写不全或信息不正确,将视为您主动放弃本次权益,礼品将不再邮寄。</div>
|
||||
<div class="mt10 relative pl40">
|
||||
<span class="absolute left-0 top-0">4、</span>
|
||||
奖品发放:0.99元纳米BOX 11.11对称嗨购日参与门票礼品权益,即价值99元精美礼品一份,将在您成功完成购车后30个自然日内邮寄发出;199元纳米BOX 11.11对称嗨购日VIP门票礼品权益,即价值100元京东卡一张和99元精美礼品一份,将在本次活动结束后30个自然日内邮寄发出。</div>
|
||||
<div class="mt10 relative pl40">
|
||||
<span class="absolute left-0 top-0">5、</span>
|
||||
本协议受中华人民共和国(指中国大陆,不包含香港特别行政区、澳门特别行政区及台湾地区)法律约束并据其进行解释。</div>
|
||||
<div class="mt10 relative pl40">
|
||||
<span class="absolute left-0 top-0">6、</span>
|
||||
以上条款的最终解释权归本平台所有,因本协议引起的以及与本协议有关的一切争议,双方应通过友好协商或联系在线客服咨询解决;如仍有争议, 双方均有权将争议提交至武汉经济技术开发区人民法院诉讼解决。</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a class="bottom-opt pt15 bg-1a1a1a ulib-r750 text-center color-fff" href="javascript:history.back(-1)">
|
||||
<i class="iconfont icon-shouye text-middle font-36"></i>
|
||||
<div class="font-22">返回</div>
|
||||
</a>
|
||||
</div>
|
||||
</body>
|
||||
@@ -0,0 +1,505 @@
|
||||
<link rel="stylesheet" href="https://qs.haodian.cn/web/javascript/LArea/css/LArea.css">
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/LArea/js/LAreaData1.js"></script>
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/LArea/js/LAreaData2.js"></script>
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/LArea/js/LArea.js"></script>
|
||||
<body class="bg-f6">
|
||||
<div id="app" ref="app">
|
||||
<div class="container relative pb130">
|
||||
<!--轮播-->
|
||||
<div class="goods-banner relative imgsize-750X680 z-index-0" v-if='info.banner && info.banner.length>1'>
|
||||
<div class="swiper-container">
|
||||
<div class="swiper-wrapper">
|
||||
<div class="swiper-slide" v-for="item in info.banner">
|
||||
<img class="imgsize-750X680" :src="item" alt="#" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="swiper-pagination ulib-rl750 font-22 color-fff"></div>
|
||||
</div>
|
||||
<div v-else><img class="imgsize-750X680" :src="info.banner[0]" alt="#" /></div>
|
||||
<!--end 轮播-->
|
||||
<div class="relative pl30 pr30 pb30 z-index-1 goods-con">
|
||||
<div class="relative bg-fff mb30 ml30 mr30 inner40 pr220 ulib-r20 box-shadow-darkGray">
|
||||
<div class="font-36">{{info.title}}</div>
|
||||
<div class="mt10 font-22 color-999">{{info.validity}}</div>
|
||||
<div class="absolute right-0 box-middle mr30 color-c4302c">
|
||||
<span class="font-28">¥</span>
|
||||
<span class="font-64">{{info.price}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="relative bg-fff mb30 ml30 mr30 inner40 ulib-r20 box-shadow-darkGray">
|
||||
<div class="pb20 text-center">
|
||||
<div class="inline-block relative pl10 pr10 introTitle font-36">
|
||||
<span class="relative z-index-1">{{info.introTitle}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="line-height-17 font-28 color-666 text-break space-pre-line rich-text-img" v-html="info.content"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="fixed left-0 bottom-0 right-0 inner30 bg-fff z-index-2" >
|
||||
<template v-if="info.s_time>0">
|
||||
<a class="block bg-999 pt20 pb20 text-center color-fff ulib-r10" href="javascript:void(0)">
|
||||
<div class="font-32">立即支付<span>{{info.price}}</span>元</div>
|
||||
<div class="mt10 font-20 color-fff" v-html="showTime"></div>
|
||||
</a>
|
||||
</template>
|
||||
<template v-else-if="info.e_time>0">
|
||||
<a class="block bg-1a1a1a pt20 pb20 text-center color-fff ulib-r10" v-if="info.stock>0" @click="showReg" href="javascript:void(0)">
|
||||
<div class="font-32">立即支付<span>{{info.price}}</span>元</div>
|
||||
<div class="mt10 font-20 color-888" v-html="showTime"></div>
|
||||
</a>
|
||||
<div class="bg-999 pt30 pb30 text-center color-fff ulib-r10" v-else>已售罄</div>
|
||||
</template>
|
||||
<div class="bg-999 pt30 pb30 text-center color-fff ulib-r10" v-else>活动已结束</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="msg fn-hide" :style="isShowReg?'display:block':'display:none'" v-if="isShowReg">
|
||||
<div class="msgBg" @click="closeReg"></div>
|
||||
<div class="msgMain">
|
||||
<div class="content">
|
||||
<div class="word">
|
||||
<div class="relative bg-f6 ulib-r10">
|
||||
<input class="wp100 inner30 font-30 bg-f6 border-none ulib-r10" type="text" v-model="name" placeholder="请输入您的姓名" />
|
||||
</div>
|
||||
<div class="mt30 relative bg-f6 ulib-r10">
|
||||
<input class="wp100 inner30 font-30 bg-f6 border-none ulib-r10" type="tel" v-model="telPhone" placeholder="请输入手机号" />
|
||||
</div>
|
||||
<div class="mt30 relative bg-f6 ulib-r10 pr200">
|
||||
<div><input class="wp100 inner30 font-30 bg-f6 border-none ulib-r10" type="number" v-model="vCode" placeholder="请输入验证码" /></div>
|
||||
<a :class="[codeState ?'color-333':'color-999','absolute right-0 mr20 box-middle font-30']" @click="getcode()">{{codeTx}}</a>
|
||||
</div>
|
||||
<div class="mt30 fn-flex" v-if="info.need_shop">
|
||||
<select class="fn-flex-item height-70 wp25 pt10 pb10 mr20 select-more ulib-r10 font-30" v-model="province">
|
||||
<option value="">-选择省-</option>
|
||||
<option v-for="item in province_arr" :value="item.name">-{{item.name}}-</option>
|
||||
</select>
|
||||
<select class="fn-flex-item height-70 wp25 pt10 pb10 mr20 select-more ulib-r10 font-30" v-model="city">
|
||||
<option value="">-选择市-</option>
|
||||
<option v-for="item in city_arr" :value="item.name">-{{item.name}}-</option>
|
||||
</select>
|
||||
<select class="fn-flex-item height-70 wp25 pt10 pb10 select-more ulib-r10 font-30" v-model="biz">
|
||||
<option value="">-选择店-</option>
|
||||
<option v-for="item in biz_arr" :value="item.name">-{{item.name}}-</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mt30 pl5 font-26 color-666">
|
||||
<label class="text-middle"><input class="text-middle" type="checkbox" v-model="isXYChecked" />
|
||||
<span class="text-middle ml5">我已阅读并同意</span>
|
||||
</label>
|
||||
<a class="text-middle" href="/h5/market/sylive/item/agreement">《关于用户门票须知》</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt30">
|
||||
<a class="block pt25 pb25 bg-1a1a1a text-center font-32 color-fff ulib-r10" @click="toPay()">确定支付</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="msg fn-hide" :style="isShowSuccess?'display:block':'display:none'" v-if="isShowSuccess">
|
||||
<div class="msgBg" @click="closeSuccess()"></div>
|
||||
<div class="msgMain">
|
||||
<div class="content">
|
||||
<div class="word text-center">
|
||||
<div class="font-36">支付成功</div>
|
||||
<div class="mt15 font-22 color-999">请输入您的地址,我们会第一时间为您发出!</div>
|
||||
<div class="mt30 relative bg-f6 ulib-r10">
|
||||
<input id="region" class="wp100 inner30 font-28 bg-f6 border-none ulib-r10" type="text" readonly="" v-model="region" placeholder="选择省/市/区" />
|
||||
<input id="regionvalue" type="hidden" v-model="regionvalue"/>
|
||||
</div>
|
||||
<div class="mt30 relative bg-f6 ulib-r10">
|
||||
<input class="wp100 inner30 font-28 bg-f6 border-none ulib-r10" type="text" v-model="address" placeholder="请输入详细地址" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt30">
|
||||
<a class="block pt25 pb25 bg-1a1a1a text-center font-32 color-fff ulib-r10" @click="postAddress()">确认</a>
|
||||
</div>
|
||||
<div class="mt30 text-center">
|
||||
<a class="font-24 text-underline" @click="closeSuccess()">不了,看完直播再说></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let hostUrl = ''
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
// info:{
|
||||
// title:"纳米Box 轻Young空间",
|
||||
// e_time: 5,
|
||||
// price:9.9,
|
||||
// validity:'有效期 2022-08-01 -2022 -08-31',
|
||||
// introTitle:'权益说明',
|
||||
// content:'纳米BOX充分考虑到了用户的用车续航焦虑问题,新车采用了高密度电池组,CLTC续航331km。此外,纳米BOX全系支持快充、慢充功能,快充30分钟可以完成30~80%的补电,慢充4小时即可满电,轻松覆盖日常用车需求。纳米BOX充分考虑到了用户的用车续航焦虑问题,新车采用了高密度电池组,CLTC续航331km。此外,纳米BOX全系支持快充、慢充功能,快充30分钟可以完成30~80%的补电,慢充4小时即可满电,轻松覆盖日常用车需求。',
|
||||
// "banner": [
|
||||
// "https://img.zcool.cn/community/0144975f5d8a2711013e3187fe2bb7.jpg@1280w_1l_2o_100sh.jpg",
|
||||
// "https://qs.haodian.cn/web/images/project/H5-ShiYu/upload/v-5.jpg",
|
||||
// ],
|
||||
// },
|
||||
info : <?=json_encode($info)?>,
|
||||
bundleIntervalEvent: '',//倒计时
|
||||
isShowReg: false,
|
||||
name: '',
|
||||
telPhone: '',
|
||||
isSubmiting: false,
|
||||
vCode:'',
|
||||
codeState:true,
|
||||
codeTx:'立即获取',
|
||||
isXYChecked: false,
|
||||
region:'',
|
||||
regionvalue:'',
|
||||
address:'',
|
||||
isShowSuccess: false,
|
||||
province_arr:<?=json_encode($province_arr,JSON_UNESCAPED_UNICODE)?>,
|
||||
city_arr:<?=json_encode($city_arr,JSON_UNESCAPED_UNICODE)?>,
|
||||
biz_arr:<?=json_encode($biz_arr,JSON_UNESCAPED_UNICODE)?>,
|
||||
province:'',
|
||||
city:'',
|
||||
biz:'',
|
||||
oid:0,
|
||||
},
|
||||
created(){
|
||||
|
||||
},
|
||||
computed: {
|
||||
//用计算属性显示结果
|
||||
showTime() {
|
||||
//剩余秒数<=0
|
||||
if(this.info.s_time>0){
|
||||
let day = Math.floor(this.info.s_time / 86400);
|
||||
let hour = Math.floor((this.info.s_time % 86400) / 3600);
|
||||
let min = Math.floor(((this.info.s_time % 86400) % 3600) / 60);
|
||||
let sec = Math.floor(((this.info.s_time % 86400) % 3600) % 60);
|
||||
if(day>0){
|
||||
return ("<span class='text-middle'>距抢购开始还有</span><em class='text-middle pl5 pr5'>"+day+ "</em><em class='text-middle'>天</em><em class='text-middle pl5 pr5'>"+(hour < 10 ? "0" : "") + hour + "</em><em class='text-middle'>时</em><em class='text-middle pl5 pr5'>" + (min < 10 ? "0" : "") + min + "</em><em class='text-middle'>分</em><em class='text-middle pl5 pr5'>" + (sec <
|
||||
10 ? "0" : "") + sec+"</em><em class='text-middle'>秒</em>");
|
||||
}else if(hour>0){
|
||||
return ("<span class='text-middle'>距抢购开始还有</span><em class='text-middle color-ff7200 pl5 pr5'>"+(hour < 10 ? "0" : "") + hour + "</em><em class='text-middle'>时</em><em class='text-middle color-ff7200 pl5 pr5'>" + (min < 10 ? "0" : "") + min + "</em><em class='text-middle'>分</em><em class='text-middle color-ff7200 pl5 pr5'>" + (sec <
|
||||
10 ? "0" : "") + sec+"</em><em class='text-middle'>秒</em>");
|
||||
}else if(min>0){
|
||||
return ("<span class='text-middle'>距抢购开始还有</span><em class='text-middle color-ff7200 pl5 pr5'>" + (min < 10 ? "0" : "") + min + "</em><em class='text-middle'>分</em><em class='text-middle color-ff7200 pl5 pr5'>" + (sec <
|
||||
10 ? "0" : "") + sec+"</em><em class='text-middle'>秒</em>");
|
||||
}else if(sec>0){
|
||||
return ("<span class='text-middle'>距抢购开始还有</span><em class='text-middle color-ff7200 pl5 pr5'>" + (sec <
|
||||
10 ? "0" : "") + sec+"</em><em class='text-middle'>秒</em>");
|
||||
}
|
||||
}else if(this.info.e_time <= 0) {
|
||||
return "活动已结束";
|
||||
} else {// 剩余秒数>0
|
||||
let day = Math.floor(this.info.e_time / 86400);
|
||||
let hour = Math.floor((this.info.e_time % 86400) / 3600);
|
||||
let min = Math.floor(((this.info.e_time % 86400) % 3600) / 60);
|
||||
let sec = Math.floor(((this.info.e_time % 86400) % 3600) % 60);
|
||||
if(day>0){
|
||||
return ("<span class='text-middle'>距抢购结束还有</span><em class='text-middle pl5 pr5'>"+day+ "</em><em class='text-middle'>天</em><em class='text-middle pl5 pr5'>"+(hour < 10 ? "0" : "") + hour + "</em><em class='text-middle'>时</em><em class='text-middle pl5 pr5'>" + (min < 10 ? "0" : "") + min + "</em><em class='text-middle'>分</em><em class='text-middle pl5 pr5'>" + (sec <
|
||||
10 ? "0" : "") + sec+"</em><em class='text-middle'>秒</em>");
|
||||
}else if(hour>0){
|
||||
return ("<span class='text-middle'>距抢购结束还有</span><em class='text-middle color-ff7200 pl5 pr5'>"+(hour < 10 ? "0" : "") + hour + "</em><em class='text-middle'>时</em><em class='text-middle color-ff7200 pl5 pr5'>" + (min < 10 ? "0" : "") + min + "</em><em class='text-middle'>分</em><em class='text-middle color-ff7200 pl5 pr5'>" + (sec <
|
||||
10 ? "0" : "") + sec+"</em><em class='text-middle'>秒</em>");
|
||||
}else if(min>0){
|
||||
return ("<span class='text-middle'>距抢购结束还有</span><em class='text-middle color-ff7200 pl5 pr5'>" + (min < 10 ? "0" : "") + min + "</em><em class='text-middle'>分</em><em class='text-middle color-ff7200 pl5 pr5'>" + (sec <
|
||||
10 ? "0" : "") + sec+"</em><em class='text-middle'>秒</em>");
|
||||
}else if(sec>0){
|
||||
return ("<span class='text-middle'>距抢购结束还有</span><em class='text-middle color-ff7200 pl5 pr5'>" + (sec <
|
||||
10 ? "0" : "") + sec+"</em><em class='text-middle'>秒</em>");
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
let that = this
|
||||
let swiper = new Swiper('.goods-banner .swiper-container', {
|
||||
//loop: true,
|
||||
//autoHeight: true,
|
||||
pagination: {
|
||||
el: '.swiper-pagination',
|
||||
type: 'fraction',
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.swiper-button-next',
|
||||
prevEl: '.swiper-button-prev',
|
||||
},
|
||||
on: {
|
||||
slideChangeTransitionEnd: function(){
|
||||
that.activeIndex = this.activeIndex
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
//倒计时
|
||||
this.bundleIntervalEvent = setInterval(this.intervalEvent, 1000);
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.bundleIntervalEvent);
|
||||
},
|
||||
methods: {
|
||||
showReg: function() {
|
||||
this.isShowReg = true
|
||||
},
|
||||
closeReg: function() {
|
||||
this.isShowReg = false
|
||||
},
|
||||
countDownTime(time) {
|
||||
let that = this;
|
||||
if (time > 1) {
|
||||
time--;
|
||||
this.codeState = false;
|
||||
this.codeTx = time + "s后重新获取";
|
||||
Timer = setTimeout(function() {
|
||||
that.countDownTime(time);
|
||||
}, 1000)
|
||||
} else {
|
||||
clearTimeout(Timer);
|
||||
that.codeState = true;
|
||||
that.codeTx = "立即获取";
|
||||
}
|
||||
},
|
||||
|
||||
getcode() {
|
||||
if(!this.codeState) return;
|
||||
if (!/^1[3456789]\d{9}$/.test(this.telPhone)) {
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "请输入正确手机号"
|
||||
});
|
||||
} else {
|
||||
//按钮倒计时
|
||||
var that = this
|
||||
$.post('/h5/market/sylive/item/get_code',{'mobile':that.telPhone},function (response){
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: response.msg
|
||||
});
|
||||
if(response.code==200){
|
||||
that.countDownTime(61)
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
},
|
||||
toPay() {
|
||||
var that = this
|
||||
if(this.info.need_shop){
|
||||
if(!this.province){
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "请选择省份"
|
||||
});
|
||||
return ''
|
||||
}
|
||||
if(!this.city){
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "请选择城市"
|
||||
});
|
||||
return ''
|
||||
}
|
||||
if(!this.biz){
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "请选择门店"
|
||||
});
|
||||
return ''
|
||||
}
|
||||
}
|
||||
if (!this.name) {
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "请输入您的姓名"
|
||||
});
|
||||
}else if (!/^1[3456789]\d{9}$/.test(this.telPhone)) {
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "请输入正确手机号"
|
||||
});
|
||||
}else if(!this.vCode) {
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "请输入验证码"
|
||||
});
|
||||
}else if(!this.isXYChecked) {
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "请阅读并同意《关于用户门票须知》"
|
||||
});
|
||||
}else{
|
||||
if(that.isSubmit){
|
||||
return ''
|
||||
}
|
||||
|
||||
that.isSubmiting = true
|
||||
var params = {
|
||||
'skey':'<?=$info['skey']?>',
|
||||
'itemId':'<?=$info['itemId']?>',
|
||||
'name':that.name,
|
||||
'telPhone':that.telPhone,
|
||||
'code' : that.vCode,
|
||||
'province' : that.province,
|
||||
'city' : that.city,
|
||||
'biz' : that.biz
|
||||
}
|
||||
$.post('/h5/market/sylive/item/post_pay',params,function (res){
|
||||
that.isSubmiting = false
|
||||
if(res.code==200){
|
||||
that.isShowReg = false
|
||||
var jsondata = res.data.wxjson;
|
||||
that.oid = res.data.oid
|
||||
WeixinJSBridge.invoke('getBrandWCPayRequest', jsondata, function(res){
|
||||
if(res.err_msg == "get_brand_wcpay_request:ok" ){//前端返回成功支付
|
||||
that.showSuccess()
|
||||
}else{
|
||||
mDialog.msg({content: "支付失败"});
|
||||
}
|
||||
}
|
||||
);
|
||||
}else{
|
||||
mDialog.msg({content: res.msg});
|
||||
}
|
||||
},'json')
|
||||
}
|
||||
},
|
||||
|
||||
//直播倒计时
|
||||
intervalEvent() {
|
||||
if (this.info.s_time > 0){
|
||||
this.info.s_time--;
|
||||
}else if (this.info.e_time > 0) {
|
||||
this.info.e_time--;
|
||||
} else {
|
||||
clearInterval(this.bundleIntervalEvent);
|
||||
}
|
||||
},
|
||||
|
||||
//关闭支付成功提示
|
||||
closeSuccess: function() {
|
||||
this.isShowSuccess = false
|
||||
},
|
||||
showSuccess: function (){
|
||||
this.isShowSuccess = true;
|
||||
//选择省市初始化
|
||||
setTimeout(function () {
|
||||
let area = new LArea();
|
||||
area.init({
|
||||
'trigger': '#region', //触发选择控件的文本框,同时选择完毕后name属性输出到该位置
|
||||
'valueTo': '#regionvalue', //选择完毕后id属性输出到该位置
|
||||
'keys': {
|
||||
id: 'value',
|
||||
name: 'text'
|
||||
}, //绑定数据源相关字段 id对应valueTo的value属性输出 name对应trigger的value属性输出
|
||||
'type': 2,
|
||||
'data': [provs_data, citys_data, dists_data]
|
||||
});
|
||||
if(that.region !=''){
|
||||
for(var i in provs_data){
|
||||
if(provs_data[i].text==that.region.split(",")[0]){
|
||||
var x=i;
|
||||
var city=citys_data[provs_data[i].value];
|
||||
for(var j in city){
|
||||
if(city[j].text==that.region.split(",")[1]){
|
||||
var y=j;
|
||||
var district=dists_data[city[j].value];
|
||||
for(var k in district){
|
||||
if(district[k].text==that.region.split(",")[2]){
|
||||
var z=k;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
area.value=[x,y,z];//控制初始位置,注意:该方法并不会影响到input的value
|
||||
}else{
|
||||
area.value=[12,1,1];//控制初始位置,注意:该方法并不会影响到input的value
|
||||
}
|
||||
area.success = function(){
|
||||
that.regionvalue = $("#regionvalue").val();
|
||||
}
|
||||
}, 200)
|
||||
},
|
||||
//提交地址
|
||||
postAddress() {
|
||||
if (this.isSubmiting) return;
|
||||
if (!this.region) {
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "请选择所在地区"
|
||||
});
|
||||
}else if (!this.address) {
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "请输入详细地址"
|
||||
});
|
||||
}else{
|
||||
this.isSubmiting = true
|
||||
var params = {
|
||||
'skey':'<?=$skey?>',
|
||||
'region':this.region,
|
||||
'address':this.address,
|
||||
'id':this.oid
|
||||
}
|
||||
var that = this;
|
||||
$.post('/h5/market/sylive/ucenter/edit_address',params,function (res){
|
||||
that.isSubmiting = false
|
||||
if(res.code==200){
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: res.msg,
|
||||
onClose:function(){
|
||||
window.location = "/h5/market/sylive/ucenter?skey=<?=$info['skey']?>";
|
||||
}
|
||||
});
|
||||
}else{
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: res.msg
|
||||
});
|
||||
}
|
||||
},'json');
|
||||
}
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'province': function (nv, ov) {
|
||||
var vm = this;
|
||||
vm.city_arr = vm.biz_arr = {}
|
||||
vm.biz = vm.city = ''
|
||||
if (nv != '') {
|
||||
$.get('/h5/market/sylive/item/biz_info',{'type':'city','p_name':vm.province},function (res){
|
||||
vm.city_arr = res.data.lists
|
||||
},'json')
|
||||
}
|
||||
},
|
||||
'city': function (nv, ov) {
|
||||
var vm = this;
|
||||
vm.biz_arr = {};
|
||||
vm.biz = ''
|
||||
if (nv != '') {
|
||||
$.get('/h5/market/sylive/item/biz_info',{'type':'biz','p_name':vm.province,'c_name':vm.city},function (res){
|
||||
vm.biz_arr = res.data.lists
|
||||
},'json')
|
||||
}
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<?=$this->load->view('h5/market/sylive/share_script')?>
|
||||
</body>
|
||||
@@ -0,0 +1,4 @@
|
||||
<a class="bottom-opt pt15 bg-1a1a1a ulib-r750 text-center color-fff" href="/h5/market/sylive/ucenter?skey=<?=$skey?>">
|
||||
<i class="iconfont icon-wode text-middle font-36"></i>
|
||||
<div class="font-22">我的</div>
|
||||
</a>
|
||||
@@ -0,0 +1,230 @@
|
||||
<link rel="stylesheet" href="https://qs.haodian.cn/web/javascript/LArea/css/LArea.css">
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/LArea/js/LAreaData1.js"></script>
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/LArea/js/LAreaData2.js"></script>
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/LArea/js/LArea.js"></script>
|
||||
<body class="bg-f6">
|
||||
<div id="app" ref="app">
|
||||
<div class="container relative bg-no-repeat bg-size-fullwidth bg-pos-top pb40" :style="'background-image:url('+info.bg+')'">
|
||||
<div class="relative height-710">
|
||||
<div class="pt90 pl100 pr100 fn-clear">
|
||||
<div class="fn-fl font-18">订单号 {{info.order.sid}}</div>
|
||||
<div class="fn-fr font-18"><i class="iconfont icon-time"></i> {{info.order.c_time}}</div>
|
||||
</div>
|
||||
<div class="uinfo absolute wp100 pr100 pl100">
|
||||
<div class="space-nowrap"><span>{{info.order.uname}}</span><span class="font-28">·{{info.order.utel}}</span></div>
|
||||
<div class="mt10 uinfoadd font-22 ulib-rl750" v-if="show_address" @click="showAdd()"><i class="iconfont mr5 icon-dizhi"></i>{{show_address}}</div>
|
||||
<div class="mt10 uinfoadd font-22 ulib-rl750" v-else @click="showAdd()"><i class="iconfont mr5 icon-zengjia"></i>收货地址</div>
|
||||
</div>
|
||||
<!-- <div class="uinfo absolute box-center pt15 pb15 pl30 pr30 font-32 ulib-r750 space-nowrap">{{info.order.uname}} · {{info.order.utel}}</div>-->
|
||||
<div class="odslogan absolute box-center text-center color-e4bc93 space-nowrap">
|
||||
<div class="pb10 bbs-1-e4bc93 font-48">{{info.order.slogan}}</div>
|
||||
<div class="mt10 font-24">{{info.order.valid_time}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="relative bg-fff mb30 ml30 mr30 inner40 pl150 pr220 ulib-r20 box-shadow-darkGray" v-if="info.if_pid">
|
||||
<img class="absolute left-0 box-middle ml35 imgsize-90X90 ulib-r750 bds-1-eee" :src="info.logo" :alt="info.title" />
|
||||
<div>
|
||||
<span class="font-36 text-middle">{{info.title}}</span>
|
||||
<span class="inline-block pl10 pr10 line-height-15 text-middle ulib-r750 font-22 color-fff bg-1a1a1a">专属顾问</span>
|
||||
</div>
|
||||
<div class="mt10 font-22 color-999">{{info.slogan}}</div>
|
||||
<a class="absolute right-0 box-middle mr30" :href="'tel:'+info.cust_tel">
|
||||
<img class="imgsize-60X60" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/tel.png" alt="拨打电话" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="relative bg-fff mb30 ml30 mr30 inner40 ulib-r20 box-shadow-darkGray">
|
||||
<div class="pb20 text-center"><div class="inline-block relative pl10 pr10 introTitle font-36"><span class="relative z-index-1">{{info.introTitle}}</span></div></div>
|
||||
<div class="line-height-17 font-28 color-666 text-break space-pre-line rich-text-img" v-html="info.content"></div>
|
||||
</div>
|
||||
</div>
|
||||
<? $this->load->view('h5/market/sylive/nav_my') ?>
|
||||
|
||||
<div class="msg fn-hide" :style="isShowAdd?'display:block':'display:none'" v-if="isShowAdd">
|
||||
<div class="msgBg" @click="isShowAdd=!isShowAdd"></div>
|
||||
<div class="msgMain">
|
||||
<div class="content">
|
||||
<div class="word text-center">
|
||||
<div class="mt15 font-22 color-999">请输入您的地址,我们会第一时间为您发出!</div>
|
||||
<div class="mt30 relative bg-f6 ulib-r10">
|
||||
<input id="region" class="wp100 inner30 font-28 bg-f6 border-none ulib-r10" type="text" readonly="" v-model="region" placeholder="选择省/市/区" />
|
||||
<input id="regionvalue" type="hidden" v-model="regionvalue"/>
|
||||
</div>
|
||||
<div class="mt30 relative bg-f6 ulib-r10">
|
||||
<input class="wp100 inner30 font-28 bg-f6 border-none ulib-r10" type="text" v-model="address" placeholder="请输入详细地址" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt30">
|
||||
<a class="block pt25 pb25 bg-1a1a1a text-center font-32 color-fff ulib-r10" @click="postAddress()">确认</a>
|
||||
</div>
|
||||
<div class="mt30 text-center">
|
||||
<a class="font-24 text-underline" @click="isShowAdd=!isShowAdd">不了,看完直播再说></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
let hostUrl = ''
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
// info:{
|
||||
// bg:"https://qs.haodian.cn/web/images/project/H5-ShiYu/mine-bg.jpg",
|
||||
// logo:"https://qs.haodian.cn/web/images/project/H5-ShiYu/goodslogo.jpg",
|
||||
// title:"东风·纳米",
|
||||
// slogan:"东风EV·您的专属的福利官",
|
||||
// cust_tel:'15355555555',
|
||||
// introTitle:'权益说明',
|
||||
// content:'纳米BOX充分考虑到了用户的用车续航焦虑问题,新车采用了高密度电池组,CLTC续航331km。此外,纳米BOX全系支持快充、慢充功能,快充30分钟可以完成30~80%的补电,慢充4小时即可满电,轻松覆盖日常用车需求。纳米BOX充分考虑到了用户的用车续航焦虑问题,新车采用了高密度电池组,CLTC续航331km。此外,纳米BOX全系支持快充、慢充功能,快充30分钟可以完成30~80%的补电,慢充4小时即可满电,轻松覆盖日常用车需求。',
|
||||
// order:{
|
||||
// uname:'张大三',
|
||||
// utel:'13459***382',
|
||||
// slogan:'尊享您的直播好礼',
|
||||
// valid_time:'2022-08-01-2022-08-31',
|
||||
// oid:'XM202210111563586',
|
||||
// c_time:'2022-10-11 15:35:52',
|
||||
// }
|
||||
// },
|
||||
info : <?=json_encode($info,JSON_UNESCAPED_UNICODE)?>,
|
||||
region:'<?=$info['order']['region']?>',
|
||||
regionvalue:'',
|
||||
address:'<?=$info['order']['detail']?>',
|
||||
show_address:'<?=$info['order']['region'].' '.$info['order']['detail']?>',
|
||||
isShowAdd: false,
|
||||
isSubmiting: false,
|
||||
},
|
||||
created(){
|
||||
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
let that = this
|
||||
let swiper = new Swiper('.goods-banner .swiper-container', {
|
||||
//loop: true,
|
||||
//autoHeight: true,
|
||||
pagination: {
|
||||
el: '.swiper-pagination',
|
||||
type: 'fraction',
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.swiper-button-next',
|
||||
prevEl: '.swiper-button-prev',
|
||||
},
|
||||
on: {
|
||||
slideChangeTransitionEnd: function(){
|
||||
that.activeIndex = this.activeIndex
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
showAdd: function() {
|
||||
this.isShowAdd = true
|
||||
let that = this;
|
||||
//选择省市初始化
|
||||
setTimeout(function () {
|
||||
let area = new LArea();
|
||||
area.init({
|
||||
'trigger': '#region', //触发选择控件的文本框,同时选择完毕后name属性输出到该位置
|
||||
'valueTo': '#regionvalue', //选择完毕后id属性输出到该位置
|
||||
'keys': {
|
||||
id: 'value',
|
||||
name: 'text'
|
||||
}, //绑定数据源相关字段 id对应valueTo的value属性输出 name对应trigger的value属性输出
|
||||
'type': 2,
|
||||
'data': [provs_data, citys_data, dists_data]
|
||||
});
|
||||
|
||||
if(that.region !=''){
|
||||
for(var i in provs_data){
|
||||
if(provs_data[i].text==that.region.split(",")[0]){
|
||||
var x=i;
|
||||
var city=citys_data[provs_data[i].value];
|
||||
for(var j in city){
|
||||
if(city[j].text==that.region.split(",")[1]){
|
||||
var y=j;
|
||||
var district=dists_data[city[j].value];
|
||||
for(var k in district){
|
||||
if(district[k].text==that.region.split(",")[2]){
|
||||
var z=k;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
area.value=[x,y,z];//控制初始位置,注意:该方法并不会影响到input的value
|
||||
}else{
|
||||
//area.value=[12,1,1];//控制初始位置,注意:该方法并不会影响到input的value
|
||||
}
|
||||
area.success = function(){
|
||||
that.regionvalue = $("#regionvalue").val();
|
||||
}
|
||||
}, 200)
|
||||
},
|
||||
//提交地址
|
||||
postAddress() {
|
||||
if (this.isSubmiting) return;
|
||||
if (!this.region) {
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "请选择所在地区"
|
||||
});
|
||||
}else if (!this.address) {
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "请输入详细地址"
|
||||
});
|
||||
}else{
|
||||
this.isSubmiting = true
|
||||
var params = {
|
||||
'skey':'<?=$skey?>',
|
||||
'region':this.region,
|
||||
'address':this.address,
|
||||
'id':this.info.order.id
|
||||
}
|
||||
var that = this;
|
||||
$.post('/h5/market/sylive/ucenter/edit_address',params,function (res){
|
||||
that.isSubmiting = false
|
||||
if(res.code==200){
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: res.msg,
|
||||
onClose:function(){
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
}else{
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: res.msg
|
||||
});
|
||||
}
|
||||
},'json');
|
||||
//提交数据
|
||||
// mDialog.msg({
|
||||
// duration: 250,
|
||||
// pause: 2000,
|
||||
// content: "提交成功"
|
||||
// });
|
||||
// this.isShowAdd = false
|
||||
// this.isSubmiting = false
|
||||
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<?=$this->load->view('h5/market/sylive/share_script')?>
|
||||
</body>
|
||||
@@ -0,0 +1,73 @@
|
||||
<body class="bg-f6">
|
||||
<div class="height-500 fixed left-0 right-0 top-0 z-index-0 bg-1a1a1a"></div>
|
||||
<div class="bg-f6" id="app" ref="app">
|
||||
<div class="container relative bg-no-repeat bg-size-fullwidth bg-pos-top pb50" style="background-image:url(https://qs.haodian.cn/web/images/project/H5-ShiYu/mine-bg2.jpg)">
|
||||
<div class="pt50 pl30 pr30 text-center">
|
||||
<img class="bds-1-fff imgsize-120X120 ulib-r750" :src="info.logo" alt="#" />
|
||||
<div class="pt10 font-36 text-center">{{info.title}}</div>
|
||||
<div class="mt40"><img class="block wp100" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/mine-theme.png" alt="尊享您的直播好礼" /></div>
|
||||
</div>
|
||||
<div class="bg-fff ml30 mr30 pt20 pb20 pl40 pr40 ulib-r20 box-shadow-darkGray">
|
||||
<!--活动列表列表-->
|
||||
<a class="block relative pt30 pb30 bbs-1-eee last-b-none" :href="item.url" v-for="(item,index) in info.list">
|
||||
<span class="font-32">{{item.title}}</span>
|
||||
<i class="absolute box-middle right-0 iconfont icon-gengduo"></i>
|
||||
</a>
|
||||
<!--end活动列表-->
|
||||
</div>
|
||||
</div>
|
||||
<a class="bottom-opt pt15 bg-1a1a1a ulib-r750 text-center color-fff" href="/h5/market/sylive/act?skey=<?=$params['skey']?>">
|
||||
<i class="iconfont icon-shouye text-middle font-36"></i>
|
||||
<div class="font-22">首页</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let hostUrl = ''
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
info:{
|
||||
list:[],
|
||||
},//基础信息
|
||||
},
|
||||
mounted() {
|
||||
this.getInfo()
|
||||
},
|
||||
methods: {
|
||||
|
||||
//获取基础信息
|
||||
getInfo(){
|
||||
// this.info = {
|
||||
// title:"厦门狸车店",
|
||||
// logo:"https://qs.haodian.cn/web/images/project/H5-ShiYu/goodslogo.jpg",
|
||||
// list:[
|
||||
// {
|
||||
// title:'我的权益',
|
||||
// url:'mygift.html',
|
||||
// },
|
||||
// {
|
||||
// title:'我的订单',
|
||||
// url:'#',
|
||||
// },
|
||||
// {
|
||||
// title:'我的券',
|
||||
// url:'#',
|
||||
// },
|
||||
// {
|
||||
// title:'联系客服',
|
||||
// url:'#',
|
||||
// },
|
||||
// {
|
||||
// title:'数据统计',
|
||||
// url:'#',
|
||||
// },
|
||||
// ],
|
||||
// }
|
||||
this.info = <?=json_encode($info,JSON_UNESCAPED_UNICODE)?>
|
||||
},
|
||||
|
||||
},
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
@@ -0,0 +1,230 @@
|
||||
<link rel="stylesheet" href="https://qs.haodian.cn/web/javascript/LArea/css/LArea.css">
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/LArea/js/LAreaData1.js"></script>
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/LArea/js/LAreaData2.js"></script>
|
||||
<script type="text/javascript" src="https://qs.haodian.cn/web/javascript/LArea/js/LArea.js"></script>
|
||||
<body class="bg-f6">
|
||||
<div id="app" ref="app">
|
||||
<div class="container relative bg-no-repeat bg-size-fullwidth bg-pos-top pb40" :style="'background-image:url('+info.bg+')'">
|
||||
<div class="relative height-710">
|
||||
<div class="pt90 pl100 pr100 fn-clear">
|
||||
<div class="fn-fl font-18">订单号 {{info.order.sid}}</div>
|
||||
<div class="fn-fr font-18"><i class="iconfont icon-time"></i> {{info.order.c_time}}</div>
|
||||
</div>
|
||||
<div class="uinfo absolute wp100 pr100 pl100">
|
||||
<div class="space-nowrap"><span>{{info.order.uname}}</span><span class="font-28">·{{info.order.utel}}</span></div>
|
||||
<div class="mt10 uinfoadd font-22 ulib-rl750" v-if="show_address" @click="showAdd()"><i class="iconfont mr5 icon-dizhi"></i>{{show_address}}</div>
|
||||
<div class="mt10 uinfoadd font-22 ulib-rl750" v-else @click="showAdd()"><i class="iconfont mr5 icon-zengjia"></i>收货地址</div>
|
||||
</div>
|
||||
<!-- <div class="uinfo absolute box-center pt15 pb15 pl30 pr30 font-32 ulib-r750 space-nowrap">{{info.order.uname}} · {{info.order.utel}}</div>-->
|
||||
<div class="odslogan absolute box-center text-center color-e4bc93 space-nowrap">
|
||||
<div class="pb10 bbs-1-e4bc93 font-48">{{info.order.slogan}}</div>
|
||||
<div class="mt10 font-24">{{info.order.valid_time}}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="relative bg-fff mb30 ml30 mr30 inner40 pl150 pr220 ulib-r20 box-shadow-darkGray" v-if="info.if_pid">
|
||||
<img class="absolute left-0 box-middle ml35 imgsize-90X90 ulib-r750 bds-1-eee" :src="info.logo" :alt="info.title" />
|
||||
<div>
|
||||
<span class="font-36 text-middle">{{info.title}}</span>
|
||||
<span class="inline-block pl10 pr10 line-height-15 text-middle ulib-r750 font-22 color-fff bg-1a1a1a">专属顾问</span>
|
||||
</div>
|
||||
<div class="mt10 font-22 color-999">{{info.slogan}}</div>
|
||||
<a class="absolute right-0 box-middle mr30" :href="'tel:'+info.cust_tel">
|
||||
<img class="imgsize-60X60" src="https://qs.haodian.cn/web/images/project/H5-ShiYu/tel.png" alt="拨打电话" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="relative bg-fff mb30 ml30 mr30 inner40 ulib-r20 box-shadow-darkGray">
|
||||
<div class="pb20 text-center"><div class="inline-block relative pl10 pr10 introTitle font-36"><span class="relative z-index-1">{{info.introTitle}}</span></div></div>
|
||||
<div class="line-height-17 font-28 color-666 text-break space-pre-line rich-text-img" v-html="info.content"></div>
|
||||
</div>
|
||||
</div>
|
||||
<? $this->load->view('h5/market/sylive/nav_my') ?>
|
||||
|
||||
<div class="msg fn-hide" :style="isShowAdd?'display:block':'display:none'" v-if="isShowAdd">
|
||||
<div class="msgBg" @click="isShowAdd=!isShowAdd"></div>
|
||||
<div class="msgMain">
|
||||
<div class="content">
|
||||
<div class="word text-center">
|
||||
<div class="mt15 font-22 color-999">请输入您的地址,我们会第一时间为您发出!</div>
|
||||
<div class="mt30 relative bg-f6 ulib-r10">
|
||||
<input id="region" class="wp100 inner30 font-28 bg-f6 border-none ulib-r10" type="text" readonly="" v-model="region" placeholder="选择省/市/区" />
|
||||
<input id="regionvalue" type="hidden" v-model="regionvalue"/>
|
||||
</div>
|
||||
<div class="mt30 relative bg-f6 ulib-r10">
|
||||
<input class="wp100 inner30 font-28 bg-f6 border-none ulib-r10" type="text" v-model="address" placeholder="请输入详细地址" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt30">
|
||||
<a class="block pt25 pb25 bg-1a1a1a text-center font-32 color-fff ulib-r10" @click="postAddress()">确认</a>
|
||||
</div>
|
||||
<div class="mt30 text-center">
|
||||
<a class="font-24 text-underline" @click="isShowAdd=!isShowAdd">不了,看完直播再说></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
let hostUrl = ''
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
// info:{
|
||||
// bg:"https://qs.haodian.cn/web/images/project/H5-ShiYu/mine-bg.jpg",
|
||||
// logo:"https://qs.haodian.cn/web/images/project/H5-ShiYu/goodslogo.jpg",
|
||||
// title:"东风·纳米",
|
||||
// slogan:"东风EV·您的专属的福利官",
|
||||
// cust_tel:'15355555555',
|
||||
// introTitle:'权益说明',
|
||||
// content:'纳米BOX充分考虑到了用户的用车续航焦虑问题,新车采用了高密度电池组,CLTC续航331km。此外,纳米BOX全系支持快充、慢充功能,快充30分钟可以完成30~80%的补电,慢充4小时即可满电,轻松覆盖日常用车需求。纳米BOX充分考虑到了用户的用车续航焦虑问题,新车采用了高密度电池组,CLTC续航331km。此外,纳米BOX全系支持快充、慢充功能,快充30分钟可以完成30~80%的补电,慢充4小时即可满电,轻松覆盖日常用车需求。',
|
||||
// order:{
|
||||
// uname:'张大三',
|
||||
// utel:'13459***382',
|
||||
// slogan:'尊享您的直播好礼',
|
||||
// valid_time:'2022-08-01-2022-08-31',
|
||||
// oid:'XM202210111563586',
|
||||
// c_time:'2022-10-11 15:35:52',
|
||||
// }
|
||||
// },
|
||||
info : <?=json_encode($info,JSON_UNESCAPED_UNICODE)?>,
|
||||
region:'<?=$info['order']['region']?>',
|
||||
regionvalue:'',
|
||||
address:'<?=$info['order']['detail']?>',
|
||||
show_address:'<?=$info['order']['region'].' '.$info['order']['detail']?>',
|
||||
isShowAdd: false,
|
||||
isSubmiting: false,
|
||||
},
|
||||
created(){
|
||||
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
let that = this
|
||||
let swiper = new Swiper('.goods-banner .swiper-container', {
|
||||
//loop: true,
|
||||
//autoHeight: true,
|
||||
pagination: {
|
||||
el: '.swiper-pagination',
|
||||
type: 'fraction',
|
||||
},
|
||||
navigation: {
|
||||
nextEl: '.swiper-button-next',
|
||||
prevEl: '.swiper-button-prev',
|
||||
},
|
||||
on: {
|
||||
slideChangeTransitionEnd: function(){
|
||||
that.activeIndex = this.activeIndex
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
showAdd: function() {
|
||||
this.isShowAdd = true
|
||||
let that = this;
|
||||
//选择省市初始化
|
||||
setTimeout(function () {
|
||||
let area = new LArea();
|
||||
area.init({
|
||||
'trigger': '#region', //触发选择控件的文本框,同时选择完毕后name属性输出到该位置
|
||||
'valueTo': '#regionvalue', //选择完毕后id属性输出到该位置
|
||||
'keys': {
|
||||
id: 'value',
|
||||
name: 'text'
|
||||
}, //绑定数据源相关字段 id对应valueTo的value属性输出 name对应trigger的value属性输出
|
||||
'type': 2,
|
||||
'data': [provs_data, citys_data, dists_data]
|
||||
});
|
||||
|
||||
if(that.region !=''){
|
||||
for(var i in provs_data){
|
||||
if(provs_data[i].text==that.region.split(",")[0]){
|
||||
var x=i;
|
||||
var city=citys_data[provs_data[i].value];
|
||||
for(var j in city){
|
||||
if(city[j].text==that.region.split(",")[1]){
|
||||
var y=j;
|
||||
var district=dists_data[city[j].value];
|
||||
for(var k in district){
|
||||
if(district[k].text==that.region.split(",")[2]){
|
||||
var z=k;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
area.value=[x,y,z];//控制初始位置,注意:该方法并不会影响到input的value
|
||||
}else{
|
||||
//area.value=[12,1,1];//控制初始位置,注意:该方法并不会影响到input的value
|
||||
}
|
||||
area.success = function(){
|
||||
that.regionvalue = $("#regionvalue").val();
|
||||
}
|
||||
}, 200)
|
||||
},
|
||||
//提交地址
|
||||
postAddress() {
|
||||
if (this.isSubmiting) return;
|
||||
if (!this.region) {
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "请选择所在地区"
|
||||
});
|
||||
}else if (!this.address) {
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: "请输入详细地址"
|
||||
});
|
||||
}else{
|
||||
this.isSubmiting = true
|
||||
var params = {
|
||||
'skey':'<?=$skey?>',
|
||||
'region':this.region,
|
||||
'address':this.address,
|
||||
'id':this.info.order.id
|
||||
}
|
||||
var that = this;
|
||||
$.post('/h5/market/sylive/ucenter/edit_address',params,function (res){
|
||||
that.isSubmiting = false
|
||||
if(res.code==200){
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: res.msg,
|
||||
onClose:function(){
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
}else{
|
||||
mDialog.msg({
|
||||
duration: 250,
|
||||
pause: 2000,
|
||||
content: res.msg
|
||||
});
|
||||
}
|
||||
},'json');
|
||||
//提交数据
|
||||
// mDialog.msg({
|
||||
// duration: 250,
|
||||
// pause: 2000,
|
||||
// content: "提交成功"
|
||||
// });
|
||||
// this.isShowAdd = false
|
||||
// this.isSubmiting = false
|
||||
|
||||
}
|
||||
},
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<?=$this->load->view('h5/market/sylive/share_script')?>
|
||||
</body>
|
||||
@@ -0,0 +1,101 @@
|
||||
<body class="bg-f6">
|
||||
<div class="height-500 fixed left-0 right-0 top-0 z-index-0 bg-1a1a1a"></div>
|
||||
<div class="bg-f6" id="app" ref="app">
|
||||
<div class="container">
|
||||
<div class="inner30 pt0">
|
||||
<a class="block mt30 pl30 pr30 bg-fff ulib-r20" :href="item.url" v-for="(item,index) in list">
|
||||
<div class="bbs-1-eee pt20 pb20 font-22 color-999">订单编号 {{item.sid}}</div>
|
||||
<div class="relative pt30 pb30 fn-clear">
|
||||
<img class="fn-fl imgsize-185X170 ulib-r5" :src="item.img" alt="#">
|
||||
<div class="pl210">
|
||||
<div class="line-clamp-2 font-32 line-height-13">{{item.title}}</div>
|
||||
<div class="mt5 font-22 color-999">订单时间 {{item.time}}</div>
|
||||
<div class="absolute left-0 bottom-0 pl210 pb30 text-bold color-fe9538">
|
||||
<span class="font-28">¥</span><span class="ml5 font-40">{{item.price}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<mugen-scroll :handler="fetchData" :should-handle="!loading" scroll-container="app">
|
||||
<div class="pt100 pb100 text-center color-ccc" v-if="isNoData"><span class="text-middle font-22">暂无数据</span></div>
|
||||
<div class="pt20 pb20 text-center color-ccc" v-else-if="loading"><i class="iconfont icon-jiazai text-middle"></i><span class="text-middle font-22">请稍等...</span></div>
|
||||
<div class="pt20 pb20 text-center font-22 color-ccc" v-else-if="isDataEnd&&list.length>20">我们是有底线的</div>
|
||||
</mugen-scroll>
|
||||
</div>
|
||||
</div>
|
||||
<? $this->load->view('h5/market/sylive/nav_my') ?>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
let hostUrl = ''
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
loading: false,
|
||||
isDataEnd: false,
|
||||
isNoData: false,
|
||||
page: 1,
|
||||
size: 20,
|
||||
list:[],
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
||||
//拉取数据
|
||||
fetchData: function() {
|
||||
this.getOrderList()
|
||||
},
|
||||
|
||||
//获取大区列表
|
||||
getOrderList(){
|
||||
let that=this;
|
||||
if (!that.isNoData && !that.isDataEnd && !that.loading) {
|
||||
that.loading = true;
|
||||
var params = {
|
||||
'skey':'<?=$skey?>',
|
||||
'page':that.page
|
||||
}
|
||||
//请求接口
|
||||
$.get('/h5/market/sylive/ucenter/ajax_order',params,function (res){
|
||||
that.loading = false;
|
||||
that.page = that.page + 1;
|
||||
|
||||
that.list = that.list.concat(res.data.lists);
|
||||
if (res.data.total == 0) {
|
||||
that.isNoData = true;
|
||||
} else if (that.list.length == res.data.total) {
|
||||
that.isDataEnd = true;
|
||||
}
|
||||
},'json');
|
||||
//请求接口成功后
|
||||
// that.loading = false;
|
||||
// that.page = that.page + 1;
|
||||
// let res = {}
|
||||
// res.data = {
|
||||
// list:[
|
||||
// {
|
||||
// sid:'350200021120220830526302',
|
||||
// img:'https://qs.haodian.cn/web/images/project/H5-ShiYu/upload/linebg.jpg',
|
||||
// title:'闽浙纳米BOX私享会闽浙纳米BO享会闽浙纳米BOX私X私享会',
|
||||
// time:'2022.10.20 10:00:25',
|
||||
// price:'6.9',
|
||||
// url:'mygift.html',
|
||||
// }
|
||||
// ],
|
||||
// total:20,
|
||||
// },
|
||||
// that.list = that.list.concat(res.data.list);
|
||||
// if (res.data.total == 0) {
|
||||
// that.isNoData = true;
|
||||
// } else if (that.list.length == res.data.total) {
|
||||
// that.isDataEnd = true;
|
||||
// }
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
Binary file not shown.
Reference in New Issue
Block a user