作者 sgj

add uer message and score

... ... @@ -27,11 +27,30 @@ class ShopController extends WeChatBaseController
public function index()
{
$goods=$this->GoodsModel->getList();
$goods=$this->GoodsModel->getList()->toArray();
$this->assign('goods',$goods);
return $this->fetch();
}
public function goodinfo(){
$id=input('id');
$good=$this->GoodsModel->getGoodInfo($id);
$this->assign('good',$good);
// dump($good);
return $this->fetch();
}
/*
* 确认订单
*/
public function confirmOrder(){
return $this->fetch();
}
... ...
... ... @@ -19,5 +19,11 @@ class GoodsModel extends Model
}
public function getGoodInfo($id){
$good=$this->where('id',$id)->find()->toArray();
$good['pic']=json_decode($good['pic'],true);
$good['content']=getContent($good['content']);
return $good;
}
}
\ No newline at end of file
... ...
... ... @@ -234,4 +234,18 @@ class IndexController extends HomeBaseController
return redirect($this->request->root() . "/");
}
public function myScore(){
return $this->fetch();
}
public function myScoreInInfo(){
return $this->fetch();
}
public function myScoreOutInfo(){
return $this->fetch();
}
}
... ...
<?php
/**
* Created by PhpStorm.
* auther: sgj
* Date: 2018/12/20
* Time: 14:27
*/
namespace app\user\controller;
use cmf\controller\WeChatBaseController;
use think\Model;
class MessageController extends WeChatBaseController
{
public function index(){
}
public function list(){
return $this->fetch();
}
}
\ No newline at end of file
... ...
... ... @@ -44,6 +44,13 @@
id="title" required value="{$good.name}" placeholder="请输入标题"/>
</td>
</tr>
<tr>
<th>商品规格<span class="form-required">*</span></th>
<td>
<input class="form-control" type="text" name="post[size]"
id="title" required value="{$good.size}" placeholder="请输入商品规格"/>
</td>
</tr>
<tr>
<th>简介</th>
... ...
... ... @@ -45,6 +45,13 @@
</td>
</tr>
<tr>
<th>商品规格<span class="form-required">*</span></th>
<td>
<input class="form-control" type="text" name="post[size]"
id="title" required value="" placeholder="请输入标题"/>
</td>
</tr>
<tr>
<th>简介</th>
<td>
<textarea class="form-control" name="post[describe]" style="height: 50px;"
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<title>确认订单</title>
<link rel="stylesheet" href="__TMPL__/public/assets/css/init.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css">
<link rel="stylesheet" href="http://at.alicdn.com/t/font_793738_ycnvxk1als.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/diseaseColumn.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/shop.css">
<script src="__TMPL__/public/assets/js/fontsize.js"></script>
</head>
<body style="background: #F5F6FA;">
<div class="order_box">
<div class="order_info">
<div class="address_box">
<div class="address_info">
<div>
<text class="name">向昱筱</text>
<text>13252648165</text>
</div>
<div class="address_detail">天津市和平区气象台路1088号中环公寓</div>
</div>
<div class="iconfont icon-jiantou1"></div>
</div>
</div>
<!-- begin:订单信息 -->
<div class="order_info">
<h2>订单信息</h2>
<div class="order_ul">
<div class="order_item">
<div class="order_item">
<div class="info_left"><img src="__TMPL__/public/assets/images/abg01@2x.png"></div>
<div class="info_right">
<p class="info_txt1">百草味 肉干肉脯 白芝麻猪脯百草味 肉干肉脯 白芝麻猪脯百草味 肉干肉脯 白芝麻猪脯</p>
<p class="info_txt2"></p>
<p class="info_num"><span>302</span>积分</p>
</div>
</div>
<div class="info_number">X1</div>
</div>
</div>
</div>
<!-- begin:支付方式 -->
<div class="order_info">
<ul class="order_pay order_detail">
<li class="order_item label">
<span>配送方式</span>
<div class="order_label right">¥0</div>
</li>
<li class="order_item label">
<span>支付方式</span>
<div class="order_label right">积分</div>
</li>
</ul>
</div>
<!---->
<div class="order_info">
<ul class="order_pay order_detail">
<li class="order_item label">
<span>商品金额</span>
<div class="order_label right">20积分</div>
</li>
<li class="order_item label">
<span>运费</span>
<div class="order_label right">¥0</div>
</li>
</ul>
</div>
<div class="order_info">
<ul class="order_pay">
<li class="total">
<span>留言</span>
<textarea placeholder="给买家留言(45字以内)"></textarea>
</li>
</ul>
</div>
</div>
<!-- begin:支付订单 -->
<div class="null_box"></div>
<div class="bottom_box">
<p class="orser_txt1">实付:<span><text class="money_icon">800</text>积分 </span></p>
<div class="order_btn">支付订单</div>
</div>
</body>
</html>
\ No newline at end of file
... ...
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>商品详情</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="http://at.alicdn.com/t/font_793738_ycnvxk1als.css">
<link href="__TMPL__/public/assets/css/init.css" rel="stylesheet" type="text/css">
<link href="__TMPL__/public/assets/css/shopDetail.css" rel="stylesheet" type="text/css">
<link href="__TMPL__/public/assets/css/swiper.min.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="__TMPL__/public/assets/js/fontsize.js"></script>
</head>
<body>
<div class="warp">
<div class="item_list">
<!-- begin:数字轮播图 -->
<div class="swiper-container">
<div class="swiper-wrapper">
<volist name="good.pic" id="vo">
<div class="swiper-slide"><img style="width: 100%" src="{:cmf_get_image_url($vo)}"></div>
</volist>
</div>
<div class="swiper-pagination"></div>
</div>
<!-- begin: 商品信息-->
<div class="detail_info">
<p class="detail_num">
<text class="original_price">
<text class="num">{$good.fee}</text>
<text class="symbol_icon">积分</text>
</text>
</p>
<p class="detail_txt1">{$good.name}</p>
<p class="detail_txt2">{$good.describe}</p>
</div>
</div>
<div class="item_list">
<div class="detail_spec">
<p class="spec_txt1">
<text class="spec_title">规格</text>
<text class="spec_content">{$good.size}</text>
</p>
<p class="spec_txt2 right">
<text class="iconfont icon-shenglve"></text>
</p>
</div>
</div>
<div class="item_list">
<div class="detail_message">
<div class="detail_minus">
<div class="line"></div>
<p>商品信息</p>
<div class="line"></div>
</div>
{$good.content}
</div>
</div>
<!-- begin:底部按钮 -->
<div class="null_box"></div>
<div class="detail_fixd">
<div>{$good.fee}积分</div>
<div class="buy_btn">立即兑换</div>
</div>
</div>
<!-- begin:选择属性 -->
<div class="pro_bg">
<div class="property">
<div class="prop_close"><i class="iconfont icon-quxiao"></i></div>
<ul class="reco_public">
<li>
<div class="mmend_left"><img src="{:cmf_get_image_url($good.thumbnail)}"></div>
<div class="mmend_right">
<div class="mmend_num"><span>{$good.fee}</span>积分</div>
<div class="mmend_title shop_heig">{$good.name}</div>
<div class="mmend_name">{$good.describe}</div>
</div>
</li>
</ul>
<div class="pro_bom">
<h2>数量</h2>
<div class="pro_public right">
<p class="iconfont icon-jian"></p>
<input type="text" name="" value="1"/>
<p class="iconfont icon-jia"></p>
</div>
</div>
<div class="property_btn">确定</div>
</div>
</div>
<script type="text/javascript" src="__TMPL__/public/assets/js/jquery-2.1.0.js "></script>
<script type="text/javascript" src="__TMPL__/public/assets/js/swiper.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
var mySwiper = new Swiper('.swiper-container', {
direction: 'horizontal', // 垂直切换选项
loop: true, // 循环模式选项
// 如果需要分页器
pagination: '.swiper-pagination',
paginationType: 'fraction'
})
// 点击显示选择属性弹层
$('.detail_spec').click(function () {
$('.pro_bg').show();
})
$('.property .prop_close').on('click', function () {
$('.pro_bg').hide();
})
// 点击确定跳到支付订单页
$('.property_btn').on('click', function () {
window.location.href = '{:url('confirmOrder')}'
})
// 跳转购物车
$('.foot_cart').click(function () {
window.location.href = '{:url('confirmOrder')}'
});
// 跳转购物车
$('.join_btn').click(function () {
window.location.href = '{:url('confirmOrder')}'
});
// 跳转购物车
$('.buy_btn').click(function () {
window.location.href = '{:url('confirmOrder')}'
});
})
</script>
</body>
</html>
... ...
... ... @@ -17,16 +17,20 @@
<!--内容部分-->
<div class="shop">
<volist name="goods" id="vo">
<div class="item_list">
<div class="book_img"><img src="__TMPL__/public/assets/images/abg02@2x.png" alt=""></div>
<a href="{:url('goodinfo',['id'=>$vo.id])}">
<div class="book_img"><img src="{:cmf_get_image_url($vo.thumbnail)}" alt=""></div>
<div class="list_content">
<div class="book_name">商品名称</div>
<div class="book_info">人性的弱点全集简介</div>
<div class="book_price">20积分</div>
<div class="book_name">{$vo.name}</div>
<div class="book_info">{$vo.describe}</div>
<div class="book_price">{$vo.fee}积分</div>
</div>
</a>
</div>
</volist>
</div>
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<title>我的积分</title>
<script src="__TMPL__/public/assets/js/fontsize.js"></script>
<link rel="stylesheet" href="__TMPL__/public/assets/css/init.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css">
<link rel="stylesheet" href="http://at.alicdn.com/t/font_793738_5lr5x3nl9vf.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/myIntegral.css">
</head>
<body style="background: #F5F6FA">
<div class="banner_box">
<div class="integral_box">
<div>当前积分</div>
<div class="integral_num">1000</div>
</div>
<a class="integral_info_box">
<div class="integral_item">
<div class="integral_info">总收入</div>
<div>100</div>
</div>
<div class="line"></div>
<div class="integral_item">
<div class="integral_info">已使用</div>
<div>100</div>
</div>
</a>
</div>
<div class="content_box">
<a href="{:url('myScoreInInfo')}" class="item_list">
<div>积分收入记录</div>
<div class="iconfont icon-jiantou1"></div>
</a>
<a href="{:url('myScoreOutInfo')}" class="item_list">
<div>积分使用情况</div>
<div class="iconfont icon-jiantou1"></div>
</a>
</div>
</body>
</html>
\ No newline at end of file
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<title>我的积分</title>
<script src="__TMPL__/public/assets/js/fontsize.js"></script>
<link rel="stylesheet" href="__TMPL__/public/assets/css/init.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css">
<link rel="stylesheet" href="http://at.alicdn.com/t/font_793738_5lr5x3nl9vf.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/myIntegral.css">
</head>
<body style="background: #F5F6FA">
<div class="">
<div class="item_list">
<div class="list_info_box">
<div>签到收入</div>
<div class="time">2018-03-29</div>
</div>
<div class="integral_num2">+20</div>
</div>
<div class="item_list">
<div class="list_info_box">
<div>提问收入</div>
<div class="time">2018-03-29</div>
</div>
<div class="integral_num2">+20</div>
</div>
<div class="item_list">
<div class="list_info_box">
<div>签到收入</div>
<div class="time">2018-03-29</div>
</div>
<div class="integral_num2">+20</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<title>我的积分</title>
<script src="__TMPL__/public/assets/js/fontsize.js"></script>
<link rel="stylesheet" href="__TMPL__/public/assets/css/init.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css">
<link rel="stylesheet" href="http://at.alicdn.com/t/font_793738_5lr5x3nl9vf.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/myIntegral.css">
</head>
<body style="background: #F5F6FA">
<div class="">
<div class="item_list">
<div class="list_info_box">
<div>签到收入</div>
<div class="time">2018-03-29</div>
</div>
<div class="integral_num2">+20</div>
</div>
<div class="item_list">
<div class="list_info_box">
<div>提问收入</div>
<div class="time">2018-03-29</div>
</div>
<div class="integral_num2">+20</div>
</div>
<div class="item_list">
<div class="list_info_box">
<div>签到收入</div>
<div class="time">2018-03-29</div>
</div>
<div class="integral_num2">+20</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<title>站内信</title>
<script src="__TMPL__/public/assets/js/fontsize.js"></script>
<link rel="stylesheet" href="__TMPL__/public/assets/css/init.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css">
<link rel="stylesheet" href="http://at.alicdn.com/t/font_793738_tlxymah92x.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/referralModule.css">
</head>
<body>
<div class="container">
<div class="tab_box tab_message">
<div class="tab_item tab_on">
<text>未读</text>
<text class="point">1</text>
</div>
<div class="tab_item">
<text>已读</text>
</div>
</div>
<div>
<div class="tab_content_box message_content_box">
<div class="tab_content message_content">
<div class="content_item message_item">
<div class="tab_title message_title">临床表现</div>
<div>临床表现内容临床表现内容临床表现内容</div>
<div class="tab_time">昨天 9:30</div>
</div>
<div class="content_item message_item">
<div class="tab_title message_title">临床表现</div>
<div>临床表现内容临床表现内容临床表现内容</div>
<div class="tab_time">昨天 9:30</div>
</div>
</div>
</div>
<div class="message_content_box" hidden>
<div class="no_message">暂无消息</div>
</div>
</div>
</div>
<script src="__TMPL__/public/assets/js/jquery-2.1.0.js"></script>
<script>
$('.message_item').click(function () {
window.location.href='../user/messageDetail.html'
})
$('.tab_item').click(function () {
var index = $(this).index()
$(this).addClass('tab_on').siblings().removeClass('tab_on')
$('.message_content_box').eq(index).show().siblings().hide()
})
</script>
</body>
</html>
\ No newline at end of file
... ...