소스 검색

feat:提交代码

longzhicheng 1 년 전
부모
커밋
fe01c7f512

+ 10 - 1
src/apis/user.ts

@@ -50,6 +50,8 @@ enum API {
50
     GET_YANGLAO_LOG = '/api/user/yanglaolog',
50
     GET_YANGLAO_LOG = '/api/user/yanglaolog',
51
     // 获取用户信息
51
     // 获取用户信息
52
     USER = '/api/user',
52
     USER = '/api/user',
53
+	// 获取用户信息
54
+	USER_TOKEN = '/api/tokenList',
53
     // 个人资料编辑
55
     // 个人资料编辑
54
     UPDATE_USER = '/api/user/update/user',
56
     UPDATE_USER = '/api/user/update/user',
55
     // 获取协议
57
     // 获取协议
@@ -1019,7 +1021,14 @@ export function getYanglaojinStatistics(): Promise<YanglaoStatisticsResult> {
1019
         url: API.GET_YANGLAOJIN_STATISTICS,
1021
         url: API.GET_YANGLAOJIN_STATISTICS,
1020
     })
1022
     })
1021
 }
1023
 }
1022
-
1024
+/**
1025
+ * 获取用户信息
1026
+ */
1027
+export function apiGetUserToken(){
1028
+    return defHttp.post({
1029
+        url: API.USER_TOKEN
1030
+    })
1031
+}
1023
 /**
1032
 /**
1024
  * 获取用户信息
1033
  * 获取用户信息
1025
  */
1034
  */

+ 12 - 19
src/pages/home/components/header.vue

@@ -31,8 +31,9 @@
31
 		// return propsHeight || defaultHeight
31
 		// return propsHeight || defaultHeight
32
 		return defaultHeight
32
 		return defaultHeight
33
 	})
33
 	})
34
+	const heightInfo = ref({height:`${menuButtonInfo.bottom*2+164}rpx`})
34
 	const currentIndex=ref(0)
35
 	const currentIndex=ref(0)
35
-
36
+    
36
 	const navBarStyle = computed(() => {
37
 	const navBarStyle = computed(() => {
37
 		return {
38
 		return {
38
 			paddingTop: `${statusBarHeight}px`,
39
 			paddingTop: `${statusBarHeight}px`,
@@ -91,22 +92,10 @@
91
 </script>
92
 </script>
92
 <template>
93
 <template>
93
 	<div class="home-header-content home-header fixed w-screen text-white z-10" :style="navBarStyle">
94
 	<div class="home-header-content home-header fixed w-screen text-white z-10" :style="navBarStyle">
94
-		<image  class="top-bg" :src="topBannerBg" mode="widthFix"></image>
95
+		<image  class="top-bg" :src="topBannerBg" mode="aspectFill" :style="heightInfo"></image>
96
+<!-- 		<image  class="top-bg-x" :src="topBannerBg" mode="aspectFill"  :style="mHeightInfo"></image> -->
95
 		<div class="flex user-info">
97
 		<div class="flex user-info">
96
 			<div @click="handleClick" class="flex gap-2 mb-2 pl-2 flex-1">
98
 			<div @click="handleClick" class="flex gap-2 mb-2 pl-2 flex-1">
97
-				<!-- <image v-if="userStore && userStore.userInfo && userStore.userInfo.avatar"
98
-					:src="userStore.userInfo.avatar" style="width:74rpx; height:74rpx;" class="rounded-full" />
99
-				<image v-else src="https://app.bjtdba.com/uploads/logo.jpg" mode="widthFix"
100
-					class="w-9 h-9 rounded-full" />
101
-				<div class="flex flex-col ">
102
-					<div class="text-sm" v-if="userStore &&userStore.userInfo && userStore.userInfo.nickname">{{ userStore.userInfo.nickname ?
103
-            userStore.userInfo.nickname : '登录' }}</div>
104
-					<div class="text-sm" v-else>登录</div>
105
-					<div class="text-xs" v-if="!isNaN(yanglaojin) && userStore &&userStore.userInfo">{{ yanglaojin }}元养老金</div>
106
-					<div v-else class="text-xs">
107
-						领取养老金
108
-					</div>
109
-				</div> -->
110
 				<image @click="handleShowMessage" :src="IMG_CDN_NEW_URL+'icon_msg_white.png'" mode="widthFix" class="w-6 h-6" ></image>
99
 				<image @click="handleShowMessage" :src="IMG_CDN_NEW_URL+'icon_msg_white.png'" mode="widthFix" class="w-6 h-6" ></image>
111
 			</div>
100
 			</div>
112
 			<div class=" right-26 flex flex-col text-[10px] justify-center items-center " 
101
 			<div class=" right-26 flex flex-col text-[10px] justify-center items-center " 
@@ -124,9 +113,6 @@
124
 						class="w-5 h-5  pl-2 py-1"></image>
113
 						class="w-5 h-5  pl-2 py-1"></image>
125
 					<div class="flex flex-1 w-100%">
114
 					<div class="flex flex-1 w-100%">
126
 						<div class="flex-1 guand ">输入商品名称查找全球好货</div>
115
 						<div class="flex-1 guand ">输入商品名称查找全球好货</div>
127
-						<!-- <div class="bg-[#D71608] text-white text-xs w-11 rounded-full text-center p-1.5  mr-0.5 ">
128
-							搜索
129
-						</div> -->
130
 					</div>
116
 					</div>
131
 				</div>
117
 				</div>
132
 			</div>
118
 			</div>
@@ -174,6 +160,7 @@
174
 		flex-direction: row;
160
 		flex-direction: row;
175
 		align-items: center;
161
 		align-items: center;
176
 		margin-top: 20rpx;
162
 		margin-top: 20rpx;
163
+		z-index: 9999999;
177
 
164
 
178
 		.lab-item {
165
 		.lab-item {
179
 			display: flex;
166
 			display: flex;
@@ -230,9 +217,15 @@
230
 
217
 
231
 	.top-bg {
218
 	.top-bg {
232
 		width: 100%;
219
 		width: 100%;
233
-		height: 100rpx;
234
 		position: absolute;
220
 		position: absolute;
235
 		top: 0;
221
 		top: 0;
236
 		left: 0;
222
 		left: 0;
237
 	}
223
 	}
224
+	.top-bg-x {
225
+		width: 100%;
226
+		position: absolute;
227
+		top: 0;
228
+		left: 0;
229
+		height: 180rpx;
230
+	}
238
 </style>
231
 </style>

+ 1 - 4
src/pages/home/index.vue

@@ -103,7 +103,7 @@
103
 		let res = uni.getSystemInfoSync();
103
 		let res = uni.getSystemInfoSync();
104
 		let custom = uni.getMenuButtonBoundingClientRect() //胶囊按钮位置信息
104
 		let custom = uni.getMenuButtonBoundingClientRect() //胶囊按钮位置信息
105
 		let navBarHeight = (custom.top - res.statusBarHeight) * 2 + custom.height //计算得出导航栏高度
105
 		let navBarHeight = (custom.top - res.statusBarHeight) * 2 + custom.height //计算得出导航栏高度
106
-		navBarStyle.value = { marginTop: `${res.statusBarHeight + navBarHeight}px` }
106
+		navBarStyle.value = { marginTop: `${custom.bottom *2 +156}rpx` }
107
 	}
107
 	}
108
 
108
 
109
 	function checkSignIn() {
109
 	function checkSignIn() {
@@ -114,8 +114,6 @@
114
 			if (today === 0)
114
 			if (today === 0)
115
 				state.isShowSignIn = true
115
 				state.isShowSignIn = true
116
 			state.day = day
116
 			state.day = day
117
-
118
-			
119
 		}).catch((error) => {
117
 		}).catch((error) => {
120
 			console.error(`${error}->GetNewsSignInInfo`)
118
 			console.error(`${error}->GetNewsSignInInfo`)
121
 		})
119
 		})
@@ -387,7 +385,6 @@
387
 		<CXBBackTop :Scroll_X="Scroll_X" :is-css="1" />
385
 		<CXBBackTop :Scroll_X="Scroll_X" :is-css="1" />
388
 		<Header @onTabClick='onHeadTabClick' :yanglaojin="state.all_yanglao" :ex-class="headerClass" />
386
 		<Header @onTabClick='onHeadTabClick' :yanglaojin="state.all_yanglao" :ex-class="headerClass" />
389
 		<div class="page-content " :style="navBarStyle">
387
 		<div class="page-content " :style="navBarStyle">
390
-			<view class="empty-height"/>
391
 			<view class="" v-if="currentTopIndex==0">
388
 			<view class="" v-if="currentTopIndex==0">
392
 				<div class="swiper-content">
389
 				<div class="swiper-content">
393
 					<view class="swiper-bg"></view>
390
 					<view class="swiper-bg"></view>

+ 44 - 15
src/pages/user/index.vue

@@ -1,13 +1,14 @@
1
 <script lang="ts" setup>
1
 <script lang="ts" setup>
2
 	import type { Ref } from 'vue'
2
 	import type { Ref } from 'vue'
3
 	import { useUserStore } from '~/stores/userStore'
3
 	import { useUserStore } from '~/stores/userStore'
4
-	import { getUserInfo } from '~/apis/user'
4
+	import { getUserInfo ,apiGetUserToken} from '~/apis/user'
5
 	import { CDM_URL, CDN_URL,IMG_CDN_NEW_URL,ICON_CDN_URL } from '~/config/app'
5
 	import { CDM_URL, CDN_URL,IMG_CDN_NEW_URL,ICON_CDN_URL } from '~/config/app'
6
 	import { totalOrderNumber } from '~/apis/order.api'
6
 	import { totalOrderNumber } from '~/apis/order.api'
7
 	import type { OrderQuantityModel } from '~/apis/model/order.model'
7
 	import type { OrderQuantityModel } from '~/apis/model/order.model'
8
 	import FPopup from '~/components/FPopup/FPopup.vue'
8
 	import FPopup from '~/components/FPopup/FPopup.vue'
9
 	const pageStore = usePageStoreWidthOut()
9
 	const pageStore = usePageStoreWidthOut()
10
 	const userStore = useUserStore()
10
 	const userStore = useUserStore()
11
+	const userTokenInfo =ref()
11
 	const currentType = ref('')
12
 	const currentType = ref('')
12
 	const myOrderList = [{
13
 	const myOrderList = [{
13
 		id: 'noPay',
14
 		id: 'noPay',
@@ -80,11 +81,18 @@
80
 		icon: `${CDN_URL}/static/assets/invite_friends_221023.png`,
81
 		icon: `${CDN_URL}/static/assets/invite_friends_221023.png`,
81
 		text: '邀请好友',
82
 		text: '邀请好友',
82
 		url: '/pages/invite-friends/index',
83
 		url: '/pages/invite-friends/index',
83
-	}, {
84
+	},
85
+	// {
86
+	// 	icon: `${CDN_URL}/static/assets/dianpuruzhu_220620.png`,
87
+	// 	text: userStore.userInfo?.is_merchant == '-1' ? '店铺入驻' : '我的店铺',
88
+	// 	url: '',
89
+	// }, 
90
+	{
84
 		icon: `${CDN_URL}/static/assets/dianpuruzhu_220620.png`,
91
 		icon: `${CDN_URL}/static/assets/dianpuruzhu_220620.png`,
85
-		text: userStore.userInfo?.is_merchant == '-1' ? '店铺入驻' : '我的店铺',
92
+		text: '店铺管理',
86
 		url: '',
93
 		url: '',
87
-	}, {
94
+	}, 
95
+	{
88
 		icon: `${CDN_URL}/static/assets/mine_setting_220620.png`,
96
 		icon: `${CDN_URL}/static/assets/mine_setting_220620.png`,
89
 		text: '设置',
97
 		text: '设置',
90
 		url: '/pages/setting/index',
98
 		url: '/pages/setting/index',
@@ -99,6 +107,7 @@
99
 	onShow(() => {
107
 	onShow(() => {
100
 		if (uni.getStorageSync('UID')) {
108
 		if (uni.getStorageSync('UID')) {
101
 			getUserInfoX()
109
 			getUserInfoX()
110
+			getUserToken()
102
 			totalOrderNumber().then((res) => {
111
 			totalOrderNumber().then((res) => {
103
 				orderQuantity.value = res
112
 				orderQuantity.value = res
104
 			})
113
 			})
@@ -121,6 +130,11 @@
121
 			userInfo.value = res
130
 			userInfo.value = res
122
 		})
131
 		})
123
 	}
132
 	}
133
+	function getUserToken(){
134
+		apiGetUserToken().then(res=>{
135
+			userTokenInfo.value =res
136
+		})
137
+	}
124
 
138
 
125
 	function checkAuth() {
139
 	function checkAuth() {
126
 		uni.navigateTo({
140
 		uni.navigateTo({
@@ -135,19 +149,34 @@
135
 		if (uni.getStorageSync('UID')) {
149
 		if (uni.getStorageSync('UID')) {
136
 			console.log('进来了1')
150
 			console.log('进来了1')
137
 			console.log(item.text)
151
 			console.log(item.text)
138
-			if (item.text === '店铺入驻' || item.text === '我的店铺') {
139
-				return uni.navigateToMiniProgram({
140
-					appId: 'wx9a3e4ab07f8a9ba2',
141
-					path: 'pages/index/index',
142
-					success(res) {
143
-						// 打开成功
144
-						console.log(res)
145
-					},
146
-					fail: (error) => {
147
-						console.log('error = ', error)
148
-					},
152
+			// if (item.text === '店铺入驻' || item.text === '我的店铺') {
153
+			// 	return uni.navigateToMiniProgram({
154
+			// 		appId: 'wx9a3e4ab07f8a9ba2',
155
+			// 		path: 'pages/index/index',
156
+			// 		success(res) {
157
+			// 			// 打开成功
158
+			// 			console.log(res)
159
+			// 		},
160
+			// 		fail: (error) => {
161
+			// 			console.log('error = ', error)
162
+			// 		},
163
+			// 	})
164
+			// }
165
+			console.log("==userTokenInfo",userTokenInfo.value);
166
+			let _token  = userTokenInfo.value
167
+			console.log("===_token",_token);
168
+			if (item.text === '店铺管理' ) {
169
+				let url =`https://api.hxxfb.com/mweb/#/?data=${encodeURIComponent(JSON.stringify(userTokenInfo.value.mweb_info))}`
170
+				let info ={
171
+					url:url,
172
+					name:'店铺管理'
173
+				}
174
+				uni.navigateTo({
175
+					url:`/subPages/pages/mine-top/common-webView?info=${encodeURIComponent(JSON.stringify(info))}`
149
 				})
176
 				})
177
+				return 
150
 			}
178
 			}
179
+			
151
 
180
 
152
 			uni.navigateTo({
181
 			uni.navigateTo({
153
 				url: item.url,
182
 				url: item.url,

+ 1 - 0
src/subPages/pages/mine-top/common-webView.vue

@@ -8,6 +8,7 @@
8
 		if(option.info){
8
 		if(option.info){
9
 			let data =  JSON.parse(decodeURIComponent(option.info)) 
9
 			let data =  JSON.parse(decodeURIComponent(option.info)) 
10
 			url.value =data.url
10
 			url.value =data.url
11
+			console.log("===url.value ",url.value );
11
 			title.value = data.name
12
 			title.value = data.name
12
 		}
13
 		}
13
 		uni.setNavigationBarTitle({
14
 		uni.setNavigationBarTitle({

+ 1 - 0
src/subPages/pages/mine-top/jifen.vue

@@ -86,6 +86,7 @@
86
 			}
86
 			}
87
 		})
87
 		})
88
 	}
88
 	}
89
+	
89
 	function getInfo(){
90
 	function getInfo(){
90
 			apiGetJFInfo().then(res=>{
91
 			apiGetJFInfo().then(res=>{
91
 				dataInfo.value= res
92
 				dataInfo.value= res

+ 20 - 0
src/subPages/pages/phone-bill/list.vue

@@ -54,7 +54,27 @@
54
 			type='充值成功'
54
 			type='充值成功'
55
 		}else if(types==3){
55
 		}else if(types==3){
56
 			type='充值失败'
56
 			type='充值失败'
57
+		}else if(types==4){
58
+			type='充值失败'
59
+		}else if(types==5){
60
+			type='已超时'
61
+		}else if(types==6){
62
+			type='待充值'
63
+		}else if(types==7){
64
+			type='已匹配 '
65
+		}else if(types==8){
66
+			type='已存单'
67
+		}else if(types==9){
68
+			type='已取消'
69
+		}else if(types==10){
70
+			type='返销'
71
+		}else if(types==11){
72
+			type='部分到账'
73
+		}else if(types==12){
74
+			type='取消中'
57
 		}
75
 		}
76
+		
77
+		
58
 		return type
78
 		return type
59
 	}
79
 	}
60
 	
80
 	

+ 2 - 1
src/subPages/pages/quick-fuc/business.vue

@@ -187,6 +187,7 @@
187
 <style lang="scss" scoped>
187
 <style lang="scss" scoped>
188
 	.business-container {
188
 	.business-container {
189
 		display: flex;
189
 		display: flex;
190
+		padding-bottom: 60rpx;
190
 		flex-direction: column;
191
 		flex-direction: column;
191
 		min-height: 100VH;
192
 		min-height: 100VH;
192
 		background-color: #f8f8f8;
193
 		background-color: #f8f8f8;
@@ -217,7 +218,7 @@
217
 				height: 230rpx;
218
 				height: 230rpx;
218
 				border-top-right-radius: 20rpx;
219
 				border-top-right-radius: 20rpx;
219
 				border-top-left-radius: 20rpx;
220
 				border-top-left-radius: 20rpx;
220
-				background-color: #333;
221
+				background-color: #999;
221
 			}
222
 			}
222
 
223
 
223
 			.goods-title {
224
 			.goods-title {

+ 3 - 7
src/utils/http/http.ts

@@ -49,13 +49,11 @@ export class VRequest {
49
             configTemp.url = `${urlPrefix}${configTemp.url}`
49
             configTemp.url = `${urlPrefix}${configTemp.url}`
50
 
50
 
51
         const params = configTemp.params || {}
51
         const params = configTemp.params || {}
52
-		
53
-		console.log("===params",params);
54
 
52
 
55
         if (apiUrl && isString(apiUrl))
53
         if (apiUrl && isString(apiUrl))
56
             configTemp.url = `${apiUrl}${configTemp.url}`
54
             configTemp.url = `${apiUrl}${configTemp.url}`
57
-			console.log("=== configTemp.url", configTemp.url);
58
-
55
+			console.log("===url", configTemp.url);
56
+            console.log("===data", configTemp.data);
59
         return new Promise((resolve, reject) => {
57
         return new Promise((resolve, reject) => {
60
             uni.request({
58
             uni.request({
61
                 url: configTemp.url,
59
                 url: configTemp.url,
@@ -63,7 +61,7 @@ export class VRequest {
63
                 method: configTemp.method?.toUpperCase() as UniApp.RequestOptions['method'],
61
                 method: configTemp.method?.toUpperCase() as UniApp.RequestOptions['method'],
64
                 header: configTemp.header || {},
62
                 header: configTemp.header || {},
65
                 success: (res) => {
63
                 success: (res) => {
66
-                    // console.log('我是res数据',res);
64
+                    console.log('===res数据',res);
67
                     const data = res.data as Result
65
                     const data = res.data as Result
68
                     const _message: string = data?.message ?? ''
66
                     const _message: string = data?.message ?? ''
69
 					
67
 					
@@ -80,8 +78,6 @@ export class VRequest {
80
                         resolve(res.data as any)
78
                         resolve(res.data as any)
81
                     }
79
                     }
82
                     else {
80
                     else {
83
-						
84
-						console.log("===else",data);
85
                         //  这里 code,result,message为 后台统一的字段,需要在 types.ts内修改为项目自己的接口返回格式
81
                         //  这里 code,result,message为 后台统一的字段,需要在 types.ts内修改为项目自己的接口返回格式
86
                         // @ts-expect-error
82
                         // @ts-expect-error
87
                         const { status: code, data: result, message } = data
83
                         const { status: code, data: result, message } = data