Przeglądaj źródła

feat:提交代码

longzhicheng 1 rok temu
rodzic
commit
fe01c7f512

+ 10 - 1
src/apis/user.ts

@@ -50,6 +50,8 @@ enum API {
50 50
     GET_YANGLAO_LOG = '/api/user/yanglaolog',
51 51
     // 获取用户信息
52 52
     USER = '/api/user',
53
+	// 获取用户信息
54
+	USER_TOKEN = '/api/tokenList',
53 55
     // 个人资料编辑
54 56
     UPDATE_USER = '/api/user/update/user',
55 57
     // 获取协议
@@ -1019,7 +1021,14 @@ export function getYanglaojinStatistics(): Promise<YanglaoStatisticsResult> {
1019 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 31
 		// return propsHeight || defaultHeight
32 32
 		return defaultHeight
33 33
 	})
34
+	const heightInfo = ref({height:`${menuButtonInfo.bottom*2+164}rpx`})
34 35
 	const currentIndex=ref(0)
35
-
36
+    
36 37
 	const navBarStyle = computed(() => {
37 38
 		return {
38 39
 			paddingTop: `${statusBarHeight}px`,
@@ -91,22 +92,10 @@
91 92
 </script>
92 93
 <template>
93 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 97
 		<div class="flex user-info">
96 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 99
 				<image @click="handleShowMessage" :src="IMG_CDN_NEW_URL+'icon_msg_white.png'" mode="widthFix" class="w-6 h-6" ></image>
111 100
 			</div>
112 101
 			<div class=" right-26 flex flex-col text-[10px] justify-center items-center " 
@@ -124,9 +113,6 @@
124 113
 						class="w-5 h-5  pl-2 py-1"></image>
125 114
 					<div class="flex flex-1 w-100%">
126 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 116
 					</div>
131 117
 				</div>
132 118
 			</div>
@@ -174,6 +160,7 @@
174 160
 		flex-direction: row;
175 161
 		align-items: center;
176 162
 		margin-top: 20rpx;
163
+		z-index: 9999999;
177 164
 
178 165
 		.lab-item {
179 166
 			display: flex;
@@ -230,9 +217,15 @@
230 217
 
231 218
 	.top-bg {
232 219
 		width: 100%;
233
-		height: 100rpx;
234 220
 		position: absolute;
235 221
 		top: 0;
236 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 231
 </style>

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

@@ -103,7 +103,7 @@
103 103
 		let res = uni.getSystemInfoSync();
104 104
 		let custom = uni.getMenuButtonBoundingClientRect() //胶囊按钮位置信息
105 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 109
 	function checkSignIn() {
@@ -114,8 +114,6 @@
114 114
 			if (today === 0)
115 115
 				state.isShowSignIn = true
116 116
 			state.day = day
117
-
118
-			
119 117
 		}).catch((error) => {
120 118
 			console.error(`${error}->GetNewsSignInInfo`)
121 119
 		})
@@ -387,7 +385,6 @@
387 385
 		<CXBBackTop :Scroll_X="Scroll_X" :is-css="1" />
388 386
 		<Header @onTabClick='onHeadTabClick' :yanglaojin="state.all_yanglao" :ex-class="headerClass" />
389 387
 		<div class="page-content " :style="navBarStyle">
390
-			<view class="empty-height"/>
391 388
 			<view class="" v-if="currentTopIndex==0">
392 389
 				<div class="swiper-content">
393 390
 					<view class="swiper-bg"></view>

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

@@ -1,13 +1,14 @@
1 1
 <script lang="ts" setup>
2 2
 	import type { Ref } from 'vue'
3 3
 	import { useUserStore } from '~/stores/userStore'
4
-	import { getUserInfo } from '~/apis/user'
4
+	import { getUserInfo ,apiGetUserToken} from '~/apis/user'
5 5
 	import { CDM_URL, CDN_URL,IMG_CDN_NEW_URL,ICON_CDN_URL } from '~/config/app'
6 6
 	import { totalOrderNumber } from '~/apis/order.api'
7 7
 	import type { OrderQuantityModel } from '~/apis/model/order.model'
8 8
 	import FPopup from '~/components/FPopup/FPopup.vue'
9 9
 	const pageStore = usePageStoreWidthOut()
10 10
 	const userStore = useUserStore()
11
+	const userTokenInfo =ref()
11 12
 	const currentType = ref('')
12 13
 	const myOrderList = [{
13 14
 		id: 'noPay',
@@ -80,11 +81,18 @@
80 81
 		icon: `${CDN_URL}/static/assets/invite_friends_221023.png`,
81 82
 		text: '邀请好友',
82 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 91
 		icon: `${CDN_URL}/static/assets/dianpuruzhu_220620.png`,
85
-		text: userStore.userInfo?.is_merchant == '-1' ? '店铺入驻' : '我的店铺',
92
+		text: '店铺管理',
86 93
 		url: '',
87
-	}, {
94
+	}, 
95
+	{
88 96
 		icon: `${CDN_URL}/static/assets/mine_setting_220620.png`,
89 97
 		text: '设置',
90 98
 		url: '/pages/setting/index',
@@ -99,6 +107,7 @@
99 107
 	onShow(() => {
100 108
 		if (uni.getStorageSync('UID')) {
101 109
 			getUserInfoX()
110
+			getUserToken()
102 111
 			totalOrderNumber().then((res) => {
103 112
 				orderQuantity.value = res
104 113
 			})
@@ -121,6 +130,11 @@
121 130
 			userInfo.value = res
122 131
 		})
123 132
 	}
133
+	function getUserToken(){
134
+		apiGetUserToken().then(res=>{
135
+			userTokenInfo.value =res
136
+		})
137
+	}
124 138
 
125 139
 	function checkAuth() {
126 140
 		uni.navigateTo({
@@ -135,19 +149,34 @@
135 149
 		if (uni.getStorageSync('UID')) {
136 150
 			console.log('进来了1')
137 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 181
 			uni.navigateTo({
153 182
 				url: item.url,

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

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

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

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

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

@@ -54,7 +54,27 @@
54 54
 			type='充值成功'
55 55
 		}else if(types==3){
56 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 78
 		return type
59 79
 	}
60 80
 	

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

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

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

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