Эх сурвалжийг харах

1.我的社区-统计内容调整
2.余额明细分页bug处理

DaMowang 2 жил өмнө
parent
commit
25da504ab7

+ 2 - 8
src/pages.json

@@ -177,12 +177,6 @@
 				"navigationBarTitleText": "提现"
 			}
 		},
-		{
-			"path": "pages/my-tea-list/index",
-			"style": {
-				"navigationBarTitleText": "我的茶友"
-			}
-		},
 		{
 			"path": "pages/tea-list/index",
 			"style": {
@@ -256,9 +250,9 @@
 					}
 				},
 				{
-					"path": "orderingfood/group",
+					"path": "orderingfood/friend",
 					"style": {
-						"navigationBarTitleText": "我的团队"
+						"navigationBarTitleText": "我的社区"
 					}
 				},
 				{

+ 0 - 331
src/pages/my-tea-list/index.vue

@@ -1,331 +0,0 @@
-<template>
-    <view class="container">
-        <!-- 顶部 -->
-        <view class="head">
-            <view class="head_info flex_r flex_ac flex_jb">
-                <view class="flex_grow flex_r flex_ac">
-                    <img class="head_img" :src="higherInfo.head_pic" />
-                    <view class="flex_c flex_grow">
-                        <view class="userInfo flex_r flex_ac">
-                            <view class="user_name">{{ higherInfo.nickname }}</view>
-                            <view class="level flex_r flex_ac flex_jc">缘起</view>
-                        </view>
-                        <view class="flex_r flex_ac mar_t10">
-                            <view class="account din">{{ higherInfo.mobile || "" }}</view>
-                            <view class="copyBalance" @tap="copyAccount(higherInfo.mobile)">复制</view>
-                        </view>
-                    </view>
-                </view>
-                <view class="head_option flex_r flex_ac">
-                    <image class="option_phone" src="/static/img/dianhua.png" mode="" @tap="dial(higherInfo.mobile)"></image>
-                </view>
-            </view>
-            <view class="head_time flex_r flex_ac">注册时间:{{ $day(higherInfo.reg_time * 1000).format('YYYY-MM-DD HH:mm:ss') }}</view>
-        </view>
-        <!-- 顶部-end -->
-        <!-- 茶友数量 -->
-        <view class="tea_con mar_t30">
-            <view class="tea_total flex_r flex_ac flex_jc">
-                <view class="total_con flex_c flex_ac flex_jc">
-                    <view class="total_num dinB">{{ myQuanTeaFriendNum || 0 }}<text>人</text></view>
-                    <view class="total_text">社区总数</view>
-                </view>
-                <div class="total_info dinB">
-                    本日新增:{{ myChayoyTotal.day }}<br />
-                    本周新增:{{ myChayoyTotal.week }}<br />
-                    本月新增:{{ myChayoyTotal.month }}<br />
-                </div>
-            </view>
-            <view class="tea_info flex_r flex_ac">
-                <view class="info_list flex_c flex_ac flex_jc borRight" @tap="getToTeaList">
-                    <view class="list_num dinB">{{ myTeaFriendNum || 0 }}<text>人</text></view>
-                    <view class="list_text">推广用户</view>
-                    <div class="untotal_info dinB">
-                        <span class="ti_l">今日新增:</span>
-                        <span class="ti_r">{{ myChayoyDirect.day }}</span>
-                        <span class="ti_l">本周新增:</span>
-                        <span class="ti_r">{{ myChayoyDirect.week }}</span>
-                        <span class="ti_l">本月新增:</span>
-                        <span class="ti_r">{{ myChayoyDirect.month }}</span>
-                    </div>
-                </view>
-                <view class="info_list flex_c flex_ac flex_jc">
-                    <view class="list_num dinB">{{ myZhuanTeaFriendNum || 0 }}<text>人</text></view>
-                    <view class="list_text">转介绍用户</view>
-                    <div class="untotal_info dinB">
-                        <span class="ti_l">今日新增:</span>
-                        <span class="ti_r">{{ myChayoyIndirect.day }}</span>
-                        <span class="ti_l">本周新增:</span>
-                        <span class="ti_r">{{ myChayoyIndirect.week }}</span>
-                        <span class="ti_l">本月新增:</span>
-                        <span class="ti_r">{{ myChayoyIndirect.month }}</span>
-                    </div>
-                </view>
-            </view>
-        </view>
-        <!-- 茶友数量-end -->
-    </view>
-</template>
-<script>
-let app = getApp();
-var appEv = app.$vm.$options;
-import uniCopy from "@/utils/copy";
-import { post } from "@/request/api.js";
-export default {
-    components: {},
-    data() {
-        return {
-            higherInfo: "",
-            myTeaFriendNum: "",
-            myZhuanTeaFriendNum: "",
-            myQuanTeaFriendNum: "",
-            wxcode: "",
-            mobile: "",
-
-            myChayoyTotal: {},
-            myChayoyDirect: {},
-            myChayoyIndirect: {},
-        };
-    },
-    onLoad: function() {
-        this.loadData();
-
-        this.getmyChayoyTotal()
-        this.getmyChayoyDirect()
-        this.getmyChayoyIndirect()
-    },
-    methods: {
-        loadData() {
-            post("v1/my/chayou").then((res) => {
-                if (res.code === 0) {
-                    this.higherInfo = res.data.data.superior;
-                    this.myTeaFriendNum = res.data.data.below;
-                    this.myZhuanTeaFriendNum = res.data.data.lower_level;
-                    this.myQuanTeaFriendNum = res.data.data.below + res.data.data.lower_level;
-                }
-            });
-        },
-
-        getmyChayoyTotal() {
-            post("v1/my/myChayoyTotal").then((res) => {
-                if (res.code === 0) {
-                    this.myChayoyTotal = res.data.data;
-                }
-            });
-        },
-        getmyChayoyDirect() {
-            post("v1/my/myChayoyDirect").then((res) => {
-                if (res.code === 0) {
-                    this.myChayoyDirect = res.data.data;
-                }
-            });
-        },
-        getmyChayoyIndirect() {
-            post("v1/my/myChayoyIndirect").then((res) => {
-                if (res.code === 0) {
-                    this.myChayoyIndirect = res.data.data;
-                }
-            });
-        },
-
-        // 复制账号
-        copyAccount: function(e) {
-            uniCopy({
-                content: e,
-                success: (res) => {},
-                error: (e) => {},
-            });
-        },
-
-        // 跳转到我的茶友列表
-        getToTeaList: function() {
-            uni.navigateTo({
-                url: "/pages/tea-list/index",
-            });
-        },
-        // 拨打电话
-        dial: function(e) {
-            let that = this;
-            if (!e) {
-                appEv.errTips("用户暂未设置电话");
-                return false;
-            }
-            uni.makePhoneCall({
-                phoneNumber: e, //仅为示例
-            });
-        },
-    },
-};
-</script>
-<style lang="scss" scoped>
-page {
-    background: #f5f5f5;
-}
-
-// 页面配置
-.container {
-    padding: 20rpx 30rpx;
-    box-sizing: border-box;
-}
-
-// 页面配置-end
-
-// 顶部
-.account {
-    font-size: 24rpx;
-    color: #7f7f7f;
-}
-
-.option_phone {
-    width: 36rpx;
-    height: 36rpx;
-    margin-left: 30rpx;
-}
-
-.user_name {
-    font-size: 30rpx;
-    color: #363638;
-    margin-right: 12rpx;
-}
-
-.head {
-    width: 100%;
-    overflow: hidden;
-    background: #fff;
-    border-radius: 5px;
-}
-
-.head_img {
-    width: 90rpx;
-    height: 90rpx;
-    margin-right: 30rpx;
-    border-radius: 50%;
-}
-
-.copyBalance {
-    padding: 0 10rpx;
-    background: #1cbe8c;
-    color: #fff;
-    font-size: 22rpx;
-    margin-left: 12rpx;
-}
-
-.level {
-    width: 74rpx;
-    height: 26rpx;
-    background: #1cbe8c;
-    color: #fff;
-    font-size: 20rpx;
-    line-height: 1;
-}
-
-.head_time {
-    width: 100%;
-    height: 60rpx;
-    padding: 0 24rpx;
-    box-sizing: border-box;
-    font-size: 22rpx;
-    color: #606060;
-}
-
-.head_info {
-    width: 100%;
-    overflow: hidden;
-    padding: 40rpx 24rpx 20rpx;
-    box-sizing: border-box;
-
-}
-
-// 顶部-end
-
-// 茶友数量
-.list_num {
-    font-size: 36rpx;
-    color: #1cbe8c;
-}
-
-.total_num {
-    font-size: 40rpx;
-    color: #232323;
-}
-
-.list_text {
-    font-size: 26rpx;
-    color: #606060;
-}
-
-.list_num text {
-    font-size: 26rpx;
-    color: #1cbe8c;
-}
-
-.total_num text {
-    font-size: 26rpx;
-    color: #232323;
-}
-
-.borRight {
-    border-right: 3rpx solid rgba(0, 0, 0, 0.12);
-}
-
-.info_list {
-    height: 100%;
-    width: 50%;
-    box-sizing: border-box;
-}
-
-.total_text {
-    font-size: 26rpx;
-    color: #606060;
-    margin-top: 12rpx;
-}
-
-.total_info {
-    font-size: 22rpx;
-    color: #333;
-    margin-left: 32rpx;
-}
-
-.untotal_info {
-    font-size: 22rpx;
-    color: #333;
-    margin-top: 20rpx;
-    .ti_l,.ti_r{
-        display: inline-block;
-        width: 56%;
-        text-align: right;
-    }
-    .ti_r{
-        width: 44%;
-        text-align: left;
-    }
-}
-
-.tea_con {
-    width: 100%;
-    overflow: hidden;
-    border-radius: 8rpx;
-    background: #fff;
-}
-
-.tea_info {
-    width: 100%;
-    padding: 26rpx 0;
-    box-sizing: border-box;
-}
-
-.tea_total {
-    width: 100%;
-    height: 260rpx;
-    border-bottom: 3rpx solid rgba(0, 0, 0, 0.12);
-}
-
-.total_con {
-    width: 164rpx;
-    height: 164rpx;
-    border: 6rpx solid #1cbe8c;
-    border-radius: 50%;
-}
-
-// 茶友数量-end
-</style>

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

@@ -82,9 +82,9 @@
                         <image class="fun_img" src="/static/my/11.png"></image>
                         <view class="fun_text">激活升级</view>
                     </navigator>
-                    <navigator v-if="localInfo.level_id>1" class="fun_list flex_c flex_ac" url="/pagesB/orderingfood/group" hover-class="none">
+                    <navigator v-if="localInfo.level_id>1" class="fun_list flex_c flex_ac" url="/pagesB/orderingfood/friend" hover-class="none">
                         <image class="fun_img" src="/static/my/12.png"></image>
-                        <view class="fun_text">我的用户</view>
+                        <view class="fun_text">社区</view>
                     </navigator>
                     <navigator class="fun_list flex_c flex_ac" url="/pages/account/giveAsPresent" hover-class="none">
                         <image class="fun_img" src="/static/my/13.png"></image>

+ 1 - 1
src/pagesB/my/shuZhiWallet.vue

@@ -89,7 +89,7 @@ import { post } from "@/request/api.js";
     onShow() {},
     mounted() {},
     onReachBottom() {
-        if (this.Query.page < this.last_page) this.getlists();
+        if (this.Query.page < this.last_page) this.getList();
     },
   }
 </script>

+ 2 - 2
src/pagesB/orderingfood/activationcode.vue

@@ -54,7 +54,7 @@ export default {
                 { n: "合伙人", i: 3, k: "helper_num" },
                 { n: "联合创始人", i: 4, k: "vice_num" },
             ],
-            level_id: 1,
+            level_id: 2,
         }
     },
     methods: {
@@ -68,7 +68,7 @@ export default {
                 }
             })
             post("local/waitActivation").then(res => {
-                if (res.code == 0) {
+                if (res.code == 0 && res.data.length) {
                     this.codes = []
                     for (const i in res.data) {
                         this.codes.push(res.data[i])

+ 322 - 0
src/pagesB/orderingfood/friend.vue

@@ -0,0 +1,322 @@
+<template>
+    <div class="friend_local">
+        <div class="top_parent">
+            <div class="btnBox">
+                <div class="t1 flex_r flex_jb flex_ac">
+                    <span>缘起:{{ higherInfo.nickname }}</span>
+                    <div class="btn" @click="goto('/pagesB/orderingfood/activationcode')">
+                        生成激活码
+                    </div>
+                </div>
+                <div class="t2">
+                    <span>电话:{{ higherInfo.mobile }}</span>
+                    <span class="copyBalance" @tap="copyAccount(higherInfo.mobile)">复制</span>
+                </div>
+            </div>
+        </div>
+        <div class="top_table_box flex_r flex_jb flex_ac">
+            <div class="total_Box">
+                <div class="total_con flex_c flex_ac flex_jc">
+                    <div class="total_text">
+                        <span class="total_num dinB">{{ myChayoyTotal.headcount || 0 }}</span>
+                        <span>人</span>
+                    </div>
+                    <div class="total_text">社区总数</div>
+                </div>
+                <div class="total_con2">
+                    <div class="total_text">推广用户:{{myChayoyTotal.direct || 0}}</div>
+                    <div class="total_text">转介绍用户:{{myChayoyTotal.indirect || 0}}</div>
+                </div>
+            </div>
+            <div class="top_table flex_r flex_wrap">
+                <div class="tb_item tb_th">新增用户</div>
+                <div class="tb_item tb_th">今日</div>
+                <div class="tb_item tb_th">本周</div>
+                <div class="tb_item tb_th">本月</div>
+                <div class="tb_item">推广用户</div>
+                <div class="tb_item">{{ myChayoyDirect.day }}</div>
+                <div class="tb_item">{{ myChayoyDirect.week }}</div>
+                <div class="tb_item">{{ myChayoyDirect.month }}</div>
+                <div class="tb_item">转介绍用户</div>
+                <div class="tb_item">{{ myChayoyIndirect.day }}</div>
+                <div class="tb_item">{{ myChayoyIndirect.week }}</div>
+                <div class="tb_item">{{ myChayoyIndirect.month }}</div>
+                <div class="tb_item">总计</div>
+                <div class="tb_item">{{ myChayoyTotal.day }}</div>
+                <div class="tb_item">{{ myChayoyTotal.week }}</div>
+                <div class="tb_item">{{ myChayoyTotal.month }}</div>
+            </div>
+        </div>
+        <div class="tabs_box">
+            <div class="tabs">
+                <div class="tab" @click="getTeamList(i.level)" :class="{ active: type == i.level }" v-for="i in classID" :key="i.level">
+                    {{ i.name }}
+                </div>
+            </div>
+        </div>
+        <div class="list">
+            <div class="user_info flex_r flex_jb" v-for="(i, s) in users" :key="s">
+                <img class="userimg" :src="i.head_pic" />
+                <div class="u_info">
+                    <div class="p1">{{ i.nickname || classID[type] }}</div>
+                    <div class="p1">手机号:{{ i.mobile }}</div>
+                    <div class="p3">加入时间:{{ $day(i.reg_time * 1000).format("YYYY-MM-DD HH:mm:ss") }}</div>
+                </div>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+import uniCopy from "@/utils/copy";
+import { post } from "@/request/api.js";
+export default {
+    name: "friend_local",
+    props: {},
+    components: {},
+    data() {
+        return {
+            higherInfo: {},
+            myChayoyTotal: {},
+            myChayoyDirect: {},
+            myChayoyIndirect: {},
+            codeNum: 0,
+            classID: {},
+            type: "",
+            users: [],
+        };
+    },
+    methods: {
+        getTableData() {
+            post("v1/my/chayou").then((res) => {
+                if (res.code === 0) {
+                    this.higherInfo = res.data.data;
+                }
+            });
+            post("v1/my/myChayoyTotal").then((res) => {
+                if (res.code === 0) {
+                    this.myChayoyTotal = res.data.data;
+                }
+            });
+            post("v1/my/myChayoyDirect").then((res) => {
+                if (res.code === 0) {
+                    this.myChayoyDirect = res.data.data;
+                }
+            });
+            post("v1/my/myChayoyIndirect").then((res) => {
+                if (res.code === 0) {
+                    this.myChayoyIndirect = res.data.data;
+                }
+            });
+        },
+        getPurview() {
+            post("local/waitActivation").then((res) => {
+                if (res.code == 0) {
+                    for (const i in res.data) {
+                        this.codeNum += res.data[i].codes?.length;
+                    }
+                }
+            });
+        },
+        getTeamNum() {
+            post("local/getTeamNum").then((res) => {
+                if (res.code == 0) {
+                    this.classID = res.data.tab;
+                    this.getTeamList(this.classID[0].level);
+                }
+            });
+        },
+        getTeamList(level) {
+            this.type = level;
+            post("v1/my/mychayou", { level, page: 1, rows: 1000 }).then(
+                (res) => {
+                    if (res.code == 0) {
+                        this.users = res.data[0].data.data;
+                    }
+                }
+            );
+        },
+        // 复制账号
+        copyAccount(e) {
+            uniCopy({
+                content: e,
+                success: (res) => {},
+                error: (e) => {},
+            });
+        },
+    },
+    onLoad(da) {
+        this.getTableData();
+        // this.getPurview()
+        this.getTeamNum();
+    },
+    onShow() {},
+    mounted() {},
+};
+</script>
+<style scoped lang='scss'>
+// .friend_local {
+// padding: 28rpx 32rpx;
+// }
+
+.top_parent {
+    color: #fff;
+    padding: 60rpx 32rpx 86rpx;
+    background-color: #18bb88;
+    font-size: 30rpx;
+
+    .t1 {
+        margin-bottom: 12rpx;
+    }
+
+    .btn {
+        color: #fff;
+        font-size: 24rpx;
+        padding: 3rpx 16rpx 5rpx;
+        border-radius: 6rpx;
+        background-color: #d3aa79;
+    }
+
+    .copyBalance {
+        color: #fff;
+        background: #d3aa79;
+        border-radius: 6rpx;
+        margin-left: 20rpx;
+        font-size: 22rpx;
+        padding: 2rpx 18rpx;
+    }
+
+    .t2 {
+        span {
+            vertical-align: middle;
+        }
+    }
+}
+
+.top_table_box {
+    background-color: #fff;
+    padding: 23rpx 28rpx;
+    margin-bottom: 26rpx;
+    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03),
+        0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);
+    border-radius: 20rpx;
+}
+
+.top_table_box {
+    margin-top: -20rpx;
+    margin-bottom: 60rpx;
+
+    .total_Box {
+        width: 180rpx;
+    }
+
+    .total_con {
+        width: 138rpx;
+        height: 128rpx;
+        margin: 0 auto;
+        border: 6rpx solid #1cbe8c;
+        border-radius: 66rpx;
+        font-size: 22rpx;
+
+        .total_text span {
+            vertical-align: middle;
+        }
+
+        .total_num {
+            font-size: 28rpx;
+            margin-right: 4rpx;
+        }
+    }
+
+    .total_con2 {
+        font-size: 20rpx;
+        color: #555;
+
+        .total_text {
+            margin-top: 6rpx;
+        }
+    }
+}
+
+.top_table {
+    width: calc(100% - 200rpx);
+    border: 1px solid #e5e5e5;
+    border-left: none;
+    border-top: none;
+
+    .tb_item {
+        width: 23.33%;
+        color: #555;
+        text-align: center;
+        border: 1px solid #e5e5e5;
+        font-size: 20rpx;
+        border-right: none;
+        border-bottom: none;
+        padding: 8rpx 0;
+
+        &:nth-child(4n + 1) {
+            width: 30%;
+        }
+    }
+
+    .tb_th {
+        color: #333;
+    }
+}
+
+.tabs_box {
+    width: 100%;
+    overflow-x: auto;
+    padding: 0 32rpx;
+}
+
+.tabs {
+    // color: #666;
+    white-space: nowrap;
+
+    .tab {
+        display: inline-block;
+        font-size: 30rpx;
+        margin-right: 36rpx;
+        height: 60rpx;
+        line-height: 60rpx;
+
+        &:last-child {
+            margin-right: 0;
+        }
+    }
+
+    .active {
+        color: #18bb88;
+        border-bottom: 4rpx solid rgba($color: #18bb88, $alpha: 0.6);
+    }
+}
+
+.user_info {
+    padding: 25rpx 28rpx;
+    border-bottom: 1px solid #e5e5e5;
+    // margin-top: 28rpx;
+
+    .userimg {
+        width: 130rpx;
+        height: 130rpx;
+        border-radius: 10rpx;
+    }
+
+    .u_info {
+        width: calc(100% - 130rpx);
+        padding: 4rpx 0 4rpx 30rpx;
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+
+        .p1 {
+            font-size: 28rpx;
+        }
+
+        .p3 {
+            font-size: 24rpx;
+            color: #999;
+        }
+    }
+}
+</style>

+ 0 - 138
src/pagesB/orderingfood/group.vue

@@ -1,138 +0,0 @@
-<template>
-    <div class="l_group">
-        <div class="headbox">
-            <div class="r_btn">
-                <div class="btn" @click="goto('/pagesB/orderingfood/activationcode')">生成激活码</div>
-            </div>
-            <div class="tit">团队人数</div>
-            <div class="usernum dinB">{{ num.team }}</div>
-            <div class="tabs flex_r flex_jse">
-                <div class="tab" @click="getTeamList(s)" :class="{active:type==s}" v-for="(i,s) in num.tab" :key="s">{{ i }}</div>
-            </div>
-        </div>
-        <div class="list">
-            <div class="user_info flex_r flex_jb" v-for="(i,s) in users" :key="s">
-                <img class="userimg" :src="i.head_pic" />
-                <div class="u_info">
-                    <div class="p1">{{ i.nickname || num.tab[type] }}</div>
-                    <div class="p1">手机号:{{ i.mobile }}</div>
-                    <div class="p3">加入时间:{{ i.create_time }}</div>
-                </div>
-            </div>
-        </div>
-    </div>
-</template>
-<script>
-import { post } from "@/request/api.js";
-export default {
-    name: "l_group",
-    props: {},
-    components: {},
-    data() {
-        return {
-            num: {},
-            type: '',
-            users: []
-        };
-    },
-    methods: {
-        getTeamNum() {
-            post("local/getTeamNum").then(res => {
-                if (res.code == 0) {
-                    this.num = res.data
-                    for (const key in res.data.tab) {
-                        this.getTeamList(key);
-                        break;
-                    }
-                }
-            })
-        },
-        getTeamList(type) {
-            this.type = type;
-            post("local/getTeamList",{type}).then(res => {
-                if (res.code == 0) {
-                    this.users = res.data
-                }
-            })
-        },
-    },
-    onLoad(da) {
-        this.getTeamNum();
-    },
-    onShow() {},
-    mounted() {},
-};
-</script>
-<style scoped lang='scss'>
-.headbox {
-    background-color: #18bb88;
-    height: 400rpx;
-    padding: 30rpx 36rpx;
-    position: relative;
-
-    .r_btn {
-        text-align: right;
-        margin-bottom: 20rpx;
-    }
-
-    .btn {
-        display: inline-block;
-        color: #fff;
-        font-size: 28rpx;
-        padding: 6rpx 32rpx;
-        border-radius: 8rpx;
-        background-color: #d3aa79;
-    }
-
-    .tit {
-        color: #fff;
-        font-size: 40rpx;
-    }
-
-    .usernum {
-        color: #fff;
-        font-size: 56rpx;
-        margin-top: 30rpx;
-        text-align: center;
-    }
-}
-.tabs{
-    width: 100%;
-    position: absolute;
-    left: 0;
-    bottom: 0;
-    .tab{
-        padding: 18rpx 60rpx;
-        background-color: #d3aa79;
-        border-radius: 16rpx 16rpx 0 0;
-        color: #fff;
-        &.active{
-            background-color: #fff;
-            color: #000;
-        }
-    }
-}
-.user_info{
-    padding: 38rpx 32rpx;
-    border-bottom: 1px solid #e5e5e5;
-    .userimg{
-        width: 160rpx;
-        height: 160rpx;
-        border-radius: 10rpx;
-    }
-    .u_info{
-        width: calc(100% - 160rpx);
-        padding: 4rpx 0 4rpx 30rpx;
-        display: flex;
-        flex-direction: column;
-        justify-content: space-between;
-        .p1{
-            font-size: 36rpx;
-        }
-        .p3{
-            font-size: 28rpx;
-            color: #999;
-        }
-    }
-}
-</style>

+ 2 - 2
src/pagesB/specialregion/index.vue

@@ -57,8 +57,8 @@
                         <image class="fun_img" src="/static/my/dizhi.png"></image>
                         <view class="fun_text">地址管理</view>
                     </navigator>
-                    <navigator class="fun_list flex_c flex_ac" url="/pages/my-tea-list/index" hover-class="none">
-                        <image class="fun_img" src="/static/my/shequ.png"></image>
+                    <navigator class="fun_list flex_c flex_ac" url="/pagesB/orderingfood/friend" hover-class="none">
+                        <image class="fun_img" src="/static/my/12.png"></image>
                         <view class="fun_text">社区</view>
                     </navigator>
                 </view>

BIN
src/static/my/friend.png


BIN
src/static/my/regional.png


+ 0 - 26
src/utils/getImageThemeColor.js

@@ -15,32 +15,6 @@ export function getImageThemeColor(path, canvasId, callback) {
             ctx.draw(true, () => {
                 uni.canvasGetImageData({
                     canvasId: canvasId, x: 0, y: 0, width: imgWidth, height: imgHeight, success(res) {
-                        // let data = res.data; let arr = []; let r = 1, g = 1, b = 1;
-                        // // 取所有像素的平均值 
-                        // for (let row = 0; row < imgHeight; row++) {
-                        //     for (let col = 0; col < imgWidth; col++) {
-                        //         if (row == 0) {
-                        //             r += data[imgWidth * row + col];
-                        //             g += data[imgWidth * row + col + 1];
-                        //             b += data[imgWidth * row + col + 2];
-                        //             arr.push([r, g, b]);
-                        //         } else {
-                        //             r += data[(imgWidth * row + col) * 4];
-                        //             g += data[(imgWidth * row + col) * 4 + 1];
-                        //             b += data[(imgWidth * row + col) * 4 + 2];
-                        //             arr.push([r, g, b]);
-                        //         }
-                        //     }
-                        // }
-                        // // 求取平均值
-                        // r /= imgWidth * imgHeight; g /= imgWidth * imgHeight; b /= imgWidth * imgHeight;
-                        // // 将最终的值取整
-                        // r = Math.round(r); g = Math.round(g); b = Math.round(b);
-                        // // 返回图片主题色的 RGB 颜色值
-                        // if (!!callback) {
-                        //     callback(`${r},${g},${b}`);
-                        // }
-
                         let imgData = res.data;
                         var r = 1, g = 1, b = 1, a = 1;
                         const arr = Array.prototype.slice.call(imgData, 0)