浏览代码

Merge remote-tracking branch 'origin/master'

zhangdehua 9 月之前
父节点
当前提交
3d8de169ca

+ 1 - 1
app/api/service/order/Checkout.php

@@ -683,7 +683,7 @@ class Checkout extends BaseService
         $order['couponId'] > 0 && UserCouponModel::setIsUse((int)$order['couponId']);
         // 积分抵扣情况下扣除用户积分
         if ($order['isAllowPoints'] && $order['isUsePoints'] && $order['pointsNum'] > 0) {
-            $describe = "用户消费:{$this->model['order_no']}";
+            $describe = "User consumption:{$this->model['order_no']}";
             UserModel::setIncPoints($this->user['user_id'], -$order['pointsNum'], $describe);
         }
         // 获取订单详情

+ 1 - 0
app/common/model/User.php

@@ -35,6 +35,7 @@ class User extends BaseModel
     private $gender = [0 => '未知', 1 => '男', 2 => '女'];
 
     //
+    const POINTS_FOR_SHARE = 500;//分享获得积分
     const POINTS_FOR_BUY = 500;//自己购买获得积分
     const POINTS_FOR_REGISTER = 100;//注册或分享可获得积分
     const POINTS_FOR_REVIEW = 50;//评论获得分数,只能评论10次

+ 43 - 0
app/common/model/user/UserAccessLog.php

@@ -0,0 +1,43 @@
+<?php
+// +----------------------------------------------------------------------
+// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2017~2021 https://www.yiovo.com All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
+// +----------------------------------------------------------------------
+// | Author: 萤火科技 <admin@yiovo.com>
+// +----------------------------------------------------------------------
+declare (strict_types=1);
+
+namespace app\common\model\user;
+
+use cores\BaseModel;
+
+/**
+ * 文章模型
+ * Class ShareKey
+ * @package app\common\model
+ */
+class UserAccessLog extends BaseModel
+{
+    // 定义表名
+    protected $name = 'user_access_log';
+
+    // 定义主键
+    protected $pk = 'id';
+
+    // 追加字段
+    protected $append = [];
+
+
+    /**
+     * 详情
+     * @param int $id
+     * @return array|null|static
+     */
+    public static function detail(int $id)
+    {
+        return self::get($id);
+    }
+}

+ 17 - 2
app/index/common.php

@@ -29,7 +29,7 @@ function getPlatform()
 }
 
 // 加密函数
-function encrypt(string $data, $key = 'vp-256-bit-secret-key')
+function encrypt0(string $data, $key = 'vp-256-bit-secret-key')
 {
     $method = 'AES-256-CBC';
     //$iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length($method));
@@ -40,8 +40,15 @@ function encrypt(string $data, $key = 'vp-256-bit-secret-key')
     return base64_encode($iv . $encrypted);
 }
 
+function encrypt(string $data)
+{
+    $timestamp = time();
+    $pre0 = str_repeat('0', 10 - strlen($data));
+    return strrev(strval($timestamp)) . $pre0 . $data;
+}
+
 // 解密函数
-function decrypt($data, $key = 'vp-256-bit-secret-key')
+function decrypt0($data, $key = 'vp-256-bit-secret-key')
 {
     $method = 'AES-256-CBC';
     // 解码加密字符串,并分离iv
@@ -50,3 +57,11 @@ function decrypt($data, $key = 'vp-256-bit-secret-key')
     $decrypted = openssl_decrypt(substr($decoded, openssl_cipher_iv_length($method)), $method, $key, 0, $iv);
     return $decrypted;
 }
+
+function decrypt($data)
+{
+    if (empty($data) || strlen($data) < 10){
+        return 0;
+    }
+    return intval(substr($data, 10));
+}

+ 10 - 0
app/index/controller/Captcha.php

@@ -13,6 +13,7 @@ declare (strict_types=1);
 namespace app\index\controller;
 
 use app\common\library\Log;
+use app\index\model\user\UserAccessLog;
 use app\index\service\passport\MailCaptcha;
 use think\response\Json;
 use app\index\service\passport\{Captcha as CaptchaService,
@@ -63,6 +64,15 @@ class Captcha extends Controller
     {
         $data = $this->postForm();
         $email = $data['mobile'] ?? '';
+        UserAccessLog::doSave([
+            'user_id' => 0,
+            'path' => $this->request->action(),
+            'remark' => $email,
+            'ip' => $this->request->ip(),
+            'store_id' => $this->getStoreId(),
+            'create_time' => time()
+        ]);
+
         if (empty($email) || !is_email($email)) {
             return $this->renderError('Invalid email address.');
         }

+ 7 - 7
app/index/controller/Checkout.php

@@ -171,7 +171,7 @@ class Checkout extends Controller
         $userInfo = User::getCurrentLoginUser();
         $points = $userInfo['points'];
         if ($params['payType'] == OrderPayTypeEnum::POINTS) {
-            $payPoints = intval(bcmul(strval($orderInfo['orderPayPrice']), strval(UserAlias::POINTS_FOR_REGISTER), 0));//订单所需积分
+            $payPoints = intval(bcmul(strval($orderInfo['orderPayPrice']), strval(UserAlias::POINTS_FOR_ONE_DOLLAR), 0));//订单所需积分
             if (intval($points) < $payPoints) {
                 return $this->renderError('Not enough points');
             }
@@ -247,18 +247,18 @@ class Checkout extends Controller
                     $fromUserId = decrypt($key);
                     if ($fromUserId && $fromUserId != $order['user_id']) {
                         $describe = "Giveaway after sharing";
-                        $payPoints = intval(bcmul($order['pay_price'], strval(UserAlias::POINTS_FOR_REGISTER), 0));
-                        UserModel::setIncPoints(intval($fromUserId), $payPoints, $describe);
+                        //$payPoints = intval(bcmul($order['pay_price'], strval(UserAlias::POINTS_FOR_SHARE), 0));
+                        UserModel::setIncPoints(intval($fromUserId), UserAlias::POINTS_FOR_SHARE, $describe);
                         Cache::delete(UserModel::SHARE_PREFIX . $order['user_id']);
                         ShareKey::delKey($key);
                     }
                 }
 
-            } else {
-                //自己购买获得积分
-                $describe = "Purchase goods to earn points.";
-                UserModel::setIncPoints(intval($order['user_id']), UserAlias::POINTS_FOR_BUY, $describe);
             }
+
+            //自己购买获得积分
+            $describe = "Purchase goods to earn points.";
+            UserModel::setIncPoints(intval($order['user_id']), UserAlias::POINTS_FOR_BUY, $describe);
         }
 
         return view('paySuccessful', ['notice' => 'Payment Successful']);

+ 11 - 3
app/index/controller/Comment.php

@@ -12,9 +12,11 @@ declare (strict_types = 1);
 
 namespace app\index\controller;
 
+use app\common\model\User as UserAlias;
 use app\index\model\Order as OrderModel;
 use app\index\model\Comment as CommentModel;
 use app\index\model\OrderGoods as OrderGoodsModel;
+use app\index\model\User as UserModel;
 use think\facade\Session;
 
 /**
@@ -75,14 +77,20 @@ class Comment extends Controller
         // 待评价商品列表
         $goodsList = OrderGoodsModel::getNotCommentGoodsList($orderId);
         if ($goodsList->isEmpty()) {
-            return $this->renderError('该订单没有可评价的商品');
+            return $this->renderError('There are no items to review for this order.');
         }
         // 提交商品评价
         $model = new CommentModel;
         if ($model->increased($orderInfo, $goodsList, $this->postForm())) {
-            return $this->renderSuccess([], '评价发表成功');
+            //评论获得积分
+            //只有前十条评论给积分
+            $totalReviews = $model->rowsUserTotal($userId);
+            if ($totalReviews < 10) {
+                UserModel::setIncPoints(intval($userId), UserAlias::POINTS_FOR_REVIEW, 'Post a review.');
+                return $this->renderSuccess([], 'Success');
+            }
         }
-        return $this->renderError($model->getError() ?: '评价发表失败');
+        return $this->renderError($model->getError() ?: 'Something wrong.');
     }
 
     /**

+ 18 - 1
app/index/controller/Index.php

@@ -8,6 +8,7 @@ use app\console\service\OrderGetYundan as OrderGetYundanService;
 use app\index\model\Article as ArticleModel;
 use app\index\model\Comment as CommentModel;
 use app\index\model\Goods as GoodsModel;
+use app\index\model\user\UserAccessLog;
 use think\facade\Cache;
 use think\facade\Log;
 use think\facade\Session;
@@ -22,7 +23,15 @@ class Index extends Controller
 {
     public function index()
     {
-        Log::notice($this->request->ip());
+        //Log::notice($this->request->ip());
+        UserAccessLog::doSave([
+            'user_id' => 0,
+            'path' => $this->request->action(),
+            'remark' => '',
+            'ip' => $this->request->ip(),
+            'store_id' => $this->getStoreId(),
+            'create_time' => time()
+        ]);
         //banner位
         $newArrivalCache = Cache::get('index_newArrival');
         $bestsellerCache = Cache::get('index_bestseller');
@@ -176,6 +185,14 @@ class Index extends Controller
 
     public function vapePoints(): View
     {
+        UserAccessLog::doSave([
+            'user_id' => 0,
+            'path' => $this->request->action(),
+            'remark' => '',
+            'ip' => $this->request->ip(),
+            'store_id' => $this->getStoreId(),
+            'create_time' => time()
+        ]);
         return view('vapePoints');
     }
 

+ 28 - 2
app/index/controller/Passport.php

@@ -12,6 +12,9 @@ declare (strict_types=1);
 
 namespace app\index\controller;
 
+use app\common\model\User as UserAlias;
+use app\index\model\User as UserModel;
+use app\index\model\user\UserAccessLog;
 use think\facade\Cache;
 use app\index\service\passport\Login as LoginService;
 use think\facade\Session;
@@ -35,6 +38,15 @@ class Passport extends Controller
     public function login()
     {
         if ($this->request->method() == 'GET') {
+            UserAccessLog::doSave([
+                'user_id' => 0,
+                'path' => $this->request->action(),
+                'remark' => '',
+                'ip' => $this->request->ip(),
+                'store_id' => $this->getStoreId(),
+                'create_time' => time()
+            ]);
+
             return view('logIn');
         }
         // 执行登录
@@ -49,7 +61,7 @@ class Passport extends Controller
         Session::set('access_token', $token);
         Session::set('user_id', $userInfo['user_id']);
 
-       $returnUri = Session::pull('returnuri');
+        $returnUri = Session::pull('returnuri');
         return $this->renderSuccess([
             'userId' => (int)$userInfo['user_id'],
             'token' => $LoginService->getToken((int)$userInfo['user_id']),
@@ -59,11 +71,25 @@ class Passport extends Controller
 
     public function register()
     {
+        $form = $this->postForm();
+        UserAccessLog::doSave([
+            'user_id' => 0,
+            'path' => $this->request->action(),
+            'remark' => json_encode($form),
+            'ip' => $this->request->ip(),
+            'store_id' => $this->getStoreId(),
+            'create_time' => time()
+        ]);
+
         // 执行登录
         $LoginService = new LoginService;
-        if (!$LoginService->toRegister($this->postForm())) {
+        if (!$LoginService->toRegister($form)) {
             return $this->renderError($LoginService->getError());
         }
+        if (!empty($form['mobile'])) {
+            $userInfo = $LoginService->getUserInfo();
+            UserModel::setIncPoints(intval($userInfo['user_id']), UserAlias::POINTS_FOR_REGISTER, 'Register .');
+        }
 
         return $this->renderSuccess([], 'Registration is successful');
     }

+ 2 - 1
app/index/controller/User.php

@@ -191,7 +191,8 @@ class User extends Controller
 //        $url = 'Your friend shared a product with you. Click on the link to view it now: '
 //            . config('app.app_host') . '/index/index/productDetails/goodsId/' . $goodsId . '?key=' . $encryptUserId;
         //Log::debug($url);
-        $url = 'Your friend shared a product with you. Click on the link to view it now: '.'<a href="http://card.mocharm.net">Click Here</a>';
+        $link = config('app.app_host') . '/index/index/productDetails/goodsId/' . $goodsId . '?key=' . $encryptUserId;
+        $url = 'Your friend shared a product with you. Click on the link to view it now: ' . '<a href="' . $link . '">Click Here</a>';
 
         $smtp = new UMailer(config('smtp.host'), config('smtp.port'), true,
             config('smtp.username'), config('smtp.password'));

+ 14 - 4
app/index/model/Comment.php

@@ -87,6 +87,16 @@ class Comment extends CommentModel
         return $this->where($filter)->count();
     }
 
+    /**
+     * 获取指定用户评价总数量
+     * @param int $userId
+     * @return int
+     */
+    public function rowsUserTotal(int $userId)
+    {
+        return $this->where(['user_id',$userId])->where('status',1)->where('is_delete',0)->count();
+    }
+
     public function rowsTotalBatch(array $goodsIds)
     {
         $filter = [
@@ -101,7 +111,7 @@ class Comment extends CommentModel
      * @param int|null $scoreType 评分 (10好评 20中评 30差评)
      * @return array[]
      */
-    private function getFilter(int $goodsId, int $scoreType = null)
+    private function getFilter(int $goodsId, int $scoreType = null, int $userId = null)
     {
         // 筛选条件
         $filter = [
@@ -152,12 +162,12 @@ class Comment extends CommentModel
     {
         // 验证订单是否已完成
         if ($order['order_status'] != 30) {
-            $this->error = '该订单未完成,无法评价';
+            $this->error = 'Not supported now.';
             return false;
         }
         // 验证订单是否已评价
         if ($order['is_comment'] == 1) {
-            $this->error = '该订单已完成评价';
+            $this->error = 'The order has been reviewed';
             return false;
         }
         return true;
@@ -178,7 +188,7 @@ class Comment extends CommentModel
         // 生成评价数据
         $data = $this->createCommentData($order['order_id'], $goodsList, $formData);
         if (empty($data)) {
-            $this->error = '没有输入评价内容';
+            $this->error = 'No content.';
             return false;
         }
         return $this->transaction(function () use ($order, $goodsList, $formData, $data) {

+ 2 - 2
app/index/model/Order.php

@@ -115,7 +115,7 @@ class Order extends OrderModel
                 $orderModel = new PaySuccess($order['order_no']);
                 $transId = 'VP' . date('YmdHis') . $userInfo['user_id'];
 
-                $describe = "用户消费:{$order['order_no']}";
+                $describe = "User consumption:{$order['order_no']}";
                 UserModel::setIncPoints($userInfo['user_id'], -$payPoints, $describe);
                 $status = $orderModel->onPaySuccess(OrderPayTypeEnum::POINTS, ['transaction_id' => $transId]);
                 if ($status) {
@@ -247,7 +247,7 @@ class Order extends OrderModel
                 $filter['order_status'] = OrderStatusEnum::NORMAL;
                 break;
             case 'comment':
-                $filter['is_comment'] = 0;
+                //$filter['is_comment'] = 0;
                 $filter['order_status'] = OrderStatusEnum::COMPLETED;
                 break;
         }

+ 34 - 0
app/index/model/user/UserAccessLog.php

@@ -0,0 +1,34 @@
+<?php
+// +----------------------------------------------------------------------
+// | 萤火商城系统 [ 致力于通过产品和服务,帮助商家高效化开拓市场 ]
+// +----------------------------------------------------------------------
+// | Copyright (c) 2017~2021 https://www.yiovo.com All rights reserved.
+// +----------------------------------------------------------------------
+// | Licensed 这不是一个自由软件,不允许对程序代码以任何形式任何目的的再发行
+// +----------------------------------------------------------------------
+// | Author: 萤火科技 <admin@yiovo.com>
+// +----------------------------------------------------------------------
+declare (strict_types = 1);
+
+namespace app\index\model\user;
+
+use app\common\model\user\UserAccessLog as UserAccessLogModel;
+
+/**
+ * 系统设置模型
+ * Class Setting
+ * @package app\api\model
+ */
+class UserAccessLog extends UserAccessLogModel
+{
+    /**
+     * 获取积分名称
+     * @return bool
+     */
+    public static function doSave($data)
+    {
+        if (empty($data))return false;
+        return static::insert($data);
+    }
+
+}

+ 1 - 1
app/index/service/Payment.php

@@ -75,7 +75,7 @@ class Payment extends BaseService
                 $orderModel = new PaySuccess($order['order_no']);
                 $transId = 'VP' . date('YmdHis') . $userInfo['user_id'];
 
-                $describe = "用户消费:{$order['order_no']}";
+                $describe = "User consumption:{$order['order_no']}";
                 UserModel::setIncPoints($userInfo['user_id'], -$payPoints, $describe);
                 $status = $orderModel->onPaySuccess(OrderPayTypeEnum::POINTS, ['transaction_id' => $transId]);
                 if ($status) {

+ 1 - 1
app/index/service/order/Checkout.php

@@ -695,7 +695,7 @@ class Checkout extends BaseService
         $order['couponId'] > 0 && UserCouponModel::setIsUse((int)$order['couponId']);
         // 积分抵扣情况下扣除用户积分
         if ($order['isAllowPoints'] && $order['isUsePoints'] && $order['pointsNum'] > 0) {
-            $describe = "用户消费:{$this->model['order_no']}";
+            $describe = "User consumption:{$this->model['order_no']}";
             UserModel::setIncPoints($this->user['user_id'], -$order['pointsNum'], $describe);
         }
         // 获取订单详情

+ 5 - 3
app/index/service/passport/UMailer.php

@@ -88,7 +88,9 @@ class UMailer extends BaseService
         $smsCaptcha = (string)mt_rand(100000, 999999);
         Cache::set("captchaSMS.{$to}", ['code' => $smsCaptcha, 'times' => $this->checkTimes], $this->expireTime);
 
-        $body = 'Your code is ' . $smsCaptcha . '.Please use it in 5 minutes';
+        //$body = 'Your code is ' . $smsCaptcha . '.Please use it in 5 minutes';
+
+        $body = 'Thanks for join us, your verification code is ' . $smsCaptcha;
 
         $header = '';
         $mail_from = $this->get_address($this->strip_comment($from));
@@ -101,8 +103,8 @@ class UMailer extends BaseService
         if ($cc != "") {
             $header .= "Cc: " . $cc . "\r\n";
         }
-        $header .= "From: $from<" . $from . ">\r\n";
-        $header .= "Subject: " . $subject . "\r\n";
+        $header .= "From: FreeShippingV<" . $from . ">\r\n";
+        $header .= "Subject: " . 'Verification code for FreeShippingVapes' . "\r\n";
         $header .= $additional_headers;
         $header .= "Date: " . date("r") . "\r\n";
         $header .= "X-Mailer:By Redhat (PHP/" . phpversion() . ")\r\n";

+ 4 - 2
app/index/view/index/aboutUs.html

@@ -12,19 +12,21 @@
     <h2>Who We Are</h2>
     <p>Freeshippingvapes is a professional vape shop online aimed at USA market.
     </p>
-
+    <br>
     <h2>Our Mission</h2>
     <p>We devote to provide valued customers with high-quality and various e-cigarettes at best price from the regular
         source.</p>
+    <br>
 
     <h2>What We Offer</h2>
     <p> Freeshippingvapes has experienced and professional team who rigorously screens, tests and sources from all major
         e-cigarette brands on a daily basis to provide vapors around the world with good products that we really know,
         as well as continuously exploring and researching more advanced technology and products. We provide free
         shipping for most of our products in the U.S.</p>
+    <br>
 
     <h2>Contact Us</h2>
-    <p>If you have any questions or inquiries, feel free to contact us at <a href="mailto:info@example.com">info@example.com</a>.
+    <p>If you have any questions or inquiries, feel free to contact us at <a href="mailto:service@freeshippingvapes.com" class="aLink">service@freeshippingvapes.com</a>.
     </p>
 </div>
 

+ 6 - 4
app/index/view/index/index.html

@@ -86,7 +86,9 @@
                             </div>
                         </div>
                         <div class="goodsShareBotton">
-                            <img src="/assets/index/asstes/icon/fx.jpg" alt="Share and earn points">
+                            <img src="/assets/index/asstes/icon/share.png" alt="Share and earn points">
+                            <span>Share</span>
+
                         </div>
                     </div>
                 </a>
@@ -137,7 +139,7 @@
                             </div>
                         </div>
                         <div class="goodsShareBotton">
-                            <img src="/assets/index/asstes/icon/fx.jpg" alt="Share and earn points">
+                            <img src="/assets/index/asstes/icon/share.png" alt="Share and earn points">
                         </div>
                     </div>
                 </a>
@@ -233,7 +235,7 @@
                         </div>
                     </div>
                     <div class="goodsShareBotton">
-                        <img src="/assets/index/asstes/icon/fx.jpg" alt="Share and earn points">
+                        <img src="/assets/index/asstes/icon/share.png" alt="Share and earn points">
                     </div>
                 </div>
             </a>
@@ -280,7 +282,7 @@
                         </div>
                     </div>
                     <div class="goodsShareBotton">
-                        <img src="/assets/index/asstes/icon/fx.jpg" alt="Share and earn points">
+                        <img src="/assets/index/asstes/icon/share.png" alt="Share and earn points">
                     </div>
                 </div>
             </a>

+ 11 - 0
app/index/view/index/privacyPolicy.html

@@ -18,6 +18,7 @@
         <br>
         3) Like many websites, we use "cookies" to enhance your experience and gather information about visitors and
         visits to our websites. </p>
+    <br>
 
     <h2>How do we use your information?</h2>
     <p>We may use the information we collect from you when you register, purchase products, enter a contest or
@@ -36,6 +37,7 @@
         subscribed to receive e-mail newsletters, you will not receive these e-mails. Visitors who register or
         participate in other site features such as marketing programs and 'members-only' content will be given a choice
         whether they would like to be on our e-mail list and receive e-mail communications from us.</p>
+    <br>
 
     <h2>How do we protect visitor information?</h2>
     <p>We implement a variety of security measures to maintain the safety of your personal information. Your personal
@@ -45,6 +47,7 @@
         information you supply is transmitted via Secure Socket Layer (SSL) technology and then encrypted into our
         databases to be only accessed as stated above.
     </p>
+    <br>
 
     <h2>Do we use "cookies"?</h2>
     <p>Yes. Cookies are small files that a site or its service provider transfers to your computer's hard drive through
@@ -65,6 +68,7 @@
         cookies. If you turn cookies off, you won't have access to many features that make your site experience more
         efficient and some of our services will not function properly.
     </p>
+    <br>
 
     <h2>How can you unsubscribe, remove or modify information you have provided to us?</h2>
     <p>To modify your e-mail subscriptions, please let us know by modifying your preferences in the "My Account"
@@ -72,6 +76,7 @@
         Or you can contact with us to delete all of your online account information from our database, including but not
         limited to the information above.
     </p>
+    <br>
 
     <h2>Third party links</h2>
     <p>In an attempt to provide you with increased value, we may include third party links on our site. These linked
@@ -79,20 +84,26 @@
         content and activities of these linked sites. Nonetheless, we seek to protect the integrity of our site and
         welcome any feedback about these linked sites (including if a specific link does not work).
     </p>
+    <br>
 
     <h2>Questions and feedback</h2>
     <p>We welcome your questions, comments, and concerns about privacy. Please send us any and all feedback pertaining
         to privacy, or any other issue.
     </p>
+    <br>
+
     <h2>Online Policy Only</h2>
     <p>This online privacy policy applies only to information collected through our website and not to information
         collected offline.
     </p>
+    <br>
 
     <h2>Terms and Conditions</h2>
     <p>Please also visit our Terms and Conditions section establishing the use, disclaimers, and limitations of
         liability governing the use of our website.
     </p>
+    <br>
+
     <h2>Your Consent</h2>
     <p>By using our site, this means you consent to our privacy policy.
     </p>

+ 5 - 0
app/index/view/index/returnWarranty.html

@@ -26,11 +26,13 @@
         <br>
         Our Customer Service will review your case and offer a return back within 24 hours.
     </p>
+    <br>
 
     <h2>3 Months Warranty</h2>
     <p>We have certain guarantee period for our products from the date of original purchase, usually come with 3 months
         warranty, please check the Guarantee section in item description carefully.
     </p>
+    <br>
 
     <h2>Disclaim</h2>
     <p> 1. Artificial damage and problems caused by misuse are not covered by warranty.
@@ -45,6 +47,7 @@
         <br>
         2.Any hardware cracking, modification is at your own risk, it will void warranty.
     </p>
+    <br>
 
     <h2>
         Exchange terms</h2>
@@ -84,6 +87,7 @@
         *For exchanges, the processing time for the exchanged item will be between 3-5 business days, upon receiving
         your item back, and depending on stock availability.
     </p>
+    <br>
 
     <h2>Missing items from package</h2>
     <p>We have the confidence that each order is proceed in a fast and correct way. We record the order weight
@@ -105,6 +109,7 @@
         <br>
         *Alternatively we can arrange a refund of the missing item for you.
     </p>
+    <br>
 
     <h2>Refund terms</h2>
     <p>(1) All items you want to return and get refund must contact us by email directly.

+ 5 - 0
app/index/view/index/salesTerms.html

@@ -36,6 +36,7 @@
         All users agree that access to and the use of this site are subject to the following terms and conditions and
         other applicable laws.
     </p>
+    <br>
 
     <h2>Ordering</h2>
     <p>In the event that a product listed is mistakenly listed at an incorrect prices, we reserves the right to refuse
@@ -44,6 +45,7 @@
         limit the number of products available for purchase. We reserve the right to change stock available for purchase
         at any time, even after you place an order.
     </p>
+    <br>
 
     <h2>Order Cancelation</h2>
     <p> To contact our customer support team to cancel an order, please fill out the 'Contact Us' form by clicking here
@@ -53,6 +55,7 @@
         able to do so if an order has already Processed. As that means your order has already processed for shipment and
         is boxed, awaiting collection. If an order has already been shipped from our facility, we unfortunately are not
         able to cancel the order.</p>
+    <br>
 
     <h2>Shipping and Handling</h2>
     <p>With most orders, they can be sent out for delivery within 72 business hours. We strive to ship orders out as
@@ -86,6 +89,7 @@
         All non-receipt of orders must be reported within 3 months from the date the item is shipped to you. After this
         time We will no longer be able to investigate and no compensation will be offered.
     </p>
+    <br>
 
     <h2>Communication</h2>
     <p>
@@ -96,6 +100,7 @@
         or comments from our legal consumers. We welcome all comments to help make navigating all links, working or
         non-working, as easily as possible.
     </p>
+    <br>
 
     <h2>Term Termination</h2>
     <p>

+ 42 - 18
app/index/view/index/vapePoints.html

@@ -10,37 +10,61 @@
 </header>
 <div class="container">
     <h2>What are Vape points?</h2>
-    <p>1.Points can be used as cash on orders. 100 points=$1.00. Customers can earn points through various activities
-        such as registering, purchasing items, posting reviews, and Signing up for our newsletter.
+    <p>1. Points can be used as cash on orders. 100 points=$1.00. Customers can earn points through various activities
+        such as registering, purchasing items, posting reviews, forwarding to friends and Signing up for our newsletter.
         <br>
-        2.All points must be obtained in accordance with the rules and Customer Conduct Code of our Terms & Conditions.
+        2. All points must be obtained in accordance with the rules and Customer Conduct Code of our Terms & Conditions.
         Violators will have their points reset to zero and/or their account suspended.
     </p>
+    <br>
+
+    <h2>How to Get Vape Points?</h2>
+    <p> For example, if you purchase one vape (any flavor) the cost is around 11 USD. Therefore you need 1100 points to
+        pay for this order. When you have enough points in the account, you can click the “Pay by Vape Points” and
+        proceed.
+
+        Example to get 1100 vape points: You registered on the website and forwarded to two friends to purchase =
+        100+500*2 = 1100 points.
+        Or, register on our website and purchased one order and a few months later purchased another order = 100 + 500 +
+        500 = 1100 vapes points! EASY!!</p>
+    <br>
 
     <h2>How to Use Vape Points?</h2>
-    <p>1.100 points=$1.00.
+    <p>1. 100 points=$1.00. Basically 1100 points approximately equals the value of one free vape. (Exclude shipping)
         <br>
-        2.The maximum of the points you redeemed each purchase is 1000.</p>
-
-    <h2>How to Get Vape Points?</h2>
-    <p> First time you subscribe to Newsletter etc.</p>
+        2. The points you redeemed for each purchase is 500. Re-direct to friends and family to purchase is 500 points.
+        (By entering their email addresses in the share function of each listing. If the email recipient clicks and
+        purchases, 500 vape points will automatically be redeemed to your account. )
+        Registration or subscribing to our newsletter = 100 points automatically. EACH Purchasing = 500 points. Each
+        review posting = 50 points (maximum 10 reviews per account) Forwarding to friends is fun. Each forwarded email
+        the user clicks and purchased, you can redeem receive 500 points directly and there is no limit to how many
+        points you can earn in this promotion function.
+        How to USE Vape Points?
+    </p>
+    <br>
 
     <h2>About your points</h2>
-    <p>1.When a customer requests a refund, the points earned from the corresponding order will be deducted from the
+    <p>1. When a customer requests a refund, the points earned from the corresponding order will be deducted from the
         account. Points can be deducted to a negative value. In this case, future points earned will offset the negative
         value first until the customer has a positive number of points.
         <br>
-        2.Each time you earn VapeSourcing points, there is a corresponding validity period. All points received are
-        valid for 365 days, we will revise your points balance regularly.
+        2. Each time you earn Vape points, there is a corresponding validity period. All points received are valid for
+        365 days, we will revise your points balance regularly.
     </p>
-
+    <br>
     <p>
-        We are authorized agency of all brands and can guarantee all products from factories have successfully passed QC
-        inspection.
-        Once the order has been received, please at first check the package and all items carefully to make sure whether
-        they can work well.
-        If there is something wrong, we always would like to handle it with a professional manner to make our customers
-        satisfied with their purchase from us.
+        For registration: <a href="/index/passport/login.html" class="aLink">click here! </a>(100 points)
+        <br>
+        IF you are already registered and:
+        <br>
+        i) would like to purchase, <a href="/index/index/index.html" class="aLink">click here! </a> (500 points each order)
+        <br>
+        ii) would like to post a review, <a href="/index/user/order.html" class="aLink">click here! </a> (50 points each review)
+        <br>
+        iii) would like to forward to a friend by email, <a href="/index/index/index.html" class="aLink">click here! </a> (500 points on each successfully forwarded link
+        purchase)
+        <br>
+        iv) would like to subscribe to our newsletter, <a href="/index/index/index.html" class="aLink">click here! </a> (100 points)
     </p>
 </div>
 {/block}

+ 1 - 1
app/index/view/user/orderDetails.html

@@ -128,7 +128,7 @@
                             <p class="ogToPr">${$goods['total_price']}</p>
                             <!-- 评价 -->
                             {eq name="order['receipt_status']" value="20"}
-                            <div class="evaluate">Preview</div>
+                            <div class="evaluate">Review Now</div>
                             {/eq}
                         </div>
                         {/foreach}

二进制
public/assets/index/asstes/icon/share.png


+ 5 - 0
public/assets/index/css/aboutUs.css

@@ -28,4 +28,9 @@ h1 {
 p {
     line-height: 1.6;
     font-size: larger;
+}
+
+.aLink {
+    text-decoration: underline;
+    color: #00a0e9;
 }

+ 2 - 2
public/assets/index/css/common.css

@@ -666,8 +666,8 @@ a:active, a:focus {
 }
 
 .footerIconItem img {
-    width: .54rem;
-    height: .54rem;
+    width: 1.14rem;
+    height: 1.14rem;
     border-radius: 1%;
 }
 

+ 1 - 1
public/assets/index/css/index.css

@@ -189,7 +189,7 @@ body{
     align-items: center;
 }
 .goodsShareBotton img{
-    width: .24rem;
+    width: .54rem;
 }
 #shareModal{
     position: fixed;

+ 15 - 1
public/install/data/install_struct.sql

@@ -980,4 +980,18 @@ CREATE TABLE `yoshop_share_key` (
  `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`key_id`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户分享商品记录key表';
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户分享商品记录key表';
+
+DROP TABLE IF EXISTS `yoshop_user_access_log`;
+CREATE TABLE `yoshop_user_access_log` (
+    `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
+    `user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
+    `ip` varchar(255) NOT NULL DEFAULT '' COMMENT 'IP',
+    `path` varchar(255) NOT NULL DEFAULT '' COMMENT '行为',
+    `remark` varchar(2550) NOT NULL DEFAULT '' COMMENT '备注',
+    `is_delete` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除',
+    `store_id` int unsigned NOT NULL DEFAULT '0' COMMENT '商城ID',
+    `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
+    `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
+    PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户访问记录表';