Browse Source

feat: 优化后台

xiansin 2 years ago
parent
commit
741afccc74

+ 2 - 0
mini/components/Recharge/index.vue

@@ -142,7 +142,9 @@ export default {
     },
     },
     handleRecharge() {
     handleRecharge() {
       // IOS 不允许购买
       // IOS 不允许购买
+      // #ifdef MP-TOUTIAO | MP-WEIXIN
       if (!this.$util.checkOS()) return
       if (!this.$util.checkOS()) return
+      // #endif
       const item = this.combos[this.rechargeActive]
       const item = this.combos[this.rechargeActive]
       this.$loading('请稍后...')
       this.$loading('请稍后...')
       this.$api.user.recharge.create({ id: item.id }).then(res => {
       this.$api.user.recharge.create({ id: item.id }).then(res => {

+ 6 - 6
mini/pages.json

@@ -11,7 +11,7 @@
         // #ifdef  MP-KUAISHOU
         // #ifdef  MP-KUAISHOU
         "navigationBarTitleText": "四海剧场",
         "navigationBarTitleText": "四海剧场",
         // #endif
         // #endif
-        // #ifdef  MP-TOUTIAO
+        // #ifdef  MP-TOUTIAO | MP-WEIXIN
         "navigationBarTitleText": "张四爷剧场",
         "navigationBarTitleText": "张四爷剧场",
         // #endif
         // #endif
         "enablePullDownRefresh": false
         "enablePullDownRefresh": false
@@ -23,7 +23,7 @@
         // #ifdef  MP-KUAISHOU
         // #ifdef  MP-KUAISHOU
         "navigationBarTitleText": "四海剧场",
         "navigationBarTitleText": "四海剧场",
         // #endif
         // #endif
-        // #ifdef  MP-TOUTIAO
+        // #ifdef  MP-TOUTIAO | MP-WEIXIN
         "navigationBarTitleText": "张四爷剧场",
         "navigationBarTitleText": "张四爷剧场",
         // #endif
         // #endif
         "enablePullDownRefresh": false
         "enablePullDownRefresh": false
@@ -56,7 +56,7 @@
         // #ifdef  MP-KUAISHOU
         // #ifdef  MP-KUAISHOU
         "navigationBarTitleText": "四海剧场",
         "navigationBarTitleText": "四海剧场",
         // #endif
         // #endif
-        // #ifdef  MP-TOUTIAO
+        // #ifdef  MP-TOUTIAO | MP-WEIXIN
         "navigationBarTitleText": "张四爷剧场",
         "navigationBarTitleText": "张四爷剧场",
         // #endif
         // #endif
         "enablePullDownRefresh": false
         "enablePullDownRefresh": false
@@ -68,7 +68,7 @@
         // #ifdef  MP-KUAISHOU
         // #ifdef  MP-KUAISHOU
         "navigationBarTitleText": "四海剧场",
         "navigationBarTitleText": "四海剧场",
         // #endif
         // #endif
-        // #ifdef  MP-TOUTIAO
+        // #ifdef  MP-TOUTIAO | MP-WEIXIN
         "navigationBarTitleText": "张四爷剧场",
         "navigationBarTitleText": "张四爷剧场",
         // #endif
         // #endif
         "enablePullDownRefresh": false
         "enablePullDownRefresh": false
@@ -87,7 +87,7 @@
         // #ifdef  MP-KUAISHOU
         // #ifdef  MP-KUAISHOU
         "navigationBarTitleText": "四海剧场",
         "navigationBarTitleText": "四海剧场",
         // #endif
         // #endif
-        // #ifdef  MP-TOUTIAO
+        // #ifdef  MP-TOUTIAO | MP-WEIXIN
         "navigationBarTitleText": "张四爷剧场",
         "navigationBarTitleText": "张四爷剧场",
         // #endif
         // #endif
         "enablePullDownRefresh": false
         "enablePullDownRefresh": false
@@ -204,7 +204,7 @@
     // #ifdef  MP-KUAISHOU
     // #ifdef  MP-KUAISHOU
     "navigationBarTitleText": "四海剧场",
     "navigationBarTitleText": "四海剧场",
     // #endif
     // #endif
-    // #ifdef  MP-TOUTIAO
+    // #ifdef  MP-TOUTIAO | MP-WEIXIN
     "navigationBarTitleText": "张四爷剧场",
     "navigationBarTitleText": "张四爷剧场",
     // #endif
     // #endif
     "navigationBarBackgroundColor": "#151728",
     "navigationBarBackgroundColor": "#151728",

+ 1 - 6
mini/pages/episode/components/EpisodePart.vue

@@ -125,12 +125,7 @@ export default {
     width: 95vw;
     width: 95vw;
     height: 76rpx;
     height: 76rpx;
     background: rgba(24, 28, 47, 0.8);
     background: rgba(24, 28, 47, 0.8);
-    // #ifdef  MP-KUAISHOU
-    bottom: 100rpx;
-    // #endif
-    // #ifdef  MP-TOUTIAO | MP-WEIXIN
-    bottom: 100rpx;
-    // #endif
+    bottom: 50rpx;
     left: 50%;
     left: 50%;
     transform: translateX(-50%);
     transform: translateX(-50%);
     font-size: 26rpx;
     font-size: 26rpx;

+ 5 - 1
mini/pages/episode/play.vue

@@ -36,7 +36,10 @@
               :id="`video${index}`"
               :id="`video${index}`"
               :poster="episode.cover_img"
               :poster="episode.cover_img"
               :src="item.url"
               :src="item.url"
-              style="width: 100%;height: 100%;"
+              :style="{
+                width:'100%',
+                height: 'calc(100vh - 130rpx)'
+              }"
               :show-play-btn="video.playBtn"
               :show-play-btn="video.playBtn"
               :show-fullscreen-btn="video.fullscreenBtn"
               :show-fullscreen-btn="video.fullscreenBtn"
               :controls="video.controls"
               :controls="video.controls"
@@ -357,6 +360,7 @@ export default {
     this.listId = this.listId ? this.listId : 0
     this.listId = this.listId ? this.listId : 0
     await this.getBuyRecord()
     await this.getBuyRecord()
     this.getEpisode()
     this.getEpisode()
+    console.log('-->data', this.$u.sys())
   },
   },
   // 分享
   // 分享
   onShareAppMessage(res) {
   onShareAppMessage(res) {

+ 1 - 0
mini/pages/index/index.vue

@@ -77,6 +77,7 @@ export default {
     })
     })
   },
   },
   onLoad(options) {
   onLoad(options) {
+    console.log('-->index data', options)
     this.isLogin && this.getHomeColumn()
     this.isLogin && this.getHomeColumn()
     this.parent_id = typeof options.user_id !== 'undefined' ? options.user_id : 0
     this.parent_id = typeof options.user_id !== 'undefined' ? options.user_id : 0
     if (this.parent_id && !this.userInfo.parent_id) {
     if (this.parent_id && !this.userInfo.parent_id) {

+ 20 - 1
mini/pages/member/index.vue

@@ -73,13 +73,15 @@ export default {
       // this.modal.show = true
       // this.modal.show = true
     },
     },
     handleBuy() {
     handleBuy() {
-      // IOS 不允许购买
+      // #ifdef MP-TOUTIAO | MP-WEIXIN
       if (!this.$util.checkOS()) return
       if (!this.$util.checkOS()) return
+      // #endif
       const item = this.settings[this.activeIndex]
       const item = this.settings[this.activeIndex]
       this.$loading('购买中...')
       this.$loading('购买中...')
       this.$api.user.vip.create({ id: item.id }).then(res => {
       this.$api.user.vip.create({ id: item.id }).then(res => {
         this.$hideLoading()
         this.$hideLoading()
         this.payId = res.pay_id
         this.payId = res.pay_id
+        delete res.pay_id
         this.modal.show = false
         this.modal.show = false
         // #ifdef MP-TOUTIAO
         // #ifdef MP-TOUTIAO
         tt.pay({
         tt.pay({
@@ -119,6 +121,23 @@ export default {
           }
           }
         })
         })
         // #endif
         // #endif
+        // #ifdef MP-WEIXIN
+        uni.requestPayment({
+          ...res.data,
+          provider: 'wxpay',
+          success: res => {
+            console.log('success:' + JSON.stringify(res))
+            // _this.$u.toast("支付成功")
+            this.$loading('支付结果查询中...')
+            this.query()
+          },
+          fail: err => {
+            console.log('fail:' + JSON.stringify(err))
+            // _this.$u.toast("支付失败")
+            clearInterval(this.interval)
+          }
+        })
+        // #endif
       }).catch(() => {
       }).catch(() => {
         this.$hideLoading()
         this.$hideLoading()
       })
       })

+ 21 - 14
mini/pages/my/index.vue

@@ -69,21 +69,24 @@
     </view>
     </view>
     <!--菜单-->
     <!--菜单-->
     <view class="menu-group">
     <view class="menu-group">
-      <button
-        v-for="(menu,index) in menus"
-        :key="index"
-        class="menu-item main-between cross-center"
-        :open-type="menu.type ? menu.type : ''"
-        @click="handleMenu(menu)"
-      >
-        <view class="left-box dir-left-nowrap cross-center">
-          <view class="icon">
-            <image :src="menu.icon" />
+      <template v-for="(menu,index) in menus">
+        <button
+          v-if="menu.href !== '/pages/share/index' || (menu.href === '/pages/share/index' && userInfo.is_share !== '0')"
+          :key="index"
+          class="menu-item main-between cross-center"
+          :open-type="menu.type ? menu.type : ''"
+          @bindcontact="handleMenu"
+          @click="handleMenu(menu)"
+        >
+          <view class="left-box dir-left-nowrap cross-center">
+            <view class="icon">
+              <image :src="menu.icon" />
+            </view>
+            <text>{{ menu.name }}</text>
           </view>
           </view>
-          <text>{{ menu.name }}</text>
-        </view>
-        <u-icon name="arrow-right" :color="$colors.infoColor" bold />
-      </button>
+          <u-icon name="arrow-right" :color="$colors.infoColor" bold />
+        </button>
+      </template>
     </view>
     </view>
     <!--tab bar-->
     <!--tab bar-->
     <tab-bar />
     <tab-bar />
@@ -226,6 +229,10 @@ export default {
   },
   },
   onShow() {
   onShow() {
     this.getHistory()
     this.getHistory()
+  },
+  onShareAppMessage() {
+    console.log('-->data', this.$util.shareMessage(this.userInfo))
+    return this.$util.shareMessage(this.userInfo)
   }
   }
 }
 }
 </script>
 </script>

+ 8 - 8
mini/pages/my/recharge.vue

@@ -36,14 +36,14 @@
       </view>
       </view>
     </view>
     </view>
     <!--时间选择-->
     <!--时间选择-->
-    <u-datetime-picker
-      ref="datePicker"
-      v-model="datePicker.value"
-      :show="datePicker.show"
-      mode="year-month"
-      @confirm="handleDateConfirm"
-      @cancel="handleDateConfirm"
-    />
+    <!--    <u-datetime-picker-->
+    <!--      ref="datePicker"-->
+    <!--      v-model="datePicker.value"-->
+    <!--      :show="datePicker.show"-->
+    <!--      mode="year-month"-->
+    <!--      @confirm="handleDateConfirm"-->
+    <!--      @cancel="datePicker.show = false"-->
+    <!--    />-->
   </view>
   </view>
 </template>
 </template>
 
 

+ 48 - 27
mini/pages/share/withdraw.vue

@@ -3,24 +3,6 @@
     <view class="overage">
     <view class="overage">
       账户剩余金额:<text class="number">{{ userInfo.income }}元</text>
       账户剩余金额:<text class="number">{{ userInfo.income }}元</text>
     </view>
     </view>
-    <view class="input-box main-left cross-center">
-      <view class="left">姓名</view>
-      <view class="center">
-        <input v-model="name" type="text" placeholder="请输入姓名">
-      </view>
-    </view>
-    <view class="input-box main-left cross-center">
-      <view class="left">手机号</view>
-      <view class="center">
-        <input v-model="phone_num" type="number" placeholder="请输入手机号">
-      </view>
-    </view>
-    <view class="input-box main-left cross-center">
-      <view class="left">提现账号</view>
-      <view class="center">
-        <input v-model="account" type="text" placeholder="请输入提现账号">
-      </view>
-    </view>
     <view class="input-box main-left cross-center">
     <view class="input-box main-left cross-center">
       <view class="left">¥</view>
       <view class="left">¥</view>
       <view class="center">
       <view class="center">
@@ -40,6 +22,34 @@
         <u-icon name="arrow-right" :color="$colors.infoColor" bold top="1" />
         <u-icon name="arrow-right" :color="$colors.infoColor" bold top="1" />
       </view>
       </view>
     </view>
     </view>
+    <template v-if="Object.keys(selectType).length">
+      <view class="input-box main-left cross-center">
+        <view class="left">姓名</view>
+        <view class="center">
+          <input v-model="name" type="text" placeholder="请输入姓名">
+        </view>
+      </view>
+      <view class="input-box main-left cross-center">
+        <view class="left">手机号</view>
+        <view class="center">
+          <input v-model="phone_num" type="number" placeholder="请输入手机号">
+        </view>
+      </view>
+      <template v-if="selectType.value === 3">
+        <view class="input-box main-left cross-center">
+          <view class="left">提现银行</view>
+          <view class="center">
+            <input v-model="bank_name" type="text" placeholder="请输入提现银行">
+          </view>
+        </view>
+      </template>
+      <view class="input-box main-left cross-center">
+        <view class="left">提现账号</view>
+        <view class="center">
+          <input v-model="account" type="text" placeholder="请输入提现账号">
+        </view>
+      </view>
+    </template>
 
 
     <view class="btn" @click="handleConfirm">提交申请</view>
     <view class="btn" @click="handleConfirm">提交申请</view>
     <!--   选择提现方式 -->
     <!--   选择提现方式 -->
@@ -79,6 +89,7 @@ export default {
       account: '',
       account: '',
       name: '',
       name: '',
       phone_num: '',
       phone_num: '',
+      bank_name: '',
       setting: { withdraw_min: 0, withdraw_discount: 0 },
       setting: { withdraw_min: 0, withdraw_discount: 0 },
       show: false,
       show: false,
       types: [
       types: [
@@ -97,6 +108,18 @@ export default {
   },
   },
   methods: {
   methods: {
     handleConfirm() {
     handleConfirm() {
+      if (!this.price) {
+        this.$u.toast(`请输入提现金额`)
+        return
+      }
+      if (Object.keys(this.selectType).length === 0) {
+        this.$u.toast(`请选择提现方式`)
+        return
+      }
+      if (parseFloat(this.price) < parseFloat(this.setting.withdraw_min)) {
+        this.$u.toast(`提现金额不能小于${this.setting.withdraw_min}元`)
+        return
+      }
       if (!this.name) {
       if (!this.name) {
         this.$u.toast(`请输入姓名`)
         this.$u.toast(`请输入姓名`)
         return
         return
@@ -109,14 +132,6 @@ export default {
         this.$u.toast(`请输入账号`)
         this.$u.toast(`请输入账号`)
         return
         return
       }
       }
-      if (Object.keys(this.selectType).length === 0) {
-        this.$u.toast(`请选择提现方式`)
-        return
-      }
-      if (parseFloat(this.price) < parseFloat(this.setting.withdraw_min)) {
-        this.$u.toast(`提现金额不能小于${this.setting.withdraw_min}元`)
-        return
-      }
       if (parseFloat(this.price) > this.userInfo.income) {
       if (parseFloat(this.price) > this.userInfo.income) {
         this.$u.toast(`提现金额不能大于可提现余额`)
         this.$u.toast(`提现金额不能大于可提现余额`)
         return
         return
@@ -126,12 +141,18 @@ export default {
         return
         return
       }
       }
 
 
+      if (this.selectType.value === 3 && !this.bank_name) {
+        this.$u.toast(`请输入提现银行`)
+        return
+      }
+
       const params = {
       const params = {
         price: this.price,
         price: this.price,
         type: this.selectType.value,
         type: this.selectType.value,
         account: this.account,
         account: this.account,
         name: this.name,
         name: this.name,
-        phone_num: this.phone_num
+        phone_num: this.phone_num,
+        bank_name: this.bank_name
       }
       }
       this.$loading()
       this.$loading()
       this.$api.share.withdraw.create(params).then(res => {
       this.$api.share.withdraw.create(params).then(res => {

+ 1 - 2
mini/setting.js

@@ -1,8 +1,7 @@
 /**
 /**
  * Created by JianJia.Zhou<jianjia.zhou> on 2022/3/18.
  * Created by JianJia.Zhou<jianjia.zhou> on 2022/3/18.
  */
  */
-// const IS_DEV = process.env.NODE_ENV === 'development'
-const IS_DEV = false
+const IS_DEV = process.env.NODE_ENV === 'development'
 // const URL = 'https://zhangsiye.9026.com'
 // const URL = 'https://zhangsiye.9026.com'
 const URL = 'https://t3.9026.com'
 const URL = 'https://t3.9026.com'
 
 

+ 10 - 6
mini/utils/index.js

@@ -30,13 +30,17 @@ export function checkOS() {
 }
 }
 
 
 const shareMessage = user => {
 const shareMessage = user => {
+  // #ifdef  MP-KUAISHOU
+  const title ="四海剧场"
+    // #endif
+    // #ifdef  MP-TOUTIAO | MP-WEIXIN
+  const title ="张四爷剧场"
+  // #endif
+  console.log('-->data', user)
   return {
   return {
-    path: '/pages/index/index',
-    params: {
-      user_id: user.id
-    },
-    title: '张四爷剧场',
-    desc: '张四爷剧场'
+    path: `/pages/index/index?user_id=${user.id}`,
+    title: title,
+    desc: title
     // imageUrl: ''
     // imageUrl: ''
   }
   }
 }
 }

+ 1 - 1
server/app/Admin/Controllers/Market/UserRechargeRecordController.php

@@ -33,7 +33,7 @@ class UserRechargeRecordController extends AdminController
                 $str .= "</div>";
                 $str .= "</div>";
                 return $str;
                 return $str;
             });
             });
-            $grid->column('user.info.platform','所属平台')->using(config('global.platform'))->label([1=>'primary',2=>'success']);
+            $grid->column('user.info.platform','所属平台')->using(config('global.platform'))->label([1=>'primary',2=>'success',3=>'info']);
             $grid->column('gold','收支情况')->display(function (){
             $grid->column('gold','收支情况')->display(function (){
                 return '+'.($this->gold + $this->gift);
                 return '+'.($this->gold + $this->gift);
             })->label('success');
             })->label('success');

+ 1 - 1
server/app/Admin/Controllers/Order/UserConsumeRecordController.php

@@ -33,7 +33,7 @@ class UserConsumeRecordController extends AdminController
             });
             });
             $grid->column('user.info.platform','所属平台')
             $grid->column('user.info.platform','所属平台')
                 ->using(config('global.platform'))
                 ->using(config('global.platform'))
-                ->label([1=>'primary',2=>'success']);
+                ->label([1=>'primary',2=>'success',3=>'info']);
             $grid->column('type')
             $grid->column('type')
                 ->using(config('global.consume_type'))
                 ->using(config('global.consume_type'))
                 ->label(['success','info','primary']);
                 ->label(['success','info','primary']);

+ 1 - 1
server/app/Admin/Controllers/Order/UserRechargeRecordController.php

@@ -36,7 +36,7 @@ class UserRechargeRecordController extends AdminController
             });
             });
             $grid->column('user.info.platform','所属平台')
             $grid->column('user.info.platform','所属平台')
                 ->using(config('global.platform'))
                 ->using(config('global.platform'))
-                ->label([1=>'primary',2=>'success']);
+                ->label([1=>'primary',2=>'success',3=>'info']);
             $grid->column('price')->label('danger');
             $grid->column('price')->label('danger');
             $grid->column('combo.name','套餐名称');
             $grid->column('combo.name','套餐名称');
             $grid->column('gold')->label('info');
             $grid->column('gold')->label('info');

+ 3 - 0
server/app/Admin/Controllers/Share/UserController.php

@@ -32,6 +32,9 @@ class UserController extends AdminController
                 $str .= "</div>";
                 $str .= "</div>";
                 return $str;
                 return $str;
             });
             });
+            $grid->column('info.platform','所属平台')
+                ->using(config('global.platform'))
+                ->label([1=>'primary',2=>'success',3=>'info']);
             $grid->column('income');
             $grid->column('income');
             $grid->column('total_income');
             $grid->column('total_income');
             $grid->column('parent_id')->display(function (){
             $grid->column('parent_id')->display(function (){

+ 1 - 0
server/app/Admin/Controllers/Share/UserWithdrawController.php

@@ -35,6 +35,7 @@ class UserWithdrawController extends AdminController
             $grid->column('type')->using(config('global.withdraw_type'))
             $grid->column('type')->using(config('global.withdraw_type'))
                 ->label(['default','primary','success','info']);
                 ->label(['default','primary','success','info']);
             $grid->column('account');
             $grid->column('account');
+            $grid->column('bank_name');
             $grid->column('price');
             $grid->column('price');
             $grid->column('discount');
             $grid->column('discount');
             $grid->column('real','实际打款金额')->display(function (){
             $grid->column('real','实际打款金额')->display(function (){

+ 1 - 1
server/app/Admin/Controllers/UserController.php

@@ -43,7 +43,7 @@ class UserController extends AdminController
             $grid->column('recharge','充值记录')->display('充值记录')->modal(new UserRechargeRecordGrid());
             $grid->column('recharge','充值记录')->display('充值记录')->modal(new UserRechargeRecordGrid());
             $grid->column('info.integral','现有金币数')->label('success');
             $grid->column('info.integral','现有金币数')->label('success');
             $grid->column('consumes','金币交易记录')->display('金币交易记录')->modal(new UserConsumeRecordGrid());
             $grid->column('consumes','金币交易记录')->display('金币交易记录')->modal(new UserConsumeRecordGrid());
-            $grid->column('info.platform','所属平台')->using(config('global.platform'))->label([1=>'primary',2=>'success']);
+            $grid->column('info.platform','所属平台')->using(config('global.platform'))->label([1=>'primary',2=>'success',3=>'info']);
             $grid->column('created_at','加入时间');
             $grid->column('created_at','加入时间');
 
 
 
 

+ 1 - 1
server/app/Admin/Controllers/UserVipRecordController.php

@@ -34,7 +34,7 @@ class UserVipRecordController extends AdminController
             });
             });
             $grid->column('user.info.platform','所属平台')
             $grid->column('user.info.platform','所属平台')
                 ->using(config('global.platform'))
                 ->using(config('global.platform'))
-                ->label([1=>'primary',2=>'success']);
+                ->label([1=>'primary',2=>'success',3=>'info']);
             $grid->column('combo.name', '购买套餐');
             $grid->column('combo.name', '购买套餐');
             $grid->column('valid_day');
             $grid->column('valid_day');
             $grid->column('created_at','支付时间')->sortable();
             $grid->column('created_at','支付时间')->sortable();

+ 1 - 0
server/app/Http/Controllers/V1/AuthController.php

@@ -231,6 +231,7 @@ class AuthController extends Controller
 
 
         $token = Auth::guard('api')->fromUser($user);
         $token = Auth::guard('api')->fromUser($user);
         $user = User::with(['info'])->where('id', $user->id)->first();
         $user = User::with(['info'])->where('id', $user->id)->first();
+        (new User())->beComeShare($user->id);
         return $this->success([
         return $this->success([
             'token' => "Bearer " . $token,
             'token' => "Bearer " . $token,
             'user_info' => $user,
             'user_info' => $user,

+ 9 - 0
server/app/Http/Controllers/V1/Share/WithdrawController.php

@@ -51,6 +51,7 @@ class WithdrawController extends Controller
             $price = $request->input('price');
             $price = $request->input('price');
             $account = $request->input('account');
             $account = $request->input('account');
             $phoneNum = $request->input('phone_num');
             $phoneNum = $request->input('phone_num');
+            $bankName = $request->input('bank_name');
             $type = $request->input('type');
             $type = $request->input('type');
             $name = $request->input('name');
             $name = $request->input('name');
             $user  = \user();
             $user  = \user();
@@ -60,11 +61,19 @@ class WithdrawController extends Controller
             if($price > $user->income){
             if($price > $user->income){
                 return  $this->error("提现金额不能小于{$config->withdraw_min}元");
                 return  $this->error("提现金额不能小于{$config->withdraw_min}元");
             }
             }
+            if($type == 3 && !$bankName){
+                return  $this->error("请输入提现银行");
+            }
+            if($price > $user->income){
+                return  $this->error("提现金额不能大于可提现余额{$user->income}");
+            }
+
             \DB::beginTransaction();
             \DB::beginTransaction();
 
 
             $withdraw = new UserWithdraw();
             $withdraw = new UserWithdraw();
             $withdraw->user_id = $user->id;
             $withdraw->user_id = $user->id;
             $withdraw->name = $name;
             $withdraw->name = $name;
+            $withdraw->bank_name = $bankName;
             $withdraw->account = $account;
             $withdraw->account = $account;
             $withdraw->phone_num = $phoneNum;
             $withdraw->phone_num = $phoneNum;
             $withdraw->price = $price;
             $withdraw->price = $price;

+ 2 - 2
server/app/Http/Controllers/V1/UserController.php

@@ -95,8 +95,8 @@ class UserController extends Controller
     {
     {
         $user = \user();
         $user = \user();
         $parent = User::find($id);
         $parent = User::find($id);
-        // 没有绑定上级 且上级存在其实分销商
-        if(!$user->parent_id && $parent && $parent->is_share){
+        // 没有绑定上级 且上级存在其实分销商 且不是自己
+        if(!$user->parent_id && $parent && $parent->is_share && $user->parent_id != $user->id){
             $user->parent_id = $id;
             $user->parent_id = $id;
             $user->become_child_at = Carbon::now()->toDateTimeString();
             $user->become_child_at = Carbon::now()->toDateTimeString();
 
 

+ 2 - 0
server/app/Models/UserWithdraw.php

@@ -44,6 +44,8 @@ use Illuminate\Database\Eloquent\Model;
  * @property-read \App\Models\User|null $user
  * @property-read \App\Models\User|null $user
  * @property-write mixed $status_name
  * @property-write mixed $status_name
  * @property-write mixed $type_name
  * @property-write mixed $type_name
+ * @property string|null $bank_name 所属银行
+ * @method static \Illuminate\Database\Eloquent\Builder|UserWithdraw whereBrankName($value)
  */
  */
 class UserWithdraw extends Model
 class UserWithdraw extends Model
 {
 {

+ 1 - 0
server/resources/lang/zh/user-withdraw.php

@@ -11,6 +11,7 @@ return [
         'name' => '姓名',
         'name' => '姓名',
         'phone_num' => '手机号',
         'phone_num' => '手机号',
         'type' => '类型',
         'type' => '类型',
+        'bank_name' => '提现银行',
         'account' => '提现账号',
         'account' => '提现账号',
         'price' => '用户申请金额',
         'price' => '用户申请金额',
         'discount' => '手续费',
         'discount' => '手续费',