Silent 7 vuotta sitten
vanhempi
commit
cb4b641b2c

+ 30 - 0
database/migrations/2018_08_08_164714_add_money_to_form_sets.php

xqd
@@ -0,0 +1,30 @@
+<?php
+
+use Illuminate\Support\Facades\Schema;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Database\Migrations\Migration;
+
+class AddMoneyToFormSets extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('form_sets', function (Blueprint $table) {
+            $table->string('money', 200)->nullable()->after('top_title')->comment('金额');
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        //
+    }
+}

+ 7 - 0
resources/views/admin/form-sets/index.blade.php

xqd
@@ -49,6 +49,13 @@
                                 </div>
                             </div>
 
+                            <div class="form-group row">
+                                <label class="col-sm-2 col-sm-offset-1 control-label">金额设置</label>
+                                <div class="col-sm-8">
+                                    <input type="text" name="data[money]" value="{{ $item->money }}">
+                                </div>
+                            </div>
+
                             <div class="form-group row">
                                 <label class="col-sm-2 col-sm-offset-1 control-label">表单上方标题</label>
                                 <div class="col-sm-8">

+ 7 - 7
wechat/pages/login/index.js

xqd xqd
@@ -14,7 +14,12 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
-    
+    var we_chat_user = wx.getStorageSync('we_chat_user')
+    if (we_chat_user) {
+      wx.redirectTo({
+        url: '/pages/bind-phone/index',
+      })
+    }
   },
 
   bindGetUserInfo: function (e) {
@@ -49,12 +54,7 @@ Page({
    * 生命周期函数--监听页面初次渲染完成
    */
   onReady: function () {
-    var we_chat_user = wx.getStorageSync('we_chat_user')
-    if(we_chat_user) {
-      wx.redirectTo({
-        url: '/pages/bind-phone/index',
-      })
-    }
+    
   },
 
   /**