Pārlūkot izejas kodu

删除部分冗余代码

chaooo 1 gadu atpakaļ
vecāks
revīzija
d29bb01c99
44 mainītis faili ar 84 papildinājumiem un 3100 dzēšanām
  1. 0 1
      dist/wx/static/vant/area/index.d.ts
  2. 1 1
      src/app.json
  3. 2 1
      src/components/connection/index.vue
  4. 0 288
      src/pages/agent/customer/index.vue
  5. 0 12
      src/pages/agent/customer/main.js
  6. 0 10
      src/pages/agent/customer/main.json
  7. 0 68
      src/pages/agent/extend/detail/index.vue
  8. 0 12
      src/pages/agent/extend/detail/main.js
  9. 0 7
      src/pages/agent/extend/detail/main.json
  10. 0 231
      src/pages/agent/extend/orders/index.vue
  11. 0 12
      src/pages/agent/extend/orders/main.js
  12. 0 8
      src/pages/agent/extend/orders/main.json
  13. 0 226
      src/pages/agent/income_cal/index.vue
  14. 0 12
      src/pages/agent/income_cal/main.js
  15. 0 8
      src/pages/agent/income_cal/main.json
  16. 0 264
      src/pages/agent/index/index.vue
  17. 0 12
      src/pages/agent/index/main.js
  18. 0 9
      src/pages/agent/index/main.json
  19. 0 154
      src/pages/agent/invite_card_inventory/index.vue
  20. 0 12
      src/pages/agent/invite_card_inventory/main.js
  21. 0 7
      src/pages/agent/invite_card_inventory/main.json
  22. 0 111
      src/pages/agent/settlement_center/index/index.vue
  23. 0 12
      src/pages/agent/settlement_center/index/main.js
  24. 0 8
      src/pages/agent/settlement_center/index/main.json
  25. 0 24
      src/pages/agent/settlement_center/withdraw/detail/index.vue
  26. 0 12
      src/pages/agent/settlement_center/withdraw/detail/main.js
  27. 0 4
      src/pages/agent/settlement_center/withdraw/detail/main.json
  28. 0 24
      src/pages/agent/settlement_center/withdraw/list/index.vue
  29. 0 12
      src/pages/agent/settlement_center/withdraw/list/main.js
  30. 0 4
      src/pages/agent/settlement_center/withdraw/list/main.json
  31. 1 1
      src/pages/game_record/index.vue
  32. 4 21
      src/pages/index/index.vue
  33. 0 4
      src/pages/payment/main.json
  34. 0 428
      src/pages/user_center/confirmPay/index.vue
  35. 0 12
      src/pages/user_center/confirmPay/main.js
  36. 0 9
      src/pages/user_center/confirmPay/main.json
  37. 0 211
      src/pages/user_center/discountCard/index.vue
  38. 0 12
      src/pages/user_center/discountCard/main.js
  39. 0 9
      src/pages/user_center/discountCard/main.json
  40. 0 728
      src/pages/user_center/recharge/index.vue
  41. 0 12
      src/pages/user_center/recharge/main.js
  42. 0 8
      src/pages/user_center/recharge/main.json
  43. 4 7
      src/utils/connection.js
  44. 72 72
      src/utils/game.js

+ 0 - 1
dist/wx/static/vant/area/index.d.ts

@@ -1 +0,0 @@
-export {};

+ 1 - 1
src/app.json

@@ -6,7 +6,6 @@
     "pages/report/main",
     "pages/game_record/main",
     "pages/user_center/main",
-    "pages/coupons/main",
     "pages/user_center/edit/main",
     "pages/user_center/edit/confirm_phone_first/main",
     "pages/user_center/edit/confirm_phone_finally/main",
@@ -15,6 +14,7 @@
     "pages/user_center/vip_code/main",
     "pages/guide/main",
     "pages/joint/main",
+    "pages/coupons/main",
     "pages/competition/main"
   ],
   "window": {

+ 2 - 1
src/components/connection/index.vue

@@ -224,8 +224,9 @@ export default {
         </van-popup>
       </div>
     </div>
-    <van-toast id="van-toast"/>
     <van-dialog id="van-dialog"/>
+    <van-toast id="van-toast"/>
+    <van-notify id="van-notify"/>
   </div>
 </template>
 

+ 0 - 288
src/pages/agent/customer/index.vue

@@ -1,288 +0,0 @@
-<template>
-  <div id="agent_customer_container">
-    <!--    筛选模块-->
-    <div class="filter_container margin-xs flex">
-      <view class='cu-tag round padding' v-for="(filter,index) in filter_list" :key="index"
-            :class="{'bg-orange':filter_action==filter.id,'bg-white':filter_action != filter.id}"
-            @click="change_filter(filter.id)"
-      >
-        {{ filter.name }}
-      </view>
-
-      <button class="cu-btn" @click="show_datetime_picker">自定义时间
-        <text class="cuIcon-unfold"></text>
-      </button>
-    </div>
-
-
-    <!--      收益模块-->
-    <div class="profit_container">
-      <van-row>
-        <van-col span="8" v-for="(type,index) in customer_types" :key="index"
-                 @click="toggle_type(type.id)"
-        >
-          <div class="bg " :class="[type.id == customer_type_action?'bg_action':'bg_normal']">
-            <view class="padding-top-lg">
-              <text>{{ type.name }}</text>
-            </view>
-          </div>
-        </van-col>
-      </van-row>
-      <view>
-
-
-      </view>
-    </div>
-
-    <!--    小title-->
-    <div class="line_container padding">
-      <div>
-        <text class="text-sm text-gray">共{{ customer_count }}个客户</text>
-        <van-divider customStyle="border:.1px solid;margin:0px;"/>
-      </div>
-    </div>
-    <!--  列表-->
-    <view class="solid-bottom padding-lr-sm" v-for="(user,index) in user_list" :key="index">
-      <van-card>
-        <view slot="thumb" class="cu-avatar lg round margin-left"
-              style="background-image:url(https://img.shuimuai.com/web/icon_dingdan.png);"></view>
-        <view slot="title" class="flex justify-between">
-          <view>
-            <text class="text-sm">{{ user.user_name }}</text>
-          </view>
-          <view :class="{not_show:user.create_time == ''}">
-            <text class="text-normal">最后下单时间&emsp;</text>
-            <text class="text-gray text-sm">{{user.create_time}}</text>
-
-          </view>
-        </view>
-
-        <view slot="num" class="flex justify-end">
-          <view>
-            <text class="text-normal text-sm margin-right-lg">成交额</text>
-            <text class="text-xxl">{{ user.price_total }}</text>
-          </view>
-        </view>
-        <view slot="price">
-          <view>
-            <text class="text-normal text-sm">订单数 {{ user.count }}</text>
-          </view>
-        </view>
-      </van-card>
-    </view>
-
-    <van-calendar
-      :show="calendar_show"
-      type="range"
-      @close="do_calendar_close"
-      @confirm="do_calendar_confirm"
-      :min-date="min_date"
-      :max-date="max_date"
-    ></van-calendar>
-
-    <van-toast id="van-toast"/>
-
-  </div>
-</template>
-
-<script>
-
-import {agentUserList} from "../../../requests/agent";
-import Toast from '../../../../static/vant/toast/toast'
-import {formatTimeForSeconds} from "../../../utils";
-
-var $this
-export default {
-  name: "agent_customer_container",
-  components: {},
-  data() {
-    return {
-      //筛选列表
-      filter_list: [
-        {
-          id: 1,
-          name: "全部"
-        },
-        {
-          id: 2,
-          name: "今日",
-          start_time: Math.round(new Date(new Date(new Date().toLocaleDateString()).getTime()).getTime() / 1000),
-          end_time: Math.round(new Date(new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1).getTime() / 1000)
-        },
-        {
-          id: 3,
-          name: "昨日",
-          start_time: Math.round(new Date(new Date(new Date().toLocaleDateString()).getTime() - 24 * 60 * 60 * 1000).getTime() / 1000),
-          end_time: Math.round(new Date(new Date(new Date().toLocaleDateString()).getTime() - 1000).getTime() / 1000)
-        },
-        {
-          id: 4,
-          name: "近七日",
-          start_time: Math.round(new Date(new Date(new Date().toLocaleDateString()).getTime() - 7 * 24 * 60 * 60 * 1000).getTime() / 1000),
-          end_time: Math.round(new Date(new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1).getTime() / 1000)
-        }
-      ],
-      // 筛选选中项
-      filter_action: 1,
-      userinfo: {
-        //累计收益
-        profit: 16824.50,
-        //含待结算
-        unsettle_account: 65.00,
-      },
-      //客户数量
-      customer_count: 0,
-      calendar_show: false,
-      start_time: "",
-      end_time: "",
-      filter_date: "",
-      //最小日期应该为用户使用的第一个月开始
-      min_date: false,
-      max_date: false,
-      //客户类型
-      customer_types: [
-        {
-          id: 1,
-          name: "全部客户"
-        },
-        {
-          id: 2,
-          name: "一级客户"
-        },
-        {
-          id: 3,
-          name: "二级客户"
-        },
-      ],
-      user_list: [],
-      customer_type_action: 1
-    }
-  },
-  methods: {
-    //修改筛选时间
-    change_filter($id) {
-      $this.filter_date = ""
-      $this.filter_action = $id
-      $this.filter_list.forEach(($val, $index) => {
-        if ($val['id'] == $id) {
-          $this.get_user_list($this.customer_type_action - 1, $val['start_time'], $val['end_time'])
-        }
-      })
-    },
-    //  自定义筛选时间
-    show_datetime_picker() {
-      $this.filter_action = 0
-      $this.calendar_show = true
-    },
-    //  关闭日历选择
-    do_calendar_close() {
-      $this.calendar_show = false
-    },
-    formatDate(date) {
-      date = new Date(date);
-      return `${date.getMonth() + 1}/${date.getDate()}`;
-    },
-    //  选择日历后
-    do_calendar_confirm($event) {
-      let [start, end] = $event.mp.detail;
-      $this.filter_date = $this.formatDate(start) + '-' + $this.formatDate(end)
-      $this.start_time = Math.round(new Date(start).getTime() / 1000)
-      $this.end_time = Math.round(new Date(new Date(new Date(end).getTime() + 24 * 60 * 60 * 1000 - 1).getTime()).getTime() / 1000)
-      $this.get_user_list($this.customer_type_action - 1, $this.start_time, $this.end_time)
-      $this.calendar_show = false
-    },
-    //  切换客户类型筛选
-    toggle_type($id) {
-      $this.customer_type_action = $id
-      //根据类型获取用户列表
-      $this.get_user_list($id - 1,$this.start_time,$this.end_time)
-    },
-    get_user_list($type, $start_time, $end_time) {
-      Toast.loading({
-        message: "加载中",
-        duration: 0
-      })
-      let $params = {}
-      if ($type) {
-        $params['type'] = $type
-      }
-      if ($start_time && $end_time) {
-        $params['start_time'] = $start_time
-        $params['end_time'] = $end_time
-      }
-      agentUserList($params).then((res) => {
-        Toast.clear()
-        let $data = res.data;
-        $this.user_list = $data.data
-        $this.user_list.forEach(($val, $index) => {
-          if ($val['create_time']){
-            $val['create_time'] = formatTimeForSeconds($val['create_time'])
-          }
-        })
-        $this.customer_count = $this.user_list.length
-      })
-    }
-  },
-  mounted() {
-    $this.min_date = new Date(2020, 10, 11).getTime()
-    $this.max_date = new Date(new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1).getTime()
-  },
-  created() {
-    $this = this
-  },
-  onLoad($options) {
-    if ($options.tab) {
-      let $tab = $this.filter_action = $options.tab
-      let $_filter = {}
-      $this.filter_list.forEach(($val, $index) => {
-        if ($val['id'] == $tab) {
-          $_filter = $val
-        }
-      })
-      $this.get_user_list(0, $_filter['start_time'], $_filter['end_time'])
-    } else {
-      $this.get_user_list(0, false, false)
-    }
-  }
-}
-</script>
-
-<style scoped>
-.text-normal {
-  color: #6A6A6A;
-}
-
-.profit_container {
-  margin: 30px 0px 0px;
-}
-
-.bg_action {
-  width: 118px;
-  height: 77px;
-  background-image: url("https://img.shuimuai.com/web/frame_xuanzhongkehu.png");
-
-  font-size: 15px;
-  font-family: Microsoft YaHei;
-  font-weight: bold;
-  color: #FFFFFF;
-  line-height: 24px;
-}
-
-.bg_normal {
-  font-size: 15px;
-  font-family: PingFang SC;
-  font-weight: 400;
-  color: #6C6C6C;
-  line-height: 24px;
-
-  width: 118px;
-  height: 68px;
-  background-image: url("https://img.shuimuai.com/web/frame_weixianzhongkehu.png");
-}
-
-.bg {
-  text-align: center;
-  background-size: 100% 100%;
-  background-position: center;
-}
-</style>

+ 0 - 12
src/pages/agent/customer/main.js

@@ -1,12 +0,0 @@
-import Vue from 'vue'
-import App from './index'
-
-// add this to handle exception
-Vue.config.errorHandler = function (err) {
-  if (console && console.error) {
-    console.error(err)
-  }
-}
-
-const app = new Vue(App)
-app.$mount()

+ 0 - 10
src/pages/agent/customer/main.json

@@ -1,10 +0,0 @@
-{
-  "usingComponents": {
-    "van-divider": "../../../static/vant/divider/index",
-    "van-card": "../../../static/vant/card/index",
-    "van-calendar": "../../../static/vant/calendar/index",
-    "van-row": "../../../static/vant/row/index",
-    "van-col": "../../../static/vant/col/index",
-    "van-toast": "../../../static/vant/toast/index"
-  }
-}

+ 0 - 68
src/pages/agent/extend/detail/index.vue

@@ -1,68 +0,0 @@
-<template>
-  <div id="agent_order_detail_container">
-    <van-cell title="订单编号" :value="order.sn" :border="false"></van-cell>
-    <van-cell title="消费产品" :value="order.goods_name" :border="false"></van-cell>
-    <van-cell title="下单时间" :value="order.create_time" :border='false'></van-cell>
-    <van-cell title="买家" :value="order.user_name" :border="false"></van-cell>
-<!--    <van-cell title="卖家等级" value="一级消费" :border="false"></van-cell>-->
-    <van-cell title="结算状态" :border="false">
-      <text v-if="order.provide_status == 1">收益到余额</text>
-      <text v-if="order.provide_status == 2">未收益</text>
-      <text v-if="order.provide_status == 3">收益到冻结余额</text>
-    </van-cell>
-    <van-cell title="佣金收益" :value="order.rebater" :border="false"></van-cell>
-    <van-cell title="订单总价" :value="order.price" :border="false"></van-cell>
-
-
-  </div>
-</template>
-
-<script>
-
-
-import {agentOrderDetail} from "../../../../requests/agent";
-import util from '@/utils/index'
-
-var $this
-export default {
-  name: "agent_order_detail_container",
-  components: {},
-  data() {
-    return {
-      order: {}
-    }
-  },
-  methods: {
-    get_order($sn) {
-      let $params = {
-        sn: $sn
-      }
-      agentOrderDetail($params).then((res) => {
-        let $data = res.data;
-        $this.order = $data.data
-        $this.order['create_time'] = util.formatTime($this.order['create_time'])
-      })
-    }
-  },
-  mounted() {
-  },
-  created() {
-    $this = this
-  },
-  onLoad($options) {
-    let $order_sn = $options.sn
-    $this.get_order($order_sn)
-  }
-}
-</script>
-
-<style scoped>
-page {
-  background-color: #fff;
-}
-
-.not_show {
-  opacity: 0;
-}
-
-</style>

+ 0 - 12
src/pages/agent/extend/detail/main.js

@@ -1,12 +0,0 @@
-import Vue from 'vue'
-import App from './index'
-
-// add this to handle exception
-Vue.config.errorHandler = function (err) {
-  if (console && console.error) {
-    console.error(err)
-  }
-}
-
-const app = new Vue(App)
-app.$mount()

+ 0 - 7
src/pages/agent/extend/detail/main.json

@@ -1,7 +0,0 @@
-{
-  "usingComponents": {
-    "van-cell": "../../../../static/vant/cell/index",
-    "van-row": "../../../../static/vant/row/index",
-    "van-col": "../../../../static/vant/col/index"
-  }
-}

+ 0 - 231
src/pages/agent/extend/orders/index.vue

@@ -1,231 +0,0 @@
-<template>
-  <div id="agent_income_container">
-    <!--    筛选模块-->
-    <div class="filter_container margin-xs flex">
-      <view class='cu-tag round padding' v-for="(filter,index) in filter_list" :key="index"
-            :class="{'bg-orange':filter_action==filter.id,'bg-white':filter_action != filter.id}"
-            @click="change_filter(filter.id)"
-      >
-        {{ filter.name }}
-      </view>
-
-      <button class="cu-btn" @click="show_datetime_picker">自定义时间
-        <text class="cuIcon-unfold"></text>
-      </button>
-    </div>
-
-
-    <!--      全部累计订单模块-->
-    <div class="profit_container text-center">
-      <view>
-        <text class="text-normal margin-xl">
-          <template v-if="filter_date">{{ filter_date }}</template>
-          <template v-else>{{ filter_list[filter_action - 1].name }}</template>
-          累计订单
-        </text>
-      </view>
-      <view>
-        <text class="text-bold text-sl">{{ order_counts }}</text>
-      </view>
-    </div>
-
-    <!--    小title-->
-    <div class="line_container padding">
-      <div>
-        <text class="text-sm text-gray">订单记录</text>
-        <van-divider customStyle="border:.1px solid;margin:0px;"/>
-      </div>
-    </div>
-    <!--  列表-->
-    <view class="solid-bottom padding-lr-sm" v-for="(item,index) in order_list" :key="index">
-      <van-card>
-        <view slot="thumb" class="cu-avatar lg round margin-left"
-              style="background-image:url(https://img.shuimuai.com/web/icon_dingdan.png);"></view>
-        <view slot="title" class="flex justify-between">
-          <view>
-            <text class="text-normal">消费产品 &emsp;</text>
-            <text>{{ item.goods_name }}</text>
-          </view>
-          <view>
-            <text class="text-normal text-sm under_line" @click="to_detail(item.sn)">订单详情</text>
-          </view>
-        </view>
-
-        <view slot="num" class="flex justify-between align-end">
-          <view>
-            <view>
-              <text class="text-sm text-normal">买家&emsp;</text>
-              <text class="text-sm text-normal">{{ item.user_name }}</text>
-            </view>
-            <text class="text-gray text-sm">{{ item.create_time }}</text>
-          </view>
-          <view>
-            <text class="text-normal text-sm margin-right">订单总价</text>
-            <text class="text-xxl">{{ item.price }}</text>
-          </view>
-
-
-        </view>
-      </van-card>
-    </view>
-
-    <van-calendar
-      :show="calendar_show"
-      type="range"
-      @close="do_calendar_close"
-      @confirm="do_calendar_confirm"
-      :min-date="min_date"
-      :max-date="max_date"
-    ></van-calendar>
-    <van-toast id="van-toast"/>
-
-
-  </div>
-</template>
-
-<script>
-
-import {agentOrderList} from "../../../../requests/agent";
-import util from '@/utils/index'
-import Toast from '../../../../../static/vant/toast/toast'
-import {formatAllTime} from "../../../../utils";
-
-var $this
-export default {
-  name: "agent_income_container",
-  components: {},
-  data() {
-    return {
-      filter_list: [
-        {
-          id: 1,
-          name: "全部"
-        },
-        {
-          id: 2,
-          name: "今日",
-          start_time: Math.round(new Date(new Date(new Date().toLocaleDateString()).getTime()).getTime() / 1000),
-          end_time: Math.round(new Date(new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1).getTime() / 1000)
-        },
-        {
-          id: 3,
-          name: "昨日",
-          start_time: Math.round(new Date(new Date(new Date().toLocaleDateString()).getTime() - 24 * 60 * 60 * 1000).getTime() / 1000),
-          end_time: Math.round(new Date(new Date(new Date().toLocaleDateString()).getTime() - 1000).getTime() / 1000)
-        },
-        {
-          id: 4,
-          name: "近七日",
-          start_time: Math.round(new Date(new Date(new Date().toLocaleDateString()).getTime() - 7 * 24 * 60 * 60 * 1000).getTime() / 1000),
-          end_time: Math.round(new Date(new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1).getTime() / 1000)
-        }
-      ],
-      filter_action: 1,
-      order_counts: 0,
-      order_list: [],
-      calendar_show: false,
-      start_time: "",
-      end_time: "",
-      filter_date: "",
-      //最小日期应该为用户使用的第一个月开始
-      min_date: false,
-      max_date: false,
-
-    }
-  },
-  methods: {
-    //修改筛选时间
-    change_filter($id) {
-      $this.filter_date = ""
-      $this.filter_action = $id
-      $this.filter_list.forEach(($val, $index) => {
-        if ($val['id'] == $id) {
-          $this.get_order_list($val['start_time'], $val['end_time'])
-        }
-      })
-    },
-    //  自定义筛选时间
-    show_datetime_picker() {
-      $this.filter_action = 0
-      $this.calendar_show = true
-    },
-    //  关闭日历选择
-    do_calendar_close() {
-      $this.calendar_show = false
-    },
-    formatDate(date) {
-      date = new Date(date);
-      return `${date.getMonth() + 1}/${date.getDate()}`;
-    },
-    //  选择日历后
-    do_calendar_confirm($event) {
-      let [start, end] = $event.mp.detail;
-      $this.filter_date = $this.formatDate(start) + '-' + $this.formatDate(end)
-      $this.start_time = Math.round(new Date(start).getTime() / 1000)
-      $this.end_time = Math.round(new Date(new Date(new Date(end).getTime() + 24 * 60 * 60 * 1000 - 1).getTime()).getTime() / 1000)
-      $this.get_order_list($this.start_time, $this.end_time)
-      $this.calendar_show = false
-    },
-    //  跳转订单详情
-    to_detail($id) {
-      mpvue.navigateTo({
-        url: "/pages/agent/extend/detail/main?sn=" + $id
-      })
-    },
-    //获取订单列表
-    get_order_list($start_time, $end_time) {
-      Toast.loading({
-        message: "加载中",
-        duration: 0
-      })
-      let $params = {}
-      if ($start_time && $end_time) {
-        $params['start_time'] = $start_time
-        $params['end_time'] = $end_time
-      }
-      agentOrderList($params).then((res) => {
-        Toast.clear()
-        let $data = res.data
-        let $result = $data.data;
-        $this.order_counts = $result.count;
-        let $list = $result.list;
-        $list.forEach(($val, $index) => {
-          $list[$index]['create_time'] = formatAllTime($val['create_time'])
-        })
-        $this.order_list = $list
-      })
-    }
-  },
-  mounted() {
-    $this.min_date = new Date(2020, 10, 11).getTime()
-    $this.max_date = new Date(new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1).getTime()
-  },
-  created() {
-    $this = this
-  },
-  onLoad($options) {
-    if ($options.tab) {
-      let $tab = $this.filter_action = $options.tab
-      let $_filter = {}
-      $this.filter_list.forEach(($val, $index) => {
-        if ($val['id'] == $tab) {
-          $_filter = $val
-        }
-      })
-      $this.get_order_list($_filter['start_time'], $_filter['end_time'])
-    } else {
-      $this.get_order_list()
-    }
-  }
-}
-</script>
-
-<style scoped>
-.text-normal {
-  color: #6A6A6A;
-}
-
-.profit_container {
-  margin: 30px 0px;
-}
-</style>

+ 0 - 12
src/pages/agent/extend/orders/main.js

@@ -1,12 +0,0 @@
-import Vue from 'vue'
-import App from './index'
-
-// add this to handle exception
-Vue.config.errorHandler = function (err) {
-  if (console && console.error) {
-    console.error(err)
-  }
-}
-
-const app = new Vue(App)
-app.$mount()

+ 0 - 8
src/pages/agent/extend/orders/main.json

@@ -1,8 +0,0 @@
-{
-  "usingComponents": {
-    "van-divider": "../../../../static/vant/divider/index",
-    "van-card": "../../../../static/vant/card/index",
-    "van-calendar": "../../../../static/vant/calendar/index",
-    "van-toast": "../../../../static/vant/toast/index"
-  }
-}

+ 0 - 226
src/pages/agent/income_cal/index.vue

@@ -1,226 +0,0 @@
-<template>
-  <div id="agent_income_container">
-    <!--    筛选模块-->
-    <div class="filter_container margin-xs flex">
-      <view class='cu-tag round padding' v-for="(filter,index) in filter_list" :key="index"
-            :class="{'bg-orange':filter_action==filter.id,'bg-white':filter_action != filter.id}"
-            @click="change_filter(filter.id)"
-      >
-        {{ filter.name }}
-      </view>
-
-      <button class="cu-btn" @click="show_datetime_picker">自定义时间
-        <text class="cuIcon-unfold"></text>
-      </button>
-    </div>
-
-
-    <!--      收益模块-->
-    <div class="profit_container text-center">
-      <view>
-        <text class="text-normal margin-xl">
-          <template v-if="filter_date">{{ filter_date }}</template>
-          <template v-else>{{ filter_list[filter_action - 1].name }}</template>
-          累计收益
-        </text>
-      </view>
-      <view>
-        <text class="text-bold text-sl text-price">{{ total.balance_freeze }}</text>
-      </view>
-      <view>
-        <text class="text-normal ">含待结算
-          <text class="text-price">{{ total.balance }}</text>
-          元
-        </text>
-      </view>
-    </div>
-
-    <!--    小title-->
-    <div class="line_container padding">
-      <div>
-        <text class="text-sm text-gray">收益记录</text>
-        <van-divider customStyle="border:.1px solid;margin:0px;"/>
-      </div>
-    </div>
-    <!--  列表-->
-    <view class="solid-bottom padding-lr-sm" v-for="(item,index) in balance_list" :key="index">
-      <van-card>
-        <view slot="thumb" class="cu-avatar lg round margin-left"
-              style="background-image:url(https://img.shuimuai.com/web/icon_dingdan.png);"></view>
-        <view slot="title" class="flex justify-between">
-          <view>
-            <text class="text-normal">产品&emsp;</text>
-            <text>{{ item.goods_name }}</text>
-          </view>
-          <view>
-            <text class="text-gray text-sm">{{ item.create_time }}</text>
-          </view>
-        </view>
-
-        <view slot="num" class="flex justify-end">
-          <view>
-            <text class="text-normal text-sm margin-right-lg">收益</text>
-            <text class="text-xxl">+{{ item.rebater }}</text>
-          </view>
-        </view>
-      </van-card>
-    </view>
-
-    <van-calendar
-      :show="calendar_show"
-      type="range"
-      @close="do_calendar_close"
-      @confirm="do_calendar_confirm"
-      :min-date="min_date"
-      :max-date="max_date"
-    ></van-calendar>
-
-    <van-toast id="van-toast"/>
-  </div>
-</template>
-
-<script>
-
-import {agentIncomeDetail, agentIncomeList} from "../../../requests/agent";
-import util from '@/utils/index'
-import Toast from '../../../../static/vant/toast/toast'
-import {formatAllTime} from "../../../utils";
-
-var $this
-export default {
-  name: "agent_income_container",
-  components: {},
-  data() {
-    return {
-      filter_list: [
-        {
-          id: 1,
-          name: "全部"
-        },
-        {
-          id: 2,
-          name: "今日",
-          start_time: Math.round(new Date(new Date(new Date().toLocaleDateString()).getTime()).getTime() / 1000),
-          end_time: Math.round(new Date(new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1).getTime() / 1000)
-        },
-        {
-          id: 3,
-          name: "昨日",
-          start_time: Math.round(new Date(new Date(new Date().toLocaleDateString()).getTime() - 24 * 60 * 60 * 1000).getTime() / 1000),
-          end_time: Math.round(new Date(new Date(new Date().toLocaleDateString()).getTime() - 1000).getTime() / 1000)
-        },
-        {
-          id: 4,
-          name: "近七日",
-          start_time: Math.round(new Date(new Date(new Date().toLocaleDateString()).getTime() - 7 * 24 * 60 * 60 * 1000).getTime() / 1000),
-          end_time: Math.round(new Date(new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1).getTime() / 1000)
-        }
-      ],
-      filter_action: 1,
-      total: {
-        //累计收益
-        balance_freeze: 0,
-        //含待结算
-        balance: 0.00,
-      },
-      balance_list: [],
-      calendar_show: false,
-      start_time: "",
-      end_time: "",
-      filter_date: "",
-      //最小日期应该为用户使用的第一个月开始
-      min_date: false,
-      max_date: false,
-    }
-  },
-  methods: {
-    //修改筛选时间
-    change_filter($id) {
-      $this.filter_date = ""
-      $this.filter_action = $id
-      $this.filter_list.forEach(($val, $index) => {
-        if ($val['id'] == $id) {
-          $this.get_income_list($val['start_time'], $val['end_time'])
-        }
-      })
-    },
-    //  自定义筛选时间
-    show_datetime_picker() {
-      $this.filter_action = 0
-      $this.calendar_show = true
-    },
-    //  关闭日历选择
-    do_calendar_close() {
-      $this.calendar_show = false
-    },
-    formatDate(date) {
-      date = new Date(date);
-      return `${date.getMonth() + 1}/${date.getDate()}`;
-    },
-    //  选择日历后
-    do_calendar_confirm($event) {
-      let [start, end] = $event.mp.detail;
-      $this.filter_date = $this.formatDate(start) + '-' + $this.formatDate(end)
-      $this.start_time = Math.round(new Date(start).getTime() / 1000)
-      $this.end_time = Math.round(new Date(new Date(new Date(end).getTime() + 24 * 60 * 60 * 1000 - 1).getTime()).getTime() / 1000)
-      $this.get_income_list($this.start_time, $this.end_time)
-      $this.calendar_show = false
-    },
-    // 收益列表
-    get_income_list($start_time, $end_time) {
-      Toast.loading({
-        message: "加载中",
-        duration: 0
-      })
-      let $params = {}
-      if ($start_time && $end_time) {
-        $params['start_time'] = $start_time
-        $params['end_time'] = $end_time
-      }
-      agentIncomeList($params).then((res) => {
-        Toast.clear()
-        let $data = res.data
-        let $result = $data.data;
-        $this.total = $result.total;
-        let $incomes = $result.list;
-        $incomes.forEach(($val, $index) => {
-          $incomes[$index]['create_time'] = formatAllTime($val['create_time'])
-        })
-        $this.balance_list = $incomes
-      })
-    }
-  },
-  mounted() {
-    $this.min_date = new Date(2020, 10, 11).getTime()
-    $this.max_date = new Date(new Date(new Date().toLocaleDateString()).getTime() + 24 * 60 * 60 * 1000 - 1).getTime()
-    //一开始查询全部
-  },
-  created() {
-    $this = this
-  },
-  onLoad($options) {
-    if ($options.tab) {
-      let $tab = $this.filter_action = $options.tab
-      let $_filter = {}
-      $this.filter_list.forEach(($val, $index) => {
-        if ($val['id'] == $tab) {
-          $_filter = $val
-        }
-      })
-      $this.get_income_list($_filter['start_time'], $_filter['end_time'])
-    } else {
-      $this.get_income_list(false, false)
-    }
-  }
-}
-</script>
-
-<style scoped>
-.text-normal {
-  color: #6A6A6A;
-}
-
-.profit_container {
-  margin: 30px 0px;
-}
-</style>

+ 0 - 12
src/pages/agent/income_cal/main.js

@@ -1,12 +0,0 @@
-import Vue from 'vue'
-import App from './index'
-
-// add this to handle exception
-Vue.config.errorHandler = function (err) {
-  if (console && console.error) {
-    console.error(err)
-  }
-}
-
-const app = new Vue(App)
-app.$mount()

+ 0 - 8
src/pages/agent/income_cal/main.json

@@ -1,8 +0,0 @@
-{
-  "usingComponents": {
-    "van-divider": "../../../static/vant/divider/index",
-    "van-card": "../../../static/vant/card/index",
-    "van-calendar": "../../../static/vant/calendar/index",
-    "van-toast": "../../../static/vant/toast/index"
-  }
-}

+ 0 - 264
src/pages/agent/index/index.vue

@@ -1,264 +0,0 @@
-<template>
-  <div id="agent_index_container">
-    <div class="header">
-
-      <!--      用户信息模块-->
-      <van-row>
-
-        <div class="userinfo padding-tb-sm">
-          <van-col
-            span="3"
-            offset="2"
-          >
-            <view
-              class="cu-avatar lg"
-              :style="'background-image:url('+userinfo.portrait+');'"
-            ></view>
-          </van-col>
-
-          <van-col
-            span="6"
-            offset="1"
-          >
-            <view class="label">
-              <view class="text-bold">
-                <text class="text-white text-lg">{{ userinfo.user_name }}</text>
-              </view>
-              <view class="padding-tb-sm">
-                <text class="text-white text-sm">{{ userinfo.level_name }}</text>
-              </view>
-            </view>
-          </van-col>
-
-        </div>
-      </van-row>
-
-      <!--      收益模块-->
-      <div
-        class="profit_container text-center"
-        @click="to_income"
-      >
-        <view>
-          <text class="text-normal padding">累计收益(元)</text>
-        </view>
-        <view>
-          <text class="text-white text-bold text-sl text-price">{{ agent_info.rebater }}</text>
-        </view>
-        <view>
-          <text class="text-normal ">含待结算
-            <text class="text-price">{{ agent_info.rebater_freeze }}</text>
-            元
-          </text>
-        </view>
-      </div>
-
-      <!--      订单、客户、邀请卡粗图-->
-      <div class="profit_detail_contaienr text-center padding-top-lg">
-        <van-row gutter="40">
-          <van-col
-            span="6"
-            offset="3"
-            @click="to_extend_order"
-          >
-            <view>
-              <text class="text-xxl text-white">{{ agent_info.order_count }}</text>
-            </view>
-            <view>
-              <text class="text-normal text-sm">累计订单</text>
-            </view>
-          </van-col>
-          <van-col
-            span="6"
-            @click="to_customer"
-          >
-            <view>
-              <text class="text-xxl text-white">{{ agent_info.user_count }}</text>
-            </view>
-            <view>
-              <text class="text-normal text-sm">累计客户</text>
-            </view>
-          </van-col>
-          <van-col
-            span="6"
-            @click="to_agent_invite_card"
-          >
-            <view>
-              <text class="text-xxl text-white">{{ agent_info.invite_count }}</text>
-            </view>
-            <view>
-              <text class="text-normal text-sm">邀请卡库存</text>
-            </view>
-
-          </van-col>
-        </van-row>
-      </div>
-    </div>
-
-    <!--      提现金额-->
-    <div
-      class="withdraw_container flex justify-between align-center padding-lr"
-      @click="to_agent_cal_center"
-    >
-      <text class="text-white">可提现金额(元)</text>
-      <text class="text-white withdraw_money">{{ agent_info.user_balance }}</text>
-    </div>
-
-    <!--      菜单列表-->
-    <div class="menu">
-      <van-cell
-        title="今日收益(元)"
-        :value="income_info.rebater"
-        is-link
-        url="/pages/agent/income_cal/main?tab=2"
-      >
-        <van-icon
-          name="balance-o"
-          slot="icon"
-          color="#4B3AB0"
-          class="margin-lr-sm"
-          size="20px"
-        ></van-icon>
-      </van-cell>
-
-      <van-cell
-        title="今日订单"
-        :value="income_info.today_order"
-        is-link
-        url="/pages/agent/extend/orders/main?tab=2"
-      >
-        <van-icon
-          name="notes-o"
-          slot="icon"
-          color="#4B3AB0"
-          class="margin-lr-sm"
-          size="20px"
-        ></van-icon>
-      </van-cell>
-
-      <van-cell
-        title="今日新增客户"
-        :value="income_info.today_user"
-        is-link
-        url="/pages/agent/customer/main?tab=2"
-      >
-        <van-icon
-          name="contact"
-          slot="icon"
-          color="#4B3AB0"
-          class="margin-lr-sm"
-          size="20px"
-        ></van-icon>
-      </van-cell>
-
-    </div>
-    <van-toast id="van-toast" />
-
-  </div>
-</template>
-
-<script>
-import { agentDetail, agentIncomeDetail } from "../../../requests/agent";
-import utils from "@/utils/index";
-import Toast from "../../../../static/vant/toast/toast";
-
-var $this;
-export default {
-  name: "agent_index_container",
-  filter: {},
-  components: {},
-  data() {
-    return {
-      //用户信息
-      userinfo: {},
-      //代理商详情
-      agent_info: {},
-      //代理商收益详情
-      income_info: {},
-    };
-  },
-  methods: {
-    //跳转收益中心
-    to_income() {
-      mpvue.navigateTo({
-        url: "/pages/agent/income_cal/main?tab=1",
-      });
-    },
-    //  跳转推广订单
-    to_extend_order() {
-      mpvue.navigateTo({
-        url: "/pages/agent/extend/orders/main?tab=1",
-      });
-    },
-    //  跳转推广客户
-    to_customer() {
-      mpvue.navigateTo({
-        url: "/pages/agent/customer/main?tab=1",
-      });
-    },
-    //  跳转代理商结算中心
-    to_agent_cal_center() {
-      Toast.fail("暂未开通,请联系客服");
-      // mpvue.navigateTo({
-      //   url: "/pages/agent/settlement_center/index/main"
-      // })
-    },
-    //  邀请卡库存
-    to_agent_invite_card() {
-      mpvue.navigateTo({
-        url: "/pages/agent/invite_card_inventory/main",
-      });
-    },
-    //获取代理商详情
-    get_agent_detail() {
-      agentDetail().then((res) => {
-        let $data = res.data;
-        $this.agent_info = $data.data;
-      });
-      agentIncomeDetail().then((res) => {
-        let $data = res.data;
-        $this.income_info = $data.data;
-      });
-    },
-  },
-  mounted() {
-    $this.get_agent_detail();
-    $this.userinfo = wx.getStorageSync("userinfo");
-  },
-  onShow() {
-    $this.get_agent_detail();
-  },
-  created() {
-    $this = this;
-  },
-};
-</script>
-
-<style scoped>
-.header {
-  background-image: url("https://img.shuimuai.com/web/bg_dailishang.png");
-  background-position: center;
-  background-size: 100% 100%;
-  width: 100%;
-  height: 250px;
-}
-
-.text-normal {
-  color: #97b2de;
-}
-
-.profit_detail_contaienr {
-}
-
-.withdraw_container {
-  background-image: url("https://img.shuimuai.com/web/frame_dailishang_tixian.png");
-  background-position: center;
-  background-size: 100% 100%;
-  width: 353px;
-  height: 65px;
-  margin: 10px auto;
-}
-
-.withdraw_money {
-  font-size: 24px;
-}
-</style>

+ 0 - 12
src/pages/agent/index/main.js

@@ -1,12 +0,0 @@
-import Vue from 'vue'
-import App from './index'
-
-// add this to handle exception
-Vue.config.errorHandler = function (err) {
-  if (console && console.error) {
-    console.error(err)
-  }
-}
-
-const app = new Vue(App)
-app.$mount()

+ 0 - 9
src/pages/agent/index/main.json

@@ -1,9 +0,0 @@
-{
-  "usingComponents": {
-    "van-row": "../../../static/vant/row/index",
-    "van-col": "../../../static/vant/col/index",
-    "van-cell": "../../../static/vant/cell/index",
-    "van-icon": "../../../static/vant/icon/index",
-    "van-toast": "../../../static/vant/toast/index"
-  }
-}

+ 0 - 154
src/pages/agent/invite_card_inventory/index.vue

@@ -1,154 +0,0 @@
-<template>
-  <div id="agent_invite_card_inventory_container">
-
-    <div class="header flex justify-around text-center align-end margin-tb-xl">
-      <view>
-        <view>
-          <text class="text-xxl text-bold">{{ total_count }}</text>
-        </view>
-        <view>
-          <text class="text-sm text-gray slot_text">总卡数</text>
-        </view>
-      </view>
-
-      <!--      进度条-->
-      <van-circle
-        :value="percent"
-        stroke-width="15"
-        color="#FFB400"
-        layer-color="#CDCDCD"
-        :clockwise="false"
-        :size="150"
-      >
-        <view>
-          <text class="process_text">{{ stock_count }}</text>
-        </view>
-        <view class="flex justify-center">
-          <text class="cuIcon-title color-primary"></text>
-          <text class="text-sm text-gray slot_text">库存卡数</text>
-        </view>
-      </van-circle>
-
-
-      <view>
-        <view>
-          <text class="text-xxl text-bold">{{ use_count }}</text>
-        </view>
-        <view class="flex">
-          <text class="cuIcon-title text-gray"></text>
-          <text class="text-sm text-gray slot_text">已邀卡数</text>
-        </view>
-      </view>
-    </div>
-
-
-    <!--    小title-->
-    <div class="line_container padding">
-      <div>
-        <text class="text-sm text-gray">邀请卡记录</text>
-        <van-divider customStyle="border:.1px solid;margin:0px;"/>
-      </div>
-    </div>
-    <!--  列表-->
-    <view class="solid-bottom padding-lr-sm list-item" v-for="(cu,index) in invite_list" :key="index">
-      <van-card>
-        <view slot="thumb" class="cu-avatar lg round margin-left"
-              style="background-image:url(https://img.shuimuai.com/web/icon_dingdan.png);"></view>
-        <view slot="title" class="flex justify-between">
-          <view>
-            <text class="text-sm" v-if="cu.status == 2">未注册</text>
-            <text class="text-sm" v-if="cu.status == 1">{{ cu.user_name }}</text>
-          </view>
-          <view>
-            <text class="text-gray text-sm" v-if="cu.status == 2">{{ cu.invite_time }}</text>
-            <text class="text-gray text-sm" v-if="cu.status == 1">{{ cu.bind_time }}</text>
-          </view>
-        </view>
-
-        <view slot="num">
-          <view>
-            <text class="text-gray text-sm margin-right-lg">卡号</text>
-            <text class="text-sm text-gray">{{ cu.invite_id }}</text>
-          </view>
-        </view>
-      </van-card>
-    </view>
-
-    <van-calendar
-      :show="calendar_show"
-      type="range"
-      @close="do_calendar_close"
-      @confirm="do_calendar_confirm"
-    ></van-calendar>
-
-
-  </div>
-</template>
-
-<script>
-
-import {agentInviteStock} from "../../../requests/agent";
-import util from '@/utils/index'
-import {formatAllTime} from "../../../utils";
-
-var $this
-export default {
-  name: "agent_invite_card_inventory_container",
-  components: {},
-  data() {
-    return {
-      total_count: 0,
-      stock_count: 0,
-      use_count: 0,
-      invite_list: [],
-      percent: 0,
-    }
-  },
-  methods: {
-    get_invite_stock($type) {
-      let $params = {}
-      if ($type) {
-        $params['type'] = $type
-      }
-      agentInviteStock($params).then((res) => {
-        let $data = res.data.data;
-        $this.total_count = $data.total
-        $this.stock_count = $data.stock
-        $this.use_count = $data.unuse
-        $this.invite_list = $data.list
-        $this.invite_list.forEach(($val,$index)=>{
-          $this.invite_list[$index]['bind_time'] = formatAllTime($val['bind_time'])
-          $this.invite_list[$index]['invite_time'] = formatAllTime($val['invite_time'])
-        })
-        $this.percent = ($data.stock / $data.total).toFixed(2) * 100
-      })
-    }
-  },
-  mounted() {
-    $this.get_invite_stock(false)
-  },
-  created() {
-    $this = this
-  }
-}
-</script>
-
-<style scoped>
-.list-item {
-  margin: 10px 0px;
-}
-
-.process_text {
-  font-size: 36px;
-  font-family: Microsoft YaHei;
-  font-weight: 400;
-  color: #FF9C00;
-  line-height: 24px;
-}
-.color-primary{
-  color: #FF9C00;
-}
-.slot_text{
-  font-size: 9px;
-}
-</style>

+ 0 - 12
src/pages/agent/invite_card_inventory/main.js

@@ -1,12 +0,0 @@
-import Vue from 'vue'
-import App from './index'
-
-// add this to handle exception
-Vue.config.errorHandler = function (err) {
-  if (console && console.error) {
-    console.error(err)
-  }
-}
-
-const app = new Vue(App)
-app.$mount()

+ 0 - 7
src/pages/agent/invite_card_inventory/main.json

@@ -1,7 +0,0 @@
-{
-  "usingComponents": {
-      "van-circle": "../../../static/vant/circle/index",
-    "van-divider": "../../../static/vant/divider/index",
-    "van-card": "../../../static/vant/card/index"
-  }
-}

+ 0 - 111
src/pages/agent/settlement_center/index/index.vue

@@ -1,111 +0,0 @@
-<template>
-  <div id="agent_settlement_center_index_container">
-
-    <!--    头部-->
-    <div class="header text-center">
-      <img src="https://img.shuimuai.com/web/happy_shuimu.png" class="main_icon" alt="">
-      <view>
-        <text class="text-white text-sm">可提现金额(元)</text>
-      </view>
-      <view>
-        <text class="text-white text-bold text-sl">{{ total_price }}.00</text>
-      </view>
-    </div>
-
-    <view class="cu-bar">
-      <view class="action">
-        <text class="text-sm ">提现到微信钱包</text>
-      </view>
-    </view>
-    <!--    提现金额输入框-->
-    <van-field
-      :value='price'
-      placeholder="输入提现金额"
-      :custom-style='custom_style'
-      center
-      clearable
-    >
-      <text class="text-xxl" slot="label">&yen;</text>
-      <view slot="button" @click="price=total_price">
-        <text class="under_line text-sm text-orange">全部提现</text>
-      </view>
-    </van-field>
-
-    <view class="cu-bar">
-      <view class="action">
-        <text class="text-xs text-gray">提现单笔手续费1%,预计1个工作日内到账</text>
-      </view>
-    </view>
-
-    <!--    提现按钮-->
-    <div class="padding-lr margin-top-xl">
-      <van-button type="primary" size="large" color="#FFB400" @click="do_submit">立即提现</van-button>
-    </div>
-
-    <!--    提现规则-->
-    <view class="bottom_text">
-      <text class="text-gray under_line text-sm" @click="to_rule">提现规则</text>
-    </view>
-  </div>
-</template>
-
-<script>
-
-
-export default {
-  name: "agent_settlement_center_index_container",
-  components: {},
-  data() {
-    return {
-      price: "",
-      total_price: 15,
-      custom_style: `width: 330px;
-            height: 49px;
-            background: #F2F3FF;
-            box-shadow: 0px 3px 7px 0px rgba(159, 159, 159, 0.84);
-            border-radius: 10px;
-            margin: 20px auto 0px;
-      `,
-    }
-  },
-  methods: {
-    //  跳转规则
-    to_rule() {
-
-    },
-    //  提交提现的功能
-    do_submit() {
-
-    }
-  },
-  mounted() {
-  }
-}
-</script>
-
-<style scoped>
-.header {
-  background-image: url("https://img.shuimuai.com/web/bg_dailishang.png");
-  background-position: center;
-  background-size: 100% 100%;
-  width: 100%;
-  height: 235px;
-}
-
-.main_icon {
-  width: 121px;
-  height: 126px;
-  margin: 10px auto;
-}
-
-.text-primary {
-  color: #4B3AB0;
-}
-
-.bottom_text {
-  width: 100%;
-  text-align: center;
-  position: absolute;
-  bottom: 50px;
-}
-</style>

+ 0 - 12
src/pages/agent/settlement_center/index/main.js

@@ -1,12 +0,0 @@
-import Vue from 'vue'
-import App from './index'
-
-// add this to handle exception
-Vue.config.errorHandler = function (err) {
-  if (console && console.error) {
-    console.error(err)
-  }
-}
-
-const app = new Vue(App)
-app.$mount()

+ 0 - 8
src/pages/agent/settlement_center/index/main.json

@@ -1,8 +0,0 @@
-{
-  "usingComponents": {
-    "van-cell": "../../../../static/vant/cell/index",
-    "van-field": "../../../../static/vant/field/index",
-    "van-icon": "../../../../static/vant/icon/index",
-    "van-button": "../../../../static/vant/button/index"
-  }
-}

+ 0 - 24
src/pages/agent/settlement_center/withdraw/detail/index.vue

@@ -1,24 +0,0 @@
-<template>
-  <div id="agent_index_container">
-  </div>
-</template>
-
-<script>
-
-
-export default {
-  name: "agent_index_container",
-  components: {},
-  data() {
-    return {
-    }
-  },
-  methods: {
-  },
-  mounted() {
-  }
-}
-</script>
-
-<style scoped>
-</style>

+ 0 - 12
src/pages/agent/settlement_center/withdraw/detail/main.js

@@ -1,12 +0,0 @@
-import Vue from 'vue'
-import App from './index'
-
-// add this to handle exception
-Vue.config.errorHandler = function (err) {
-  if (console && console.error) {
-    console.error(err)
-  }
-}
-
-const app = new Vue(App)
-app.$mount()

+ 0 - 4
src/pages/agent/settlement_center/withdraw/detail/main.json

@@ -1,4 +0,0 @@
-{
-  "usingComponents": {
-  }
-}

+ 0 - 24
src/pages/agent/settlement_center/withdraw/list/index.vue

@@ -1,24 +0,0 @@
-<template>
-  <div id="agent_index_container">
-  </div>
-</template>
-
-<script>
-
-
-export default {
-  name: "agent_index_container",
-  components: {},
-  data() {
-    return {
-    }
-  },
-  methods: {
-  },
-  mounted() {
-  }
-}
-</script>
-
-<style scoped>
-</style>

+ 0 - 12
src/pages/agent/settlement_center/withdraw/list/main.js

@@ -1,12 +0,0 @@
-import Vue from 'vue'
-import App from './index'
-
-// add this to handle exception
-Vue.config.errorHandler = function (err) {
-  if (console && console.error) {
-    console.error(err)
-  }
-}
-
-const app = new Vue(App)
-app.$mount()

+ 0 - 4
src/pages/agent/settlement_center/withdraw/list/main.json

@@ -1,4 +0,0 @@
-{
-  "usingComponents": {
-  }
-}

+ 1 - 1
src/pages/game_record/index.vue

@@ -158,7 +158,7 @@ export default {
 
 .line_container .title {
   font-size: 10px;
-  font-family: PingFang SC;
+  // font-family: PingFang SC;
   font-weight: 400;
   color: #6C6C6C;
   line-height: 24px;

+ 4 - 21
src/pages/index/index.vue

@@ -5,11 +5,8 @@ import Login from "@/components/index/login";
 import Cards from "@/components/index/cards";
 import Connection from "@/components/connection/index";
 import Toast from "../../../static/vant/toast/toast";
-import Dialog from "../../../static/vant/dialog/dialog";
 import {setUserLogin} from "../../requests/user";
 import user_store from "../../store/index";
-import game_store from "../../store/game";
-import {post_data} from "../../utils/game";
 
 let $this;
 export default {
@@ -55,25 +52,10 @@ export default {
       });
     }
   },
-  onShow() {
-    if (wx.getStorageSync("is_other_first") === false) {
-      wx.setStorageSync("is_other", false);
-    } else {
-      wx.setStorageSync("is_other", true);
-    }
-  },
   onLoad() {
-    if (process.env.NODE_ENV == "development") {
-      wx.setStorageSync('token', "WxN3rgbWyVpjyBhi4uT6mZmwajZ3dFlm");
-    }
-    if (game_store.getters.getGameStatus() * 1 === 1) {
-      Dialog.alert({
-        title: "系统提示",
-        message: "正在结束上一个游戏",
-      }).then(() => {
-        post_data(game_store.getters.getGameAttMedDatas());
-      });
-    }
+    // if (process.env.NODE_ENV == "development") {
+    //   wx.setStorageSync('token', "WxN3rgbWyVpjyBhi4uT6mZmwajZ3dFlm");
+    // }
     //  判断存储是否登录
     let $token = wx.getStorageSync("token");
     if ($token) {
@@ -128,6 +110,7 @@ export default {
     </div>
     <van-toast id="van-toast"/>
     <van-dialog id="van-dialog"/>
+    <van-notify id="van-notify"/>
   </div>
 </template>
 

+ 0 - 4
src/pages/payment/main.json

@@ -1,4 +0,0 @@
-{
-  "usingComponents": {
-  }
-}

+ 0 - 428
src/pages/user_center/confirmPay/index.vue

@@ -1,428 +0,0 @@
-<template>
-    <div class=" padding-tb-xl flex padding-left-xl boxVer">
-      <view class="upBox">
-        <view class="title">
-          <text class="text-sm font">已选商品&emsp;水母星球—{{ data.goods_name }}</text>
-          <br>
-        </view>
-        <view class="title">
-          <text class="text-sm font">商品价格&emsp;{{ data.price }}元</text>
-          <br>
-
-        </view>
-        <view class="title">
-          <text class="text-sm font">支付方式&emsp;微信支付</text> 
-          <br>
-
-        </view>
-
-        <view v-if="data.coupon.length !== 0" class="flex padding-tb align-center justify-between" @click="to_discountCard">
-            <div class="flex align-center discountLeft">
-              <div class="discountPic"></div>
-              <text class="text-lg text-red ">{{ data.coupon.name }}</text>
-            </div>
-            <!-- <div class="betweenBox"></div> -->
-            <div class="flex align-center">
-              <text class="text-lg text-red">-¥{{data.reduce - isReduce + add_price}}&nbsp;</text>
-              <text class="text-gray rightArrow" :class="'cuIcon-right'"></text>
-             </div>
-            <br>
-        </view>
-       
-        <!-- <view v-if="data.coupon.length == 0 & data.discount * 10 !== 10" class="padding-tb">
-          <text class="text-lg text-red" style="font-weight: bold;">{{data.represent}}&emsp;{{ data.discount * 10 }}折</text>
-          <br>
-        </view> -->
-        
-        <!-- <view v-if="data.goods_id < 4" class="padding-tb">
-           <label class="radio" @click='radiocon'>
-                <van-checkbox :value="checked" @click="onChange" checked-color="#FF720E">
-                   <text class="text-lg text-orange">加购{{ data.add_price }}元,获得有效期增加{{ data.add_month }}个月</text>
-                </van-checkbox>
-              
-           </label>
-
-            <br>
-        </view> -->
-      </view>
-        
-      <view>  
-        <view class="flex padding-tb-xl justify-center align-center ">
-          <view class="order_price_container">
-            <text class="text-sm font">实付(元)&emsp;</text>
-            <text class="mine_min">{{ data.total_price + isAdd }}</text>
-          </view>
-        </view>  
-        <view class="flex padding-tb justify-center align-center">
-          <button
-            class="cu-btn bg-primary lg text-white recharge_button"
-            @click="success_pay"
-            :disabled="btn_disabled"
-          >立即充值</button>
-        </view>
-      </view>  
-
-      <!--    充值失败-->
-    <van-popup
-      :show="err_show"
-      @close="close_err_pop"
-      round
-      :close-on-click-overlay="false"
-    >
-      <div class="err_container flex flex-direction align-center justify-around padding-top-xl padding-bottom-sm">
-        <view>
-          <text class="payTitle">
-            充值失败
-          </text>
-        </view>
-        <img
-          src="https://img.shuimuai.com/web/sign_notimeJfish.png"
-          class="err_img"
-          alt=""
-        >
-        <div class="button_group flex justify-around">
-          <button
-            class="cu-btn bg-gray text-white lg margin-right-lg btnFail"
-            @click="close_err_pop"
-          >取消支付</button>
-          <button
-            class="cu-btn  bg-primary text-white lg btnFail"
-            @click="repay"
-            :disabled="btn_disabled"
-          >再次支付</button>
-        </div>
-      </div>
-    </van-popup>
-
-    <!--    充值成功-->
-    <van-popup
-      :show="success_show"
-      @close="close_success_pop"
-      :close-on-click-overlay="false"
-      custom-class="pop"
-      overlay
-      z-index="99"
-    >
-      <div class="flex flex-direction align-center justify-around ext_container padding-bottom" style="padding-top:50px">  
-        <text class="payTitle">充值成功!</text>
-        <div class="flex flex-direction align-center justify-around">
-          <text v-if="payment_info.msg" v-for="(item,index) in payment_info.msg" :key="index" class="margin-bottom-sm">{{item}} </text>
-        </div>
-        <div class="button_group flex justify-around">
-          <!--          <button class="cu-btn bg-gray text-white lg" @click="close_success_pop">以后再填</button>-->
-          <!--          <button class="cu-btn  bg-primary text-white lg" @click="to_write_address">填写地址</button>-->
-          <button
-            class="cu-btn  bg-primary text-white lg"
-            style="width: 102px;"
-            @click="to_index"
-          >确定</button>
-        </div>
-      </div>
-    </van-popup>
-    </div>
-</template>
-
-<script>
-let $this;
-import pay from '../../../utils/pay.js'
-import { createOrder, deleteOrder } from "../../../requests/orders";
-export default {
-  data() {
-    return {
-      order_confirm: false,
-      err_show: false,
-      success_show: false,
-      checked: false,
-      data: {},
-      isReduce:0,
-      add_price:0,
-      isAdd:0,
-      is_add: Number,
-      //支付信息
-      payment_info: {},
-      //订单编号
-      order_sn: "",
-      btn_disabled: false,
-    };
-  },
-  onLoad(options) {
-    this.data = JSON.parse(options.data)
-    console.log("数据", this.data)
-    $this = this
-    $this.checked = false
-    $this.isAdd = 0
-    $this.add_price = 0
-    $this.isReduce =0
-    $this.is_add = 0
-  },
-  onUnload(){
-    // $this.close_success_pop();
-    // $this.close_err_pop();
-    $this.isAdd = 0
-    $this.add_price = 0
-    $this.isReduce =0
-  },
-  onShow(){
-    pay.$on('cardInfo',res =>{
-      $this.data.coupon = res
-      $this.data.reduce = res.reduce
-      $this.data.total_price = Math.round(($this.data.price-res.reduce)*100)/100
-
-      if($this.checked==true){
-        if($this.data.coupon.discount){        //打折券
-          $this.isAdd = Math.round($this.data.add_price*$this.data.coupon.discount*100)/100
-        }else if($this.data.coupon.coupon_category_id){      //其它券
-          $this.isAdd = $this.data.add_price
-          $this.add_price = 0
-          $this.isReduce =  0
-        }else if($this.data.discount){         //没有券,活动打折
-          $this.isAdd =  Math.round($this.data.add_price*$this.data.discount*100)/100
-        }
-        $this.add_price = $this.data.add_price
-        $this.isReduce =  $this.isAdd
-      }else{
-        $this.isAdd = 0
-        $this.add_price = 0
-        $this.isReduce =  0
-      }
-    })
-  },
-  methods: {
-    to_discountCard() {
-      var deliver = JSON.stringify(this.data);
-      mpvue.navigateTo({
-        url: "/pages/user_center/discountCard/main?deliver=" + deliver +"&isAdd=" + $this.add_price,
-      });
-    },
-    onChange() {
-      $this.checked = !$this.checked
-      if($this.checked==true){
-        if($this.data.coupon.discount){        //打折券
-          $this.isAdd = Math.round($this.data.add_price*$this.data.coupon.discount*100)/100
-        }else if($this.data.coupon.coupon_category_id){                      //其它券
-          $this.isAdd = $this.data.add_price
-          $this.add_price = 0
-          $this.isReduce =  0
-        }else if($this.data.discount){         //没有券,活动打折
-          $this.isAdd = Math.round($this.data.add_price*$this.data.discount*100)/100
-        }
-        $this.add_price = $this.data.add_price
-        $this.isReduce =  $this.isAdd
-        $this.is_add = 1
-      }else{
-        $this.isAdd = 0
-        $this.add_price = 0
-        $this.isReduce =  0
-        $this.is_add = 0
- 
-      }
-    },
-    //关闭确认订单
-    close_order_confirm() {
-      $this.order_confirm = false;
-    },
-    //关闭充值失败窗口
-    close_err_pop() {
-      $this.err_show = false;
-    },
-    //取消充值
-    cancel_recharge() {
-      $this.close_err_pop();
-      deleteOrder($this.order_sn).then(
-        (res) => {
-          let $res = res.data;
-        },
-        (err) => {
-          console.log("删除订单错误", err);
-        }
-      );
-    },
-    // 打开充值成功窗口
-    open_success_window() {
-      $this.success_show = true;
-    },
-    //关闭充值成功窗口
-    close_success_pop() {
-      $this.success_show = false;
-    },
-    //再次付款
-    repay() {
-      $this.btn_disabled = true;
-      let $payment = $this.payment_info;
-      wx.requestPayment({
-        timeStamp: $payment.timeStamp,
-        nonceStr: $payment.nonceStr,
-        package: $payment.package,
-        signType: $payment.signType,
-        paySign: $payment.sign,
-        success(res) {
-          //支付成功
-          console.log("success支付成功调用:", res);
-          //关闭确认订单窗口
-          $this.close_order_confirm();
-          $this.close_success_pop();
-          //打开成功充值窗口
-          $this.open_success_window();
-        },
-        fail(res) {
-          console.log("success支付失败调用:", res);
-
-          $this.cancel_recharge();
-          $this.close_order_confirm();
-          $this.err_show = true;
-        },
-        complete() {
-          $this.btn_disabled = false;
-        },
-      });
-    },
-    // 成功支付
-    success_pay() {
-      $this.btn_disabled = true
-      let $params
-
-      if($this.data.coupon.length!==0){
-         // 支付成功后得回调方法
-        $params = {
-          goods_id: $this.data.goods_id,
-          buy_num: 1,
-          is_add: $this.is_add,
-          coupon_id: $this.data.coupon.coupon_id
-        };
-      }else{
-         $params = {
-           goods_id: $this.data.goods_id,
-           buy_num: 1,
-           is_add: $this.is_add,
-         };
-      }
-      
-      wx.login({
-        success(res1) {
-          console.log("微信登陆", res1.code);
-          let $code = res1.code;
-          $params["js_code"] = $code;
-          createOrder($params).then(
-            (res) => {
-              let $data = res.data;
-              let $payment = $data.data;
-              $this.order_sn = $payment["sn"];
-              $this.payment_info = $payment;
-              wx.requestPayment({
-                timeStamp: $payment.timeStamp,
-                nonceStr: $payment.nonceStr,
-                package: $payment.package,
-                signType: $payment.signType,
-                paySign: $payment.sign,
-                success(res) {
-                  //支付成功
-                  console.log("success", res);
-                  //关闭确认订单窗口
-                  $this.close_order_confirm();
-                  $this.close_success_pop();
-                  //打开成功充值窗口
-                  $this.open_success_window();
-                },
-                fail(res) {
-                  console.log("fail", res);
-                  $this.cancel_recharge();
-                  $this.close_order_confirm();
-                  $this.err_show = true;
-                },
-                complete() {
-                  $this.btn_disabled = false;
-                },
-              });
-            },
-            (err) => {
-              console.log(err);
-            }
-          );
-        },
-      });
-
-      //  接收回调方法后弹出支付成功
-    },
-    to_index() {
-      $this.success_show = false;
-      mpvue.reLaunch({
-        url: "/pages/index/main",
-      });
-    },
-  },
-};
-</script>
-
-<style scoped>
-.boxVer {
-  flex-direction: column;
-  box-sizing: border-box;
-}
-.upBox {
-  height: 190px;
-  margin-bottom: 190px;
-}
-.title {
-  margin-bottom: 13rpx;
-}
-.discountLeft {
-  width: 250px;
-}
-.mine_min {
-  font-size: 36px;
-  font-family: Microsoft YaHei;
-  font-weight: 400;
-}
-.font {
-  color: #4b4b4b;
-  font-family: PingFang;
-}
-.rightArrow {
-  margin-top: 3px;
-}
-/*充值按钮*/
-.recharge_button {
-  width: 208px;
-  height: 44px;
-}
-
-.discountPic {
-  height: 27px;
-  width: 37px;
-  background-image: url("https://img.shuimuai.com/icon_discount.png");
-  background-size: 100% 100%;
-  margin-right: 11px;
-}
-.order_confirm,
-.err_container {
-  width: 344px;
-  height: 312px;
-}
-.err_img {
-  width: 73px;
-  height: 83px;
-}
-.ext_container {
-  height: 324px;
-  width: 319px;
-  background-image: url("https://img.shuimuai.com/pic_sucessPay.png");
-  background-size: 100% 100%;
-  background-position: center;
-}
-.btnFail{
-  width: 146px;
-  height: 44px;
-}
-.payTitle {
-  font-size: 20px;
-  font-weight: bold;
-  color: #6B6B6B;
-  line-height: 18px;
-  font-family: Microsoft YaHei;
-}
-</style>
-<style>
-.pop {
-  background-color: rgba(255, 255, 255, 0) !important;
-}
-</style>

+ 0 - 12
src/pages/user_center/confirmPay/main.js

@@ -1,12 +0,0 @@
-import Vue from 'vue'
-import App from './index'
-
-// add this to handle exception
-Vue.config.errorHandler = function (err) {
-  if (console && console.error) {
-    console.error(err)
-  }
-}
-
-const app = new Vue(App)
-app.$mount()

+ 0 - 9
src/pages/user_center/confirmPay/main.json

@@ -1,9 +0,0 @@
-{
-    "usingComponents": {
-      "van-checkbox": "../../../../static/vant/checkbox/index",
-      "van-row": "../../../static/vant/row/index",
-      "van-col": "../../../static/vant/col/index",
-      "van-popup": "../../../static/vant/popup/index"
-    }
-  }
-  

+ 0 - 211
src/pages/user_center/discountCard/index.vue

@@ -1,211 +0,0 @@
-<template>
-    <div>
-        <div class="quan_list ">
-          <div  v-for="(item,index) in couponData" :key="index">
-            <div class="quan_container shadow bg-white">
-
-              <van-row gutter="9">
-              <van-col span="12" offset="1">
-                <div class="padding-top-sm">
-                  <text class="title text-lg text-bold">{{ item.name }}</text>
-                </div>
-                
-                <view class="padding-top-xs" v-if="item.type==2">
-                  <text class="text-sm">满{{ item.full }}可用</text>
-                </view>
-
-                <view :class="item.type==2?'padding-top-xs':'padding-top-xl'">
-                  <text class="text-xs">有效期:{{item.start_time}}~{{item.end_time}}</text>
-                </view>
-              </van-col>
-
-              <van-col span="9" offset="1" >
-                  <div class="padding-top-sm text-lg padding-bottom-xl margin-bottom-xs" v-if="item.type*1!==3">
-                      <view class="subtitle text-bold">可抵扣&nbsp;
-                        <text class="text-red">¥{{ item.reduce }}</text>
-                      </view>
-                 </div>
-
-                 <div class="padding-top-sm text-lg padding-bottom-xl margin-bottom-xs" v-if="item.type==3">
-                      <view class="subtitle text-bold">可折扣&nbsp;
-                        <text class="text-red">{{ item.discount * 10 }}折</text>
-                      </view>
-                 </div>
-              </van-col>
-             
-                <div class="cartLeft"></div>
-
-                <van-row gutter="9">
-                    <van-col span="12" offset="1">
-                      <van-radio-group :value="radio" @change="changeCard">
-                        <van-radio :name="item.coupon_id"  icon-size="17px" checked-color="#6858C4"></van-radio>
-                      </van-radio-group>
-                    </van-col>  
-
-                    <van-col span="4" offset="6" >
-                      <text class="text-sm text-grey rule" @click="ruleShow(item.coupon_id)">使用规则</text>
-                    </van-col> 
-                </van-row>
-             
-            </van-row>
-            </div>
-
-             <!--    描述-->
-           <view v-if="is_ruleShow == item.coupon_id">
-             <view class="flex justify-center">
-              <view
-              class="desc"
-              v-html="item.explain"
-              >
-
-             </view>
-            </view>
-          </view>
-          
-          </div>   
-          <div style="height: 5rem;"></div>    
-        </div>
-        <view class="cu-bar tabbar bg-white shadow foot btmBar">
-           <view class='margin-left'>已优惠
-              <text class="text-xl text-red text-bold">¥{{discount}}</text>
-           </view>
-
-           <button class="cu-btn confirmBtn text-white text-lg margin-right" @click="backPay">确定</button>
-        </view>
-    </div>
-</template>
-
-<script>
-let $this
-let add
-import { payCoupon } from "../../../requests/coupons";
-import pay from '../../../utils/pay.js'
-import { formatTimeAnother } from "../../../utils/index.js";
-export default {
-    data() {
-      return {
-        is_ruleShow: 0,
-        is_ruleShow:false,
-        couponData: {},
-        deliver:{},
-        radio:'',
-        discount: Number,
-      };
-    },
-    onLoad(options) {
-       $this=this
-       let $params = JSON.parse(options.deliver)
-       $this.radio = $params.coupon.coupon_id
-       add = options.isAdd * 1 
-       $params["priceParam"] = $params.price + add
-       payCoupon($params).then((res)=>{
-               console.log('优惠券',res.data.data)
-               this.couponData = res.data.data
-               this.couponData.forEach(($val, $index) => {
-                    $val['start_time'] = formatTimeAnother($val['start_time'])
-                    $val['end_time'] = formatTimeAnother($val['end_time'])
-                    if($val['type']==3){
-                      if( add ==0){
-                         $val["reduce"] = Math.round(($params.price-$params.price*$val["discount"])*100)/100
-                         $val["reduce_dis"] = Math.round(($params.price-$params.price*$val["discount"])*100)/100
-                      }else {
-                        $val["reduce"] = Math.round(($params.price-$params.price*$val["discount"])*100)/100
-                        $val["reduce_dis"] = Math.round((($params.price+ add) -($params.price+ add)*$val["discount"])*100)/100
-                      }
-                        
-                    }else if($val['type']==2){
-                        $val["reduce"] = $val["reduce"]
-                    }else if($val['type']==4){
-                        $val["reduce"] = $val["random"]
-                    }
-               })
-               for(let a of $this.couponData){
-                 if(a.coupon_id == $this.radio){
-                   if(a.type==3){
-                    $this.discount= a.reduce_dis
-                   }else{
-                    $this.discount= a.reduce
-                   }
-                 }
-               }
-           })
-           .catch((err)=>{
-               console.log(err)
-           })
-
-    },
-    onUnload(){
-      $this.is_ruleShow = 0
-    },
-    methods: {
-      changeCard(event){
-        // console.log(event)
-         $this.radio = event.mp.detail
-         for(let i of $this.couponData){
-           if(i.coupon_id==$this.radio){
-             if(i.type==3){
-               $this.discount = i.reduce_dis      
-             }else{
-               $this.discount= i.reduce
-             }
-           }
-         }
-      },
-      backPay(){
-         for(let i of $this.couponData){
-            if(i.coupon_id==$this.radio){
-              pay.$emit('cardInfo',i)
-              wx.navigateBack({
-                 delta: 1
-              });
-            }
-         }
-      },
-      //使用规则
-    ruleShow($id){
-      // console.log($id);
-      if ($this.is_ruleShow == $id) {
-        $this.is_ruleShow = 0;
-      } else {
-        $this.is_ruleShow = $id;
-      }
-    },
-    },
-}
-</script>
-
-<style scoped>
-.quan_container {
-  background-image: url("https://img.shuimuai.com/pic_payCoupon.png");
-  background-position: center;
-  background-size: 100% 100%;
-  width: 340px;
-  height: 115px;
-  margin: 7px auto;
-}
-.cartLeft{
-  width: 89%;
-  margin: 9px auto;
-  height: 82px;
-  border-bottom: 1rpx dashed #a7a8a8;
-
-}
-.rule{
-  text-decoration: underline;
-}
-.btmBar{
-  height: 65px;
-}
-.confirmBtn{
-  width: 125px;
-  height: 44px;
-  background: #6858C4;
-}
-.desc{
-  width: 330px;
-  font-size: 12px;
-  color: #6B6B6B;
-  line-height: 18px;
-  margin-bottom: 26px
-}
-</style>

+ 0 - 12
src/pages/user_center/discountCard/main.js

@@ -1,12 +0,0 @@
-import Vue from 'vue'
-import App from './index'
-
-// add this to handle exception
-Vue.config.errorHandler = function (err) {
-  if (console && console.error) {
-    console.error(err)
-  }
-}
-
-const app = new Vue(App)
-app.$mount()

+ 0 - 9
src/pages/user_center/discountCard/main.json

@@ -1,9 +0,0 @@
-{
-    "usingComponents": {
-      "van-row": "../../../static/vant/row/index",
-      "van-col": "../../../static/vant/col/index",
-      "van-popup": "../../../static/vant/popup/index",
-      "van-radio": "../../../static/vant/radio/index",
-      "van-radio-group": "../../../static/vant/radio-group/index"
-    }
-  }

+ 0 - 728
src/pages/user_center/recharge/index.vue

@@ -1,728 +0,0 @@
-<template>
-  <div class="uc_recharge_container margin-bottom-xl">
-    <!--    头部卡片-->
-    <div class="mine padding">
-      <div class="flex justify-between">
-        <view>
-          <text class="gray">当前剩余时长(分钟)</text>
-        </view>
-        <view @click="to_orderlist">
-          <text class="cuIcon-calendar"></text>
-          <text class="under_line">我的订单</text>
-        </view>
-      </div>
-      <view>
-        <text class="mine_min">{{ userinfo.play_time }}</text>
-      </view>
-    </div>
-
-  <div v-if="userinfo.level==11">
-    <!--    标题-->
-    <div class="title flex padding-left align-center margin-top-xl margin-bottom">
-      <div class="line margin-right-xs "></div>
-      <text class="titles">家庭VIP</text>
-    </div>
-
-    <!--    黄金会员-->
-    <div
-      v-for="(item,index) in time_cards"
-      :key="index"
-      class="margin-bottom"
-    >
-      <div
-        class="vip"
-        :class="item.bg"
-        @click="changeCardShow(item.goods_id)"
-      >
-        <van-row>
-          <van-col
-            span="9"
-            offset="6"
-          >
-            <div
-              class="card_body"
-              style="padding-top:14px;"
-            >
-              <view class="margin-bottom">
-                <!-- <text class="mine_min  text-white">{{ item.play_time }}</text> -->
-                <text class="text-white text-lg" v-text="vip_text[index]"></text>
-              </view>
-              <view>
-                <text class="text-white subGrey">{{ item.title1 }}</text>
-              </view>
-
-            </div>
-          </van-col>
-
-          
-
-          <van-col
-            span="6"
-            offset="2"
-          >
-            <div class="card_body">
-
-              <view class="price">
-                <text class="text-white text-sm">价格</text>
-              </view>
-              <view class="text-center">
-                <text class="text-white mine_min_litt"><text class="text-white text-sm">¥</text>{{ item.price }}</text>
-              </view>
-              <view class="text-center">
-                <button
-                 :class="index==0?'monthly_btn_bg': index==1?'seasonly_btn_bg':'yearly_btn_bg'"
-                  class="check_detail text-white cu-btn round"
-                  v-if="card_action_show == item.goods_id">
-                  收起详情
-                 </button>
-                 <button
-                 :class="index==0?'monthly_btn_bg': index==1?'seasonly_btn_bg':'yearly_btn_bg'"
-                  class="check_detail text-white cu-btn round"
-                  v-else>
-                  查看详情
-                 </button>
-                <!-- <img
-                  src="https://img.shuimuai.com/web/btn_seedetil_1%402x.png"
-                  class="check_detail"
-                  alt=""
-                  v-if="card_action_show == item.goods_id"
-                >
-                <img
-                  src="https://img.shuimuai.com/web/btn_seedetil_2.png"
-                  class="check_detail"
-                  alt=""
-                  v-else
-                > -->
-              </view>
-
-            </div>
-          </van-col>
-
-        </van-row>
-      </div>
-
-      <view v-if="card_action_show == item.goods_id">
-
-        <!--    描述-->
-        <view class="flex justify-center">
-        <view
-          class="desc"
-          v-html="item.content"
-        >
-
-        </view>
-        </view>
-
-        <!--    购买按钮-->
-        <div class="buy_button">
-          <button
-            class="cu-btn lg bg-orange text-center margin yellowButt"
-            @click="to_confirm_vip(item)"
-          >购买{{item.goods_name}}</button>
-        </div>
-      </view>
-    </div>
-
-
-    <div class="title flex padding-left align-center margin-top-lg margin-bottom">
-      <div class="line margin-right-xs"></div>
-      <text class="titles">专注时间包</text>
-    </div>
-    <!--  体验次卡-->
-    <div
-      v-for="(item,index) in frequency_card"
-      :key="index"
-      class="margin-bottom"
-    >
-
-      <div
-        class="vip"
-        :class="item.bgBott"
-        @click="changeCardShow(item.goods_id)"
-      >
-        <van-row>
-          <van-col
-            span="10"
-            offset="6"
-          >
-            <div
-              class="card_body"
-              style="padding-top:14px;"
-              :class="index==0?'relax_text':'hard_text'"
-            >
-              <view>
-                <text class="mine_min">{{ item.play_time }}</text>
-                <text>&nbsp;分钟</text>
-              </view>
-              <view>
-                <text class="subGrey">{{ item.title1 }}</text>
-              </view>
-
-            </div>
-          </van-col>
-
-          <van-col
-            span="6"
-            offset="1"
-          >
-            <div class="card_body">
-
-              <view class="price">
-                <text class="text-white text-sm">价格</text>
-              </view>
-              <view class="text-center">
-                <text class="text-white mine_min_litt">{{ item.price }}</text>
-              </view>
-               <view class="text-center">
-                 <button
-                 :class="index==0?'relax_btn_bg':'hard_btn_bg'"
-                  class="check_detail text-white cu-btn round"
-                  v-if="card_action_show == item.goods_id">
-                  收起详情
-                 </button>
-                 <button
-                 :class="index==0?'relax_btn_bg':'hard_btn_bg'"
-                  class="check_detail text-white cu-btn round"
-                  v-else>
-                  查看详情
-                 </button>
-              <!-- <img
-                src="https://img.shuimuai.com/web/btn_seedetil_1%402x.png"
-                class="check_detail"
-                alt=""
-                v-if="card_action_show == item.goods_id"
-              > -->
-              <!-- <img
-                src="https://img.shuimuai.com/web/btn_seedetil_2.png"
-                class="check_detail"
-                alt=""
-                v-else
-              > -->
-              </view>
-
-            </div>
-          </van-col>
-
-        </van-row>
-      </div>
-      <view v-if="card_action_show == item.goods_id">
-
-        <!--    描述-->
-        <view class="flex justify-center">
-        <view
-          class="desc"
-          v-html="item.content"
-        >
-
-        </view>
-        </view>
-
-        <!--    购买按钮-->
-        <div class="buy_button">
-          <button
-            class="cu-btn lg bg-orange text-center margin yellowButt"
-            @click="to_confirm_time(item)"
-          >购买{{
-            item.goods_name
-            }}
-          </button>
-        </div>
-      </view>
-    </div>
-  </div>
-
-  <div class="text-center scan_wrap" v-else>
-    <span>请扫包装盒中的VIP会员卡二维码</span>
-    <button class="text-white cu-btn round scan_btn" @click="to_scan">扫描</button>
-  </div>
-
-  <!-- 购买vip提示弹窗 -->
-  <van-popup
-      :show="vip_err_show"
-      @close="close_err_pop"
-      round
-    >
-      <div class="err_container flex flex-direction align-center justify-around padding-top-xl padding-lr-sm">
-        <div v-text="cant_buy_vip" class="padding-lr-lg text-lg text-black" style="line-height:28px"></div>
-
-        <div class="button_group flex justify-around">
-          <button
-            class="cu-btn bg-gray text-white lg margin-right-lg btnFail"
-            @click="close_err_pop"
-          >取消</button>
-          <button
-            class="cu-btn  bg-primary text-white lg btnFail"
-            @click="to_confirm(buy_vip_item)"
-          >确认</button>
-        </div>
-      </div>
-    </van-popup>
-  
-<!-- 不能购买时间弹窗 -->
-  <van-popup
-    :custom-style='cant_buy_popup'
-    :show="is_cant_buy"
-    :round="true" 
-    @close="onClosePopup">
-
-      <div v-text="cant_buy_time"></div>
-
-  </van-popup>
-  <van-toast id="van-toast"/>
-  </div>
-</template>
-
-<script>
-import Toast from "../../../../static/vant/toast/toast";
-import { goodsCardList } from "../../../requests/goods";
-import { createOrder, deleteOrder } from "../../../requests/orders";
-import { vipCode, check_vip } from "../../../requests/vip";
-
-var $this;
-export default {
-  name: "uc_recharge_container",
-  components: {},
-  data() {
-    return {
-      order: {},
-      card_action_show: 0,
-      //时间卡列表
-      time_cards: [],
-      //次卡列表
-      frequency_card: [],
-      //用户信息
-      userinfo: {},
-      //  选中的充值卡
-      selection_card: {},
-      // 家庭vip文字
-      vip_text:["包月","包季","包年"],
-      // vip购买提示弹窗
-      vip_err_show:false,
-      cant_buy_vip:"",
-      buy_vip_item:{},
-      // 不可购买时间弹窗
-      is_cant_buy: false,
-      cant_buy_time:"",
-      cant_buy_popup: `height:120px;
-            width:70%;
-            display:flex;
-            padding:10px;
-            flex-direction:column;
-            justify-content:center;
-            align-items:center
-      `,
-    };
-  },
-  watch: {},
-  methods: {
-    to_confirm_vip($item) {
-      check_vip(1).then((res) => {
-        console.log("vip", res);
-
-        let $res = res.data
-        if ($res.code == 0) {
-          $this.to_confirm($item)
-
-        }else {
-          $this.cant_buy_vip = $res.errmsg
-          $this.buy_vip_item = $item
-          $this.vip_err_show = true;
-        }
-      });
-    },
-    //确认订单
-    to_confirm_time($item) {
-      // 判断家庭VIP是否过期
-      check_vip(2).then((res) => {
-        console.log("vip", res);
-        
-        let $res = res.data
-        if ($res.code == 0) {
-          $this.to_confirm($item)
-
-        } else {
-          $this.cant_buy_time = $res.errmsg
-          $this.is_cant_buy = true;
-        }
-      });
-    },
-    // 支付通用
-    to_confirm($item){
-      console.log("data", $item);
-      //实付
-      if ($item.coupon.type == 3) {
-        $item["total_price"] =
-          Math.round($item.price * $item.coupon.discount * 100) / 100;
-      } else if ($item.coupon.type == 2) {
-        $item["total_price"] =
-          Math.round(($item.price - $item.coupon.reduce) * 100) / 100;
-      } else if ($item.coupon.type == 4) {
-        $item["total_price"] =
-          Math.round(($item.price - $item.coupon.random) * 100) / 100;
-      } else {
-        $item["total_price"] =
-          Math.round($item.price * $item.discount * 100) / 100;
-      }
-      //减多少
-      if ($item.coupon.type == 3) {
-        $item["reduce"] =
-          Math.round(
-            ($item.price - $item.price * $item.coupon.discount) * 100
-          ) / 100;
-      } else if ($item.coupon.type == 2) {
-        $item["reduce"] = $item.coupon.reduce;
-      } else if ($item.coupon.type == 4) {
-        $item["reduce"] = $item.coupon.random;
-      }
-      // $item["total_price"] = ($item.price * $item.discount).toFixed(2);
-      if ($item.goods_id == 1) {
-        $item["add_price"] = 20;
-        $item["add_month"] = "一";
-      } else if ($item.goods_id == 2) {
-        $item["add_price"] = 30;
-        $item["add_month"] = "三";
-      } else if ($item.goods_id == 3) {
-        $item["add_price"] = 30;
-        $item["add_month"] = "三";
-      }
-      $this.selection_card = $item;
-      var data = JSON.stringify($item);
-      mpvue.navigateTo({
-        url: "/pages/user_center/confirmPay/main?data=" + data,
-      });
-    },
-    onClosePopup() {
-      $this.is_cant_buy = false;
-    },
-    close_err_pop(){
-      $this.vip_err_show = false;
-    },
-    //跳转填写地址
-    to_write_address() {
-      mpvue.navigateTo({
-        url: "/pages/user_center/address/list/main",
-      });
-    },
-    // 获取充值卡列表
-    get_card_list() {
-      goodsCardList().then((res) => {
-        let $data = res.data.data;
-        $this.time_cards = $data.time_card;
-        let $bg = ["gold", "platina", "diamond"];
-        let $bgBott = ["normal", "oneMonth"];
-        $this.time_cards.forEach(($val, $index) => {
-          $this.time_cards[$index]["bg"] = $bg[$index];
-          $this.time_cards[$index]["price"] = Math.ceil($val["price"]);
-        });
-        $this.frequency_card = $data.frequency_card;
-        $this.frequency_card.forEach(($val, $index) => {
-          $this.frequency_card[$index]["bgBott"] = $bgBott[$index];
-          $this.frequency_card[$index]["price"] = Math.round($val["price"]);
-        });
-      });
-    },
-    to_orderlist() {
-      mpvue.navigateTo({
-        url: "/pages/user_center/orders/main",
-      });
-    },
-    // 扫描会员卡
-    to_scan() {
-      wx.scanCode({
-        onlyFromCamera: true,
-        success(res) {
-          let $data = res;
-          if ($data.result) {
-            // console.log($data.result)
-            let url = decodeURIComponent($data.result);
-            let $code = url.match(/\?code=(.*)/);
-
-            // 会员码
-            let $vip_code = $code[1];
-
-            vipCode($vip_code).then((res) => {
-              let $res = res.data;
-              console.log("vipcode", $res);
-
-              if ($res.code == 0) {
-                mpvue.navigateTo({
-                  url: "/pages/index/main",
-                });
-              } else {
-                Toast.fail($res.errmsg);
-              }
-            });
-          }
-        },
-      });
-    },
-    //  切换显示
-    changeCardShow($id) {
-      // console.log($id);
-      if ($this.card_action_show == $id) {
-        $this.card_action_show = 0;
-      } else {
-        $this.card_action_show = $id;
-      }
-    },
-  },
-  mounted() {
-    $this.get_card_list();
-    $this.userinfo = wx.getStorageSync("userinfo");
-  },
-  onShow() {
-    $this.get_card_list();
-    $this.is_cant_buy = false
-    $this.vip_err_show = false;
-  },
-  created() {
-    $this = this;
-  },
-  onLoad() {},
-  onUnload() {
-    // $this.close_success_pop();
-    // $this.close_err_pop();
-  },
-};
-</script>
-
-<style scoped>
-.mine {
-  width: 330px;
-  height: 84px;
-  background: rgba(242, 243, 255, 0.6);
-  box-shadow: 0px 3px 7px 0px rgba(159, 159, 159, 0.84);
-  border-radius: 0px 0px 11px 11px;
-  margin: 0px auto;
-}
-
-.mine_min {
-  font-size: 36px;
-  font-family: Microsoft YaHei;
-  font-weight: 400;
-}
-
-.mine_min_litt {
-  font-size: 30px;
-  font-family: Microsoft YaHei;
-  font-weight: 400;
-}
-
-.line {
-  width: 4px;
-  height: 16px;
-  background: #5d4db8;
-}
-
-/* 扫描 */
-.scan_wrap {
-  width: 100%;
-  height: 100px;
-  position: fixed;
-  left: 50%;
-  top: 50%;
-  transform: translate(-50%, -50%);
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: space-between;
-}
-
-.scan_btn {
-  width: 90%;
-  height: 40px;
-  background: #4a73ef;
-  border-radius: 40px;
-}
-
-/*会员*/
-.vip {
-  width: 345px;
-  height: 103px;
-  background-position: center;
-  background-size: 100% 100%;
-  margin: 0px auto;
-}
-
-.gold {
-  background-image: url("https://img.shuimuai.com/bg_monthly_vip.png");
-}
-
-.platina {
-  background-image: url("https://img.shuimuai.com/bg_seasonly_vip.png");
-}
-
-.diamond {
-  background-image: url("https://img.shuimuai.com/bg_yearly_vip.png");
-}
-
-.normal {
-  background-image: url("https://img.shuimuai.com/bg_relaxly_time.png");
-}
-.oneMonth {
-  background-image: url("https://img.shuimuai.com/bg_hardly_time.png");
-}
-
-.card_body {
-  padding: 3px 0px;
-}
-
-.check_detail {
-  width: 90px;
-  height: 28px;
-}
-
-/* 家庭VIP */
-.monthly_btn_bg {
-  background: #ec7945;
-}
-
-.seasonly_btn_bg {
-  background: #1c6cda;
-}
-
-.yearly_btn_bg {
-  background: #5959f8;
-}
-
-.btnFail{
-  width: 146px;
-  height: 44px;
-}
-
-.err_container {
-  width: 344px;
-  height: 312px;
-}
-
-/* 专注时间包颜色 */
-.relax_text {
-  color: #eb7d07;
-}
-
-.hard_text {
-  color: #4ca8eb;
-}
-
-.relax_btn_bg {
-  background: #e87f12;
-}
-
-.hard_btn_bg {
-  background: #2f9ae8;
-}
-
-.desc {
-  width: 324px;
-  /* height: 128px; */
-  margin: 10px auto;
-  font-size: 10px;
-  color: #6b6b6b;
-  line-height: 18px;
-}
-.titles {
-  font-size: 15px;
-  font-family: Microsoft YaHei;
-  font-weight: 400;
-  color: #010101;
-}
-.buy_button {
-  text-align: center;
-}
-
-.order_confirm,
-.err_container {
-  width: 344px;
-  height: 312px;
-}
-
-.order_price_container {
-  margin-top: 110px;
-}
-
-/*充值按钮*/
-.recharge_button {
-  position: absolute;
-  bottom: 20px;
-  width: 90%;
-}
-
-/*标题*/
-.err_container .title {
-  font-size: 20px;
-  font-weight: bold;
-  color: #4c4c4c;
-  line-height: 24px;
-}
-
-.err_img {
-  width: 73px;
-  height: 83px;
-}
-
-.button_group {
-  width: 100%;
-}
-
-/*子标题*/
-.err_container .sub-title {
-  font-size: 12px;
-  font-family: Microsoft YaHei;
-  font-weight: 400;
-  color: #4b4b4b;
-  width: 200px;
-}
-
-.boy_logo {
-  width: 167px;
-  height: 184px;
-}
-
-.ext_container {
-  height: 320px;
-  /*background-image: url("https://img.shuimuai.com/web/boyya_bg.png");*/
-  /*background-size: 100% 100%;*/
-  /*background-position: center;*/
-  background-color: rgba(255, 255, 255, 0);
-}
-.under_line {
-  margin-left: 5px;
-  font-size: 12px;
-  font-family: PingFang;
-  font-weight: 400;
-  text-decoration: underline;
-  color: #000000;
-}
-.gray {
-  font-size: 12px;
-  font-family: Microsoft YaHei;
-  font-weight: 400;
-  color: #6d6d6d;
-}
-.title {
-  margin-left: -8px;
-}
-.subGrey {
-  font-size: 11px;
-  font-family: Microsoft YaHei;
-  font-weight: 400;
-  opacity: 0.8;
-}
-.price {
-  margin: 3px 0 0 3px;
-  font-size: 10px;
-  font-family: Microsoft YaHei;
-  font-weight: 400;
-  color: #ffffff;
-}
-.yellowButt {
-  width: 320px;
-  height: 40px;
-  background: linear-gradient(-90deg, #e1a268 0%, #f7cfaa 100%);
-  border-radius: 40px;
-  margin-bottom: 27px;
-}
-</style>
-<style>
-</style>
-

+ 0 - 12
src/pages/user_center/recharge/main.js

@@ -1,12 +0,0 @@
-import Vue from 'vue'
-import App from './index'
-
-// add this to handle exception
-Vue.config.errorHandler = function (err) {
-  if (console && console.error) {
-    console.error(err)
-  }
-}
-
-const app = new Vue(App)
-app.$mount()

+ 0 - 8
src/pages/user_center/recharge/main.json

@@ -1,8 +0,0 @@
-{
-  "usingComponents": {
-    "van-row": "../../../static/vant/row/index",
-    "van-col": "../../../static/vant/col/index",
-    "van-toast": "../../../static/vant/toast/index",
-    "van-popup": "../../../static/vant/popup/index"
-  }
-}

+ 4 - 7
src/utils/connection.js

@@ -168,7 +168,7 @@ export default {
     this.WriteBufferInBle(`03 00 ${id} 02 0A`)
   },
   /**
-   * todo 写入8位指令
+   * 写入8位指令
    * @param id 末尾id
    * @constructor
    */
@@ -209,8 +209,8 @@ export default {
     let $hexStr = `03 00 ${onVal} ${mTimeOut} d0`;
     this.WriteBufferInBle($hexStr);
   },
-    /**
-   *  todo:开启脑控
+  /**
+   * 开启脑控
    */
   sendControl() {
     let that = this;
@@ -433,16 +433,13 @@ export default {
               }, 2000)
             }
           });
-
         }
-
       }
-
     });
   },
 
   /**
-   *  todo:监听蓝牙连接状态
+   *   监听蓝牙连接状态
    *  监听蓝牙低功耗连接状态改变事件。包括开发者主动连接或断开连接,设备丢失,连接异常断开等
    */
   watchBLEstatus($this) {

+ 72 - 72
src/utils/game.js

@@ -1,78 +1,78 @@
 import game_store from '../store/game'
 import {gameAddLine, gameEnd} from "../requests/game";
 
-// 往后端推送一次定时数据
-export function post_data($big_data) {
-  wx.showLoading({
-    title: "正在结束上一个游戏",
-    mask: true
-  })
-  var $this = this
-  //判断数据长度大于理想状态 需要对数组进行切割 逐个提交数据
-  let $len = 300
-  console.log($big_data.attList.length, '结束游戏提交的数据量')
-  if ($big_data.attList.length > $len) {
-    let $count = Math.ceil($big_data.attList.length / $len)
-
-    let index = 0
-    let inter = setInterval(() => {
-      if (index < $count) {
-        let $params = {
-          game_record_id: game_store.getters.getGameRecordId(),
-          //数据段长度大于65 多个提交
-          line: $big_data.attList.slice(index * $len, (index + 1) * $len),
-          line_med: $big_data.medList.slice(index * $len, (index + 1) * $len)
-        }
-        gameAddLine($params).then((res) => {
-          let $data = res.data
-          if ($data.code == 0) {
-            console.log('ok', $params['line'])
-          }
-        })
-      }
-      index++
-      if (index == $count) {
-        clearInterval(inter)
-        game_over()
-      }
-    }, 200)
-    return $count * 500
-  } else {
-    let $params = {
-      game_record_id: game_store.getters.getGameRecordId(),
-      //数据段长度小于65 单个提交
-      line: $big_data.attList,
-      line_med: $big_data.medList
-    }
-
-    if (!$params.line) {
-      return false
-    }
-    gameAddLine($params).then((res) => {
-      let $data = res.data
-      if ($data.code == 0) {
-      }
-      setTimeout(() => {
-        game_over()
-      }, 800)
-    })
-    return 800
-  }
-}
-
-//  结束游戏
-function game_over() {
-  let $params = {
-    game_record_id: game_store.getters.getGameRecordId(),
-    type: game_store.getters.getMode(),
-    play_time: game_store.getters.getPlayTime() - Math.abs(game_store.getters.getPlayedTime())
-  }
-  //
-  gameEnd($params).then((res) => {
-    let $data = res.data
-    to_report()
-  })
-}
+// // 往后端推送一次定时数据
+// export function post_data($big_data) {
+//   wx.showLoading({
+//     title: "正在结束上一个游戏",
+//     mask: true
+//   })
+//   var $this = this
+//   //判断数据长度大于理想状态 需要对数组进行切割 逐个提交数据
+//   let $len = 300
+//   console.log($big_data.attList.length, '结束游戏提交的数据量')
+//   if ($big_data.attList.length > $len) {
+//     let $count = Math.ceil($big_data.attList.length / $len)
+//
+//     let index = 0
+//     let inter = setInterval(() => {
+//       if (index < $count) {
+//         let $params = {
+//           game_record_id: game_store.getters.getGameRecordId(),
+//           //数据段长度大于65 多个提交
+//           line: $big_data.attList.slice(index * $len, (index + 1) * $len),
+//           line_med: $big_data.medList.slice(index * $len, (index + 1) * $len)
+//         }
+//         gameAddLine($params).then((res) => {
+//           let $data = res.data
+//           if ($data.code == 0) {
+//             console.log('ok', $params['line'])
+//           }
+//         })
+//       }
+//       index++
+//       if (index == $count) {
+//         clearInterval(inter)
+//         game_over()
+//       }
+//     }, 200)
+//     return $count * 500
+//   } else {
+//     let $params = {
+//       game_record_id: game_store.getters.getGameRecordId(),
+//       //数据段长度小于65 单个提交
+//       line: $big_data.attList,
+//       line_med: $big_data.medList
+//     }
+//
+//     if (!$params.line) {
+//       return false
+//     }
+//     gameAddLine($params).then((res) => {
+//       let $data = res.data
+//       if ($data.code == 0) {
+//       }
+//       setTimeout(() => {
+//         game_over()
+//       }, 800)
+//     })
+//     return 800
+//   }
+// }
+//
+// //  结束游戏
+// function game_over() {
+//   let $params = {
+//     game_record_id: game_store.getters.getGameRecordId(),
+//     type: game_store.getters.getMode(),
+//     play_time: game_store.getters.getPlayTime() - Math.abs(game_store.getters.getPlayedTime())
+//   }
+//   //
+//   gameEnd($params).then((res) => {
+//     let $data = res.data
+//     to_report()
+//   })
+// }
 
 
 function to_report() {