Pārlūkot izejas kodu

代码整理-用户模块

chaooo 1 gadu atpakaļ
vecāks
revīzija
943144da4c
38 mainītis faili ar 196 papildinājumiem un 266 dzēšanām
  1. 1 38
      project.private.config.json
  2. 8 8
      src/app.json
  3. 1 1
      src/components/index/cards.vue
  4. 0 87
      src/components/user_center/order_list.vue
  5. 0 0
      src/pages/games/records/index.vue
  6. 0 0
      src/pages/games/records/main.js
  7. 0 0
      src/pages/games/records/main.json
  8. 1 1
      src/pages/games/report/index_bak.vue
  9. 2 2
      src/pages/index/index.vue
  10. 0 0
      src/pages/user/edit/confirm_phone_finally/index.vue
  11. 0 0
      src/pages/user/edit/confirm_phone_finally/main.js
  12. 12 0
      src/pages/user/edit/confirm_phone_finally/main.json
  13. 1 1
      src/pages/user/edit/confirm_phone_first/index.vue
  14. 0 0
      src/pages/user/edit/confirm_phone_first/main.js
  15. 12 0
      src/pages/user/edit/confirm_phone_first/main.json
  16. 2 2
      src/pages/user/edit/index.vue
  17. 0 0
      src/pages/user/edit/main.js
  18. 11 0
      src/pages/user/edit/main.json
  19. 4 4
      src/pages/user/index.vue
  20. 0 0
      src/pages/user/main.js
  21. 14 0
      src/pages/user/main.json
  22. 106 0
      src/pages/user/orders/index.vue
  23. 0 0
      src/pages/user/orders/main.js
  24. 9 0
      src/pages/user/orders/main.json
  25. 0 0
      src/pages/user/vip/index.vue
  26. 0 0
      src/pages/user/vip/main.js
  27. 6 0
      src/pages/user/vip/main.json
  28. 0 0
      src/pages/user/vip_code/index.vue
  29. 0 0
      src/pages/user/vip_code/main.js
  30. 6 0
      src/pages/user/vip_code/main.json
  31. 0 12
      src/pages/user_center/edit/confirm_phone_finally/main.json
  32. 0 12
      src/pages/user_center/edit/confirm_phone_first/main.json
  33. 0 11
      src/pages/user_center/edit/main.json
  34. 0 14
      src/pages/user_center/main.json
  35. 0 52
      src/pages/user_center/orders/index.vue
  36. 0 9
      src/pages/user_center/orders/main.json
  37. 0 6
      src/pages/user_center/vip/main.json
  38. 0 6
      src/pages/user_center/vip_code/main.json

+ 1 - 38
project.private.config.json

@@ -11,44 +11,7 @@
       "list": []
     },
     "miniprogram": {
-      "list": [
-        {
-          "name": "pages/coupons/main",
-          "pathName": "pages/coupons/main",
-          "query": "",
-          "scene": 1001
-        },
-        {
-          "name": "pages/user_center/recharge/main",
-          "pathName": "pages/user_center/recharge/main",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/games/report/main",
-          "pathName": "pages/games/report/main",
-          "query": "id=17700",
-          "scene": null
-        },
-        {
-          "name": "pages/games/game_record/main",
-          "pathName": "pages/games/game_record/main",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/competition/main",
-          "pathName": "pages/competition/main",
-          "query": "activity_id=4",
-          "scene": null
-        },
-        {
-          "name": "pages/user_center/recharge/main",
-          "pathName": "pages/user_center/recharge/main",
-          "query": "",
-          "scene": null
-        }
-      ]
+      "list": []
     }
   }
 }

+ 8 - 8
src/app.json

@@ -6,15 +6,15 @@
     "pages/banner/joint/main",
     "pages/banner/competition/main",
     "pages/games/start/main",
+    "pages/games/records/main",
     "pages/games/report/main",
-    "pages/games/game_record/main",
-    "pages/user_center/main",
-    "pages/user_center/edit/main",
-    "pages/user_center/edit/confirm_phone_first/main",
-    "pages/user_center/edit/confirm_phone_finally/main",
-    "pages/user_center/orders/main",
-    "pages/user_center/vip/main",
-    "pages/user_center/vip_code/main",
+    "pages/user/main",
+    "pages/user/edit/main",
+    "pages/user/edit/confirm_phone_first/main",
+    "pages/user/edit/confirm_phone_finally/main",
+    "pages/user/orders/main",
+    "pages/user/vip/main",
+    "pages/user/vip_code/main",
     "pages/coupons/main"
   ],
   "window": {

+ 1 - 1
src/components/index/cards.vue

@@ -58,7 +58,7 @@ export default {
           </div>
         </van-col>
         <van-col span="5">
-          <view class="text" @click="pageTo('user_center')">
+          <view class="text" @click="pageTo('user')">
             <text class="cuIcon-people"></text>
             <text class="under_line">会员中心</text>
           </view>

+ 0 - 87
src/components/user_center/order_list.vue

@@ -1,87 +0,0 @@
-<template>
-  <div id="order_list_container">
-    <van-card
-      v-for="(order,index) in orders"
-      :key="index"
-    >
-      <!--      抬头部分-->
-      <div slot="title" class="flex justify-between">
-        <div>
-          <text class="text-gray">订单号&nbsp;</text>
-          <text class>{{ order.sn }}</text>
-        </div>
-        <div>
-          <text class="text-gray">{{ order.create_time }}</text>
-          <view class="text-right">
-            <text>交易成功</text>
-          </view>
-        </div>
-      </div>
-      <!--      图标部分-->
-      <div slot="thumb"
-           class="thumb_container"
-      >
-        <img src="https://img.shuimuai.com/web/icon_dingdan.png" class="order_icon" alt="">
-      </div>
-      <!--      消费产品-->
-      <div slot="desc">
-        <div>
-          <text class="text-gray">消费产品&nbsp;</text>
-          <text>{{ order.goods_name }} x 1</text>
-        </div>
-        <div class="padding-tb-lg flex justify-between align-center">
-          <div>
-            <text class="text-gray">付款方式&nbsp;</text>
-            <text class="text-bold">微信支付</text>
-          </div>
-          <div>
-            <text class="text-gray">实付款&nbsp;</text>
-            <text class="text-gray text-xxl">{{ order.price }}</text>
-          </div>
-
-        </div>
-      </div>
-
-      <!--      联系客服的按钮-->
-      <div slot="price">
-        <!--        <van-button type="default" open-type="contact">联系客服</van-button>-->
-        <button class="cu-btn" open-type="contact">联系客服</button>
-
-      </div>
-    </van-card>
-  </div>
-</template>
-
-<script>
-
-var $this
-export default {
-  name: "order_list",
-  props: ['status', 'orders'],
-  data() {
-    return {}
-  },
-  methods: {},
-  mounted() {
-  },
-  created() {
-    $this = this
-  }
-}
-</script>
-
-<style>
-.van-card__thumb {
-  width: 50px !important;
-}
-
-.order_icon {
-  width: 37px;
-  height: 37px;
-}
-
-.thumb_container {
-  width: 100%;
-  text-align: center;
-}
-</style>

+ 0 - 0
src/pages/games/game_record/index.vue → src/pages/games/records/index.vue


+ 0 - 0
src/pages/games/game_record/main.js → src/pages/games/records/main.js


+ 0 - 0
src/pages/games/game_record/main.json → src/pages/games/records/main.json


+ 1 - 1
src/pages/games/report/index_bak.vue

@@ -885,7 +885,7 @@ export default {
     },
     to_game_records() {
       mpvue.navigateTo({
-        url: "/pages/games/game_record/main",
+        url: "/pages/games/records/main",
       });
     },
     //  切换时间查看线 数据

+ 2 - 2
src/pages/index/index.vue

@@ -100,10 +100,10 @@ export default {
       <div class="content">
         <van-row>
           <van-col span="12">
-            <img src="https://img.shuimuai.com/web/index_btn_chengjijilu.png" @click="pageTo('games/game_record')">
+            <img src="https://img.shuimuai.com/web/index_btn_chengjijilu.png" @click="pageTo('games/records')">
           </van-col>
           <van-col span="12">
-            <img src="https://img.shuimuai.com/web/index_btn_gerenzhongxin.png" @click="pageTo('user_center')">
+            <img src="https://img.shuimuai.com/web/index_btn_gerenzhongxin.png" @click="pageTo('user')">
           </van-col>
         </van-row>
       </div>

+ 0 - 0
src/pages/user_center/edit/confirm_phone_finally/index.vue → src/pages/user/edit/confirm_phone_finally/index.vue


+ 0 - 0
src/pages/user_center/edit/confirm_phone_finally/main.js → src/pages/user/edit/confirm_phone_finally/main.js


+ 12 - 0
src/pages/user/edit/confirm_phone_finally/main.json

@@ -0,0 +1,12 @@
+{
+  "usingComponents": {
+    "van-popup": "/static/vant/popup/index",
+    "van-icon": "/static/vant/icon/index",
+    "van-cell": "/static/vant/cell/index",
+    "van-cell-group": "/static/vant/cell-group/index",
+    "van-field": "/static/vant/field/index",
+    "van-button": "/static/vant/button/index",
+    "van-toast": "/static/vant/toast/index",
+    "van-count-down": "/static/vant/count-down/index"
+  }
+}

+ 1 - 1
src/pages/user_center/edit/confirm_phone_first/index.vue → src/pages/user/edit/confirm_phone_first/index.vue

@@ -106,7 +106,7 @@ export default {
             message: $data.errmsg,
             onClose() {
               mpvue.navigateTo({
-                url: "/pages/user_center/edit/confirm_phone_finally/main"
+                url: "/pages/user/edit/confirm_phone_finally/main"
               })
             }
           })

+ 0 - 0
src/pages/user_center/edit/confirm_phone_first/main.js → src/pages/user/edit/confirm_phone_first/main.js


+ 12 - 0
src/pages/user/edit/confirm_phone_first/main.json

@@ -0,0 +1,12 @@
+{
+  "usingComponents": {
+    "van-popup": "/static/vant/popup/index",
+    "van-icon": "/static/vant/icon/index",
+    "van-cell": "/static/vant/cell/index",
+    "van-cell-group": "/static/vant/cell-group/index",
+    "van-field": "/static/vant/field/index",
+    "van-button": "/static/vant/button/index",
+    "van-toast": "/static/vant/toast/index",
+    "van-count-down":"/static/vant/count-down/index"
+  }
+}

+ 2 - 2
src/pages/user_center/edit/index.vue → src/pages/user/edit/index.vue

@@ -3,8 +3,8 @@
     <van-cell title="头像">
       <img :src="userinfo.portrait" alt="" class="avatar">
     </van-cell>
-    <van-cell title="手机号" :value="userinfo.phone" is-link url="/pages/user_center/edit/confirm_phone_first/main"/>
-    <van-cell title="会员码" is-link url="/pages/user_center/vip_code/main">
+    <van-cell title="手机号" :value="userinfo.phone" is-link url="/pages/user/edit/confirm_phone_first/main"/>
+    <van-cell title="会员码" is-link url="/pages/user/vip_code/main">
       <van-icon name="qr"/>
     </van-cell>
     <van-cell title="昵称" :value="userinfo.user_name"/>

+ 0 - 0
src/pages/user_center/edit/main.js → src/pages/user/edit/main.js


+ 11 - 0
src/pages/user/edit/main.json

@@ -0,0 +1,11 @@
+{
+  "usingComponents": {
+    "van-popup": "/static/vant/popup/index",
+    "van-icon": "/static/vant/icon/index",
+    "van-cell": "/static/vant/cell/index",
+    "van-picker": "/static/vant/picker/index",
+    "van-datetime-picker": "/static/vant/datetime-picker/index",
+    "van-toast": "/static/vant/toast/index",
+    "van-cell-group": "/static/vant/cell-group/index"
+  }
+}

+ 4 - 4
src/pages/user_center/index.vue → src/pages/user/index.vue

@@ -80,7 +80,7 @@
       <van-cell
         title="我的订单"
         is-link
-        url="/pages/user_center/orders/main"
+        url="/pages/user/orders/main"
       >
         <img
           src="https://img.shuimuai.com/web/icon/icon_dingdan.png"
@@ -140,13 +140,13 @@ export default {
     },
     to_edit() {
       mpvue.navigateTo({
-        url: "/pages/user_center/edit/main",
+        url: "/pages/user/edit/main",
       });
     },
     //跳转vip权益
     to_vip() {
       mpvue.navigateTo({
-        url: "/pages/user_center/vip/main",
+        url: "/pages/user/vip/main",
       });
     },
     //打开扫一扫
@@ -159,7 +159,7 @@ export default {
     //跳转会员码
     to_vip_code() {
       mpvue.navigateTo({
-        url: "/pages/user_center/vip_code/main",
+        url: "/pages/user/vip_code/main",
       });
     },
     to_coupons() {

+ 0 - 0
src/pages/user_center/main.js → src/pages/user/main.js


+ 14 - 0
src/pages/user/main.json

@@ -0,0 +1,14 @@
+{
+  "usingComponents": {
+    "van-row": "/static/vant/row/index",
+    "van-col": "/static/vant/col/index",
+    "van-popup": "/static/vant/popup/index",
+    "van-cell": "/static/vant/cell/index",
+    "van-cell-group": "/static/vant/cell-group/index",
+    "van-icon": "/static/vant/icon/index",
+    "van-toast": "/static/vant/toast/index",
+    "van-overlay": "/static/vant/overlay/index",
+    "van-button": "/static/vant/button/index",
+    "van-switch": "/static/vant/switch/index"
+  }
+}

+ 106 - 0
src/pages/user/orders/index.vue

@@ -0,0 +1,106 @@
+<template>
+  <div class="uc_orders_container">
+    <div v-if="orders && orders.length > 0" id="order_list_container">
+      <van-card v-for="(order,index) in orders" :key="index">
+        <!--      抬头部分-->
+        <div slot="title" class="flex justify-between">
+          <div>
+            <text class="text-gray">订单号&nbsp;</text>
+            <text class>{{ order.sn }}</text>
+          </div>
+          <div>
+            <text class="text-gray">{{ order.create_time }}</text>
+            <view class="text-right">
+              <text>交易成功</text>
+            </view>
+          </div>
+        </div>
+        <!--      图标部分-->
+        <div slot="thumb"
+             class="thumb_container"
+        >
+          <img src="https://img.shuimuai.com/web/icon_dingdan.png" class="order_icon" alt="">
+        </div>
+        <!--      消费产品-->
+        <div slot="desc">
+          <div>
+            <text class="text-gray">消费产品&nbsp;</text>
+            <text>{{ order.goods_name }} x 1</text>
+          </div>
+          <div class="padding-tb-lg flex justify-between align-center">
+            <div>
+              <text class="text-gray">付款方式&nbsp;</text>
+              <text class="text-bold">微信支付</text>
+            </div>
+            <div>
+              <text class="text-gray">实付款&nbsp;</text>
+              <text class="text-gray text-xxl">{{ order.price }}</text>
+            </div>
+
+          </div>
+        </div>
+
+        <!--      联系客服的按钮-->
+        <div slot="price">
+          <!--        <van-button type="default" open-type="contact">联系客服</van-button>-->
+          <button class="cu-btn" open-type="contact">联系客服</button>
+
+        </div>
+      </van-card>
+    </div>
+    <van-empty description="暂无数据" v-else />
+  </div>
+</template>
+
+<script>
+import {orderList} from "@/requests/orders";
+import {formatTime} from "@/utils/index";
+
+let $this;
+export default {
+  name: "uc_orders_container",
+  data() {
+    return {
+      orders: [],
+    }
+  },
+  methods: {
+    //获取订单列表
+    get_order_list() {
+      orderList().then((res) => {
+        let $data = res.data
+        $this.orders = $data.data
+        $this.orders.forEach(($val, $index) => {
+          $this.orders[$index]['create_time'] = formatTime($val['create_time'] * 1000)
+        })
+        console.log($this.orders)
+      })
+    }
+  }
+  ,
+  mounted() {
+    this.get_order_list()
+  },
+  created() {
+    $this = this;
+  },
+  onLoad() {
+  }
+}
+</script>
+
+<style scoped>
+.van-card__thumb {
+  width: 50px !important;
+}
+
+.order_icon {
+  width: 37px;
+  height: 37px;
+}
+
+.thumb_container {
+  width: 100%;
+  text-align: center;
+}
+</style>

+ 0 - 0
src/pages/user_center/orders/main.js → src/pages/user/orders/main.js


+ 9 - 0
src/pages/user/orders/main.json

@@ -0,0 +1,9 @@
+{
+  "usingComponents": {
+    "van-tab": "/static/vant/tab/index",
+    "van-tabs": "/static/vant/tabs/index",
+    "van-card": "/static/vant/card/index",
+    "van-empty": "/static/vant/empty/index",
+    "van-button": "/static/vant/button/index"
+  }
+}

+ 0 - 0
src/pages/user_center/vip/index.vue → src/pages/user/vip/index.vue


+ 0 - 0
src/pages/user_center/vip/main.js → src/pages/user/vip/main.js


+ 6 - 0
src/pages/user/vip/main.json

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

+ 0 - 0
src/pages/user_center/vip_code/index.vue → src/pages/user/vip_code/index.vue


+ 0 - 0
src/pages/user_center/vip_code/main.js → src/pages/user/vip_code/main.js


+ 6 - 0
src/pages/user/vip_code/main.json

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

+ 0 - 12
src/pages/user_center/edit/confirm_phone_finally/main.json

@@ -1,12 +0,0 @@
-{
-  "usingComponents": {
-    "van-popup": "../../../../static/vant/popup/index",
-    "van-icon": "../../../../static/vant/icon/index",
-    "van-cell": "../../../../static/vant/cell/index",
-    "van-cell-group": "../../../../static/vant/cell-group/index",
-    "van-field": "../../../../static/vant/field/index",
-    "van-button": "../../../../static/vant/button/index",
-    "van-toast": "../../../../static/vant/toast/index",
-    "van-count-down": "../../../../static/vant/count-down/index"
-  }
-}

+ 0 - 12
src/pages/user_center/edit/confirm_phone_first/main.json

@@ -1,12 +0,0 @@
-{
-  "usingComponents": {
-    "van-popup": "../../../../static/vant/popup/index",
-    "van-icon": "../../../../static/vant/icon/index",
-    "van-cell": "../../../../static/vant/cell/index",
-    "van-cell-group": "../../../../static/vant/cell-group/index",
-    "van-field": "../../../../static/vant/field/index",
-    "van-button": "../../../../static/vant/button/index",
-    "van-toast": "../../../../static/vant/toast/index",
-    "van-count-down":"../../../../static/vant/count-down/index"
-  }
-}

+ 0 - 11
src/pages/user_center/edit/main.json

@@ -1,11 +0,0 @@
-{
-  "usingComponents": {
-    "van-popup": "../../../static/vant/popup/index",
-    "van-icon": "../../../static/vant/icon/index",
-    "van-cell": "../../../static/vant/cell/index",
-    "van-picker": "../../../static/vant/picker/index",
-    "van-datetime-picker": "../../../static/vant/datetime-picker/index",
-    "van-toast": "../../../static/vant/toast/index",
-    "van-cell-group": "../../../static/vant/cell-group/index"
-  }
-}

+ 0 - 14
src/pages/user_center/main.json

@@ -1,14 +0,0 @@
-{
-  "usingComponents": {
-    "van-row": "../../static/vant/row/index",
-    "van-col": "../../static/vant/col/index",
-    "van-popup": "../../static/vant/popup/index",
-    "van-cell": "../../static/vant/cell/index",
-    "van-cell-group": "../../static/vant/cell-group/index",
-    "van-icon": "../../static/vant/icon/index",
-    "van-toast": "../../static/vant/toast/index",
-    "van-overlay": "../../static/vant/overlay/index",
-    "van-button": "../../static/vant/button/index",
-    "van-switch": "../../static/vant/switch/index"
-  }
-}

+ 0 - 52
src/pages/user_center/orders/index.vue

@@ -1,52 +0,0 @@
-<template>
-  <div class="uc_orders_container">
-    <order_list :orders="orders" v-if="orders.length > 0"></order_list>
-    <van-empty description="暂无数据" v-else />
-  </div>
-</template>
-
-<script>
-import order_list from "@/components/user_center/order_list";
-
-import {orderList} from "@/requests/orders";
-import {formatTime} from "@/utils/index";
-
-var $this
-export default {
-  name: "uc_orders_container",
-  components: {
-    order_list
-  },
-  data() {
-    return {
-      orders: [
-      ],
-    }
-  },
-  methods: {
-    //获取订单列表
-    get_order_list() {
-      orderList().then((res) => {
-        let $data = res.data
-        $this.orders = $data.data
-        $this.orders.forEach(($val, $index) => {
-          $this.orders[$index]['create_time'] = formatTime($val['create_time'] * 1000)
-        })
-        console.log($this.orders)
-      })
-    }
-  }
-  ,
-  mounted() {
-    this.get_order_list()
-  },
-  created() {
-    $this = this;
-  },
-  onLoad() {
-  }
-}
-</script>
-
-<style scoped>
-</style>

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

@@ -1,9 +0,0 @@
-{
-  "usingComponents": {
-    "van-tab": "../../../static/vant/tab/index",
-    "van-tabs": "../../../static/vant/tabs/index",
-    "van-card": "../../../static/vant/card/index",
-    "van-empty": "../../../static/vant/empty/index",
-    "van-button": "../../../static/vant/button/index"
-  }
-}

+ 0 - 6
src/pages/user_center/vip/main.json

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

+ 0 - 6
src/pages/user_center/vip_code/main.json

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