diff --git a/api/home.js b/api/home.js index 6f37af5..eb69b1d 100644 --- a/api/home.js +++ b/api/home.js @@ -83,4 +83,27 @@ export const bindCode = (appUserId) => { }, method: "get" }) +} + +// 下单 +export const hhrMyUserList = (data) => { + return request({ + url: `/applet/workOut/hhrMyUserList`, + headers: { + isToken: true + }, + method: "post", + data + }) +} +// 收益明细 +export const getTransactionDetailsList = (params) => { + return request({ + url: `/applet/wallet/getTransactionDetailsList/${transactionType}`, + headers: { + isToken: true + }, + method: "get", + params + }) } \ No newline at end of file diff --git a/manifest.json b/manifest.json index 0ce331e..b9665cf 100644 --- a/manifest.json +++ b/manifest.json @@ -1,62 +1,63 @@ { - "name" : "uni-vuu3", - "appid" : "__UNI__08423D1", - "description" : "", - "versionName" : "1.0.0", - "versionCode" : "100", - "transformPx" : false, - "app-plus" : { - /* 5+App特有相关 */ - "usingComponents" : true, - "nvueCompiler" : "uni-app", - "nvueStyleCompiler" : "uni-app", - "splashscreen" : { - "alwaysShowBeforeRender" : true, - "waiting" : true, - "autoclose" : true, - "delay" : 0 - }, - "modules" : {}, - /* 模块配置 */ - "distribute" : { - /* 应用发布信息 */ - "android" : { - /* android打包配置 */ - "permissions" : [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "" - ] - }, - "ios" : {}, - /* ios打包配置 */ - "sdkConfigs" : {} - } - }, - /* SDK配置 */ - "quickapp" : {}, - /* 快应用特有相关 */ - "mp-weixin" : { - "appid" : "wx01f0f43759922fda", - "setting" : { - "urlCheck" : false, - "postcss" : true, - "minified" : true - }, - "usingComponents" : true, - "mergeVirtualHostAttributes" : true - }, - "vueVersion" : "3" -} + "name": "uni-vuu3", + "appid": "", + "description": "", + "versionName": "1.0.0", + "versionCode": "100", + "transformPx": false, + "app-plus": { + /* 5+App特有相关 */ + "usingComponents": true, + "nvueCompiler": "uni-app", + "nvueStyleCompiler": "uni-app", + "splashscreen": { + "alwaysShowBeforeRender": true, + "waiting": true, + "autoclose": true, + "delay": 0 + }, + "modules": {}, + /* 模块配置 */ + "distribute": { + /* 应用发布信息 */ + "android": { + /* android打包配置 */ + "permissions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "ios": {}, + /* ios打包配置 */ + "sdkConfigs": {} + } + }, + /* SDK配置 */ + "quickapp": {}, + /* 快应用特有相关 */ + "mp-weixin": { + /* 小程序特有相关 */ + "appid": "wx01f0f43759922fda", + "setting": { + "urlCheck": false, + "postcss": true, + "minified": true + }, + "usingComponents": true, + "mergeVirtualHostAttributes": true + }, + "vueVersion": "3" +} \ No newline at end of file diff --git a/otherPages/binding/list/index.vue b/otherPages/binding/list/index.vue index d2ac64d..c9deb32 100644 --- a/otherPages/binding/list/index.vue +++ b/otherPages/binding/list/index.vue @@ -2,7 +2,7 @@ - + {{state.baseInfo.info.userName}} diff --git a/otherPages/binding/partner/index.vue b/otherPages/binding/partner/index.vue index a17b44c..b0dea59 100644 --- a/otherPages/binding/partner/index.vue +++ b/otherPages/binding/partner/index.vue @@ -17,7 +17,7 @@ - + {{item.title}} @@ -41,11 +41,16 @@ diff --git a/otherPages/workbenchManage/myUser/components/noOrder.vue b/otherPages/workbenchManage/myUser/components/noOrder.vue index 6a1ccb1..77c87b6 100644 --- a/otherPages/workbenchManage/myUser/components/noOrder.vue +++ b/otherPages/workbenchManage/myUser/components/noOrder.vue @@ -2,8 +2,8 @@ - - {{item.name}} + + {{ item.userName }} @@ -11,21 +11,31 @@ 注册时间 - {{item.time}} + {{ item.createTime }} - \ No newline at end of file diff --git a/otherPages/workbenchManage/myUser/index.vue b/otherPages/workbenchManage/myUser/index.vue index b2601f3..95cfcab 100644 --- a/otherPages/workbenchManage/myUser/index.vue +++ b/otherPages/workbenchManage/myUser/index.vue @@ -2,20 +2,21 @@ - + - 微信用户 + {{ state.baseInfo.info.userName }} - 初级合伙人 + {{ state.baseInfo.partner_level }} - + + @@ -31,19 +32,19 @@ /> --> + color: '#000000', + fontWeight: 'bold', + transform: 'scale(1.05)' + }" :inactiveStyle="{ + color: '#000000', + transform: 'scale(1)' + }" :itemStyle="{ height: '88rpx', padding: '0 100rpx' }" lineColor="#FFBF60" @click="tabClick"> - - + + @@ -53,31 +54,84 @@ \ No newline at end of file diff --git a/otherPages/workbenchManage/myWallet/index.vue b/otherPages/workbenchManage/myWallet/index.vue index b6591d9..df2a965 100644 --- a/otherPages/workbenchManage/myWallet/index.vue +++ b/otherPages/workbenchManage/myWallet/index.vue @@ -2,19 +2,18 @@ - + - 微信用户 + {{ state.baseInfo.info.userName }} - 初级合伙人 + {{ state.baseInfo.partner_level }} 当前分成比例: - 25% + {{state.baseInfo.partner_new_num}} 晋级后分成比例: - 30% + {{state.baseInfo.partner_upgrade_num}} @@ -41,7 +40,7 @@ ¥ - 29.00 + {{state.baseInfo.money}} @@ -51,7 +50,7 @@ 本月订单分成:   ¥ - 0.00 + {{state.baseInfo.new_money}} @@ -59,7 +58,7 @@ 累积订单分成:   ¥ - 0.00 + {{state.baseInfo.old_money}} @@ -68,14 +67,14 @@ - + - + @@ -91,58 +90,17 @@ import cardData from '../components/cardData.vue' import { ref, - reactive + reactive, + onMounted } from "vue" + import { + binBaseInfo, + bindCode + } from "@/api/home.js" + const mounthName = ref('本月数据') const totalName = ref('累计数据') - const nounthData = reactive([{ - title: '本月注册用户', - num: "0个" - }, - { - title: '本月下单用户', - num: "0个" - }, - { - title: '本月有效用户', - num: "0个" - }, - { - title: '本月订单金额', - num: "¥0.00", - color: 'red' - }, - { - title: '本月有效订单金额', - num: "¥0.00", - color: 'red' - }, - ]) - const totalData = reactive([{ - title: '累计注册用户', - num: "0个", - - }, - { - title: '累计下单用户', - num: "0个" - }, - { - title: '累计有效用户', - num: "0个", - }, - { - title: '累计订单金额', - num: "¥0.00", - color: 'red' - }, - { - title: '累计有效订单金额', - num: "¥0.00", - color: 'red' - }, - ]) const handleGoto = (val) => { switch (val) { @@ -155,6 +113,82 @@ break; } } + + const state = reactive({ + info: {}, + baseInfo: {}, + nounthData: [], + totalData: [] + }) + + onMounted(() => { + state.info = JSON.parse(uni.getStorageSync("baseInfo")) + getBaseInfo() + }) + + const getBaseInfo = () => { + binBaseInfo(state.info.userId).then(res => { + state.baseInfo = res.data + state.nounthData = [{ + title: '本月注册用户', + num: state.baseInfo.register_users, + code: "register_users" + }, + { + title: '本月下单用户', + num: state.baseInfo.register_users, + code: "order_users" + }, + { + title: '本月有效用户', + num: state.baseInfo.use_users, + code: "use_users" + }, + { + title: '本月订单金额', + num: `¥${state.baseInfo.order_users_money}`, + color: 'red', + code: "order_users_money" + }, + { + title: '本月有效订单金额', + num: `¥${state.baseInfo.use_users_money}`, + color: 'red', + code: "use_users_money" + }, + ] + + state.totalData = [{ + title: '累计注册用户', + num: state.baseInfo.register_users_sum, + code: "register_users_sum" + }, + { + title: '累计下单用户', + num: state.baseInfo.order_users_sum, + code: "order_users_sum" + }, + { + title: '累计有效用户', + num: state.baseInfo.use_users_sum, + code: "use_users_sum" + }, + { + title: '累计订单金额', + num: `¥${state.baseInfo.order_users_sum_money}`, + color: 'red', + code: "order_users_sum_money" + }, + { + title: '累计有效订单金额', + num: `¥${state.baseInfo.use_users_sum_money}`, + color: 'red', + code: "use_users_sum_money" + }, + ] + }) + + } \ No newline at end of file diff --git a/pages/workbenchManage/index.vue b/pages/workbenchManage/index.vue index 2b327e3..add6182 100644 --- a/pages/workbenchManage/index.vue +++ b/pages/workbenchManage/index.vue @@ -23,7 +23,7 @@ - + {{item.indexInfo}} @@ -200,8 +200,9 @@ const show = ref(true) const hhShow = ref(true) - const handleGoto = (val) => { - switch (val) { + const handleGoto = (val, item) => { + console.log(item) + switch (item.id) { case 1: tab.navigateTo('/otherPages/binding/list/index') break; diff --git a/utils/getUrl.js b/utils/getUrl.js index 98e7a96..2e037a7 100644 --- a/utils/getUrl.js +++ b/utils/getUrl.js @@ -3,9 +3,9 @@ const accountInfo = wx.getAccountInfoSync(); current = accountInfo.miniProgram.envVersion; const api = { - develop: "https://pet-admin.hhlm1688.com/api/prod-api/", // 开发 - trial: "https://pet-admin.hhlm1688.com/api/prod-api/", //测试 - release: "https://pet-admin.hhlm1688.com/api/prod-api/", // 线上 + develop: "http://youyi-test.natapp1.cc/prod-api", // 开发 + trial: "http://h5.xzaiyp.top", //测试 + release: "http://h5.xzaiyp.top", // 线上 } const currentUrl = api[current];