YanaDH преди 7 години
родител
ревизия
7426b4b2dc

+ 103 - 103
miaomiao/config.xml

xqd
@@ -1,107 +1,107 @@
-<?xml version='1.0' encoding='utf-8'?>
-<widget id="com.miaomiao.app" version="0.0.8" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
-    <name>瞄喵</name>
-    <description>
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<widget id="com.miaomiao.app" version="0.0.9" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+  <name>瞄喵</name>
+  <description>
         An Ionic Framework and Cordova project.
     </description>
-    <author email="you@example.com" href="http://example.com.com/">
+  <author email="you@example.com" href="http://example.com.com/">
       Mike
   </author>
-    <content src="index.html" />
-    <access origin="*" />
-    <allow-intent href="*" />
-    <allow-navigation href="*" />
-    <preference name="webviewbounce" value="false" />
-    <preference name="UIWebViewBounce" value="false" />
-    <preference name="DisallowOverscroll" value="true" />
-    <preference name="android-minSdkVersion" value="16" />
-    <preference name="BackupWebStorage" value="none" />
-    <preference name="KeepRunning" value="True" />
-    <preference name="ShowTitle" value="True" />
-    <preference name="InAppBrowserStorageEnabled" value="True" />
-    <preference name="SuppressesIncrementalRendering" value="True" />
-    <preference name="windows-target-version" value="10.0" />
-    <preference name="SplashScreen" value="screen" />
-    <preference name="KeyboardDisplayRequiresUserAction" value="false" />
-    <preference name="SplashScreenDelay" value="3000" />
-    <feature name="StatusBar">
-        <param name="ios-package" onload="true" value="CDVStatusBar" />
-    </feature>
-    <platform name="ios">
-        <icon height="57" src="resources/ios/icon/icon.png" width="57" />
-        <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
-        <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
-        <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
-        <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
-        <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
-        <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
-        <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
-        <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
-        <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
-        <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
-        <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
-        <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
-        <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
-        <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
-        <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
-        <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
-        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
-        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
-        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
-        <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
-        <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
-        <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
-        <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
-        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
-        <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
-        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
-        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
-        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
-    </platform>
-    <platform name="android">
-        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
-        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
-        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
-        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
-        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
-        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
-        <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
-        <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
-        <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
-        <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
-        <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
-        <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
-        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
-        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
-        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
-        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
-        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
-        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
-    </platform>
-    <engine name="android" spec="^6.2.3" />
-    <plugin name="cordova-hot-code-push-plugin" spec="^1.5.3" />
-    <plugin name="cordova-plugin-actionsheet" spec="2.3.3" />
-    <plugin name="cordova-plugin-camera" spec="file:node_modules\cordova-plugin-camera" />
-    <plugin name="cordova-plugin-compat" spec="1.1.0" />
-    <plugin name="cordova-plugin-console" spec="~1.0.2" />
-    <plugin name="cordova-plugin-device" spec="~1.1.1" />
-    <plugin name="cordova-plugin-file" spec="4.3.2" />
-    <plugin name="cordova-plugin-file-transfer" spec="1.6.2" />
-    <plugin name="cordova-plugin-media-capture" spec="1.4.3" />
-    <plugin name="cordova-plugin-offbye-alipay" spec="git+https://github.com/offbye/cordova-plugin-alipay.git">
-        <variable name="PARTNER_ID" value="2088721135315822" />
-    </plugin>
-    <plugin name="cordova-plugin-splashscreen" spec="4.0.3" />
-    <plugin name="cordova-plugin-statusbar" spec="~2.1.0" />
-    <plugin name="cordova-plugin-wechat" spec="^2.0.0">
-        <variable name="WECHATAPPID" value="wxc5181c0d406023e6" />
-    </plugin>
-    <plugin name="cordova-plugin-whitelist" spec="^1.3.2" />
-    <plugin name="ionic-plugin-keyboard" spec="~1.0.9" />
-    <plugin name="jpush-phonegap-plugin" spec="^3.2.3">
-        <variable name="APP_KEY" value="69838317211448192366f9d8" />
-    </plugin>
-    <plugin name="phonegap-plugin-barcodescanner" spec="git+https://github.com/phonegap/phonegap-plugin-barcodescanner.git">
-        <variable name="CAMERA_USAGE_DESCRIPTION" value="请摄像头对准条码" />
-    </plugin>
-</widget>
+  <content src="index.html"/>
+  <access origin="*"/>
+  <allow-intent href="*"/>
+  <allow-navigation href="*"/>
+  <preference name="webviewbounce" value="false"/>
+  <preference name="UIWebViewBounce" value="false"/>
+  <preference name="DisallowOverscroll" value="true"/>
+  <preference name="android-minSdkVersion" value="16"/>
+  <preference name="BackupWebStorage" value="none"/>
+  <preference name="KeepRunning" value="True"/>
+  <preference name="ShowTitle" value="True"/>
+  <preference name="InAppBrowserStorageEnabled" value="True"/>
+  <preference name="SuppressesIncrementalRendering" value="True"/>
+  <preference name="windows-target-version" value="10.0"/>
+  <preference name="SplashScreen" value="screen"/>
+  <preference name="KeyboardDisplayRequiresUserAction" value="false"/>
+  <preference name="SplashScreenDelay" value="3000"/>
+  <feature name="StatusBar">
+    <param name="ios-package" onload="true" value="CDVStatusBar"/>
+  </feature>
+  <platform name="ios">
+    <icon height="57" src="resources/ios/icon/icon.png" width="57"/>
+    <icon height="114" src="resources/ios/icon/icon@2x.png" width="114"/>
+    <icon height="40" src="resources/ios/icon/icon-40.png" width="40"/>
+    <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80"/>
+    <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120"/>
+    <icon height="50" src="resources/ios/icon/icon-50.png" width="50"/>
+    <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100"/>
+    <icon height="60" src="resources/ios/icon/icon-60.png" width="60"/>
+    <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120"/>
+    <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180"/>
+    <icon height="72" src="resources/ios/icon/icon-72.png" width="72"/>
+    <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144"/>
+    <icon height="76" src="resources/ios/icon/icon-76.png" width="76"/>
+    <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152"/>
+    <icon height="29" src="resources/ios/icon/icon-small.png" width="29"/>
+    <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58"/>
+    <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87"/>
+    <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640"/>
+    <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750"/>
+    <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242"/>
+    <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208"/>
+    <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048"/>
+    <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732"/>
+    <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024"/>
+    <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536"/>
+    <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048"/>
+    <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768"/>
+    <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640"/>
+    <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320"/>
+  </platform>
+  <platform name="android">
+    <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png"/>
+    <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png"/>
+    <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png"/>
+    <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png"/>
+    <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png"/>
+    <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png"/>
+    <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png"/>
+    <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png"/>
+    <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png"/>
+    <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png"/>
+    <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png"/>
+    <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png"/>
+    <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png"/>
+    <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png"/>
+    <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png"/>
+    <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png"/>
+    <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png"/>
+    <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png"/>
+  </platform>
+  <engine name="android" spec="^6.2.3"/>
+  <plugin name="cordova-hot-code-push-plugin" spec="^1.5.3"/>
+  <plugin name="cordova-plugin-actionsheet" spec="2.3.3"/>
+  <plugin name="cordova-plugin-camera" spec="file:node_modules\cordova-plugin-camera"/>
+  <plugin name="cordova-plugin-compat" spec="1.1.0"/>
+  <plugin name="cordova-plugin-console" spec="~1.0.2"/>
+  <plugin name="cordova-plugin-device" spec="~1.1.1"/>
+  <plugin name="cordova-plugin-file" spec="4.3.2"/>
+  <plugin name="cordova-plugin-file-transfer" spec="1.6.2"/>
+  <plugin name="cordova-plugin-media-capture" spec="1.4.3"/>
+  <plugin name="cordova-plugin-offbye-alipay" spec="git+https://github.com/offbye/cordova-plugin-alipay.git">
+    <variable name="PARTNER_ID" value="2088721135315822"/>
+  </plugin>
+  <plugin name="cordova-plugin-splashscreen" spec="4.0.3"/>
+  <plugin name="cordova-plugin-statusbar" spec="~2.1.0"/>
+  <plugin name="cordova-plugin-wechat" spec="^2.0.0">
+    <variable name="WECHATAPPID" value="wxc5181c0d406023e6"/>
+  </plugin>
+  <plugin name="cordova-plugin-whitelist" spec="^1.3.2"/>
+  <plugin name="ionic-plugin-keyboard" spec="~1.0.9"/>
+  <plugin name="jpush-phonegap-plugin" spec="^3.2.3">
+    <variable name="APP_KEY" value="69838317211448192366f9d8"/>
+  </plugin>
+  <plugin name="phonegap-plugin-barcodescanner" spec="git+https://github.com/phonegap/phonegap-plugin-barcodescanner.git">
+    <variable name="CAMERA_USAGE_DESCRIPTION" value="请摄像头对准条码"/>
+  </plugin>
+</widget>

+ 9 - 3
server/app/Http/Controllers/Admin/Account_logs/InfoController.php

xqd
@@ -12,10 +12,16 @@ class InfoController extends Controller
     public function index(Request $request)
     {
         $id =  $request->id;
-        $list = AccountLog::where('from_id',$id)->where('to_id',$id)
-            ->where('op','充值')->orderBy('id','desc')->paginate(20);
+//        $list = AccountLog::where('from_id',$id)->where('to_id',$id)
+//            ->where('op','充值')->orderBy('id','desc')->paginate(20);
+        $list = AccountLog::where('from_id',$id)->orWhere('to_id',$id)
+           ->orderBy('id','desc')->paginate(20);
+        if(isset($request['sort_field']) && $request['sort_field'] && isset($request['sort_field_by'])) {
+            $list = AccountLog::where('from_id',$id)->orWhere('to_id',$id)
+                ->orderBy($request['sort_field'],$request['sort_field_by'])->paginate(20);
+        }
         Log::info($list);
-        return view('admin.account_log.index',compact('list'));
+        return view('admin.account_log.index',compact('list','id'));
     }
 
     public function destroy(Request $request)

+ 21 - 19
server/app/Http/Controllers/Admin/User/Cash/OutController.php

xqd
@@ -104,25 +104,27 @@ class OutController extends Controller
                 $message = '亲,你的提现我们已经审批通过,你的梦想基金很快就到账了哦!';
             }else{
 //                已打款  记录提现日志  并且用户的账号梦想币减少
-                $user = UserInfoModel::find($data['user_id']);
-                $user->coin -=$data['cash'];
-                $user->save();
-                if (!empty($user)) {
-                    $arr = [
-                        'from_type'=>'梦想币',
-                        'from_id'=>$data['user_id'],
-                        'from_name'=>$user->nickname,
-                        'op'=>'提现',
-                        'from_amount'=>$data['cash'],
-                        'to_type'=>'现金',
-                        'to_id'=>$data['user_id'],
-                        'to_name'=>$user->nickname,
-                        'to_amount'=>$data['cash'],
-                        'channel'=>'平台内',
-                        'transaction_id'=>$info->number,
-                        'avatar'=>env('APP_URL').'/base/img/jianhao.png',
-                    ];
-                    AccountLog::create($arr);
+                if ($info['status']!=2) {  //避免重复操作
+                    $user = UserInfoModel::find($data['user_id']);
+                    $user->coin -=$data['cash'];
+                    $user->save();
+                    if (!empty($user)) {
+                        $arr = [
+                            'from_type'=>'梦想币',
+                            'from_id'=>$data['user_id'],
+                            'from_name'=>$user->nickname,
+                            'op'=>'提现',
+                            'from_amount'=>$data['cash'],
+                            'to_type'=>'现金',
+                            'to_id'=>$data['user_id'],
+                            'to_name'=>$user->nickname,
+                            'to_amount'=>$data['cash'],
+                            'channel'=>'平台内',
+                            'transaction_id'=>$info->number,
+                            'avatar'=>env('APP_URL').'/base/img/jianhao.png',
+                        ];
+                        AccountLog::create($arr);
+                    }
                 }
                 $message = '你提现的¥'.$data['cash'].'已经到账啦,去实现梦想吧!喵~';
             }

+ 42 - 0
server/app/Http/Controllers/Admin/User/InfoController.php

xqd xqd
@@ -8,6 +8,7 @@
  */
 namespace App\Http\Controllers\Admin\User;
 use App\Http\Controllers\Admin\Controller;
+use App\Models\AccountLog;
 use App\Models\BaseAttachmentModel;
 use App\Models\MeetInfoModel;
 use App\Models\SearchInfoModel;
@@ -222,4 +223,45 @@ class InfoController extends Controller
             return  $this->showWarning("操作失败");
         }
     }
+/**
+    加减币
+ */
+    public function editCoin(Request $request)
+    {
+        $status = $request->input('status');
+        $user_id = request('id');
+        $user = UserInfoModel::find($user_id);
+        if ($request->isMethod('POST')) {
+            $data = ($request->data);
+            if (empty($status)) {
+                return $this->showWarning("请选择交易类型");
+            }
+            $data['from_type']='梦想币';
+            $data['from_id']=0;  //设置初始值
+            $data['from_amount']=$data['to_amount'];
+            $data['from_type']='梦想币';
+            $data['to_id']=$user_id;
+            $data['channel']='后台';
+            $data['transaction_id']=date('YmdHis') . mt_rand(1000, 9999);
+            if (($status)==2) {   //2减
+                if ($user->coin<$data['to_amount']) {
+                    return $this->showWarning("交易数额不合法,请填写不大于{$user->coin}的金额");
+                }
+                $user->coin -= $data['to_amount'];
+                $data['from_id']=$user_id;
+                $data['avatar']=env('APP_URL').'/base/img/jianhao.png';
+            }else{//1加
+                $user->coin += $data['to_amount'];
+                $data['avatar']=env('APP_URL').'/base/img/jiahao.png';
+            }
+            $user->save();
+           $ok = AccountLog::create($data);
+            if (!$ok) {
+                return $this->showWarning("操作失败");
+            }else{
+                return $this->showMessage('操作成功');
+            }
+        }
+        return view('admin.user.info.editcoin');
+    }
 }

+ 3 - 1
server/app/Http/Controllers/Api/V1/DreamController.php

xqd xqd
@@ -462,6 +462,9 @@ class DreamController extends Controller
             $dream->mark += $coin*$number;
             $dream->save();
             $to_user = $dream->user;
+
+            $user_coin = $user->coin;
+
 //            支持成功记录交易记录
             if (!empty($to_user)) {
                 $arr = [
@@ -554,7 +557,6 @@ class DreamController extends Controller
 //            梦想分 mark
             $dream->top3user = $top3user;
             $dream->is_collection = $is_collection;
-            $user_coin = $user->coin;
             return $this->api(compact('dream','user_coin','number'));
         }
     }

+ 3 - 3
server/app/Http/Controllers/Api/V1/IndexController.php

xqd
@@ -132,17 +132,17 @@ class IndexController extends Controller
         if ($type == 'trend') {
 //            潮流  发布三天之内的梦想
             $banners = $this->getBanner();
-            $dreams = DreamInfoModel::where('end_time','>',date('Y-m-d H:i:s'))->where('created_at','<',date('Y-m-d H:i:s'))->where('created_at','>',date('Y-m-d H:i:s',time()-3*24*3600))->orderBy('score','desc')->with('user')->paginate(20);
+            $dreams = DreamInfoModel::where('status',1)->where('end_time','>',date('Y-m-d H:i:s'))->where('created_at','<',date('Y-m-d H:i:s'))->where('created_at','>',date('Y-m-d H:i:s',time()-3*24*3600))->orderBy('score','desc')->with('user')->paginate(20);
             $this->dreams($dreams);
         } elseif ($type == 'news') {
 //            最新  发布不到一天前的梦想   ->whereNotIn('id', $id_arr2)
             $banners = $this->getBanner();
-            $dreams = DreamInfoModel::where('end_time','>',date('Y-m-d H:i:s'))->where('created_at','<',date('Y-m-d H:i:s'))->where('created_at','>',date('Y-m-d H:i:s',time()-1*24*3600))->orderBy('created_at','desc')->with('user')->paginate(20);
+            $dreams = DreamInfoModel::where('status',1)->where('end_time','>',date('Y-m-d H:i:s'))->where('created_at','<',date('Y-m-d H:i:s'))->where('created_at','>',date('Y-m-d H:i:s',time()-1*24*3600))->orderBy('created_at','desc')->with('user')->paginate(20);
             $this->dreams($dreams);
         } else{
 //            热门
             $banners = $this->getBanner();
-            $dreams = DreamInfoModel::where('end_time','>',date('Y-m-d H:i:s'))->orderBy('score','desc')->with('user')->paginate(15);
+            $dreams = DreamInfoModel::where('status',1)->where('end_time','>',date('Y-m-d H:i:s'))->orderBy('score','desc')->with('user')->paginate(15);
             $this->dreams($dreams);
         }
         foreach ($dreams as $dream) {

+ 24 - 2
server/app/Http/Controllers/Api/V1/MyController.php

xqd xqd xqd xqd xqd xqd
@@ -302,6 +302,12 @@ class MyController extends Controller
             })->orderBy('id','desc')->get()->toArray();
 
         $data = array_merge($new_data1,$new_data2,$new_data3,$data456);
+        if (!empty($data)) {
+            foreach ($data as $key => $row) {
+                $volume[$key]  = $row['id'];
+            }
+            array_multisort($volume, SORT_DESC, $data);
+        }
         SystemInfoModel::where('to_user_id',$user->id)->where('type_id',1)->update(['is_read' => 1]);
         return $this->api($data);
 //        foreach ($data as $item){   //访问接口  标记已读
@@ -351,6 +357,7 @@ class MyController extends Controller
                 }
                 if (!empty($message)) {
                     $new_data8[] = [
+                        'id'=>1000000,  //排首
                         'dream_id'=>$dream_id,
                         'interaction_id'=>$interaction_id,
                         'message'=>$message,
@@ -367,6 +374,12 @@ class MyController extends Controller
         }
         $data9  =  SystemInfoModel::with('user')->where('to_user_id',$user->id)->where('type_id',2)->where('attr_id','!=',8)->orderBy('id','desc')->get()->toArray();
         $data = array_merge($new_data8,$data9);
+        if (!empty($data)) {
+            foreach ($data as $key => $row) {
+                $volume[$key]  = $row['id'];
+            }
+            array_multisort($volume, SORT_DESC, $data);
+        }
         SystemInfoModel::where('to_user_id',$user->id)->where('type_id',2)->update(['is_read' => 1]);
         return $this->api($data);
     }
@@ -583,6 +596,7 @@ class MyController extends Controller
 //        $info['to_name'] = $data['account']; //账号
 //        $info['note'] = $data['type'].$data['name'];
 //        $ok = AccountLog::create($info);
+        if($data['cash']>$user->coin) return $this->error(ErrorCode::COIN_NOT_ENOUGH);
         $transaction_id = date('YmdHis') . mt_rand(1000, 9999);
         $data['user_id'] = $user->id;
         $data['status'] = 1;
@@ -753,7 +767,11 @@ class MyController extends Controller
         $dreams = DreamInfoModel::where('user_id',$user->id)->orderBy('created_at','desc')->with('img')->paginate();
         foreach ($dreams as $dream) {
             if (strtotime($dream->end_time) > time()) {
-                $dream->type_name = '进行中';
+                if ($dream->status==2) {
+                    $dream->type_name = '暂停';
+                }else{
+                    $dream->type_name = '进行中';
+                }
             }else{
                 if ($dream->get_coin >=$dream->coin) {
                     $dream->type_name = '已完成';
@@ -877,7 +895,11 @@ class MyController extends Controller
                 $item->img;
                 $item->user;
                 if (strtotime($item->end_time) > time()) {
-                    $item->type_name = '进行中';
+                    if ($item->status==2) {
+                        $item->type_name = '暂停';
+                    }else{
+                        $item->type_name = '进行中';
+                    }
                 }else{
                     if ($item->get_coin >=$item->coin) {
                         $item->type_name = '已完成';

BIN
server/public/base/img/jiahao.png


+ 841 - 0
server/public/base/share/fastclick.js

xqd
@@ -0,0 +1,841 @@
+;(function () {
+	'use strict';
+
+	/**
+	 * @preserve FastClick: polyfill to remove click delays on browsers with touch UIs.
+	 *
+	 * @codingstandard ftlabs-jsv2
+	 * @copyright The Financial Times Limited [All Rights Reserved]
+	 * @license MIT License (see LICENSE.txt)
+	 */
+
+	/*jslint browser:true, node:true*/
+	/*global define, Event, Node*/
+
+
+	/**
+	 * Instantiate fast-clicking listeners on the specified layer.
+	 *
+	 * @constructor
+	 * @param {Element} layer The layer to listen on
+	 * @param {Object} [options={}] The options to override the defaults
+	 */
+	function FastClick(layer, options) {
+		var oldOnClick;
+
+		options = options || {};
+
+		/**
+		 * Whether a click is currently being tracked.
+		 *
+		 * @type boolean
+		 */
+		this.trackingClick = false;
+
+
+		/**
+		 * Timestamp for when click tracking started.
+		 *
+		 * @type number
+		 */
+		this.trackingClickStart = 0;
+
+
+		/**
+		 * The element being tracked for a click.
+		 *
+		 * @type EventTarget
+		 */
+		this.targetElement = null;
+
+
+		/**
+		 * X-coordinate of touch start event.
+		 *
+		 * @type number
+		 */
+		this.touchStartX = 0;
+
+
+		/**
+		 * Y-coordinate of touch start event.
+		 *
+		 * @type number
+		 */
+		this.touchStartY = 0;
+
+
+		/**
+		 * ID of the last touch, retrieved from Touch.identifier.
+		 *
+		 * @type number
+		 */
+		this.lastTouchIdentifier = 0;
+
+
+		/**
+		 * Touchmove boundary, beyond which a click will be cancelled.
+		 *
+		 * @type number
+		 */
+		this.touchBoundary = options.touchBoundary || 10;
+
+
+		/**
+		 * The FastClick layer.
+		 *
+		 * @type Element
+		 */
+		this.layer = layer;
+
+		/**
+		 * The minimum time between tap(touchstart and touchend) events
+		 *
+		 * @type number
+		 */
+		this.tapDelay = options.tapDelay || 200;
+
+		/**
+		 * The maximum time for a tap
+		 *
+		 * @type number
+		 */
+		this.tapTimeout = options.tapTimeout || 700;
+
+		if (FastClick.notNeeded(layer)) {
+			return;
+		}
+
+		// Some old versions of Android don't have Function.prototype.bind
+		function bind(method, context) {
+			return function() { return method.apply(context, arguments); };
+		}
+
+
+		var methods = ['onMouse', 'onClick', 'onTouchStart', 'onTouchMove', 'onTouchEnd', 'onTouchCancel'];
+		var context = this;
+		for (var i = 0, l = methods.length; i < l; i++) {
+			context[methods[i]] = bind(context[methods[i]], context);
+		}
+
+		// Set up event handlers as required
+		if (deviceIsAndroid) {
+			layer.addEventListener('mouseover', this.onMouse, true);
+			layer.addEventListener('mousedown', this.onMouse, true);
+			layer.addEventListener('mouseup', this.onMouse, true);
+		}
+
+		layer.addEventListener('click', this.onClick, true);
+		layer.addEventListener('touchstart', this.onTouchStart, false);
+		layer.addEventListener('touchmove', this.onTouchMove, false);
+		layer.addEventListener('touchend', this.onTouchEnd, false);
+		layer.addEventListener('touchcancel', this.onTouchCancel, false);
+
+		// Hack is required for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
+		// which is how FastClick normally stops click events bubbling to callbacks registered on the FastClick
+		// layer when they are cancelled.
+		if (!Event.prototype.stopImmediatePropagation) {
+			layer.removeEventListener = function(type, callback, capture) {
+				var rmv = Node.prototype.removeEventListener;
+				if (type === 'click') {
+					rmv.call(layer, type, callback.hijacked || callback, capture);
+				} else {
+					rmv.call(layer, type, callback, capture);
+				}
+			};
+
+			layer.addEventListener = function(type, callback, capture) {
+				var adv = Node.prototype.addEventListener;
+				if (type === 'click') {
+					adv.call(layer, type, callback.hijacked || (callback.hijacked = function(event) {
+						if (!event.propagationStopped) {
+							callback(event);
+						}
+					}), capture);
+				} else {
+					adv.call(layer, type, callback, capture);
+				}
+			};
+		}
+
+		// If a handler is already declared in the element's onclick attribute, it will be fired before
+		// FastClick's onClick handler. Fix this by pulling out the user-defined handler function and
+		// adding it as listener.
+		if (typeof layer.onclick === 'function') {
+
+			// Android browser on at least 3.2 requires a new reference to the function in layer.onclick
+			// - the old one won't work if passed to addEventListener directly.
+			oldOnClick = layer.onclick;
+			layer.addEventListener('click', function(event) {
+				oldOnClick(event);
+			}, false);
+			layer.onclick = null;
+		}
+	}
+
+	/**
+	* Windows Phone 8.1 fakes user agent string to look like Android and iPhone.
+	*
+	* @type boolean
+	*/
+	var deviceIsWindowsPhone = navigator.userAgent.indexOf("Windows Phone") >= 0;
+
+	/**
+	 * Android requires exceptions.
+	 *
+	 * @type boolean
+	 */
+	var deviceIsAndroid = navigator.userAgent.indexOf('Android') > 0 && !deviceIsWindowsPhone;
+
+
+	/**
+	 * iOS requires exceptions.
+	 *
+	 * @type boolean
+	 */
+	var deviceIsIOS = /iP(ad|hone|od)/.test(navigator.userAgent) && !deviceIsWindowsPhone;
+
+
+	/**
+	 * iOS 4 requires an exception for select elements.
+	 *
+	 * @type boolean
+	 */
+	var deviceIsIOS4 = deviceIsIOS && (/OS 4_\d(_\d)?/).test(navigator.userAgent);
+
+
+	/**
+	 * iOS 6.0-7.* requires the target element to be manually derived
+	 *
+	 * @type boolean
+	 */
+	var deviceIsIOSWithBadTarget = deviceIsIOS && (/OS [6-7]_\d/).test(navigator.userAgent);
+
+	/**
+	 * BlackBerry requires exceptions.
+	 *
+	 * @type boolean
+	 */
+	var deviceIsBlackBerry10 = navigator.userAgent.indexOf('BB10') > 0;
+
+	/**
+	 * Determine whether a given element requires a native click.
+	 *
+	 * @param {EventTarget|Element} target Target DOM element
+	 * @returns {boolean} Returns true if the element needs a native click
+	 */
+	FastClick.prototype.needsClick = function(target) {
+		switch (target.nodeName.toLowerCase()) {
+
+		// Don't send a synthetic click to disabled inputs (issue #62)
+		case 'button':
+		case 'select':
+		case 'textarea':
+			if (target.disabled) {
+				return true;
+			}
+
+			break;
+		case 'input':
+
+			// File inputs need real clicks on iOS 6 due to a browser bug (issue #68)
+			if ((deviceIsIOS && target.type === 'file') || target.disabled) {
+				return true;
+			}
+
+			break;
+		case 'label':
+		case 'iframe': // iOS8 homescreen apps can prevent events bubbling into frames
+		case 'video':
+			return true;
+		}
+
+		return (/\bneedsclick\b/).test(target.className);
+	};
+
+
+	/**
+	 * Determine whether a given element requires a call to focus to simulate click into element.
+	 *
+	 * @param {EventTarget|Element} target Target DOM element
+	 * @returns {boolean} Returns true if the element requires a call to focus to simulate native click.
+	 */
+	FastClick.prototype.needsFocus = function(target) {
+		switch (target.nodeName.toLowerCase()) {
+		case 'textarea':
+			return true;
+		case 'select':
+			return !deviceIsAndroid;
+		case 'input':
+			switch (target.type) {
+			case 'button':
+			case 'checkbox':
+			case 'file':
+			case 'image':
+			case 'radio':
+			case 'submit':
+				return false;
+			}
+
+			// No point in attempting to focus disabled inputs
+			return !target.disabled && !target.readOnly;
+		default:
+			return (/\bneedsfocus\b/).test(target.className);
+		}
+	};
+
+
+	/**
+	 * Send a click event to the specified element.
+	 *
+	 * @param {EventTarget|Element} targetElement
+	 * @param {Event} event
+	 */
+	FastClick.prototype.sendClick = function(targetElement, event) {
+		var clickEvent, touch;
+
+		// On some Android devices activeElement needs to be blurred otherwise the synthetic click will have no effect (#24)
+		if (document.activeElement && document.activeElement !== targetElement) {
+			document.activeElement.blur();
+		}
+
+		touch = event.changedTouches[0];
+
+		// Synthesise a click event, with an extra attribute so it can be tracked
+		clickEvent = document.createEvent('MouseEvents');
+		clickEvent.initMouseEvent(this.determineEventType(targetElement), true, true, window, 1, touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, 0, null);
+		clickEvent.forwardedTouchEvent = true;
+		targetElement.dispatchEvent(clickEvent);
+	};
+
+	FastClick.prototype.determineEventType = function(targetElement) {
+
+		//Issue #159: Android Chrome Select Box does not open with a synthetic click event
+		if (deviceIsAndroid && targetElement.tagName.toLowerCase() === 'select') {
+			return 'mousedown';
+		}
+
+		return 'click';
+	};
+
+
+	/**
+	 * @param {EventTarget|Element} targetElement
+	 */
+	FastClick.prototype.focus = function(targetElement) {
+		var length;
+
+		// Issue #160: on iOS 7, some input elements (e.g. date datetime month) throw a vague TypeError on setSelectionRange. These elements don't have an integer value for the selectionStart and selectionEnd properties, but unfortunately that can't be used for detection because accessing the properties also throws a TypeError. Just check the type instead. Filed as Apple bug #15122724.
+		if (deviceIsIOS && targetElement.setSelectionRange && targetElement.type.indexOf('date') !== 0 && targetElement.type !== 'time' && targetElement.type !== 'month') {
+			length = targetElement.value.length;
+			targetElement.setSelectionRange(length, length);
+		} else {
+			targetElement.focus();
+		}
+	};
+
+
+	/**
+	 * Check whether the given target element is a child of a scrollable layer and if so, set a flag on it.
+	 *
+	 * @param {EventTarget|Element} targetElement
+	 */
+	FastClick.prototype.updateScrollParent = function(targetElement) {
+		var scrollParent, parentElement;
+
+		scrollParent = targetElement.fastClickScrollParent;
+
+		// Attempt to discover whether the target element is contained within a scrollable layer. Re-check if the
+		// target element was moved to another parent.
+		if (!scrollParent || !scrollParent.contains(targetElement)) {
+			parentElement = targetElement;
+			do {
+				if (parentElement.scrollHeight > parentElement.offsetHeight) {
+					scrollParent = parentElement;
+					targetElement.fastClickScrollParent = parentElement;
+					break;
+				}
+
+				parentElement = parentElement.parentElement;
+			} while (parentElement);
+		}
+
+		// Always update the scroll top tracker if possible.
+		if (scrollParent) {
+			scrollParent.fastClickLastScrollTop = scrollParent.scrollTop;
+		}
+	};
+
+
+	/**
+	 * @param {EventTarget} targetElement
+	 * @returns {Element|EventTarget}
+	 */
+	FastClick.prototype.getTargetElementFromEventTarget = function(eventTarget) {
+
+		// On some older browsers (notably Safari on iOS 4.1 - see issue #56) the event target may be a text node.
+		if (eventTarget.nodeType === Node.TEXT_NODE) {
+			return eventTarget.parentNode;
+		}
+
+		return eventTarget;
+	};
+
+
+	/**
+	 * On touch start, record the position and scroll offset.
+	 *
+	 * @param {Event} event
+	 * @returns {boolean}
+	 */
+	FastClick.prototype.onTouchStart = function(event) {
+		var targetElement, touch, selection;
+
+		// Ignore multiple touches, otherwise pinch-to-zoom is prevented if both fingers are on the FastClick element (issue #111).
+		if (event.targetTouches.length > 1) {
+			return true;
+		}
+
+		targetElement = this.getTargetElementFromEventTarget(event.target);
+		touch = event.targetTouches[0];
+
+		if (deviceIsIOS) {
+
+			// Only trusted events will deselect text on iOS (issue #49)
+			selection = window.getSelection();
+			if (selection.rangeCount && !selection.isCollapsed) {
+				return true;
+			}
+
+			if (!deviceIsIOS4) {
+
+				// Weird things happen on iOS when an alert or confirm dialog is opened from a click event callback (issue #23):
+				// when the user next taps anywhere else on the page, new touchstart and touchend events are dispatched
+				// with the same identifier as the touch event that previously triggered the click that triggered the alert.
+				// Sadly, there is an issue on iOS 4 that causes some normal touch events to have the same identifier as an
+				// immediately preceeding touch event (issue #52), so this fix is unavailable on that platform.
+				// Issue 120: touch.identifier is 0 when Chrome dev tools 'Emulate touch events' is set with an iOS device UA string,
+				// which causes all touch events to be ignored. As this block only applies to iOS, and iOS identifiers are always long,
+				// random integers, it's safe to to continue if the identifier is 0 here.
+				if (touch.identifier && touch.identifier === this.lastTouchIdentifier) {
+					event.preventDefault();
+					return false;
+				}
+
+				this.lastTouchIdentifier = touch.identifier;
+
+				// If the target element is a child of a scrollable layer (using -webkit-overflow-scrolling: touch) and:
+				// 1) the user does a fling scroll on the scrollable layer
+				// 2) the user stops the fling scroll with another tap
+				// then the event.target of the last 'touchend' event will be the element that was under the user's finger
+				// when the fling scroll was started, causing FastClick to send a click event to that layer - unless a check
+				// is made to ensure that a parent layer was not scrolled before sending a synthetic click (issue #42).
+				this.updateScrollParent(targetElement);
+			}
+		}
+
+		this.trackingClick = true;
+		this.trackingClickStart = event.timeStamp;
+		this.targetElement = targetElement;
+
+		this.touchStartX = touch.pageX;
+		this.touchStartY = touch.pageY;
+
+		// Prevent phantom clicks on fast double-tap (issue #36)
+		if ((event.timeStamp - this.lastClickTime) < this.tapDelay) {
+			event.preventDefault();
+		}
+
+		return true;
+	};
+
+
+	/**
+	 * Based on a touchmove event object, check whether the touch has moved past a boundary since it started.
+	 *
+	 * @param {Event} event
+	 * @returns {boolean}
+	 */
+	FastClick.prototype.touchHasMoved = function(event) {
+		var touch = event.changedTouches[0], boundary = this.touchBoundary;
+
+		if (Math.abs(touch.pageX - this.touchStartX) > boundary || Math.abs(touch.pageY - this.touchStartY) > boundary) {
+			return true;
+		}
+
+		return false;
+	};
+
+
+	/**
+	 * Update the last position.
+	 *
+	 * @param {Event} event
+	 * @returns {boolean}
+	 */
+	FastClick.prototype.onTouchMove = function(event) {
+		if (!this.trackingClick) {
+			return true;
+		}
+
+		// If the touch has moved, cancel the click tracking
+		if (this.targetElement !== this.getTargetElementFromEventTarget(event.target) || this.touchHasMoved(event)) {
+			this.trackingClick = false;
+			this.targetElement = null;
+		}
+
+		return true;
+	};
+
+
+	/**
+	 * Attempt to find the labelled control for the given label element.
+	 *
+	 * @param {EventTarget|HTMLLabelElement} labelElement
+	 * @returns {Element|null}
+	 */
+	FastClick.prototype.findControl = function(labelElement) {
+
+		// Fast path for newer browsers supporting the HTML5 control attribute
+		if (labelElement.control !== undefined) {
+			return labelElement.control;
+		}
+
+		// All browsers under test that support touch events also support the HTML5 htmlFor attribute
+		if (labelElement.htmlFor) {
+			return document.getElementById(labelElement.htmlFor);
+		}
+
+		// If no for attribute exists, attempt to retrieve the first labellable descendant element
+		// the list of which is defined here: http://www.w3.org/TR/html5/forms.html#category-label
+		return labelElement.querySelector('button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea');
+	};
+
+
+	/**
+	 * On touch end, determine whether to send a click event at once.
+	 *
+	 * @param {Event} event
+	 * @returns {boolean}
+	 */
+	FastClick.prototype.onTouchEnd = function(event) {
+		var forElement, trackingClickStart, targetTagName, scrollParent, touch, targetElement = this.targetElement;
+
+		if (!this.trackingClick) {
+			return true;
+		}
+
+		// Prevent phantom clicks on fast double-tap (issue #36)
+		if ((event.timeStamp - this.lastClickTime) < this.tapDelay) {
+			this.cancelNextClick = true;
+			return true;
+		}
+
+		if ((event.timeStamp - this.trackingClickStart) > this.tapTimeout) {
+			return true;
+		}
+
+		// Reset to prevent wrong click cancel on input (issue #156).
+		this.cancelNextClick = false;
+
+		this.lastClickTime = event.timeStamp;
+
+		trackingClickStart = this.trackingClickStart;
+		this.trackingClick = false;
+		this.trackingClickStart = 0;
+
+		// On some iOS devices, the targetElement supplied with the event is invalid if the layer
+		// is performing a transition or scroll, and has to be re-detected manually. Note that
+		// for this to function correctly, it must be called *after* the event target is checked!
+		// See issue #57; also filed as rdar://13048589 .
+		if (deviceIsIOSWithBadTarget) {
+			touch = event.changedTouches[0];
+
+			// In certain cases arguments of elementFromPoint can be negative, so prevent setting targetElement to null
+			targetElement = document.elementFromPoint(touch.pageX - window.pageXOffset, touch.pageY - window.pageYOffset) || targetElement;
+			targetElement.fastClickScrollParent = this.targetElement.fastClickScrollParent;
+		}
+
+		targetTagName = targetElement.tagName.toLowerCase();
+		if (targetTagName === 'label') {
+			forElement = this.findControl(targetElement);
+			if (forElement) {
+				this.focus(targetElement);
+				if (deviceIsAndroid) {
+					return false;
+				}
+
+				targetElement = forElement;
+			}
+		} else if (this.needsFocus(targetElement)) {
+
+			// Case 1: If the touch started a while ago (best guess is 100ms based on tests for issue #36) then focus will be triggered anyway. Return early and unset the target element reference so that the subsequent click will be allowed through.
+			// Case 2: Without this exception for input elements tapped when the document is contained in an iframe, then any inputted text won't be visible even though the value attribute is updated as the user types (issue #37).
+			if ((event.timeStamp - trackingClickStart) > 100 || (deviceIsIOS && window.top !== window && targetTagName === 'input')) {
+				this.targetElement = null;
+				return false;
+			}
+
+			this.focus(targetElement);
+			this.sendClick(targetElement, event);
+
+			// Select elements need the event to go through on iOS 4, otherwise the selector menu won't open.
+			// Also this breaks opening selects when VoiceOver is active on iOS6, iOS7 (and possibly others)
+			if (!deviceIsIOS || targetTagName !== 'select') {
+				this.targetElement = null;
+				event.preventDefault();
+			}
+
+			return false;
+		}
+
+		if (deviceIsIOS && !deviceIsIOS4) {
+
+			// Don't send a synthetic click event if the target element is contained within a parent layer that was scrolled
+			// and this tap is being used to stop the scrolling (usually initiated by a fling - issue #42).
+			scrollParent = targetElement.fastClickScrollParent;
+			if (scrollParent && scrollParent.fastClickLastScrollTop !== scrollParent.scrollTop) {
+				return true;
+			}
+		}
+
+		// Prevent the actual click from going though - unless the target node is marked as requiring
+		// real clicks or if it is in the whitelist in which case only non-programmatic clicks are permitted.
+		if (!this.needsClick(targetElement)) {
+			event.preventDefault();
+			this.sendClick(targetElement, event);
+		}
+
+		return false;
+	};
+
+
+	/**
+	 * On touch cancel, stop tracking the click.
+	 *
+	 * @returns {void}
+	 */
+	FastClick.prototype.onTouchCancel = function() {
+		this.trackingClick = false;
+		this.targetElement = null;
+	};
+
+
+	/**
+	 * Determine mouse events which should be permitted.
+	 *
+	 * @param {Event} event
+	 * @returns {boolean}
+	 */
+	FastClick.prototype.onMouse = function(event) {
+
+		// If a target element was never set (because a touch event was never fired) allow the event
+		if (!this.targetElement) {
+			return true;
+		}
+
+		if (event.forwardedTouchEvent) {
+			return true;
+		}
+
+		// Programmatically generated events targeting a specific element should be permitted
+		if (!event.cancelable) {
+			return true;
+		}
+
+		// Derive and check the target element to see whether the mouse event needs to be permitted;
+		// unless explicitly enabled, prevent non-touch click events from triggering actions,
+		// to prevent ghost/doubleclicks.
+		if (!this.needsClick(this.targetElement) || this.cancelNextClick) {
+
+			// Prevent any user-added listeners declared on FastClick element from being fired.
+			if (event.stopImmediatePropagation) {
+				event.stopImmediatePropagation();
+			} else {
+
+				// Part of the hack for browsers that don't support Event#stopImmediatePropagation (e.g. Android 2)
+				event.propagationStopped = true;
+			}
+
+			// Cancel the event
+			event.stopPropagation();
+			event.preventDefault();
+
+			return false;
+		}
+
+		// If the mouse event is permitted, return true for the action to go through.
+		return true;
+	};
+
+
+	/**
+	 * On actual clicks, determine whether this is a touch-generated click, a click action occurring
+	 * naturally after a delay after a touch (which needs to be cancelled to avoid duplication), or
+	 * an actual click which should be permitted.
+	 *
+	 * @param {Event} event
+	 * @returns {boolean}
+	 */
+	FastClick.prototype.onClick = function(event) {
+		var permitted;
+
+		// It's possible for another FastClick-like library delivered with third-party code to fire a click event before FastClick does (issue #44). In that case, set the click-tracking flag back to false and return early. This will cause onTouchEnd to return early.
+		if (this.trackingClick) {
+			this.targetElement = null;
+			this.trackingClick = false;
+			return true;
+		}
+
+		// Very odd behaviour on iOS (issue #18): if a submit element is present inside a form and the user hits enter in the iOS simulator or clicks the Go button on the pop-up OS keyboard the a kind of 'fake' click event will be triggered with the submit-type input element as the target.
+		if (event.target.type === 'submit' && event.detail === 0) {
+			return true;
+		}
+
+		permitted = this.onMouse(event);
+
+		// Only unset targetElement if the click is not permitted. This will ensure that the check for !targetElement in onMouse fails and the browser's click doesn't go through.
+		if (!permitted) {
+			this.targetElement = null;
+		}
+
+		// If clicks are permitted, return true for the action to go through.
+		return permitted;
+	};
+
+
+	/**
+	 * Remove all FastClick's event listeners.
+	 *
+	 * @returns {void}
+	 */
+	FastClick.prototype.destroy = function() {
+		var layer = this.layer;
+
+		if (deviceIsAndroid) {
+			layer.removeEventListener('mouseover', this.onMouse, true);
+			layer.removeEventListener('mousedown', this.onMouse, true);
+			layer.removeEventListener('mouseup', this.onMouse, true);
+		}
+
+		layer.removeEventListener('click', this.onClick, true);
+		layer.removeEventListener('touchstart', this.onTouchStart, false);
+		layer.removeEventListener('touchmove', this.onTouchMove, false);
+		layer.removeEventListener('touchend', this.onTouchEnd, false);
+		layer.removeEventListener('touchcancel', this.onTouchCancel, false);
+	};
+
+
+	/**
+	 * Check whether FastClick is needed.
+	 *
+	 * @param {Element} layer The layer to listen on
+	 */
+	FastClick.notNeeded = function(layer) {
+		var metaViewport;
+		var chromeVersion;
+		var blackberryVersion;
+		var firefoxVersion;
+
+		// Devices that don't support touch don't need FastClick
+		if (typeof window.ontouchstart === 'undefined') {
+			return true;
+		}
+
+		// Chrome version - zero for other browsers
+		chromeVersion = +(/Chrome\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];
+
+		if (chromeVersion) {
+
+			if (deviceIsAndroid) {
+				metaViewport = document.querySelector('meta[name=viewport]');
+
+				if (metaViewport) {
+					// Chrome on Android with user-scalable="no" doesn't need FastClick (issue #89)
+					if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
+						return true;
+					}
+					// Chrome 32 and above with width=device-width or less don't need FastClick
+					if (chromeVersion > 31 && document.documentElement.scrollWidth <= window.outerWidth) {
+						return true;
+					}
+				}
+
+			// Chrome desktop doesn't need FastClick (issue #15)
+			} else {
+				return true;
+			}
+		}
+
+		if (deviceIsBlackBerry10) {
+			blackberryVersion = navigator.userAgent.match(/Version\/([0-9]*)\.([0-9]*)/);
+
+			// BlackBerry 10.3+ does not require Fastclick library.
+			// https://github.com/ftlabs/fastclick/issues/251
+			if (blackberryVersion[1] >= 10 && blackberryVersion[2] >= 3) {
+				metaViewport = document.querySelector('meta[name=viewport]');
+
+				if (metaViewport) {
+					// user-scalable=no eliminates click delay.
+					if (metaViewport.content.indexOf('user-scalable=no') !== -1) {
+						return true;
+					}
+					// width=device-width (or less than device-width) eliminates click delay.
+					if (document.documentElement.scrollWidth <= window.outerWidth) {
+						return true;
+					}
+				}
+			}
+		}
+
+		// IE10 with -ms-touch-action: none or manipulation, which disables double-tap-to-zoom (issue #97)
+		if (layer.style.msTouchAction === 'none' || layer.style.touchAction === 'manipulation') {
+			return true;
+		}
+
+		// Firefox version - zero for other browsers
+		firefoxVersion = +(/Firefox\/([0-9]+)/.exec(navigator.userAgent) || [,0])[1];
+
+		if (firefoxVersion >= 27) {
+			// Firefox 27+ does not have tap delay if the content is not zoomable - https://bugzilla.mozilla.org/show_bug.cgi?id=922896
+
+			metaViewport = document.querySelector('meta[name=viewport]');
+			if (metaViewport && (metaViewport.content.indexOf('user-scalable=no') !== -1 || document.documentElement.scrollWidth <= window.outerWidth)) {
+				return true;
+			}
+		}
+
+		// IE11: prefixed -ms-touch-action is no longer supported and it's recomended to use non-prefixed version
+		// http://msdn.microsoft.com/en-us/library/windows/apps/Hh767313.aspx
+		if (layer.style.touchAction === 'none' || layer.style.touchAction === 'manipulation') {
+			return true;
+		}
+
+		return false;
+	};
+
+
+	/**
+	 * Factory method for creating a FastClick object
+	 *
+	 * @param {Element} layer The layer to listen on
+	 * @param {Object} [options={}] The options to override the defaults
+	 */
+	FastClick.attach = function(layer, options) {
+		return new FastClick(layer, options);
+	};
+
+
+	if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {
+
+		// AMD. Register as an anonymous module.
+		define(function() {
+			return FastClick;
+		});
+	} else if (typeof module !== 'undefined' && module.exports) {
+		module.exports = FastClick.attach;
+		module.exports.FastClick = FastClick;
+	} else {
+		window.FastClick = FastClick;
+	}
+}());

Файловите разлики са ограничени, защото са твърде много
+ 5 - 0
server/public/base/share/jquery-weui.min.css


Файловите разлики са ограничени, защото са твърде много
+ 14 - 0
server/public/base/share/swiper.min.js


+ 18 - 7
server/resources/views/admin/account_log/index.blade.php

xqd xqd
@@ -16,11 +16,11 @@
 					<table class="table table-striped table-bordered table-hover dataTables-example dataTable">
 						<thead>
     						<tr>
-								
-            <th  data-sort="to_type"> 充值类型 </th>
-            <th  data-sort="transaction_id"> 交易号 </th>
-            <th  data-sort="to_amount"> 充值金额(元) </th>
-            <th  data-sort="created_at"> 充值时间 </th>
+
+			<th  class="sorting"  data-sort="transaction_id"> 交易号 </th>
+			<th  class="sorting" data-sort="op"> 充值类型 </th>
+            <th  class="sorting" data-sort="to_amount"> 交易的梦想币 </th>
+            <th  class="sorting" data-sort="created_at"> 交易时间 </th>
         						{{--<th width="22%">相关操作</th>--}}
         					</tr>
 						</thead>
@@ -28,9 +28,20 @@
 						@if(isset($list))
 							@foreach($list as $key => $item)
 								<tr>
-									<td>{{ $item->to_type }}</td>
 									<td>{{ $item->transaction_id }}</td>
-									<td>{{ $item->to_amount /100}}</td>
+									<td>{{ $item->op }}</td>
+									<td>
+										@if($item->op=='充值')
+											+
+										@elseif($item->op=='提现')
+											-
+										@elseif($item->from_id==$id)
+											-
+										@elseif($item->to_id==$id)
+											+
+										@endif
+										{{ $item->to_amount}}
+									</td>
 									<td>{{ $item->created_at }}</td>
 									{{--<td>
 										<a href="{{ U('Account_logs/Info/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');" class="btn btn-primary ">删除</a>

+ 98 - 27
server/resources/views/admin/share1.blade.php

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -4,8 +4,20 @@
     <meta charset="UTF-8">
     <title>{{empty($dream->user) ? '' : $dream->user->nickname}}的梦想</title>
     <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
+    <link rel="stylesheet" href="/base/share/jquery-weui.min.css">
+    <script src="/base/share/fastclick.js"></script>
+    <script src="/base/share/swiper.min.js"></script>
+    <script>
+        $(function() {
+            FastClick.attach(document.body);
+        });
+    </script>
+
     <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
     <style>
+        .addhidden{
+            display: none;
+        }
         body{
             padding: 0;
             margin: 0;
@@ -263,7 +275,7 @@
 
     </style>
 </head>
-<body style="overflow-x: hidden">
+<body style="overflow-x: hidden" >
 <div style="height: 50px">
     <a href="https://fir.im/jt4h" style="height: 50px; background: #00c3da; position: fixed; z-index: 99; width: 100%">
         <div style="float: left;color: #fff;line-height: 50px;padding-left: 5px">支持({{empty($dream->user) ? '' : $dream->user->nickname}})的梦想!现在就下载喵喵</div>
@@ -278,7 +290,24 @@
     </div>
     <div id="tab-content">
         <div style="margin-bottom: 10px">
-            <img style="width: 100%; height: 100%;" src="{{!empty($dream->img) ? $dream->img->pic : ''}}">
+
+            <div class="swiper-container" data-space-between='10' data-pagination='.swiper-pagination' data-autoplay="1000">
+                <div class="swiper-wrapper">
+                    @if($dream['video'])
+                        <div class="swiper-slide" style="width: 320px;height: 200px;">
+                            <video style="width: 100%;height:200px;" src="{{ $dream['video']}}" controls >
+                            </video>
+                        </div>
+                    @endif
+                    @foreach($dream->imgs as $banner)
+                        <div class="swiper-slide" style="width: 320px;height: 200px;"><img src="{{$banner->pic}}" style="width: 100%;height: 100%;" alt=""></div>
+                    @endforeach
+                </div>
+            </div>
+
+
+
+            {{--<img style="width: 100%; height: 100%;" src="{{!empty($dream->img) ? $dream->img->pic : ''}}">--}}
             <p style="font-size: 17px; padding: 0 10px">{{$dream->name}}</p>
             <div style="border-bottom: 1px solid #DEDEDE">
                 <p id="about" style="font-size: 13px; padding: 0 10px; color: #919191;white-space: nowrap;overflow:hidden;text-overflow:ellipsis">
@@ -404,30 +433,40 @@
                     @endif
                 </div>
                     <div style="clear:both;"></div>
-               {{-- <div class="list">
-                    <div class="item" ng-repeat="c in interaction.comments" ng-click="replayOther($event,c.user_nickname,c.user_id,$parent.$parent.$index,$index)" ng-if="interaction.showmore||$index<4">
-                        <div class="row">
-                            <div class="col-20" style="text-align: right">
-                                <img class="head" ng-src="{{c.user_avatar | avator}}" />
+                <div class="list" id="list{{$key}}">
+                    @foreach($interaction->comments as $k => $val)
+
+                        <div class="@if($k>4) addhidden max4 @endif " >
+                            <div class="row">
+                                <div class="col-20" style="text-align: right">
+                                    <img class="head" src="{{$val['user_avatar']}}" />
+                                </div>
+                                <div class="col-80" style="border-bottom: 1px solid #E6E6E6">
+                                    <span style="margin-top: 10px; display: inline-block;font-size: 12px">{{$val['user_nickname']}}</span>
+                                    <span style="font-size: 12px" class="utitle kz">{{$val['updated_at']}}</span>
+                                    <p style="white-space:normal; color: #666666;font-size: 12px">
+                                        {{$val['content']}}
+                                    </p>
+                                </div>
                             </div>
-                            <div class="col-80" style="border-bottom: 1px solid #E6E6E6">
-                                <span style="margin-top: 10px; display: inline-block;font-size: 12px">{{c.user_nickname}}</span>
-                                <span style="font-size: 12px" class="utitle kz">{{c.updated_at}}</span>
-                                <p style="white-space:normal; color: #666666;font-size: 12px">
-                                            <span ng-if="c.to_user_nickname&&c.to_user_nickname!=''&&c.to_user_nickname!=dream.user.nickname" style="font-size: 12px">
-                                                回复<span style="color:#333333;font-size: 12px"> {{c.to_user_nickname}}</span> :
-                                            </span>
-                                    {{c.content}}
-                                </p>
+                        </div>
+
+                    @endforeach
+                    @if(count($interaction->comments)>4)
+                        <div class="row showmore"  key="{{$key}}">
+                            <div style="text-align: right; width: 92%" >
+                                <p  style="color: #00C3DA; margin-top: 10px; margin-bottom: 10px;text-align: right"> 查看更多评论</p>
                             </div>
                         </div>
-                    </div>
-                    <div class="row">
-                        <div class="col-offset-20 col-60">
-                            <p ng-click="showmore($index)" ng-if="interaction.comments.length>4" style="color: #00C3DA; margin-top: 10px; margin-bottom: 10px"> {{interaction.showmore?"只看最近评论":"查看更多评论"}}</p>
+
+                        <div class="row closemore"  style="display: none" key="{{$key}}">
+                            <div style="text-align: right; width: 92%">
+                                <p style="color: #00C3DA; margin-top: 10px; margin-bottom: 10px;text-align: right"> 只看最近评论</p>
+                            </div>
                         </div>
-                    </div>
-                </div>--}}
+
+                    @endif
+                </div>
             </div>
             @endforeach
         </div>
@@ -441,7 +480,7 @@
                         <img style="width: 80px; height: 80px; margin: 28px 0 8px 0; border-radius: 100%; background: #C6D3E2;" src="{{$dream['top3user'][0]['avatar']}}" /><br>
                         {{ $dream['top3user'][0]['nickname'] }}<br>
                         <img src="/base/img/icon_gongxian.svg" style="height: 18px; width: 18px; margin-top: 5px" />
-                        <em style="font-size: 15px;">{{ $dream['top3user'][0]['score'] }}</em>
+                        <span style="font-size: 15px;">{{ $dream['top3user'][0]['score'] }}</span>
                     </div>
                     @endif
                         @if(count($dream->top3user)>1)
@@ -449,7 +488,7 @@
                         <img  style="width: 70px; margin: 24px 0 6px 0; border-radius: 100%; background: #C6D3E2;" src="{{ $dream['top3user'][1]['avatar'] }}" /><br>
                         {{ $dream['top3user'][1]['nickname'] }}<br>
                         <img src="/base/img/icon_gongxian.svg" style="height: 18px; width: 18px; margin-top: 5px" />
-                        <em style="font-size: 15px;">{{ $dream['top3user'][1]['score'] }}</em>
+                        <span style="font-size: 15px;">{{ $dream['top3user'][1]['score'] }}</span>
                     </div>
                     @endif
                 </div>
@@ -460,7 +499,7 @@
                             <img  style="width: 70px; margin: 24px 0 8px 0; border-radius: 100%; background: #C6D3E2;"  src="{{ $dream['top3user'][1]['avatar'] }}" /><br>
                             {{ $dream['top3user'][1]['nickname'] }}<br>
                             <img src="/base/img/icon_gongxian.svg" style="height: 18px; width: 18px; margin-top: 5px" />
-                            <em style="font-size: 16px">{{ $dream['top3user'][1]['score'] }}</em>
+                            <span style="font-size: 16px">{{ $dream['top3user'][1]['score'] }}</span>
                         </div>
                         @endif
                             @if(count($dream->top3user)>0)
@@ -468,7 +507,7 @@
                             <img  style="width: 80px; height: 80px; margin: 28px 0 8px 0; border-radius: 100%; background: #C6D3E2;"  src="{{ $dream['top3user'][0]['avatar'] }}" /><br>
                             {{ $dream['top3user'][0]['nickname'] }}<br>
                             <img src="/base/img/icon_gongxian.svg" style="height: 18px; width: 18px; margin-top: 5px" />
-                            <em style="font-size: 16px">{{ $dream['top3user'][0]['score'] }}</em>
+                            <span style="font-size: 16px">{{ $dream['top3user'][0]['score'] }}</span>
                         </div>
                             @endif
                                 @if(count($dream->top3user)>2)
@@ -476,7 +515,7 @@
                             <img style="width: 70px; margin: 24px 0 8px 0; border-radius: 100%; background: #C6D3E2;" src="{{ $dream['top3user'][2]['avatar'] }}" /><br>
                             {{ $dream['top3user'][2]['nickname'] }}<br>
                             <img src="/base/img/icon_gongxian.svg" style="height: 18px; width: 18px; margin-top: 5px" />
-                            <em style="font-size: 16px">{{ $dream['top3user'][2]['score'] }}</em>
+                            <span style="font-size: 16px">{{ $dream['top3user'][2]['score'] }}</span>
                         </div>
                                 @endif
                     </div>
@@ -545,7 +584,39 @@
             $('#up').show();
             $('#about').css('white-space','normal');
         });
+
+
+        $('.showmore').click(function () {
+            var  key = ($(this).attr('key'));
+            var div = '#list'+key + ' div' ;
+            if ($(div).hasClass('addhidden')) {
+                $(div).removeClass('addhidden');
+                $(this).next().show();
+                $(this).hide();
+            }
+        });
+        $('.closemore').click(function () {
+            var  key = ($(this).attr('key'));
+            var div = '#list'+key + ' div' ;
+            var max4 = '#list'+key + ' .max4';
+            if ($(div).hasClass('max4')) {
+                $(max4).addClass('addhidden');
+                $(this).prev().show();
+                $(this).hide();
+            }
+        });
     });
+
 </script>
+
+
+
+<script>
+    $(".swiper-container").swiper({
+        loop: true,
+        autoplay:3000
+    });
+</script>
+
 </body>
 </html>

+ 87 - 0
server/resources/views/admin/user/info/editcoin.blade.php

xqd
@@ -0,0 +1,87 @@
+@extends('admin.layout')
+
+@section('content')
+
+<?php
+    if(!isset($data)) $data = array();
+    if(!$data && session("data")){
+        $data = session("data");
+    }
+    if(!$data && session('_old_input')){
+        $data = session("_old_input");
+    }
+?>
+<div class="wrapper wrapper-content animated fadeInRight">
+	<div class="row">
+		<div class="col-sm-12">
+			<div class="ibox float-e-margins">
+				<div class="ibox-title">
+					<h5>加减币</h5>
+					<div class="ibox-tools">
+						<a class="collapse-link"> <i class="fa fa-chevron-up"></i>
+						</a>
+					</div>
+				</div>
+				<div class="ibox-content">
+				   {{-- <div class="row">
+    					<div class="col-sm-3 pull-right">
+                            <a href="{{ U('User/Info/index')}}" class="btn btn-sm btn-primary pull-right">返回列表</a>
+                        </div>
+					</div>--}}
+
+		            <div class="row">
+                        <div class="col-lg-10">
+                            <form name="form_product" id="form-validation" action="" class="form-horizontal form-validation" accept-charset="UTF-8" method="post">
+                                <div class="form-group">
+
+                                    <label class="control-label col-sm-3">交易类型</label>
+
+                                    <div class="col-sm-9">
+                                        <input type="radio" name="status" value="1" >加
+                                        &nbsp; &nbsp; &nbsp;
+                                        <input type="radio" name="status" value="2"  >减
+                                    </div>
+
+                                </div>
+                                <div class="form-group">
+
+                                    <label class="control-label col-sm-3">交易数目</label>
+
+                                    <div class="col-sm-9">
+                                        <input id="" name="data[to_amount]" class="form-control" value="{{ $data['to_amount'] or ''}}" required="" aria-required="true"  placeholder="">
+                                    </div>
+
+                                </div>
+                                <div class="form-group">
+
+                                    <label class="control-label col-sm-3">交易信息</label>
+
+                                    <div class="col-sm-9">
+                                        <input id="" name="data[op]" class="form-control" value="{{ $data['op'] or ''}}" required="" aria-required="true"  placeholder="">
+                                    </div>
+
+                                </div>
+
+                                
+                                <div class="form-group">
+                                    <label class="control-label col-sm-3">&nbsp;</label>
+                                    <div class="col-sm-9">
+                                        <input type="hidden" name="_referer" value="<?php echo urlencode(request()->server('HTTP_REFERER'));?>"/>
+                                        <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>"/>
+                                        <input type="submit" class="btn btn-success" style="margin-right:20px;">
+                                        <input type="reset" class="btn btn-default" >
+                                    </div>
+                                </div>
+        
+                            </form>
+                        </div>
+                        <!-- /.col-lg-10 -->
+                    </div>
+                    <!-- /.row -->
+				</div>
+			</div>
+		</div>
+	</div>
+</div>
+
+@endsection

+ 2 - 1
server/resources/views/admin/user/info/index.blade.php

xqd
@@ -109,7 +109,8 @@
 								@if(role('User/Info/view'))
 										<button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('User/Info/view',['id'=>$item->id])}}'});"  class="btn btn-primary ">查看</button>
 									@endif
-									<button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Account_logs/Info/index',['id'=>$item->id])}}'});"  class="btn btn-primary ">充值记录</button>
+									<button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Account_logs/Info/index',['id'=>$item->id])}}'});"  class="btn btn-primary ">交易记录</button>
+									<button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('User/Info/editCoin',['id'=>$item->id])}}'});"  class="btn btn-success ">加减币</button>
 									{{--<button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Account_logs/Info/index',['id'=>$item->id])}}'});"  class="btn btn-success ">提现记录</button>--}}
 								</td>
 							</tr>

Някои файлове не бяха показани, защото твърде много файлове са промени