zhoujump hai 1 semana
pai
achega
bf8cfca577

+ 13 - 2
README.md

@@ -16,6 +16,8 @@ yarn build
 
 ## 开发调试  
 
+### 安卓系统  
+
 1. 手机启用开发者模式。  
 2. 打开USB调试功能。  
 3. 使用数据线连接手机。  
@@ -24,6 +26,10 @@ yarn build
 6. 在手机上允许安装。  
 7. 可以调试与开发了。
 
+### IOS  
+
+1. 我不知道
+
 ## 技术框架
 
 ### uni-app  
@@ -36,9 +42,14 @@ yarn build
 
 ### 状态管理 Vuex  
 
-状态管理位于`/src/store`下。  
+状态管理位于`/src/store`下。如有需要持久化的状态,请于第16行进行配置。  
 [Vuex官方文档](https://vuex.vuejs.org/zh/guide/)  
 
 ### 网络请求封装  
+  
 位于`/src/api/index.js`下,使用uni内置的一些网络请求方法进行封装,具体请查看文件内注释。  
-[相关文档](https://uniapp.dcloud.net.cn/api/request/request.html)
+[相关文档](https://uniapp.dcloud.net.cn/api/request/request.html)
+
+### 图表库 uCharts  
+
+[相关文档](https://www.ucharts.cn/v2/#/)

+ 7 - 0
package-lock.json

@@ -28,6 +28,7 @@
         "@dcloudio/uni-quickapp-webview": "^2.0.2-4080720251210002",
         "@dcloudio/uni-stacktracey": "^2.0.2-4080720251210002",
         "@dcloudio/uni-stat": "^2.0.2-4080720251210002",
+        "@qiun/ucharts": "^2.5.0-20230101",
         "@vue/shared": "^3.0.0",
         "core-js": "^3.8.3",
         "flyio": "^0.6.2",
@@ -5215,6 +5216,12 @@
       "dev": true,
       "license": "MIT"
     },
+    "node_modules/@qiun/ucharts": {
+      "version": "2.5.0-20230101",
+      "resolved": "https://registry.npmjs.org/@qiun/ucharts/-/ucharts-2.5.0-20230101.tgz",
+      "integrity": "sha512-C7ccBgfPuGF6dxTRuMW0NPPMSCf1k/kh3I9zkRVBc5PaivudX/rPL+jd2Wty6gn5ya5L3Ob+YmYe09V5xw66Cw==",
+      "license": "Apache"
+    },
     "node_modules/@sideway/address": {
       "version": "4.1.5",
       "resolved": "https://registry.npmmirror.com/@sideway/address/-/address-4.1.5.tgz",

+ 1 - 0
package.json

@@ -70,6 +70,7 @@
     "@dcloudio/uni-quickapp-webview": "^2.0.2-4080720251210002",
     "@dcloudio/uni-stacktracey": "^2.0.2-4080720251210002",
     "@dcloudio/uni-stat": "^2.0.2-4080720251210002",
+    "@qiun/ucharts": "^2.5.0-20230101",
     "@vue/shared": "^3.0.0",
     "core-js": "^3.8.3",
     "flyio": "^0.6.2",

+ 24 - 0
src/pages.json

@@ -76,6 +76,30 @@
 			"style": {
 				"navigationBarTitleText": "所有应用"
 			}
+		},
+		{
+			"path": "pages/apps/google-search/google-search",
+			"style": {
+				"navigationBarTitleText": "谷歌搜索"
+			}
+		},
+		{
+			"path": "pages/apps/map-search/map-search",
+			"style": {
+				"navigationBarTitleText": "地图搜索"
+			}
+		},
+		{
+			"path": "pages/apps/domain-search/domain-search",
+			"style": {
+				"navigationBarTitleText": "域名搜索"
+			}
+		},
+		{
+			"path": "pages/apps/card-search/card-search",
+			"style": {
+				"navigationBarTitleText": "名片搜索"
+			}
 		}
 	],
 	"globalStyle": {

+ 2 - 4
src/pages/apps/apps.vue

@@ -1,7 +1,5 @@
 <template>
-	<view>
-		
-	</view>
+
 </template>
 
 <script>
@@ -17,6 +15,6 @@
 	}
 </script>
 
-<style>
+<style scoped>
 
 </style>

+ 13 - 0
src/pages/apps/card-search/card-search.vue

@@ -0,0 +1,13 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script setup>
+	
+</script>
+
+<style>
+	       
+</style>

+ 22 - 0
src/pages/apps/domain-search/domain-search.vue

@@ -0,0 +1,22 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 19 - 0
src/pages/apps/google-search/google-search.vue

@@ -0,0 +1,19 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style>
+	       
+</style>

+ 22 - 0
src/pages/apps/map-search/map-search.vue

@@ -0,0 +1,22 @@
+<template>
+	<view>
+		
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style>
+
+</style>

+ 131 - 6
src/pages/chat/chat.vue

@@ -1,17 +1,51 @@
 <template>
-	<view class="body">
+	<view @tap="showChannelMenu(false)" class="body">
 		<view class="state-bar"></view>
 		<view class="head">
 			<view class="left">
 				<view class="avatar-cont">
-					<image class="avatar" src="/static/icons/ins.png" ></image>
-					<text class="name">Instagram</text>
+					<view :class="['change-channel',isShowChannelMenu?'show':'']">
+						<view @tap="setChannel()" class="channel-item">
+							<image mode="aspectFit" class="avatar" src="/static/icons/whatsapp.png" ></image>
+							<text class="name">WhatsApp商业账号</text>
+						</view>
+						<view @tap="setChannel()" class="channel-item">
+							<image mode="aspectFit" class="avatar" src="/static/icons/whatsapp.png" ></image>
+							<text class="name">WhatsApp个人账号</text>
+						</view>
+						<view @tap="setChannel()" class="channel-item">
+							<image mode="aspectFit" class="avatar" src="/static/icons/facebook.png" ></image>
+							<text class="name">Fackbook Messager</text>
+						</view>
+						<view @tap="setChannel()" class="channel-item">
+							<image mode="aspectFit" class="avatar" src="/static/icons/ins.png" ></image>
+							<text class="name">Instagram</text>
+						</view>
+						<view @tap="setChannel()" class="channel-item">
+							<image mode="aspectFit" class="avatar" src="/static/icons/line.png" ></image>
+							<text class="name">Line</text>
+						</view>
+						<view @tap="setChannel()" class="channel-item">
+							<image mode="aspectFit" class="avatar" src="/static/icons/wechat-m.png" ></image>
+							<text class="name">微信公众号</text>
+						</view>
+						<view @tap="setChannel()" class="channel-item">
+							<image mode="aspectFit" class="avatar" src="/static/icons/wechat-b.png" ></image>
+							<text class="name">企业微信</text>
+						</view>
+						<view @tap="setChannel()" class="channel-item">
+							<image mode="aspectFit" class="avatar" src="/static/icons/webchat.png" ></image>
+							<text class="name">网页AI客服</text>
+						</view>
+					</view>
+					<image @tap.stop="showChannelMenu(true)" class="avatar" src="/static/icons/ins.png" ></image>
+					<text @tap.stop="showChannelMenu(true)" class="name">Instagram</text>
 				</view>
 			</view>
-			<view class="center title">聊天</view>
+			<view class="center title">聊天(72)</view>
 			<view class="right"></view>
 		</view>
-		<view class="scroll-cont">
+		<view v-if="userInfo.token" class="scroll-cont">
 			<scroll-view :scroll-y="true" class="scroll-view">
 				<view class="chat-item">
 					<view class="avatar-cont">
@@ -105,6 +139,12 @@
 				</view>
 			</scroll-view>
 		</view>
+		<navigator url="/pages/user/login" v-else class="no-login">
+			<view url="/pages/user/login" class="login-lock" v-if="!userInfo.token">
+				 <view class="title">登录/注册</view>
+				 <view class="sub-title">解锁您的AI营销黑科技</view>
+			</view>
+		</navigator>
 	</view>
 </template>
 
@@ -112,8 +152,29 @@
 	export default {
 		data() {
 			return {
-				chatType:'facebook'
+				chatType:'facebook',
+				isShowChannelMenu: false
 			};
+		},
+		methods: {
+			/**
+			 * 设定通道菜单打开状态
+			 * @param {Boolean} 设定通道菜单打开状态
+			 */
+			showChannelMenu(state){
+				this.isShowChannelMenu = state
+			},
+			/**
+			 * 切换聊天通道
+			 */
+			setChannel(){
+				this.isShowChannelMenu = false
+			}
+		},
+		computed: {
+			userInfo() {
+				return this.$store.getters.userInfo
+			},
 		}
 	}
 </script>
@@ -126,6 +187,7 @@
 		.left{
 			position: relative;
 			.avatar-cont{
+				z-index: 3;
 				display: flex;
 				gap: 12rpx;
 				align-items: center;
@@ -141,6 +203,68 @@
 				.name{
 					font-size: 24rpx;
 				}
+				.change-channel{
+					transition-duration: 300ms;
+					transform-origin: 0% 0%;
+					box-shadow: 0 0 16rpx 0 #00000018;
+					z-index: 3;
+					border-radius: 24rpx;
+					position: absolute;
+					left: -24rpx;
+					top: -24rpx;
+					width: 340rpx;
+					padding: 12rpx;
+					background-color: white;
+					pointer-events: none;
+					opacity: 0;
+					scale: 0.9;
+					.channel-item{
+						border-radius: 12rpx;
+						padding: 12rpx;
+						height: 46rpx;
+						display: flex;
+						gap: 12rpx;
+						align-items: center;
+						.avatar{
+							width: 46rpx;
+							height: 46rpx;
+						}
+						.name{
+							font-size: 24rpx;
+						}
+						&:active{
+							background-color: #f6f6f6;
+						}
+					}
+					&.show{
+						pointer-events: auto;
+						opacity: 1;
+						scale: 1;
+					}
+				}
+			}
+		}
+	}
+	.no-login{
+		width: 100%;
+		height: 100%;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.login-lock{
+			z-index: 2;
+			gap: 4rpx;
+			color: gray;
+			display: flex;
+			flex-direction: column;
+			justify-content: center;
+			align-items: center;
+			.title{
+				font-size: 38rpx;
+				font-weight: 700;
+			}
+			.sub-title{
+				font-size: 26rpx;
 			}
 		}
 	}
@@ -148,6 +272,7 @@
 		position: relative;
 		width: 100%;
 		height: 100%;
+		
 		.scroll-view{
 			position: absolute;
 			left: 0;

+ 23 - 16
src/pages/client/client.vue

@@ -8,7 +8,7 @@
 		</view>
 		<view class="search-body">
 			<view class="balance">
-				<view class="balance-cont">
+				<view v-if="userInfo.token" class="balance-cont">
 					<view class="icon iconfont icon-GoogleLogo"></view>
 					<view class="point-cont">500</view>
 					<view class="add iconfont icon-Plus"></view>
@@ -19,7 +19,7 @@
 				<view class="bg-ball-2"></view>
 				<view class="logo-text">
 					<image mode="aspectFit" class="logo" src="/static/tab-icon/home-active.png"></image>
-					<view class="title">星光全渠道搜索</view>
+					<view class="title">星光客户线索搜寻</view>
 				</view>
 				<view class="search-box-cont">
 					<view class="search-box">
@@ -29,7 +29,8 @@
 						<textarea @focus="openConfig(false)" placeholder="请输入搜索关键词" class="input" v-model="keyword"></textarea>
 						<view class="search-line">
 							<view class="history">历史搜索结果</view>
-							<view class="search-button">开始搜索</view>
+							<view v-if="userInfo.token" class="search-button">开始搜索</view>
+							<navigator url="/pages/user/login" v-else class="search-button">登录/注册</navigator>
 						</view>
 					</view>
 				</view>
@@ -76,6 +77,11 @@
 			openConfig(state){
 				this.isOpenConfig = state
 			}
+		},
+		computed: {
+			userInfo() {
+				return this.$store.getters.userInfo
+			}
 		}
 	}
 </script>
@@ -94,7 +100,7 @@
 			position: fixed;
 			transition-duration: 300ms;
 			left: 0;
-			bottom: -540rpx;
+			bottom: -530rpx;
 			border-radius: 24rpx 24rpx 0 0;
 			box-shadow: 0 0 16rpx 0 #00000011;
 			width: 100%;
@@ -106,7 +112,7 @@
 			}
 			.drag{
 				width: 100%;
-				height: 60rpx;
+				height: 70rpx;
 				display: flex;
 				align-items: center;
 				justify-content: center;
@@ -167,20 +173,20 @@
 			}
 			.bg-ball-1{
 				position: absolute;
-				right: 0;
+				right: -40rpx;
 				top: 0;
-				width: 200rpx;
-				height: 200rpx;
+				width: 240rpx;
+				height: 240rpx;
 				border-radius: 50%;
 				background-color: #C9539A;
 				filter: blur(120rpx);
 			}
 			.bg-ball-2{
 				position: absolute;
-				left: 0;
+				left: -40rpx;
 				bottom: -100rpx;
-				width: 200rpx;
-				height: 200rpx;
+				width: 240rpx;
+				height: 240rpx;
 				border-radius: 50%;
 				background-color: #F09649;
 				filter: blur(120rpx);
@@ -197,7 +203,7 @@
 					padding-right: 16rpx;
 					border: 1rpx solid lightgray;
 					border-radius: 60rpx;
-					background-color: #FFFFFF44;
+					background-color: #EDEDED88;
 					.name{
 						font-size: 24rpx;
 					}
@@ -207,7 +213,7 @@
 					&.active{
 						border: 1rpx solid #C9539A;
 						color: #C9539A;
-						background-color: #C9539A22;
+						background-color: #efd3e788;
 					}
 				}
 			}
@@ -245,7 +251,7 @@
 							background-image: linear-gradient(45deg, #F09649, #C9539A);
 						}
 						.history{
-							font-size: 26rpx;
+							font-size: 25rpx;
 							margin-left: 8rpx;
 							color: #333333;
 						}
@@ -298,10 +304,11 @@
 				background-color: #FFFFFF;
 				font-weight: 600;
 				display: flex;
+				font-size: 26rpx;
 				align-items: center;
 				padding: 4rpx;
-				padding-right: 6rpx;
-				padding-left: 12rpx;
+				padding-right: 5rpx;
+				padding-left: 8rpx;
 				border-radius: 60rpx;
 				gap: 8rpx;
 				border: 3rpx solid #F09649;

+ 20 - 20
src/pages/index/index.vue

@@ -18,46 +18,46 @@
 						 <view class="title">登录/注册</view>
 						 <view class="sub-title">解锁您的AI营销黑科技</view>
 					</navigator>
-					<div class="app-item">
+					<navigator url="/pages/apps/google-search/google-search" class="app-item">
 						<div class="icon iconfont icon-GoogleLogo"></div>
 						<div class="name">谷歌搜索</div>
-					</div>
-					<div class="app-item">
+					</navigator>
+					<navigator url="/pages/apps/map-search/map-search" class="app-item">
 						<div class="icon iconfont icon-MapPin"></div>
 						<div class="name">地图搜索</div>
-					</div>
-					<div class="app-item">
+					</navigator>
+					<navigator url="/pages/apps/domain-search/domain-search" class="app-item">
 						<div class="icon iconfont icon-AppWindow"></div>
 						<div class="name">域名搜索</div>
-					</div>
-					<div class="app-item">
+					</navigator>
+					<navigator url="/pages/apps/card-search/card-search" class="app-item">
 						<div class="icon iconfont icon-IdentificationCard"></div>
 						<div class="name">名片搜索</div>
-					</div>
-					<div class="app-item">
+					</navigator>
+					<navigator url="/pages/apps/domain-search/domain-search" class="app-item">
 						<div class="icon iconfont icon-AppWindow"></div>
 						<div class="name">域名搜索</div>
-					</div>
-					<div class="app-item">
+					</navigator>
+					<navigator url="/pages/apps/card-search/card-search" class="app-item">
 						<div class="icon iconfont icon-IdentificationCard"></div>
 						<div class="name">名片搜索</div>
-					</div>
-					<div class="app-item">
+					</navigator>
+					<navigator url="/pages/apps/google-search/google-search" class="app-item">
 						<div class="icon iconfont icon-GoogleLogo"></div>
 						<div class="name">谷歌搜索</div>
-					</div>
-					<div class="app-item">
+					</navigator>
+					<navigator url="/pages/apps/map-search/map-search" class="app-item">
 						<div class="icon iconfont icon-MapPin"></div>
 						<div class="name">地图搜索</div>
-					</div>
-					<div class="app-item">
+					</navigator>
+					<navigator url="/pages/apps/google-search/google-search" class="app-item">
 						<div class="icon iconfont icon-GoogleLogo"></div>
 						<div class="name">谷歌搜索</div>
-					</div>
-					<div class="app-item">
+					</navigator>
+					<navigator url="/pages/apps/apps" class="app-item">
 						<div class="icon iconfont icon-GridFour"></div>
 						<div class="name">全部应用</div>
-					</div>
+					</navigator>
 				</div>
 				<swiper :autoplay="true" :circular="true" class="banner">
 					<swiper-item class="banner-item">

+ 5 - 0
yarn.lock

@@ -1921,6 +1921,11 @@
   resolved "https://registry.npmmirror.com/@polka/url/-/url-1.0.0-next.29.tgz"
   integrity sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==
 
+"@qiun/ucharts@^2.5.0-20230101":
+  version "2.5.0-20230101"
+  resolved "https://registry.npmjs.org/@qiun/ucharts/-/ucharts-2.5.0-20230101.tgz"
+  integrity sha512-C7ccBgfPuGF6dxTRuMW0NPPMSCf1k/kh3I9zkRVBc5PaivudX/rPL+jd2Wty6gn5ya5L3Ob+YmYe09V5xw66Cw==
+
 "@sideway/address@^4.1.5":
   version "4.1.5"
   resolved "https://registry.npmmirror.com/@sideway/address/-/address-4.1.5.tgz"