lhl 2 дней назад
Родитель
Сommit
388ad98090

+ 71 - 0
api/good.js

@@ -0,0 +1,71 @@
+import request from '@/utils/request'
+
+/**
+ * 获取商品分类列表
+ * @param {Object} data
+ * @param {Number} data.page
+ * @param {Number} data.pageSize
+ * @param {Number} data.pid
+ */
+export function getCategoryList(data) {
+	return request({
+		url: '/api/product/categoryList',
+		method: 'get',
+		data
+	});
+}
+
+/**
+ * 获取商品列表
+ * @param {Object} data
+ * @param {Number} data.page
+ * @param {Number} data.pageSize
+ * @param {Number} data.category_id
+ * @param {String} data.keyword
+ */
+export function getProductList(data) {
+	return request({
+		url: '/api/product/productList',
+		method: 'get',
+		data
+	});
+}
+
+/**
+ * 获取商品详情
+ * @param {Number} id
+ */
+export function getProductDetail(id) {
+	return request({
+		url: '/api/product/productDetail?id=' + id,
+		method: 'get'
+	});
+}
+
+/**
+ * 加入购物车
+ * @param {Object} data
+ * @param {Number} data.cart_num
+ * @param {Number} data.product_id
+ */
+export function addToCart(data) {
+	return request({
+		url: '/api/cart/add',
+		method: 'post',
+		data
+	});
+}
+
+/**
+ * 创建订单
+ * @param {Object} data
+ * @param {Number} data.cart_ids
+ * @param {Number} data.address_id
+ */
+export function createOrder(data) {
+	return request({
+		url: '/api/shop/createOrder',
+		method: 'post',
+		data
+	});
+}

+ 71 - 0
api/index.js

@@ -108,4 +108,75 @@ export function getCourseList(data) {
 		method: 'post',
 		method: 'post',
 		data
 		data
 	})
 	})
+}
+
+/*
+ * 贴子列表
+ * @param {object} data
+ * @param {number} data.page - 页码
+ * @param {number} data.pageSize - 每页数量
+ */
+export function getPostList(data) {
+	return request({
+		url: '/api/forum/postList',
+		method: 'get',
+		params: data
+	})
+}
+
+/*
+ * 贴子详情
+ * @param {object} data
+ * @param {number} data.id - 贴子id
+ */
+export function getPostDetail(data) {
+	return request({
+		url: '/api/forum/postDetail?id=' + data.id,
+		method: 'get',
+	})
+}
+
+/*
+ * 发送评价
+ * @param {object} data
+ * @param {number} data.post_id - 贴子id
+ * @param {string} data.content - 评价内容
+ * 
+ */
+export function addComment(data) {
+	return request({
+		url: '/api/forum/addComment',
+		method: 'post',
+		data
+	})
+}
+
+/*
+ *发帖
+ * @param {object} data
+ * @param {string} data.title - 标题
+ * @param {string} data.content - 内容
+ * @param {string} data.images - 图片
+ */
+export function addPost(data) {
+	return request({
+		url: '/api/forum/createPost',
+		method: 'post',
+		data
+	})
+}
+
+/**
+ * 删除评论
+ * @param {object} data
+ * @param {number} data.id - 评论id
+ * @param {number} data.uid - 用户id
+ * 
+ */
+export function deleteComment(data) {
+	return request({
+		url: '/api/forum/deleteComment',
+		method: 'get',
+		data
+	})
 }
 }

+ 9 - 0
api/set.js

@@ -41,4 +41,13 @@ export function binding(data) {
 		method: 'post',
 		method: 'post',
 		data
 		data
 	});
 	});
+}
+
+//补充定位
+export function addLng(data) {
+	return request({
+		url: '/api/user/lal',
+		method: 'post',
+		data
+	});
 }
 }

+ 211 - 33
api/user.js

@@ -269,37 +269,215 @@ export function getcar_status(data) {
 		data
 		data
 	});
 	});
 }
 }
-
-//获取分享海报
-export function getWxmpInviteQrcode(data) {
-	return request({
-		url: '/api/user/getWxmpInviteQrcode',
-		method: 'post',
-		data
-	});
-}
-
-//获取下级
-export function getChildList(data) {
-	return request({
-		url: '/api/user/getChildList',
-		method: 'post',
-		data
-	});
-}
-
-export function getInviterRanking(data) {
-	return request({
-		url: '/api/user/getInviterRanking',
-		method: 'post',
-		data
-	});
-}
-// 激活key
-export function useCode(data) {
-	return request({
-		url: '/api/user/useCode',
-		method: 'post',
-		data
-	});
+
+//获取分享海报
+export function getWxmpInviteQrcode(data) {
+	return request({
+		url: '/api/user/getWxmpInviteQrcode',
+		method: 'post',
+		data
+	});
+}
+
+//获取下级
+export function getChildList(data) {
+	return request({
+		url: '/api/user/getChildList',
+		method: 'post',
+		data
+	});
+}
+
+export function getInviterRanking(data) {
+	return request({
+		url: '/api/user/getInviterRanking',
+		method: 'post',
+		data
+	});
+}
+// 激活key
+export function useCode(data) {
+	return request({
+		url: '/api/user/useCode',
+		method: 'post',
+		data
+	});
+}
+
+//积分充值
+export function jfcz(data) {
+	return request({
+		url: '/api/recharge/createOrder',
+		method: 'post',
+		data
+	});
+}
+
+//积分记录
+export function getJfBill(data) {
+	return request({
+		url: '/api/user/scoreDetailList',
+		method: 'get',
+		data
+	});
+}
+
+//积分兑换比例
+export function getJfBl() {
+	// https://api.myjie.cn/api/pub/getScoreInfo
+	return request({
+		url: '/api/pub/getScoreInfo',
+		method: 'get',
+	});
+}
+
+
+/**
+ * 获取收货地址列表
+ * @param {Object} data
+ * @param {Number} data.uid
+ */
+export function getUserAddressList(data) {
+	return request({
+		url: '/api/address/list',
+		method: 'get',
+		data
+	});
+}
+
+/**
+ * 获取收货地址详情
+ * @param {Object} data
+ * @param {Number} data.id
+ */
+export function getAddressDetail(data) {
+	return request({
+		url: '/api/address/detail',
+		method: 'get',
+		data
+	});
+}
+
+/**
+ * 添加收货地址
+ * @param {Object} data
+ * @param {String} data.real_name
+ * @param {String} data.phone
+ * @param {String} data.province
+ * @param {String} data.city
+ * @param {String} data.district
+ * @param {String} data.detail
+ * @param {String} data.is_default
+ */
+export function addAddress(data) {
+	return request({
+		url: '/api/address/add',
+		method: 'post',
+		data
+	});
+}
+/**
+ * 修改收货地址
+ * @param {Object} data
+ * @param {Number} data.id
+ * @param {String} data.real_name
+ * @param {String} data.phone
+ * @param {String} data.province
+ * @param {String} data.city
+ * @param {String} data.district
+ * @param {String} data.detail
+ * @param {String} data.is_default
+ */
+export function editAddress(data) {
+	return request({
+		url: '/api/address/edit',
+		method: 'post',
+		data
+	});
+}
+
+/**
+ * 删除收货地址
+ * @param {Object} data
+ * @param {Number} data.id
+ */
+export function delAddress(data) {
+	return request({
+		url: '/api/address/delete',
+		method: 'get',
+		data
+	});
+}
+
+/**
+ * 设置默认收货地址
+ * @param {Object} data
+ * @param {Number} data.id
+ */
+export function setDefaultAddress(data) {
+	return request({
+		url: '/api/address/setDefault',
+		method: 'get',
+		data
+	});
+}
+
+/**
+ * 积分兑换
+ * @param {Number} order_id
+ */
+export function scorePay(order_id) {
+	return request({
+		url: '/api/shop/scorePay?order_id=' + order_id,
+		method: 'get',
+	});
+}
+
+/**
+ * 获取订单列表
+ * @param {Object} data
+ * @param {Number} data.page
+ * @param {Number} data.pageSize
+ * @param {Number} data.status
+ * @param {Number} data.uid
+ */
+export function getOrderList(data) {
+	return request({
+		url: '/api/shop/orderList',
+		method: 'get',
+		data
+	});
+}
+
+/**
+ * 获取订单详情
+ * @param {Number} order_id
+ */
+export function getOrderDetail(order_id) {
+	return request({
+		url: '/api/shop/orderDetail?order_id=' + order_id,
+		method: 'get',
+	});
+}
+
+/**
+ * 取消订单
+ * @param {Number} order_id
+ */
+export function cancelOrder(order_id) {
+	return request({
+		url: '/api/shop/cancelOrder?order_id=' + order_id,
+		method: 'get',
+	});
+}
+
+/**
+ * 确认收货
+ * @param {Number} order_id
+ */
+export function confirmOrder(order_id) {
+	return request({
+		url: '/api/shop/confirmOrder?order_id=' + order_id,
+		method: 'get',
+	});
 }
 }

+ 1 - 0
manifest.json

@@ -5,6 +5,7 @@
     "versionName" : "1.0.19",
     "versionName" : "1.0.19",
     "versionCode" : 122,
     "versionCode" : 122,
     "transformPx" : false,
     "transformPx" : false,
+    "sassImplementationName" : "node-sass",
     "app-plus" : {
     "app-plus" : {
         /* 5+App特有相关 */
         /* 5+App特有相关 */
         "usingComponents" : true,
         "usingComponents" : true,

+ 501 - 454
pages.json

@@ -1,19 +1,19 @@
-{
-	"pages": [{
-			"path": "pages/index/index",
-			"style": {
-				// #ifndef MP
-				"navigationStyle": "custom",
-				"app-plus": {
-					"titleNView": false
-				},
-				// #endif
-				// #ifdef MP
-				"navigationBarBackgroundColor": "#ff629f",
-				"navigationBarTextStyle":"white",
-				// #endif
-				"navigationBarTitleText": "母婴界严选"
-			}
+{
+	"pages": [{
+			"path": "pages/index/index",
+			"style": {
+				// #ifndef MP
+				"navigationStyle": "custom",
+				"app-plus": {
+					"titleNView": false
+				},
+				// #endif
+				// #ifdef MP
+				"navigationBarBackgroundColor": "#ff629f",
+				"navigationBarTextStyle": "white",
+				// #endif
+				"navigationBarTitleText": "母婴界严选"
+			}
 		},
 		},
 		{
 		{
 			"path": "pages/index/detail",
 			"path": "pages/index/detail",
@@ -26,25 +26,25 @@
 				// #endif
 				// #endif
 				// #ifdef MP
 				// #ifdef MP
 				"navigationBarBackgroundColor": "#ff629f",
 				"navigationBarBackgroundColor": "#ff629f",
-				"navigationBarTextStyle":"white",
+				"navigationBarTextStyle": "white",
 				// #endif
 				// #endif
 				"navigationBarTitleText": "学习交流群"
 				"navigationBarTitleText": "学习交流群"
 			}
 			}
-		},
-		{
-			"path": "pages/index/listModel",
-			"style": {
-				// #ifndef MP-WEIXIN
-				"navigationStyle": "custom",
-				// #endif
-				"navigationBarTitleText": "更多名片"
-			}
-		},
-		{
-			"path": "pages/userhome/user",
-			"style": {
-				"navigationBarTitleText": "个人中心"
-			}
+		},
+		{
+			"path": "pages/index/listModel",
+			"style": {
+				// #ifndef MP-WEIXIN
+				"navigationStyle": "custom",
+				// #endif
+				"navigationBarTitleText": "更多名片"
+			}
+		},
+		{
+			"path": "pages/userhome/user",
+			"style": {
+				"navigationBarTitleText": "个人中心"
+			}
 		},
 		},
 		{
 		{
 			"path": "pages/index/search",
 			"path": "pages/index/search",
@@ -53,443 +53,490 @@
 			}
 			}
 		}
 		}
 		// {
 		// {
+		// 	"path": "pages/forum/index",
+		// 	"style": {
+		// 		"navigationBarTitleText": "论坛"
+		// 	}
+		// }
+		// {
 		// 	"path": "pages/index/list",
 		// 	"path": "pages/index/list",
 		// 	"style": {
 		// 	"style": {
 		// 		"navigationStyle": "custom",
 		// 		"navigationStyle": "custom",
 		// 		"navigationBarTitleText": "课程列表"
 		// 		"navigationBarTitleText": "课程列表"
 		// 	}
 		// 	}
-		// }
-	],
-	"subPackages": [
-		{
-		"root": "pages/modelData",
-		"name": "model_index",
-		"pages": [
-		]
-	},
-	{
-		"root": "pages/user",
-		"name": "user",
-		"pages": [
-			{
-				"path": "realName/cropper",
-				"style": {
-					"navigationBarTitleText": "图片裁切"
-				}
-			},
-			{
-				"path": "mySc",
-				"style": {
-					"navigationBarTitleText": "我的收藏"
-				}
-			},
-			{
-				"path": "myteam",
-				"style": {
-					"navigationBarTitleText": "我的团队"
-				}
-			},
-			{
-				"path": "teamph",
-				"style": {
-					"navigationBarTitleText": "我的团队"
-				}
-			},
-			// {
-			// 	"path": "award/award",
-			// 	"style": {
-			// 		"navigationBarTitleText": "佣金",
-			// 		"navigationBarBackgroundColor": "#f6ab0b",
-			// 		"navigationBarTextStyle": "white"
-			// 	}
-			// },
-			// {
-			// 	"path": "award/awardList",
-			// 	"style": {
-			// 		"navigationBarTitleText": "佣金明细"
-			// 	}
-			// },
-			// {
-			// 	"path": "award/withdrawal",
-			// 	"style": {
-			// 		"navigationBarTitleText": "提现"
-			// 	}
-			// },
-			// {
-			// 	"path": "money/pay",
-			// 	"style": {
-			// 		"navigationBarTitleText": "支付",
-			// 		"navigationBarBackgroundColor": "#0BBB62",
-			// 		"navigationBarTextStyle": "white"
-			// 	}
-			// },
-			// {
-			// 	"path": "money/paySuccess",
-			// 	"style": {
-			// 		"navigationBarTitleText": "支付成功"
-			// 	}
-			// },
-			// {
-			// 	"path": "money/wallet",
-			// 	"style": {
-			// 		"navigationBarTitleText": "我的钱包",
-			// 		"navigationBarBackgroundColor": "#0BBB62",
-			// 		"navigationBarTextStyle": "white"
-			// 	}
-			// },
-			// {
-			// 	"path": "money/walletList",
-			// 	"style": {
-			// 		"navigationBarTitleText": "余额明细"
-			// 	}
-			// },
-			// {
-			// 	"path": "award/account",
-			// 	"style": {
-			// 		"navigationBarTitleText": "提现账号"
-			// 	}
-			// },
-			// {
-			// 	"path": "money/recharge",
-			// 	"style": {
-			// 		"navigationBarTitleText": "充值",
-			// 		"navigationBarBackgroundColor": "#0BBB62",
-			// 		"navigationBarTextStyle": "white"
-			// 	}
-			// },
-			{
-				"path": "shareQrCode",
-				"style": {
-					"navigationBarTitleText": "邀请好友"
-				}
-			},
-			{
-				"path": "model/modelrz",
-				"style": {
-					"navigationBarTitleText": "资料认证"
-				}
-			},
-			{
-				"path": "model/modelQr",
-				"style": {
-					"navigationBarTitleText": "模版分享"
-				}
-			},
-			{
-				"path": "model/model",
-				"style": {
-					"navigationBarTitleText": ""
-				}
-			},
-			{
-				"path": "model/modelList",
-				"style": {
-					"navigationBarTitleText": "模板列表"
-				}
-			},
-			{
-				"path": "model/mymodellist",
-				"style": {
-					"navigationBarTitleText": "我的模板"
-				}
-			},
-			{
-				"path": "model/shoprz",
-				"style": {
-					"navigationBarTitleText": "平台认证"
-				}
-			},
-			{
-				"path": "model/phb",
-				"style": {
-					"navigationBarTitleText": "排行榜"
-				}
-			},
-			{
-				"path": "signing/signing",
-				"style": {
-					"navigationBarTitleText": "签约"
+		// }
+	],
+	"subPackages": [{
+			"root": "pages/modelData",
+			"name": "model_index",
+			"pages": []
+		},
+		{
+			"root": "pages/user",
+			"name": "user",
+			"pages": [{
+					"path": "realName/cropper",
+					"style": {
+						"navigationBarTitleText": "图片裁切"
+					}
+				},
+				{
+					"path": "mySc",
+					"style": {
+						"navigationBarTitleText": "我的收藏"
+					}
+				},
+				{
+					"path": "myteam",
+					"style": {
+						"navigationBarTitleText": "我的团队"
+					}
+				},
+				{
+					"path": "teamph",
+					"style": {
+						"navigationBarTitleText": "我的团队"
+					}
+				},
+				// {
+				// 	"path": "award/award",
+				// 	"style": {
+				// 		"navigationBarTitleText": "佣金",
+				// 		"navigationBarBackgroundColor": "#f6ab0b",
+				// 		"navigationBarTextStyle": "white"
+				// 	}
+				// },
+				// {
+				// 	"path": "award/awardList",
+				// 	"style": {
+				// 		"navigationBarTitleText": "佣金明细"
+				// 	}
+				// },
+				// {
+				// 	"path": "award/withdrawal",
+				// 	"style": {
+				// 		"navigationBarTitleText": "提现"
+				// 	}
+				// },
+				// {
+				// 	"path": "money/pay",
+				// 	"style": {
+				// 		"navigationBarTitleText": "支付",
+				// 		"navigationBarBackgroundColor": "#0BBB62",
+				// 		"navigationBarTextStyle": "white"
+				// 	}
+				// },
+				// {
+				// 	"path": "money/paySuccess",
+				// 	"style": {
+				// 		"navigationBarTitleText": "支付成功"
+				// 	}
+				// },
+				// {
+				// 	"path": "money/wallet",
+				// 	"style": {
+				// 		"navigationBarTitleText": "我的钱包",
+				// 		"navigationBarBackgroundColor": "#0BBB62",
+				// 		"navigationBarTextStyle": "white"
+				// 	}
+				// },
+				// {
+				// 	"path": "money/walletList",
+				// 	"style": {
+				// 		"navigationBarTitleText": "余额明细"
+				// 	}
+				// },
+				// {
+				// 	"path": "award/account",
+				// 	"style": {
+				// 		"navigationBarTitleText": "提现账号"
+				// 	}
+				// },
+				// {
+				// 	"path": "money/recharge",
+				// 	"style": {
+				// 		"navigationBarTitleText": "充值",
+				// 		"navigationBarBackgroundColor": "#0BBB62",
+				// 		"navigationBarTextStyle": "white"
+				// 	}
+				// },
+				{
+					"path": "shareQrCode",
+					"style": {
+						"navigationBarTitleText": "邀请好友"
+					}
+				},
+				{
+					"path": "model/modelrz",
+					"style": {
+						"navigationBarTitleText": "资料认证"
+					}
+				},
+				{
+					"path": "model/modelQr",
+					"style": {
+						"navigationBarTitleText": "模版分享"
+					}
+				},
+				{
+					"path": "model/model",
+					"style": {
+						"navigationBarTitleText": ""
+					}
+				},
+				{
+					"path": "model/modelList",
+					"style": {
+						"navigationBarTitleText": "模板列表"
+					}
+				},
+				{
+					"path": "model/mymodellist",
+					"style": {
+						"navigationBarTitleText": "我的模板"
+					}
+				},
+				{
+					"path": "model/shoprz",
+					"style": {
+						"navigationBarTitleText": "平台认证"
+					}
+				},
+				{
+					"path": "model/phb",
+					"style": {
+						"navigationBarTitleText": "排行榜"
+					}
+				},
+				{
+					"path": "signing/signing",
+					"style": {
+						"navigationBarTitleText": "签约"
+					}
+				},
+				{
+					"path": "signing/ht",
+					"style": {
+						"navigationBarTitleText": "合同详情"
+					}
+				},
+				{
+					"path": "signing/dk",
+					"style": {
+						"navigationBarTitleText": "打卡"
+					}
+				},
+				{
+					"path": "signing/dkhis",
+					"style": {
+						"navigationBarTitleText": "打卡历史"
+					}
+				},
+				{
+					"path": "signing/plhis",
+					"style": {
+						"navigationBarTitleText": "评价"
+					}
+				},
+				{
+					"path": "signing/mySig",
+					"style": {
+						"navigationBarTitleText": "我的预约"
+					}
+				},
+				{
+					"path": "jf/bill",
+					"style": {
+						"navigationBarTitleText": "我的积分"
+					}
+				},
+				{
+					"path": "jf/jfcz",
+					"style": {
+						"navigationBarTitleText": "积分充值"
+					}
+				},
+				{
+					"path": "jf/detail",
+					"style": {
+						"navigationBarTitleText": "商品详情"
+					}
 				}
 				}
-			},
-			{
-				"path": "signing/ht",
-				"style": {
-					"navigationBarTitleText": "合同详情"
+				// ,
+				// {
+				// 	"path": "jf/rechange",
+				// 	"style": {
+				// 		"navigationBarTitleText": "次数购买"
+				// 	}
+				// }
+				,
+				{
+					"path": "jf/store",
+					"style": {
+						"navigationBarTitleText": "积分商城"
+					}
+				},
+				{
+					"path": "jf/addres",
+					"style": {
+						"navigationBarTitleText": "地址管理"
+					}
+				},
+				{
+					"path": "jf/addressManage",
+					"style": {
+						"navigationBarTitleText": "地址管理"
+					}
+				},
+				{
+					"path": "jf/order",
+					"style": {
+						"navigationBarTitleText": "订单列表"
+					}
+				},
+				{
+					"path": "jf/orderDetail",
+					"style": {
+						"navigationBarTitleText": "订单详情"
+					}
+				},
+				{
+					"path": "jf/success",
+					"style": {
+						"navigationBarTitleText": ""
+					}
+				},
+				{
+					"path": "forum/index",
+					"style": {
+						"navigationBarTitleText": ""
+					}
+				},
+				{
+					"path": "forum/edit",
+					"style": {
+						"navigationBarTitleText": ""
+					}
+				},
+				{
+					"path": "forum/detail",
+					"style": {
+						"navigationBarTitleText": "详情"
+					}
 				}
 				}
-			},
-			{
-				"path": "signing/dk",
-				"style": {
-					"navigationBarTitleText": "打卡"
+			]
+		}, {
+			"root": "pages/set",
+			"name": "set",
+			"pages": [{
+					"path": "set",
+					"style": {
+						"navigationBarTitleText": "设置"
+					}
+				},
+				// {
+				// 	"path": "address",
+				// 	"style": {
+				// 		"navigationBarTitleText": "收货地址"
+				// 	}
+				// },
+				// {
+				// 	"path": "addressManage",
+				// 	"style": {
+				// 		"navigationBarTitleText": ""
+				// 	}
+				// },
+				{
+					"path": "phone",
+					"style": {
+						"navigationBarTitleText": "手机认证"
+					}
+				},
+				{
+					"path": "lng",
+					"style": {
+						"navigationBarTitleText": "补充定位"
+					}
+				},
+				{
+					"path": "password",
+					"style": {
+						"navigationBarTitleText": "修改密码"
+					}
+				},
+				{
+					"path": "userinfo",
+					"style": {
+						"navigationBarTitleText": "修改资料"
+					}
 				}
 				}
-			},
-			{
-				"path": "signing/dkhis",
-				"style": {
-					"navigationBarTitleText": "打卡历史"
+			]
+		}, {
+			"root": "pages/public",
+			"name": "public",
+			"pages": [
+				// #ifndef MP
+				{
+					"path": "workwork",
+					"style": {
+						"navigationBarTitleText": "关于我们"
+					}
+				},
+				// #endif
+				// {
+				// 	"path": "register",
+				// 	"style": {
+				// 		"navigationBarTitleText": "注册",
+				// 		"app-plus": {
+				// 			"titleNView": false
+				// 		}
+				// 	}
+				// },
+				// {
+				// 	"path": "phoneLogin",
+				// 	"style": {
+				// 		"navigationBarTitleText": "手机登录",
+				// 		"app-plus": {
+				// 			"titleNView": false
+				// 		}
+				// 	}
+				// },
+				// {
+				// 	"path": "login",
+				// 	"style": {
+				// 		"navigationBarTitleText": "登录",
+				// 		"app-plus": {
+				// 			"titleNView": false
+				// 		}
+				// 	}
+				// },
+				// #ifdef MP || H5
+				{
+					"path": "wxLogin",
+					"style": {
+						"navigationBarTitleText": "授权登录",
+						"app-plus": {
+							"titleNView": {
+								"type": "transparent"
+							}
+						}
+					}
+				},
+				// #endif
+				// {
+				// 	"path": "forget",
+				// 	"style": {
+				// 		"navigationBarTitleText": "忘记密码",
+				// 		"app-plus": {
+				// 			"titleNView": false
+				// 		}
+				// 	}
+				// },
+				// #ifdef H5 
+				{
+					"path": "redirect",
+					"style": {
+						"navigationBarTitleText": "微信登录跳转页面",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				// #endif 
+				{
+					"path": "userAgreement",
+					"style": {
+						"navigationBarTitleText": "用户协议"
+					}
+				},
+				{
+					"path": "privacyAgreement",
+					"style": {
+						"navigationBarTitleText": "隐私协议"
+					}
+				},
+				{
+					"path": "artDetail",
+					"style": {
+						"navigationBarTitleText": ""
+					}
+				},
+				{
+					"path": "video",
+					"style": {
+						"navigationBarTitleText": "数字名片制作"
+					}
 				}
 				}
-			},
-			{
-				"path": "signing/plhis",
-				"style": {
-					"navigationBarTitleText": "评价"
+				// ,
+				// {
+				// 	"path": "artDetailTab",
+				// 	"style": {
+				// 		"navigationBarTitleText": ""
+				// 	}
+				// }
+			]
+		}, {
+			"root": "pages/eduction",
+			"name": "eduction",
+			"pages": [
+				// {
+				// 	"path": "list",
+				// 	"style": {
+				// 		"navigationBarTitleText": "课程列表"
+				// 	}
+				// },
+				{
+					"path": "detail",
+					"style": {
+						"navigationBarTitleText": "课程详情"
+					}
 				}
 				}
+			]
+		}
+	],
+	"globalStyle": {
+		"navigationBarTextStyle": "black",
+		"navigationBarTitleText": "uni-app",
+		"navigationBarBackgroundColor": "#FFFFFF",
+		"backgroundColor": "#f8f8f8"
+	},
+	"tabBar": {
+		"color": "#666666",
+		"selectedColor": "#F65486",
+		"borderStyle": "black",
+		"backgroundColor": "#ffffff",
+		"list": [{
+				"pagePath": "pages/index/index",
+				"iconPath": "static/tabBar/tab-home.png",
+				"selectedIconPath": "static/tabBar/tab-home-current.png",
+				"text": "首页"
 			},
 			},
-			{
-				"path": "signing/mySig",
-				"style": {
-					"navigationBarTitleText": "我的预约"
-				}
-			}
-			// ,
-			// {
-			// 	"path": "jf/rechange",
-			// 	"style": {
-			// 		"navigationBarTitleText": "次数购买"
-			// 	}
-			// },
-			// {
-			// 	"path": "jf/jfcz",
-			// 	"style": {
-			// 		"navigationBarTitleText": "积分充值"
-			// 	}
-			// },
-			// {
-			// 	"path": "jf/store",
-			// 	"style": {
-			// 		"navigationBarTitleText": "积分商城"
-			// 	}
-			// },
-			// {
-			// 	"path": "forum/index",
-			// 	"style": {
-			// 		"navigationBarTitleText": "论坛"
-			// 	}
-			// },
-			// {
-			// 	"path": "forum/edit",
-			// 	"style": {
-			// 		"navigationBarTitleText": "发布"
-			// 	}
-			// },
 			// {
 			// {
-			// 	"path": "forum/detail",
-			// 	"style": {
-			// 		"navigationBarTitleText": "详情"
-			// 	}
-			// }
-		]
-	}, {
-		"root": "pages/set",
-		"name": "set",
-		"pages": [{
-				"path": "set",
-				"style": {
-					"navigationBarTitleText": "设置"
-				}
-			},
-			// {
-			// 	"path": "address",
-			// 	"style": {
-			// 		"navigationBarTitleText": "收货地址"
-			// 	}
-			// },
-			// {
-			// 	"path": "addressManage",
-			// 	"style": {
-			// 		"navigationBarTitleText": ""
-			// 	}
-			// },
-			{
-				"path": "phone",
-				"style": {
-					"navigationBarTitleText": "手机认证"
-				}
-			},
-			{
-				"path": "password",
-				"style": {
-					"navigationBarTitleText": "修改密码"
-				}
-			},
-			{
-				"path": "userinfo",
-				"style": {
-					"navigationBarTitleText": "修改资料"
-				}
-			}
-		]
-	}, {
-		"root": "pages/public",
-		"name": "public",
-		"pages": [
-			// #ifndef MP
-			{
-				"path": "workwork",
-				"style": {
-					"navigationBarTitleText": "关于我们"
-				}
-			},
-			// #endif
-			// {
-			// 	"path": "register",
-			// 	"style": {
-			// 		"navigationBarTitleText": "注册",
-			// 		"app-plus": {
-			// 			"titleNView": false
-			// 		}
-			// 	}
-			// },
-			// {
-			// 	"path": "phoneLogin",
-			// 	"style": {
-			// 		"navigationBarTitleText": "手机登录",
-			// 		"app-plus": {
-			// 			"titleNView": false
-			// 		}
-			// 	}
-			// },
-			// {
-			// 	"path": "login",
-			// 	"style": {
-			// 		"navigationBarTitleText": "登录",
-			// 		"app-plus": {
-			// 			"titleNView": false
-			// 		}
-			// 	}
-			// },
-			// #ifdef MP || H5
-			{
-				"path": "wxLogin",
-				"style": {
-					"navigationBarTitleText": "授权登录",
-					"app-plus": {
-						"titleNView": {
-							"type": "transparent"
-						}
-					}
-				}
-			},
-			// #endif
-			// {
-			// 	"path": "forget",
-			// 	"style": {
-			// 		"navigationBarTitleText": "忘记密码",
-			// 		"app-plus": {
-			// 			"titleNView": false
-			// 		}
-			// 	}
+			// 	"pagePath": "pages/category/category",
+			// 	"iconPath": "static/tabBar/tab-cate.png",
+			// 	"selectedIconPath": "static/tabBar/tab-cate-current.png",
+			// 	"text": "分类"
 			// },
 			// },
-			// #ifdef H5 
-			{
-				"path": "redirect",
-				"style": {
-					"navigationBarTitleText": "微信登录跳转页面",
-					"app-plus": {
-						"titleNView": false
-					}
-				}
-			},
-			// #endif 
-			{
-				"path": "userAgreement",
-				"style": {
-					"navigationBarTitleText": "用户协议"
-				}
-			},
-			{
-				"path": "privacyAgreement",
-				"style": {
-					"navigationBarTitleText": "隐私协议"
-				}
-			},
 			{
 			{
-				"path": "artDetail",
-				"style": {
-					"navigationBarTitleText": ""
-				}
+				"pagePath": "pages/index/detail",
+				"iconPath": "static/tabBar/tab-xxjl.png",
+				"selectedIconPath": "static/tabBar/tab-xxjl-current.png",
+				"text": "学习交流群"
 			},
 			},
 			{
 			{
-				"path": "video",
-				"style": {
-					"navigationBarTitleText": "数字名片制作"
-				}
-			}
-			// ,
-			// {
-			// 	"path": "artDetailTab",
-			// 	"style": {
-			// 		"navigationBarTitleText": ""
-			// 	}
-			// }
-		]
-	},{
-		"root": "pages/eduction",
-		"name": "eduction",
-		"pages": [
-			// {
-			// 	"path": "list",
-			// 	"style": {
-			// 		"navigationBarTitleText": "课程列表"
-			// 	}
-			// },
-			{
-				"path": "detail",
-				"style": {
-					"navigationBarTitleText": "课程详情"
-				}
+				"pagePath": "pages/userhome/user",
+				"iconPath": "static/tabBar/tab-my.png",
+				"selectedIconPath": "static/tabBar/tab-my-current.png",
+				"text": "我的"
 			}
 			}
 		]
 		]
-	}],
-	"globalStyle": {
-		"navigationBarTextStyle": "black",
-		"navigationBarTitleText": "uni-app",
-		"navigationBarBackgroundColor": "#FFFFFF",
-		"backgroundColor": "#f8f8f8"
-	},
-	"tabBar": {
-		"color": "#666666",
-		"selectedColor": "#F65486",
-		"borderStyle": "black",
-		"backgroundColor": "#ffffff",
-		"list": [{
-				"pagePath": "pages/index/index",
-				"iconPath": "static/tabBar/tab-home.png",
-				"selectedIconPath": "static/tabBar/tab-home-current.png",
-				"text": "首页"
-			},
-			// {
-			// 		"pagePath": "pages/index/list",
-			// 		"iconPath": "static/tabBar/kc.png",
-			// 		"selectedIconPath": "static/tabBar/kcaction.png",
-			// 		"text": "课程"
-			// 	},
-			// {
-			// 	"pagePath": "pages/category/category",
-			// 	"iconPath": "static/tabBar/tab-cate.png",
-			// 	"selectedIconPath": "static/tabBar/tab-cate-current.png",
-			// 	"text": "分类"
-			// },
-			{
-				"pagePath": "pages/index/detail",
-				"iconPath": "static/tabBar/tab-xxjl.png",
-				"selectedIconPath": "static/tabBar/tab-xxjl-current.png",
-				"text": "学习交流群"
-			},
-			{
-				"pagePath": "pages/userhome/user",
-				"iconPath": "static/tabBar/tab-my.png",
-				"selectedIconPath": "static/tabBar/tab-my-current.png",
-				"text": "我的"
-			}
-		]
-	},
-	"condition": { //模式配置,仅开发期间生效
-		"current": 0, //当前激活的模式(list 的索引项)
-		"list": [{
-			"name": "", //模式名称
-			"path": "", //启动页面,必选
-			"query": "" //启动参数,在页面的onLoad函数里面得到
-		}]
-	}
-}
+	},
+	"condition": { //模式配置,仅开发期间生效
+		"current": 0, //当前激活的模式(list 的索引项)
+		"list": [{
+			"name": "", //模式名称
+			"path": "", //启动页面,必选
+			"query": "" //启动参数,在页面的onLoad函数里面得到
+		}]
+	}
+}

+ 4 - 3
pages/index/index.vue

@@ -63,7 +63,8 @@
 				<view class="banner" @click="navTo('/pages/public/video')">
 				<view class="banner" @click="navTo('/pages/public/video')">
 					<image v-if="baseURL" :src="baseURL+'/static/img/indexLeft.png'" mode="widthFix"></image>
 					<image v-if="baseURL" :src="baseURL+'/static/img/indexLeft.png'" mode="widthFix"></image>
 				</view>
 				</view>
-				<view class="banner" @click="navTo('/pages/user/model/phb')">
+				<!-- <view class="banner" @click="navTo('/pages/user/model/phb')"> -->
+				<view class="banner" @click="navTo('/pages/index/search')">
 					<image v-if="baseURL" :src="baseURL+'/static/img/indexRight.png'" mode="widthFix"></image>
 					<image v-if="baseURL" :src="baseURL+'/static/img/indexRight.png'" mode="widthFix"></image>
 				</view>
 				</view>
 			</view>
 			</view>
@@ -150,7 +151,7 @@
 			};
 			};
 		},
 		},
 		computed: {
 		computed: {
-			...mapState('user', ['userInfo']),
+			...mapState('user', ['userInfo','isOpen']),
 			// #ifdef MP
 			// #ifdef MP
 			...mapState(['systeam', 'baseURL']),
 			...mapState(['systeam', 'baseURL']),
 			// #endif
 			// #endif
@@ -281,7 +282,7 @@
 				share({}).then(({
 				share({}).then(({
 					data
 					data
 				}) => {
 				}) => {
-					that.shareData = data.data
+					that.shareData = data
 				});
 				});
 			},
 			},
 
 

+ 131 - 14
pages/index/listModel.vue

@@ -1,6 +1,10 @@
 <template>
 <template>
 	<view class="content">
 	<view class="content">
-		<scroll-view scroll-x="true" class="topSearch">
+		<map name="" :longitude="longitude" :latitude="latitude" class="map-wrap" :markers="markers"></map>
+		<view class="itemTip flex" @click="$refs.popup.open()">
+			<uni-icons type="bars" size="40rpx"></uni-icons>
+		</view>
+		<!-- <scroll-view scroll-x="true" class="topSearch">
 			<view class="itemBox flex">
 			<view class="itemBox flex">
 				<view class="typeTtem flex" @click="changeType(item,ind)" :key='ind' v-for="(item,ind) in workTypeList" :class="{action:typeIndex==ind}">
 				<view class="typeTtem flex" @click="changeType(item,ind)" :key='ind' v-for="(item,ind) in workTypeList" :class="{action:typeIndex==ind}">
 					<text>
 					<text>
@@ -11,9 +15,28 @@
 					<uni-icons type="bars" size="40rpx"></uni-icons>
 					<uni-icons type="bars" size="40rpx"></uni-icons>
 				</view>
 				</view>
 			</view>
 			</view>
-		</scroll-view>
+		</scroll-view> -->
 		<scroll-view scroll-y="true" :style="{'height':height}" class="scroll-wrap" @scrolltolower="getKcList">
 		<scroll-view scroll-y="true" :style="{'height':height}" class="scroll-wrap" @scrolltolower="getKcList">
-			<cmy-mys-list :list='navList[currentIndex].list'></cmy-mys-list>
+			<!-- <cmy-mys-list :list='navList[currentIndex].list'></cmy-mys-list> -->
+			<view class="js" v-for="item in navList[currentIndex].list" @click="clickList(item)">
+				<view class="js-left">
+					
+				</view>
+				<view class="js-info">
+					<image class="js-info-img" :src="item.avatar" mode=""></image>
+					<view class="js-info-info">
+						<view class="js-info-info-name">
+							{{item.name}}
+						</view>
+						<view class="js-info-info-type">
+							{{item.user_work_type_title}}
+						</view>
+					</view>
+				</view>
+				<view class="js-more">
+					查看简历 >
+				</view>
+			</view>
 			<uni-load-more :status="navList[currentIndex].loadingType"></uni-load-more>
 			<uni-load-more :status="navList[currentIndex].loadingType"></uni-load-more>
 		</scroll-view>
 		</scroll-view>
 		<uni-popup ref="popup" type="bottom">
 		<uni-popup ref="popup" type="bottom">
@@ -118,6 +141,7 @@
 <script>
 <script>
 	import {
 	import {
 		getWorkerList,
 		getWorkerList,
+		getNewWorkerList
 	} from '@/api/index.js'
 	} from '@/api/index.js'
 	import {
 	import {
 		getUserWorkTypeList
 		getUserWorkTypeList
@@ -150,9 +174,13 @@
 					service_area:[],
 					service_area:[],
 					is_china:'',
 					is_china:'',
 				},
 				},
+				latitude: '',
+				longitude: '',
+				markers: []
 			};
 			};
 		},
 		},
 		onLoad(opt) {
 		onLoad(opt) {
+			let that = this
 			if(opt.timetype!==''){
 			if(opt.timetype!==''){
 				this.search.timetype=opt.timetype
 				this.search.timetype=opt.timetype
 			}
 			}
@@ -176,9 +204,30 @@
 				})
 				})
 			}
 			}
 			this.init();
 			this.init();
+			uni.getLocation({
+				success(res) {
+					console.log(res);
+					that.latitude = res.latitude;
+					that.longitude = res.longitude;
+					that.$set(that.markers,0,{
+						id: 0,
+						latitude: res.latitude,
+						longitude: res.longitude,
+						iconPath: '/static/icon/wddw.png',
+						width: 35,
+						height: 35
+					})
+					that.getKcList()
+				},
+				fail() {
+					that.latitude = 0;
+					that.longitude = 0;
+					that.getKcList()
+				}
+			})
 		},
 		},
 		onShow() {
 		onShow() {
-			this.getKcList()
+			
 		},
 		},
 		onReady(res) {
 		onReady(res) {
 			var that = this;
 			var that = this;
@@ -197,6 +246,12 @@
 
 
 		},
 		},
 		methods: {
 		methods: {
+			clickList(item) {
+				const url = '/pages/user/model/model?uid=' + item.uid + '&mtype=' + item.show_template_id + '&type=2'
+				uni.navigateTo({
+					url,
+				})
+			},
 			onCityClick({
 			onCityClick({
 				data
 				data
 			}) {
 			}) {
@@ -273,7 +328,19 @@
 				res = await getWorkerList({
 				res = await getWorkerList({
 					...search,
 					...search,
 					page: item.page,
 					page: item.page,
-					pageSize: item.pageSize
+					pageSize: item.pageSize,
+					latitude: that.latitude,
+					longitude: that.longitude
+				})
+				res.data.list.forEach(item => {
+					that.markers.push({
+						id: item.uid*1,
+						latitude: item.latitude || ( item.uid * 0.0001 + 28.9),
+						longitude: item.longitude || ( item.uid * 0.0001 + 120.44297),
+						iconPath: '/static/icon/myjdw.png',
+						width: 35,
+						height: 35
+					})
 				})
 				})
 				item.list = item.list.concat(res.data.list)
 				item.list = item.list.concat(res.data.list)
 				item.page++
 				item.page++
@@ -288,6 +355,9 @@
 	};
 	};
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
+	page {
+		background-color: #fff;
+	}
 	.alert{
 	.alert{
 		background-color: red;
 		background-color: red;
 	}
 	}
@@ -405,15 +475,7 @@
 		.itemBox{
 		.itemBox{
 			padding-left: 30rpx;
 			padding-left: 30rpx;
 			align-items: center;
 			align-items: center;
-			.itemTip{
-				background-color: #FFF;
-				position: fixed;
-				right: 0;
-				top: 0;
-				align-items: center;
-				height: 80rpx;
-				padding: 0 30rpx;
-			}
+			
 			.typeTtem {
 			.typeTtem {
 				flex-shrink: 0;
 				flex-shrink: 0;
 				height: 80rpx;
 				height: 80rpx;
@@ -426,4 +488,59 @@
 			}
 			}
 		}
 		}
 	}
 	}
+	.map-wrap {
+		width: 750rpx;
+		height: 750rpx;
+	}
+	.itemTip{
+		background-color: #FFF;
+		position: fixed;
+		right: 0;
+		top: 0;
+		align-items: center;
+		height: 80rpx;
+		padding: 0 30rpx;
+	}
+	.js {
+		background-color: #fff;
+		display: flex;
+		padding: 10rpx 0;
+		border-bottom: 1rpx solid #E7E8EA;
+		&-left {
+			width: 10rpx;
+			height: 30rpx;
+			background-color: $base-color;
+			border-radius: 5rpx;
+		}
+		&-more {
+			color: $base-color;
+			align-self: center;
+			font-weight: bold;
+			font-size: 26rpx;
+		}
+		&-info {
+			flex-grow: 1;
+			padding-left: 10rpx;
+			display: flex;
+			&-img {
+				width: 117rpx;
+				height: 117rpx;
+				border-radius: 15rpx;
+			}
+			&-info {
+				padding:10rpx 0 10rpx 15rpx;
+				&-name {
+					padding-bottom: 30rpx;
+					font-size: 32rpx;
+					color: #000;
+					font-weight: bold;
+				}
+				&-type {
+					font-size: 26rpx;
+					color: #333333;
+				}
+			}
+			
+		}
+	}
 </style>
 </style>

+ 141 - 0
pages/set/lng.vue

@@ -0,0 +1,141 @@
+<template>
+	<view class="container">
+		<view class="listBox">
+			<view class="list">
+				<view class="flex listItem" @click="chooseLng">
+					<view class="flex titleBox">
+						<text class="title">打开地图选择定位</text>
+					</view>
+					<view class="right flex">
+						<text>{{latitude ? (latitude + ','+longitude): ''}}</text>
+						<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="base-buttom" @click="toSub">
+			提交
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapMutations,
+		mapState
+	} from 'vuex';
+	import { addLng } from '@/api/set.js'
+	export default {
+		data() {
+			return {
+				latitude: '',
+				longitude: ''
+			};
+		},
+		computed: {
+			...mapState('user', ['userInfo'])
+		},
+		methods: {
+			chooseLng() {
+				let that = this
+				uni.chooseLocation({
+					success(res) {
+						that.latitude = res.latitude
+						that.longitude = res.longitude
+					},
+					fail(err) {          // 失败回调
+					    console.error('选择位置失败:', err)
+					  },
+				})
+			},
+			toSub() {
+				let that = this
+				if(!that.latitude) {
+					return that.$api.msg('请打开地图选择定位')
+				}
+				addLng({
+					latitude: that.latitude,
+					longitude: that.longitude
+				}).then(res => {
+					this.$api.msg('修改成功');
+					setTimeout(() => {
+						uni.switchTab({
+							url: '/pages/userhome/user'
+						});
+					}, 1000);
+				})
+			}
+		}
+	}
+</script>
+
+<style lang='scss'>
+	.container {
+		padding-top: 30rpx;
+	}
+
+	.listBox {
+		margin: 0 $page-row-spacing;
+		background-color: #FFFFFF;
+		border-radius: 20rpx;
+		overflow: hidden;
+	}
+
+	.list {
+		.listItem {
+			padding: 35rpx 40rpx;
+			border-bottom: 1px solid $page-color-light;
+		}
+
+		.listIconImg {
+			width: 36rpx;
+		}
+
+		.right {
+			color: $font-color-light;
+			font-size: $font-base;
+			flex-grow: 1;
+			justify-content: flex-end;
+
+			.img {
+				width: 26rpx;
+			}
+		}
+
+		.titleBox {
+			.title {
+				color: $font-color-base;
+				font-size: $font-base;
+			}
+		}
+	}
+
+	.row {
+		display: flex;
+		align-items: center;
+		padding: 35rpx 40rpx;
+		background: #fff;
+		border-bottom: 1px solid $page-color-light;
+
+		.background-img {
+			width: 80rpx;
+			height: 80rpx;
+			border-radius: 50%;
+			background: #f2f2f2;
+		}
+
+		.tit {
+			flex-shrink: 0;
+			width: 120upx;
+			font-size: $font-base;
+			color: $font-color-base;
+		}
+
+		.input {
+			flex: 1;
+			text-align: right;
+			font-size: $font-base;
+			color: $color-gray;
+		}
+	}
+</style>

+ 9 - 7
pages/set/set.vue

@@ -1,13 +1,6 @@
 <template>
 <template>
 	<view class="container">
 	<view class="container">
 		<view class="listBox">
 		<view class="listBox">
-			<view class="row flex" @click="navTo('/pages/set/userinfo')">
-				<text class="tit">头像</text>
-				<view>
-					<image class="background-img" v-model="userInfo.avatar" :src="userInfo.avatar" mode="aspectFill">
-					</image>
-				</view>
-			</view>
 			<view class="list">
 			<view class="list">
 				<view class="flex listItem" @click="navTo('/pages/set/userinfo')">
 				<view class="flex listItem" @click="navTo('/pages/set/userinfo')">
 					<view class="flex titleBox">
 					<view class="flex titleBox">
@@ -27,6 +20,15 @@
 						<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
 						<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
 					</view>
 					</view>
 				</view>
 				</view>
+				<view class="flex listItem" @click="navTo('/pages/set/lng')" v-if="userInfo.work_type_title">
+					<view class="flex titleBox">
+						<text class="title">补充定位</text>
+					</view>
+					<view class="right flex">
+						<text></text>
+						<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
+					</view>
+				</view>
 				<!-- <view class="flex listItem" @click="navTo('/pages/user/realName/realNameAuthentication')">
 				<!-- <view class="flex listItem" @click="navTo('/pages/user/realName/realNameAuthentication')">
 					<view class="flex titleBox">
 					<view class="flex titleBox">
 						<text class="title">实名认证</text>
 						<text class="title">实名认证</text>

+ 198 - 96
pages/user/forum/detail.vue

@@ -1,40 +1,49 @@
 <template>
 <template>
-	<view class="content">
+	<view class="content" v-if="is_show == 1">
 		<view class="post-content">
 		<view class="post-content">
 			<view class="post-header">
 			<view class="post-header">
-				<image :src="post.avatar" mode="aspectFill" class="avatar"></image>
+				<image :src="post.author_avatar" mode="aspectFill" class="avatar"></image>
 				<view class="user-info">
 				<view class="user-info">
-					<text class="username">{{post.username}}</text>
-					<text class="time">{{post.time}}</text>
+					<text class="username">{{post.author_name}}</text>
+					<text class="time">{{post.create_time}}</text>
 				</view>
 				</view>
-				<image class="share" src="/static/icon/share.png" mode=""></image>
+				<!--  -->
+				<button class="share-button" open-type="share">
+					<image class="share" src="/static/icon/share.png" mode=""></image>
+				</button>
+
 			</view>
 			</view>
-			
+
 			<text class="content">{{post.content}}</text>
 			<text class="content">{{post.content}}</text>
-			
+
 			<view class="image-list">
 			<view class="image-list">
-				<image :src="img" mode="aspectFill" class="image" v-for="(img, index) in post.images" :key="index" @click="previewImage(post.images, index)"></image>
+				<image :src="img" mode="aspectFill" class="image" v-for="(img, index) in post.images" :key="index"
+					@click="previewImage(post.images, index)"></image>
 			</view>
 			</view>
 		</view>
 		</view>
-		
+
 		<view class="comment-section">
 		<view class="comment-section">
 			<view class="comment-header">
 			<view class="comment-header">
 				<text class="comment-title">最新评论({{comments.length}})</text>
 				<text class="comment-title">最新评论({{comments.length}})</text>
 			</view>
 			</view>
 			<view class="comment-list">
 			<view class="comment-list">
 				<view class="comment-item" v-for="(comment, index) in comments" :key="index">
 				<view class="comment-item" v-for="(comment, index) in comments" :key="index">
-					<image :src="comment.avatar" mode="aspectFill" class="comment-avatar"></image>
+					<image :src="comment.author_avatar|| 'https://api.myjie.cn/static/img/logo.png'" mode="aspectFill" class="comment-avatar"></image>
 					<view class="comment-content">
 					<view class="comment-content">
 						<view class="comment-header">
 						<view class="comment-header">
-							<text class="comment-username">{{comment.username}}</text>
+							<text class="comment-username">{{comment.author_name || '微信用户'}}</text>
+							<view class="delete-btn" @click="deleteComment(comment.id)"
+								v-if="comment.uid == userInfo.uid">
+								<text>删除</text>
+							</view>
 						</view>
 						</view>
 						<view class="comment-text">{{comment.content}}</view>
 						<view class="comment-text">{{comment.content}}</view>
-						<view class="comment-time">{{comment.time}}</view>
+						<view class="comment-time">{{comment.create_time}}</view>
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
-		
+
 		<view class="comment-input">
 		<view class="comment-input">
 			<input placeholder="发表评论" v-model="commentText" class="input" />
 			<input placeholder="发表评论" v-model="commentText" class="input" />
 			<view class="submit-btn" @click="submitComment">
 			<view class="submit-btn" @click="submitComment">
@@ -45,68 +54,85 @@
 </template>
 </template>
 
 
 <script>
 <script>
+	import {
+		mapState
+	} from "vuex"
+	import {
+		getPostDetail,
+		addComment,
+		deleteComment
+	} from '@/api/index.js'
+	import {
+		share
+	} from '@/api/wx.js'
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
+				is_show: 0,
+				id: 0,
 				post: {
 				post: {
-					username: '我欲随风',
-					time: '2020-04-16 09:34',
-					avatar: '../../../static/icon/ye.png',
-					content: '承包你大半年的洗衣液~【威露士】倍净洗衣液套装消毒除异味,除螨除菌高达99%用心呵护一家子的健康整整12斤,专享价【89】',
-					images: [
-						'../../../static/image/qy.png',
-						'../../../static/image/qy.png',
-						'../../../static/image/qy.png',
-						'../../../static/image/qy.png',
-						'../../../static/image/qy.png',
-						'../../../static/image/qy.png'
-					]
+
 				},
 				},
-				comments: [
-					{
-						id: 1,
-						username: '我欲随风',
-						time: '2020-4-15 09:37',
-						avatar: '../../../static/icon/ye.png',
-						content: '太便宜了吧!'
-					},
-					{
-						id: 2,
-						username: '我欲随风',
-						time: '2020-4-15 09:37',
-						avatar: '../../../static/icon/ye.png',
-						content: '买了能用大半年了'
-					},
-					{
-						id: 3,
-						username: '我欲随风',
-						time: '2020-4-15 09:37',
-						avatar: '../../../static/icon/ye.png',
-						content: '整装多少钱?'
-					},
-					{
-						id: 4,
-						username: '我欲随风',
-						time: '2020-4-15 09:37',
-						avatar: '../../../static/icon/ye.png',
-						content: '太便宜了吧!'
-					}
-				],
+				comments: [],
 				commentText: ''
 				commentText: ''
 			};
 			};
 		},
 		},
+		computed: {
+			...mapState('user', ['userInfo', 'hasLogin']),
+		},
+		// #ifdef MP
+		onShareAppMessage(options) {
+
+			let shareObj = {
+				title: this.post.title, // 默认是小程序的名称(可以写slogan等)
+				path: '/pages/user/forum/detail?id=' + this.id, // 默认是当前页面,必须是以‘/’开头的完整路径
+				imageUrl: this.post.images[0],
+				desc: this.post.content,
+				success: function(res) {
+					// 转发成功之后的回调
+					if (res.errMsg == 'shareAppMessage:ok') {}
+				},
+				fail: function(res) {
+					// 转发失败之后的回调
+					if (res.errMsg == 'shareAppMessage:fail cancel') {
+						// 用户取消转发
+					} else if (res.errMsg == 'shareAppMessage:fail') {
+						// 转发失败,其中 detail message 为详细失败信息
+					}
+				}
+			};
+			// 判断是否可以邀请
+			if (this.userInfo.uid) {
+				shareObj.path += '&spread=' + this.userInfo.uid;
+			}
+			return shareObj;
+		},
+		// #endif
 		methods: {
 		methods: {
+			getShow() {
+				share({}).then(({
+					data
+				}) => {
+					this.is_show = data.is_show
+				});
+			},
+			deleteComment(id) {
+				deleteComment({
+					id: id,
+					uid: this.userInfo.uid
+				}).then(res => {
+					uni.showToast({
+						title: '删除成功',
+						icon: 'success'
+					});
+					this.getDetail();
+				})
+			},
 			// 返回
 			// 返回
 			navBack() {
 			navBack() {
 				uni.navigateBack();
 				uni.navigateBack();
 			},
 			},
-			// 分享
-			share() {
-				uni.showToast({
-					title: '分享功能开发中',
-					icon: 'none'
-				});
-			},
+
 			// 预览图片
 			// 预览图片
 			previewImage(images, index) {
 			previewImage(images, index) {
 				uni.previewImage({
 				uni.previewImage({
@@ -130,16 +156,56 @@
 					});
 					});
 					return;
 					return;
 				}
 				}
-				
-				// 这里可以添加提交评论的逻辑
-				uni.showToast({
-					title: '评论成功',
-					icon: 'success'
+				addComment({
+					post_id: this.id,
+					content: this.commentText
+				}).then(res => {
+					uni.showToast({
+						title: '评论成功',
+						icon: 'success'
+					});
+					this.getDetail()
+					this.commentText = '';
+				})
+			},
+			// 删除评论
+			deleteComment(id) {
+				uni.showModal({
+					title: '提示',
+					content: '确定要删除这条评论吗?',
+					success: (res) => {
+						if (res.confirm) {
+							deleteComment({
+								id: id,
+								uid: this.userInfo.uid
+							}).then(res => {
+								uni.showToast({
+									title: '删除成功',
+									icon: 'success'
+								});
+								this.getDetail();
+							})
+						}
+					}
 				});
 				});
-				
-				// 清空评论输入框
-				this.commentText = '';
+			},
+			getDetail() {
+				if(!this.id) return;
+				getPostDetail({
+					id: this.id
+				}).then(res => {
+					this.post = res.data
+					if (this.post.images && typeof(this.post.images) == 'string') {
+						this.post.images = this.post.images.split(',')
+					}
+					this.comments = res.data.comments.list
+				})
 			}
 			}
+		},
+		onLoad(opt) {
+			this.getShow()
+			this.id = opt.id
+			this.getDetail()
 		}
 		}
 	};
 	};
 </script>
 </script>
@@ -162,27 +228,27 @@
 		padding: 0 30rpx;
 		padding: 0 30rpx;
 		height: 80rpx;
 		height: 80rpx;
 		background-color: #FFFFFF;
 		background-color: #FFFFFF;
-		
+
 		.back {
 		.back {
 			width: 40rpx;
 			width: 40rpx;
 			height: 40rpx;
 			height: 40rpx;
-			
+
 			image {
 			image {
 				width: 100%;
 				width: 100%;
 				height: 100%;
 				height: 100%;
 			}
 			}
 		}
 		}
-		
+
 		.title {
 		.title {
 			font-size: 32rpx;
 			font-size: 32rpx;
 			font-weight: bold;
 			font-weight: bold;
 			color: #333333;
 			color: #333333;
 		}
 		}
-		
+
 		.share {
 		.share {
 			width: 40rpx;
 			width: 40rpx;
 			height: 40rpx;
 			height: 40rpx;
-			
+
 			image {
 			image {
 				width: 100%;
 				width: 100%;
 				height: 100%;
 				height: 100%;
@@ -194,25 +260,27 @@
 		background-color: #FFFFFF;
 		background-color: #FFFFFF;
 		padding: 20rpx;
 		padding: 20rpx;
 		margin-bottom: 10rpx;
 		margin-bottom: 10rpx;
-		
+
 		.post-header {
 		.post-header {
 			display: flex;
 			display: flex;
 			align-items: center;
 			align-items: center;
 			margin-bottom: 15rpx;
 			margin-bottom: 15rpx;
-			
+
 			.avatar {
 			.avatar {
 				width: 60rpx;
 				width: 60rpx;
 				height: 60rpx;
 				height: 60rpx;
 				border-radius: 50%;
 				border-radius: 50%;
 				margin-right: 15rpx;
 				margin-right: 15rpx;
 			}
 			}
+
 			.share {
 			.share {
 				width: 30rpx;
 				width: 30rpx;
 				height: 30rpx;
 				height: 30rpx;
 			}
 			}
+
 			.user-info {
 			.user-info {
 				flex: 1;
 				flex: 1;
-				
+
 				.username {
 				.username {
 					font-size: 28rpx;
 					font-size: 28rpx;
 					font-weight: bold;
 					font-weight: bold;
@@ -220,25 +288,25 @@
 					margin-bottom: 5rpx;
 					margin-bottom: 5rpx;
 					display: block;
 					display: block;
 				}
 				}
-				
+
 				.time {
 				.time {
 					font-size: 22rpx;
 					font-size: 22rpx;
 					color: #999999;
 					color: #999999;
 				}
 				}
 			}
 			}
 		}
 		}
-		
+
 		.content {
 		.content {
 			font-size: 26rpx;
 			font-size: 26rpx;
 			color: #333333;
 			color: #333333;
 			line-height: 36rpx;
 			line-height: 36rpx;
 			margin-bottom: 20rpx;
 			margin-bottom: 20rpx;
 		}
 		}
-		
+
 		.image-list {
 		.image-list {
 			display: flex;
 			display: flex;
 			flex-wrap: wrap;
 			flex-wrap: wrap;
-			
+
 			.image {
 			.image {
 				width: 31%;
 				width: 31%;
 				height: 200rpx;
 				height: 200rpx;
@@ -251,53 +319,62 @@
 	.comment-section {
 	.comment-section {
 		background-color: #FFFFFF;
 		background-color: #FFFFFF;
 		padding: 20rpx;
 		padding: 20rpx;
-		
+
 		.comment-header {
 		.comment-header {
 			margin-bottom: 20rpx;
 			margin-bottom: 20rpx;
-			
+
 			.comment-title {
 			.comment-title {
 				font-size: 28rpx;
 				font-size: 28rpx;
 				font-weight: bold;
 				font-weight: bold;
 				color: #333333;
 				color: #333333;
 			}
 			}
 		}
 		}
-		
+
 		.comment-list {
 		.comment-list {
-			
+
 			.comment-item {
 			.comment-item {
 				display: flex;
 				display: flex;
 				margin-bottom: 20rpx;
 				margin-bottom: 20rpx;
 				border-bottom: #EEEEEE 1rpx solid;
 				border-bottom: #EEEEEE 1rpx solid;
 				padding: 20rpx;
 				padding: 20rpx;
+
 				.comment-avatar {
 				.comment-avatar {
 					width: 50rpx;
 					width: 50rpx;
 					height: 50rpx;
 					height: 50rpx;
 					border-radius: 50%;
 					border-radius: 50%;
 					margin-right: 15rpx;
 					margin-right: 15rpx;
 				}
 				}
-				
+
 				.comment-content {
 				.comment-content {
 					flex: 1;
 					flex: 1;
-					
+
 					.comment-header {
 					.comment-header {
 						display: flex;
 						display: flex;
 						align-items: center;
 						align-items: center;
 						justify-content: space-between;
 						justify-content: space-between;
 						margin-bottom: 10rpx;
 						margin-bottom: 10rpx;
-						
+
 						.comment-username {
 						.comment-username {
 							font-size: 24rpx;
 							font-size: 24rpx;
-							font-weight: bold;
-							color: #333333;
+							// color: #333333;
+							color: #999999;
 						}
 						}
-						
-						
+
+						.delete-btn {
+							font-size: 22rpx;
+							color: #f65486;
+						}
+
+
 					}
 					}
+
 					.comment-time {
 					.comment-time {
 						font-size: 20rpx;
 						font-size: 20rpx;
 						color: #999999;
 						color: #999999;
 					}
 					}
+
 					.comment-text {
 					.comment-text {
+						font-weight: bold;
 						font-size: 24rpx;
 						font-size: 24rpx;
 						color: #333333;
 						color: #333333;
 						line-height: 32rpx;
 						line-height: 32rpx;
@@ -319,7 +396,7 @@
 		display: flex;
 		display: flex;
 		align-items: center;
 		align-items: center;
 		padding: 0 20rpx;
 		padding: 0 20rpx;
-		
+
 		.input {
 		.input {
 			flex: 1;
 			flex: 1;
 			height: 50rpx;
 			height: 50rpx;
@@ -331,7 +408,7 @@
 			margin-right: 15rpx;
 			margin-right: 15rpx;
 			resize: none;
 			resize: none;
 		}
 		}
-		
+
 		.submit-btn {
 		.submit-btn {
 			padding: 0 30rpx;
 			padding: 0 30rpx;
 			height: 50rpx;
 			height: 50rpx;
@@ -340,7 +417,7 @@
 			display: flex;
 			display: flex;
 			align-items: center;
 			align-items: center;
 			justify-content: center;
 			justify-content: center;
-			
+
 			text {
 			text {
 				font-size: 24rpx;
 				font-size: 24rpx;
 				font-weight: bold;
 				font-weight: bold;
@@ -348,4 +425,29 @@
 			}
 			}
 		}
 		}
 	}
 	}
+
+	.share-button {
+		background: none;
+		/* 清除背景 */
+		border: none;
+		/* 清除边框 */
+		padding: 0;
+		/* 清除内边距 */
+		margin: 0;
+		/* 清除外边距 */
+		line-height: normal;
+		/* 重置行高 */
+		display: flex;
+		/* 保持 flex 布局(如需) */
+		align-items: center;
+		/* 垂直居中 */
+		justify-content: center;
+		/* 水平居中 */
+	}
+
+	/* 清除点击效果(伪元素) */
+	.share-button::after {
+		display: none;
+		/* 或 border: none; box-shadow: none; */
+	}
 </style>
 </style>

+ 84 - 35
pages/user/forum/edit.vue

@@ -1,10 +1,16 @@
 <template>
 <template>
-	<view class="content">
+	<view class="content" v-if="is_show == 1">
 		<view class="form">
 		<view class="form">
+			<view class="form-item">
+				<view class="form-label">贴子标题(分享标题)</view>
+				<input type="text" v-model="title"
+					style="border: 1rpx solid #EEEEEE;height: 60rpx;padding-left: 10rpx;font-size: 26rpx;"
+					placeholder="请输入贴子标题" />
+			</view>
 			<view class="form-item">
 			<view class="form-item">
 				<view class="form-label">贴子内容</view>
 				<view class="form-label">贴子内容</view>
-				<textarea placeholder="请输入帖子内容" v-model="pjs" maxlength="200" class="form-textarea"></textarea>
-				<view class="count">{{pjs.length}}/200</view>
+				<textarea placeholder="请输入贴子内容" v-model="pjs" maxlength="500" class="form-textarea"></textarea>
+				<view class="count">{{pjs.length}}/500</view>
 			</view>
 			</view>
 			<view class="form-item">
 			<view class="form-item">
 				<view class="form-label">贴子图片</view>
 				<view class="form-label">贴子图片</view>
@@ -23,9 +29,8 @@
 				<view class="hint">最多可上传6张图片</view>
 				<view class="hint">最多可上传6张图片</view>
 			</view>
 			</view>
 		</view>
 		</view>
-		
 		<view class="submit-btn" @click="goPj">
 		<view class="submit-btn" @click="goPj">
-			提交发布
+			提交审核
 		</view>
 		</view>
 	</view>
 	</view>
 </template>
 </template>
@@ -34,14 +39,38 @@
 	import {
 	import {
 		upload
 		upload
 	} from '@/api/set.js';
 	} from '@/api/set.js';
+	import {
+		addPost
+	} from '@/api/index.js';
+	import {
+		share
+	} from '@/api/wx.js'
 	export default {
 	export default {
+		
 		data() {
 		data() {
 			return {
 			return {
+				title: '',
 				pjImg: [],
 				pjImg: [],
-				pjs: ''
+				pjs: '',
+				is_show: 0
 			}
 			}
 		},
 		},
+		onLoad() {
+			this.getShow()
+		},
 		methods: {
 		methods: {
+			getShow() {
+				share({}).then(({
+					data
+				}) => {
+					this.is_show = data.is_show
+					if (data.is_show ==1) {
+						uni.setNavigationBarTitle({
+							title: '发贴'
+						})
+					}
+				});
+			},
 			// 返回
 			// 返回
 			navBack() {
 			navBack() {
 				uni.navigateBack();
 				uni.navigateBack();
@@ -51,7 +80,7 @@
 				upload({
 				upload({
 					filename: ''
 					filename: ''
 				}).then(data => {
 				}).then(data => {
-					this.$set(this.pjImg,index,data[0].img)
+					this.$set(this.pjImg, index, data[0].img)
 				})
 				})
 			},
 			},
 			// 删除图片
 			// 删除图片
@@ -62,21 +91,40 @@
 			goPj() {
 			goPj() {
 				if (!this.pjs.trim()) {
 				if (!this.pjs.trim()) {
 					uni.showToast({
 					uni.showToast({
-						title: '请输入子内容',
+						title: '请输入子内容',
 						icon: 'none'
 						icon: 'none'
 					});
 					});
 					return;
 					return;
 				}
 				}
-				
+				if (!this.title) {
+					uni.showToast({
+						title: '请输入贴子铁标题',
+						icon: 'none'
+					});
+					return;
+				}
+				addPost({
+					title: this.title,
+					content: this.pjs,
+					images: this.pjImg.join(',')
+				}).then(res => {
+					uni.showToast({
+						title: '发布成功,等待审核',
+						icon: 'success'
+					});
+
+					setTimeout(() => {
+						uni.redirectTo({
+							url: '/pages/user/forum/index'
+						})
+					}, 1500);
+				}).catch(err => {
+					uni.showToast({
+						title: '发布失败',
+						icon: 'none'
+					});
+				})
 				// 这里可以添加提交逻辑
 				// 这里可以添加提交逻辑
-				uni.showToast({
-					title: '发布成功',
-					icon: 'success'
-				});
-				
-				setTimeout(() => {
-					this.navBack();
-				}, 1500);
 			}
 			}
 		}
 		}
 	}
 	}
@@ -100,23 +148,23 @@
 		padding: 0 30rpx;
 		padding: 0 30rpx;
 		height: 80rpx;
 		height: 80rpx;
 		background-color: #FFFFFF;
 		background-color: #FFFFFF;
-		
+
 		.back {
 		.back {
 			width: 40rpx;
 			width: 40rpx;
 			height: 40rpx;
 			height: 40rpx;
-			
+
 			image {
 			image {
 				width: 100%;
 				width: 100%;
 				height: 100%;
 				height: 100%;
 			}
 			}
 		}
 		}
-		
+
 		.title {
 		.title {
 			font-size: 32rpx;
 			font-size: 32rpx;
 			font-weight: bold;
 			font-weight: bold;
 			color: #333333;
 			color: #333333;
 		}
 		}
-		
+
 		.right {
 		.right {
 			width: 40rpx;
 			width: 40rpx;
 		}
 		}
@@ -126,17 +174,17 @@
 		margin-top: 10rpx;
 		margin-top: 10rpx;
 		background-color: #FFFFFF;
 		background-color: #FFFFFF;
 		padding: 30rpx;
 		padding: 30rpx;
-		
+
 		.form-item {
 		.form-item {
 			margin-bottom: 40rpx;
 			margin-bottom: 40rpx;
-			
+
 			.form-label {
 			.form-label {
 				font-size: 28rpx;
 				font-size: 28rpx;
 				font-weight: bold;
 				font-weight: bold;
 				color: #333333;
 				color: #333333;
 				margin-bottom: 20rpx;
 				margin-bottom: 20rpx;
 			}
 			}
-			
+
 			.form-textarea {
 			.form-textarea {
 				width: 100%;
 				width: 100%;
 				height: 200rpx;
 				height: 200rpx;
@@ -148,17 +196,18 @@
 				line-height: 36rpx;
 				line-height: 36rpx;
 				resize: none;
 				resize: none;
 			}
 			}
-			
+
 			.count {
 			.count {
 				text-align: right;
 				text-align: right;
 				font-size: 22rpx;
 				font-size: 22rpx;
 				color: #999999;
 				color: #999999;
 				margin-top: 10rpx;
 				margin-top: 10rpx;
 			}
 			}
-			
+
 			.image-list {
 			.image-list {
 				flex-wrap: wrap;
 				flex-wrap: wrap;
 				justify-content: flex-start;
 				justify-content: flex-start;
+
 				.image-item {
 				.image-item {
 					width: 150rpx;
 					width: 150rpx;
 					height: 150rpx;
 					height: 150rpx;
@@ -167,38 +216,38 @@
 					position: relative;
 					position: relative;
 					border-radius: 10rpx;
 					border-radius: 10rpx;
 					background-color: #F5F5F5;
 					background-color: #F5F5F5;
-					
+
 					&:nth-child(4n) {
 					&:nth-child(4n) {
 						margin-right: 0;
 						margin-right: 0;
 					}
 					}
-					
+
 					&.add {
 					&.add {
 						display: flex;
 						display: flex;
 						flex-direction: column;
 						flex-direction: column;
 						align-items: center;
 						align-items: center;
 						justify-content: center;
 						justify-content: center;
-						
+
 						image {
 						image {
 							width: 50rpx;
 							width: 50rpx;
 							height: 50rpx;
 							height: 50rpx;
 							margin-bottom: 10rpx;
 							margin-bottom: 10rpx;
 						}
 						}
-						
+
 						.add-text {
 						.add-text {
 							font-size: 22rpx;
 							font-size: 22rpx;
 							color: #999999;
 							color: #999999;
 						}
 						}
 					}
 					}
-					
+
 					.image {
 					.image {
 						width: 100%;
 						width: 100%;
 						height: 100%;
 						height: 100%;
 					}
 					}
-					
+
 					.delete-btn {
 					.delete-btn {
 						position: absolute;
 						position: absolute;
 						top: -12rpx;
 						top: -12rpx;
-						right:-12rpx;
+						right: -12rpx;
 						width: 40rpx;
 						width: 40rpx;
 						height: 40rpx;
 						height: 40rpx;
 						background-color: #fff;
 						background-color: #fff;
@@ -206,7 +255,7 @@
 						display: flex;
 						display: flex;
 						align-items: center;
 						align-items: center;
 						justify-content: center;
 						justify-content: center;
-						
+
 						image {
 						image {
 							width: 24rpx;
 							width: 24rpx;
 							height: 24rpx;
 							height: 24rpx;
@@ -214,7 +263,7 @@
 					}
 					}
 				}
 				}
 			}
 			}
-			
+
 			.hint {
 			.hint {
 				font-size: 22rpx;
 				font-size: 22rpx;
 				color: #999999;
 				color: #999999;

+ 148 - 75
pages/user/forum/index.vue

@@ -1,36 +1,40 @@
 <template>
 <template>
 	<view class="content">
 	<view class="content">
-		<view class="post-list">
+		<view class="post-list" v-if="is_show == 1">
 			<view class="post-item" v-for="(post, index) in postList" :key="index">
 			<view class="post-item" v-for="(post, index) in postList" :key="index">
 				<view class="post-header">
 				<view class="post-header">
-					<image :src="post.avatar" mode="aspectFill" class="avatar"></image>
+					<image :src="post.author_avatar" mode="aspectFill" class="avatar"></image>
 					<view class="user-info">
 					<view class="user-info">
-						<text class="username">{{post.username}}</text>
-						<text class="time">{{post.time}}</text>
+						<text class="username">{{post.author_name}}</text>
+						<text class="time">{{post.create_time}}</text>
 					</view>
 					</view>
 				</view>
 				</view>
-				
+
 				<text class="post-content">{{post.content}}</text>
 				<text class="post-content">{{post.content}}</text>
-				
+
 				<view class="product-images">
 				<view class="product-images">
-					<image :src="img" mode="aspectFill" class="product-image" v-for="(img, imgIndex) in post.images" :key="imgIndex" @click="previewImage(post.images, imgIndex)"></image>
+					<image :src="img" mode="aspectFill" class="product-image" v-for="(img, imgIndex) in post.images"
+						:key="imgIndex" @click="previewImage(post.images, imgIndex)"></image>
 				</view>
 				</view>
 				<view class="post-footer">
 				<view class="post-footer">
 					<view class="comment-share">
 					<view class="comment-share">
 						<view class="action" @click="comment(post)">
 						<view class="action" @click="comment(post)">
 							<image src="../../../static/icon/pl.png" mode="widthFix" class="action-icon"></image>
 							<image src="../../../static/icon/pl.png" mode="widthFix" class="action-icon"></image>
-							<text class="action-text">评论({{post.commentCount}})</text>
+							<text class="action-text">评论({{post.comment_count}})</text>
 						</view>
 						</view>
 						<view class="action" @click="share(post)">
 						<view class="action" @click="share(post)">
-							<image src="../../../static/icon/share.png" mode="widthFix" class="action-icon"></image>
-							<text class="action-text">分享</text>
+						<button class="share-button" open-type="share">
+							
+								<image src="../../../static/icon/share.png" mode="widthFix" class="action-icon"></image>
+								<text class="action-text">分享</text>
+						</button>
 						</view>
 						</view>
 					</view>
 					</view>
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
-		
-		<view class="publish-btn" @click="publish">
+		<empty v-else></empty>
+		<view class="publish-btn" @click="publish" v-if="userInfo.permission == 1 && is_show == 1">
 			<image src="../../../static/icon/fabu.png" mode="widthFix" class="publish-icon"></image>
 			<image src="../../../static/icon/fabu.png" mode="widthFix" class="publish-icon"></image>
 			<text class="publish-text">我要发布</text>
 			<text class="publish-text">我要发布</text>
 		</view>
 		</view>
@@ -38,68 +42,89 @@
 </template>
 </template>
 
 
 <script>
 <script>
+	import empty from '@/components/empty/empty.vue'
+	import {
+		mapState
+	} from "vuex"
+	import {
+		getPostList
+	} from '@/api/index.js'
+	import {share} from '@/api/wx.js'
 	export default {
 	export default {
+		components: {
+			empty
+		},
 		data() {
 		data() {
 			return {
 			return {
-				postList: [
-					{
-						id: 1,
-						username: '林丹丹',
-						time: '1分钟前',
-						avatar: '../../../static/icon/ye.png',
-						content: '风乐平樱桃黄姜复合肽压片糖果套盒,轻松饱腹降低食欲不再是梦,C天然果蔬纤维素多种果蔬纤维满足日常膳食营养,专享价【989】',
-						images: [
-							'../../../static/image/qy.png',
-							'../../../static/image/qy.png',
-							'../../../static/image/qy.png',
-							'../../../static/image/qy.png',
-							'../../../static/image/qy.png',
-							'../../../static/image/qy.png'
-						],
-						commentCount: 1
-					},
-					{
-						id: 2,
-						username: '林丹丹',
-						time: '1分钟前',
-						avatar: '../../../static/icon/ye.png',
-						content: '风乐平樱桃黄姜复合肽压片糖果套盒,轻松饱腹降低食欲不再是梦,C天然果蔬纤维素多种果蔬纤维满足日常膳食营养,专享价【989】',
-						images: [
-							'../../../static/image/qy.png',
-							'../../../static/image/qy.png',
-							'../../../static/image/qy.png',
-							'../../../static/image/qy.png',
-							'../../../static/image/qy.png',
-							'../../../static/image/qy.png'
-						],
-						commentCount: 0
+				is_show: 0,
+				page: 1,
+				pageSize: 10,
+				loading: 'more',
+				postList: [],
+				sharePost: {}
+			};
+		},
+		computed: {
+			...mapState('user', ['userInfo', 'hasLogin']),
+		},
+		// #ifdef MP
+		onShareAppMessage() {
+			let shareObj = {
+				title: this.sharePost.title, // 默认是小程序的名称(可以写slogan等)
+				path: '/pages/user/forum/detail?id=' + this.sharePost.id, // 默认是当前页面,必须是以‘/’开头的完整路径
+				imageUrl: this.sharePost.images[0],
+				desc: this.sharePost.content,
+				success: function(res) {
+					// 转发成功之后的回调
+					if (res.errMsg == 'shareAppMessage:ok') {}
+				},
+				fail: function(res) {
+					// 转发失败之后的回调
+					if (res.errMsg == 'shareAppMessage:fail cancel') {
+						// 用户取消转发
+					} else if (res.errMsg == 'shareAppMessage:fail') {
+						// 转发失败,其中 detail message 为详细失败信息
 					}
 					}
-				]
+				}
 			};
 			};
+			// 判断是否可以邀请
+			if (this.userInfo.uid) {
+				shareObj.path += '&spread=' + this.userInfo.uid;
+			}
+			return shareObj;
 		},
 		},
+		// #endif
 		methods: {
 		methods: {
+			getShow() {
+				share({}).then(({
+					data
+				}) => {
+					this.is_show = data.is_show
+					if(data.is_show == 1) {
+						uni.setNavigationBarTitle({
+							title:'论坛'
+						})
+					}
+				});
+			},
 			// 返回
 			// 返回
 			navBack() {
 			navBack() {
 				uni.navigateBack();
 				uni.navigateBack();
 			},
 			},
 			// 评论
 			// 评论
 			comment(post) {
 			comment(post) {
-				uni.showToast({
-					title: '评论功能开发中',
-					icon: 'none'
-				});
+				uni.navigateTo({
+					url:'/pages/user/forum/detail?id=' + post.id
+				})
 			},
 			},
 			// 分享
 			// 分享
-			share(post) {
-				uni.showToast({
-					title: '分享功能开发中',
-					icon: 'none'
-				});
+			share(item) {
+				this.sharePost = item
 			},
 			},
 			// 发布
 			// 发布
 			publish() {
 			publish() {
 				uni.navigateTo({
 				uni.navigateTo({
-					url:'/pages/user/forum/edit'
+					url: '/pages/user/forum/edit'
 				})
 				})
 			},
 			},
 			// 预览图片
 			// 预览图片
@@ -115,8 +140,40 @@
 						console.log('预览图片失败', res);
 						console.log('预览图片失败', res);
 					}
 					}
 				});
 				});
+			},
+			getPostList() {
+				let that = this
+				if (that.loading == 'loading' || that.loading == 'noMore') return;
+				that.loading = 'loading'
+				getPostList({
+					page: that.page,
+					pageSize: that.pageSize
+				}).then(res => {
+					let arr = res.data.list.map(item => {
+						if(item.images && typeof(item.images) == 'string') {
+							item.images = item.images.split(',')
+						}
+						return item
+					})
+					that.postList = that.postList.concat(arr)
+					that.page++
+					if (arr.length < that.pageSize) {
+						that.loading = 'noMore'
+					} else {
+						that.loading = 'more'
+					}
+				})
 			}
 			}
-		}
+		},
+		onReachBottom() {
+			this.getPostList()
+		},
+		onLoad() {
+			this.getPostList()
+			this.getShow()
+		},
+		// 获取贴子列表
+
 	};
 	};
 </script>
 </script>
 
 
@@ -138,23 +195,23 @@
 		padding: 0 30rpx;
 		padding: 0 30rpx;
 		height: 80rpx;
 		height: 80rpx;
 		background-color: #FFFFFF;
 		background-color: #FFFFFF;
-		
+
 		.back {
 		.back {
 			width: 40rpx;
 			width: 40rpx;
 			height: 40rpx;
 			height: 40rpx;
-			
+
 			image {
 			image {
 				width: 100%;
 				width: 100%;
 				height: 100%;
 				height: 100%;
 			}
 			}
 		}
 		}
-		
+
 		.title {
 		.title {
 			font-size: 32rpx;
 			font-size: 32rpx;
 			font-weight: bold;
 			font-weight: bold;
 			color: #333333;
 			color: #333333;
 		}
 		}
-		
+
 		.right {
 		.right {
 			width: 40rpx;
 			width: 40rpx;
 		}
 		}
@@ -162,27 +219,27 @@
 
 
 	.post-list {
 	.post-list {
 		margin-top: 10rpx;
 		margin-top: 10rpx;
-		
+
 		.post-item {
 		.post-item {
 			background-color: #FFFFFF;
 			background-color: #FFFFFF;
 			padding: 20rpx;
 			padding: 20rpx;
 			margin-bottom: 10rpx;
 			margin-bottom: 10rpx;
-			
+
 			.post-header {
 			.post-header {
 				display: flex;
 				display: flex;
 				align-items: center;
 				align-items: center;
 				margin-bottom: 15rpx;
 				margin-bottom: 15rpx;
-				
+
 				.avatar {
 				.avatar {
 					width: 60rpx;
 					width: 60rpx;
 					height: 60rpx;
 					height: 60rpx;
 					border-radius: 50%;
 					border-radius: 50%;
 					margin-right: 15rpx;
 					margin-right: 15rpx;
 				}
 				}
-				
+
 				.user-info {
 				.user-info {
 					flex: 1;
 					flex: 1;
-					
+
 					.username {
 					.username {
 						font-size: 28rpx;
 						font-size: 28rpx;
 						font-weight: bold;
 						font-weight: bold;
@@ -190,26 +247,26 @@
 						margin-bottom: 5rpx;
 						margin-bottom: 5rpx;
 						display: block;
 						display: block;
 					}
 					}
-					
+
 					.time {
 					.time {
 						font-size: 22rpx;
 						font-size: 22rpx;
 						color: #999999;
 						color: #999999;
 					}
 					}
 				}
 				}
 			}
 			}
-			
+
 			.post-content {
 			.post-content {
 				font-size: 26rpx;
 				font-size: 26rpx;
 				color: #333333;
 				color: #333333;
 				line-height: 36rpx;
 				line-height: 36rpx;
 				margin-bottom: 15rpx;
 				margin-bottom: 15rpx;
 			}
 			}
-			
+
 			.product-images {
 			.product-images {
 				display: flex;
 				display: flex;
 				flex-wrap: wrap;
 				flex-wrap: wrap;
 				margin-bottom: 20rpx;
 				margin-bottom: 20rpx;
-				
+
 				.product-image {
 				.product-image {
 					width: 31%;
 					width: 31%;
 					height: 200rpx;
 					height: 200rpx;
@@ -217,15 +274,15 @@
 					border-radius: 10rpx;
 					border-radius: 10rpx;
 				}
 				}
 			}
 			}
-			
+
 			.post-footer {
 			.post-footer {
 				border-top: 1rpx solid #EEEEEE;
 				border-top: 1rpx solid #EEEEEE;
 				padding-top: 15rpx;
 				padding-top: 15rpx;
-				
+
 				.comment-share {
 				.comment-share {
 					display: flex;
 					display: flex;
 					align-items: center;
 					align-items: center;
-					
+
 					.action {
 					.action {
 						display: flex;
 						display: flex;
 						flex: 1;
 						flex: 1;
@@ -234,12 +291,13 @@
 						text-align: center;
 						text-align: center;
 						display: flex;
 						display: flex;
 						justify-content: center;
 						justify-content: center;
+
 						.action-icon {
 						.action-icon {
 							width: 24rpx;
 							width: 24rpx;
 							height: 24rpx;
 							height: 24rpx;
 							margin-right: 8rpx;
 							margin-right: 8rpx;
 						}
 						}
-						
+
 						.action-text {
 						.action-text {
 							font-size: 24rpx;
 							font-size: 24rpx;
 							color: #999999;
 							color: #999999;
@@ -261,17 +319,32 @@
 		justify-content: center;
 		justify-content: center;
 		background-color: #f65486;
 		background-color: #f65486;
 		border-radius: 32rpx 0 0 32rpx;
 		border-radius: 32rpx 0 0 32rpx;
-		
+
 		.publish-icon {
 		.publish-icon {
 			width: 40rpx;
 			width: 40rpx;
 			height: 40rpx;
 			height: 40rpx;
 			margin-bottom: 10rpx;
 			margin-bottom: 10rpx;
 		}
 		}
-		
+
 		.publish-text {
 		.publish-text {
 			font-size: 24rpx;
 			font-size: 24rpx;
 			color: #FFFFFF;
 			color: #FFFFFF;
 			font-weight: bold;
 			font-weight: bold;
 		}
 		}
 	}
 	}
+	.share-button {
+	  background: none;        /* 清除背景 */
+	  border: none;            /* 清除边框 */
+	  padding: 0;              /* 清除内边距 */
+	  margin: 0;               /* 清除外边距 */
+	  line-height: normal;     /* 重置行高 */
+	  display: flex;           /* 保持 flex 布局(如需) */
+	  align-items: center;     /* 垂直居中 */
+	  justify-content: center; /* 水平居中 */
+	}
+	
+	/* 清除点击效果(伪元素) */
+	.share-button::after {
+	  display: none; /* 或 border: none; box-shadow: none; */
+	}
 </style>
 </style>

+ 215 - 0
pages/user/jf/addres.vue

@@ -0,0 +1,215 @@
+<template>
+	<view class="content b-t">
+		<view class="list" v-for="(item, index) in addressList" :key="index" @click="checkAddress(item)">
+			<view class="wrapper">
+				<view class="address-box">
+					<text class="name">{{ item.real_name }}</text>
+					<text class="mobile">{{ item.phone }}</text>
+				</view>
+				<view class="u-box">
+					<text class="address">{{ item.province + item.city + item.district }} {{ item.detail }}</text>
+				</view>
+			</view>
+			<view class="buttom">
+				<view class="default-buttom" @click.stop="defaultUp(item,index)">
+					<view class="iconfont iconroundcheckfill checkbox" :class="{ checked: item.is_default == 1 }"></view>
+					<text class="text" v-if=" item.is_default != 1">设为默认地址</text>
+					<text class="text" v-if=" item.is_default == 1">默认地址</text>
+				</view>
+				<view class="operation">
+					<view @click.stop="addAddress('edit', item)">
+						<text class="iconfont iconedit"></text>
+						<text class="text">编辑</text>
+					</view>
+					<view class="blank"></view>
+					<view @click.stop="delAddress(item)">
+						<text class="iconfont icondelete"></text>
+						<text class="text">删除</text>
+					</view>
+				</view>
+			</view>
+		</view>
+		<button class="add-btn" @click="addAddress('add')">新增地址</button>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+import { getUserAddressList,delAddress ,setDefaultAddress} from '@/api/user.js';
+export default {
+	data() {
+		return {
+			source: 0,
+			addressList: []
+		};
+	},
+	computed: {
+		...mapState('user', ['userInfo']),
+	},
+	onLoad(option) {
+		this.source = option.source||0
+		this.loadAddress();
+	},
+	methods: {
+		// 加载地址
+		loadAddress() {
+			getUserAddressList({
+				uid:this.userInfo.uid 
+			}).then(({ data }) => {
+				this.addressList = data;
+			});
+		},
+		// 设为默认地址
+		defaultUp(data,ind) {
+			this.addressList=this.addressList.map((e) => {
+				e.is_default=0
+				return e
+			})
+			this.addressList[ind].is_default=1
+			setDefaultAddress({
+				id: data.id
+			}).then(({ data }) => {
+				this.loadAddress();
+			}).catch((e) => {
+				console.log(e);
+			});
+		},
+		//删除地址
+		delAddress(item) {
+			delAddress({
+				id:item.id
+			}).then(({data})=>{
+				this.$api.msg('删除成功')
+			})
+			let s = this.addressList.indexOf(item);
+			this.addressList.splice(s, 1);
+		},
+		//选择地址
+		checkAddress(item) {
+			if (this.source == 1) {
+				//this.$api.prePage()获取上一页实例,在App.vue定义
+				this.$api.prePage().selectedAddress = item;
+				uni.navigateBack();
+			}
+		},
+		// 添加地址
+		addAddress(type, item) {
+			uni.navigateTo({
+				url: `/pages/user/jf/addressManage?type=${type}&data=${JSON.stringify(item)}`
+			});
+		},
+		//添加或修改成功之后回调
+		refreshList() {
+			// 重新加载地址
+			this.loadAddress()
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	padding-bottom: 120rpx;
+	padding-top: 20rpx;
+	background-color: $page-color-base;
+}
+.content {
+	position: relative;
+}
+.list {
+	align-items: center;
+	padding: 20rpx 30rpx;
+	background: #fff;
+	margin: 20rpx;
+	margin-top: 0;
+	.buttom {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding-top: 10rpx;
+		.checkbox {
+			font-size: 44rpx;
+			line-height: 1;
+			padding: 4rpx;
+			color: $font-color-disabled;
+			background: #fff;
+			border-radius: 50px;
+		}
+		.checkbox.checked {
+			color: $base-color;
+		}
+		.default-buttom {
+			display: flex;
+			align-items: center;
+		}
+		.operation {
+			display: flex;
+			align-items: center;
+			.blank {
+				width: 30rpx;
+			}
+		}
+		.text {
+			padding-left: 10rpx;
+			font-size: 24rpx;
+			color: #666666;
+		}
+	}
+}
+.wrapper {
+	display: flex;
+	flex-direction: column;
+	flex: 1;
+	border-bottom: 1px solid #f0f0f0;
+	padding-bottom: 20rpx;
+}
+.address-box {
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	.address {
+		font-size: $font-base + 2rpx;
+		color: $font-color-dark;
+	}
+	.mobile {
+		font-size: $font-base;
+		color: rgba(51, 51, 51, 1);
+	}
+}
+.u-box {
+	font-size: $font-base;
+	color: $font-color-light;
+	margin-top: 16rpx;
+	.name {
+		margin-right: 30rpx;
+	}
+}
+.icon-bianji {
+	display: flex;
+	align-items: center;
+	height: 80rpx;
+	font-size: 40rpx;
+	color: $font-color-light;
+	padding-left: 30rpx;
+}
+
+.add-btn {
+	position: fixed;
+	left: 30rpx;
+	right: 30rpx;
+	bottom: 16rpx;
+	z-index: 95;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 690rpx;
+	height: 80rpx;
+	font-size: $font-lg;
+	color: #fff;
+	background-color: $base-color;
+	border-radius: 10rpx;
+}
+</style>

+ 258 - 0
pages/user/jf/addressManage.vue

@@ -0,0 +1,258 @@
+<template>
+	<view class="content">
+		<view class="row b-b" >
+			<text class="tit">联系人</text>
+			<input class="input" type="text" v-model="addressData.real_name" placeholder="收货人姓名"
+				placeholder-class="placeholder" />
+		</view>
+		<view class="row b-b">
+			<text class="tit">手机号</text>
+			<input class="input" type="number" v-model="addressData.phone" placeholder="收货人手机号码"
+				placeholder-class="placeholder" />
+		</view>
+		<view class="row b-b">
+			<text class="tit">地址</text>
+			<pickerAddress class="input" @change="onCityClick">{{addressDetail||'请选择地址'}}</pickerAddress>
+			<text class="iconfont iconlocation"></text>
+		</view>
+		<view class="row b-b">
+			<text class="tit">门牌号</text>
+			<input class="input" type="text" v-model="addressData.detail" placeholder="楼号、门牌"
+				placeholder-class="placeholder" />
+		</view>
+		<view class="row b-b" style="display: flex;justify-content: space-between;" @click="addressData.is_default = !addressData.is_default">
+			<text class="tit">设为默认</text>
+			<view class="yuan">
+				<view class="yuan-wai">
+					
+				</view>
+				<view class="yuan-yuan" v-show="addressData.is_default">
+
+				</view>
+			</view>
+			<!-- <input class="input" type="text" v-model="addressData.area" placeholder="楼号、门牌" placeholder-class="placeholder" /> -->
+		</view>
+		<!-- <uni-list class="margin-t-20">
+			<uni-list-item
+				title="设为默认"
+				:switch-checked="addressData.default"
+				:show-switch="true"
+				:show-arrow="false"
+				switch-color="#5dbc7c"
+				@switchChange="switchChange"
+			></uni-list-item>
+		</uni-list> -->
+
+		<button class="add-btn" @click="confirm">提交</button>
+	</view>
+</template>
+
+<script>
+	import pickerAddress from '@/components/wangding-pickerAddress/wangding-pickerAddress.vue';
+	import {
+		addressEdit,
+		addAddress,
+		editAddress
+	} from '@/api/user.js';
+	export default {
+		components: {
+			pickerAddress,
+		},
+		data() {
+			return {
+				addressDetail: '',
+				addressData: {
+					real_name: '',
+					phone: '',
+					province:'',
+					city: '',
+					district: '',
+					detail: '',
+					is_default: '',
+				}
+			};
+		},
+		onLoad(option) {
+			let title = '新增收货地址';
+			if (option.type === 'edit') {
+				title = '编辑收货地址';
+				let data = JSON.parse(option.data);
+				console.log(data);
+
+				this.addressData = {
+					real_name: data.real_name,
+					phone: data.phone,
+					province: data.province,
+					city: data.city,
+					district: data.district,
+					detail: data.detail,
+					is_default: data.is_default == 1,
+					id: data.id
+				};
+				this.addressDetail = data.province + '-' + data.city+ '-' + data.district;
+			}
+			this.manageType = option.type;
+			uni.setNavigationBarTitle({
+				title
+			});
+		},
+		methods: {
+			// 选中城市切换
+			onCityClick({
+				data
+			}) {
+				let address = this.addressData;
+				address.province = data[0];
+				address.city = data[1];
+				address.district = data[2];
+				this.addressDetail = data.join('-');
+			},
+			//地图选择地址
+			chooseLocation() {
+				uni.chooseLocation({
+					success: data => {
+						console.log(data);
+						this.addressData.addressName = data.name;
+						this.addressData.address = data.name;
+					}
+				});
+			},
+			// 设置是否为默认地址
+			switchChange(e) {
+				this.addressData.default = e.value;
+			},
+			//提交
+			confirm() {
+				let that = this;
+				let data = this.addressData;
+				if (!data.real_name) {
+					this.$api.msg('请填写收货人姓名');
+					return;
+				}
+				if (!/(^1[0-9]{10}$)/.test(data.phone)) {
+					this.$api.msg('请输入正确的手机号码');
+					return;
+				}
+				if (!data.province || !data.city || !data.district) {
+					this.$api.msg('请选择省市区');
+					return;
+				}
+				if (!data.detail) {
+					this.$api.msg('请填写门牌号信息');
+					return;
+				}
+				let setAddress;
+				if(data.id) {
+					setAddress = editAddress
+				}else {
+					setAddress = addAddress
+				}
+				//this.$api.prePage()获取上一页实例,可直接调用上页所有数据和方法,在App.vue定义
+				setAddress(data).then(function(e) {
+					that.$api.prePage().refreshList();
+					uni.showToast({
+						title: '提交成功',
+						duration: 2000
+					});
+					setTimeout(function() {
+						uni.navigateBack();
+					}, 800);
+				});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		background: $page-color-base;
+		padding-top: 16rpx;
+	}
+
+	.row {
+		display: flex;
+		align-items: center;
+		position: relative;
+		padding: 0 30rpx;
+		height: 110rpx;
+		background: #fff;
+
+		.tit {
+			flex-shrink: 0;
+			width: 120rpx;
+			font-size: 30rpx;
+			color: $font-color-dark;
+		}
+
+		.input {
+			flex: 1;
+			font-size: 30rpx;
+			color: $font-color-dark;
+			text-align: right;
+		}
+
+		.iconlocation {
+			font-size: 36rpx;
+			color: $font-color-light;
+		}
+	}
+
+	.default-row {
+		margin-top: 16rpx;
+
+		.tit {
+			flex: 1;
+		}
+
+		switch {
+			transform: translateX(16rpx) scale(0.9);
+		}
+	}
+
+	.add-btn {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 690rpx;
+		height: 80rpx;
+		margin: 60rpx auto;
+		font-size: $font-lg;
+		color: #fff;
+		background-color: $base-color;
+		border-radius: 10rpx;
+	}
+
+	.alert-box {
+		background-color: #ffffff;
+	}
+
+	.yuan {
+		height: 40rpx;
+		width: 40rpx;
+		position: relative;
+		&-wai {
+			border: 1rpx solid #999;
+			height: 38rpx;
+			width: 38rpx;
+			border-radius: 50%;
+			position: absolute;
+			top: 0;
+			left: 0;
+			bottom: 0;
+			right: 0;
+			margin: auto;
+		}
+		&-yuan {
+			position: absolute;
+			top: 0;
+			left: 0;
+			bottom: 0;
+			right: 0;
+			margin: auto;
+			background-color: $base-color;
+			width: 30rpx;
+			height:30rpx;
+			border-radius: 50%;
+		}
+	}
+</style>

+ 501 - 0
pages/user/jf/bill.vue

@@ -0,0 +1,501 @@
+<template>
+	<view class="content">
+		<view class="content-money">
+			<view class="status_bar">
+			</view>
+			<view class="content-bg">
+				<image src="/static/img/tg-bg.png" mode=""></image>
+			</view>
+			<view class="money-box">
+				<view class="money">{{ userInfo.score|| '0' }}</view>
+				<view>我的积分</view>
+			</view>
+			<view class="money-box flex" style="padding:20rpx;" >
+				<view style="flex-grow: 1;text-align: left;" @click="navto('/pages/user/jf/store')">积分商城</view>
+				<view style="flex-grow: 1;text-align: right;" @click="navto('/pages/user/jf/jfcz')">充值积分</view>
+			</view>
+		</view>
+		<view class="nav flex">
+			<view class="nav-item" v-for="(item,index) in navList" @click="navClick(index)"
+				:class="{'action': index == current}">
+				{{item.tit}}
+			</view>
+		</view>
+		<scroll-view class="list-scroll-content" :style="{ height: maxheight }" scroll-y @scrolltolower="loadData">
+			<!-- <empty v-if="loaded === true && list.length === 0" :style="{ height: maxheight }"></empty> -->
+
+			<view v-for="(item, index) in navList[current].list" :key="index" class="order-item flex">
+				<view class="title-box flex_item">
+					<view class="list_tpl">
+						<view class="title">
+							{{item.content || item.title }}
+						</view>
+						<view class="time">
+							<text>{{ item.time }}</text>
+						</view>
+					</view>
+					<view class="" style="color:  #ff4173;">
+						{{item.type == 1 ? '+': '-'}}{{item.v}}
+					</view>
+				</view>
+			</view>
+			<uni-load-more :status="loadingType"></uni-load-more>
+		</scroll-view>
+	</view>
+</template>
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		getChildList,
+		getJfBill,
+		getUserInfo
+	} from '@/api/user.js'
+	export default {
+		onReady(res) {
+			var _this = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.list-scroll-content').boundingClientRect();
+					query.exec(function(res) {
+						_this.maxheight = resu.windowHeight - res[0].top + 'px';
+					});
+				},
+				fail: res => {}
+			});
+		},
+		data() {
+			return {
+				current: 0,
+				navList: [
+					{
+						tit: '收入',
+						pm: 1,
+						list: [],
+						page: 1,
+						loaded: false,
+						loadingType: 'more',
+					},
+					{
+						tit: '支出',
+						pm: 0,
+						list: [],
+						page: 1,
+						loaded: false,
+						loadingType: 'more',
+					},
+				],
+				// 头部图高度
+				maxheight: '',
+				pageSize: 10,
+			};
+		},
+		computed: {
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
+			...mapState(['baseURL'])
+		},
+		onLoad(options) {},
+		onShow() {
+			this.loadData();
+			this.getUserInfo()
+		},
+		methods: {
+			...mapMutations('user',['setUserInfo']),
+			getUserInfo() {
+				getUserInfo().then(res => {
+					this.setUserInfo(res.data)
+				})
+			},
+			navClick(index) {
+				this.current = index
+				this.loadData('tab')
+			},
+			// 页面跳转
+			navto(e) {
+				uni.navigateTo({
+					url: e
+				});
+			},
+			//获取收入支出信息
+			async loadData(source) {
+				//这里是将订单挂载到tab列表下
+				let that = this
+				let items = that.navList[that.current]
+				if(items.loadingType == 'loading' || items.loadingType == 'noMore') return;
+				if( source == 'tab' && items.loaded) return;
+				// 修改当前对象状态为加载中
+				that.loadingType = 'loading';
+				getJfBill({
+						page: items.page,
+						pageSize: that.pageSize,
+						type: items.pm,
+						uid: that.userInfo.uid
+					})
+					.then(({
+						data
+					}) => {
+						// that.all = data.totalCount
+						items.list = items.list.concat(data.list)
+						items.page++
+
+						if (that.pageSize == data.list.length) {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							items.loadingType = 'more';
+						} else {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							items.loadingType = 'noMore';
+						}
+						that.$set(items, 'loaded', true);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			//swiper 切换
+			changeTab(e) {
+				this.tabCurrentIndex = e.target.current;
+				this.loadData('tabChange');
+			},
+			//顶部tab点击
+			tabClick(index) {
+				this.tabCurrentIndex = index;
+			},
+			// 点击返回 我的页面
+			toBack() {
+				uni.switchTab({
+					url: '/pages/user/user'
+				});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		background: #f8f8f8;
+		height: 100%;
+	}
+
+	.status_bar {
+		height: var(--status-bar-height);
+		width: 100%;
+		background: #5dbc7c;
+	}
+
+	.content-money {
+		position: relative;
+		height: 480rpx;
+
+		.content-bg {
+			position: absolute;
+			top: 0;
+			left: 0;
+			right: 0;
+			width: 750rpx;
+			height: 480rpx;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.body-title {
+			height: 80rpx;
+			text-align: center;
+			font-size: 35rpx;
+			position: relative;
+
+			.header {
+				position: absolute;
+				left: 0;
+				top: 0;
+				width: 100%;
+				font-size: 36rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #fffeff;
+				height: 80rpx;
+				font-size: 36rpx;
+				font-weight: 700;
+				z-index: 9;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+			}
+
+			.goback-box {
+				position: absolute;
+				left: 18rpx;
+				top: 0;
+				height: 80rpx;
+				display: flex;
+				align-items: center;
+			}
+
+			.goback {
+				z-index: 100;
+				width: 34rpx;
+				height: 34rpx;
+			}
+		}
+	}
+
+	.money-box {
+		position: relative;
+		z-index: 2;
+		padding-top: 90rpx;
+		color: #ffffff;
+		text-align: center;
+
+		.money {
+			font-size: 72rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ffffff;
+		}
+
+		.text {
+			font-size: 30rpx;
+		}
+	}
+
+	.order-item {
+		padding: 20rpx 30rpx;
+		line-height: 1.5;
+		background-color: #fff;
+
+		.title-box {
+			width: 100%;
+
+			.title-avatar {
+				flex-shrink: 0;
+				width: 100rpx;
+				height: 100rpx;
+				margin-right: 25rpx;
+				border-radius: 100%;
+
+				image {
+					width: 100%;
+					height: 100%;
+					border-radius: 100%;
+				}
+			}
+
+			.list_tpl {
+				width: 85%;
+
+				.title {
+					display: flex;
+					justify-content: flex-start;
+					font-size: $font-lg;
+					color: $font-color-base;
+					// overflow: hidden; //超出的文本隐藏
+					// text-overflow: ellipsis; //溢出用省略号显示
+					// white-space: nowrap;
+					line-height: 1;
+					// text-align: center;
+					padding: 10rpx 20rpx 10rpx 0rpx;
+					// font-size: b;
+					font-weight: bold;
+					// width: 60rpx;
+
+					.title-name {
+						max-width: 40%;
+					}
+
+					.dl {
+						margin-left: 10rpx;
+						width: 93rpx;
+						height: 32rpx;
+						border-radius: 16rpx;
+
+						image {
+							width: 93rpx;
+							height: 32rpx;
+							border-radius: 16rpx;
+						}
+					}
+
+					.class {
+						display: inline-block;
+						margin-left: 10rpx;
+						padding: 6rpx;
+						text-align: center;
+						border: 1px solid #2e58ff;
+						border-radius: 16rpx;
+						font-size: 20rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #2e58ff;
+					}
+				}
+
+				.time {
+					font-size: $font-lg;
+					color: $font-color-light;
+				}
+			}
+		}
+
+		.money {
+			width: 50%;
+			text-align: right;
+			color: #db1935;
+			font-size: $font-lg;
+		}
+	}
+
+	.yeji {
+		position: relative;
+		margin: -72rpx auto 0;
+		width: 690rpx;
+		height: 143rpx;
+		background: #ffffff;
+		box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
+		border-radius: 10rpx;
+		display: flex;
+		align-items: center;
+
+		.yeji-a {
+			width: 50%;
+			display: flex;
+			flex-direction: column;
+			justify-content: center;
+			align-items: center;
+
+			.yeji-top {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+			}
+
+			.yeji-buttom {
+				font-size: 42rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+			}
+		}
+
+		.border {
+			width: 1rpx;
+			height: 51rpx;
+			background: #dddddd;
+		}
+	}
+
+	.navbar {
+		margin-top: 20rpx;
+		display: flex;
+		height: 88rpx;
+		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: #999999;
+			position: relative;
+
+			&.current {
+				color: #000;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid #fe5b38;
+				}
+			}
+		}
+	}
+
+	.buttom-box {
+		position: relative;
+		background-color: #ffffff;
+		text-align: center;
+		padding: 30rpx 0;
+
+		.buttom {
+			flex-grow: 1;
+		}
+
+		.money {
+
+			font-size: 32rpx;
+			font-weight: bold;
+			color: #ff4173;
+		}
+
+		.text {
+			padding-bottom: 26rpx;
+			font-size: 28rpx;
+			font-weight: 500;
+			color: #666666;
+
+			&.current {
+				border-bottom: 2px solid #ff4173;
+			}
+		}
+
+		.icon {
+			height: 50rpx;
+			width: 48rpx;
+			margin: 0 auto;
+
+			.icon-img {
+				width: 100%;
+				height: 100%;
+			}
+		}
+	}
+	.nav {
+		width: 750rpx;
+		height: 88rpx;
+		.nav-item {
+			line-height: 88rpx;
+			width: 50%;
+			text-align: center;
+			font-size: 30rpx;
+			font-weight: 500;
+			color: #333333;
+			height: 100%;
+		}
+	
+		.action {
+			font-weight: bold;
+			position: relative;
+	
+			&::after {
+				content: '';
+				width: 50rpx;
+				height: 6rpx;
+				background: #ff4173;
+				border-radius: 3rpx;
+				position: absolute;
+				left: 0;
+				right: 0;
+				bottom: 6rpx;
+				margin: auto;
+			}
+		}
+	
+		background-color: #fff;
+	}
+</style>

+ 8 - 0
pages/user/jf/createOrder.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 589 - 0
pages/user/jf/detail.vue

@@ -0,0 +1,589 @@
+<template>
+	<view class="content">
+		<view class="swiper-container">
+			<swiper indicator-dots="true" autoplay="true" interval="3000" duration="1000" style="height: 750rpx;">
+				<swiper-item v-for="(image, index) in product.slider_image" :key="index">
+					<image :src="image" mode="aspectFill" class="swiper-image" style="height: 750rpx;"></image>
+				</swiper-item>
+			</swiper>
+		</view>
+
+		<view class="product-info">
+			<text class="product-name">{{product.store_name}}</text>
+			<view class="points-info">
+				<text class="points-label">兑换所需积分:</text>
+				<text class="points-value">{{product.price}} 积分</text>
+			</view>
+		</view>
+
+		<view class="product-detail">
+			<view class="section-title">商品详情</view>
+			<view class="detail-content" v-html="product.content">
+
+			</view>
+		</view>
+		<view class="" style="height: 30rpx;">
+			
+		</view>
+		<view class="exchange-btn" @click="showPopup">
+			<text>立即兑换</text>
+		</view>
+
+		<!-- 兑换弹窗 -->
+		<view class="popup" v-if="showExchangePopup">
+			<view class="popup-content">
+				<view class="popup-header">
+					<text class="popup-title">确认兑换</text>
+					<view class="close-btn" @click="closePopup">
+						<text>×</text>
+					</view>
+				</view>
+
+				<view class="popup-body">
+					<view class="address-section" @click="showAddressList">
+						<view class="address-label">收货地址</view>
+						<view class="address-info" v-if="selectedAddress">
+							<view class="address-name-phone">
+								<text class="address-name">{{selectedAddress.real_name}}</text>
+								<text class="address-phone">{{selectedAddress.phone}}</text>
+							</view>
+							<view class="address-detail">
+								{{selectedAddress.province}}{{selectedAddress.city}}{{selectedAddress.district}}{{selectedAddress.detail}}
+							</view>
+						</view>
+						<view class="address-placeholder" v-else>
+							<text>请选择收货地址</text>
+						</view>
+						<view class="address-arrow">
+							<text>></text>
+						</view>
+					</view>
+
+					<view class="product-item">
+						<image :src="product.image" mode="aspectFill" class="product-image"></image>
+						<view class="product-info">
+							<view class="product-name">{{product.store_name}}</view>
+							<view class="product-points">{{product.price}} 积分/{{product.unit_name || '件'}}</view>
+						</view>
+					</view>
+
+					<view class="quantity-section">
+						<text class="quantity-label">兑换数量</text>
+						<view class="quantity-control">
+							<view class="quantity-btn" @click="decreaseQuantity" :class="{disabled: quantity <= 1}">
+								<text>-</text>
+							</view>
+							<view class="quantity-input">
+								<text>{{quantity}}</text>
+							</view>
+							<view class="quantity-btn" @click="increaseQuantity">
+								<text>+</text>
+							</view>
+						</view>
+					</view>
+
+					<view class="total-section">
+						<text class="total-label">总计</text>
+						<text class="total-points">{{totalPoints}} 积分</text>
+					</view>
+				</view>
+
+				<!-- 地址选择弹窗 -->
+				<view class="address-popup" v-if="showAddressPopup">
+
+				</view>
+
+				<view class="popup-footer">
+					<view class="exchange-btn" @click="confirmExchange">
+						<text>确认兑换</text>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		getProductDetail,
+		addToCart,
+		createOrder
+	} from '@/api/good.js'
+	import {
+		getUserAddressList,
+		scorePay
+	} from '@/api/user.js'
+	export default {
+		data() {
+			return {
+				id: '',
+				product: {},
+				showExchangePopup: false,
+				quantity: 1,
+				showAddressPopup: false,
+				addresses: [],
+				selectedAddress: null
+			};
+		},
+		computed: {
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
+			totalPoints() {
+				return this.product.price * this.quantity;
+			}
+		},
+		methods: {
+			getProductDetail() {
+				let that = this;
+				getProductDetail(that.id).then(res => {
+					this.product = res.data
+					this.product.slider_image = this.product.slider_image.split(',')
+				})
+			},
+			// 获取地址列表
+			getAddresses() {
+				getUserAddressList({
+					uid: this.userInfo.uid
+				}).then(res => {
+					console.log(res);
+					this.selectedAddress = res.data[0]
+				})
+			},
+			// 显示兑换弹窗
+			showPopup() {
+				this.showExchangePopup = true;
+			},
+			// 关闭兑换弹窗
+			closePopup() {
+				this.showExchangePopup = false;
+			},
+			// 显示地址选择弹窗
+			showAddressList() {
+				// this.showAddressPopup = true;
+				uni.navigateTo({
+					url: '/pages/user/jf/addres?source=1'
+				})
+			},
+			// 关闭地址选择弹窗
+			closeAddressPopup() {
+				this.showAddressPopup = false;
+			},
+			// 选择地址
+			selectAddress(address) {
+				this.selectedAddress = address;
+				this.showAddressPopup = false;
+			},
+			// 添加新地址
+			addAddress() {
+				// 这里应该跳转到添加地址页面
+				console.log('添加新地址');
+			},
+			// 减少数量
+			decreaseQuantity() {
+				if (this.quantity > 1) {
+					this.quantity--;
+				}
+			},
+			// 增加数量
+			increaseQuantity() {
+				this.quantity++;
+			},
+			// 确认兑换
+			confirmExchange() {
+				if (!this.selectedAddress) {
+					// 提示用户选择地址
+					console.log('请选择收货地址');
+					return;
+				}
+				let that = this;
+				addToCart({
+					product_id: that.id,
+					cart_num: that.quantity,
+				}).then(res => {
+					createOrder({
+						cart_ids: res.data.id + '',
+						address_id: that.selectedAddress.id
+					}).then(ress => {
+						scorePay(ress.data.order_id).then(res => {
+							// uni.showToast({
+							// 	title: '兑换成功',
+							// 	icon: 'success',
+							// 	duration: 2000
+							// })
+							// that.closePopup()
+							uni.navigateTo({
+								url:'/pages/user/jf/success?order_id='+ress.data.order_id+'&points=' + ress.data.pay_money
+							})
+						})
+					})
+				})
+			}
+		},
+		onLoad(opt) {
+			this.id = opt.id
+			this.getProductDetail()
+			this.getAddresses()
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+		background-color: #F5F5F5;
+	}
+
+	.content {
+		background-color: #fff;
+		min-height: 100%;
+		padding-bottom: 100rpx;
+	}
+
+	.header {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding: 0 30rpx;
+		height: 80rpx;
+		background-color: #FFFFFF;
+
+		.back {
+			width: 40rpx;
+			height: 40rpx;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.title {
+			font-size: 32rpx;
+			font-weight: bold;
+			color: #333333;
+		}
+
+		.right {
+			width: 40rpx;
+		}
+	}
+
+	.swiper-container {
+		width: 100%;
+		height: 750rpx;
+		background-color: #FFFFFF;
+
+		.swiper-image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.product-info {
+		background-color: #FFFFFF;
+		padding: 30rpx;
+		margin-top: 10rpx;
+
+		.product-name {
+			font-size: 32rpx;
+			font-weight: bold;
+			color: #333333;
+			margin-bottom: 20rpx;
+			line-height: 44rpx;
+		}
+
+		.points-info {
+			display: flex;
+			align-items: center;
+
+			.points-label {
+				font-size: 26rpx;
+				color: #666666;
+			}
+
+			.points-value {
+				font-size: 32rpx;
+				font-weight: bold;
+				color: #FF4444;
+				margin-left: 10rpx;
+			}
+		}
+	}
+
+	.product-detail {
+		background-color: #FFFFFF;
+		padding: 30rpx;
+		margin-top: 10rpx;
+
+		.section-title {
+			font-size: 28rpx;
+			font-weight: bold;
+			color: #333333;
+			margin-bottom: 20rpx;
+			padding-bottom: 15rpx;
+			border-bottom: 1rpx solid #EEEEEE;
+		}
+
+		.detail-content {
+
+			.detail-text {
+				font-size: 26rpx;
+				color: #666666;
+				line-height: 36rpx;
+				text-align: justify;
+			}
+		}
+	}
+
+	.exchange-btn {
+		position: fixed;
+		bottom: 30rpx;
+		left: 30rpx;
+		right: 30rpx;
+		height: 90rpx;
+		background-color: #FF4444;
+		border-radius: 45rpx;
+		font-size: 32rpx;
+		font-weight: bold;
+		color: #FFFFFF;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		box-shadow: 0 4rpx 15rpx rgba(255, 68, 68, 0.4);
+	}
+
+	/* 弹窗样式 */
+	.popup {
+		position: fixed;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		background-color: rgba(0, 0, 0, 0.5);
+		display: flex;
+		align-items: flex-end;
+		justify-content: center;
+		z-index: 9999;
+
+		.popup-content {
+			width: 100%;
+			background-color: #FFFFFF;
+			border-top-left-radius: 20rpx;
+			border-top-right-radius: 20rpx;
+			padding: 30rpx;
+
+			.popup-header {
+				display: flex;
+				align-items: center;
+				justify-content: space-between;
+				margin-bottom: 30rpx;
+
+				.popup-title {
+					font-size: 32rpx;
+					font-weight: bold;
+					color: #333333;
+				}
+
+				.close-btn {
+					width: 40rpx;
+					height: 40rpx;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					font-size: 36rpx;
+					color: #999999;
+				}
+			}
+
+			.popup-body {
+				margin-bottom: 30rpx;
+
+				.address-section {
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					padding: 20rpx 0;
+					border-bottom: 1rpx solid #EEEEEE;
+					margin-bottom: 30rpx;
+
+					.address-label {
+						font-size: 26rpx;
+						color: #333333;
+						margin-right: 20rpx;
+					}
+
+					.address-info {
+						flex: 1;
+						margin-right: 20rpx;
+
+						.address-name-phone {
+							display: flex;
+							align-items: center;
+							margin-bottom: 10rpx;
+
+							.address-name {
+								font-size: 26rpx;
+								font-weight: bold;
+								color: #333333;
+								margin-right: 20rpx;
+							}
+
+							.address-phone {
+								font-size: 26rpx;
+								color: #666666;
+							}
+						}
+
+						.address-detail {
+							font-size: 24rpx;
+							color: #999999;
+							line-height: 32rpx;
+						}
+					}
+
+					.address-placeholder {
+						flex: 1;
+						margin-right: 20rpx;
+
+						text {
+							font-size: 26rpx;
+							color: #999999;
+						}
+					}
+
+					.address-arrow {
+						width: 30rpx;
+						height: 30rpx;
+						display: flex;
+						align-items: center;
+						justify-content: center;
+						font-size: 24rpx;
+						color: #999999;
+					}
+				}
+
+				.product-item {
+					display: flex;
+					align-items: center;
+					margin-bottom: 30rpx;
+
+					.product-image {
+						width: 120rpx;
+						height: 120rpx;
+						border-radius: 10rpx;
+						margin-right: 20rpx;
+					}
+
+					.product-info {
+						flex: 1;
+
+						.product-name {
+							font-size: 28rpx;
+							font-weight: bold;
+							color: #333333;
+							margin-bottom: 10rpx;
+						}
+
+						.product-points {
+							font-size: 24rpx;
+							color: #FF4444;
+						}
+					}
+				}
+
+				.quantity-section {
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					margin-bottom: 30rpx;
+
+					.quantity-label {
+						font-size: 26rpx;
+						color: #333333;
+					}
+
+					.quantity-control {
+						display: flex;
+						align-items: center;
+
+						.quantity-btn {
+							width: 50rpx;
+							height: 50rpx;
+							border: 1rpx solid #DDDDDD;
+							border-radius: 5rpx;
+							display: flex;
+							align-items: center;
+							justify-content: center;
+							font-size: 32rpx;
+							color: #333333;
+
+							&.disabled {
+								color: #CCCCCC;
+								border-color: #EEEEEE;
+							}
+						}
+
+						.quantity-input {
+							width: 100rpx;
+							height: 50rpx;
+							border-top: 1rpx solid #DDDDDD;
+							border-bottom: 1rpx solid #DDDDDD;
+							display: flex;
+							align-items: center;
+							justify-content: center;
+							font-size: 26rpx;
+							color: #333333;
+						}
+					}
+				}
+
+				.total-section {
+					display: flex;
+					align-items: center;
+					justify-content: space-between;
+					padding-top: 20rpx;
+					border-top: 1rpx solid #EEEEEE;
+
+					.total-label {
+						font-size: 28rpx;
+						font-weight: bold;
+						color: #333333;
+					}
+
+					.total-points {
+						font-size: 32rpx;
+						font-weight: bold;
+						color: #FF4444;
+					}
+				}
+			}
+
+			.popup-footer {
+
+				.exchange-btn {
+					position: static;
+					margin: 0;
+				}
+			}
+		}
+	}
+
+	/* 地址选择弹窗样式 */
+	.address-popup {
+		position: fixed;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		background-color: rgba(0, 0, 0, 0.5);
+		display: flex;
+		align-items: flex-end;
+		justify-content: center;
+		z-index: 10000;
+
+
+	}
+</style>

+ 87 - 22
pages/user/jf/jfcz.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
 	<view class="content">
 	<view class="content">
 		 <view class="points-header">
 		 <view class="points-header">
-			<text class="points-count">0</text>
+			<text class="points-count">{{userInfo.score || '0'}}</text>
 			<text class="points-label">我的积分</text>
 			<text class="points-label">我的积分</text>
 		</view>
 		</view>
 	
 	
@@ -9,7 +9,7 @@
 			<view class="list flex">
 			<view class="list flex">
 				<view @click="changePoints(index)" :class="{action:index==actionIndex}" class="item flex" 
 				<view @click="changePoints(index)" :class="{action:index==actionIndex}" class="item flex" 
 					v-for="(item,index) in pointsList">
 					v-for="(item,index) in pointsList">
-					<image class="icon" src="../../../static/icon/ye.png" mode="widthFix"></image>
+					<image class="icon" src="/static/icon/jf.png" mode="widthFix"></image>
 					<view class="info">
 					<view class="info">
 						<text class="points">{{item.points}}积分</text>
 						<text class="points">{{item.points}}积分</text>
 						<text class="price">¥{{item.price}}元</text>
 						<text class="price">¥{{item.price}}元</text>
@@ -18,17 +18,17 @@
 			</view>
 			</view>
 			
 			
 			<view class="amount">
 			<view class="amount">
-				<text class="label">应付金额(活动随机立减0.01~1.00元)</text>
+				<text class="label">应付金额(活动随机立减0.10~1.00元)</text>
 				<text class="value">¥{{payMoney}}元</text>
 				<text class="value">¥{{payMoney}}元</text>
 			</view>
 			</view>
 		</view>
 		</view>
 		<view class="payment" @click="selectPayment('wxpay')">
 		<view class="payment" @click="selectPayment('wxpay')">
 			<view class="left flex">
 			<view class="left flex">
-				<image class="icon" src="../../../static/icon/weipay.png" mode="widthFix"></image>
+				<image class="icon" src="/static/icon/weipay.png" mode="widthFix"></image>
 				<text>微信支付</text>
 				<text>微信支付</text>
 			</view>
 			</view>
 			<view class="right">
 			<view class="right">
-				<image v-if="paymentType=='wxpay'" class="checked" src="../../../static/icon/addressIconXz.png" mode="widthFix"></image>
+				<image v-if="paymentType=='wxpay'" class="checked" src="/static/icon/addressIconXz.png" mode="widthFix"></image>
 				<view v-else class="no-checked"></view>
 				<view v-else class="no-checked"></view>
 			</view>
 			</view>
 		</view>
 		</view>
@@ -38,29 +38,56 @@
 </template>
 </template>
 
 
 <script>
 <script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import { jfcz, getUserInfo, getJfBl } from '@/api/user.js'
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
+				bl: 0,
+				loading: false,
 				actionIndex: 0, //当前选中的积分选项索引
 				actionIndex: 0, //当前选中的积分选项索引
 				paymentType: 'wxpay', //支付方式
 				paymentType: 'wxpay', //支付方式
 				pointsList: [
 				pointsList: [
-					{ points: 10, price: 10 },
-					{ points: 20, price: 20 },
-					{ points: 50, price: 50 },
-					{ points: 80, price: 80 },
-					{ points: 100, price: 100 },
-					{ points: 200, price: 200 }
+					{ points: 0, price: 10 },
+					{ points: 0, price: 20 },
+					{ points: 0, price: 50 },
+					{ points: 0, price: 80 },
+					{ points: 0, price: 100 },
+					{ points: 0, price: 200 }
 				],
 				],
 				reduction: 0.1, //活动立减金额
 				reduction: 0.1, //活动立减金额
 			};
 			};
 		},
 		},
+		onShow() {
+			this.getJfBl()
+		},
 		computed: {
 		computed: {
 			payMoney() {
 			payMoney() {
 				const selected = this.pointsList[this.actionIndex];
 				const selected = this.pointsList[this.actionIndex];
 				return selected.price
 				return selected.price
-			}
+			},
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
 		},
 		},
 		methods: {
 		methods: {
+			...mapMutations('user',['setUserInfo']),
+			getJfBl() {
+				let that = this
+				getJfBl().then(res => {
+					that.bl = res.data.points_transformation
+					that.pointsList = this.pointsList.map(item => {
+						item.points = item.price * that.bl
+						return item
+					})
+				})
+			},
+			getUserInfo() {
+				getUserInfo().then(res => {
+					this.setUserInfo(res.data)
+				})
+			},
 			// 返回
 			// 返回
 			navBack() {
 			navBack() {
 				uni.navigateBack();
 				uni.navigateBack();
@@ -75,16 +102,54 @@
 			},
 			},
 			// 充值
 			// 充值
 			recharge() {
 			recharge() {
-				// 这里可以添加充值逻辑
-				uni.showToast({
-					title: '充值成功',
-					icon: 'success'
-				});
-				
-				// 充值成功后返回
-				setTimeout(() => {
-					this.navBack();
-				}, 1500);
+				let that = this;
+				if(that.loading) return;
+				that.loading = true
+				jfcz({
+					price: that.payMoney,
+					pay_type: that.paymentType
+				}).then(res => {
+					let da = res.data.jsApiParameters
+					let data = {
+						appId: da.appId,
+						timeStamp: da.timeStamp + '',
+						nonceStr: da.nonceStr,
+						package: da.package,
+						signType: da.signType,
+						paySign: da.paySign,
+						success: function(res) {
+							that.getUserInfo()
+							that.loading = false
+							uni.showModal({
+								title: '提示',
+								content: '支付成功!',
+								cancelText: '关闭',
+								confirmText: '查看我的积分',
+								success: () => {},
+								fail: () => {},
+								complete(res) {
+									if (res.confirm) {
+										uni.reLaunch({
+											url: '/pages/user/jf/bill'
+										});
+									}
+								}
+							});
+						},
+						fail: (err) => {
+							console.log(err)
+							that.loading = false
+							// alert('支付失败')
+							// uni.navigateTo({
+							// 	url: '/pages/order/order?state=0'
+							// });
+						}
+					};
+					wx.requestPayment(data)
+					
+				}).catch(err => {
+					that.loading = false
+				})
 			}
 			}
 		}
 		}
 	};
 	};

+ 503 - 0
pages/user/jf/order.vue

@@ -0,0 +1,503 @@
+<template>
+	<view class="order-container">
+		<view class="tabs">
+			<view class="tab-item" v-for="(tab, index) in tabs" :key="index" :class="{active: currentTab === index}"
+				@click="switchTab(index)">
+				<text class="tab-text">{{tab.name}}</text>
+				<view class="tab-indicator" v-if="currentTab === index"></view>
+			</view>
+		</view>
+
+		<scroll-view class="order-list" scroll-y :refresher-enabled="true" :refresher-triggered="refreshing"
+			@refresherrefresh="onRefresh" @scrolltolower="loadMore">
+			<view class="order-card" v-for="order in orderList" :key="order.id">
+				<view class="order-header">
+					<view class="order-no">订单号:{{order.order_id}}</view>
+					<view class="order-status">
+						{{getStatusText(order.status)}}
+					</view>
+				</view>
+
+				<view class="order-items">
+					<view class="order-item" v-for="(item, idx) in order.cart_info" :key="idx">
+						<image :src="item.image" mode="aspectFill" class="item-image"></image>
+						<view class="item-info">
+							<text class="item-name">{{item.product_name}}</text>
+							<text class="item-spec">{{item.unique || ''}}</text>
+							<view class="item-bottom">
+								<!-- <text class="item-price">¥{{item.total_price}}</text> -->
+								<text class="item-count">×{{item.cart_num}}</text>
+							</view>
+						</view>
+					</view>
+				</view>
+
+				<view class="order-footer">
+					<view class="order-total">
+						<text class="total-label">合计:</text>
+						<text class="total-price">{{order.pay_price}}积分</text>
+					</view>
+					<view class="order-actions">
+						<view class="action-btn btn-outline" v-if="order.status === 1"
+							@click="cancelOrder(order.order_id)">
+							<text>取消订单</text>
+						</view>
+						<view 
+							class="action-btn btn-primary" 
+							v-if="order.status === 0" 
+							@click="payOrder(order.order_id)"
+						>
+							<text>立即兑换</text>
+						</view>
+						<view class="action-btn btn-primary" v-if="order.status === 2"
+							@click="confirmReceipt(order.order_id)">
+							<text>确认收货</text>
+						</view>
+						<view class="action-btn btn-outline" @click="viewDetail(order.order_id)">
+							<text>查看详情</text>
+						</view>
+					</view>
+				</view>
+			</view>
+
+			<view class="empty-state" v-if="orderList.length === 0">
+				<image src="/static/icon/empty.png" mode="aspectFit" class="empty-icon"></image>
+				<text class="empty-text">暂无订单</text>
+			</view>
+
+			<view class="load-more" v-if="orderList.length > 0">
+				<text v-if="loading">加载中...</text>
+				<text v-else-if="!hasMore">没有更多了</text>
+				<text v-else>下拉加载更多</text>
+			</view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex'
+	import {
+		getOrderList,
+		cancelOrder,
+		confirmOrder
+	} from '@/api/user.js'
+	export default {
+		data() {
+			return {
+				// -1订单取消,0待发货,1待发货,2待收货,3已完成
+				tabs: [
+					// {name: '全部', status: 0},
+					{
+						name: '待发货',
+						status: 1
+					},
+					{
+						name: '待收货',
+						status: 2
+					},
+					{
+						name: '已完成',
+						status: 3
+					}
+				],
+				currentTab: 0,
+				orderList: [],
+				page: 1,
+				pageSize: 10,
+				status:1,
+				loading: false,
+				refreshing: false,
+				hasMore: true
+			}
+		},
+		computed: {
+			...mapState('user', ['userInfo'])
+		},
+		methods: {
+			switchTab(index) {
+				this.currentTab = index
+				this.status = this.tabs[index].status
+				this.page = 1
+				this.orderList = []
+				this.hasMore = true
+				this.getOrderList()
+			},
+			getOrderList() {
+				if (this.loading) return
+				this.loading = true
+				getOrderList({
+					page: this.page,
+					pageSize: this.pageSize,
+					status: this.status,
+					uid: this.userInfo.uid
+				}).then(res => {
+					if (res.data && res.data.list) {
+						if (this.page === 1) {
+							this.orderList = res.data.list
+						} else {
+							this.orderList = [...this.orderList, ...res.data.list]
+						}
+						this.hasMore = res.data.list.length >= this.pageSize
+					} else {
+						this.hasMore = false
+					}
+					console.log(this.orderList, 'this.orderList');
+					this.loading = false
+					this.refreshing = false
+				}).catch(() => {
+					this.loading = false
+					this.refreshing = false
+				})
+			},
+			getStatusText(status) {
+				// -1订单取消,0待发货,1待发货,2待收货,3已完成
+				const statusMap = {
+					0: '待发货',
+					1: '待发货',
+					2: '待收货',
+					3: '已完成',
+					// 4: '已取消'
+				}
+				return statusMap[status] || '未知状态'
+			},
+			getStatusClass(status) {
+				const classMap = {
+					0: 'status-pending',
+					1: 'status-unpaid',
+					2: 'status-shipping',
+					3: 'status-completed',
+					4: 'status-canceled'
+				}
+				return classMap[status] || ''
+			},
+			onRefresh() {
+				this.page = 1
+				this.orderList = []
+				this.hasMore = true
+				this.getOrderList()
+			},
+			loadMore() {
+				if (!this.hasMore || this.loading) return
+				this.page++
+				this.getOrderList()
+			},
+			cancelOrder(orderId) {
+				uni.showModal({
+					title: '提示',
+					content: '确定要取消该订单吗?',
+					success: (res) => {
+						if (res.confirm) {
+							console.log('取消订单:', orderId)
+							cancelOrder(orderId).then(res => {
+								if (res.code === 200) {
+									uni.showToast({
+										title: '订单已成功取消',
+										icon: 'success'
+									})
+									this.getOrderList()
+								}
+							})
+						}
+					}
+				})
+			},
+			payOrder(orderId,pay) {
+				console.log('支付订单:', orderId)
+				// 
+				uni.showModal({
+					title: '提示',
+					content: '确定花费' + pay +'积分兑换该商品吗?',
+					success: (res) => {
+						if (res.confirm) {
+							scorePay(orderId).then(res => {
+								uni.showToast({
+									title: '兑换成功',
+									icon: 'success',
+									duration: 2000
+								})
+								this.getOrderList()
+							})
+						}
+					}
+				})
+				
+			},
+			confirmReceipt(orderId) {
+				uni.showModal({
+					title: '提示',
+					content: '确定已收到商品吗?',
+					success: (res) => {
+						if (res.confirm) {
+							console.log('确认收货:', orderId)
+							confirmOrder(orderId).then(res => {
+								if (res.code === 200) {
+									uni.showToast({
+										title: '订单已成功确认收货',
+										icon: 'success'
+									})
+									this.getOrderList()
+								}
+							})
+						}
+					}
+				})
+			},
+			viewDetail(orderId) {
+				uni.navigateTo({
+					url: `/pages/user/jf/orderDetail?id=${orderId}`
+				})
+			}
+		},
+		onLoad() {
+			this.getOrderList()
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background-color: #F5F5F5;
+		min-height: 100vh;
+	}
+
+	.order-container {
+		min-height: 100vh;
+		background-color: #F5F5F5;
+	}
+
+	.tabs {
+		display: flex;
+		background-color: #FFFFFF;
+		position: sticky;
+		top: 0;
+		z-index: 100;
+		border-bottom: 1rpx solid #EEEEEE;
+	}
+
+	.tab-item {
+		flex: 1;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		padding: 25rpx 0;
+		position: relative;
+
+		.tab-text {
+			font-size: 28rpx;
+			color: #666666;
+			transition: color 0.3s;
+		}
+
+		.tab-indicator {
+			position: absolute;
+			bottom: 0;
+			width: 40rpx;
+			height: 4rpx;
+			background-color: #FF4444;
+			border-radius: 2rpx;
+		}
+
+		&.active {
+			.tab-text {
+				color: #FF4444;
+				font-weight: bold;
+			}
+		}
+	}
+
+	.order-list {
+		height: calc(100vh - 88rpx);
+		padding: 20rpx;
+	}
+
+	.order-card {
+
+		background-color: #FFFFFF;
+		border-radius: 15rpx;
+		margin-bottom: 20rpx;
+		// overflow: hidden;
+
+		box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+	}
+
+	.order-header {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 25rpx 30rpx;
+		border-bottom: 1rpx solid #F0F0F0;
+
+		.order-no {
+			font-size: 24rpx;
+			color: #999999;
+		}
+
+		.order-status {
+			font-size: 26rpx;
+			font-weight: bold;
+
+			&.status-pending {
+				color: #FF9900;
+			}
+
+			&.status-unpaid {
+				color: #FF4444;
+			}
+
+			&.status-shipping {
+				color: #0099FF;
+			}
+
+			&.status-completed {
+				color: #52C41A;
+			}
+
+			&.status-canceled {
+				color: #999999;
+			}
+		}
+	}
+
+	.order-items {
+		padding: 20rpx 30rpx;
+	}
+
+	.order-item {
+		display: flex;
+		margin-bottom: 20rpx;
+
+		&:last-child {
+			margin-bottom: 0;
+		}
+
+		.item-image {
+			width: 160rpx;
+			height: 160rpx;
+			border-radius: 10rpx;
+			background-color: #F5F5F5;
+		}
+
+		.item-info {
+			flex: 1;
+			margin-left: 20rpx;
+			display: flex;
+			flex-direction: column;
+			justify-content: space-between;
+
+			.item-name {
+				font-size: 28rpx;
+				color: #333333;
+				line-height: 36rpx;
+				display: -webkit-box;
+				-webkit-box-orient: vertical;
+				-webkit-line-clamp: 2;
+				overflow: hidden;
+			}
+
+			.item-spec {
+				font-size: 24rpx;
+				color: #999999;
+			}
+
+			.item-bottom {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+
+				.item-price {
+					font-size: 28rpx;
+					font-weight: bold;
+					color: #FF4444;
+				}
+
+				.item-count {
+					font-size: 24rpx;
+					color: #999999;
+				}
+			}
+		}
+	}
+
+	.order-footer {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 25rpx 30rpx;
+		border-top: 1rpx solid #F0F0F0;
+		background-color: #FAFAFA;
+
+		.order-total {
+			display: flex;
+			align-items: baseline;
+
+			.total-label {
+				font-size: 24rpx;
+				color: #666666;
+			}
+
+			.total-price {
+				font-size: 32rpx;
+				font-weight: bold;
+				color: #FF4444;
+				margin-left: 5rpx;
+			}
+		}
+
+		.order-actions {
+			display: flex;
+			gap: 15rpx;
+		}
+	}
+
+	.action-btn {
+		padding: 15rpx 30rpx;
+		border-radius: 30rpx;
+		font-size: 24rpx;
+
+		&.btn-outline {
+			border: 1rpx solid #DDDDDD;
+			color: #666666;
+
+			&:active {
+				background-color: #F5F5F5;
+			}
+		}
+
+		&.btn-primary {
+			background-color: #FF4444;
+			color: #FFFFFF;
+
+			&:active {
+				background-color: #E63939;
+			}
+		}
+	}
+
+	.empty-state {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		padding: 100rpx 0;
+
+		.empty-icon {
+			width: 200rpx;
+			height: 200rpx;
+			margin-bottom: 30rpx;
+			opacity: 0.5;
+		}
+
+		.empty-text {
+			font-size: 28rpx;
+			color: #999999;
+		}
+	}
+
+	.load-more {
+		text-align: center;
+		padding: 30rpx;
+		font-size: 24rpx;
+		color: #999999;
+	}
+</style>

+ 754 - 0
pages/user/jf/orderDetail.vue

@@ -0,0 +1,754 @@
+<template>
+	<view class="order-detail-container">
+		<!-- <view class="status-bar" >
+			<view class="status-icon">
+				<text>{{getStatusIcon(order.status)}}</text>
+			</view>
+			<view class="status-info">
+				<text class="status-text">{{getStatusText(order.status)}}</text>
+				<text class="status-desc">{{getStatusDesc(order.status)}}</text>
+			</view>
+		</view> -->
+
+		<view class="order-card">
+			<view class="card-header">
+				<text class="card-title">订单信息</text>
+			</view>
+			<view class="order-info">
+				<view class="info-row">
+					<text class="info-label">订单编号</text>
+					<text class="info-value">{{order.order_id}}</text>
+				</view>
+				<view class="info-row">
+					<text class="info-label">下单时间</text>
+					<text class="info-value">{{order.create_time }}</text>
+				</view>
+				<!-- <view class="info-row">
+					<text class="info-label">支付方式</text>
+					<text class="info-value">{{order.pay_type || '积分支付'}}</text>
+				</view> -->
+			</view>
+		</view>
+
+		<view class="order-card">
+			<view class="card-header">
+				<text class="card-title">收货地址</text>
+				<view class="address-tag" v-if="order.address_info && order.address_info.is_default">默认</view>
+			</view>
+			<view class="address-info" v-if="order.address_info">
+				<view class="address-user">
+					<text class="address-name">{{order.address_info.real_name}}</text>
+					<text class="address-phone">{{order.address_info.phone}}</text>
+				</view>
+				<view class="address-detail">
+					{{order.address_info.province}}{{order.address_info.city}}{{order.address_info.district}}{{order.address_info.detail}}
+				</view>
+			</view>
+			<view class="address-empty" v-else>
+				<text>暂无收货地址</text>
+			</view>
+		</view>
+
+		<view class="order-card">
+			<view class="card-header">
+				<text class="card-title">商品清单</text>
+				<!-- <text class="card-count">共{{typeOf(order.cart_info) }}件商品</text> -->
+			</view>
+			<view class="product-list">
+				<view class="product-item" v-for="(item, index) in order.cart_info" :key="index">
+					<image :src="item.image" mode="aspectFill" class="product-image"></image>
+					<view class="product-info">
+						<text class="product-name">{{item.product_name}}</text>
+						<text class="product-spec">{{item.unique || ''}}</text>
+						<view class="product-bottom">
+							<text class="product-price">{{item.price}}积分</text>
+							<text class="product-count">×{{item.cart_num}}</text>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+
+		<view class="order-card">
+			<view class="card-header">
+				<text class="card-title">费用明细</text>
+			</view>
+			<view class="fee-list">
+				<view class="fee-row">
+					<text class="fee-label">商品价值</text>
+					<text class="fee-value">{{order.total_price}}积分</text>
+				</view>
+				<!-- <view class="fee-row">
+					<text class="fee-label">运费</text>
+					<text class="fee-value">{{order.pay_postage === 0 ? '免运费' : '¥' + order.pay_postage}}</text>
+				</view> -->
+				<!-- <view class="fee-row" v-if="order.discount_amount">
+					<text class="fee-label">优惠金额</text>
+					<text class="fee-value discount">-¥{{order.discount_amount}}</text>
+				</view> -->
+				<view class="fee-row total">
+					<text class="fee-label">实付</text>
+					<text class="fee-value">{{order.pay_price}}积分</text>
+				</view>
+			</view>
+		</view>
+
+		<!-- <view class="order-card">
+			<view class="card-header">
+				<text class="card-title">订单状态</text>
+			</view>
+			<view class="timeline">
+				<view 
+					class="timeline-item" 
+					v-for="(item, index) in timeline" 
+					:key="index"
+					:class="{active: index <= currentStep, done: index < currentStep}"
+				>
+					<view class="timeline-dot"></view>
+					<view class="timeline-content">
+						<text class="timeline-title">{{item.title}}</text>
+						<text class="timeline-time">{{item.time}}</text>
+					</view>
+					<view class="timeline-line" v-if="index < timeline.length - 1"></view>
+				</view>
+			</view>
+		</view> -->
+
+		<view class="bottom-bar">
+			<!-- <view class="total-info">
+				<text class="total-label">实付款:</text>
+				<text class="total-price">¥{{order.total_amount}}</text>
+			</view> -->
+			<view class="bottom-actions">
+				<view class="action-btn btn-outline" v-if="order.status === 1 || order.status === 0"
+					@click="cancelOrder">
+					<text>取消订单</text>
+				</view>
+				<!-- <view 
+					class="action-btn btn-primary" 
+					v-if="order.status === 1" 
+					@click="payOrder"
+				>
+					<text>立即支付</text>
+				</view> -->
+				<view class="action-btn btn-primary" v-if="order.status === 2" @click="confirmReceipt">
+					<text>确认收货</text>
+				</view>
+				<!-- <view 
+					class="action-btn btn-outline" 
+					@click="goBack"
+				>
+					<text>返回列表</text>
+				</view> -->
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex'
+	import {
+		getOrderDetail,
+		cancelOrder
+	} from '@/api/user.js'
+	export default {
+		data() {
+			return {
+				orderId: '',
+				order: {
+					id: '',
+					order_no: '',
+					status: 0,
+					create_time: '',
+					pay_type: '',
+					goods_amount: 0,
+					shipping_fee: 0,
+					discount_amount: 0,
+					total_amount: 0,
+					address: null,
+					items: []
+				},
+				timeline: []
+			}
+		},
+		computed: {
+			...mapState('user', ['userInfo']),
+			currentStep() {
+				return this.order.status
+			}
+		},
+		filters: {
+			showTime(time) {
+				console.log(time, 'time');
+				return time
+			}
+		},
+		methods: {
+			cancelOrder() {
+				uni.showModal({
+					title: '提示',
+					content: '确定要取消该订单吗?',
+					success: (res) => {
+						if (res.confirm) {
+
+							cancelOrder(this.orderId).then(res => {
+								if (res.code === 200) {
+									uni.showToast({
+										title: '订单已成功取消',
+										icon: 'success'
+									})
+									setTimeout(() => {
+										uni.redirectTo({
+											url: '/pages/user/jf/order'
+										})
+									}, 1500)
+
+								}
+							})
+						}
+					}
+				})
+			},
+			getOrderDetail() {
+				getOrderDetail(this.orderId).then(res => {
+					if (res.data) {
+						this.order = res.data
+						// this.generateTimeline()
+						this.order.create_time = new Date(this.order.create_time * 1000).toLocaleString('zh-CN')
+					}
+				})
+			},
+			getStatusText(status) {
+				const statusMap = {
+					0: '待确认',
+					1: '待支付',
+					2: '待收货',
+					3: '已完成',
+					4: '已取消'
+				}
+				return statusMap[status] || '未知状态'
+			},
+			getStatusDesc(status) {
+				const descMap = {
+					0: '等待商家确认订单',
+					1: '请尽快完成支付',
+					2: '商品已发货,等待收货',
+					3: '订单已完成',
+					4: '订单已取消'
+				}
+				return descMap[status] || ''
+			},
+			getStatusIcon(status) {
+				const iconMap = {
+					0: '○',
+					1: '¤',
+					2: '→',
+					3: '✓',
+					4: '✕'
+				}
+				return iconMap[status] || '●'
+			},
+			getStatusClass(status) {
+				const classMap = {
+					0: 'status-pending',
+					1: 'status-unpaid',
+					2: 'status-shipping',
+					3: 'status-completed',
+					4: 'status-canceled'
+				}
+				return classMap[status] || ''
+			},
+			generateTimeline() {
+				const baseTime = this.order.create_time || new Date().toLocaleString('zh-CN')
+				this.timeline = [{
+						title: '订单已提交',
+						time: baseTime
+					},
+					{
+						title: '订单已确认',
+						time: this.order.status >= 1 ? baseTime : ''
+					},
+					{
+						title: '商品已发货',
+						time: this.order.status >= 2 ? baseTime : ''
+					},
+					{
+						title: '已确认收货',
+						time: this.order.status >= 3 ? baseTime : ''
+					}
+				]
+			},
+			payOrder() {
+				console.log('支付订单:', this.orderId)
+			},
+			confirmReceipt() {
+				uni.showModal({
+					title: '提示',
+					content: '确定已收到商品吗?',
+					success: (res) => {
+						if (res.confirm) {
+							confirmOrder(this.orderId).then(res => {
+								if (res.code === 200) {
+									uni.showToast({
+										title: '订单已成功确认收货',
+										icon: 'success'
+									})
+									setTimeout(() => {
+										uni.redirectTo({
+											url: '/pages/user/jf/order'
+										})
+									}, 1500)
+								}
+							})
+						}
+					}
+				})
+			},
+			goBack() {
+				uni.navigateBack()
+			}
+		},
+		onLoad(options) {
+			this.orderId = options.id || ''
+			this.getOrderDetail()
+
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background-color: #F5F5F5;
+		min-height: 100vh;
+		padding-bottom: 120rpx;
+	}
+
+	.order-detail-container {
+		min-height: 100vh;
+		background-color: #F5F5F5;
+	}
+
+	.status-bar {
+		padding: 60rpx 30rpx 40rpx;
+		display: flex;
+		align-items: center;
+		position: relative;
+		overflow: hidden;
+
+		&::before {
+			content: '';
+			position: absolute;
+			top: -50%;
+			right: -20%;
+			width: 300rpx;
+			height: 300rpx;
+			border-radius: 50%;
+			background: rgba(255, 255, 255, 0.2);
+		}
+
+		.status-icon {
+			width: 80rpx;
+			height: 80rpx;
+			border-radius: 50%;
+			background-color: rgba(255, 255, 255, 0.2);
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			margin-right: 25rpx;
+			font-size: 40rpx;
+			color: #FFFFFF;
+		}
+
+		.status-info {
+			flex: 1;
+
+			.status-text {
+				display: block;
+				font-size: 34rpx;
+				font-weight: bold;
+				color: #FFFFFF;
+				margin-bottom: 8rpx;
+			}
+
+			.status-desc {
+				font-size: 24rpx;
+				color: rgba(255, 255, 255, 0.85);
+			}
+		}
+
+		&.status-pending {
+			background: linear-gradient(135deg, #FF9900 0%, #FFB84D 100%);
+		}
+
+		&.status-unpaid {
+			background: linear-gradient(135deg, #FF4444 0%, #FF7878 100%);
+		}
+
+		&.status-shipping {
+			background: linear-gradient(135deg, #0099FF 0%, #4DB8FF 100%);
+		}
+
+		&.status-completed {
+			background: linear-gradient(135deg, #52C41A 0%, #87E85A 100%);
+		}
+
+		&.status-canceled {
+			background: linear-gradient(135deg, #999999 0%, #BBBBBB 100%);
+		}
+	}
+
+	.order-card {
+		background-color: #FFFFFF;
+		margin: 20rpx;
+		border-radius: 15rpx;
+		overflow: hidden;
+		box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+	}
+
+	.card-header {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 25rpx 30rpx;
+		border-bottom: 1rpx solid #F0F0F0;
+
+		.card-title {
+			font-size: 30rpx;
+			font-weight: bold;
+			color: #333333;
+		}
+
+		.card-count {
+			font-size: 24rpx;
+			color: #999999;
+		}
+
+		.address-tag {
+			font-size: 20rpx;
+			color: #FFFFFF;
+			background-color: #FF4444;
+			padding: 4rpx 15rpx;
+			border-radius: 20rpx;
+		}
+	}
+
+	.order-info {
+		padding: 20rpx 30rpx;
+	}
+
+	.info-row {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 15rpx 0;
+
+		.info-label {
+			font-size: 26rpx;
+			color: #999999;
+		}
+
+		.info-value {
+			font-size: 26rpx;
+			color: #333333;
+		}
+	}
+
+	.address-info {
+		padding: 20rpx 30rpx;
+
+		.address-user {
+			display: flex;
+			align-items: center;
+			margin-bottom: 15rpx;
+
+			.address-name {
+				font-size: 30rpx;
+				font-weight: bold;
+				color: #333333;
+				margin-right: 20rpx;
+			}
+
+			.address-phone {
+				font-size: 28rpx;
+				color: #666666;
+			}
+		}
+
+		.address-detail {
+			font-size: 26rpx;
+			color: #666666;
+			line-height: 36rpx;
+		}
+	}
+
+	.address-empty {
+		padding: 40rpx 30rpx;
+		text-align: center;
+
+		text {
+			font-size: 26rpx;
+			color: #999999;
+		}
+	}
+
+	.product-list {
+		padding: 10rpx 30rpx;
+	}
+
+	.product-item {
+		display: flex;
+		padding: 20rpx 0;
+		border-bottom: 1rpx solid #F5F5F5;
+
+		&:last-child {
+			border-bottom: none;
+		}
+
+		.product-image {
+			width: 140rpx;
+			height: 140rpx;
+			border-radius: 10rpx;
+			background-color: #F5F5F5;
+		}
+
+		.product-info {
+			flex: 1;
+			margin-left: 20rpx;
+			display: flex;
+			flex-direction: column;
+			justify-content: space-between;
+
+			.product-name {
+				font-size: 28rpx;
+				color: #333333;
+				line-height: 36rpx;
+				display: -webkit-box;
+				-webkit-box-orient: vertical;
+				-webkit-line-clamp: 2;
+				overflow: hidden;
+			}
+
+			.product-spec {
+				font-size: 24rpx;
+				color: #999999;
+			}
+
+			.product-bottom {
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+
+				.product-price {
+					font-size: 28rpx;
+					font-weight: bold;
+					color: #FF4444;
+				}
+
+				.product-count {
+					font-size: 24rpx;
+					color: #999999;
+				}
+			}
+		}
+	}
+
+	.fee-list {
+		padding: 10rpx 30rpx 20rpx;
+	}
+
+	.fee-row {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 15rpx 0;
+
+		.fee-label {
+			font-size: 26rpx;
+			color: #666666;
+		}
+
+		.fee-value {
+			font-size: 26rpx;
+			color: #333333;
+
+			&.discount {
+				color: #52C41A;
+			}
+		}
+
+		&.total {
+			padding-top: 20rpx;
+			margin-top: 10rpx;
+			border-top: 1rpx dashed #EEEEEE;
+
+			.fee-label {
+				font-size: 28rpx;
+				font-weight: bold;
+				color: #333333;
+			}
+
+			.fee-value {
+				font-size: 32rpx;
+				font-weight: bold;
+				color: #FF4444;
+			}
+		}
+	}
+
+	.timeline {
+		padding: 20rpx 30rpx 20rpx 60rpx;
+		position: relative;
+	}
+
+	.timeline-item {
+		position: relative;
+		padding-bottom: 30rpx;
+
+		&:last-child {
+			padding-bottom: 0;
+
+			.timeline-line {
+				display: none;
+			}
+		}
+
+		.timeline-dot {
+			position: absolute;
+			left: -30rpx;
+			top: 8rpx;
+			width: 16rpx;
+			height: 16rpx;
+			border-radius: 50%;
+			background-color: #DDDDDD;
+			border: 3rpx solid #FFFFFF;
+			box-shadow: 0 0 0 2rpx #EEEEEE;
+		}
+
+		.timeline-content {
+			display: flex;
+			flex-direction: column;
+
+			.timeline-title {
+				font-size: 26rpx;
+				color: #999999;
+				margin-bottom: 5rpx;
+			}
+
+			.timeline-time {
+				font-size: 22rpx;
+				color: #CCCCCC;
+			}
+		}
+
+		.timeline-line {
+			position: absolute;
+			left: -24rpx;
+			top: 30rpx;
+			width: 2rpx;
+			height: calc(100% - 15rpx);
+			background-color: #EEEEEE;
+		}
+
+		&.active {
+			.timeline-dot {
+				background-color: #FF4444;
+				box-shadow: 0 0 0 2rpx rgba(255, 68, 68, 0.2);
+			}
+
+			.timeline-title {
+				color: #333333;
+				font-weight: 500;
+			}
+
+			.timeline-time {
+				color: #999999;
+			}
+
+			.timeline-line {
+				background-color: #FF4444;
+			}
+		}
+
+		&.done {
+			.timeline-dot {
+				background-color: #52C41A;
+				box-shadow: 0 0 0 2rpx rgba(82, 196, 26, 0.2);
+			}
+
+			.timeline-title {
+				color: #333333;
+			}
+
+			.timeline-time {
+				color: #999999;
+			}
+
+			.timeline-line {
+				background-color: #52C41A;
+			}
+		}
+	}
+
+	.bottom-bar {
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 20rpx 30rpx;
+		background-color: #FFFFFF;
+		border-top: 1rpx solid #EEEEEE;
+		box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.05);
+	}
+
+	.total-info {
+		display: flex;
+		align-items: baseline;
+
+		.total-label {
+			font-size: 26rpx;
+			color: #666666;
+		}
+
+		.total-price {
+			font-size: 36rpx;
+			font-weight: bold;
+			color: #FF4444;
+			margin-left: 5rpx;
+		}
+	}
+
+	.bottom-actions {
+		display: flex;
+		gap: 20rpx;
+	}
+
+	.action-btn {
+		padding: 20rpx 40rpx;
+		border-radius: 40rpx;
+		font-size: 28rpx;
+		font-weight: 500;
+
+		&.btn-outline {
+			border: 2rpx solid #DDDDDD;
+			color: #666666;
+
+			&:active {
+				background-color: #F5F5F5;
+			}
+		}
+
+		&.btn-primary {
+			background-color: #FF4444;
+			color: #FFFFFF;
+
+			&:active {
+				background-color: #E63939;
+			}
+		}
+	}
+</style>

+ 42 - 46
pages/user/jf/store.vue

@@ -1,14 +1,12 @@
 <template>
 <template>
 	<view class="content">
 	<view class="content">
 		<view class="goods-list">
 		<view class="goods-list">
-			<view class="goods-item" v-for="(item, index) in goodsList" :key="index">
+			<view class="goods-item" v-for="(item, index) in goodsList" :key="index" @click="addCart(item)">
 				<image :src="item.image" mode="aspectFill" class="goods-image"></image>
 				<image :src="item.image" mode="aspectFill" class="goods-image"></image>
-				<text class="goods-name">{{item.name}}</text>
+				<view class="goods-name clamp">{{item.store_name}}</view>
 				<view class="goods-info">
 				<view class="goods-info">
-					<text class="goods-points">{{item.points}} 积分</text>
-					<view class="add-cart" @click="addCart(item)">
-						<image src="../../../static/icon/ye.png" mode="widthFix" class="cart-icon"></image>
-					</view>
+					<text class="goods-points">{{item.price}} 积分</text>
+					<image src="../../../static/icon/cart.png" mode="widthFix" class="add-cart" ></image>
 				</view>
 				</view>
 			</view>
 			</view>
 		</view>
 		</view>
@@ -16,53 +14,50 @@
 </template>
 </template>
 
 
 <script>
 <script>
+	import { getProductList  } from '@/api/good.js'
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
-				goodsList: [
-					{
-						id: 1,
-						name: '发酵乳酸菌饮品',
-						spec: '500g*2瓶',
-						points: 200,
-						image: '../../../static/image/qy.png'
-					},
-					{
-						id: 2,
-						name: '发酵乳酸菌饮品',
-						spec: '500g*2瓶',
-						points: 200,
-						image: '../../../static/image/qy.png'
-					},
-					{
-						id: 3,
-						name: '发酵乳酸菌饮品',
-						spec: '500g*2瓶',
-						points: 200,
-						image: '../../../static/image/qy.png'
-					},
-					{
-						id: 4,
-						name: '发酵乳酸菌饮品',
-						spec: '500g*2瓶',
-						points: 200,
-						image: '../../../static/image/qy.png'
-					}
-				]
+				page: 1,
+				limit: 20,
+				list: [],
+				loaded: false,
+				status: 'more',
+				goodsList: []
 			};
 			};
 		},
 		},
 		methods: {
 		methods: {
 			// 返回
 			// 返回
-			navBack() {
-				uni.navigateBack();
+			getProductList() {
+				let that = this
+				if(that.status == 'noMore' || that.status == 'loading') return;
+				that.status = 'loading'
+				getProductList({
+					page: that.page,
+					pageSize: that.limit,
+				}).then(res => {
+					let list = res.data.list
+					that.goodsList = that.goodsList.concat(list)
+					if(that.limit == list.length) {
+						that.status = 'more'
+					}else {
+						that.status = 'noMore'
+					}
+					that.loaded = true
+				})
 			},
 			},
 			// 添加到购物车
 			// 添加到购物车
 			addCart(item) {
 			addCart(item) {
-				uni.showToast({
-					title: '已加入购物车',
-					icon: 'success'
-				});
+				uni.navigateTo({
+					url:'/pages/user/jf/detail?id=' + item.id
+				})
 			}
 			}
+		},
+		onLoad() {
+			this.getProductList()
+		},
+		onReachBottom() {
+			this.getProductList()
 		}
 		}
 	};
 	};
 </script>
 </script>
@@ -114,19 +109,20 @@
 		padding: 0 15rpx;
 		padding: 0 15rpx;
 		
 		
 		.goods-item {
 		.goods-item {
-			width: 48%;
+			width: 300rpx;
 			margin: 1%;
 			margin: 1%;
 			background-color: #FFFFFF;
 			background-color: #FFFFFF;
 			border-radius: 15rpx;
 			border-radius: 15rpx;
 			overflow: hidden;
 			overflow: hidden;
 			
 			
 			.goods-image {
 			.goods-image {
-				width: 100%;
-				height: 250rpx;
+				width: 300rpx;
+				height: 300rpx;
 			}
 			}
 			
 			
 			.goods-name {
 			.goods-name {
-				padding: 15rpx;
+				width: 270rpx;
+				padding: 15rpx ;
 				font-size: 26rpx;
 				font-size: 26rpx;
 				color: #333333;
 				color: #333333;
 				line-height: 36rpx;
 				line-height: 36rpx;

+ 200 - 0
pages/user/jf/success.vue

@@ -0,0 +1,200 @@
+<template>
+	<view class="success-container">
+		<view class="success-icon-wrap">
+			<view class="success-icon">
+				<text class="success-check">✓</text>
+			</view>
+		</view>
+		
+		<view class="success-title">兑换成功</view>
+		<view class="success-desc">您的积分兑换订单已提交成功</view>
+		
+		<view class="success-content">
+			<view class="order-card">
+				<view class="order-info">
+					<view class="order-item">
+						<text class="order-label">订单编号</text>
+						<text class="order-value">JF{{orderNo}}</text>
+					</view>
+					<view class="order-item">
+						<text class="order-label">兑换时间</text>
+						<text class="order-value">{{orderTime}}</text>
+					</view>
+					<view class="order-item">
+						<text class="order-label">消耗积分</text>
+						<text class="order-value points">-{{points}} 积分</text>
+					</view>
+				</view>
+			</view>
+			
+			<view class="action-buttons">
+				<view class="btn btn-outline" @click="goBack">
+					<text>返回首页</text>
+				</view>
+				<view class="btn btn-primary" @click="viewOrder">
+					<text>查看订单</text>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				orderNo: '',
+				orderTime: '',
+				points: 0
+			};
+		},
+		onLoad(options) {
+			this.orderNo = options.order_id ;
+			this.orderTime = new Date().toLocaleString('zh-CN');
+			this.points = options.points || 0;
+		},
+		methods: {
+			goBack() {
+				uni.switchTab({
+					url:'/pages/index/index'
+				})
+			},
+			viewOrder() {
+				uni.navigateTo({
+					url:'/pages/user/jf/order'
+				})
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+		background-color: #F5F5F5;
+	}
+
+	.success-container {
+		min-height: 100vh;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		padding: 100rpx 30rpx;
+		background: linear-gradient(180deg, #FF6B6B 0%, #FF8E8E 50%, #F5F5F5 50%);
+	}
+
+	.success-icon-wrap {
+		margin-bottom: 30rpx;
+	}
+
+	.success-icon {
+		width: 160rpx;
+		height: 160rpx;
+		background-color: #FFFFFF;
+		border-radius: 50%;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		box-shadow: 0 8rpx 30rpx rgba(255, 107, 107, 0.3);
+	}
+
+	.success-check {
+		font-size: 80rpx;
+		color: #52C41A;
+		font-weight: bold;
+	}
+
+	.success-title {
+		font-size: 40rpx;
+		font-weight: bold;
+		color: #FFFFFF;
+		margin-bottom: 15rpx;
+		text-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
+	}
+
+	.success-desc {
+		font-size: 28rpx;
+		color: rgba(255, 255, 255, 0.85);
+		margin-bottom: 60rpx;
+	}
+
+	.success-content {
+		width: 100%;
+		background-color: #FFFFFF;
+		border-radius: 20rpx;
+		padding: 40rpx;
+		box-shadow: 0 10rpx 40rpx rgba(0, 0, 0, 0.1);
+	}
+
+	.order-card {
+		margin-bottom: 40rpx;
+	}
+
+	.order-info {
+		background-color: #F9F9F9;
+		border-radius: 15rpx;
+		padding: 30rpx;
+	}
+
+	.order-item {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding: 15rpx 0;
+		
+		&:not(:last-child) {
+			border-bottom: 1rpx solid #EEEEEE;
+		}
+	}
+
+	.order-label {
+		font-size: 26rpx;
+		color: #999999;
+	}
+
+	.order-value {
+		font-size: 26rpx;
+		color: #333333;
+		font-weight: 500;
+		
+		&.points {
+			color: #FF4444;
+		}
+	}
+
+	.action-buttons {
+		display: flex;
+		gap: 20rpx;
+	}
+
+	.btn {
+		flex: 1;
+		height: 88rpx;
+		border-radius: 44rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		font-size: 30rpx;
+		font-weight: 500;
+		
+		&.btn-outline {
+			border: 2rpx solid #DDDDDD;
+			color: #666666;
+			
+			&:active {
+				background-color: #F5F5F5;
+			}
+		}
+		
+		&.btn-primary {
+			background: linear-gradient(135deg, #FF6B6B 0%, #FF4444 100%);
+			color: #FFFFFF;
+			box-shadow: 0 4rpx 20rpx rgba(255, 68, 68, 0.4);
+			
+			&:active {
+				opacity: 0.9;
+				transform: scale(0.98);
+			}
+		}
+	}
+</style>

+ 1 - 1
pages/user/signing/mySig.vue

@@ -218,7 +218,7 @@
 				<view class="pj-tit ">
 				<view class="pj-tit ">
 					评价内容
 					评价内容
 				</view>
 				</view>
-				<textarea name="" id="" cols="30" rows="10" placeholder="请输入您的评价" v-model="pjs" maxlength="200"
+				<textarea name="" id="" cols="30" rows="10" placeholder="请输入您的评价(500字以内)" v-model="pjs" maxlength="500"
 					class="pj-wrap"></textarea>
 					class="pj-wrap"></textarea>
 				<view class="pj-tit ">
 				<view class="pj-tit ">
 					评价图片
 					评价图片

+ 10 - 1
pages/user/signing/plhis.vue

@@ -5,7 +5,12 @@
 				<image :src="item.uid_avatar?item.uid_avatar: 'https://api.myjie.cn/static/img/logo.png'" mode=""
 				<image :src="item.uid_avatar?item.uid_avatar: 'https://api.myjie.cn/static/img/logo.png'" mode=""
 					class="u-avt"></image>
 					class="u-avt"></image>
 				<view class="u-nickname clamp">
 				<view class="u-nickname clamp">
-					{{item.uid_nickname ? item.uid_nickname: '微信用户'}}
+					<view class="">
+						{{item.uid_nickname ? item.uid_nickname: '微信用户'}}
+					</view>
+					<view class="time">
+						{{item.create_time}}
+					</view>
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="pl">
 			<view class="pl">
@@ -95,6 +100,10 @@
 			font-size: 30rpx;
 			font-size: 30rpx;
 			font-weight: bold;
 			font-weight: bold;
 			margin-left: 15rpx;
 			margin-left: 15rpx;
+			.time {
+				color: #999;
+				font-size: 24rpx;
+			}
 		}
 		}
 	}
 	}
 
 

+ 54 - 1
pages/userhome/user.vue

@@ -86,6 +86,39 @@
 								<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
 								<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
 							</view>
 							</view>
 						</view> -->
 						</view> -->
+						<view v-if="is_open == 1" class="flex listItem" @click="navTo('/pages/user/forum/index')"
+							>
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/forum.png" mode="widthFix"></image>
+								<text class="title">论坛</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
+							</view>
+						</view>
+						<view class="flex listItem" @click="navTo('/pages/user/jf/bill')"
+							>
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myjf.png" mode="widthFix"></image>
+								<text class="title">我的积分</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
+							</view>
+						</view>
+						<view class="flex listItem" @click="navTo('/pages/user/model/phb')"
+							>
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/guanjun.png" mode="widthFix"></image>
+								<text class="title">人气排行</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
+							</view>
+						</view>
 						<view class="flex listItem" @click="navTo('/pages/user/signing/mySig')"
 						<view class="flex listItem" @click="navTo('/pages/user/signing/mySig')"
 							v-if="user.info_audit_status==-2">
 							v-if="user.info_audit_status==-2">
 							<view class="flex titleBox">
 							<view class="flex titleBox">
@@ -168,6 +201,16 @@
 								<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
 								<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
 							</view>
 							</view>
 						</view>
 						</view>
+						<view class="flex listItem" @click="navTo('/pages/user/jf/order')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myorder.png" mode="widthFix"></image>
+								<text class="title">我的订单</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
+							</view>
+						</view>
 						<!-- #ifdef MP -->
 						<!-- #ifdef MP -->
 						<button hover-class="none" class="flex listItem" @click="openEnterpriseWechat">
 						<button hover-class="none" class="flex listItem" @click="openEnterpriseWechat">
 							<view class="flex titleBox">
 							<view class="flex titleBox">
@@ -269,6 +312,7 @@
 	export default {
 	export default {
 		data() {
 		data() {
 			return {
 			return {
+				is_open: 0,
 				user: {
 				user: {
 					avatar: '', //头像
 					avatar: '', //头像
 					nickname: '', //昵称
 					nickname: '', //昵称
@@ -293,10 +337,10 @@
 		// 创建时获取分享信息
 		// 创建时获取分享信息
 		onLoad() {
 		onLoad() {
 			console.log(11223344);
 			console.log(11223344);
+			this.getShow()
 			this.getGG();
 			this.getGG();
 		},
 		},
 		onShow() {
 		onShow() {
-			console.log(112233);
 			this.getUser();
 			this.getUser();
 			console.log(this.showGG, 'this.showGG');
 			console.log(this.showGG, 'this.showGG');
 			// 判断是否要显示广告弹窗
 			// 判断是否要显示广告弹窗
@@ -309,6 +353,15 @@
 		},
 		},
 		methods: {
 		methods: {
 			...mapMutations('user', ['setUserInfo']),
 			...mapMutations('user', ['setUserInfo']),
+			getShow() {
+				console.log('zhel');
+				share({}).then(({
+					data
+				}) => {
+					
+					this.is_open = data.is_show
+				});
+			},
 			// #ifdef MP-WEIXIN
 			// #ifdef MP-WEIXIN
 			openEnterpriseWechat() {
 			openEnterpriseWechat() {
 				uni.showLoading({
 				uni.showLoading({

BIN
static/icon/cart.png


BIN
static/icon/forum.png


BIN
static/icon/greendw.png


BIN
static/icon/guanjun.png


BIN
static/icon/myjdw.png


BIN
static/icon/myjf.png


BIN
static/icon/myorder.png


BIN
static/icon/ok.png


BIN
static/icon/wddw.png


+ 5 - 1
store/model/user.js

@@ -11,10 +11,14 @@ let state = {
 	address: {
 	address: {
 		latitude: '',
 		latitude: '',
 		longitude: '',
 		longitude: '',
-	}
+	},
+	isOpen:false
 }
 }
 
 
 let mutations = {
 let mutations = {
+	showOpen(state,provider) {
+		state.isOpen = provider;
+	},
 	// 登录
 	// 登录
 	login(state) {
 	login(state) {
 		state.hasLogin = true;
 		state.hasLogin = true;