瀏覽代碼

2025-8-12

cmy 3 月之前
父節點
當前提交
4c8c868abe

+ 15 - 1
api/index.js

@@ -44,7 +44,7 @@ export function getActionList(data) {
 }
 
 //获取活动详情
-export function getActionDetail(data,id) {
+export function getActionDetail(data, id) {
 	return request({
 		url: '/api/partake/out/' + id,
 		method: 'get',
@@ -85,4 +85,18 @@ export function orderVerific(data) {
 		method: 'post',
 		data
 	});
+}
+export function article(data, id = 0) {
+	return request({
+		url: `/api/article/list/${id}`,
+		method: 'get',
+		data
+	})
+}
+
+export function details(id = 0) {
+	return request({
+		url: `article/details/${id}`,
+		method: 'get'
+	})
 }

+ 8 - 0
api/order.js

@@ -151,3 +151,11 @@ export function storeList(data) {
 		data
 	});
 }
+
+export function adminOrderDetail(data,orderid) {
+	return request({
+		url: '/api/admin/order/detail/'+orderid,
+		method: 'get',
+		data
+	});
+}

+ 11 - 4
manifest.json

@@ -1,6 +1,6 @@
 {
     "name" : "小井康泉",
-    "appid" : "__UNI__F0EBD91",
+    "appid" : "__UNI__0987CAB",
     "description" : "",
     "versionName" : "1.0.19",
     "versionCode" : 122,
@@ -164,7 +164,11 @@
             "urlCheck" : true,
             "minified" : true
         },
-        "permission" : {},
+        "permission" : {
+            "scope.userLocation" : {
+                "desc" : ""
+            }
+        },
         "lazyCodeLoading" : "requiredComponents",
         "requiredBackgroundModes" : [ "location" ]
     },
@@ -178,7 +182,7 @@
         "devServer" : {
             "proxy" : {
                 "/api" : {
-                    "target" : "http://sc.frp.liuniu946.com/api",
+                    "target" : "http://www.xjkqs.cn/api",
                     // "changeOrigin": true,
                     "pathRewrite" : {
                         "/api" : "" // rewrite path
@@ -190,7 +194,10 @@
         "sdkConfigs" : {
             "maps" : {
                 "qqmap" : {
-                    "key" : "VYZBZ-P2TRG-RMIQ3-ITAIN-2DKBK-CKFQQ"
+                    "key" : "CPGBZ-AW53P-C2BDJ-VPL5Z-HU5EK-OWB2W"
+                },
+                "tencent" : {
+                    "key" : "MVVBZ-Y3E35-LTSIP-I3D7R-3X6ZS-NHBDJ"
                 }
             }
         }

+ 15 - 15
pages.json

@@ -65,31 +65,31 @@
 			"root": "pages/water",
 			"name": "water",
 			"pages": [{
-					"path": "/waterList",
+					"path": "waterList",
 					"style": {
 						"navigationBarTitleText": "充水票"
 					}
 				},
 				{
-					"path": "/waterDetail",
+					"path": "waterDetail",
 					"style": {
 						"navigationBarTitleText": "水票购买"
 					}
 				},
 				{
-					"path": "/deposit",
+					"path": "deposit",
 					"style": {
 						"navigationBarTitleText": "我的押金"
 					}
 				},
 				{
-					"path": "/waterUse",
+					"path": "waterUse",
 					"style": {
 						"navigationBarTitleText": "使用记录"
 					}
 				},
 				{
-					"path": "/myWaterList",
+					"path": "myWaterList",
 					"style": {
 						"navigationStyle": "custom",
 						"navigationBarTitleText": "我的水票",
@@ -103,13 +103,13 @@
 			"root": "pages/order",
 			"name": "order",
 			"pages": [{
-					"path": "/orderAfter",
+					"path": "orderAfter",
 					"style": {
 						"navigationBarTitleText": "售后管理"
 					}
 				},
 				{
-					"path": "/orderDetail",
+					"path": "orderDetail",
 					"style": {
 						"navigationBarTitleText": "订单详情",
 						"app-plus": {
@@ -118,31 +118,31 @@
 					}
 				},
 				{
-					"path": "/evaluate",
+					"path": "evaluate",
 					"style": {
 						"navigationBarTitleText": "评论"
 					}
 				},
 				{
-					"path": "/WriteOff",
+					"path": "WriteOff",
 					"style": {
 						"navigationBarTitleText": "核销码"
 					}
 				},
 				{
-					"path": "/orderRefund",
+					"path": "orderRefund",
 					"style": {
 						"navigationBarTitleText": "申请退款"
 					}
 				},
 				{
-					"path": "/createOrder",
+					"path": "createOrder",
 					"style": {
 						"navigationBarTitleText": "创建订单"
 					}
 				},
 				{
-					"path": "/shopList",
+					"path": "shopList",
 					"style": {
 						"navigationBarTitleText": "门店列表",
 						"app-plus": {
@@ -183,7 +183,7 @@
 				// 	}
 				// },
 				{
-					"path": "/product",
+					"path": "product",
 					"style": {
 						"navigationBarTitleText": "详情展示",
 						"app-plus": {
@@ -194,7 +194,7 @@
 					}
 				},
 				{
-					"path": "/showImg",
+					"path": "showImg",
 					"style": {
 						"navigationBarTitleText": "图片预览",
 						"app-plus": {
@@ -220,7 +220,7 @@
 				// 	}
 				// },
 				{
-					"path": "/search",
+					"path": "search",
 					"style": {
 						"enablePullDownRefresh": true,
 						// #ifdef APP-PLUS

+ 577 - 511
pages/home/category.vue

@@ -2,26 +2,33 @@
 	<view class="content">
 		<view class="scroll-top flex_item">
 			<scroll-view class="scroll-list" scroll-x>
-				<view class="scoll-box" v-for="ls in flist" :class="{ active: ls.id === currentId }" @click="tabtap(ls.id)">
-					<view class="scoll-img"><image :src="ls.pic"></image></view>
+				<view class="scoll-box" v-for="ls in flist" :class="{ active: ls.id === currentId }"
+					@click="tabtap(ls.id)">
+					<view class="scoll-img">
+						<image :src="ls.pic"></image>
+					</view>
 					<view class="scoll-name">{{ ls.cate_name }}</view>
 				</view>
 			</scroll-view>
 			<view class="search-box" @click="Toseach">
-				<view class="search"><image src="../../static/image/img22.png" mode="scaleToFill"></image></view>
+				<view class="search">
+					<image src="../../static/image/img22.png" mode="scaleToFill"></image>
+				</view>
 				<view>搜索</view>
 			</view>
 		</view>
 		<view class="scroll-view flex-tpl" :style="{ height: pageHeight + 'px' }">
 			<scroll-view scroll-y class="left-aside">
-				<view v-for="item in slist"  class="f-item" :class="{ active_top: item.id === erjiid }" @click="changeSlist(item)">{{ item.cate_name }}</view>
+				<view v-for="(item,ind) in slist" class="f-item" :class="{ active_top: item.id === erjiid }"
+					@click="changeSlist(item,ind)">{{ item.cate_name }}</view>
 			</scroll-view>
-			<scroll-view :scroll-with-animation="scrollAnimation" scroll-y class="right-aside" @scroll="asideScroll" :scroll-top="tabScrollTop">
-				<view class="tlist-box" v-for="ls in slist" :id="'main-' + ls.id">
-					<view class="tlistname" v-if="ls.list">{{ ls.name }}</view>
-					<view class="tlist-list flex_item" v-if="ls.goods" v-for="item in ls.goods" @click="ToDetail(item)">
+			<scroll-view :scroll-with-animation="scrollAnimation" scroll-y class="right-aside"
+				:scroll-top="tabScrollTop">
+				<view class="tlist-box" v-if="slist.length>0">
+					<view class="tlist-list flex_item" v-if="slist[indexAction].goods"
+						v-for="item in slist[indexAction].goods" @click="ToDetail(item)">
 						<view class="tlist-img">
-								<image  class="img" :src="item.image" :lazy-load="true" mode="scaleToFill"></image>
+							<image class="img" :src="item.image" :lazy-load="true" mode="scaleToFill"></image>
 						</view>
 						<view class="sell-out" v-if="item.stock == 0"><text>已售罄</text></view>
 						<view class="tlist-info">
@@ -29,7 +36,7 @@
 							<!-- <view class="info clamp">{{ item.store_info }}</view> -->
 							<view class="tipBox">
 								<view class="tip clamp" v-if="item.keyword != ''">
-									<text >{{ item.keyword }}</text>
+									<text>{{ item.keyword }}</text>
 								</view>
 							</view>
 							<view class="tlist-price flex">
@@ -43,7 +50,8 @@
 										<text class="fen">/{{item.unit_name}}</text>
 									</view>
 								</view>
-								<view class="gocar position-relative" v-if="item.is_barrel==0" @click.stop="Addcar(item)">
+								<view class="gocar position-relative" v-if="item.is_barrel==0"
+									@click.stop="Addcar(item)">
 									<image src="/static/image/img21.png" mode="scaleToFill"></image>
 									<view class="corner" v-if="item.cart_num > 0">
 										<text>{{ item.cart_num }}</text>
@@ -59,568 +67,626 @@
 	</view>
 </template>
 <script>
-import { mapState, mapMutations } from 'vuex';
-import { category_layer,category_goods } from '@/api/water.js';
-import { cartAdd } from '@/api/product.js';
-import { saveUrl } from '@/utils/loginUtils';
-export default {
-	data() {
-		return {
-			sizeCalcState: false,
-			tabScrollTop: 0,
-			currentId: '', //一级选择id,
-			erjiid: '', //二级选择id
-			flist: [], //一级分类列表
-			slist: [], //二级分类列表
-			yijishow: true, //一级界面显示
-			sanjishow: false, //三级界面隐藏
-			bili: 1, //设置页面比例
-			pageHeight: 0, //保存滚轮页面高度
-			CategoryID: '',
-			userInfo: '',
-			onload: true, //保存数据判断是否是第一次打开页面
-			scrollAnimation: true //是否开启动画
-		};
-	},
-	onLoad(option) {
-		if (option.spread) {
-			uni.setStorageSync('spread', option.spread);
-		}
-		saveUrl();
-		uni.showLoading({
-			title: '加载中'
-		});
-		this.loadData();
-	},
-	onShow() {
-		let obj = this;
-		const categoryId = uni.getStorageSync('categoryId') || '';
-		if (obj.currentId != categoryId && categoryId != '' && !obj.onload) {
-			obj.tabtap(categoryId);
-		}
-		// 初次数据加载完毕
-		obj.onload = false;
-	},
-	onReady() {
-		// 初始化获取页面宽度
-		uni.createSelectorQuery()
-			.select('.content')
-			.fields(
-				{
-					size: true
-				},
-				data => {
-					// 获取页面百分比
-					this.bili = data.width / 750;
-					console.log(data, 2);
-					this.pageHeight = data.height - 185 * this.bili;
-					console.log(this.pageHeight, 33);
-				}
-			)
-			.exec();
-	},
-	// #ifndef MP
-	// 监听导航栏输入框点击事件
-	onNavigationBarSearchInputClicked(e) {
-		uni.navigateTo({
-			url: '/pages/product/search'
-		});
-	},
-	// #endif
-	//下拉刷新
-	onPullDownRefresh() {
-		let obj = this;
-		//监听下拉刷新动作的执行方法,每次手动下拉刷新都会执行一次
-		setTimeout(function() {
-			obj.loadData();
-			uni.stopPullDownRefresh(); //停止下拉刷新动画
-		}, 1000);
-	},
-	computed: {
-		...mapState(['GetInfo']),
-	},
-	methods: {
-		// 载入数据
-		async loadData() {
-			let obj = this;
-			obj.loading = true;
-			category_layer({})
-				.then(({ data }) => {
-					obj.flist = data.list;
-					obj.currentId = data.first;
-					obj.erji();
-				})
-				.catch(err => {
-					console.log(err);
-				});
-		},
-		// 二级数据加载
-		erji() {
-			let obj = this;
-			category_goods({
-				pid: obj.currentId
-			})
-				.then(({ data }) => {
-					obj.slist = data.slist.map(function(s) {
-						return s;
-					});
-					obj.erjiid = obj.slist[0].id;
-					obj.$nextTick(e => {
-						// 重新开启动画效果
-						uni.hideLoading();
-						// 数据加载完成后重新计算高度
-						obj.calcSize()
-						obj.scrollAnimation = true;
-					});
-				})
-				.catch(err => {
-					uni.hideLoading();
-					console.log(err);
-				});
-		},
-		//分享
-		// #ifdef MP
-		onShareAppMessage: function(res) {
-			let userInfo = uni.getStorageSync('userInfo');
-			// 来自页面内分享按钮
-			let pages = getCurrentPages();
-			// 获取当前页面
-			let page = pages[pages.length - 1];
-			let path = '/pages/category/category?';
-			// 保存邀请人
-			path += 'spread=' + userInfo.uid;
-			let data = {
-				path: path,
-				imageUrl: this.GetInfo.img,
-				title: this.GetInfo.title
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		category_layer,
+		category_goods
+	} from '@/api/water.js';
+	import {
+		cartAdd
+	} from '@/api/product.js';
+	import {
+		saveUrl
+	} from '@/utils/loginUtils';
+	export default {
+		data() {
+			return {
+				indexAction: 0, //当前选中的二级
+				sizeCalcState: false,
+				tabScrollTop: 0,
+				currentId: '', //一级选择id,
+				erjiid: '', //二级选择id
+				flist: [], //一级分类列表
+				slist: [], //二级分类列表
+				yijishow: true, //一级界面显示
+				sanjishow: false, //三级界面隐藏
+				bili: 1, //设置页面比例
+				pageHeight: 0, //保存滚轮页面高度
+				CategoryID: '',
+				userInfo: '',
+				onload: true, //保存数据判断是否是第一次打开页面
+				scrollAnimation: true //是否开启动画
 			};
-			console.log(data)
-			return data;
-		},
-		// #endif
-		//加入购物车
-		Addcar(item) {
-			let obj = this;
-			cartAdd({
-				cartNum: '1', //商品数量
-				uniqueId: '', //商品标签
-				new: 0, //商品是否新增加到购物车1为不加入0为加入
-				mer_id: '',
-				productId: item.id //商品编号
-			})
-				.then(function(e) {
-					uni.showToast({
-						title: '成功加入购物车',
-						type: 'top',
-						duration: 500,
-						icon: 'none'
-					});
-					obj.erji();
-				})
-				.catch(e => {
-					console.log(e);
-				});
 		},
-		//一级分类点击
-		tabtap(item) {
+		onLoad(option) {
+			if (option.spread) {
+				uni.setStorageSync('spread', option.spread);
+			}
+			saveUrl();
 			uni.showLoading({
 				title: '加载中'
 			});
-			let obj = this;
-			// 关闭动画效果
-			obj.scrollAnimation = false;
-			// 设置顶部高度为0
-			obj.$nextTick(function(){
-				// 等待渲染完毕在执行高度修改否则动画效果依然存在
-				obj.tabScrollTop = 0;
-			})
-			// 获取当前点击的id
-			obj.currentId = item;
-			// 二级分类分类保存id
-			obj.erjiid = item;
-			uni.setStorageSync('categoryId', item);
-			// 重置分类滚轮绑定高度
-			obj.sizeCalcState = false;
-			// 加载二级方法
-			setTimeout(function() {
-				obj.erji();
-			});
 		},
-		//二级点击
-		changeSlist(item) {
+		onShow() {
 			let obj = this;
-			// 判断有没有初始化页面高度对象数据
-			console.log(obj.sizeCalcState)
-			if (!obj.sizeCalcState) {
-				obj.calcSize();
+			const categoryId = uni.getStorageSync('categoryId') || '';
+			if (obj.currentId != categoryId && categoryId != '' && !obj.onload) {
+				obj.tabtap(categoryId);
 			}
-			// 获取当前点击的id
-			obj.erjiid = item.id;
-			let index = obj.slist.findIndex(sitem => sitem.id === item.id);
-			setTimeout(function() {
-				obj.tabScrollTop = obj.slist[index].top;
-			}, 10);
+			// 初次数据加载完毕
+			obj.onload = false;
+			this.loadData();
 		},
-		// 商品详情页
-		ToDetail(item) {
-			if (item.stock < 1) {
-				this.$api.msg('该商品已售罄');
-			} else {
-				uni.navigateTo({
-					url: `/pages/product/product?id=` + item.id
-				});
-			}
+		onReady() {
+			// 初始化获取页面宽度
+			uni.createSelectorQuery()
+				.select('.content')
+				.fields({
+						size: true
+					},
+					data => {
+						// 获取页面百分比
+						this.bili = data.width / 750;
+						console.log(data, 2);
+						this.pageHeight = data.height - 185 * this.bili;
+						console.log(this.pageHeight, 33);
+					}
+				)
+				.exec();
 		},
-		Toseach() {
+		// #ifndef MP
+		// 监听导航栏输入框点击事件
+		onNavigationBarSearchInputClicked(e) {
 			uni.navigateTo({
-				url: `/pages/product/search`
+				url: '/pages/product/search'
 			});
 		},
-		//右侧栏滚动
-		asideScroll(e) {
-			// 判断有没有初始化页面高度对象数据
-			if (!this.sizeCalcState) {
-				this.calcSize();
-			}
-			let scrollTop = e.detail.scrollTop;
-			let box = 0; //列表包裹框高度初始化
-			let bottom = 10; //距离页面底部多少像素左侧列表切换到最后一个一级分类
-			// 查询当前页面对象
-			let view = uni.createSelectorQuery().select('.right-aside');
-			view.fields(
-				{
-					id: true,
-					dataset: true,
-					rect: true,
-					size: true,
-					scrollOffset: true
-				},
-				function(e) {
-					// 保存包裹框高度
-					box = e.height;
-				}
-			).exec();
-			// 获取所有距离顶部大于滚轮距离页面高度的所有分类
-			let tabs = this.slist.filter(item => item.top <= scrollTop).reverse();
-			if (tabs.length > 0) {
-				// 判断是否已经到达滚轮底部
-				if (box + scrollTop + bottom >= e.detail.scrollHeight) {
-					this.erjiid = this.slist[this.slist.length - 1].id;
+		// #endif
+		//下拉刷新
+		onPullDownRefresh() {
+			let obj = this;
+			//监听下拉刷新动作的执行方法,每次手动下拉刷新都会执行一次
+			setTimeout(function() {
+				obj.loadData();
+				uni.stopPullDownRefresh(); //停止下拉刷新动画
+			}, 1000);
+		},
+		computed: {
+			...mapState(['GetInfo']),
+		},
+		methods: {
+			// 载入数据
+			async loadData() {
+				let obj = this;
+				obj.loading = true;
+				category_layer({})
+					.then(({
+						data
+					}) => {
+						obj.flist = data.list;
+						obj.currentId = data.first;
+						obj.erji();
+					})
+					.catch(err => {
+						console.log(err);
+					});
+			},
+			// 二级数据加载
+			erji() {
+				let obj = this;
+				category_goods({
+						pid: obj.currentId
+					})
+					.then(({
+						data
+					}) => {
+						obj.slist = data.slist.map(function(s) {
+							return s;
+						});
+						obj.erjiid = obj.slist[0].id;
+						obj.$nextTick(e => {
+							// 重新开启动画效果
+							uni.hideLoading();
+							// 数据加载完成后重新计算高度
+							// obj.calcSize()
+							obj.scrollAnimation = true;
+						});
+					})
+					.catch(err => {
+						uni.hideLoading();
+						console.log(err);
+					});
+			},
+			//分享
+			// #ifdef MP
+			onShareAppMessage: function(res) {
+				let userInfo = uni.getStorageSync('userInfo');
+				// 来自页面内分享按钮
+				let pages = getCurrentPages();
+				// 获取当前页面
+				let page = pages[pages.length - 1];
+				let path = '/pages/category/category?';
+				// 保存邀请人
+				path += 'spread=' + userInfo.uid;
+				let data = {
+					path: path,
+					imageUrl: this.GetInfo.img,
+					title: this.GetInfo.title
+				};
+				console.log(data)
+				return data;
+			},
+			// #endif
+			//加入购物车
+			Addcar(item) {
+				let obj = this;
+				cartAdd({
+						cartNum: '1', //商品数量
+						uniqueId: '', //商品标签
+						new: 0, //商品是否新增加到购物车1为不加入0为加入
+						mer_id: '',
+						productId: item.id //商品编号
+					})
+					.then(function(e) {
+						uni.showToast({
+							title: '成功加入购物车',
+							type: 'top',
+							duration: 500,
+							icon: 'none'
+						});
+						obj.erji();
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			//一级分类点击
+			tabtap(item) {
+				uni.showLoading({
+					title: '加载中'
+				});
+				let obj = this;
+				// 关闭动画效果
+				obj.scrollAnimation = false;
+				// 设置顶部高度为0
+				obj.$nextTick(function() {
+					// 等待渲染完毕在执行高度修改否则动画效果依然存在
+					obj.tabScrollTop = 0;
+				})
+				// 获取当前点击的id
+				obj.currentId = item;
+				// 二级分类分类保存id
+				obj.erjiid = item;
+				uni.setStorageSync('categoryId', item);
+				// 重置分类滚轮绑定高度
+				obj.sizeCalcState = false;
+				// 加载二级方法
+				setTimeout(function() {
+					obj.erji();
+				});
+			},
+			//二级点击
+			changeSlist(item, ind) {
+				let obj = this;
+				// 获取当前点击的id
+				// if (!obj.sizeCalcState) {
+				// 	obj.calcSize();
+				// }
+				// // 获取当前点击的id
+				obj.erjiid = item.id;
+				// let index = obj.slist.findIndex(sitem => sitem.id === item.id);
+				// setTimeout(function() {
+				// 	obj.tabScrollTop = obj.slist[index].top;
+				// }, 10);
+				obj.indexAction = ind;
+			},
+			// 商品详情页
+			ToDetail(item) {
+				if (item.stock < 1) {
+					this.$api.msg('该商品已售罄');
 				} else {
-					this.erjiid = tabs[0].id;
+					uni.navigateTo({
+						url: `/pages/product/product?id=` + item.id
+					});
 				}
-			}
-		},
-		//计算右侧栏每个tab的高度等信息
-		calcSize() {
-			let h = this.bili * 215;
-			this.slist.forEach(item => {
-				let view = uni.createSelectorQuery().select('#main-' + item.id);
-				view.fields(
-					{
-						size: true
-					},
-					data => {
-						item.top = Math.ceil(h);
-						h += data.height;
-						item.bottom = Math.ceil(h);
-					}
-				).exec();
-			});
-			this.sizeCalcState = true;
+			},
+			Toseach() {
+				uni.navigateTo({
+					url: `/pages/product/search`
+				});
+			},
+			//右侧栏滚动
+			// asideScroll(e) {
+			// 	// 判断有没有初始化页面高度对象数据
+			// 	if (!this.sizeCalcState) {
+			// 		this.calcSize();
+			// 	}
+			// 	let scrollTop = e.detail.scrollTop;
+			// 	let box = 0; //列表包裹框高度初始化
+			// 	let bottom = 10; //距离页面底部多少像素左侧列表切换到最后一个一级分类
+			// 	// 查询当前页面对象
+			// 	let view = uni.createSelectorQuery().select('.right-aside');
+			// 	view.fields(
+			// 		{
+			// 			id: true,
+			// 			dataset: true,
+			// 			rect: true,
+			// 			size: true,
+			// 			scrollOffset: true
+			// 		},
+			// 		function(e) {
+			// 			// 保存包裹框高度
+			// 			box = e.height;
+			// 		}
+			// 	).exec();
+			// 	// 获取所有距离顶部大于滚轮距离页面高度的所有分类
+			// 	let tabs = this.slist.filter(item => item.top <= scrollTop).reverse();
+			// 	if (tabs.length > 0) {
+			// 		// 判断是否已经到达滚轮底部
+			// 		if (box + scrollTop + bottom >= e.detail.scrollHeight) {
+			// 			this.erjiid = this.slist[this.slist.length - 1].id;
+			// 		} else {
+			// 			this.erjiid = tabs[0].id;
+			// 		}
+			// 	}
+			// },
+			//计算右侧栏每个tab的高度等信息
+			// calcSize() {
+			// 	let h = this.bili * 215;
+			// 	this.slist.forEach(item => {
+			// 		let view = uni.createSelectorQuery().select('#main-' + item.id);
+			// 		view.fields(
+			// 			{
+			// 				size: true
+			// 			},
+			// 			data => {
+			// 				item.top = Math.ceil(h);
+			// 				h += data.height;
+			// 				item.bottom = Math.ceil(h);
+			// 			}
+			// 		).exec();
+			// 	});
+			// 	this.sizeCalcState = true;
+			// }
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
-page {
-	background-color: #ffffff;
-	height: 100%;
-	.content {
+	page {
 		background-color: #ffffff;
 		height: 100%;
+
+		.content {
+			background-color: #ffffff;
+			height: 100%;
+		}
 	}
-}
-//顶部分类
-.scroll-top {
-	width: 100%;
-	font-size: 24rpx;
-	height: 170rpx;
-	padding: 0px 25rpx;
-	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
-	.scroll-list {
-		width: 80%;
-		overflow: hidden;
-		white-space: nowrap;
-		.scoll-box {
-			margin-right: 15rpx;
+
+	//顶部分类
+	.scroll-top {
+		width: 100%;
+		font-size: 24rpx;
+		height: 170rpx;
+		padding: 0px 25rpx;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+
+		.scroll-list {
+			width: 80%;
+			overflow: hidden;
+			white-space: nowrap;
+
+			.scoll-box {
+				margin-right: 15rpx;
+				text-align: center;
+				display: inline-block;
+
+				.scoll-img {
+					width: 130rpx;
+					height: 85rpx;
+					border-radius: 100%;
+
+					image {
+						width: 85rpx;
+						height: 100%;
+						border-radius: 100%;
+					}
+				}
+
+				.scoll-name {
+					padding-top: 15rpx;
+				}
+
+				&.active {
+					color: $base-color;
+				}
+			}
+		}
+
+		.search-box {
 			text-align: center;
-			display: inline-block;
-			.scoll-img {
-				width: 130rpx;
+			margin-left: 50rpx;
+
+			.search {
+				width: 85rpx;
 				height: 85rpx;
 				border-radius: 100%;
+				margin-bottom: 15rpx;
+
 				image {
-					width: 85rpx;
+					width: 100%;
 					height: 100%;
 					border-radius: 100%;
 				}
 			}
-			.scoll-name {
-				padding-top: 15rpx;
-			}
-			&.active {
-				color: $base-color;
-			}
 		}
 	}
-	.search-box {
-		text-align: center;
-		margin-left: 50rpx;
-		.search {
-			width: 85rpx;
-			height: 85rpx;
-			border-radius: 100%;
-			margin-bottom: 15rpx;
-			image {
-				width: 100%;
-				height: 100%;
-				border-radius: 100%;
+
+	.flex-tpl {
+		display: flex;
+		justify-content: space-between;
+	}
+
+	.scroll-view {
+		margin-top: 15rpx;
+
+		.left-aside {
+			width: 190rpx;
+			background-color: rgba(245, 246, 248, 1);
+			overflow: hidden;
+			height: 100%;
+			display: block;
+			overflow-y: scroll;
+		}
+	}
+
+	.f-item {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 100%;
+		height: 100rpx;
+		font-size: 24rpx;
+		color: $font-color-base;
+		position: relative;
+
+		&.active_top {
+			background: #ffffff;
+			font-size: 26rpx;
+			font-weight: 500;
+			color: rgba(51, 51, 51, 1);
+
+			&:before {
+				content: '';
+				position: absolute;
+				left: 0;
+				top: 50%;
+				transform: translateY(-50%);
+				height: 36rpx;
+				width: 8rpx;
+				background-color: $base-color;
+				border-radius: 0 4px 4px 0;
+				opacity: 0.8;
 			}
 		}
 	}
-}
-.flex-tpl {
-	display: flex;
-	justify-content: space-between;
-}
-.scroll-view {
-	margin-top: 15rpx;
-	.left-aside {
-		width: 190rpx;
-		background-color: rgba(245, 246, 248, 1);
+
+	.right-aside {
 		overflow: hidden;
+		padding: 0rpx 20rpx;
 		height: 100%;
 		display: block;
 		overflow-y: scroll;
-	}
-}
-
-.f-item {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 100%;
-	height: 100rpx;
-	font-size: 24rpx;
-	color: $font-color-base;
-	position: relative;
-	&.active_top {
-		background: #ffffff;
-		font-size: 26rpx;
-		font-weight: 500;
-		color: rgba(51, 51, 51, 1);
-		&:before {
-			content: '';
-			position: absolute;
-			left: 0;
-			top: 50%;
-			transform: translateY(-50%);
-			height: 36rpx;
-			width: 8rpx;
-			background-color: $base-color;
-			border-radius: 0 4px 4px 0;
-			opacity: 0.8;
-		}
-	}
-}
-
-.right-aside {
-	overflow: hidden;
-	padding: 0rpx 20rpx;
-	height: 100%;
-	display: block;
-	overflow-y: scroll;
-	width: 100%;
-	.image {
 		width: 100%;
-		padding-bottom: 15rpx;
-		.imageLV {
+
+		.image {
 			width: 100%;
-			height: 200rpx;
-		}
-	}
-	.tlist-box {
-		.tlistname {
-			font-size: 24rpx;
-			padding: 25rpx 25rpx;
-			border-top: 2rpx solid rgba(238, 238, 238, 1);
-			border-bottom: 2rpx solid rgba(238, 238, 238, 1);
-		}
-		.tlist-list.flex_item {
-			height: 0;
-			min-height: 240rpx;
-			align-items: stretch;
+			padding-bottom: 15rpx;
+
+			.imageLV {
+				width: 100%;
+				height: 200rpx;
+			}
 		}
-		.tlist-list {
-			padding: 25rpx 0rpx;
-			position: relative;
-			.tlist-img {
-				width: 190rpx;
-				position: relative;
-				.img {
-					width: 190rpx;
-					height: 190rpx;
-				}
+
+		.tlist-box {
+			.tlistname {
+				font-size: 24rpx;
+				padding: 25rpx 25rpx;
+				border-top: 2rpx solid rgba(238, 238, 238, 1);
+				border-bottom: 2rpx solid rgba(238, 238, 238, 1);
 			}
-			.sell-out {
-				position: absolute;
-				width: 190rpx;
-				height: 190rpx;
-				background: rgba(255, 255, 255, 0.4);
-				text-align: center;
-				text {
-					line-height: 190rpx;
-					background: rgba(0, 0, 0, 0.5);
-					color: #ffffff;
-					padding: 10rpx 25rpx;
-					border-radius: 25rpx;
-					font-size: 20rpx;
-				}
+
+			.tlist-list.flex_item {
+				height: 0;
+				min-height: 240rpx;
+				align-items: stretch;
 			}
-			.tlist-info {
-				font-size: 24rpx;
-				width: 0;
-				flex-grow: 1;
-				padding-left: 25rpx;
-				padding-right: 25rpx;
-				height: 100%;
+
+			.tlist-list {
+				padding: 25rpx 0rpx;
 				position: relative;
-				line-height: 1;
-				.bottom_border {
-					position: absolute;
-					border-bottom: 1px solid #eeeeee;
-					left: 25rpx;
-					bottom: 0;
-					height: 2rpx;
-					width: 100%;
-				}
-				.name {
-					color: #141821;
-					font-weight: 500;
-					font-size: 26rpx;
-					line-height: 1.2;
-				}
-				.info {
-					margin: 10rpx 0rpx;
-					height: 30rpx;
-					color: #979797;
-					font-size: 24rpx;
-				}
-				.tipBox {
-					height: 50rpx;
-					margin: 10rpx 0;
-					.tip {
-						padding: 10rpx 0rpx;
-						text {
-							border: 2rpx solid #ff1a27;
-							color: #ff1a27;
-							border-radius: 5rpx;
-							font-size: 18rpx;
-							padding: 5rpx 10rpx;
-							margin-right: 15rpx;
-						}
+
+				.tlist-img {
+					width: 190rpx;
+					position: relative;
+
+					.img {
+						width: 190rpx;
+						height: 190rpx;
 					}
-					
 				}
-				
-				.tlist-price {
+
+				.sell-out {
 					position: absolute;
-					left: 0rpx;
+					width: 190rpx;
+					height: 190rpx;
+					background: rgba(255, 255, 255, 0.4);
+					text-align: center;
+
+					text {
+						line-height: 190rpx;
+						background: rgba(0, 0, 0, 0.5);
+						color: #ffffff;
+						padding: 10rpx 25rpx;
+						border-radius: 25rpx;
+						font-size: 20rpx;
+					}
+				}
+
+				.tlist-info {
+					font-size: 24rpx;
+					width: 0;
+					flex-grow: 1;
 					padding-left: 25rpx;
 					padding-right: 25rpx;
-					bottom: 10rpx;
-					width: 100%;
-					.stock {
+					height: 100%;
+					position: relative;
+					line-height: 1;
+
+					.bottom_border {
+						position: absolute;
+						border-bottom: 1px solid #eeeeee;
+						left: 25rpx;
+						bottom: 0;
+						height: 2rpx;
+						width: 100%;
+					}
+
+					.name {
+						color: #141821;
+						font-weight: 500;
 						font-size: 26rpx;
-						color: $font-color-light;
-						.stock-num {
-							padding-left: 7rpx;
-							font-size: 22rpx;
-							border-radius: 5rpx;
-							height: 32rpx;
-							line-height: 32rpx;
+						line-height: 1.2;
+					}
+
+					.info {
+						margin: 10rpx 0rpx;
+						height: 30rpx;
+						color: #979797;
+						font-size: 24rpx;
+					}
+
+					.tipBox {
+						height: 50rpx;
+						margin: 10rpx 0;
+
+						.tip {
+							padding: 10rpx 0rpx;
+
+							text {
+								border: 2rpx solid #ff1a27;
+								color: #ff1a27;
+								border-radius: 5rpx;
+								font-size: 18rpx;
+								padding: 5rpx 10rpx;
+								margin-right: 15rpx;
+							}
 						}
+
 					}
-					.price-box {
-						.price {
-							color: #ff1a27;
-							.blod {
-								font-size: 35rpx;
-								font-weight: bold;
+
+					.tlist-price {
+						position: absolute;
+						left: 0rpx;
+						padding-left: 25rpx;
+						padding-right: 25rpx;
+						bottom: 10rpx;
+						width: 100%;
+
+						.stock {
+							font-size: 26rpx;
+							color: $font-color-light;
+
+							.stock-num {
+								padding-left: 7rpx;
+								font-size: 22rpx;
+								border-radius: 5rpx;
+								height: 32rpx;
+								line-height: 32rpx;
 							}
-							.fen {
-								color: #838691;
+						}
+
+						.price-box {
+							.price {
+								color: #ff1a27;
+
+								.blod {
+									font-size: 35rpx;
+									font-weight: bold;
+								}
+
+								.fen {
+									color: #838691;
+								}
 							}
 						}
-					}
-					.gocar {
-						width: 50rpx;
-						height: 50rpx;
-						align-self: flex-end;
-						image {
-							width: 100%;
-							height: 100%;
+
+						.gocar {
+							width: 50rpx;
+							height: 50rpx;
+							align-self: flex-end;
+
+							image {
+								width: 100%;
+								height: 100%;
+							}
 						}
 					}
 				}
 			}
 		}
-	}
-	.tlist {
-		.cate {
-			padding: 25rpx 0rpx;
-			color: #666666;
-			font-size: 24rpx;
+
+		.tlist {
+			.cate {
+				padding: 25rpx 0rpx;
+				color: #666666;
+				font-size: 24rpx;
+			}
 		}
 	}
-}
-.s-item {
-	display: flex;
-	align-items: center;
-	height: 70rpx;
-	padding-top: 8rpx;
-	font-size: 28rpx;
-	color: $font-color-dark;
-}
-.t-list {
-	display: flex;
-	flex-wrap: wrap;
-	border-radius: 15rpx;
-	width: 100%;
-	background: #fff;
-	padding-top: 12rpx;
-	&:after {
-		content: '';
-		flex: 99;
-		height: 0;
+
+	.s-item {
+		display: flex;
+		align-items: center;
+		height: 70rpx;
+		padding-top: 8rpx;
+		font-size: 28rpx;
+		color: $font-color-dark;
 	}
-}
-.t-item {
-	flex-shrink: 0;
-	display: flex;
-	justify-content: center;
-	align-items: center;
-	flex-direction: column;
-	width: 171rpx;
-	font-size: 26rpx;
-	color: #666;
-	padding-bottom: 20rpx;
-
-	image {
-		width: 140rpx;
-		height: 140rpx;
+
+	.t-list {
+		display: flex;
+		flex-wrap: wrap;
+		border-radius: 15rpx;
+		width: 100%;
+		background: #fff;
+		padding-top: 12rpx;
+
+		&:after {
+			content: '';
+			flex: 99;
+			height: 0;
+		}
+	}
+
+	.t-item {
+		flex-shrink: 0;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-direction: column;
+		width: 171rpx;
+		font-size: 26rpx;
+		color: #666;
+		padding-bottom: 20rpx;
+
+		image {
+			width: 140rpx;
+			height: 140rpx;
+		}
 	}
-}
-</style>
+</style>

+ 4 - 3
pages/home/index.vue

@@ -35,7 +35,7 @@
 				</view>
 				<view class="item-title">附近门店</view>
 			</view>
-			<view class="cate-item flex" @click="openKf">
+			<view class="cate-item flex" @click="navto('/pages/public/artList')">
 				<view class="img-wrapper flex">
 					<image src="../../static/icon/index3.png" mode=""></image>
 				</view>
@@ -135,7 +135,7 @@
 	export default {
 		data() {
 			return {
-				text: 'shxsophina', //客服微信
+				text: '', //客服微信
 				pageProportion: 0, //保存页面基于750宽度的比例
 				carouselList: [], //轮播列表
 				goodList: [], //精选商品列表
@@ -246,6 +246,7 @@
 						let goods = data.info;
 						that.carouselList = data.banner;
 						that.goodList = data.info.bastList;
+						that.text = data.kf;
 						console.log(that.carouselList)
 						uni.stopPullDownRefresh();
 					})
@@ -713,7 +714,7 @@
 			.right{
 				height: 170rpx;
 				position: relative;
-				
+				flex-grow: 1;
 				.good-name {
 					font-size: 28rpx;
 					font-weight: bold;

+ 9 - 1
pages/home/order.vue

@@ -120,6 +120,14 @@
 					},
 					{
 						state: 1,
+						text: '待发货',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+					{
+						state: 2,
 						text: '待收货',
 						loadingType: 'more',
 						orderList: [],
@@ -528,7 +536,7 @@
 		}
 	}
 
-	/deep/ .empty-content {
+	::v-deep .empty-content {
 		background: transparent;
 	}
 </style>

+ 5 - 5
pages/home/user.vue

@@ -15,12 +15,12 @@
 						<text>我的余额</text>
 					</view>
 					<view class="tj-item flex-line" @click="navTo('/pages/water/myWaterList')">
-						<text class="num">{{userInfo.certificate_count }}</text>
+						<text class="num">{{userInfo.certificate_count||0 }}</text>
 						<text>我的水票</text>
 
 					</view>
 					<view class="tj-item flex-line" @click="navTo('/pages/water/deposit')">
-						<text class="num">{{ +userInfo.certificate_pledge || '0.00' }}</text>
+						<text class="num">{{ userInfo.certificate_pledge*1 || '0.00' }}</text>
 						<text>我的押金</text>
 					</view>
 				</view>
@@ -199,9 +199,9 @@
 		mapState,
 		mapMutations
 	} from 'vuex';
-	import {
-		share
-	} from '@/api/wx';
+	// import {
+	// 	share
+	// } from '@/api/wx';
 	import {
 		getUser
 	} from '@/api/user.js';

+ 6 - 1
pages/order/createOrder.vue

@@ -466,6 +466,10 @@
 					this.$api.msg('请选择收货地址');
 					return false;
 				}
+				if (!this.addressData.phone) {
+					this.$api.msg('请填写手机号');
+					return false;
+				}
 				// 判断是否余额不足
 				if (obj.payType == 'yue' && +obj.now_money < obj.payPrice) {
 					uni.showModal({
@@ -475,6 +479,7 @@
 					});
 					return;
 				}
+				
 				if (!obj.day.day&&obj.tabCurrentIndex==1) {
 					uni.showModal({
 						title: '提示',
@@ -1115,7 +1120,7 @@
 		}
 	}
 
-	/deep/ .uni-switch-input {
+	::v-deep .uni-switch-input {
 		&.uni-switch-input-checked {
 			border-color: $base-color !important;
 			background-color: $base-color !important;

+ 66 - 17
pages/order/orderDetail.vue

@@ -9,11 +9,11 @@
 				<view class="express-frame">
 					<view>
 						<view style="display: flex;">
-							<text class="express-text">快递名:</text>
+							<text class="express-text">骑手:</text>
 							{{ item.delivery_name }}
 						</view>
 						<view style="display: flex;">
-							<text class="express-text">快递单号:</text>
+							<text class="express-text">联系方式:</text>
 							{{ item.delivery_id }}
 						</view>
 					</view>
@@ -21,6 +21,26 @@
 				</view>
 			</view>
 		</view>
+		<view v-if="item.delivery_kf_info&& item.delivery_kf_info.latitude && item.status <=2 &&item.shipping_type == 1 && item.status > 0">
+			<map :latitude="item.user_address_info.latitude" :longitude="item.user_address_info.longitude" :scale="13" class="map-wrap" :markers="[
+				{
+				id: 0,
+				latitude: item.delivery_kf_info.latitude,
+				longitude: item.delivery_kf_info.longitude,
+				iconPath: '/static/icon/worker.png',
+				width:40,
+				height: 30
+			},
+			{
+				id: 1,
+				latitude: item.user_address_info.latitude,
+				longitude: item.user_address_info.longitude,
+				iconPath: '/static/icon/local.png',
+				width: 20,
+				height: 30
+			}
+			]"></map>
+		</view>
 		<view class="address-box position-relative">
 			<view class="address-top flex">
 				<view class="title">{{ item.real_name }}</view>
@@ -139,8 +159,8 @@
 					<text class="title" v-if="item.delivery_type == 'send'">送货人员:</text>
 					<view class="text">{{ item.delivery_name }}</view>
 				</view>
-				<view v-if="status._type != 1 && status._type != 0" class="buttom-right" @click="towuliu(item)">查看物流
-				</view>
+				<!-- <view v-if="status._type != 1 && status._type != 0" class="buttom-right" @click="towuliu(item)">查看物流
+				</view> -->
 			</view>
 			<view class="item flex">
 				<view class="title-left flex">
@@ -165,7 +185,7 @@
 			<view class="buttomBottom" @click="shopNext" >
 				导航
 			</view>
-			<view v-if="item._status._title=='待收货'" class="buttomBottom bgYellow flex-grow-true" @click="send">
+			<view v-if="item._status._title=='待收货' && userInfo.uid == item.delivery_kf_info.uid" class="buttomBottom bgYellow flex-grow-true" @click="send">
 				确认送达
 			</view>
 		</view>
@@ -175,12 +195,16 @@
 <script>
 	import util from '@/utils/util.js';
 	import {
-		orderDetail
+		orderDetail,
+		adminOrderDetail
 	} from '@/api/order.js';
 	import {
 		take_delivery,
 		staff_location
 	} from '@/api/water.js';
+	import {
+		mapState
+	} from 'vuex';
 	export default {
 		filters: {
 			orderType: function(item) {
@@ -197,6 +221,8 @@
 		},
 		data() {
 			return {
+				longitude:uni.getStorageSync('CACHE_LONGITUDE'),
+				latitude:uni.getStorageSync('CACHE_LATITUDE'),
 				refund: '', //退款理由
 				reason: '', //备注
 				value: ['1', '2', '3', '4', '5', '6', '7', '8', 9, 10, 11, 12, 13],
@@ -220,6 +246,7 @@
 			}
 		},
 		computed: {
+			...mapState('user',['userInfo']),
 			payAllMoney() {
 				return this.vipMoney + +this.item.total_price;
 			}
@@ -314,17 +341,32 @@
 			// 载入订单详细
 			loadOrder() {
 				let obj = this;
-				orderDetail({}, obj.orderId).then(e => {
-					obj.item = e.data;
-					obj.item.cartInfo.forEach(e => {
-						// 计算vip优惠金额
-						obj.vipMoney += e.vip_truePrice;
-
+				if(this.type == 1) {
+					orderDetail({}, obj.orderId).then(e => {
+						obj.item = e.data;
+						obj.item.cartInfo.forEach(e => {
+							// 计算vip优惠金额
+							obj.vipMoney += e.vip_truePrice;
+					
+						});
+						obj.item.user_address = obj.item.user_address.trim();
+						this.status = e.data._status;
+						console.log(e);
 					});
-					obj.item.user_address = obj.item.user_address.trim();
-					this.status = e.data._status;
-					console.log(e);
-				});
+				}
+				if(this.type == 2) {
+					adminOrderDetail({}, obj.orderId).then(e => {
+						obj.item = e.data;
+						obj.item.cartInfo.forEach(e => {
+							// 计算vip优惠金额
+							obj.vipMoney += e.vip_truePrice;
+					
+						});
+						obj.item.user_address = obj.item.user_address.trim();
+						this.status = e.data._status;
+						console.log(e);
+					});
+				}
 			},
 			// 查看快递单号
 			towuliu(item) {
@@ -656,7 +698,8 @@
 		right: 0;
 		border-top: 1px solid $border-color-light;
 		.buttomBottom {
-			width: 50%;
+			// width: 50%;
+			flex: 1;
 			text-align: center;
 			padding: 30rpx 0;
 			line-height: 1;
@@ -671,4 +714,10 @@
 			}
 		}
 	}
+	.map-wrap {
+		width: 700rpx;
+		height: 400rpx;
+		border-radius: 20rpx;
+		margin: 20rpx auto;
+	}
 </style>

+ 3 - 3
pages/product/common/contentText.vue

@@ -26,11 +26,11 @@ export default {
 	.detail-desc {
 		margin-top: 14rpx;
 		background: #fff;
-		/deep/ img {
+		::v-deep img {
 			max-width: 100% !important;
 			display: inline !important;
 		}
-		/deep/ div {
+		::v-deep div {
 			max-width: 100% !important;
 		}
 		.d-header {
@@ -61,7 +61,7 @@ export default {
 		}
 	}
 	/* 商品详情中限制图片大小 */
-	/deep/ .rich-img {
+	::v-deep .rich-img {
 		width: 100% !important;
 		height: auto;
 	}

+ 3 - 3
pages/product/product.vue

@@ -623,12 +623,12 @@
 		height: 160rpx;
 	}
 
-	/deep/ .iconenter {
+	::v-deep .iconenter {
 		font-size: $font-base + 2rpx;
 		color: #888;
 	}
 
-	/deep/ .con_image {
+	::v-deep .con_image {
 		width: 130rpx;
 		height: 130rpx;
 		display: inline-block;
@@ -641,7 +641,7 @@
 	}
 
 	/* 商品详情中限制图片大小 */
-	/deep/ .rich-img {
+	::v-deep .rich-img {
 		width: 100% !important;
 		height: auto;
 	}

+ 117 - 105
pages/public/artDetail.vue

@@ -4,90 +4,96 @@
 		<view class="time">{{ item.add_time }}</view>
 		<view class="main" v-for="(ls, index) in item.content" :key="index">
 			<view v-if="ls.type == 'rich-text'" v-html="ls.value" class="main"></view>
-			<video v-if="ls.type == 'video' && ls.value" :src="ls.value" style="width:100%;height: 300px" frameborder="0"></video>
+			<video v-if="ls.type == 'video' && ls.value" :src="ls.value" style="width:100%;height: 300px"
+				frameborder="0"></video>
 		</view>
 	</view>
 </template>
 
 <script>
-import { details } from '@/api/user.js';
-export default {
-	data() {
-		return {
-			id: '',
-			item: ''
-		};
-	},
-	onLoad(option) {
-		this.id = option.id;
-		this.loadData();
-	},
-	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: '水箱计算', // 默认是小程序的名称(可以写slogan等)
-			path: url + '?id=' + item.id, // 默认是当前页面,必须是以‘/’开头的完整路径
-			imageUrl: '',
-			success: function(res) {
-				// 转发成功之后的回调
-				if (res.errMsg == 'shareAppMessage:ok') {}
-			},
-			fail: function() {
-				// 转发失败之后的回调
-				if (res.errMsg == 'shareAppMessage:fail cancel') {
-					// 用户取消转发
-				} else if (res.errMsg == 'shareAppMessage:fail') {
-					// 转发失败,其中 detail message 为详细失败信息
-				}
-			}
-		};
-		return shareObj;
-	},
-	methods: {
-		loadData() {
-			details({}, this.id).then(({ data }) => {
-				console.log(data);
-				data.content = data.content.replace(/<img/g, '<img class="rich-img"').replace(/<p>\s*<img/g, '<p class="pHeight"><img').replace(/<div/g, '<div style="max-width: 50% !important;"');
-				data.content = this.getVideo(data.content);
-				this.item = data;
-			});
+	import {
+		details
+	} from '@/api/index.js';
+	export default {
+		data() {
+			return {
+				id: '',
+				item: ''
+			};
 		},
-		// 富文本视频解析
-		getVideo(data) {
-			let videoList = [];
-			let videoReg = /<video.*?(?:>|\/>)/gi; //匹配到字符串中的 video 标签
-			let srcReg = /src=[\'\"]?([^\'\"]*)[\'\"]?/i; //匹配到字符串中的 video 标签 的路径
-			let arr = data.match(videoReg) || []; // arr 为包含所有video标签的数组
-			let articleList = data.split('</video>'); // 把字符串  从视频标签分成数组
-			arr.forEach((item, index) => {
-				var src = item.match(srcReg);
-				videoList.push(src[1]); //所要显示的字符串中 所有的video 标签 的路径
-			});
-			let needArticleList = [];
-			articleList.forEach((item, index) => {
-				if (item != '' && item != undefined) {
-					//  常见的标签渲染
-					needArticleList.push({
-						type: 'rich-text',
-						value: item + '</video>'
-					});
-				}
-				let articleListLength = articleList.length; // 插入到原有video 标签位置
-				if (index < articleListLength && videoList[index] != undefined) {
-					needArticleList.push({
-						type: 'video',
-						value: videoList[index]
-					});
+		onLoad(option) {
+			this.id = option.id;
+			this.loadData();
+		},
+		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: '水箱计算', // 默认是小程序的名称(可以写slogan等)
+				path: url + '?id=' + item.id, // 默认是当前页面,必须是以‘/’开头的完整路径
+				imageUrl: '',
+				success: function(res) {
+					// 转发成功之后的回调
+					if (res.errMsg == 'shareAppMessage:ok') {}
+				},
+				fail: function() {
+					// 转发失败之后的回调
+					if (res.errMsg == 'shareAppMessage:fail cancel') {
+						// 用户取消转发
+					} else if (res.errMsg == 'shareAppMessage:fail') {
+						// 转发失败,其中 detail message 为详细失败信息
+					}
 				}
-			});
-			return needArticleList;
+			};
+			return shareObj;
+		},
+		methods: {
+			loadData() {
+				details(this.id).then(({
+					data
+				}) => {
+					console.log(data);
+					data.content = data.content.replace(/<img/g, '<img class="rich-img"').replace(/<p>\s*<img/g,
+						'<p class="pHeight"><img').replace(/<div/g, '<div style="max-width: 50% !important;"');
+					data.content = this.getVideo(data.content);
+					this.item = data;
+				});
+			},
+			// 富文本视频解析
+			getVideo(data) {
+				let videoList = [];
+				let videoReg = /<video.*?(?:>|\/>)/gi; //匹配到字符串中的 video 标签
+				let srcReg = /src=[\'\"]?([^\'\"]*)[\'\"]?/i; //匹配到字符串中的 video 标签 的路径
+				let arr = data.match(videoReg) || []; // arr 为包含所有video标签的数组
+				let articleList = data.split('</video>'); // 把字符串  从视频标签分成数组
+				arr.forEach((item, index) => {
+					var src = item.match(srcReg);
+					videoList.push(src[1]); //所要显示的字符串中 所有的video 标签 的路径
+				});
+				let needArticleList = [];
+				articleList.forEach((item, index) => {
+					if (item != '' && item != undefined) {
+						//  常见的标签渲染
+						needArticleList.push({
+							type: 'rich-text',
+							value: item + '</video>'
+						});
+					}
+					let articleListLength = articleList.length; // 插入到原有video 标签位置
+					if (index < articleListLength && videoList[index] != undefined) {
+						needArticleList.push({
+							type: 'video',
+							value: videoList[index]
+						});
+					}
+				});
+				return needArticleList;
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
@@ -96,35 +102,41 @@ export default {
 		min-height: 100%;
 		height: auto;
 	}
-.center {
-	min-height: 100%;
-	height: auto;
-	background: #ffffff;
-	padding: 30rpx 24rpx 0;
-}
-.title {
-	font-size: 32rpx;
-	font-family: PingFang SC;
-	font-weight: bold;
-	color: #333333;
-}
-.time {
-	font-size: 24rpx;
-	font-family: PingFangSC;
-	font-weight: 500;
-	color: #999999;
-	margin-top: 40rpx;
-}
-.main {
-	margin-top: 60rpx;
-}
-/deep/ .main {
-	.rich-img {
-		width: 100% !important;
+
+	.center {
+		min-height: 100%;
 		height: auto;
+		background: #ffffff;
+		padding: 30rpx 24rpx 0;
 	}
-	* {
-		max-width: 100% !important;
+
+	.title {
+		font-size: 32rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #333333;
+	}
+
+	.time {
+		font-size: 24rpx;
+		font-family: PingFangSC;
+		font-weight: 500;
+		color: #999999;
+		margin-top: 40rpx;
+	}
+
+	.main {
+		margin-top: 60rpx;
+	}
+
+	::v-deep .main {
+		.rich-img {
+			width: 100% !important;
+			height: auto;
+		}
+
+		* {
+			max-width: 100% !important;
+		}
 	}
-}
-</style>
+</style>

+ 1 - 1
pages/public/artList.vue

@@ -21,7 +21,7 @@
 </template>
 
 <script>
-import { article } from '@/api/user.js';
+import { article } from '@/api/index.js';
 export default {
 	data() {
 		return {

+ 1 - 1
pages/public/workwork.vue

@@ -18,7 +18,7 @@
 			<text class="xy" @click="navTo('/pages/public/userAgreement')">《用户协议》</text>		
 		</view>
 		<!-- <view class="text margin-t-30">
-			母婴界严选是由浙江绿津智能科技有限公司打造的新一代智能电动车品牌,电慧安是一家集智能设备制造、软件开发、销售贸易、物带动互、社会服务为一体的高科技企业,公司以便、惠、安为核心发展理念,以做物联网产业的推动者,互联网行业的服务者为立企初衷。 公司通过不断创新商业模式,打造产品和服务品牌,以生产销售智能型电动车为主,研发全智能电动车软硬件配套,打造绿津自主品牌,致力于成为新一代智能电动车领域的第一品牌。
+			小井康泉是由浙江绿津智能科技有限公司打造的新一代智能电动车品牌,电慧安是一家集智能设备制造、软件开发、销售贸易、物带动互、社会服务为一体的高科技企业,公司以便、惠、安为核心发展理念,以做物联网产业的推动者,互联网行业的服务者为立企初衷。 公司通过不断创新商业模式,打造产品和服务品牌,以生产销售智能型电动车为主,研发全智能电动车软硬件配套,打造绿津自主品牌,致力于成为新一代智能电动车领域的第一品牌。
 		</view> -->
 	</view>
 </template>

+ 1 - 1
pages/public/wxLogin.vue

@@ -92,7 +92,7 @@
 				if (!that.checked) {
 					uni.showModal({
 						title: '提示',
-						content: '请先阅读同意《母婴界严选服务》《隐私条例》',
+						content: '请先阅读同意《小井康泉服务》《隐私条例》',
 						showCancel: false,
 					});
 					return;

+ 9 - 0
pages/set/address.vue

@@ -159,6 +159,13 @@
 			// #endif
 			// #ifdef H5 || MP
 			addAddressOn(data) {
+				uni.showModal({
+					title: '返回',
+					content: JSON.stringify(data),
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
 				let that = this;
 				addressEdit({
 					real_name: data.userName,
@@ -180,6 +187,8 @@
 					setTimeout(function() {
 						that.loadAddress();
 					}, 800);
+				}).catch((err)=>{
+					console.log(err)
 				});
 			
 			}

+ 11 - 5
pages/set/addressManage.vue

@@ -28,13 +28,13 @@
 						<pickerAddress class="input" @change="onCityClick">{{addressDetail||'请选择地址'}}</pickerAddress>
 					</view>
 				</view>
-				<view class="flex listItem" >
-					<view class="flex titleBox">
+				<view class="flex listItem">
+					<view class="flex titleBox" @click="openAddress()">
 						<text class="title">定位</text>
 					</view>
-					<view class="right flex">
-						<input :disabled='true' class="input" type="text" v-model="addressData.locate_address" placeholder="请选择定位"
-							placeholder-class="placeholder"  @click="openAddress"/>
+					<view class="right flex" @click="openAddress()">
+						<input class="input" type="text" v-model="addressData.locate_address" placeholder="请选择定位"
+							placeholder-class="placeholder" />
 					</view>
 				</view>
 				<view class="flex listItem" >
@@ -134,7 +134,10 @@
 			},
 			//地图选择地址
 			openAddress() {
+				console.log('dakaiditu')
 				uni.chooseLocation({
+					latitude:uni.getStorageSync('CACHE_LATITUDE'),
+					longitude: uni.getStorageSync('CACHE_LONGITUDE'),
 					success: data => {
 						console.log(data);
 						this.addressData.area = data.name;
@@ -142,6 +145,9 @@
 						this.addressData.longitude = data.longitude;
 						this.addressData.latitude = data.latitude;
 						
+					},
+					fail(err) {
+						cosole.log(err,'errr')
 					}
 				});
 			},

+ 1 - 1
pages/user/award/withdrawal.vue

@@ -354,7 +354,7 @@
 		}
 	}
 
-	/deep/ .uni-radio-input {
+	::v-deep .uni-radio-input {
 		width: 45rpx;
 		height: 45rpx;
 	}

+ 1 - 1
pages/water/myWaterList.vue

@@ -249,7 +249,7 @@
 			}
 		}
 	}
-	/deep/ .empty-content{
+	::v-deep .empty-content{
 		background: transparent;
 		position: absolute;
 	}

+ 6 - 1
pages/water/waterDetail.vue

@@ -76,6 +76,9 @@
 	import {
 		getUserInfo
 	} from '@/api/user.js';
+	// #ifdef H5
+	import weixinObj from "@/plugin/jweixin-module/index.js";
+	// #endif
 	export default {
 		data() {
 			return {
@@ -198,7 +201,7 @@
 						}
 					} else {
 						// 订单支付创建
-						const order = orderPay({
+						const order =await orderPay({
 							uni: data.result.orderId,
 							// #ifdef H5
 							from: 'weixin', //来源
@@ -211,6 +214,7 @@
 							// #endif
 							paytype: obj.payType //支付类型  weixin-微信 yue-余额
 						})
+						console.log(order,'order')
 						obj.successOrder(order)
 					}
 				} catch (e) {
@@ -226,6 +230,7 @@
 			//订单支付创建成功回调处理
 			successOrder(e) {
 				const obj = this;
+				console.log(e,'eee')
 				// 判断是否微信小程序支付
 				if (obj.payType == 'weixin') {
 					// #ifdef H5 || MP

+ 10 - 7
pages/water/waterList.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="good-list">
 		<view class="good flex" v-for="item in navList[tabCurrentIndex].orderList">
-			<image :src="item.image" mode="" class="good-image"></image>
+			<image :src="item.image" mode="scaleToFill" class="good-image"></image>
 			<view class="right">
 				<view class="good-name ">
 					<view class="clamp2">
@@ -15,11 +15,9 @@
 					<view class="price">
 						¥{{item.price}}/{{item.unit_name}}
 					</view>
-					<navigator :url="'/pages/water/waterDetail?id='+item.id">
-						<view class="xl">
-							立即购买
-						</view>
-					</navigator>
+					<view class="xl" @click="navto('/pages/water/waterDetail?id='+item.id)">
+						立即购买
+					</view>
 				</view>
 			</view>
 		</view>
@@ -52,6 +50,11 @@
 			this.getGoodList();
 		},
 		methods: {
+			navto(url){
+				uni.navigateTo({
+					url,
+				});
+			},
 			// 加载数据
 			getGoodList(source) {
 				//这里是将订单挂载到tab列表下
@@ -134,7 +137,7 @@
 			.right {
 				height: 180rpx;
 				position: relative;
-
+				flex-grow: 1;
 				.good-name {
 					font-size: 28rpx;
 					font-weight: bold;

二進制
static/icon/local.png


二進制
static/icon/worker.png


+ 7 - 3
store/index.js

@@ -6,9 +6,13 @@ Vue.use(Vuex)
 
 const store = new Vuex.Store({
 	state: {
-		// baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置 
-		baseURL:'http://xjkqs.tabsoft.cn',//请求地址配置 
-		// baseURL:'http://dp.frp.shuibo.net',//请求地址配置 
+		// baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置
+		// #ifndef H5
+		baseURL: 'http://www.xjkqs.cn', //请求地址配置 
+		// #endif
+		// #ifdef H5
+		baseURL: window.location.protocol + "//" + window.location.host,//请求地址配置 
+		// #endif
 		urlFile:'/index',//项目部署所在文件夹
 		hasLogin:false,
 		// #ifdef H5

+ 12 - 10
utils/wxAuthorized.js

@@ -1,6 +1,6 @@
 import {
 	wechatConfig,
-	share
+	// share
 } from '@/api/wx';
 // 加载日志
 import * as log from './log.js'
@@ -66,6 +66,7 @@ function weixinSq() {
 			'&response_type=code&scope=snsapi_userinfo&state=' +
 			new Date().getTime() +
 			'#wechat_redirect';
+			console.log(ul)
 		window.location.href = url;
 	} catch (e) {
 		console.log(e);
@@ -83,10 +84,11 @@ export async function weixindata(config) {
 		}
 		if (router.mode === "history") {
 			// 在ios中时候注册为微信刚进入时候的页面
+			const ur = window.location.protocol + "//" + window.location.host+window.location.pathname;
 			if (!window.entryUrl) {
-				window.entryUrl = location.href.split('#')[0]
+				window.entryUrl =  ur;
 			}
-			url = isAndroid() ? location.href.split('#')[0] : window.entryUrl;
+			url = isAndroid() ? ur : window.entryUrl;
 		}
 		if (router.mode === "hash") {
 			url = location.href.split('#')[0];
@@ -151,13 +153,13 @@ export function shareLoad(config) {
 				if (shareData) {
 					shareFun()
 				} else {
-					// 请求获取默认数据
-					share({}).then(({
-						data
-					}) => {
-						shareData = data.data
-						shareFun()
-					});
+					// // 请求获取默认数据
+					// share({}).then(({
+					// 	data
+					// }) => {
+					// 	shareData = data.data
+					// 	shareFun()
+					// });
 				}
 			}
 		})