Browse Source

2023-4-25

cmy 2 years ago
parent
commit
5d3461d6f1

+ 0 - 25
pages.json

@@ -15,37 +15,12 @@
 				"navigationBarTitleText": "母婴界严选"
 			}
 		},
-		{
-			"path": "pages/index/notice",
-			"style": {
-				"navigationBarTitleText": "消息中心"
-			}
-		},
 		{
 			"path": "pages/index/share",
 			"style": {
 				"navigationBarTitleText": "邀好友赚佣金"
 			}
 		},
-		// #ifndef APP
-		{
-			"path": "pages/index/follow",
-			"style": {
-				"navigationBarTitleText": "关注公众号"
-			}
-		},
-		// #endif
-		{
-			"path": "pages/index/noticeDetail",
-			"style": {
-				"navigationBarTitleText": "消息",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
 		{
 			"path": "pages/cart/cart",
 			"style": {

+ 0 - 73
pages/index/follow.vue

@@ -1,73 +0,0 @@
-<template>
-	<view class="content">
-		<image class="qr" src="../../static/image/followTop.jpg" mode="scaleToFill"></image>
-		<image class="pint" src="../../static/image/followCenter.png" mode="scaleToFill"></image>
-		<view class="text">
-			<!-- #ifdef H5 -->
-			长按二维码识别
-			<!-- #endif -->
-			<!-- #ifndef H5 -->
-			扫码识别公众号
-			<!-- #endif -->
-		</view>
-		<image class="buttomImg" src="../../static/image/followButtom.png" mode="widthFix"></image>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {};
-		},
-		onLoad(options) {},
-		methods: {}
-	};
-</script>
-
-<style lang="scss">
-	page,
-	.content {
-		height: 100%;
-	}
-
-	.content {
-		padding-bottom: 150rpx;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		align-content: center;
-		flex-wrap: wrap;
-		line-height: 1;
-		background-color: $color-green;
-
-		.qr {
-			margin: 0 75rpx;
-			width: 600rpx;
-			height: 600rpx;
-		}
-
-		.pint {
-			margin: 0 auto;
-			margin-top: 50rpx;
-			width: 200rpx;
-			height: 200rpx;
-
-		}
-		.text{
-			color: #FFFFFF;
-			width: 100%;
-			flex-shrink: 0;
-			text-align: center;
-			margin-top: 30rpx;
-		}
-
-		.buttomImg {
-			position: absolute;
-			left: 0;
-			right: 0;
-			bottom: 0;
-			width: 100%;
-			height: 50rpx;
-		}
-	}
-</style>

+ 0 - 334
pages/index/notice.vue

@@ -1,334 +0,0 @@
-<template>
-	<view class="content">
-		<view class="navbar">
-			<view v-for="(item, index) in navList" :key="index" class="nav-item"
-				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">
-				<text>{{ item.text }}</text>
-				<text class="margin-l-10" v-if="item.count>0">({{item.count}})</text>
-			</view>
-		</view>
-
-		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
-					<!-- 空白页 -->
-					<!-- #ifdef H5 -->
-					<empty src="../../static/error/emptyNotice.png"
-						v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-					<!-- #endif -->
-
-					<!-- #ifndef H5 -->
-					<empty src="../static/error/emptyNotice.png"
-						v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-					<!-- #endif -->
-					<!-- 订单列表 -->
-					<view class="itemBox" v-for="(item,index) in tabItem.orderList">
-						<view class="time">
-							{{item.add_time}}
-						</view>
-						<view @click="
-						tabItem.state==1
-						?
-						navTo('/pages/index/noticeDetail?id='+item.id+'&type=1',item)
-						:
-						navTo('/pages/index/noticeDetail?id='+item.id+'&type=2',item)
-						" class="itemDetail" :class="{wargin:tabItem.state==2,base:tabItem.state==1}">
-							<view class="typeName" :class="{gray:item.is_read==1}">
-								{{item.title}}
-							</view>
-							<view class="detail" :class="{gray:item.is_read==1}">
-								{{item.synopsis}}
-							</view>
-						</view>
-					</view>
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-
-<script>
-	import {
-		articleList,
-		notify,
-		notify_read
-	} from '@/api/index.js';
-	export default {
-		data() {
-			return {
-				tabCurrentIndex: 0,
-				navList: [{
-						state: 1,
-						text: '通知',
-						loadingType: 'more',
-						orderList: [],
-						page: 1, //当前页数
-						limit: 10, //每次信息条数
-						count: 0, //总消息条数
-					},
-					{
-						state: 2,
-						text: '警报',
-						loadingType: 'more',
-						orderList: [],
-						page: 1, //当前页数
-						limit: 10, //每次信息条数
-						count: 0, //总消息条数
-					}
-				]
-			};
-		},
-
-		onLoad(options) {
-			this.initNum();
-			this.loadData();
-		},
-		methods: {
-			// 初始化查询数量
-			initNum() {
-				notify().then((e) => {
-					this.navList[1].count = e.data.not_read_count;
-				})
-			},
-			navTo(url, item) {
-				let data = {
-					url: url,
-				}
-
-				// 判断是否为报警信息
-				if (item.type==2) {
-					// 判断是否已读
-					notify_read({
-						id: item.id
-					})
-					data.success = function(res) {
-						// 通过eventChannel向被打开页面传送数据
-						res.eventChannel.emit('addPushData', item)
-					}
-				}
-				 if (item.is_read != 1) {
-				 	this.navList[item.type-1].count--
-				 }
-				 console.log(this.navList[item.type-1]);
-				// 设置为已读
-				item.is_read = 1
-				uni.navigateTo(data)
-			},
-			// 转换金额为数字
-			moneyNum(value) {
-				return +value;
-			},
-			// 确认收货
-			//获取订单列表
-			loadData(source) {
-				const that = this;
-				//这里是将订单挂载到tab列表下
-				let index = this.tabCurrentIndex;
-				let navItem = this.navList[index];
-				let state = navItem.state;
-				console.log(navItem, '数据');
-				if (source === 'tabChange' && navItem.loaded === true) {
-					//tab切换只有第一次需要加载数据
-					return;
-				}
-				if (navItem.loadingType === 'loading') {
-					//防止重复加载
-					return;
-				}
-				if (navItem.loadingType === 'noMore') {
-					//防止重复加载
-					return;
-				}
-				// 修改当前对象状态为加载中
-				navItem.loadingType = 'loading';
-				// 判断是否为消息通知
-				if (state == 1) {
-					articleList({
-							page: navItem.page,
-							limit: navItem.limit
-						}, 1)
-						.then(({
-							data
-						}) => {
-							data.data = data.data.map((e) => {
-								e.is_read = +e.is_read;
-								e.type=1
-								return e
-							})
-							that.callback(data, navItem)
-						})
-						.catch(e => {
-							console.log(e);
-						});
-				}
-				// 判断是否为警报
-				if (state == 2) {
-					notify({
-							page: navItem.page,
-							limit: navItem.limit
-						})
-						.then(({
-							data
-						}) => {
-
-							data.data = data.data.map((e) => {
-								const detail = {
-									title: e.content,
-									synopsis: e.address,
-									longitude: e.longitude,
-									latitude: e.latitude,
-									address: e.address,
-									is_read: +e.is_read,
-									id: e.id,
-									add_time: e.add_time,
-									type:2
-								}
-								return detail
-							})
-
-
-
-							that.callback(data, navItem)
-						})
-						.catch(e => {
-							console.log(e);
-						});
-				}
-
-			},
-			// 回调数据处理
-			callback(data, navItem) {
-				navItem.count = data.not_read_count;
-				let arr = data.data
-				navItem.orderList = navItem.orderList.concat(arr);
-				// console.log(navItem.orderList);
-				navItem.page++;
-				if (navItem.limit == arr.length) {
-					//判断是否还有数据, 有改为 more, 没有改为noMore
-					navItem.loadingType = 'more';
-					return;
-				} else {
-					//判断是否还有数据, 有改为 more, 没有改为noMore
-					navItem.loadingType = 'noMore';
-				}
-				uni.hideLoading();
-				this.$set(navItem, 'loaded', true);
-			},
-			//swiper 切换
-			changeTab(e) {
-				this.tabCurrentIndex = e.target.current;
-				this.loadData('tabChange');
-			},
-			//顶部tab点击
-			tabClick(index) {
-				this.tabCurrentIndex = index;
-			},
-
-		}
-	};
-</script>
-
-<style lang="scss">
-	page,
-	.content {
-		background: $page-color-base;
-		height: 100%;
-	}
-
-	.swiper-box {
-		height: calc(100% - 40px);
-	}
-
-	.tab-content {
-		height: 100%;
-	}
-
-	.list-scroll-content {
-		height: 100%;
-	}
-
-	.itemBox {
-		padding: 50rpx 30rpx 0;
-
-		.time {
-			margin: 0 auto;
-			width: 360rpx;
-			background-color: $font-color-disabled;
-			height: 48rpx;
-			color: #FFFFFF;
-			text-align: center;
-			line-height: 48rpx;
-			margin-bottom: 30rpx;
-			border-radius: 10rpx;
-			font-size: 24rpx;
-		}
-
-		.itemDetail {
-			padding: 50rpx;
-			background-color: #FFFFFF;
-			border-radius: 20rpx;
-
-			&.base {
-				color: $font-color-base;
-			}
-
-			&.wargin {
-				color: $color-red;
-			}
-
-
-			.typeName {
-				font-size: 28rpx;
-
-				&.gray {
-					color: $color-gray !important;
-				}
-			}
-
-			.detail {
-				font-size: 24rpx;
-
-				&.gray {
-					color: $color-gray !important;
-				}
-			}
-		}
-	}
-
-	.navbar {
-		display: flex;
-		height: 40px;
-		padding: 0 5px;
-		background: #fff;
-		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
-		position: relative;
-		z-index: 10;
-
-		.nav-item {
-			flex: 1;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			height: 100%;
-			font-size: 15px;
-			color: $font-color-dark;
-			position: relative;
-
-			&.current {
-				color: $base-color;
-
-				&:after {
-					content: '';
-					position: absolute;
-					left: 50%;
-					bottom: 0;
-					transform: translateX(-50%);
-					width: 44px;
-					height: 0;
-					border-bottom: 2px solid $base-color;
-				}
-			}
-		}
-	}
-</style>

+ 0 - 310
pages/index/noticeDetail.vue

@@ -1,310 +0,0 @@
-<template>
-	<view class="content">
-		<view class="itemDetail">
-			<view class="typeName clamp2" :class="{wargin:type==2,base:type==1}">
-				{{actionCart.title}}
-			</view>
-			<view class="detail">
-				{{actionCart.add_time}}
-			</view>
-			<view class="contentDetail detail-desc">
-				<rich-text class="detail-centent" :nodes="actionCart.content"></rich-text>
-			</view>
-		</view>
-		<view class="mapBox" v-if="type==2">
-			<map :enable-zoom='false' :enable-scroll='false' @click="openMap(actionCart.latitude,actionCart.longitude)"
-				class="map" :latitude="actionCart.latitude" :longitude="actionCart.longitude" :markers="[{
-				latitude:actionCart.latitude,
-				longitude:actionCart.longitude,
-				iconPath: '../../static/image/location.png',
-				heighe:35,
-				width:35
-			}]"></map>
-			<view class="mapBottom flex">
-				<view>
-					<image src="../../static/icon/gpsW.png" mode="widthFix"></image>
-				</view>
-				<view class="clamp">
-					{{actionCart.title}}
-				</view>
-			</view>
-			<!-- <view class="mapTip flex">
-				<view class="leftMapTip flex" :class="{success:actionCart.xh,error:!actionCart.xh}">
-					<image class="topTip" src="../../static/icon/mpXh.png" mode="widthFix"></image>
-				</view>
-				<view class="leftMapTip flex" :class="{success:actionCart.gps,error:!actionCart.gps}">
-					<image class="topTip" src="../../static/icon/mpGps.png" mode="widthFix"></image>
-				</view>
-			</view> -->
-		</view>
-
-		<!-- <view class="base-buttom" v-if="type==1">
-
-		</view> -->
-	</view>
-</template>
-
-<script>
-	import {
-		share
-	} from '@/api/wx';
-	import {
-		mapState,
-	} from 'vuex';
-	import {
-		details,
-	} from '@/api/index.js';
-	export default {
-		data() {
-			return {
-				id: '', //保存信息id
-				type: 0, //2为警报1为非警报
-				actionCart: {},
-
-			};
-		},
-
-		onLoad(options) {
-			const that = this;
-			that.id = options.id;
-			that.type = options.type;
-			if(+options.type==2){
-				// #ifdef APP-NVUE
-				const eventChannel = that.$scope.eventChannel; // 兼容APP-NVUE
-				// #endif
-				// #ifndef APP-NVUE
-				const eventChannel = that.getOpenerEventChannel();
-				// #endif
-				// 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
-				eventChannel.on('addPushData', function(data) {
-					that.actionCart = data;
-					that.actionCart.content = that.actionCart.content.replace(/\<img/gi, '<img class="rich-img"');
-				})
-			}
-			if(+options.type==1){
-				that.loadData();
-			}
-			if(+options.type==3){
-				that.loadData();
-			}
-			that.share()
-		},
-		// #ifdef MP
-		onShareAppMessage(options) {
-			// 设置菜单中的转发按钮触发转发事件时的转发内容
-			let pages = getCurrentPages(); //获取加载的页面
-			let currentPage = pages[pages.length - 1]; //获取当前页面的对象
-			let url = currentPage.route; //当前页面url
-			let item = currentPage.options; //如果要获取url中所带的参数可以查看options
-			let shareObj = {
-				title: this.shareData.title, // 默认是小程序的名称(可以写slogan等)
-				path: url, // 默认是当前页面,必须是以‘/’开头的完整路径
-				imageUrl: this.shareData.img,
-				desc:this.shareData.synopsis,
-				success: function(res) {
-					// 转发成功之后的回调
-					if (res.errMsg == 'shareAppMessage:ok') {}
-				},
-				fail: function() {
-					// 转发失败之后的回调
-					if (res.errMsg == 'shareAppMessage:fail cancel') {
-						// 用户取消转发
-					} else if (res.errMsg == 'shareAppMessage:fail') {
-						// 转发失败,其中 detail message 为详细失败信息
-					}
-				}
-			};
-			// 判断是否可以邀请
-			if (this.userInfo) {
-				shareObj.path += '&spread=' + this.userInfo.uid;
-			}
-			return shareObj;
-		},
-		// #endif
-		methods: {
-			share() {
-				console.log('加载分享');
-				const that = this;
-				// 请求获取默认数据
-				share({}).then(({
-					data
-				}) => {
-					console.log('分享回调', data);
-					that.shareData = data.data
-				});
-			},
-			// 打开地图导航
-			openMap(lat, long) {
-				uni.openLocation({
-					latitude: lat,
-					longitude: long,
-				})
-			},
-			navTo(url) {
-
-				uni.navigateTo({
-					url: url
-				})
-
-			},
-			// 转换金额为数字
-			moneyNum(value) {
-				return +value;
-			},
-			// 确认收货
-			//获取订单列表
-			loadData() {
-				const that = this;
-				details({},this.id)
-					.then(({
-						data
-					}) => {
-						this.actionCart = data;
-						that.actionCart.content = that.actionCart.content.replace(/\<img/gi, '<img class="rich-img"');
-						uni.setNavigationBarTitle({
-							title:data.title
-						})
-					})
-					.catch(e => {
-						
-					});
-			}
-		}
-	};
-</script>
-
-<style lang="scss">
-	/deep/ .iconenter {
-		font-size: $font-base + 2rpx;
-		color: #888;
-	}
-	
-	/deep/ .con_image {
-		width: 130rpx;
-		height: 130rpx;
-		display: inline-block;
-		padding: 15rpx;
-	
-		image {
-			width: 100%;
-			height: 100%;
-		}
-	}
-	
-	/* 商品详情中限制图片大小 */
-	/deep/ .rich-img {
-		width: 100% !important;
-		height: auto;
-	}
-	.detail-desc {
-		background: #fff;
-		/deep/ img {
-			max-width: 100% !important;
-			display: inline !important;
-		}
-		/deep/ div {
-			max-width: 100% !important;
-		}
-	}
-	page,
-	.content {
-		background: $page-color-base;
-		height: 100%;
-	}
-
-	// .content {
-	// 	padding-top: 30rpx;
-	// }
-
-	.base-buttom {
-		position: relative;
-		bottom: auto;
-		right: auto;
-		left: auto;
-	}
-
-	.itemDetail {
-		margin-bottom: 30rpx;
-		padding: 50rpx;
-		padding-top: 44px;
-		background-color: #FFFFFF;
-		.base {
-			color: $font-color-base;
-		}
-
-		.wargin {
-			color: $color-red;
-		}
-
-		.typeName {
-			font-size: 36rpx;
-		}
-
-		.detail {
-			margin-top: 10rpx;
-			font-size: 24rpx;
-			color: $font-color-light;
-		}
-
-		.contentDetail {
-			margin-top: 40rpx;
-			font-size: 28rpx;
-			color: $font-color-light;
-		}
-	}
-
-	.mapBox {
-		position: relative;
-
-		.mapBottom {
-			position: absolute;
-			bottom: 0;
-			left: 0;
-			right: 0;
-			padding: 15rpx;
-			font-size: 24rpx;
-			;
-			color: #ffffff;
-			justify-content: flex-start;
-			background-color: rgba($color: #000000, $alpha: 0.75);
-
-			image {
-				width: 30rpx;
-				margin-right: 10rpx;
-			}
-		}
-
-		.map {
-			width: 750rpx;
-			height: 300rpx;
-			font-size: 35rpx;
-		}
-
-		.mapTip {
-			position: absolute;
-			top: 0;
-			left: 0;
-			padding: 20rpx;
-
-			.leftMapTip {
-				margin-right: 20rpx;
-				width: 44rpx;
-				height: 44rpx;
-				border-radius: 10rpx;
-				justify-content: center;
-
-				.topTip {
-					width: 24rpx;
-				}
-
-				&.success {
-					background-color: $color-green;
-				}
-
-				&.error {
-					background-color: $color-red;
-				}
-			}
-		}
-	}
-</style>

+ 1 - 1
pages/public/privacyAgreement.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="content">
 		<view class="title">
-			母婴界严选隐私及定位服务规则
+			母婴界严选隐私协议
 		</view>
 		<view class="lineSt margin-t-40">
 			为母婴界严选提供相应服务之必须,您以自愿填写的方式提供注册所需的姓名、性别、电话以及其他类似的个人信息,则表示您已经了解并接受您个人信息的用途,同意母婴界严选为实现该特定目的使用您的个人信息。除此个人信息之外,其他任何您发送或提供给母婴界严选的材料、信息或文本(以下统称信息)均将被视为非保密和非专有的。<strong>母婴界严选</strong>对这些信息不承担任何义务。同时如果您提交时没有特别声明的,可视为同意母婴界严选及其授权人可以因商业或非商业的目的复制、透露、分发、合并和以其他方式利用这些信息和所有数据、图像、声音、文本及其他内容。您可阅读下面的隐私规则以了解更加详细的内容。

+ 1 - 2
pages/public/wxLogin.vue

@@ -5,7 +5,7 @@
 			<view class="logo-img-box">
 				<image class="logo-img" src="../../static/image/logo.png" mode="scaleToFill"></image>
 				<button class="userInfo flex-center" type="warn" @tap="loding?'':userInfoData()">
-					<image class="icon margin-r-10" src="../../static/icon/weichat.png" mode="scaleToFill"></image>
+					<image class="icon margin-r-10" src="../../static/icon/weichat.png" mode="widthFix"></image>
 					<text>微信授权登录</text>
 				</button>
 				<agreement @checkedChange='changeChecked'></agreement>
@@ -369,7 +369,6 @@
 
 		.icon {
 			width: 55rpx;
-			height: 55rpx;
 		}
 	}
 

+ 2 - 5
pages/set/set.vue

@@ -121,12 +121,9 @@
 					content: '确定要退出登录么',
 					success: (e) => {
 						if (e.confirm) {
-							logout({}).then((e) => {
-								uni.navigateBack();
-							}).catch((e) => {
-								console.log(e);
-							})
 							obj.logout();
+							uni.setStorageSync('token', '');
+							uni.navigateBack();
 						}
 					}
 				});

BIN
static/icon/weichat.png


BIN
static/image/logo.png