Browse Source

11111

pull/6/head
15576629987 2 months ago
parent
commit
87869c8c5e
12 changed files with 507 additions and 355 deletions
  1. +23
    -0
      api/home.js
  2. +62
    -61
      manifest.json
  3. +1
    -1
      otherPages/binding/list/index.vue
  4. +25
    -5
      otherPages/binding/partner/index.vue
  5. +34
    -10
      otherPages/workbenchManage/myLevel/index.vue
  6. +43
    -59
      otherPages/workbenchManage/myUser/components/haveOrder.vue
  7. +20
    -10
      otherPages/workbenchManage/myUser/components/noOrder.vue
  8. +87
    -33
      otherPages/workbenchManage/myUser/index.vue
  9. +93
    -59
      otherPages/workbenchManage/myWallet/index.vue
  10. +112
    -111
      pages/login/index.vue
  11. +4
    -3
      pages/workbenchManage/index.vue
  12. +3
    -3
      utils/getUrl.js

+ 23
- 0
api/home.js View File

@ -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
})
}

+ 62
- 61
manifest.json View File

@ -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" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
"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": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
"ios": {},
/* ios */
"sdkConfigs": {}
}
},
/* SDK */
"quickapp": {},
/* */
"mp-weixin": {
/* */
"appid": "wx01f0f43759922fda",
"setting": {
"urlCheck": false,
"postcss": true,
"minified": true
},
"usingComponents": true,
"mergeVirtualHostAttributes": true
},
"vueVersion": "3"
}

+ 1
- 1
otherPages/binding/list/index.vue View File

@ -2,7 +2,7 @@
<view class="box w-100 h100">
<view class="header-info">
<view class="base flex-rowl">
<image style="width: 139rpx;" src="@/static/images/ydd/img.png" mode="widthFix"></image>
<up-image width="120rpx" height="120rpx" :src="state.baseInfo.upgrade_image" shape="circle"></up-image>
<view class="flex-colt">
<view class="size-32 mb16">
{{state.baseInfo.info.userName}}


+ 25
- 5
otherPages/binding/partner/index.vue View File

@ -17,7 +17,7 @@
<view class="flex">
<!-- <image src="https://img1.baidu.com/it/u=3034232350,1041791648&fm=253&fmt=auto&app=138&f=PNG?w=500&h=500"
mode=""></image> -->
<image :src="icon" mode=""></image>
<image :src="icon" mode=""></image>
<view class="text1">
<view class="text2">
{{item.title}}
@ -41,11 +41,16 @@
<script setup>
import {
ref,
reactive
reactive,
onMounted
} from 'vue';
import {
getTransactionDetailsList
} from "@/api/home.js"
const icon = ref('/static/images/levelImage/money.png')
const detaliList = reactive([{
title: "合伙人推广佣金",
time: "2020-12-29 12:54:54",
@ -57,7 +62,22 @@
amont: "168.00"
},
])
const state = reactive({
transactionType: 0
})
onMounted(() => {
getList()
})
const getList = () => {
getTransactionDetailsList({
transactionType: state.transactionType
})
}
const currentTab = ref(1);
const tabClick = (val) => {


+ 34
- 10
otherPages/workbenchManage/myLevel/index.vue View File

@ -2,16 +2,17 @@
<view class="bind-user">
<view class="bind-user-header">
<view class="flex mb28">
<up-image width="120rpx" height="120rpx" src="https://cdn.uviewui.com/uview/album/1.jpg"
shape="circle"></up-image>
<up-image width="120rpx" height="120rpx" :src="state.baseInfo.upgrade_image" shape="circle"></up-image>
<view class="header-name">
<view class="font32 mb20" :style="{color:'#000',fontSize:'32rpx'}">猫小姐</view>
<view class="font32 mb20" :style="{ color: '#000', fontSize: '32rpx' }">
{{state.baseInfo.info.userName}}
</view>
<view class="flex-rowl">
<view class="label1 mr20">
初级合伙人
{{ state.baseInfo.partner_level }}
</view>
<view class="size-22" style="color: #B97132;">
已加入合伙人:130
已加入合伙人:{{state.baseInfo.partner_day}}
</view>
</view>
<!-- <view class="flex font24">
@ -34,11 +35,11 @@
<view class="bind-user-foot flex-around">
<view class="tab-bar flex-colc" @click="tabBarClick('data')">
<up-image width="46rpx" height="46rpx" :src="tabBarList[dataNum]"></up-image>
<view class="size-24 color-999" :class="{ activeColor:dataNum === 1 }">我的数据</view>
<view class="size-24 color-999" :class="{ activeColor: dataNum === 1 }">我的数据</view>
</view>
<view class="tab-bar flex-colc" @click="tabBarClick('level')">
<up-image width="46rpx" height="46rpx" :src="tabBarList[levelNum]"></up-image>
<view :class="['size-24', 'color-999', { activeColor:levelNum === 3 }]">等级信息</view>
<view :class="['size-24', 'color-999', { activeColor: levelNum === 3 }]">等级信息</view>
</view>
</view>
@ -64,9 +65,13 @@
import levelInfo from './commponents/levelInfo.vue'
import {
reactive,
ref
ref,
onMounted
} from "vue";
import {
binBaseInfo,
bindCode
} from "@/api/home.js"
const tabBarList = reactive([
'/static/images/levelTabBar/data.png',
'/static/images/levelTabBar/data_.png',
@ -84,8 +89,27 @@
// ]);
// const code = ref('asdasaadsdsa')
// const url = ref('https://uview-plus.jiangruyi.com/components/button.html')
const state = reactive({
info: {},
baseInfo: {}
})
onMounted(() => {
state.info = JSON.parse(uni.getStorageSync("baseInfo"))
getBaseInfo()
})
const getBaseInfo = () => {
binBaseInfo(state.info.userId).then(res => {
state.baseInfo = res.data
})
bindCode(state.info.userId).then(res => {
state.code = {
...cardData,
code: res.data.code
}
state.posterUrl = res.data.url
})
}
const tabBarClick = (flag) => {
showFlag.value = flag
switch (flag) {


+ 43
- 59
otherPages/workbenchManage/myUser/components/haveOrder.vue View File

@ -1,14 +1,14 @@
<template>
<view class="have-order">
<view class="have-order-list mt20" v-for="item in list" :key="item.id">
<view class="have-order-list mt20" v-for="(item,index) in listData" :key="item.id">
<view class="have-order-up">
<view class="have-order-image flex-rowl">
<up-image width="80rpx" height="80rpx" :src="item.imageUrl" shape="circle"></up-image>
<text class="ml20">{{item.name}}</text>
<up-image width="80rpx" height="80rpx" :src="item.userImage" shape="circle"></up-image>
<text class="ml20">{{ item.name }}</text>
</view>
<view class="have-order-image flex-rowr" @click="arrowClick(item)">
<view class="have-order-image flex-rowr" @click="()=>arrowClick(index)">
<text class="mr10 size-22 color-999">{{ item.isShow == true ? '收起' : '展开' }}</text>
<up-icon :name="item.isShow == true?'arrow-up-fill':'arrow-down-fill'" color="#707070"
<up-icon :name="item.isShow == true ? 'arrow-up-fill' : 'arrow-down-fill'" color="#707070"
size="10"></up-icon>
</view>
</view>
@ -18,7 +18,7 @@
注册时间
</view>
<view class="">
{{item.time}}
{{ item.createTime }}
</view>
</view>
<view class="have-order-time flex-b size-26 color-999" v-show="item.isShow">
@ -26,7 +26,7 @@
最近一次下单
</view>
<view class="">
{{item.time2}}
{{ item.recentlyPayTime }}
</view>
</view>
<view class="have-order-time flex-b size-26 color-999" v-show="item.isShow">
@ -34,7 +34,7 @@
累计消费金额
</view>
<view class="">
{{item.amount}}
{{ item.reward_money }}
</view>
</view>
<view class="have-order-time flex-b size-26 color-999" v-show="item.isShow">
@ -42,7 +42,7 @@
累计消报酬
</view>
<view class="">
{{item.reward}}
{{ item.accumulate_money }}
</view>
</view>
</view>
@ -52,59 +52,43 @@
</view> -->
</template>
<script setup>
import {
ref,
reactive
} from "vue"
const list = reactive([{
id: '001',
imageUrl: 'https://cdn.uviewui.com/uview/album/1.jpg',
name: '猫小咪',
time: '2024-11-01 18:12:16',
time2: '2024-11-01 18:12:16',
amount: '168.00',
reward: '100.00',
isShow: false
<script>
export default {
props: {
list: {
type: Array,
default: () => []
}
},
{
id: '002',
imageUrl: 'https://cdn.uviewui.com/uview/album/1.jpg',
name: '猫小咪',
time: '2024-11-01 18:12:16',
time2: '2024-11-01 18:12:16',
amount: 168.00,
reward: 100.00,
isShow: false
data() {
return {
listData: []
}
},
{
id: '003',
imageUrl: 'https://cdn.uviewui.com/uview/album/1.jpg',
name: '猫小咪',
time: '2024-11-01 18:12:16',
time2: '2024-11-01 18:12:16',
amount: 168.00,
reward: 100.00,
isShow: false
watch: {
list(val) {
if (val && val.length > 0) {
val.forEach(item => {
item.isShow = false
})
this.listData = val
}
}
},
{
id: '004',
imageUrl: 'https://cdn.uviewui.com/uview/album/1.jpg',
name: '猫小咪',
time: '2024-11-01 18:12:16',
time2: '2024-11-01 18:12:16',
amount: 168.00,
reward: 100.00,
isShow: false
},
]);
//
const arrowClick = (item) => {
list.forEach(i => {
if (i.id !== item.id) i.isShow = false
})
item.isShow = !item.isShow
methods: {
//
arrowClick(ind) {
this.listData.forEach((i, index) => {
if (index === ind) {
i.isShow = !i.isShow
} else {
i.isShow = false
}
})
console.log(this.listData)
this.listData = [...this.listData]
}
}
}
</script>


+ 20
- 10
otherPages/workbenchManage/myUser/components/noOrder.vue View File

@ -2,8 +2,8 @@
<view class="no-order">
<view class="no-order-list mt20" v-for="item in list" :key="item.id">
<view class="no-order-image flex-rowl">
<up-image width="80rpx" height="80rpx" :src="item.imageUrl" shape="circle"></up-image>
<text class="ml20">{{item.name}}</text>
<up-image width="80rpx" height="80rpx" :src="item.userImage" shape="circle"></up-image>
<text class="ml20">{{ item.userName }}</text>
</view>
<up-line color="#C7C7C7"></up-line>
<view class="no-order-time flex-b size-26 color-999">
@ -11,21 +11,31 @@
注册时间
</view>
<view class="">
{{item.time}}
{{ item.createTime }}
</view>
</view>
</view>
</view>
</template>
<script setup>
import { ref,reactive } from "vue"
const list = reactive([
{id:'001',imageUrl:'https://cdn.uviewui.com/uview/album/1.jpg', name: '猫小咪',time:'2024-11-01 18:12:16' },
{id:'002',imageUrl:'https://cdn.uviewui.com/uview/album/1.jpg', name: '猫小咪',time:'2024-11-01 18:12:16' },
]);
<script>
export default {
props: {
list: {
type: Array,
default: () => []
}
},
data() {
}
}
// const list = reactive([
// {id:'001',imageUrl:'https://cdn.uviewui.com/uview/album/1.jpg', name: '',time:'2024-11-01 18:12:16' },
// {id:'002',imageUrl:'https://cdn.uviewui.com/uview/album/1.jpg', name: '',time:'2024-11-01 18:12:16' },
// ]);
</script>
<style scoped lang="scss">
@import "../index";
@import "../index";
</style>

+ 87
- 33
otherPages/workbenchManage/myUser/index.vue View File

@ -2,20 +2,21 @@
<view class="bind-user">
<view class="bind-user-header">
<view class="flex mb28">
<up-image width="120rpx" height="120rpx" src="https://cdn.uviewui.com/uview/album/1.jpg"
shape="circle"></up-image>
<up-image width="120rpx" height="120rpx" :src="state.baseInfo.upgrade_image" shape="circle"></up-image>
<view class="header-name">
<view class="font32 mb20 color-040">微信用户</view>
<view class="font32 mb20 color-040">{{ state.baseInfo.info.userName }}</view>
<view class="label1">
初级合伙人
{{ state.baseInfo.partner_level }}
</view>
<view class="flex font24">
<!-- <view class="flex font24">
<view style="color: #B97132;">当前分成比例:
<text style="color: #CD4732;">25%</text>
</view>
<view class="ml28" style="color: #B97132;">晋级后分成比例:
<text style="color: #CD4732;">30%</text>
</view>
</view> -->
<view class="color-a55 size-24 mt16" v-html="state.baseInfo.level_details">
</view>
</view>
</view>
@ -31,19 +32,19 @@
/> -->
<view class="bind-tabs">
<up-tabs :list="list" :current="current" lineWidth="68rpx" :activeStyle="{
color: '#000000',
fontWeight: 'bold',
transform: 'scale(1.05)'
}" :inactiveStyle="{
color: '#000000',
transform: 'scale(1)'
}" :itemStyle="{height:'88rpx',padding:'0 100rpx'}" lineColor="#FFBF60" @click="tabClick">
color: '#000000',
fontWeight: 'bold',
transform: 'scale(1.05)'
}" :inactiveStyle="{
color: '#000000',
transform: 'scale(1)'
}" :itemStyle="{ height: '88rpx', padding: '0 100rpx' }" lineColor="#FFBF60" @click="tabClick">
</up-tabs>
</view>
<view class="">
<noOrder v-if="current == 0" />
<haveOrder v-if="current == 1" />
<noOrder :list="state.list" v-if="state.state == 0" />
<haveOrder :list="state.list" v-if="state.state == 1" />
</view>
</view>
@ -53,31 +54,84 @@
</template>
<script setup>
import {
ref,
reactive
} from "vue"
import haveOrder from "./components/haveOrder.vue"
import noOrder from "./components/noOrder.vue"
import {
ref,
reactive,
onMounted
} from "vue"
import haveOrder from "./components/haveOrder.vue"
import noOrder from "./components/noOrder.vue"
import {
hhrMyUserList
} from "@/api/home.js"
const code = ref('asdasaadsdsa')
const url = ref('https://uview-plus.jiangruyi.com/components/button.html')
const current = ref(0)
import {
binBaseInfo,
bindCode
} from "@/api/home.js"
const list = reactive([{
name: '未下单'
},
{
name: '已下单'
},
]);
const code = ref('asdasaadsdsa')
const url = ref('https://uview-plus.jiangruyi.com/components/button.html')
const current = ref(0)
const tabClick = (item) => {
current.value = item.index
const list = reactive([{
name: '未下单'
},
{
name: '已下单'
},
]);
const state = reactive({
list: [],
page: {
pageNumber: 1,
pageSize: 100
},
state: 0,
info: {},
baseInfo: {}
})
onMounted(() => {
getList()
state.info = JSON.parse(uni.getStorageSync("baseInfo"))
getBaseInfo()
})
const getBaseInfo = () => {
binBaseInfo(state.info.userId).then(res => {
state.baseInfo = res.data
})
bindCode(state.info.userId).then(res => {
state.code = {
...cardData,
code: res.data.code
}
state.posterUrl = res.data.url
})
}
const getList = async () => {
const {
code,
data
} = await hhrMyUserList({
...state.page,
state: state.state,
appUserId: state.info.userId
})
if (code === 200) {
state.list = [...data]
}
}
const tabClick = (item) => {
state.state = item.index
getList()
}
</script>
<style scoped lang="scss">
@import "index";
@import "index";
</style>

+ 93
- 59
otherPages/workbenchManage/myWallet/index.vue View File

@ -2,19 +2,18 @@
<view class="bind-user">
<view class="bind-user-header">
<view class="flex mb28 ml20 ">
<up-image width="140rpx" height="140rpx" src="https://cdn.uviewui.com/uview/album/1.jpg"
shape="circle"></up-image>
<up-image width="140rpx" height="140rpx" :src="state.baseInfo.upgrade_image" shape="circle"></up-image>
<view class="header-name">
<view class="font32 mb20 color-040">微信用户</view>
<view class="font32 mb20 color-040">{{ state.baseInfo.info.userName }}</view>
<view class="label1">
初级合伙人
{{ state.baseInfo.partner_level }}
</view>
<view class="flex font24">
<view style="color: #B97132;">当前分成比例
<text style="color: #CD4732;">25%</text>
<text style="color: #CD4732;">{{state.baseInfo.partner_new_num}}</text>
</view>
<view style="color: #B97132;">晋级后分成比例
<text style="color: #CD4732;">30%</text>
<text style="color: #CD4732;">{{state.baseInfo.partner_upgrade_num}}</text>
</view>
</view>
</view>
@ -41,7 +40,7 @@
<text class="text1">
¥
</text>
<text style="color: #FF2A2A; font-size: 36rpx;">29.00</text>
<text style="color: #FF2A2A; font-size: 36rpx;">{{state.baseInfo.money}}</text>
</view>
<view class="line1">
</view>
@ -51,7 +50,7 @@
本月订单分成:&nbsp;&nbsp;
</view>
¥<view class="">
0.00
{{state.baseInfo.new_money}}
</view>
</view>
<view class="level flex-rowl">
@ -59,7 +58,7 @@
累积订单分成:&nbsp;&nbsp;
</view>
¥<view class="">
0.00
{{state.baseInfo.old_money}}
</view>
</view>
</view>
@ -68,14 +67,14 @@
<view class="my-data">
<view class="my-data-total">
<cardTitle :cardTitle="mounthName"></cardTitle>
<cardData :cardData="nounthData"></cardData>
<cardData :cardData="state.nounthData"></cardData>
</view>
</view>
<view class="my-data">
<view class="my-data-total">
<cardTitle :cardTitle="totalName"></cardTitle>
<cardData :cardData="totalData"></cardData>
<cardData :cardData="state.totalData"></cardData>
</view>
</view>
</view>
@ -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"
},
]
})
}
</script>
<style scoped lang="scss">


+ 112
- 111
pages/login/index.vue View File

@ -24,137 +24,138 @@
<view class="footer size-30 flex-rowc w100">
暂不登陆
</view>
</template>
<script setup>
import {
getOpenIdKey,
getToken,
setIsLogin,
setOpenIdKey,
setStorage,
setToken
} from "../../utils/auth";
import {
getOpenId,
getPersonalInfo,
getPhoneNumber,
wxLogin
} from "../../api/system/user";
import {
ref
} from "vue"
import {
getOpenIdKey,
getToken,
setIsLogin,
setOpenIdKey,
setStorage,
setToken
} from "../../utils/auth";
import {
getOpenId,
getPersonalInfo,
getPhoneNumber,
wxLogin
} from "../../api/system/user";
import {
ref
} from "vue"
const value = ref(false)
const value = ref(false)
//
const loginWx = () => {
uni.login({
success: (res) => {
const code = res.code
console.log(code)
wxLogin({
code
}).then(res => {
if (res.code === 200) {
uni.setStorageSync("token", res.data.token)
uni.setStorageSync("baseInfo", JSON.stringify(res.data.userInfo))
uni.navigateBack({
delta: 1
})
}
})
}
})
}
//
const loginWx = () => {
uni.login({
success: (res) => {
const code = res.code
console.log(code)
wxLogin({
code
}).then(res => {
if (res.code === 200) {
uni.setStorageSync("token", res.data.token)
uni.setStorageSync("baseInfo", JSON.stringify(res.data.userInfo))
uni.navigateBack({
delta: 1
})
}
})
}
})
}
// openid
// if (!getOpenIdKey() && !getToken()) {
// uni.login({
// provider: 'weixin',
// success: async (res) => {
// openid
// if (!getOpenIdKey() && !getToken()) {
// uni.login({
// provider: 'weixin',
// success: async (res) => {
// const {
// code,
// data
// } = await getOpenId(res.code)
// if (code === 200 && data) {
// let resData = JSON.parse(data)
// setOpenIdKey(resData.openId)
// }
// },
// fail: function(error) {
// //
// uni.showToast('')
// }
// });
// }
// token
const onGetPhoneNumber = async (e) => {
// uni.login({
// success: res => {
// console.log("====>", res)
// }
// })
console.log(e)
getPhoneNumber({
phoneCode: e.detail.code
})
// if (e.detail.errMsg === "getPhoneNumber:ok") {
// if (getOpenIdKey()) {
// try {
// const {
// code,
// data
// } = await getOpenId(res.code)
// if (code === 200 && data) {
// let resData = JSON.parse(data)
// setOpenIdKey(resData.openId)
// }
// },
// fail: function(error) {
// //
// uni.showToast('')
// } = await getPhoneNumber({
// "openId": getOpenIdKey(),
// "code": e.detail.code,
// sourceType: 1
// })
// setToken(data.token)
// setIsLogin(true)
// await getUserInfo()
// } catch (e) {
// uni.showToast({
// icon: 'error',
// title: ''
// })
// }
// });
// }
// }
// token
const onGetPhoneNumber = async (e) => {
// uni.login({
// success: res => {
// console.log("====>", res)
// }
// })
console.log(e)
getPhoneNumber({
phoneCode: e.detail.code
})
// if (e.detail.errMsg === "getPhoneNumber:ok") {
// if (getOpenIdKey()) {
// try {
// const {
// data
// } = await getPhoneNumber({
// "openId": getOpenIdKey(),
// "code": e.detail.code,
// sourceType: 1
// })
// setToken(data.token)
// setIsLogin(true)
// await getUserInfo()
// } catch (e) {
// uni.showToast({
// icon: 'error',
// title: ''
// })
// }
// }
// }
}
}
// // h
// const getUserInfo = async () => {
// const {
// data
// } = await getPersonalInfo()
// setStorage('userInfo', data)
// uni.navigateBack()
// }
// // h
// const getUserInfo = async () => {
// const {
// data
// } = await getPersonalInfo()
// setStorage('userInfo', data)
// uni.navigateBack()
// }
</script>
<style scoped lang="scss">
@import "index";
@import "@/style/index.scss";
@import "index";
@import "@/style/index.scss";
.select {
width: 24rpx;
height: 24rpx;
border-radius: 50%;
border: 1rpx solid #C7C7C7;
margin-right: 8rpx;
.select {
width: 24rpx;
height: 24rpx;
border-radius: 50%;
border: 1rpx solid #C7C7C7;
margin-right: 8rpx;
.active {
background-color: $mainColor;
}
.active {
background-color: $mainColor;
}
}
.footer {
color: #C7C7C7;
position: fixed;
bottom: 100rpx;
.footer {
color: #C7C7C7;
position: fixed;
bottom: 100rpx;
}
}
</style>

+ 4
- 3
pages/workbenchManage/index.vue View File

@ -23,7 +23,7 @@
</view>
<!-- 申请加入后 -->
<view class="flex flex-between font24 flex-wrap" v-if="userHh===1">
<view class="icon-list" @click="handleGoto(1)" v-for="item in iconState.list1" :key="item.id">
<view class="icon-list" @click="handleGoto(1,item)" v-for="item in iconState.list1" :key="item.id">
<up-image class="mb20" :show-loading="true" :src="item.indexIcon" width="68rpx"
height="68rpx"></up-image>
<view>{{item.indexInfo}}</view>
@ -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;


+ 3
- 3
utils/getUrl.js View File

@ -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];


Loading…
Cancel
Save