作者 sgj

add uer message and score

@@ -27,11 +27,30 @@ class ShopController extends WeChatBaseController @@ -27,11 +27,30 @@ class ShopController extends WeChatBaseController
27 27
28 public function index() 28 public function index()
29 { 29 {
30 - $goods=$this->GoodsModel->getList(); 30 +
  31 + $goods=$this->GoodsModel->getList()->toArray();
31 $this->assign('goods',$goods); 32 $this->assign('goods',$goods);
32 return $this->fetch(); 33 return $this->fetch();
33 } 34 }
34 35
  36 + public function goodinfo(){
  37 + $id=input('id');
  38 + $good=$this->GoodsModel->getGoodInfo($id);
  39 + $this->assign('good',$good);
  40 +
  41 + // dump($good);
  42 + return $this->fetch();
  43 + }
  44 +
  45 + /*
  46 + * 确认订单
  47 + */
  48 + public function confirmOrder(){
  49 +
  50 + return $this->fetch();
  51 + }
  52 +
  53 +
35 54
36 55
37 56
@@ -19,5 +19,11 @@ class GoodsModel extends Model @@ -19,5 +19,11 @@ class GoodsModel extends Model
19 } 19 }
20 20
21 21
  22 + public function getGoodInfo($id){
  23 + $good=$this->where('id',$id)->find()->toArray();
  24 + $good['pic']=json_decode($good['pic'],true);
  25 + $good['content']=getContent($good['content']);
  26 + return $good;
  27 + }
22 28
23 } 29 }
@@ -234,4 +234,18 @@ class IndexController extends HomeBaseController @@ -234,4 +234,18 @@ class IndexController extends HomeBaseController
234 return redirect($this->request->root() . "/"); 234 return redirect($this->request->root() . "/");
235 } 235 }
236 236
  237 +
  238 +
  239 + public function myScore(){
  240 +
  241 + return $this->fetch();
  242 + }
  243 +
  244 + public function myScoreInInfo(){
  245 + return $this->fetch();
  246 + }
  247 + public function myScoreOutInfo(){
  248 + return $this->fetch();
  249 + }
  250 +
237 } 251 }
  1 +<?php
  2 +/**
  3 + * Created by PhpStorm.
  4 + * auther: sgj
  5 + * Date: 2018/12/20
  6 + * Time: 14:27
  7 + */
  8 +
  9 +namespace app\user\controller;
  10 +
  11 +
  12 +use cmf\controller\WeChatBaseController;
  13 +use think\Model;
  14 +
  15 +class MessageController extends WeChatBaseController
  16 +{
  17 + public function index(){
  18 +
  19 + }
  20 +
  21 + public function list(){
  22 +
  23 + return $this->fetch();
  24 + }
  25 +}
@@ -44,6 +44,13 @@ @@ -44,6 +44,13 @@
44 id="title" required value="{$good.name}" placeholder="请输入标题"/> 44 id="title" required value="{$good.name}" placeholder="请输入标题"/>
45 </td> 45 </td>
46 </tr> 46 </tr>
  47 + <tr>
  48 + <th>商品规格<span class="form-required">*</span></th>
  49 + <td>
  50 + <input class="form-control" type="text" name="post[size]"
  51 + id="title" required value="{$good.size}" placeholder="请输入商品规格"/>
  52 + </td>
  53 + </tr>
47 54
48 <tr> 55 <tr>
49 <th>简介</th> 56 <th>简介</th>
@@ -45,6 +45,13 @@ @@ -45,6 +45,13 @@
45 </td> 45 </td>
46 </tr> 46 </tr>
47 <tr> 47 <tr>
  48 + <th>商品规格<span class="form-required">*</span></th>
  49 + <td>
  50 + <input class="form-control" type="text" name="post[size]"
  51 + id="title" required value="" placeholder="请输入标题"/>
  52 + </td>
  53 + </tr>
  54 + <tr>
48 <th>简介</th> 55 <th>简介</th>
49 <td> 56 <td>
50 <textarea class="form-control" name="post[describe]" style="height: 50px;" 57 <textarea class="form-control" name="post[describe]" style="height: 50px;"
  1 +<!DOCTYPE html>
  2 +<html lang="en">
  3 +<head>
  4 + <meta charset="UTF-8">
  5 + <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
  6 + <title>确认订单</title>
  7 + <link rel="stylesheet" href="__TMPL__/public/assets/css/init.css">
  8 + <link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css">
  9 + <link rel="stylesheet" href="http://at.alicdn.com/t/font_793738_ycnvxk1als.css">
  10 + <link rel="stylesheet" href="__TMPL__/public/assets/css/diseaseColumn.css">
  11 + <link rel="stylesheet" href="__TMPL__/public/assets/css/shop.css">
  12 + <script src="__TMPL__/public/assets/js/fontsize.js"></script>
  13 +</head>
  14 +<body style="background: #F5F6FA;">
  15 +<div class="order_box">
  16 + <div class="order_info">
  17 + <div class="address_box">
  18 + <div class="address_info">
  19 + <div>
  20 + <text class="name">向昱筱</text>
  21 + <text>13252648165</text>
  22 + </div>
  23 + <div class="address_detail">天津市和平区气象台路1088号中环公寓</div>
  24 + </div>
  25 + <div class="iconfont icon-jiantou1"></div>
  26 + </div>
  27 + </div>
  28 + <!-- begin:订单信息 -->
  29 + <div class="order_info">
  30 + <h2>订单信息</h2>
  31 + <div class="order_ul">
  32 + <div class="order_item">
  33 + <div class="order_item">
  34 + <div class="info_left"><img src="__TMPL__/public/assets/images/abg01@2x.png"></div>
  35 + <div class="info_right">
  36 + <p class="info_txt1">百草味 肉干肉脯 白芝麻猪脯百草味 肉干肉脯 白芝麻猪脯百草味 肉干肉脯 白芝麻猪脯</p>
  37 + <p class="info_txt2"></p>
  38 + <p class="info_num"><span>302</span>积分</p>
  39 + </div>
  40 + </div>
  41 + <div class="info_number">X1</div>
  42 + </div>
  43 + </div>
  44 + </div>
  45 + <!-- begin:支付方式 -->
  46 + <div class="order_info">
  47 + <ul class="order_pay order_detail">
  48 + <li class="order_item label">
  49 + <span>配送方式</span>
  50 + <div class="order_label right">¥0</div>
  51 + </li>
  52 + <li class="order_item label">
  53 + <span>支付方式</span>
  54 + <div class="order_label right">积分</div>
  55 + </li>
  56 + </ul>
  57 + </div>
  58 + <!---->
  59 + <div class="order_info">
  60 + <ul class="order_pay order_detail">
  61 + <li class="order_item label">
  62 + <span>商品金额</span>
  63 + <div class="order_label right">20积分</div>
  64 + </li>
  65 + <li class="order_item label">
  66 + <span>运费</span>
  67 + <div class="order_label right">¥0</div>
  68 + </li>
  69 + </ul>
  70 + </div>
  71 + <div class="order_info">
  72 + <ul class="order_pay">
  73 + <li class="total">
  74 + <span>留言</span>
  75 + <textarea placeholder="给买家留言(45字以内)"></textarea>
  76 + </li>
  77 + </ul>
  78 + </div>
  79 +</div>
  80 +<!-- begin:支付订单 -->
  81 +<div class="null_box"></div>
  82 +<div class="bottom_box">
  83 + <p class="orser_txt1">实付:<span><text class="money_icon">800</text>积分 </span></p>
  84 + <div class="order_btn">支付订单</div>
  85 +</div>
  86 +
  87 +</body>
  88 +</html>
  1 +<!doctype html>
  2 +<html>
  3 +<head>
  4 + <meta charset="utf-8">
  5 + <title>商品详情</title>
  6 + <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  7 + <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8 + <link rel="stylesheet" type="text/css" href="http://at.alicdn.com/t/font_793738_ycnvxk1als.css">
  9 + <link href="__TMPL__/public/assets/css/init.css" rel="stylesheet" type="text/css">
  10 + <link href="__TMPL__/public/assets/css/shopDetail.css" rel="stylesheet" type="text/css">
  11 + <link href="__TMPL__/public/assets/css/swiper.min.css" rel="stylesheet" type="text/css">
  12 + <script type="text/javascript" src="__TMPL__/public/assets/js/fontsize.js"></script>
  13 +</head>
  14 +<body>
  15 +<div class="warp">
  16 + <div class="item_list">
  17 + <!-- begin:数字轮播图 -->
  18 + <div class="swiper-container">
  19 + <div class="swiper-wrapper">
  20 + <volist name="good.pic" id="vo">
  21 + <div class="swiper-slide"><img style="width: 100%" src="{:cmf_get_image_url($vo)}"></div>
  22 + </volist>
  23 + </div>
  24 + <div class="swiper-pagination"></div>
  25 + </div>
  26 + <!-- begin: 商品信息-->
  27 + <div class="detail_info">
  28 + <p class="detail_num">
  29 + <text class="original_price">
  30 + <text class="num">{$good.fee}</text>
  31 + <text class="symbol_icon">积分</text>
  32 + </text>
  33 + </p>
  34 + <p class="detail_txt1">{$good.name}</p>
  35 + <p class="detail_txt2">{$good.describe}</p>
  36 + </div>
  37 + </div>
  38 + <div class="item_list">
  39 + <div class="detail_spec">
  40 + <p class="spec_txt1">
  41 + <text class="spec_title">规格</text>
  42 + <text class="spec_content">{$good.size}</text>
  43 + </p>
  44 + <p class="spec_txt2 right">
  45 + <text class="iconfont icon-shenglve"></text>
  46 + </p>
  47 + </div>
  48 + </div>
  49 + <div class="item_list">
  50 + <div class="detail_message">
  51 + <div class="detail_minus">
  52 + <div class="line"></div>
  53 + <p>商品信息</p>
  54 + <div class="line"></div>
  55 + </div>
  56 + {$good.content}
  57 + </div>
  58 + </div>
  59 +
  60 + <!-- begin:底部按钮 -->
  61 + <div class="null_box"></div>
  62 + <div class="detail_fixd">
  63 + <div>{$good.fee}积分</div>
  64 + <div class="buy_btn">立即兑换</div>
  65 +
  66 + </div>
  67 +</div>
  68 +<!-- begin:选择属性 -->
  69 +<div class="pro_bg">
  70 + <div class="property">
  71 + <div class="prop_close"><i class="iconfont icon-quxiao"></i></div>
  72 + <ul class="reco_public">
  73 + <li>
  74 + <div class="mmend_left"><img src="{:cmf_get_image_url($good.thumbnail)}"></div>
  75 + <div class="mmend_right">
  76 + <div class="mmend_num"><span>{$good.fee}</span>积分</div>
  77 + <div class="mmend_title shop_heig">{$good.name}</div>
  78 + <div class="mmend_name">{$good.describe}</div>
  79 + </div>
  80 + </li>
  81 + </ul>
  82 + <div class="pro_bom">
  83 + <h2>数量</h2>
  84 + <div class="pro_public right">
  85 + <p class="iconfont icon-jian"></p>
  86 + <input type="text" name="" value="1"/>
  87 + <p class="iconfont icon-jia"></p>
  88 + </div>
  89 + </div>
  90 + <div class="property_btn">确定</div>
  91 + </div>
  92 +</div>
  93 +
  94 +<script type="text/javascript" src="__TMPL__/public/assets/js/jquery-2.1.0.js "></script>
  95 +<script type="text/javascript" src="__TMPL__/public/assets/js/swiper.min.js"></script>
  96 +<script type="text/javascript">
  97 + $(document).ready(function () {
  98 + var mySwiper = new Swiper('.swiper-container', {
  99 + direction: 'horizontal', // 垂直切换选项
  100 + loop: true, // 循环模式选项
  101 +
  102 + // 如果需要分页器
  103 + pagination: '.swiper-pagination',
  104 + paginationType: 'fraction'
  105 + })
  106 + // 点击显示选择属性弹层
  107 + $('.detail_spec').click(function () {
  108 + $('.pro_bg').show();
  109 + })
  110 + $('.property .prop_close').on('click', function () {
  111 + $('.pro_bg').hide();
  112 + })
  113 + // 点击确定跳到支付订单页
  114 + $('.property_btn').on('click', function () {
  115 + window.location.href = '{:url('confirmOrder')}'
  116 + })
  117 + // 跳转购物车
  118 + $('.foot_cart').click(function () {
  119 + window.location.href = '{:url('confirmOrder')}'
  120 + });
  121 + // 跳转购物车
  122 + $('.join_btn').click(function () {
  123 + window.location.href = '{:url('confirmOrder')}'
  124 + });
  125 + // 跳转购物车
  126 + $('.buy_btn').click(function () {
  127 + window.location.href = '{:url('confirmOrder')}'
  128 + });
  129 + })
  130 +
  131 +</script>
  132 +</body>
  133 +</html>
@@ -17,16 +17,20 @@ @@ -17,16 +17,20 @@
17 <!--内容部分--> 17 <!--内容部分-->
18 <div class="shop"> 18 <div class="shop">
19 19
  20 +<volist name="goods" id="vo">
20 21
21 - <div class="item_list">  
22 - <div class="book_img"><img src="__TMPL__/public/assets/images/abg02@2x.png" alt=""></div>  
23 - <div class="list_content">  
24 - <div class="book_name">商品名称</div>  
25 - <div class="book_info">人性的弱点全集简介</div>  
26 - <div class="book_price">20积分</div>  
27 - </div>  
28 - </div>  
29 22
  23 + <div class="item_list">
  24 + <a href="{:url('goodinfo',['id'=>$vo.id])}">
  25 + <div class="book_img"><img src="{:cmf_get_image_url($vo.thumbnail)}" alt=""></div>
  26 + <div class="list_content">
  27 + <div class="book_name">{$vo.name}</div>
  28 + <div class="book_info">{$vo.describe}</div>
  29 + <div class="book_price">{$vo.fee}积分</div>
  30 + </div>
  31 + </a>
  32 + </div>
  33 +</volist>
30 34
31 </div> 35 </div>
32 36
  1 +<!DOCTYPE html>
  2 +<html lang="en">
  3 +<head>
  4 + <meta charset="UTF-8">
  5 + <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
  6 + <title>我的积分</title>
  7 + <script src="__TMPL__/public/assets/js/fontsize.js"></script>
  8 + <link rel="stylesheet" href="__TMPL__/public/assets/css/init.css">
  9 + <link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css">
  10 + <link rel="stylesheet" href="http://at.alicdn.com/t/font_793738_5lr5x3nl9vf.css">
  11 + <link rel="stylesheet" href="__TMPL__/public/assets/css/myIntegral.css">
  12 +</head>
  13 +<body style="background: #F5F6FA">
  14 +<div class="banner_box">
  15 + <div class="integral_box">
  16 + <div>当前积分</div>
  17 + <div class="integral_num">1000</div>
  18 + </div>
  19 + <a class="integral_info_box">
  20 + <div class="integral_item">
  21 + <div class="integral_info">总收入</div>
  22 + <div>100</div>
  23 + </div>
  24 + <div class="line"></div>
  25 + <div class="integral_item">
  26 + <div class="integral_info">已使用</div>
  27 + <div>100</div>
  28 + </div>
  29 + </a>
  30 +</div>
  31 +<div class="content_box">
  32 + <a href="{:url('myScoreInInfo')}" class="item_list">
  33 + <div>积分收入记录</div>
  34 + <div class="iconfont icon-jiantou1"></div>
  35 + </a>
  36 + <a href="{:url('myScoreOutInfo')}" class="item_list">
  37 + <div>积分使用情况</div>
  38 + <div class="iconfont icon-jiantou1"></div>
  39 + </a>
  40 +</div>
  41 +</body>
  42 +</html>
  1 +<!DOCTYPE html>
  2 +<html lang="en">
  3 +<head>
  4 + <meta charset="UTF-8">
  5 + <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
  6 + <title>我的积分</title>
  7 + <script src="__TMPL__/public/assets/js/fontsize.js"></script>
  8 + <link rel="stylesheet" href="__TMPL__/public/assets/css/init.css">
  9 + <link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css">
  10 + <link rel="stylesheet" href="http://at.alicdn.com/t/font_793738_5lr5x3nl9vf.css">
  11 + <link rel="stylesheet" href="__TMPL__/public/assets/css/myIntegral.css">
  12 +</head>
  13 +<body style="background: #F5F6FA">
  14 +<div class="">
  15 + <div class="item_list">
  16 + <div class="list_info_box">
  17 + <div>签到收入</div>
  18 + <div class="time">2018-03-29</div>
  19 + </div>
  20 + <div class="integral_num2">+20</div>
  21 + </div>
  22 + <div class="item_list">
  23 + <div class="list_info_box">
  24 + <div>提问收入</div>
  25 + <div class="time">2018-03-29</div>
  26 + </div>
  27 + <div class="integral_num2">+20</div>
  28 + </div>
  29 + <div class="item_list">
  30 + <div class="list_info_box">
  31 + <div>签到收入</div>
  32 + <div class="time">2018-03-29</div>
  33 + </div>
  34 + <div class="integral_num2">+20</div>
  35 + </div>
  36 +</div>
  37 +</body>
  38 +</html>
  1 +<!DOCTYPE html>
  2 +<html lang="en">
  3 +<head>
  4 + <meta charset="UTF-8">
  5 + <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
  6 + <title>我的积分</title>
  7 + <script src="__TMPL__/public/assets/js/fontsize.js"></script>
  8 + <link rel="stylesheet" href="__TMPL__/public/assets/css/init.css">
  9 + <link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css">
  10 + <link rel="stylesheet" href="http://at.alicdn.com/t/font_793738_5lr5x3nl9vf.css">
  11 + <link rel="stylesheet" href="__TMPL__/public/assets/css/myIntegral.css">
  12 +</head>
  13 +<body style="background: #F5F6FA">
  14 +<div class="">
  15 + <div class="item_list">
  16 + <div class="list_info_box">
  17 + <div>签到收入</div>
  18 + <div class="time">2018-03-29</div>
  19 + </div>
  20 + <div class="integral_num2">+20</div>
  21 + </div>
  22 + <div class="item_list">
  23 + <div class="list_info_box">
  24 + <div>提问收入</div>
  25 + <div class="time">2018-03-29</div>
  26 + </div>
  27 + <div class="integral_num2">+20</div>
  28 + </div>
  29 + <div class="item_list">
  30 + <div class="list_info_box">
  31 + <div>签到收入</div>
  32 + <div class="time">2018-03-29</div>
  33 + </div>
  34 + <div class="integral_num2">+20</div>
  35 + </div>
  36 +</div>
  37 +</body>
  38 +</html>
  1 +<!DOCTYPE html>
  2 +<html lang="en">
  3 +<head>
  4 + <meta charset="UTF-8">
  5 + <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
  6 + <title>站内信</title>
  7 + <script src="__TMPL__/public/assets/js/fontsize.js"></script>
  8 + <link rel="stylesheet" href="__TMPL__/public/assets/css/init.css">
  9 + <link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css">
  10 + <link rel="stylesheet" href="http://at.alicdn.com/t/font_793738_tlxymah92x.css">
  11 + <link rel="stylesheet" href="__TMPL__/public/assets/css/referralModule.css">
  12 +</head>
  13 +<body>
  14 +<div class="container">
  15 + <div class="tab_box tab_message">
  16 + <div class="tab_item tab_on">
  17 + <text>未读</text>
  18 + <text class="point">1</text>
  19 + </div>
  20 + <div class="tab_item">
  21 + <text>已读</text>
  22 + </div>
  23 + </div>
  24 + <div>
  25 + <div class="tab_content_box message_content_box">
  26 + <div class="tab_content message_content">
  27 + <div class="content_item message_item">
  28 + <div class="tab_title message_title">临床表现</div>
  29 + <div>临床表现内容临床表现内容临床表现内容</div>
  30 + <div class="tab_time">昨天 9:30</div>
  31 + </div>
  32 + <div class="content_item message_item">
  33 + <div class="tab_title message_title">临床表现</div>
  34 + <div>临床表现内容临床表现内容临床表现内容</div>
  35 + <div class="tab_time">昨天 9:30</div>
  36 + </div>
  37 + </div>
  38 + </div>
  39 + <div class="message_content_box" hidden>
  40 + <div class="no_message">暂无消息</div>
  41 + </div>
  42 + </div>
  43 +</div>
  44 +
  45 +<script src="__TMPL__/public/assets/js/jquery-2.1.0.js"></script>
  46 +<script>
  47 + $('.message_item').click(function () {
  48 + window.location.href='../user/messageDetail.html'
  49 + })
  50 + $('.tab_item').click(function () {
  51 + var index = $(this).index()
  52 + $(this).addClass('tab_on').siblings().removeClass('tab_on')
  53 + $('.message_content_box').eq(index).show().siblings().hide()
  54 + })
  55 +</script>
  56 +</body>
  57 +</html>