zpj 2 жил өмнө
parent
commit
5ee03b48f5

+ 2 - 2
.env.dev.js

@@ -1,6 +1,6 @@
 const config = {
-	baseUrl: 'testapi.jhcs888.com',
-	socketUrl: 'testapi.jhcs888.com',
+	baseUrl: 'testofficial.jhcs888.com',
+	socketUrl: 'testofficial.jhcs888.com',
     appName:'开发环境'
 }
 module.exports = config;

+ 2 - 2
.env.prod.js

@@ -1,6 +1,6 @@
 const config = {
-    baseUrl: 'testapi.jhcs888.com',
-    socketUrl: 'testapi.jhcs888.com',
+    baseUrl: 'testofficial.jhcs888.com',
+    socketUrl: 'testofficial.jhcs888.com',
     appName:'正式环境'
 }
 module.exports = config;

+ 70 - 37
common/css/common.css

@@ -1,55 +1,88 @@
-body {
-  background-color: #F5F5F5;
-}
-
-view,
-text {
+view,text {
   font-size: 16px;
   color: #333;
+  font-weight: 400;
 }
 
 image {
   display: block;
 }
 
-/* 原价 */
-.original-price {
-  font-size: 12px;
-  text-decoration: line-through;
-  color: #999999;
+.box-border-box{
+	box-sizing: border-box;
 }
 
-.text-two-hidden {
-  display: -webkit-box;
-  -webkit-box-orient: vertical;
-  -webkit-line-clamp: 2;
-  overflow: hidden;
-  word-break: break-all;
-
+.flex-common-css {
+	width: 100%;
+	height: 100vh;
+	display: flex;
+	flex-direction: column;
 }
 
-.top-border {
-  border-top: 1px solid #e6e7e9;
+.display-flex {
+	display: flex;
 }
-
-.bottom-border {
-  border-bottom: 1px solid #e6e7e9;
+.flex-justify-space {
+	display: flex;
+	justify-content: space-between;
 }
-
-.placeholder-text {
-  color: #AEAEAE;
-  font-size: 14px;
-  font-weight: 400;
+.align-items-center {
+	display: flex;
+	align-items: center;
 }
-
-.top-mar {
-  margin-top: 10px;
+.flex-wrap-wrap {
+	display: flex;
+	flex-wrap: wrap;
 }
 
-.fixed {
-  position: fixed;
-  top: 0;
-  left: 0;
-  right: 0;
-  z-index: 2;
+.plr-32{
+	padding: 0 32rpx;
+}
+.fs-48{
+	font-size: 48rpx;
+}
+.fs-40{
+	font-size: 40rpx;
+}
+.fs-36{
+	font-size: 36rpx;
+}
+.fs-32{
+	font-size: 32rpx;
+}
+.fs-28{
+	font-size: 28rpx;
+}
+.fc-f{
+	color: #fff;
+}
+.fc-F2D4A9{
+	color: #F2D4A9;
+}
+.fc-ED301D{
+	color: #ED301D;
+}
+.fw-b{
+	font-weight: bold !important;
+}
+.text-align-center{
+	text-align: center;
+}
+.text-align-right{
+	text-align: right;
+}
+.mb-16{
+	margin-bottom: 16rpx;
+}
+.mb-32{
+	margin-bottom: 32rpx;
+}
+.mb-72{
+	margin-bottom: 72rpx;
+}
+.mb-24{
+	margin-bottom: 24rpx;
+}
+.mt-32{
+	margin-top: 32rpx;
 }

+ 1 - 1
index.html

@@ -7,7 +7,7 @@
     content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
   <meta name="viewport"
     content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover" />
-  <title></title>
+  <title>振合网</title>
   <!--preload-links-->
   <!--app-context-->
 </head>

+ 1 - 1
manifest.json

@@ -75,7 +75,7 @@
             "https" : false,
             "proxy" : {
                 "/api" : {
-                    "target" : "https://test-api.wealfavor.cn/",
+                    "target" : "http://testofficial.jhcs888.com",
                     "changeOrigin" : true,
                     "secure" : false,
                     "pathRewrite" : {

+ 1 - 7
pages.json

@@ -3,13 +3,7 @@
     {
       "path": "pages/index/index",
       "style": {
-        "navigationBarTitleText": "首页演示"
-      }
-    },
-    {
-      "path": "pages/login/index",
-      "style": {
-        "navigationBarTitleText": "登陆"
+        "navigationBarTitleText": "振合网"
       }
     }
   ],

+ 243 - 46
pages/index/index.vue

@@ -1,65 +1,262 @@
 <template>
-	<view class="box-data" @click="chooseMessageFile">
-    测试环境开始
+	<view class="index-box box-border-box flex-common-css">
+		<view class="flex-justify-space box-border-box plr-32">
+			<image class="logo-img" src="@/static/img/c-logo.png" mode="scaleToFill"></image>
+			<image class="music-img" src="@/static/img/c-music.png" mode="scaleToFill"></image>
+		</view>
+		<swiper class="swiper" :vertical='true'>
+			<!-- 邀请函 -->
+			<swiper-item>
+				<view class="swiper-item index-1">
+					<image class="img-text" src="@/static/img/yqh-text.png" mode="scaleToFill"></image>
+					<view class="fs-48 fc-f text-align-center mb-16">振合网科技集团实体联盟</view>
+					<view class="fs-32 fc-f text-align-center mb-72">未来已来   一触即发</view>
+					<image class="img-xian" src="@/static/img/xian.png" mode="scaleToFill"></image>
+					<image class="name-text" src="@/static/img/name-text.png" mode="scaleToFill"></image>
+					<image class="time-text" src="@/static/img/time-text.png" mode="scaleToFill"></image>
+					<image class="up-icon" src="@/static/img/c-up-icon.png" mode="scaleToFill"></image>
+				</view>
+			</swiper-item>
+			<!-- 诚挚邀请 -->
+			<swiper-item>
+				<view class="swiper-item">
+					<view class="index-2">
+						<image class="text-img" src="@/static/img/czyq-text.png" mode="scaleToFill"></image>
+						<view class="fs-32 fc-F2D4A9 fw-b mb-24">尊敬的用户</view>
+						<view class="fs-32 fc-F2D4A9 text-box">
+							您好!感谢百忙之中阅读此邀请函。
+							我们诚挚的邀请您参加于10月20日振合
+							科技集团举办的2024年度招商说明会。
+							我们深知在发展的道路上离不开您的信
+							任与支持,我们取得的成绩中有您的辛
+							勤付出。此次盛会邀请多位行业专家共
+							聚一堂,特此诚邀您出席盛会,期待与
+							您共话友情、 展望末来、共创属于我们
+							新的商业传奇。
+						</view>
+						<view class="fc-F2D4A9 fw-b fs-32 text-align-right mt-32">振合网科技集团</view>
+						<view class="fs-28 fc-F2D4A9 text-align-right">2024年10月20日</view>
+					</view>
+					<image class="up-icon" src="@/static/img/c-up-icon.png" mode="scaleToFill"></image>
+				</view>
+			</swiper-item>
+			<!-- 活动地址 -->
+			<swiper-item>
+				<view class="swiper-item">
+					<view class="index-2">
+						<image class="text-img-1" src="@/static/img/hdtd-text.png" mode="scaleToFill"></image>
+						<image class="img-1" src="@/static/img/h-1.png" mode="scaleToFill"></image>
+						
+						<view class="flex-justify-space">
+							<image class="img-2" src="@/static/img/h-2.png" mode="scaleToFill"></image>
+							<image class="img-2" src="@/static/img/h-3.png" mode="scaleToFill"></image>
+						</view>
+						
+						<view class="fc-F2D4A9 fs-40 text-align-center mb-16">重庆丽星君顿酒店</view>
+						<view class="fs-28 fc-F2D4A9 text-align-center">地址:重庆市渝北区服装城大道48号</view>
+					</view>
+					<image class="up-icon" src="@/static/img/c-up-icon.png" mode="scaleToFill"></image>
+				</view>
+			</swiper-item>
+			<!-- 地址导航 -->
+			<swiper-item>
+				<view class="swiper-item">
+					<view class="index-2">
+						<image class="text-img" src="@/static/img/dzdh-text.png" mode="scaleToFill"></image>
+						<view class="b-f">
+							<image class="img-3" src="@/static/img/map.png" mode="scaleToFill"></image>
+							<view class="b-c">开始导航</view>
+						</view>
+						<view class="fc-F2D4A9 fs-36 text-align-center mb-16">会议地址</view>
+						<view class="fc-F2D4A9 fs-28 text-align-center mb-32">重庆丽星君顿酒店</view>
+						<view class="fc-F2D4A9 fs-36 text-align-center mb-16">会议时间</view>
+						<view class="fc-F2D4A9 fs-28 text-align-center mb-32">10月20日早 上08:30</view>
+						<view class="fc-F2D4A9 fs-36 text-align-center mb-16">联系方式</view>
+						<view class="fc-F2D4A9 fs-28 text-align-center mb-32">023-67491176</view>
+					</view>
+					<image class="up-icon" src="@/static/img/c-up-icon.png" mode="scaleToFill"></image>
+				</view>
+			</swiper-item>
+			<!-- 参与预约 -->
+			<swiper-item>
+				<view class="swiper-item">
+					<view class="index-2">
+						<image class="text-img-2" src="@/static/img/cyyy-text.png" mode="scaleToFill"></image>
+						<view class="mb-32">
+							<view class="fc-F2D4A9 fs-32 mb-16">您的姓名<span class="fc-ED301D fs-32">*</span></view>
+							<input type="text" placeholder="请输入您的姓名">
+						</view>
+						<view class="mb-32">
+							<view class="fc-F2D4A9 fs-32 mb-16">您的手机号<span class="fc-ED301D fs-32">*</span></view>
+							<input type="number" placeholder="请输入您的手机号">
+						</view>
+						<view class="mb-32">
+							<view class="fc-F2D4A9 fs-32 mb-16">您的公司名称</view>
+							<input type="text" placeholder="请输入您的公司名称">
+						</view>
+						<view class="mb-72">
+							<view class="fc-F2D4A9 fs-32 mb-16">邀请人</view>
+							<input type="text" placeholder="请输入您的邀请人">
+						</view>
+						
+						<view class="save-box">提交</view>
+					</view>
+				</view>
+			</swiper-item>
+		</swiper>
 	</view>
 
 </template>
 <script>
-
-
 	import tools from "@/service/tools";
-  import jWeixin from "wecomjsdk"
-  import wxJs from "jweixin-module"
-  export default {
-		components: {
-
-		},
+	export default {
+		components: {},
 		data() {
 			return {
 
 			}
 		},
-		watch: {
-
-
-		},
-
 		mounted() {
-      tools.wxInitialize(['chooseImage'])
-      tools.wxAgentInitialize(['chooseMessageFile','invoke'])
+			
 		},
 		methods: {
-      chooseMessageFile(){
-        console.log('chooseMessageFile:事件开始触发')
-        wxJs.chooseImage({
-          count: 1, // 默认9
-          sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
-          sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
-          defaultCameraMode: "batch", //表示进入拍照界面的默认模式,目前有normal与batch两种选择,normal表示普通单拍模式,batch表示连拍模式,不传该参数则为normal模式。从3.0.26版本开始支持front和batch_front两种值,其中front表示默认为前置摄像头单拍模式,batch_front表示默认为前置摄像头连拍模式。(注:用户进入拍照界面仍然可自由切换两种模式)
-          isSaveToAlbum: 1, //整型值,0表示拍照时不保存到系统相册,1表示自动保存,默认值是1
-          success: function (res) {
-            let localIds = res.localIds; // 返回选定照片的本地ID列表,
-            console.log(localIds)
-            // andriod中localId可以作为img标签的src属性显示图片;
-            // iOS应当使用 getLocalImgData 获取图片base64数据,从而用于img标签的显示(在img标签内使用 wx.chooseImage 的 localid 显示可能会不成功)
-          }
-        });
-        // jWeixin.invoke('chooseMessageFile', {
-        //   count: 10,
-        //   type: 'image',
-        // }, function(res) {
-        //   console.log(res)
-        //   // 这里是回调函数
-        //   if (res.err_msg == "chooseMessageFile:ok"){
-        //     const tempFiles = res.tempFiles
-        //   }
-        // });
-      }
-
+			
 		},
 	}
 </script>
 <style lang="scss" scoped>
+	.index-box{
+		background-image: url('@/static/img/c-bg.png');
+		background-size: 100% 100%;
+	}
+	.up-icon{
+		width: 64rpx;
+		height: 64rpx;
+		margin: 0 auto;
+	}
+	.swiper{
+		flex: 1;
+		width: 100%;
+		height: 100%;
+		.swiper-item{
+			width: 100%;
+			height: 100%;
+		}
+	}
+	.logo-img{
+		width: 136rpx;
+		height: 79rpx;
+		margin-top: 8rpx;
+	}
+	.music-img{
+		margin-top: 16rpx;
+		width: 56rpx;
+		height: 56rpx;
+	}
+	.index-1{
+		.img-text{
+			width: 384rpx;
+			height: 232rpx;
+			margin: 76rpx auto 36rpx auto;
+		}
+		.img-xian{
+			width: 10rpx;
+			height: 174rpx;
+			margin: 0 auto 154rpx auto;
+		}
+		.name-text{
+			width: 288rpx;
+			height: 32rpx;
+			margin: 0 auto 10rpx auto;
+		}
+		.time-text{
+			width: 274rpx;
+			height: 37rpx;
+			margin: 0 auto 140rpx auto;
+		}
+	}
+	.index-2{
+		width: 686rpx;
+		min-height: 1032rpx;
+		background: rgba(23,49,74,0.51);
+		border-radius: 12rpx;
+		border: 2rpx solid rgba(51,121,163,0.8);
+		margin: 40rpx auto;
+		box-sizing: border-box;
+		padding: 32rpx;
+		input{
+			width: 622rpx;
+			height: 80rpx;
+			background: #FFFFFF;
+			border-radius: 10rpx;
+			box-sizing: border-box;
+			padding: 0 20rpx;
+			font-size: 28rpx;
+		}
+		.save-box{
+			width: 622rpx;
+			height: 80rpx;
+			background: linear-gradient( 90deg, #EBC795 0%, #E3BB83 100%);
+			border-radius: 10rpx;
+			text-align: center;
+			line-height: 80rpx;
+			font-size: 38rpx;
+			font-weight: 600;
+			color: #3A2E1C;
+		}
+		.text-img{
+			width: 302rpx;
+			height: 116rpx;
+			margin: 0 auto 44rpx auto;
+		}
+		.text-box{
+			line-height: 68rpx;
+			letter-spacing: 4rpx;
+		}
+		.text-img-1{
+			width: 224rpx;
+			height: 116rpx;
+			margin: 0 auto 44rpx auto;
+		}
+		.text-img-2{
+			width: 214rpx;
+			height: 116rpx;
+			margin: 0 auto 44rpx auto;
+		}
+		.img-1{
+			width: 622rpx;
+			height: 328rpx;
+			border-radius: 10rpx;
+			margin-bottom: 24rpx;
+		}
+		.img-2{
+			width: 300rpx;
+			height: 214rpx;
+			margin-bottom: 60rpx;
+		}
+		.img-3{
+			width: 622rpx;
+			height: 354rpx;
+			border-radius: 10rpx;
+			margin-bottom: 40rpx;
+		}
+		.b-f{
+			position: relative;
+			.b-c{
+				position: absolute;
+				right: 24rpx;
+				bottom: 22rpx;
+				
+				width: 172rpx;
+				height: 56rpx;
+				background: #2F80ED;
+				border-radius: 4rpx;
+				text-align: center;
+				line-height: 56rpx;
+				font-size: 28rpx;
+				color: #fff;
+			}
+		}
+	}
 
-
-</style>
+</style>

+ 0 - 45
pages/login/index.vue

@@ -1,45 +0,0 @@
-<template>
-  <view class="login">
-    登录页
-    <view class="logIn" @click="logIn">
-      登录
-    </view>
-  </view>
-</template>
-<script>
-  export default {
-    components: {
-
-    },
-    data() {
-      return {
-
-      }
-    },
-    mounted() {
-
-    },
-    methods: {
-      logIn() {
-        uni.redirectTo({
-          url: '/pages/index/index'
-        })
-      },
-    },
-  }
-</script>
-<style lang="scss" scoped>
-  .login {
-    width: 100%;
-    min-height: 100vh;
-    background: #fff;
-
-    .logIn {
-      width: 50%;
-      height: 40px;
-      text-align: center;
-      margin: 0 auto;
-      line-height: 40px;
-    }
-  }
-</style>

+ 2 - 82
service/ajax.js

@@ -1,4 +1,5 @@
 import tools from "@/service/tools";
+
 let BASE_URL =''
 //#ifndef H5
 BASE_URL ='https://' + process.uniEnv.baseUrl;
@@ -9,7 +10,7 @@ BASE_URL ='https://' + process.uniEnv.baseUrl;
  * post请求封装
  */
 export const request = (url, method, data, show = false) => {
-  let token=uni.getStorageSync('token')
+  let token = uni.getStorageSync('token')
   // data.token = token;
   // data.m_id = uni.getStorageSync('m_id')
   if (show) {
@@ -20,7 +21,6 @@ export const request = (url, method, data, show = false) => {
   }
   return new Promise((resolve, reject) => {
     // 封装主体:网络请求
-    console.log(url)
     uni.request({
       url:BASE_URL+  url,
       data: data,
@@ -32,8 +32,6 @@ export const request = (url, method, data, show = false) => {
       },
       success: (res) => {
         if (res.statusCode === 200) {
-          // console.log('应答信息-----------------------')
-          // console.log(res.data); // 控制台显示数据信息
           tools.hideLoading();
           if (res.data.code * 1 === 401) {
             uni.clearStorageSync()
@@ -62,81 +60,3 @@ export const request = (url, method, data, show = false) => {
   })
 }
 
-/**
- * 文件上传
- */
-
-export const uploadImage = (filePath, imageName, data) => {
-  tools.showLoading();
-  return new Promise((resolve, reject) => {
-    uni.uploadFile({
-      url: BASE_URL + '/api/common/upload',
-      // header: {
-      // 	'Authorization': JSON.parse(uni.getStorageSync('userInfo')).token
-      // },
-      filePath: filePath,
-      name: imageName,
-      formData: data,
-      success: (res) => {
-        tools.hideLoading();
-        resolve(res)
-      },
-      fail(err) {
-        tools.hideLoading();
-        reject(err)
-      }
-    });
-  })
-}
-
-
-export const uploadFile = (url, file) => {
-  tools.showLoading();
-  let token = uni.getStorageSync('token') || '';
-  // data.app_version = plus.runtime.version;
-  // console.log('请求地址-----------------------')
-  // console.log(BASE_URL + url)
-  // console.log('请求参数-----------------------')
-  // console.log(data)
-  console.log(file)
-  return new Promise((resolve, reject) => {
-    // 封装主体:网络请求
-    console.log(BASE_URL + url)
-    uni.uploadFile({
-      url: BASE_URL + url, //仅为示例,非真实的接口地址
-      filePath: file,
-      name: 'file',
-      header: {
-        'content-type': 'application/json',
-        'apikey': '01ABA77B8BA6F26243D85B5A50FFB88624951C7B3A4078B3F9971983E667D5B8',
-        'hversion': '1.0',
-        'Authorization': token
-      },
-      success: (res) => {
-        tools.hideLoading();
-        if (res.statusCode === 200) {
-          // console.log('应答信息-----------------------')
-          res.data = JSON.parse(res.data)
-          // console.log(res.data); // 控制台显示数据信息
-          if (res.data.code * 1 === 401) {
-            uni.reLaunch({
-              url: '/pages/login/login'
-            });
-          } else {
-            resolve(res.data)
-          }
-        } else {
-          tools.error('网络错误!!')
-        }
-      },
-      fail: (err) => {
-        tools.error('网络错误!!')
-        // 返回错误消息
-        reject(err)
-        tools.hideLoading();
-      }
-    });
-
-  })
-
-}

+ 62 - 15
service/router.js

@@ -17,21 +17,68 @@ const router = createRouter({
 //全局路由前置守卫
 const whiteList = ['/pages/login/index']
 
-router.beforeEach((to, from, next) => {
-    let userToken=''
-    if (to.query.token ) {
-        userToken = to.query.token;
-        uni.setStorageSync('token',userToken)
-    }else {
-        userToken = uni.getStorageSync('token')
-    }
-    console.log('userToken:'+userToken)
-
-    if(whiteList.indexOf(to.path)<0 && !userToken){
-        tools.wxLogin()
-    }else {
-        next();
-    }
+router.beforeEach((to, from, next) => { 
+		next();
+	
+    // let userToken = uni.getStorageSync('token')  
+    // if(userToken){
+    // 	next();
+    // }else{
+    // 	let isWeiXin = tools.isWx();
+    // 	if(isWeiXin && to.path!=='/pages/login/index'){
+    // 		let wx_key = uni.getStorageSync('wx_key')
+    // 		if(wx_key && to.path==='/pages/login/register'){
+    // 			next()
+    // 		}else{
+    // 			const href = window.location.href;
+    // 			if (href.indexOf('?code=') > -1 || href.indexOf('&code=') > -1){
+    // 				const urlArr = href.split('?')
+    // 				const rightUrlArr = urlArr[1].split('#/')
+    // 				const queryObj = {}
+    // 				rightUrlArr[0].split('&').map((item) => {
+    // 					const splitStr = item.split('=')
+    // 					return {
+    // 						key: splitStr[0],
+    // 						value: splitStr[1],
+    // 					}
+    // 				}).forEach((item) => {
+    // 					queryObj[item.key] = item.value
+    // 				})
+    // 				if(urlArr.length>=3){
+    // 					rightUrlArr[1]= "?"+urlArr[2]
+    // 				}
+    // 				let from = {
+    // 					code: queryObj.code,
+    // 					wx_type:1,
+    // 					invite_code:uni.getStorageSync("invite_code"),
+    // 					memberCode:uni.getStorageSync("memberCode"),
+    // 				}
+    // 				// await userWxAppletLogin(from).then((res)=>{
+    // 				// 	if (res.code === 1) {
+    // 				// 		if(res.data.wx_key){
+    // 				// 			uni.setStorageSync('wx_key',res.data.wx_key)
+    // 				// 			next('/pages/login/register')
+    // 				// 		}else{
+    // 				// 			uni.setStorageSync('token',res.data.token)
+    // 				// 			uni.setStorageSync('m_id',res.data.m_id)
+    // 				// 			next(to.path)
+    // 				// 		}
+    // 				// 	} else {
+    // 				// 		tools.error(res.msg);
+    // 				// 	}
+    // 				// })
+    // 			}else{
+    // 				uni.removeStorageSync('token')
+    // 				uni.removeStorageSync('m_id')
+    // 				tools.wxLogin();
+    // 			}
+    // 		}
+    // 	}else if(whiteList.indexOf(to.path)>-1){
+    // 		next()
+    // 	}else {
+    // 		next('/pages/login/index')
+    // 	}
+    // }
 
 });
 // 全局路由后置守卫

+ 185 - 45
service/tools.js

@@ -3,7 +3,7 @@ import jWeixin from "wecomjsdk"
 import {
     Base64
 } from '@/js_sdk/js-base64/base64';
-import {getWxJsSign} from "@/api/weChat";
+import {getJsConfig} from "@/api/common.js";
 
 let tools = {}
 /**
@@ -16,6 +16,112 @@ tools.sortNumber = function (a, b) {
     return a - b;
 }
 
+tools.leftClick = function () {
+    let pages = getCurrentPages();
+	if(pages.length>1){
+        uni.navigateBack({
+            delta: 1
+        })
+    }else {
+        if(pages[pages.length -1].route.search("pages/finance") != -1){
+            uni.reLaunch({
+                url:"/pages/finance/index"
+            })
+        }else {
+            uni.reLaunch({
+                url: '/pages/index/index'
+            });
+        }
+    }
+}
+
+tools.formatDateAgo = (dateStr)=> {
+  const now = new Date();
+  const target = new Date(dateStr);
+  const diff = (now - target) / 1000 / 60; // 转换为分钟
+ 
+  if (diff < 1) {
+    return '刚刚';
+  } else if (diff < 60) {
+    return parseInt(diff) + '分钟前';
+  } else if (diff < 60 * 24) {
+    return parseInt(diff / 60) + '小时前';
+  } else if (diff < 60 * 24 * 30) {
+    return parseInt(diff / 60 / 24) + '天前';
+  } else if (diff < 60 * 24 * 30 * 12) {
+    return parseInt(diff / 60 / 24 / 30) + '个月前';
+  } else {
+    return parseInt(diff / 60 / 24 / 30 / 12) + '年前';
+  }
+}
+
+
+tools.getTimeY = function(data) {
+    return new Date(data).getFullYear();
+}
+tools.getTimeM = function(data) {
+    let m = new Date(data).getMonth() + 1;
+    m = m>10?m:'0'+m
+    return m
+}
+tools.setTimeYM = function() {
+    let YM
+    let data = new Date()
+    let y =  tools.getTimeY(data)
+    let m =  tools.getTimeM(data)
+    return YM = `${y}-${m}`
+}
+
+/**
+ * 自定义 获取指定日期到当前日期的 所有年 or 年月
+ */
+tools.getCustomTimeList = (start,end,type)=>{
+    let timeList = [];
+    let s = start.split("-");
+    let e = end.split("-");
+    let min = new Date()
+    let max = new Date()
+    min.setFullYear(s[0], s[1]);
+    max.setFullYear(e[0], e[1]);
+    var curr = min;
+    var str = "";
+    while (curr <= max) {
+        var yers = curr.getFullYear();
+        var month = curr.getMonth();
+        if(type === 'y-m'){
+            if (month === 0) {
+                str = (yers - 1) + "-" + 12;
+            } else {
+                str = yers + "-" + (month < 10 ? ("0" + month) : month);
+            }
+            timeList.push(str);
+            curr.setMonth(month + 1);
+        }else if(type === 'y'){
+            if (month === 0) {
+                str = (yers - 1)
+            } else {
+                str = yers
+            }
+            timeList.push(str);
+            curr.setMonth(month + 1);
+        }else{}
+    }
+    if(type === 'y-m'){
+        return timeList.reverse()
+    }else{
+        let list = Array.from(new Set(timeList))
+        return list.reverse()
+    }
+}
+
+// 获取 当前 年-月 配合 getCustomTimeList 使用 获取end
+
+tools.getDateYM = ()=>{
+    let DATE = new Date()
+    let Y = DATE.getFullYear()
+    let M = DATE.getMonth() + 1
+    return Y + '-' + (M<10?'0'+M:M)
+}
 
 /**
  * 保留两位小数
@@ -45,6 +151,9 @@ tools.formatDecimal = function (num, decimal) {
     return parseFloat(num).toFixed(decimal)
 }
 
+
+
+
 /**
  * 错误提示
  * @param msg
@@ -99,8 +208,6 @@ tools.getTime = function () {
 
 tools.updateVersion = function (sysVersion, appUrl) {
     let app_version = plus.runtime.version;
-    console.log('版本号信息对比------------------------------' + app_version + '---------' + sysVersion)
-    console.log(app_version < sysVersion)
     if (app_version < sysVersion) {
         uni.showLoading({
             title: '更新中……'
@@ -240,25 +347,21 @@ tools.setLoginData = function (data) {
  */
 tools.wxInitialize = async function (jsApiList) {
 
-    return await getWxJsSign({ 'url': window.location.href,'type':1 }).then((ret) => {
+    return await getJsConfig({ 'url': window.location.href,'type':1 }).then((ret) => {
         if (ret.code === 1) {
             wxJs.config({
                 beta: true,// 必须这么写,否则wx.invoke调用形式的jsapi会有问题
-                debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
+                debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
                 appId: ret.data.appId, // 必填,企业微信的corpID,必须是本企业的corpID,不允许跨企业使用
                 timestamp: ret.data.timestamp * 1, // 必填,生成签名的时间戳
                 nonceStr: ret.data.noncestr, // 必填,生成签名的随机串
                 signature: ret.data.signature,// 必填,签名,见 附录-JS-SDK使用权限签名算法
                 jsApiList: jsApiList,// 必填,需要使用的JS接口列表
                 success: function(res) {
-                    console.log(res)
-                    console.log('config:---------------OK')
+					console.log(res);
                     tools.success('成功')
                 },
-                fail: function(res) {
-                    console.log('config-error')
-                    console.log(res)
-                }
+                fail: function(res) {}
             });
             return true;
         } else {
@@ -267,49 +370,86 @@ tools.wxInitialize = async function (jsApiList) {
     })
 }
 
+tools.weiXinPay = function (data) {
+    console.log({
+        appId: data.appId, // 必填,公众号的唯一标识
+        timestamp: data.timeStamp, // 支付签名时间戳,注意微信 jssdk 中的所有使用 timestamp 字段均为小写。但最新版的支付后台生成签名使用的 timeStamp 字段名需大写其中的 S 字符
+        nonceStr: data.nonceStr, // 支付签名随机串,不长于 32 位
+        package: data.package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*)
+        signType: data.signType, // 微信支付V3的传入 RSA ,微信支付V2的传入格式与V2统一下单的签名格式保持一致
+        paySign: data.paySign, // 支付签名
+    })
+    return new Promise((resolve, reject) => {
+        wxJs.chooseWXPay({
+            appId: data.appId, // 必填,公众号的唯一标识
+            timestamp: data.timeStamp, // 支付签名时间戳,注意微信 jssdk 中的所有使用 timestamp 字段均为小写。但最新版的支付后台生成签名使用的 timeStamp 字段名需大写其中的 S 字符
+            nonceStr: data.nonceStr, // 支付签名随机串,不长于 32 位
+            package: data.package, // 统一支付接口返回的prepay_id参数值,提交格式如:prepay_id=\*\*\*)
+            signType: data.signType, // 微信支付V3的传入 RSA ,微信支付V2的传入格式与V2统一下单的签名格式保持一致
+            paySign: data.paySign, // 支付签名
+            success: function (res) {
+                resolve(true)
+            },
+            fail: function (res) {
+                resolve(false)
+            },
+        });
+    })
+}
+
+
 /**
- * 企业微信信息授权
- * @param jsApiList
- * @returns {Promise<unknown>}
+ * 判定当前浏览器是否为微信浏览器
  */
-tools.wxAgentInitialize=async function (jsApiList){
+tools.isWx = function () {
+    //#ifdef H5
+    let ua = window.navigator.userAgent.toLowerCase();
+    if (ua.indexOf('micromessenger') !== -1) {
+        return true;
+    } else {
+        return false;
+    }
+    //#endif
+	// #ifndef H5
+		return false;
+	// #endif
+}
 
-    return await getWxJsSign({ 'url': window.location.href ,'type':2}).then((ret) => {
-        if (ret.code === 1) {
-            jWeixin.agentConfig({
-                corpid: ret.data.appId, // 必填,企业微信的corpID,必须是本企业的corpID,不允许跨企业使用
-                agentid: ret.data.agentid, // 必填,企业微信的应用id (e.g. 1000247)
-                timestamp: ret.data.timestamp * 1, // 必填,生成签名的时间戳
-                nonceStr: ret.data.noncestr, // 必填,生成签名的随机串
-                signature: ret.data.signature,// 必填,签名,见 附录-JS-SDK使用权限签名算法
-                jsApiList: jsApiList,// 必填,需要使用的JS接口列表
-                success: function(res) {
-                    console.log('agentConfig:---------------OK')
-                    console.log(res)
 
-                },
-                fail: function(res) {
-                    console.log('agentConfig-error')
-                    console.log(res)
-                    if(res.errMsg.indexOf('function not exist') > -1){
-                        alert('版本过低请升级')
-                    }
-                }
 
-            });
+tools.wxLogin = function (urlPath) {
+    // 微信浏览器
+    let url=window.location.href;
+    url = url.replace('&code=', '&code_a=1')
+     url = encodeURIComponent(url);
 
-            return true;
-        } else {
-            return false;
+	// let nodeEnv = process.env.NODE_ENV;
+	// let type = '';
+	// if(nodeEnv === 'development'){
+	// 	type = 2
+	// }else{
+	// 	type = 1
+	// }
+
+    window.location.href = `https://wx.jhcs888.com/#/?redirect_url=${Base64.encode(url)}&type=1`
+}
+
+tools.setClipboardData=function (text){
+    uni.setClipboardData({
+        data: text,
+        success: function () {
+            tools.success('复制成功')
         }
-    })
+    });
 }
 
-tools.wxLogin = function () {
-    console.log(Base64.encode('aaa'));
-    // 微信浏览器
-    let url = encodeURIComponent(window.location.href);
-    window.location.href = `https://test-api.wealfavor.cn/api/weChat/wx?redirect_url=${Base64.encode(url)}`
+tools.download=function (url){
+    window.open(url)
+}
+
+
+tools.jyStart=function () {
+
 }
 
 

BIN
static/img/2.jpg


BIN
static/img/c-bg.png


BIN
static/img/c-logo.png


BIN
static/img/c-music.png


BIN
static/img/c-up-icon.png


BIN
static/img/cyyy-text.png


BIN
static/img/czyq-text.png


BIN
static/img/dzdh-text.png


BIN
static/img/h-1.png


BIN
static/img/h-2.png


BIN
static/img/h-3.png


BIN
static/img/hdtd-text.png


BIN
static/img/map.png


BIN
static/img/name-text.png


BIN
static/img/tabBar/business-highlight.png


BIN
static/img/tabBar/business.png


BIN
static/img/tabBar/home-highlight.png


BIN
static/img/tabBar/home.png


BIN
static/img/tabBar/my-highlight.png


BIN
static/img/tabBar/my.png


BIN
static/img/tabBar/news-highlight.png


BIN
static/img/tabBar/news.png


BIN
static/img/time-text.png


BIN
static/img/toRight.png


BIN
static/img/xian.png


BIN
static/img/yqh-text.png