Browse Source

feat:订单页面提交

xyh8905170 2 năm trước cách đây
mục cha
commit
c3616d8a18

+ 25 - 25
App.vue

@@ -5,31 +5,31 @@
 <script>
 	export default {
 		onLaunch: function() {
-            let that = this;
-            wx.login({
-                success(re) {
-                    that.$api.wxAuthLogin({code:re.code}).then(res=>{
-                        uni.setStorageSync('userInfo',res.data.data.userInfo)
-                        uni.setStorageSync('accessToken',res.data.data.access_token)
-                        uni.setStorageSync('phoneIsBind',res.data.data.phoneIsBind)
-
-                        if (res.data.data.phoneIsBind){
-                            // uni.switchTab({
-                            //     url: '/pages/index/index',
-                            // })
-                            uni.navigateTo({
-                                url: '/loginPages/bindAccount/index',
-                            })
-                        }else {
-                            uni.navigateTo({
-                                url: '/loginPages/bindAccount/index',
-                            })
-                        }
-
-                    })
-
-                },
-            })
+            // let that = this;
+            // wx.login({
+            //     success(re) {
+            //         that.$api.wxAuthLogin({code:re.code}).then(res=>{
+            //             uni.setStorageSync('userInfo',res.data.data.userInfo)
+            //             uni.setStorageSync('accessToken',res.data.data.access_token)
+            //             uni.setStorageSync('phoneIsBind',res.data.data.phoneIsBind)
+            //
+            //             if (res.data.data.phoneIsBind){
+            //                 // uni.switchTab({
+            //                 //     url: '/pages/index/index',
+            //                 // })
+            //                 uni.navigateTo({
+            //                     url: '/loginPages/bindAccount/index',
+            //                 })
+            //             }else {
+            //                 uni.navigateTo({
+            //                     url: '/loginPages/bindAccount/index',
+            //                 })
+            //             }
+            //
+            //         })
+            //
+            //     },
+            // })
 			console.log('App Launch')
 		},
 		onShow: function() {

+ 0 - 16
api/coupon/coupon.js

@@ -1,16 +0,0 @@
-const http = uni.$u.http
-
-// get请求 查询可领取的优惠劵列表
-export const getUserDiscountsList = (params, config = {}) => http.get('/business/wechat/getUserDiscountsList', params, config)
-
-// get请求 我的优惠卷列表(0未使用, 1已使用, 2已过期 null查询全部)
-export const getMyCouponList = (params, config = {}) => http.get('/member/wechat/getCoupon', params, config)
-
-// get请求 查询可使用的优惠券
-export const getCanUseCouponList = (params, config = {}) => http.post('/member/wechat/getMemberCoupon', params, config)
-
-// post请求 领取优惠券
-export const claimCoupon = (params, config = {}) => http.post('/member/wechat/claimCoupon', params, config)
-
-
-

+ 0 - 21
api/goods/goods.js

@@ -1,21 +0,0 @@
-const http = uni.$u.http
-
-// get请求 获取门店所有服务列表
-export const storeAllServiceList = (params, config = {}) => http.get('/business/wechat/sp/all/'+params.data.storeId, params, config)
-
-// get请求 获取门店列表  
-export const storeList = (params, config = {}) => http.get('/store/uniapp/store-list/distance', params, config)
-
-// get请求 获取门店工作人员列表 关联岗位、工作时段、服务项目
-export const workPersonList = (params, config = {}) => http.get('/store/uniapp/work-person-ist/'+params.data.storeId, params, config)
-
-// get请求 根据服务日期及服务时段查询排班人员
-export const serviceWorkPersonList = (params, config = {}) => http.get('/business/wechat/scheduling/crewPageList', params, config)
-
-// get请求 根据门店查询排班日期
-export const selectDate = (params, config = {}) => http.post('/business/wechat/scheduling/selectDate', params, config)
-
-// get请求 根据门店、排班日期查询可用时段
-export const selectPeriodByDate = (params, config = {}) => http.post('/business/wechat/scheduling/selectPeriodByDate', params, config)
-
- 

+ 0 - 21
api/index/index.js

@@ -1,21 +0,0 @@
-const http = uni.$u.http
-
-// post请求,用户绑定门店
-export const userBindStore = (params, config = {}) => http.post('/member/wechat/bindStore', params, config)
-
-// get请求 获取门店列表
-// export const storeList = (params, config = {}) => http.get('/store/uniapp/store-list', params, config)
-
-// get请求 获取公告列表
-export const noticeList = (params, config = {}) => http.get('/system/openapi/notice/list', params, config)
-
-// get请求 获取公告详情
-export const getNoticeDetail = (params, config = {}) => http.get('/system/openapi/notice/'+params.data.noticeId, params, config)
-
-// get请求 获取banner图列表
-export const getSlideshowList = (params, config = {}) => http.get('/system/openapi/getSlideshowList', params, config)
-
-
-
-
-

+ 0 - 8
api/integral/integral.js

@@ -1,8 +0,0 @@
-const http = uni.$u.http
-
-// post请求,获取积分列表信息
-export const getIntegralRecordList = (params, config = {}) => http.post('/member/wechat/getIntegralRecordVo', params, config)
-
-
-
-

+ 0 - 36
api/login/login.js

@@ -1,36 +0,0 @@
-const http = uni.$u.http
-
-
-// post请求,保存用户信息
-export const saveWechatUser = (params, config = {}) => http.post('/auth/wechat/saveWeChatUserInfo', params, config)
-
-// post请求,获取微信电话号码
-export const getWechatUserPhoneNumber = (params, config = {}) => http.post('/auth/wechat/getWechatUserPhoneNumber', params, config)
-
-// post请求,验证手机号码是否被注册
-export const phoneIsExist = (params, config = {}) => http.post('/member/wechat/phoneIsExist', params, config)
-
-// post请求,新微新手机绑定
-export const wechatRegister = (params, config = {}) => http.post('/auth/xcxRegister', params, config)
-
-// get请求,获取手机验证码
-export const getSmsCode = (params, config = {}) => http.get('/resource/sms/code', params, config)
-
-// post请求,验证手机验证码
-export const validateSmsCode = (params, config = {}) => http.post('/member/wechat/validateSmsCode', params, config)
-
-// post请求,找回账号密码登录
-export const wechatRetrieveAccountPwdLogin = (params, config = {}) => http.post('/auth/xcxRetrieveMemberByPwd', params, config)
-
-// post请求,实名认证登录(新微信老手机)
-export const realNameAuthLogin = (params, config = {}) => http.post('/auth/xcxRetrieveMember', params, config)
-
-// post请求,验证身份证是滞存在
-export const idCardIsExist = (params, config = {}) => http.post('/member/wechat/idCardIsExist', params, config)
-
-// post请求验证手机找回密码
-export const passwordByPhone = (params, config = {}) => http.post('/member/wechat/passwordByPhone', params, config)
-
-
-
-

+ 0 - 32
api/me/me.js

@@ -1,32 +0,0 @@
-const http = uni.$u.http
-
-// post请求,用户实名认证
-export const userRealNameAuth = (params, config = {}) => http.post('/member/wechat/idCardAuthentication', params, config)
-
-// post请求,用户信息保存
-export const saveUserInfo = (params, config = {}) => http.post('/member/wechat/saveUserInfo', params, config)
-
-// post请求,修改用户账号密码
-export const updateUserAccountPassword = (params, config = {}) => http.post('/member/wechat/setPassword', params, config)
-
-// post请求,修改用户交易密码
-export const updateUserTransactionPassword = (params, config = {}) => http.post('/member/wechat/setTransactionPassword', params, config)
-
-// post请求,绑定微信
-export const bindWechat = (params, config = {}) => http.post('/member/wechat/setOpenId', params, config)
-
-// get请求,获取服务条款协议
-export const getTermOfServiceByType = (params, config = {}) => http.get('/system/openapi/getAboutByType', params, config)
-
-// get请求,获取公共文件路径
-export const getCommonFile = (params, config = {}) => http.get('/resource/oss/listByIds/'+params.data.ossId, params, config)
-
-// post请求,重新设置手机号
-export const setPhone = (params, config = {}) => http.post('/member/wechat/setPhone', params, config)
-
-// get请求,获取用户信息
-export const getUserInfo = (params, config = {}) => http.get('/member/wechat/getUserInfo', params, config)
-
-
-
-

+ 0 - 26
api/object/service-object.js

@@ -1,26 +0,0 @@
-const http = uni.$u.http
-
-// post请求,识别人脸  
-export const verifyFace = (params, config = {}) => http.post('/member/wechat/verifyFace', params, config)
-
-// post请 查询服务对象列表
-export const listServiceObject = (params, config = {}) => http.post('/member/wechat/listServiceObject', params, config)
-
-// post请 获取服务对象协议
-export const getServiceDealFile = (params, config = {}) => http.post('/member/wechat/getServiceDealFile', params, config)
-
-// post请求 服务对象签名
-export const serviceObjectSignPdf = (params, config = {}) => http.post('/member/wechat/signPdf', params, config)
-
-// post请求 保存服务对象
-export const saveServiceObject = (params, config = {}) => http.post('/member/wechat/saveServiceObject', params, config)
-
-// post请求 绑定服务对象
-export const bindServiceObject = (params, config = {}) => http.post('/member/wechat/bindServiceObject', params, config)
-
-// post请求 修改服务对象
-export const updateServiceObject = (params, config = {}) => http.post('/member/wechat/updateServiceObject', params, config)
-
-
-
-

+ 0 - 60
api/order/order.js

@@ -1,60 +0,0 @@
-const http = uni.$u.http
-
-// get请求,获取订单列表
-export const getOrderList = (params, config = {}) => http.get('/business/wechat/order/list', params, config)
-
-// get请求,获取订单详情
-export const getOrderDetailByOrderId = (params, config = {}) => http.get('/business/wechat/order/detail', params, config)
-
-// get请求,保存订单评价
-export const saveOrderComment = (params, config = {}) => http.post('/business/wechat/order/comment', params, config)
-
-// post请求,再来一单
-export const comeOrder = (params, config = {}) => http.post('/business/wechat/order/copy/'+params.data.orderId, params, config)
-
-// post请求  删除订单
-export const deleteOrder = (params, config = {}) => http.delete('/business/wechat/order/'+params.data.orderId, params, config)
-
-// put请求  取消订单
-export const cancelOrder = (params, config = {}) => http.put('/business/wechat/order/cancel/'+params.data.orderId, params, config)
-
-// post请求,通用下单接口
-export const commonGeneralOrder  = (params, config = {}) => http.post('/business/wechat/order/common', params, config)
-
-// post请求,查询充值订单列表
-export const orderRechargeList  = (params, config = {}) => http.get('/business/wechat/orderRecharge/list', params, config)
-
-// post请求,充值订单退款
-export const orderRechargeRefund  = (params, config = {}) => http.post('/business/wechat/orderRecharge/refund', params, config)
-
-// post请求,获取用户余额
-export const getUserBalance  = (params, config = {}) => http.post('/business/wechat/orderRecharge/getBalance', params, config)
-
-// get请求,订单签到
-export const orderSign  = (params, config = {}) => http.get('/business/wechat/scheduling/orderSign', params, config)
-
-// get请求,查看订单排号情况
-export const getOrderSign  = (params, config = {}) => http.get('/business/wechat/scheduling/getOrderSign', params, config)
-
-// post请求,微信支付(根据订单ID)
-export const wechatPay  = (params, config,requestConfig = {}) => http.post('/business/wxPay/jsapiPay', params, config,requestConfig)
-
-// post请求,余额支付(根据订单ID)
-export const balancePay  = (params, config = {}) => http.post('/business/balancePay/pay', params, config)
-
-// get请求,查询交易记录列表
-export const transactionRecordsList  = (params, config = {}) => http.get('/business/wechat/transactionFlow/list', params, config)
-
-// get请求,查询充值优惠列表
-export const getRechargeList  = (params, config = {}) => http.get('/business/wechat/getRechargeList', params, config)
-
-// get请求,查询交易流水统计
-export const transactionFlowstatistic  = (params, config = {}) => http.get('/business/wechat/transactionFlow/statistic', params, config)
-
-// get请求 获取预约价格
-export const getAppointmentPrice  = (params, config = {}) => http.get('/business/wechat/sp/subPrice', params, config)
-
-
-
-
-

+ 0 - 19
api/system/system.js

@@ -1,19 +0,0 @@
-const http = uni.$u.http
-
-
-// get请求 通过电话及名称获取老系统会员信息
-export const getOldMember = (params, config = {}) => http.get('/member/wechat/getOldMember', params, config)
-
-// get请求 通过会员编号获取老系统充值记录
-export const getOrderRechargeOldList = (params, config = {}) => http.get('/member/wechat/getOrderRechargeOldList', params, config)
-
-// get请求,通过会员编号获取老系统消费记录
-export const getOrderConsumeLogOld = (params, config = {}) => http.get('/member/wechat/getOrderConsumeLogOld', params, config)
-
-// post请求 通过会员编号提交迁移申请,默认迁移到当前迁移账户上
-export const submitOldData = (params, config = {}) => http.post('/member/wechat/submitOldData', params, config)
-
-
-
-
-

+ 592 - 65
common/js/api.js

@@ -1,77 +1,604 @@
 // 引用网络请求中间件
 import request from '../js/request.js';
 
+export default {
 
+	// get请求 通过电话及名称获取老系统会员信息
+	getOldMember(data) {
+		return request({
+			url: '/member/wechat/getOldMember',
+			method: 'GET',
+			data: data
+		})
+	},
 
+	// get请求 通过会员编号获取老系统充值记录
+	getOrderRechargeOldList(data) {
+		return request({
+			url: '/member/wechat/getOrderRechargeOldList',
+			method: 'GET',
+			data: data
+		})
+	},
 
-export default {
+	// get请求,通过会员编号获取老系统消费记录
+	getOrderConsumeLogOld(data) {
+		return request({
+			url: '/member/wechat/getOrderConsumeLogOld',
+			method: 'GET',
+			data: data
+		})
+	},
 
-    /**
-     * 微信静默登录
-     */
-    wxAuthLogin(data){
-        return request({
-            url: '/auth/xcxLogin',
-            method: 'POST',
-            data: data
-        })
-    },
-    /**
-     * 查询电话是否存在
-     */
-    phoneIsExist(data){
-        return request({
-            url: '/member/wechat/phoneIsExist',
-            method: 'POST',
-            data: data
-        })
-    },
-
-     payTheBill(data) {
-        return request({
-            url: '/recruit/recruitmsg/payTheBill',
-            method: 'POST',
-            data: data
-        })
-    },
-
-    /**
-     *    福利补贴
-     */
-    welfareMoney(data) {
-        return request({
-            url: '/recruit/recruitmsg/welfareMoney',
-            method: 'POST',
-            data: data
-        })
-    },
-
-    /**
-     *  get请求 通过电话及名称获取老系统会员信息
-      */
-    getOldMember (data){
-        return request({
-            url:'/member/wechat/getOldMember',
-            method:'GET',
-            params:data
-        })
-    } ,
-
-    /**
-     * get请求 通过会员编号获取老系统充值记录
-     * @param data
-     * @returns {Promise<unknown>}
-     */
-    getOrderRechargeOldList(data){
-        return request({
-            url:'/member/wechat/getOrderRechargeOldList',
-            method:'GET',
-            params:data
-        })
-    },
+	// post请求 通过会员编号提交迁移申请,默认迁移到当前迁移账户上
+	submitOldData(data) {
+		return request({
+			url: '/member/wechat/submitOldData',
+			method: 'POST',
+			data: data
+		})
+	},
+	// get请求,获取订单列表
+	getOrderList(data) {
+		return request({
+			url: '/business/wechat/order/list',
+			method: 'GET',
+			data: data
+		})
+	},
+	// get请求,获取订单详情
+	getOrderDetailByOrderId(data) {
+		return request({
+			url: '/business/wechat/order/detail',
+			method: 'GET',
+			data: data
+		})
+	},
+	// get请求,保存订单评价
+	saveOrderComment(data) {
+		return request({
+			url: '/business/wechat/order/comment' + data.orderId,
+			method: 'GET',
+			data: data
+		})
+	},
+	// post请求,再来一单
+	comeOrder(data) {
+		return request({
+			url: '/business/wechat/order/copy/' + data.orderId,
+			method: 'POST',
+			data: data
+		})
+	},
 
+	// post请求  删除订单
+	deleteOrder(data) {
+		return request({
+			url: '/business/wechat/order/' + data.orderId,
+			method: 'POST',
+			data: data
+		})
+	},
+	// put请求  取消订单
+	cancelOrder(data) {
+		return request({
+			url: '/business/wechat/order/cancel/' + data.orderId,
+			method: 'PUT',
+			data: data
+		})
+	},
 
-}
+	// post请求,通用下单接口
+	commonGeneralOrder(data) {
+		return request({
+			url: '/business/wechat/order/common',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// post请求,查询充值订单列表
+	orderRechargeList(data) {
+		return request({
+			url: '/business/wechat/orderRecharge/list',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// post请求,充值订单退款
+	orderRechargeRefund(data) {
+		return request({
+			url: '/business/wechat/orderRecharge/refund',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// post请求,获取用户余额
+	getUserBalance(data) {
+		return request({
+			url: '/business/wechat/orderRecharge/getBalance',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// get请求,订单签到
+	orderSign(data) {
+		return request({
+			url: '/business/wechat/scheduling/orderSign',
+			method: 'GET',
+			data: data
+		})
+	},
+	// get请求,查看订单排号情况
+	getOrderSign(data) {
+		return request({
+			url: '/business/wechat/scheduling/getOrderSign',
+			method: 'GET',
+			data: data
+		})
+	},
+
+	// post请求,微信支付(根据订单ID)
+	wechatPay(data) {
+		return request({
+			url: '/business/wxPay/jsapiPay',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// post请求,余额支付(根据订单ID)
+	balancePay(data) {
+		return request({
+			url: '/business/balancePay/pay',
+			method: 'POST',
+			data: data
+		})
+	},
+	// get请求,查询交易记录列表
+	transactionRecordsList(data) {
+		return request({
+			url: '/business/wechat/transactionFlow/list',
+			method: 'GET',
+			data: data
+		})
+	},
+	// get请求,查询充值优惠列表
+	getRechargeList(data) {
+		return request({
+			url: '/business/wechat/getRechargeList',
+			method: 'GET',
+			data: data
+		})
+	},
+
+	// get请求,查询交易流水统计
+	transactionFlowstatistic(data) {
+		return request({
+			url: '/business/wechat/transactionFlow/statistic',
+			method: 'GET',
+			data: data
+		})
+	},
+
+	// get请求 获取预约价格
+	getAppointmentPrice(data) {
+		return request({
+			url: '/business/wechat/sp/subPrice',
+			method: 'GET',
+			data: data
+		})
+	},
+	// post请求,识别人脸
+	verifyFace(data) {
+		return request({
+			url: '/member/wechat/verifyFace',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// post请 查询服务对象列表
+	listServiceObject(data) {
+		return request({
+			url: '/member/wechat/listServiceObject',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// post请 获取服务对象协议
+	getServiceDealFile(data) {
+		return request({
+			url: '/member/wechat/getServiceDealFile',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// post请求 服务对象签名
+	serviceObjectSignPdf(data) {
+		return request({
+			url: '/member/wechat/signPdf',
+			method: 'POST',
+			data: data
+		})
+	},
+	// post请求 保存服务对象
+	saveServiceObject(data) {
+		return request({
+			url: '/member/wechat/saveServiceObject',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// post请求 绑定服务对象
+	bindServiceObject(data) {
+		return request({
+			url: '/member/wechat/bindServiceObject',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// post请求 修改服务对象
+	updateServiceObject(data) {
+		return request({
+			url: '/member/wechat/updateServiceObject',
+			method: 'POST',
+			data: data
+		})
+	},
+	// post请求,用户实名认证
+	userRealNameAuth(data) {
+		return request({
+			url: '/member/wechat/idCardAuthentication',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// post请求,用户信息保存
+	saveUserInfo(data) {
+		return request({
+			url: '/member/wechat/saveUserInfo',
+			method: 'POST',
+			data: data
+		})
+	},
+	// post请求,修改用户账号密码
+	updateUserAccountPassword(data) {
+		return request({
+			url: '/member/wechat/setPassword',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// post请求,修改用户交易密码
+	updateUserTransactionPassword(data) {
+		return request({
+			url: '/member/wechat/setTransactionPassword',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// post请求,绑定微信
+	bindWechat(data) {
+		return request({
+			url: '/member/wechat/setOpenId',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// get请求,获取服务条款协议
+	getTermOfServiceByType(data) {
+		return request({
+			url: '/system/openapi/getAboutByType',
+			method: 'GET',
+			data: data
+		})
+	},
+
+	// get请求,获取公共文件路径
+	getCommonFile(data) {
+		return request({
+			url: '/resource/oss/listByIds/' + data.ossId,
+			method: 'GET',
+			data: data
+		})
+	},
+
+	// post请求,重新设置手机号
+	setPhone(data) {
+		return request({
+			url: '/member/wechat/setPhone',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// get请求,获取用户信息
+	getUserInfo(data) {
+		return request({
+			url: '/member/wechat/getUserInfo',
+			method: 'GET',
+			data: data
+		})
+	},
+	// post请求,保存用户信息
+	saveWechatUser(data) {
+		return request({
+			url: '/auth/wechat/saveWeChatUserInfo',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// post请求,获取微信电话号码
+
+	getWechatUserPhoneNumber(data) {
+		return request({
+			url: '/auth/wechat/getWechatUserPhoneNumber',
+			method: 'POST',
+			data: data
+		})
+	},
+	// post请求,验证手机号码是否被注册
+	phoneIsExist(data) {
+		return request({
+			url: '/member/wechat/phoneIsExist',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// post请求,新微新手机绑定
+	wechatRegister(data) {
+		return request({
+			url: '/auth/xcxRegister',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// get请求,获取手机验证码
+	getSmsCode(data) {
+		return request({
+			url: '/resource/sms/code',
+			method: 'GET',
+			data: data
+		})
+	},
+
+	// post请求,验证手机验证码
+	validateSmsCode(data) {
+		return request({
+			url: '/member/wechat/validateSmsCode',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// post请求,找回账号密码登录
+	wechatRetrieveAccountPwdLogin(data) {
+		return request({
+			url: '/auth/xcxRetrieveMemberByPwd',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// post请求,实名认证登录(新微信老手机)
+	realNameAuthLogin(data) {
+		return request({
+			url: '/auth/xcxRetrieveMember',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// post请求,验证身份证是滞存在
+	idCardIsExist(data) {
+		return request({
+			url: '/member/wechat/idCardIsExist',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// post请求验证手机找回密码
+	passwordByPhone(data) {
+		return request({
+			url: '/member/wechat/passwordByPhone',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// post请求,获取积分列表信息
 
+	getIntegralRecordList(data) {
+		return request({
+			url: '/member/wechat/getIntegralRecordVo',
+			method: 'POST',
+			data: data
+		})
+	},
+	// post请求,用户绑定门店
+	userBindStore(data) {
+		return request({
+			url: '/member/wechat/bindStore',
+			method: 'POST',
+			data: data
+		})
+	},
 
+	// get请求 获取门店列表
+	// storeList(data) {
+	// 	return request({
+	// 		url: '/store/uniapp/store-list',
+	// 		method: 'GET',
+	// 		data: data
+	// 	})
+	// },
 
+	// get请求 获取公告列表
+	noticeList(data) {
+		return request({
+			url: '/system/openapi/notice/list',
+			method: 'GET',
+			data: data
+		})
+	},
+
+	// get请求 获取公告详情
+
+	getNoticeDetail(data) {
+		return request({
+			url: '/system/openapi/notice/' + data.noticeId,
+			method: 'GET',
+			data: data
+		})
+	},
+
+	// get请求 获取banner图列表
+
+	getSlideshowList(data) {
+		return request({
+			url: '/system/openapi/getSlideshowList',
+			method: 'GET',
+			data: data
+		})
+	},
+	// get请求 获取门店所有服务列表
+
+	storeAllServiceList(data) {
+		return request({
+			url: '/business/wechat/sp/all/' + data.storeId,
+			method: 'GET',
+			data: data
+		})
+	},
+
+	// get请求 获取门店列表
+
+	storeList(data) {
+		return request({
+			url: '/store/uniapp/store-list/distance',
+			method: 'GET',
+			data: data
+		})
+	},
+
+	// get请求 获取门店工作人员列表 关联岗位、工作时段、服务项目
+
+
+	workPersonList(data) {
+		return request({
+			url: '/store/uniapp/work-person-ist/' + data.storeId,
+			method: 'GET',
+			data: data
+		})
+	},
+
+	// get请求 根据服务日期及服务时段查询排班人员
+	serviceWorkPersonList(data) {
+		return request({
+			url: '/business/wechat/scheduling/crewPageList',
+			method: 'GET',
+			data: data
+		})
+	},
+
+	// get请求 根据门店查询排班日期
+
+	selectDate(data) {
+		return request({
+			url: '/business/wechat/scheduling/selectDate',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// get请求 根据门店、排班日期查询可用时段
+	selectPeriodByDate(data) {
+		return request({
+			url: '/business/wechat/scheduling/selectPeriodByDate',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// get请求 查询可领取的优惠劵列表
+	getUserDiscountsList(data) {
+		return request({
+			url: '/business/wechat/getUserDiscountsList',
+			method: 'GET',
+			data: data
+		})
+	},
+
+	// get请求 我的优惠卷列表(0未使用, 1已使用, 2已过期 null查询全部)
+	getMyCouponList(data) {
+		return request({
+			url: '/member/wechat/getCoupon',
+			method: 'GET',
+			data: data
+		})
+	},
+
+	// get请求 查询可使用的优惠券
+	getCanUseCouponList(data) {
+		return request({
+			url: '/member/wechat/getMemberCouponn',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	// post请求 领取优惠券
+	claimCoupon(data) {
+		return request({
+			url: '/member/wechat/claimCoupon',
+			method: 'POST',
+			data: data
+		})
+	},
+
+	getImgUrlByOssId(data) {
+		return request({
+			url: '/resource/oss/listByIds/' + data.ossId,
+			method: 'GET'
+		})
+
+	},
+
+	/**
+	 * 微信静默登录
+	 */
+	wxAuthLogin(data) {
+		return request({
+			url: '/auth/xcxLogin',
+			method: 'POST',
+			data: data
+		})
+	},
+
+
+
+
+
+
+
+
+
+
+
+}

+ 3 - 6
common/js/request.js

@@ -3,14 +3,11 @@ import env from '../js/env.js';
 function service(options = {}) {
 	options.url = `${env.baseUrl}${options.url}`;
 	// 判断本地是否存在token,如果存在则带上请求头
-	let access_token = uni.getStorageSync('access_token')
+	let access_token = uni.getStorageSync('accessToken')
 	let refresh_token = uni.getStorageSync('refresh_token')
 	options.header = {
-		'Tenant-Id':'000000',
-		'Authorization': 'Basic c3dvcmQ6c3dvcmRfc2VjcmV0',
-		'content-type': 'application/json',
-		'Blade-Auth': access_token ,
-		'refresh_token': refresh_token
+		'Authorization': 'Bearer '+ access_token,
+		'content-type': 'application/json'
 	};
 
 	// resolved是返回成功数据,rejected返回错误数据

+ 98 - 0
components/scroll-notice/ScrollNotice.vue

@@ -0,0 +1,98 @@
+<template>
+	<view class="notice-main">
+		<view class="notice-icon">
+			<image src="/static/index/u01.png" mode=""></image>
+		</view>
+		<view class="notice-swiper-wrap">
+			<swiper class="notice-swiper" :style="'height:'+height+'px;line-height:'+height+'px;'" autoplay="true"
+				:interval="interval" duration="500" circular="true" :vertical="type==1?true:false">
+				<swiper-item v-for="(list,index) in dataList" :key="index" @click.stop="clickList(list)">
+					<view class="notice-swiper-item" :style="'font-size:'+fontSize+'px;color:'+color">
+						{{list.noticeTitle}}
+					</view>
+				</swiper-item>
+			</swiper>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			//通知列表
+			dataList: {
+				type: Array,
+				default: () => {
+					return []
+				}
+			},
+			//滚动类型(1:向上循环滚动;2:横向滚动)
+			type: {
+				type: Number,
+				default: 1
+			},
+			//滚动时间间隔
+			interval: {
+				type: Number,
+				default: 1000
+			},
+			//通告栏高度(rpx)
+			height: {
+				type: Number,
+				default: 66
+			},
+			//字体大小(rpx)
+			fontSize: {
+				type: Number,
+				default: 30
+			},
+			//字体颜色
+			color: {
+				type: String,
+				default: '#333333'
+			},
+			//自定义取值名字
+			customName: {
+				type: String,
+				default: 'title'
+			},
+		},
+		data() {
+			return {
+
+			};
+		},
+		methods: {
+			clickList(item) {
+				this.$emit("click", item)
+			}
+		}
+	}
+</script>
+
+<style scoped>
+.notice-main {
+	z-index: 100;
+	width: 100%;
+	display: flex;
+	align-items: center;
+}
+
+.notice-icon{
+	width: 8%;
+}
+.notice-icon image{
+	height: 16px;
+	width: 16px;
+}
+.notice-swiper-wrap{
+	width: 90%;
+}
+.notice-swiper-item {
+	overflow: hidden;
+	text-overflow: ellipsis;
+	display: -webkit-box;
+	-webkit-box-orient: vertical;
+	-webkit-line-clamp: 1;
+}
+</style>

+ 0 - 26
config/http-requst.js

@@ -1,26 +0,0 @@
-
-// 引入vuex
-// import store from '@/common/store';
-// 引入拦截器配置
-import {requestInterceptors,responseInterceptors} from './interceptors.js'
-
-//  初始化请求配置
-const initRequest=(vm)=>{
-	uni.$u.http.setConfig((defaultConfig) => {
-		/* defaultConfig 为默认全局配置 */
-		// defaultConfig.baseURL = "http://222.85.201.140:10001/" /* 根域名 */
-		// 域名
-		defaultConfig.baseURL = "https://jje.admin.xinyuekj.com.cn/" /* 根域名 */
-		
-		return defaultConfig;
-	})
-	requestInterceptors()
-	responseInterceptors()
-}
-export {
-	initRequest
-}
-
-
-
-

+ 0 - 73
config/interceptors.js

@@ -1,73 +0,0 @@
-// 引入vuex
-import store from '@/common/store';
-
-const requestInterceptors=(vm)=>{
-	/**
-	 * 请求拦截
-	 * @param {Object} http
-	 */
-	uni.$u.http.interceptors.request.use((config) => { // 可使用async await 做异步操作
-		// 初始化请求拦截器时,会执行此方法,此时data为undefined,赋予默认{}
-		config.data = config.data || {}
-		// 可以在此通过vm引用vuex中的变量,具体值在vm.$store.state中
-		// console.log(vm.$store.state);
-		// console.log("----------------------------------")
-		if(config?.data?.auth) {
-			// 获取请数据token
-			const token = uni.getStorageSync('accessToken');
-			// console.log("token:"+token)
-			// 可以在此通过vm引用vuex中的变量,具体值在vm.$store.state中
-			// config.header.token = vm.$store.state.userInfo.token
-			if(config?.data?.requstForm){
-				config.header = {
-					'Content-Type': 'application/x-www-form-urlencoded'
-				}
-			}
-			config.header.Authorization = 'Bearer ' + token
-		}
-		// console.log("----------------------------------")
-		return config
-	}, (config) => // 可使用async await 做异步操作
-		Promise.reject(config))
-}
-const responseInterceptors=(vm)=>{
-	/**
-	 * 响应拦截
-	 * @param {Object} http
-	 */
-	uni.$u.http.interceptors.response.use((response) => { /* 对响应成功做点什么 可使用async await 做异步操作*/
-		const data = response.data
-		// 自定义参数
-		const custom = response.config?.custom
-		if (data.code !== 200) { // 服务端返回的状态码不等于200,则reject()
-			if (data.msg) {
-				uni.$u.toast(data.msg)
-			}
-			// 如果没有显式定义custom的toast参数为false的话,默认对报错进行toast弹出提示
-			if (custom.toast !== false) {
-				uni.$u.toast(data.msg)
-			}
-			// 如果需要catch返回,则进行reject
-			if (custom?.catch) {
-				return Promise.reject(data)
-			} else {
-				// 否则返回一个pending中的promise
-				return new Promise(() => { })
-			}
-
-		} else if(data.rows){
-			return data;
-		}
-
-		return data.data || {}
-	}, (response) => { /*  对响应错误做点什么 (statusCode !== 200)*/
-		return Promise.reject(response)
-	})
-}
-
-export {
-	requestInterceptors,
-	responseInterceptors
-}
-
-

+ 0 - 311
loginPages/bindAccount/index.vue

@@ -1,311 +0,0 @@
-<template>
-	<view class="container">
-		<view class="login-wrap">
-			<view class="login-form">
-				<u--form labelPosition="left" :model="userInfo" :rules="rules" ref="form1">
-					<u-form-item label="手机号" prop="phonenumber" labelWidth="auto" labelAlign="right">
-						<u--input v-model="userInfo.phonenumber" placeholder="请输入手机号" border="bottom" type="number"
-							maxlength="11"></u--input>
-					</u-form-item>
-					<u-form-item labelWidth="auto" labelAlign="right" label="验证码" prop="smsCode" width="120">
-						<u--input v-model="userInfo.smsCode" disabledColor="#ffffff" placeholder="请输入验证码"
-							border="bottom" maxlength="6"></u--input>
-						<template #right>
-							<view class="identifying-code">
-								<u-code ref="uCode2" @change="codeChange2" keep-running start-text="获取验证码"></u-code>
-								<text @tap="getCode2" :text="tips2" class="u-page__code-text">{{tips2}}</text>
-							</view>
-						</template>
-
-					</u-form-item>
-				</u--form>
-			</view>
-		</view>
-		<view @click="gotoBindAccountPassword()" class="op-btn-wrap">
-			<view class="h-btn">
-				<text>下一步</text>
-			</view>
-		</view>
-
-		<!-- 密码正确 -->
-		<u-popup :show="errShow" :round="10" mode="center">
-			<view class="h-popo-content">
-				<view class="h-img">
-					<!-- <u-icon name="close" color="red" size="40"></u-icon> -->
-					<u-icon name="/static/login/u01.png" color="red" size="50"></u-icon>
-				</view>
-				<view class="h-text">
-					<text>系统已检测到该手机号已绑定过账号</text>
-				</view>
-				<view class="h-text">
-					<text>请选择</text>
-				</view>
-				<view class="h-btn-wrap">
-					<view @click="createNewAccount()" class="h-left-btn">
-						<text>创建新账号</text>
-					</view>
-					<view @click="loginOldAccount()" class="h-right-btn">
-						<text>登录老账号</text>
-					</view>
-				</view>
-			</view>
-		</u-popup>
-
-	</view>
-</template>
-<script>
-
-
-	export default {
-		data() {
-			return {
-				errShow: false,
-				userInfo: {
-					phonenumber: '',
-					phone: '',
-					smsCode: '',
-					openId: '',
-					password: "",
-					transactionPassword: "",
-					reference: "",
-					type: '' // 实名认证创建新账号
-				},
-				tips2: '',
-				rules: {
-					phonenumber: [{
-							required: true,
-							min: 10,
-							max: 12,
-							message: '请输入11位电话号码',
-							trigger: ['blur', 'change'],
-						},
-						{
-							// 此为同步验证,可以直接返回true或者false,如果是异步验证,稍微不同,见下方说明
-							validator: (rule, value, callback) => {
-								// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
-								return !this.$isDataEmpty(value);
-							},
-							message: "请认真填写电话号码",
-							trigger: ['blur', 'change'],
-						}
-					],
-					smsCode: {
-						required: true,
-						min: 4,
-						max: 6,
-						message: '请输入4位验证码',
-						trigger: ['blur', 'change'],
-					},
-				},
-			}
-		},
-		onLoad(option) {
-			// 判断Openid是否为空
-			if (!this.$isDataEmpty(option.openId)) {
-				this.userInfo.openId = option.openId;
-				console.log(option)
-			}
-		},
-		onReady() {
-			this.$refs.form1.setRules(this.rules)
-		},
-		methods: {
-			// 创建新账号
-			createNewAccount() {
-				this.errShow = false;
-				this.userInfo.type = "2";
-				uni.$u.route({
-					url: '/pages/login/login-real-name-auth',
-					params: {
-						data: JSON.stringify(this.userInfo)
-					}
-				})
-			},
-			// 登录老账号
-			loginOldAccount() {
-				this.errShow = false;
-				uni.$u.route({
-					url: '/pages/login/login-old-account',
-					params: {
-						phone: this.userInfo.phonenumber
-					}
-				})
-			},
-			// 验证电话号码是否存在
-			phoneIsExist() {
-				let that = this;
-				// 验证电话号码是否存在
-				this.$api.phoneIsExist({
-					data: this.userInfo
-				}).then((res) => {
-					console.log(res)
-					if (res.phoneIsExist) { // 存在
-						that.errShow = true;
-					} else {
-						that.userInfo.phone = that.userInfo.phonenumber;
-						that.userInfo.type = "1";
-
-
-						uni.$u.route({
-							url: '/pages/login/bind-transaction-password',
-							params: {
-								data: JSON.stringify(that.userInfo)
-							}
-						})
-
-						/* uni.$u.route({
-							url: '/pages/login/bind-account-password',
-							params: {
-								data: JSON.stringify(that.userInfo)
-							}
-						}) */
-
-					}
-				}).catch(() => {
-					uni.showToast({
-						title: "操作失败"
-					})
-				});
-			},
-			// 去绑定账号密码页面
-			gotoBindAccountPassword() {
-				this.$refs.form1.validate().then(res => {
-					this.phoneIsExist();
-				}).catch(errors => {
-					uni.$u.toast('校验失败,请认真填写')
-				})
-			},
-			codeChange2(text) {
-				this.tips2 = text;
-			},
-			getCode2() {
-				let that = this;
-				if (this.$refs.uCode2.canGetCode) {
-					that.getSmsCode();
-				} else {
-					uni.$u.toast('倒计时结束后再发送');
-				}
-			},
-			// 获取手机验证码
-			getSmsCode() {
-				let that = this;
-				// 模拟向后端请求验证码
-				uni.showLoading({
-					title: '正在获取验证码'
-				})
-				getSmsCode({
-					data: {
-						phonenumber: this.userInfo.phonenumber,
-						auth: true
-					}
-				}).then((res) => {
-					uni.hideLoading();
-					// 这里此提示会被this.start()方法中的提示覆盖
-					uni.$u.toast('验证码已发送');
-					// 通知验证码组件内部开始倒计时
-					that.$refs.uCode2.start();
-				}).catch(() => {
-					uni.showToast({
-						title: "操作失败"
-					})
-				});
-			},
-		}
-	}
-</script>
-<style lang="scss">
-	page,
-	body {
-		background: #fff;
-	}
-
-	.h-popo-content {
-		height: 380rpx;
-		padding: 24rpx;
-		width: 600rpx;
-		text-align: center;
-		font-size: 28rpx;
-		font-family: PingFangSC-Semibold, PingFang SC;
-
-		.h-img {
-			display: flex;
-			justify-content: center;
-		}
-
-		.h-text {
-			margin-top: 24rpx;
-			font-weight: 400;
-			color: #666666;
-		}
-
-		.text {
-			margin-top: 12rpx;
-			font-weight: 400;
-			color: #666666;
-		}
-
-		.h-btn-wrap {
-			display: flex;
-			justify-content: space-between;
-			color: #333333;
-			text-align: center;
-			margin-top: 28rpx;
-
-			.h-left-btn {
-				height: 64rpx;
-				line-height: 60rpx;
-				background: #EEEEEE;
-				width: 200rpx;
-				text-align: center;
-				border-radius: 32rpx;
-				margin: 0 auto;
-			}
-
-			.h-right-btn {
-				height: 64rpx;
-				line-height: 60rpx;
-				background: #FFE05C;
-				width: 200rpx;
-				border-radius: 32rpx;
-				margin: 0 auto;
-
-			}
-		}
-	}
-
-	.container {
-		background: #fff;
-		height: 600rpx;
-
-		.login-wrap {
-			display: flex;
-			justify-content: center;
-
-			.login-form {
-				width: 90%;
-			}
-
-			.account {
-				display: flex;
-			}
-
-			.identifying-code {}
-		}
-
-		.op-btn-wrap {
-			margin-top: 60rpx;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-
-			.h-btn {
-				text-align: center;
-				width: 686rpx;
-				height: 84rpx;
-				background: #FFE05C;
-				border-radius: 54rpx;
-				line-height: 84rpx;
-			}
-		}
-	}
-</style>

+ 164 - 0
loginPages/login/bind-account-password.vue

@@ -0,0 +1,164 @@
+<template>
+  <view class="container">
+    <view class="login-wrap">
+		<view class="login-form">
+			<u--form
+				labelPosition="left"
+				:model="userInfo"
+				:rules="rules"
+				ref="form1"
+			>
+				<u-form-item
+					label="密码"
+					prop="password"
+					labelWidth="auto"
+					labelAlign="right"
+				  >
+				<u--input
+					v-model="userInfo.password"
+					placeholder="请输入6到18位的密码"
+					border="bottom"
+					maxlength="18"
+					minlength="6"
+					type="password"
+				></u--input>
+				</u-form-item>
+			  <u-form-item
+					labelWidth="auto"
+					labelAlign="right"
+					label="确认密码"
+					prop="password1"
+					width="120"
+				>
+				<u--input
+					maxlength="20"
+					v-model="userInfo.password1"
+					placeholder="请再次输入密码"
+					border="bottom"
+					type="password"
+				></u--input>
+			  </u-form-item>
+			</u--form>
+		</view>
+	</view>
+	<view @click="gotoSettingTransactionPassword()" class="op-btn-wrap">
+		<view class="h-btn">
+			<text>下一步</text>
+		</view>
+	</view>
+	
+	<view class="h-mark-desc">
+		<view class="h-text">
+			<text>*账号密码建议输入6到18位的数字、字母和特殊符号组成</text>
+		</view>
+	</view>
+	
+  </view>
+</template>
+<script>
+export default {
+	data() {
+		return {
+			userInfo: {
+				phone: '',
+				smsCode: '',
+				openId: '',
+				password: '',
+				password1: '',
+				transactionPassword: '',
+				reference: '',
+			},
+			tips2: '',
+			rules: {
+				password: {
+					required: true,
+					min: 6,
+					max: 18,
+					message: '请输入6到18位密码',
+					trigger: ['blur', 'change'],
+				},
+				password1:  [
+					{
+						required: true,
+						min: 6,
+						max: 18,
+						message: '请输入6到18位密码',
+						trigger: ['blur', 'change'],
+					},
+					{
+						validator: (rule, value, callback) => {
+							if(this.userInfo.password === value){
+								return true;
+							}
+							return false;
+						},
+						message: "两次输入密码不一致",
+						trigger: ['blur', 'change'],
+					}
+				],
+			},
+		}
+	},
+	onLoad(option) {
+		// 判断Openid是否为空
+		if(!this.$isDataEmpty(option)){
+			this.userInfo = JSON.parse(option.data);
+		}
+	},
+	onReady() {
+		this.$refs.form1.setRules(this.rules)
+	},
+	methods: {
+		// 去设置交易密码
+		gotoSettingTransactionPassword(){
+			let that = this;
+			this.$refs.form1.validate().then(res => {
+				uni.$u.route({
+					url: '/pages/login/bind-transaction-password',
+					params: {
+						data: JSON.stringify(that.userInfo)
+					}
+				})
+			}).catch(errors => {
+				uni.$u.toast('校验失败,请认真填写')
+			})
+		},
+	}
+}
+</script>
+<style lang="scss">
+page,body{
+	background: #fff;
+}
+.container{
+	background: #fff;
+	height: 500px;
+	.login-wrap {
+		display: flex;
+		justify-content: center;
+		.login-form{
+			width: 90%;
+		}
+		.account{
+			display: flex;
+		}
+		.identifying-code{
+		}
+	}
+	.op-btn-wrap{
+		margin-top: 30px;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.h-btn{
+			text-align: center;
+			width: 343px;
+			height: 42px;
+			background: #FFE05C;
+			border-radius: 27px;
+			line-height: 42px;
+		}
+	}
+}
+
+</style>

+ 293 - 0
loginPages/login/bind-account.vue

@@ -0,0 +1,293 @@
+<template>
+  <view class="container">
+    <view class="login-wrap">
+		<view class="login-form">
+			<u--form
+				labelPosition="left"
+				:model="userInfo"
+				:rules="rules"
+				ref="form1"
+			>
+				<u-form-item
+					label="手机号"
+					prop="phonenumber"
+					labelWidth="auto"
+					labelAlign="right"
+				  >
+				<u--input
+					v-model="userInfo.phonenumber"
+					placeholder="请输入手机号"
+					border="bottom"
+					type="number"
+					maxlength="11"
+				></u--input>
+			  </u-form-item>
+			  <u-form-item
+					labelWidth="auto"
+					labelAlign="right"
+					label="验证码"
+					prop="smsCode"
+					width="120"
+				>
+				<u--input
+					v-model="userInfo.smsCode"
+					disabledColor="#ffffff"
+					placeholder="请输入验证码"
+					border="bottom"
+					maxlength="6"
+				></u--input>
+				<template #right>
+					<view class="identifying-code">
+						<u-code
+							ref="uCode2"
+							@change="codeChange2"
+							keep-running
+							start-text="获取验证码"
+						></u-code>
+						<text
+							@tap="getCode2"
+							:text="tips2"
+							class="u-page__code-text"
+						>{{tips2}}</text>
+					</view>
+				</template>
+
+			  </u-form-item>
+			</u--form>
+		</view>
+	</view>
+	<view @click="gotoBindAccountPassword()" class="op-btn-wrap">
+		<view class="h-btn">
+			<text>下一步</text>
+		</view>
+	</view>
+
+	<!-- 密码正确 -->
+	<u-popup :show="errShow" :round="10"  mode="center"  >
+	  <view class="h-popo-content">
+		   <view class="h-img">
+			   <!-- <u-icon name="close" color="red" size="40"></u-icon> -->
+			   <u-icon name="/static/login/u01.png" color="red" size="50"></u-icon>
+		   </view>
+		   <view class="h-text">
+			   <text>系统已检测到该手机号已绑定过账号</text>
+		   </view>
+		   <view class="h-text">
+		   		<text>请选择</text>
+		   </view>
+		   <view class="h-btn-wrap">
+			   <view @click="createNewAccount()" class="h-left-btn">
+			   	    <text>创建新账号</text>
+			   </view>
+			   <view @click="loginOldAccount()" class="h-right-btn">
+				   <text>登录老账号</text>
+			   </view>
+		   </view>
+	  </view>
+	</u-popup>
+
+  </view>
+</template>
+ <script>
+
+export default {
+	data() {
+		return {
+			errShow: false,
+			userInfo: {},
+			tips2: '',
+			rules: {
+				phonenumber:  [
+					{
+						required: true,
+						min: 10,
+						max: 12,
+						message: '请输入11位电话号码',
+						trigger: ['blur', 'change'],
+					},
+					{
+						// 此为同步验证,可以直接返回true或者false,如果是异步验证,稍微不同,见下方说明
+						validator: (rule, value, callback) => {
+							// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
+							return !this.$isDataEmpty(value);
+						},
+						message: "请认真填写电话号码",
+						trigger: ['blur', 'change'],
+					}
+				],
+				smsCode: {
+					required: true,
+					min: 4,
+					max: 6,
+					message: '请输入4位验证码',
+					trigger: ['blur', 'change'],
+				},
+			},
+		}
+	},
+	onLoad(option) {
+		// 判断Openid是否为空
+		this.userInfo =	uni.getStorageSync('userInfo');
+	},
+	onReady() {
+		this.$refs.form1.setRules(this.rules)
+	},
+	methods: {
+		// 创建新账号
+		createNewAccount(){
+			this.errShow = false;
+			this.userInfo.type = "2";
+			uni.navigateTo({
+				url: '/loginPages/login/login-real-name-auth?data='+JSON.stringify(this.userInfo),
+			})
+		},
+		// 登录老账号
+		loginOldAccount(){
+			this.errShow = false;
+			uni.navigateTo({
+				url: '/loginPages/login/login-old-account?phone='+this.userInfo.phonenumber,
+			})
+		},
+		// 验证电话号码是否存在
+		phoneIsExist(){
+			let that = this;
+			// 验证电话号码是否存在
+			this.$api.phoneIsExist({data:this.userInfo}).then((res)=>{
+				console.log(res)
+				if(!res.phoneIsExist){ // 存在
+					that.errShow = true;
+				} else {
+					that.userInfo.phone = that.userInfo.phonenumber;
+					that.userInfo.type = "1";
+					console.log("++++++++++++++++++++++")
+					uni.navigateTo({
+						url: '/loginPages/login/bind-transaction-password?data='+JSON.stringify(that.userInfo),
+					})
+				}
+			}).catch(() =>{
+				uni.showToast({
+					title: "操作失败"
+				})
+			});
+		},
+		// 去绑定账号密码页面
+		gotoBindAccountPassword(){
+			this.$refs.form1.validate().then(res => {
+				this.phoneIsExist();
+			}).catch(errors => {
+				uni.$u.toast('校验失败,请认真填写')
+			})
+		},
+		codeChange2(text) {
+			this.tips2 = text;
+		},
+		getCode2() {
+			let that = this;
+			if (this.$refs.uCode2.canGetCode) {
+				that.getSmsCode();
+			} else {
+				uni.$u.toast('倒计时结束后再发送');
+			}
+		},
+		// 获取手机验证码
+		getSmsCode(){
+			let that = this;
+			this.$api.getSmsCode({phonenumber:this.userInfo.phonenumber,auth: true}).then((res)=>{
+				uni.hideLoading();
+				// 这里此提示会被this.start()方法中的提示覆盖
+				uni.$u.toast('验证码已发送');
+				// 通知验证码组件内部开始倒计时
+				that.$refs.uCode2.start();
+			}).catch(() =>{
+				uni.showToast({
+					title: "操作失败"
+				})
+			});
+		},
+	}
+}
+</script>
+<style lang="scss">
+page,body{
+	background: #fff;
+}
+
+.h-popo-content{
+	height: 190px;
+	padding: 12px;
+	width: 300px;
+	text-align: center;
+	font-size: 14px;
+	font-family: PingFangSC-Semibold, PingFang SC;
+	.h-img{
+		display: flex;
+		justify-content: center;
+	}
+	.h-text{
+		margin-top: 12px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.text{
+		margin-top: 6px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.h-btn-wrap{
+		display: flex;
+		justify-content: space-between;
+		color: #333333;
+		text-align: center;
+		margin-top: 14px;
+		.h-left-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #EEEEEE;
+			width: 100px;
+			text-align: center;
+			border-radius: 16px;
+			margin: 0 auto;
+		}
+		.h-right-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #FFE05C;
+			width: 100px;
+			border-radius: 16px;
+			margin: 0 auto;
+
+		}
+	}
+}
+
+.container{
+	background: #fff;
+	height: 300px;
+	.login-wrap {
+		display: flex;
+		justify-content: center;
+		.login-form{
+			width: 90%;
+		}
+		.account{
+			display: flex;
+		}
+		.identifying-code{
+		}
+	}
+	.op-btn-wrap{
+		margin-top: 30px;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.h-btn{
+			text-align: center;
+			width: 343px;
+			height: 42px;
+			background: #FFE05C;
+			border-radius: 27px;
+			line-height: 42px;
+		}
+	}
+}
+</style>

+ 226 - 0
loginPages/login/bind-transaction-password.vue

@@ -0,0 +1,226 @@
+<template>
+  <view class="container">
+    <view class="login-wrap">
+		<view class="login-form">
+			<u--form
+				labelPosition="left"
+				:model="userInfo"
+				:rules="rules"
+				ref="form1"
+			>
+				<u-form-item
+					label="账号支付密码"
+					prop="transactionPassword"
+					labelWidth="auto"
+					labelAlign="right"
+				  >
+				<u--input
+					v-model="userInfo.transactionPassword"
+					placeholder="请输入账号支付密码"
+					border="bottom"
+					maxlength="6"
+					type="password"
+				></u--input>
+				</u-form-item>
+			  <u-form-item
+					labelWidth="auto"
+					labelAlign="right"
+					label="确认密码"
+					prop="transactionPassword1"
+					width="120"
+				>
+				<u--input
+					maxlength="6"
+					v-model="userInfo.transactionPassword1"
+					placeholder="请再次输入账号支付密码"
+					border="bottom"
+					type="password"
+				></u--input>
+			  </u-form-item>
+			</u--form>
+		</view>
+	</view>
+	<view @click="submitData" class="op-btn-wrap">
+		<view class="h-btn">
+			<text>确定</text>
+		</view>
+	</view>
+
+	<view class="h-mark-desc">
+		<view class="h-text">
+			<text>*账户支付密码建议输入不连续6位数密码</text>
+		</view>
+	</view>
+
+  </view>
+</template>
+<script>
+export default {
+	data() {
+		return {
+			userInfo: {
+				phone: '',
+				smsCode: '',
+				openId: '',
+				password: "",
+				password1: '',
+				transactionPassword: "",
+				transactionPassword1: "",
+				reference: ""
+			},
+			tips2: '',
+			rules: {
+				transactionPassword: {
+					required: true,
+					min: 6,
+					max: 6,
+					message: '请输入6位密码',
+					trigger: ['blur', 'change'],
+				},
+				transactionPassword1:  [
+					{
+						required: true,
+						min: 6,
+						max: 6,
+						message: '请输入6位密码',
+						trigger: ['blur', 'change'],
+					},
+					{
+						validator: (rule, value, callback) => {
+							if(this.userInfo.transactionPassword === value){
+								return true;
+							}
+							return false;
+						},
+						message: "两次输入密码不一致",
+						trigger: ['blur', 'change'],
+					}
+				],
+			},
+		}
+	},
+	onLoad(option) {
+		// 判断Openid是否为空
+		if(!this.$isDataEmpty(option)){
+			this.userInfo = JSON.parse(option.data);
+		}
+	},
+	onReady() {
+		this.$refs.form1.setRules(this.rules)
+	},
+	methods: {
+		// 提交交易密码
+		submitData(){
+			let that = this;
+
+			// 如果有错误,会在catch中返回报错信息数组,校验通过则在then中返回true
+			this.$refs.form1.validate().then(res => {
+				console.log(that.userInfo)
+				that.userInfo.password = that.userInfo.transactionPassword;
+				if(that.userInfo.type == '1'){ // 新微信新手机注册
+					// 调用注册
+					that.wechatRegister();
+				}
+				if(that.userInfo.type == '2'){ // 新微信新手机注册
+					// 调用注册
+					that.realNameAuthLogin();
+				}
+			}).catch(errors => {
+				uni.$u.toast('校验失败,请认真填写')
+			})
+		},
+		// 新微信新手机注册
+		wechatRegister(){
+			const that = this;
+			// 新微信新手机注册账号
+			wechatRegister(null,{data:this.userInfo}).then((res)=>{
+				console.log(res)
+				console.log(res.access_token)
+				if(!this.$isDataEmpty(res.access_token)){
+					that.setUserData(res);
+				} else {
+					uni.showToast({
+						title: "用户注册失败"
+					})
+				}
+			}).catch(() =>{
+				uni.showToast({
+					title: "操作失败"
+				})
+			});
+		},
+		realNameAuthLogin(){
+			// 新微信老手机注册账号
+			realNameAuthLogin(null,{data:this.userInfo}).then((res)=>{
+				console.log(res)
+				console.log(res.access_token)
+				if(!this.$isDataEmpty(res.access_token)){
+					that.setUserData(res);
+				} else {
+					uni.showToast({
+						title: "用户注册失败"
+					})
+				}
+			}).catch(() =>{
+				uni.showToast({
+					title: "操作失败"
+				})
+			});
+		},
+		// 设置登录后的用户数据
+		setUserData(res){
+			let loginState = {
+				status: 1,
+				accessToken: ""
+			}
+			// 数据获取token
+			loginState.accessToken = res.access_token;
+			this.$store.commit('updateLoginState', loginState);
+			this.$store.commit('updateLoginUserInfo', res.userInfo)
+			uni.$u.route({
+				url: '/pages/index/tabbar',
+				params: {
+					PageCur: 'index'
+				}
+			})
+		},
+
+	}
+}
+</script>
+<style lang="scss">
+page,body{
+	background: #fff;
+}
+.container{
+	background: #fff;
+	height: 300px;
+	.login-wrap {
+		display: flex;
+		justify-content: center;
+		.login-form{
+			width: 90%;
+		}
+		.account{
+			display: flex;
+		}
+		.identifying-code{
+		}
+	}
+	.op-btn-wrap{
+		margin-top: 30px;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.h-btn{
+			text-align: center;
+			width: 343px;
+			height: 42px;
+			background: #FFE05C;
+			border-radius: 27px;
+			line-height: 42px;
+		}
+	}
+}
+
+</style>

+ 226 - 0
loginPages/login/login-old-account.vue

@@ -0,0 +1,226 @@
+<template>
+  <view class="container">
+    <view class="login-wrap">
+		<view class="login-form">
+			<u--form
+				labelPosition="left"
+				:model="reqParm"
+				:rules="rules"
+				ref="form1"
+			>
+				<u-form-item
+					label="账号密码"
+					prop="password"
+					borderBottom
+					labelWidth="auto"
+					labelAlign="right"
+				  >
+				<u--input
+					v-model="reqParm.password"
+					placeholder="请输入账号密码"
+					border="bottom"
+					type="password"
+				></u--input>
+			  </u-form-item>
+			</u--form>
+		</view>
+	</view>
+	<view @click="submitAccountPasswordVerify()" class="op-btn-wrap">
+		<view class="h-btn">
+			<text>确定</text>
+		</view>
+	</view>
+
+	<!-- 密码正确 -->
+	<u-popup :show="show" :round="10"  mode="center"  @close="close" @open="open">
+	  <view class="h-popo-content">
+		   <view class="h-img">
+			   <u-icon name="checkbox-mark" color="green" size="40"></u-icon>
+		   </view>
+		   <view class="text">
+			   <text>账号找回成功</text>
+		   </view>
+		   <view class="text">
+			   <text> 是否立即绑定新的微信号</text>
+		   </view>
+		   <view class="h-btn-wrap">
+			   <view @click="show = false" class="h-left-btn">
+				   <text>取消</text>
+			   </view>
+			   <view @click="gotoBindWechat()" class="h-right-btn">
+			   		<text>立即绑定</text>
+			   </view>
+		   </view>
+	  </view>
+	</u-popup>
+
+	<!-- 密码正确 -->
+	<u-popup :show="passwordErrShow" :round="10"  mode="center"  @close="close" @open="open">
+	  <view class="h-popo-content">
+		   <view class="h-img">
+			   <u-icon name="close" color="red" size="40"></u-icon>
+		   </view>
+		   <view class="h-text">
+			   <text>密码错误</text>
+		   </view>
+		   <view class="h-btn-wrap">
+			   <view @click="passwordErrShow = false" class="h-right-btn">
+				   <text>确定</text>
+			   </view>
+		   </view>
+	  </view>
+	</u-popup>
+
+  </view>
+</template>
+ <script>
+export default {
+	data() {
+		return {
+			passwordErrShow: false,
+			show: false,
+			reqParm: {
+				phone: '',
+				password: '',
+			},
+			rules: {
+				password:{
+					required: true,
+					message: '请输入账号密码',
+					trigger: ['blur', 'change'],
+				},
+			},
+		}
+	},
+	onLoad(option) {
+		// 判断Openid是否为空
+		this.reqParm.phone =  option.phone;
+	},
+	onReady() {
+
+	},
+	methods: {
+		// 提交账号密码验证
+		submitAccountPasswordVerify(){
+			this.$refs.form1.validate().then(res => {
+				// 验证找回
+				this.wechatRetrieveAccountPwdLogin();
+			}).catch(errors => {
+				uni.$u.toast('校验失败,请认真填写')
+			})
+		},
+
+		// 账号密码找回登录
+		wechatRetrieveAccountPwdLogin(){
+			let that = this;
+			// 根据手机和密码找回账号,成功自动登录
+			this.$api.wechatRetrieveAccountPwdLogin(this.reqParm).then((res)=>{
+
+				uni.setStorageSync('userInfo',res.userInfo)
+				uni.setStorageSync('accessToken',res.access_token)
+				uni.switchTab({
+					url: '/pages/index/index',
+				})
+
+			}).catch(() =>{
+				uni.showToast({
+					title: "操作失败"
+				})
+			});
+		},
+		// 去绑定微信
+		gotoBindWechat(){
+			this.show = false;
+			uni.$u.route({
+				url: '/pages/setting/setting-wechat',
+				params: {
+					name: 'lisa'
+				}
+			})
+		},
+	}
+}
+</script>
+<style lang="scss">
+page,body{
+	background: #fff;
+}
+.container{
+	background: #fff;
+	height: 300px;
+	.login-wrap {
+		display: flex;
+		justify-content: center;
+		.login-form{
+			width: 90%;
+		}
+		.account{
+			display: flex;
+		}
+		.identifying-code{
+		}
+	}
+	.op-btn-wrap{
+		margin-top: 30px;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.h-btn{
+			text-align: center;
+			width: 343px;
+			height: 42px;
+			background: #FFE05C;
+			border-radius: 27px;
+			line-height: 42px;
+		}
+	}
+}
+
+.h-popo-content{
+	height: 170px;
+	padding: 12px;
+	width: 300px;
+	text-align: center;
+	font-size: 14px;
+	font-family: PingFangSC-Semibold, PingFang SC;
+	.h-img{
+		display: flex;
+		justify-content: center;
+	}
+	.h-text{
+		margin-top: 12px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.text{
+		margin-top: 6px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.h-btn-wrap{
+		display: flex;
+		justify-content: space-between;
+		color: #333333;
+		text-align: center;
+		margin-top: 14px;
+		.h-left-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #EEEEEE;
+			width: 100px;
+			text-align: center;
+			border-radius: 16px;
+			margin: 0 auto;
+		}
+		.h-right-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #FFE05C;
+			width: 100px;
+			border-radius: 16px;
+			margin: 0 auto;
+
+		}
+	}
+}
+</style>

+ 432 - 0
loginPages/login/login-real-name-auth.vue

@@ -0,0 +1,432 @@
+<template>
+	<view class="keep-on-record-wrap">
+		<!-- 提示内容 -->
+		<u-toast ref="uToast" />
+
+		<view class="keep-on-record-content">
+			<view class="container">
+				<view class="login-wrap">
+					<view class="login-form">
+						<u--form
+							labelPosition="left"
+							:model="userRealNameAuth"
+							:rules="rules"
+							ref="form1"
+						>
+							<u-form-item
+								label="真实姓名"
+								prop="name"
+								labelWidth="auto"
+								labelAlign="right"
+							  >
+							<u--input
+								v-model="userRealNameAuth.name"
+								placeholder="请输入真实姓名"
+								border="bottom"
+								type="text"
+								maxlength="11"
+							></u--input>
+						  </u-form-item>
+						  <u-form-item
+								labelWidth="auto"
+								labelAlign="right"
+								label="身份证号"
+								prop="idCard"
+								width="120"
+							>
+							<u--input
+								v-model="userRealNameAuth.idCard"
+								disabledColor="#ffffff"
+								placeholder="请输入身份证号"
+								border="bottom"
+								maxlength="20"
+							></u--input>
+						  </u-form-item>
+						</u--form>
+					</view>
+				</view>
+
+
+				<view class="">
+					<view class="uploadBox">
+						<view @click="uploadImg1(1)">
+							<view class="uploadItem bg-img1">
+								<image class="imgUrl" :src="imgUrl1"></image>
+							</view>
+							<view class="h-desc">
+								<text>点击上传身份证人像面图片</text>
+							</view>
+						</view>
+						<view @click="uploadImg1(2)">
+							<view class="uploadItem bg-img2">
+								<image class="imgUrl" :src="imgUrl2"></image>
+							</view>
+							<view class="h-desc">
+								<text>点击上传身份证国徽面图片</text>
+							</view>
+						</view>
+					</view>
+				</view>
+
+				<!-- 保存备案信息 -->
+				<view class="uploadBox">
+					<view  v-if="userRealNameAuth.isAudit != 1" @click="saveUserRealNameAuth" class="leftBtn text-white text-lg text-center">下一步</view>
+					<view  v-else  class="leftBtn text-white text-lg text-center">审核中不允许修改</view>
+				</view>
+
+			</view>
+		</view>
+
+		<view class="footer"></view>
+
+		<u-popup :show="errShow" :round="10"  mode="center" >
+		  <view class="h-popo-content">
+			   <view class="h-img">
+				   <!-- <u-icon name="close" color="red" size="40"></u-icon> -->
+				   <u-icon name="/static/login/u01.png" color="red" size="50"></u-icon>
+			   </view>
+			   <view class="h-text">
+				   <text>该身份证号已开通实名认证</text>
+			   </view>
+			   <view class="h-text">
+			   		<text>无法继续操作</text>
+			   </view>
+			   <view class="h-btn-wrap">
+				   <view @click="surebtn()" class="h-right-btn">
+					   <text>确定</text>
+				   </view>
+			   </view>
+		  </view>
+		</u-popup>
+
+	</view>
+</template>
+
+<script>
+export default {
+	components: {
+	},
+	data() {
+		return {
+			errShow:  false,
+			userRealNameAuth: {
+				auth: true,
+				idCard: '',
+				idCardBack: '',
+				idCardFront: '',
+				name: '',
+				phone: '',
+				openId: '',
+				type: ''
+			},
+			userInfo: {
+
+			},
+			list1: [
+				'隐私说明:请按要求上传真实的证件照片,您所上传的行驶证仅用于平台账户绑定,请放心上传'
+			],
+			imgUrl1: '',
+			imgUrl2: '',
+			show: false,
+			list: [
+			],
+			queryParms: {
+				userId:'',
+				extId: 1
+			},
+			rules: {
+				name:  [
+					{
+						required: true,
+						min: 1,
+						max: 12,
+						message: '请输入姓名',
+						trigger: ['blur', 'change'],
+					},
+					{
+						// 此为同步验证,可以直接返回true或者false,如果是异步验证,稍微不同,见下方说明
+						validator: (rule, value, callback) => {
+							// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
+							return !this.$isDataEmpty(value);
+						},
+						message: "请认真填写姓名",
+						trigger: ['blur', 'change'],
+					}
+				],
+				idCard: {
+					required: true,
+					min: 16,
+					max: 20,
+					message: '请输入身份证号',
+					trigger: ['blur', 'change'],
+				},
+			},
+		}
+	},
+	onReady() {
+		// 初始化静音验证
+		this.$refs.form1.setRules(this.rules)
+	},
+	onLoad(option) {
+		console.log("999999999999999999")
+		console.log(option)
+		// 判断Openid是否为空
+		if(!this.$isDataEmpty(option.data)){
+			let udata = JSON.parse(option.data);
+			this.userRealNameAuth.openId = udata.openId;
+			this.userRealNameAuth.phone = udata.phonenumber;
+			// 判断Openid是否为空
+			this.userRealNameAuth.type = udata.type;
+		}
+	},
+	methods: {
+		// 确定
+		surebtn(){
+			this.errShow = false,
+			uni.$u.route({
+				url: '/pages/login/login',
+				params: {
+				}
+			})
+		},
+		// 保存实名信息
+		saveUserRealNameAuth(){
+			let that = this;
+			console.log(this.userRealNameAuth)
+			if(!this.userRealNameAuth.idCardFront){
+				uni.showToast({
+					title: '请上传身份证正面',
+				})
+				return;
+			}
+			if(!this.userRealNameAuth.idCardBack){
+				uni.showToast({
+					title: '请上传身份证背面'
+				})
+				return;
+			}
+
+			that.$refs.form1.validate().then(res => {
+				// 验证数据
+				this.$api.idCardIsExist({data:this.userRealNameAuth}).then((res)=>{
+					console.log(res)
+					if(res.idCardIsExist){
+						this.errShow = true;
+					} else {
+						uni.navigateTo({
+							url: '/loginPages/login/bind-account-password?data='+JSON.stringify(that.userRealNameAuth)
+						})
+					}
+				}).catch(() =>{
+					uni.showToast({
+						title: "操作失败"
+					})
+				});
+			}).catch(errors => {
+				uni.$u.toast('校验失败,请认真填写')
+			})
+		},
+		//头像上传
+		uploadImg1(imgIndex) {
+			let that = this;
+
+			uni.chooseImage({
+				count: 1,
+				success: (chooseImageRes) => {
+					const tempFilePaths = chooseImageRes.tempFilePaths;
+
+					uni.uploadFile({
+						url: that.$host + '/resource/oss/upload', //仅为示例,非真实的接口地址
+						filePath: tempFilePaths[0],
+						name: 'file',
+						header: {
+							// "Content-Type": "multipart/form-data",
+							// 'X-Access-Token': uni.getStorageSync('token'),
+							'Authorization': 'Bearer ' + that.$store.state.loginState.accessToken,
+						},
+						success: (uploadFileRes) => {
+
+							let res = JSON.parse(uploadFileRes.data)
+							console.log(res.data)
+							if(imgIndex == 1){ // 身份证正面
+								that.imgUrl1 = tempFilePaths[0];
+								that.userRealNameAuth.idCardFront = res.data.ossId
+								that.reqParm.ossId = res.data.ossId
+							}
+
+							if(imgIndex == 2){ // 微信证背面
+								that.imgUrl2 = tempFilePaths[0];;
+								that.userRealNameAuth.idCardBack = res.data.ossId
+							}
+
+						}
+					});
+				}
+			});
+		}
+	}
+}
+</script>
+<style scoped lang="scss">
+page,body{
+	background: #fff;
+}
+// 弹出框
+.h-popo-content{
+	height: 190px;
+	padding: 12px;
+	width: 300px;
+	text-align: center;
+	font-size: 14px;
+	font-family: PingFangSC-Semibold, PingFang SC;
+	.h-img{
+		display: flex;
+		justify-content: center;
+	}
+	.h-text{
+		margin-top: 12px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.text{
+		margin-top: 6px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.h-btn-wrap{
+		display: flex;
+		justify-content: space-between;
+		color: #333333;
+		text-align: center;
+		margin-top: 14px;
+		.h-left-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #EEEEEE;
+			width: 100px;
+			text-align: center;
+			border-radius: 16px;
+			margin: 0 auto;
+		}
+		.h-right-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #FFE05C;
+			width: 100px;
+			border-radius: 16px;
+			margin: 0 auto;
+
+		}
+	}
+}
+.login-wrap {
+	display: flex;
+	justify-content: center;
+	.login-form{
+		width: 90%;
+	}
+	.account{
+		display: flex;
+	}
+	.identifying-code{
+	}
+}
+
+.h-input-wrap{
+	padding-left: 12px;
+	padding-right: 12px;
+	display: flex;
+	align-items: center;
+	height: 40px;
+	font-family: PingFangSC-Regular, PingFang SC;
+	font-size: 14px;
+	.h-name{
+		font-weight: 400;
+		color: #333333;
+		line-height: 22px;
+		margin-right: 6px;
+	}
+	.input-style{
+		border-radius: 4px;
+		font-weight: 400;
+		color: #999999;
+		line-height: 22px;
+		font-size: 14px;
+	}
+}
+
+
+
+
+
+.keep-on-record-wrap{
+	width: 96%;
+	margin: 0 auto;
+	color: #676767;
+}
+.keep-on-record-content{
+	margin-top: 12px;
+}
+
+.container {
+	height: 100%;
+}
+
+// 图片上传
+.uploadBox {
+	margin: 0 auto;
+	width: 100%;
+	padding-left: 12px;
+	padding-right: 12px;
+	margin-top: 12px;
+	.leftBtn {
+		height: 42px;
+		background: #FFE05C;
+		border-radius: 27px;
+		color: #333333;
+		line-height: 42px;
+		margin-top: 12px;
+	}
+
+	.uploadItem {
+		width: 100%;
+		height: 198px;
+		border-width: 1px;
+		border-style: dashed;
+		border-color: #999;
+		.imgUrl {
+			width: 100%;
+			height: 100%;
+		}
+	}
+	.h-desc{
+		font-size: 12px;
+		font-family: PingFangSC-Regular, PingFang SC;
+		font-weight: 400;
+		color: #666666;
+		line-height: 50px;
+		text-align: center;
+	}
+
+	.bg-img1{
+		background-image: url('http://222.85.201.140:10000/static/me/u11.png');
+		background-size: cover;
+		background-repeat: repeat;
+	}
+	.bg-img2{
+		background-image: url("http://222.85.201.140:10000/static/me/u12.png");
+		background-size: cover;
+		background-repeat: repeat;
+	}
+}
+
+
+/* 底部 */
+.footer{
+	margin-top: 30px;
+	height: 160px;
+	font-size: 12px;
+	text-align: center;
+	color: #666;
+}
+</style>

+ 244 - 0
loginPages/login/retrieve-account-password.vue

@@ -0,0 +1,244 @@
+<template>
+  <view class="container">
+    <view class="login-wrap">
+		<view class="login-form">
+			<u--form
+				labelPosition="left"
+				:model="userInfo"
+				:rules="rules"
+				ref="form1"
+			>
+				<u-form-item
+					label="账号密码"
+					prop="password"
+					borderBottom
+					labelWidth="auto"
+					labelAlign="right"
+				  >
+				<u--input
+					v-model="userInfo.password"
+					placeholder="请输入账号密码"
+					border="bottom"
+					type="password"
+				></u--input>
+			  </u-form-item>
+			</u--form>
+		</view>
+	</view>
+	<view @click="submitAccountPasswordVerify()" class="op-btn-wrap">
+		<view class="h-btn">
+			<text>确定</text>
+		</view>
+	</view>
+
+	<!-- 密码正确 -->
+	<u-popup :show="show" :round="10"  mode="center"  @close="close" @open="open">
+	  <view class="h-popo-content">
+		   <view class="h-img">
+			   <u-icon name="checkbox-mark" color="green" size="40"></u-icon>
+		   </view>
+		   <view class="text">
+			   <text>账号找回成功</text>
+		   </view>
+		   <view class="text">
+			   <text> 是否立即绑定新的微信号</text>
+		   </view>
+		   <view class="h-btn-wrap">
+			   <view @click="show = false" class="h-left-btn">
+				   <text>取消</text>
+			   </view>
+			   <view @click="gotoBindWechat()" class="h-right-btn">
+			   		<text>立即绑定</text>
+			   </view>
+		   </view>
+	  </view>
+	</u-popup>
+
+	<!-- 密码正确 -->
+	<u-popup :show="passwordErrShow" :round="10"  mode="center"  @close="close" @open="open">
+	  <view class="h-popo-content">
+		   <view class="h-img">
+			   <!-- <u-icon name="close" color="red" size="40"></u-icon> -->
+			   <u-icon name="/static/login/u01.png" color="red" size="50"></u-icon>
+		   </view>
+		   <view class="h-text">
+			   <text>密码错误</text>
+		   </view>
+		   <view class="h-btn-wrap">
+			   <view @click="passwordErrShow = false" class="h-right-btn">
+				   <text>确定</text>
+			   </view>
+		   </view>
+	  </view>
+	</u-popup>
+
+  </view>
+</template>
+ <script>
+export default {
+	data() {
+		return {
+			passwordErrShow: false,
+			show: false,
+			userInfo: {
+				phone: '',
+				password: '',
+			},
+			rules: {
+				password:{
+					required: true,
+					message: '请输入账号密码',
+					trigger: ['blur', 'change'],
+				},
+			},
+		}
+	},
+	onLoad(option) {
+		// 判断Openid是否为空
+		if(!this.$isDataEmpty(option)){
+			this.userInfo.phone = option.data;
+		}
+	},
+	onReady() {
+		this.$refs.form1.setRules(this.rules)
+	},
+	methods: {
+		// 提交账号密码验证
+		submitAccountPasswordVerify(){
+			this.$refs.form1.validate().then(res => {
+				// 验证找回
+				this.wechatRetrieveAccountPwdLogin();
+			}).catch(errors => {
+				uni.$u.toast('校验失败,请认真填写')
+			})
+		},
+		// 去绑定微信
+		gotoBindWechat(){
+			this.show = false;
+			uni.$u.route({
+				url: '/pages/setting/setting-wechat',
+				params: {
+					name: 'lisa'
+				}
+			})
+		},
+		// 账号密码找回登录
+		wechatRetrieveAccountPwdLogin(){
+			let that = this;
+			// 根据手机和密码找回账号,成功自动登录
+			wechatRetrieveAccountPwdLogin(null,{data:this.userInfo}).then((res)=>{
+				if(!this.$isDataEmpty(res.access_token)){
+					let loginState = {
+						status: 1,
+						accessToken: ""
+					}
+					// 数据获取token
+					loginState.accessToken = res.access_token;
+					that.$store.commit('updateLoginState', loginState);
+					that.$store.commit('updateLoginUserInfo', res.userInfo)
+
+					that.show = true;
+
+				} else {
+					uni.showToast({
+						title: "操作失败"
+					})
+				}
+			}).catch(() =>{
+				uni.showToast({
+					title: "操作失败"
+				})
+			});
+		},
+		open() {
+
+		},
+		close() {
+
+		}
+	}
+}
+</script>
+<style lang="scss">
+page,body{
+	background: #fff;
+}
+.container{
+	background: #fff;
+	height: 300px;
+	.login-wrap {
+		display: flex;
+		justify-content: center;
+		.login-form{
+			width: 90%;
+		}
+		.account{
+			display: flex;
+		}
+		.identifying-code{
+		}
+	}
+	.op-btn-wrap{
+		margin-top: 30px;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.h-btn{
+			text-align: center;
+			width: 343px;
+			height: 42px;
+			background: #FFE05C;
+			border-radius: 27px;
+			line-height: 42px;
+		}
+	}
+}
+
+.h-popo-content{
+	height: 160px;
+	padding: 12px;
+	width: 300px;
+	text-align: center;
+	font-size: 14px;
+	font-family: PingFangSC-Semibold, PingFang SC;
+	.h-img{
+		display: flex;
+		justify-content: center;
+	}
+	.h-text{
+		margin-top: 12px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.text{
+		margin-top: 6px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.h-btn-wrap{
+		display: flex;
+		justify-content: space-between;
+		color: #333333;
+		text-align: center;
+		margin-top: 14px;
+		.h-left-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #EEEEEE;
+			width: 100px;
+			text-align: center;
+			border-radius: 16px;
+			margin: 0 auto;
+		}
+		.h-right-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #FFE05C;
+			width: 100px;
+			border-radius: 16px;
+			margin: 0 auto;
+
+		}
+	}
+}
+</style>

+ 209 - 0
loginPages/login/retrieve-account-phone.vue

@@ -0,0 +1,209 @@
+<template>
+  <view class="container">
+    <view class="login-wrap">
+		<view class="login-form">
+			<u--form
+				labelPosition="left"
+				:model="userInfo"
+				:rules="rules"
+				ref="form1"
+			>
+				<u-form-item
+					label="手机号"
+					prop="phonenumber"
+					borderBottom
+					labelWidth="auto"
+					labelAlign="right"
+				  >
+				<u--input
+					v-model="userInfo.phonenumber"
+					placeholder="请输入账号绑定的手机号"
+					border="bottom"
+					type="number"
+					maxlength="11"
+				></u--input>
+			  </u-form-item>
+		  </u--form>
+		</view>
+	</view>
+	<view @click="gotoRetrieveMethod()" class="op-btn-wrap">
+		<view class="h-btn">
+			<text>下一步</text>
+		</view>
+	</view>
+
+	<!-- 密码正确 -->
+	<u-popup :show="show" :round="10"  mode="center" >
+	  <view class="h-popo-content">
+		   <view class="h-img">
+			   <u-icon name="/static/login/u01.png" color="red" size="50"></u-icon>
+		   </view>
+		   <view class="text">
+			   <text>找回失败</text>
+		   </view>
+		   <view class="text">
+			   <text>未查询到该手机号绑定的账号</text>
+		   </view>
+		   <view class="h-btn-wrap">
+			   <view @click="sureClose" class="h-right-btn">
+			   		<text>确定</text>
+			   </view>
+		   </view>
+	  </view>
+	</u-popup>
+
+  </view>
+</template>
+ <script>
+export default {
+	data() {
+		return {
+			show: false,
+			userInfo: {
+				phonenumber: ''
+			},
+			rules: {
+				phonenumber:{
+					required: true,
+					min: 10,
+					max: 12,
+					message: '请输入11位电话号码',
+					trigger: ['blur', 'change'],
+				},
+			},
+		}
+	},
+	onLoad() {
+
+	},
+	onReady() {
+		this.$refs.form1.setRules(this.rules)
+	},
+	methods: {
+
+		// 去选择找回方式
+		gotoRetrieveMethod(){
+			let that = this;
+			this.$refs.form1.validate().then(res => {
+				that.phoneIsExist();
+			}).catch(errors => {
+				uni.$u.toast('校验失败,请认真填写')
+			})
+		},
+		sureClose(){
+			this.show = false;
+			uni.$u.route({
+				url: '/pages/login/login',
+				params: {
+					name: 'lisa'
+				}
+			})
+		},
+		// 验证电话号码是否存在
+		phoneIsExist(){
+			let that = this;
+			// 验证电话号码是否存在
+			phoneIsExist(null,{data:this.userInfo}).then((res)=>{
+				console.log(res)
+				if(res.phoneIsExist){ // 存在
+					uni.$u.route({
+						url: '/pages/login/retrieve-method',
+						params: {
+							data: that.userInfo.phonenumber
+						}
+					})
+				} else {
+					that.show = true;
+				}
+			}).catch(() =>{
+				uni.showToast({
+					title: "操作失败"
+				})
+			});
+		},
+	}
+}
+</script>
+<style lang="scss">
+page,body{
+	background: #fff;
+}
+.container{
+	background: #fff;
+	height: 300px;
+	.login-wrap {
+		display: flex;
+		justify-content: center;
+		.login-form{
+			width: 90%;
+		}
+		.account{
+			display: flex;
+		}
+		.identifying-code{
+		}
+	}
+	.op-btn-wrap{
+		margin-top: 30px;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.h-btn{
+			text-align: center;
+			width: 343px;
+			height: 42px;
+			background: #FFE05C;
+			border-radius: 27px;
+			line-height: 42px;
+		}
+	}
+}
+
+.h-popo-content{
+	height: 170px;
+	padding: 12px;
+	width: 300px;
+	text-align: center;
+	font-size: 14px;
+	font-family: PingFangSC-Semibold, PingFang SC;
+	.h-img{
+		display: flex;
+		justify-content: center;
+	}
+	.h-text{
+		margin-top: 12px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.text{
+		margin-top: 6px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.h-btn-wrap{
+		display: flex;
+		justify-content: space-between;
+		color: #333333;
+		text-align: center;
+		margin-top: 14px;
+		.h-left-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #EEEEEE;
+			width: 100px;
+			text-align: center;
+			border-radius: 16px;
+			margin: 0 auto;
+		}
+		.h-right-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #FFE05C;
+			width: 100px;
+			border-radius: 16px;
+			margin: 0 auto;
+
+		}
+	}
+}
+</style>

+ 317 - 0
loginPages/login/retrieve-account.vue

@@ -0,0 +1,317 @@
+<template>
+  <view class="container">
+    <view class="login-wrap">
+		<view class="login-form">
+			<u--form
+				labelPosition="left"
+				:model="userInfo"
+				:rules="rules"
+				ref="form1"
+			>
+				<u-form-item
+					label="手机号"
+					prop="phonenumber"
+					labelWidth="auto"
+					labelAlign="right"
+				  >
+				<u--input
+					v-model="userInfo.phonenumber"
+					placeholder="请输入手机号"
+					border="bottom"
+					type="number"
+					maxlength="11"
+				></u--input>
+			  </u-form-item>
+			  <u-form-item
+					labelWidth="auto"
+					labelAlign="right"
+					label="验证码"
+					prop="smsCode"
+					width="120"
+
+				>
+				<u--input
+					v-model="userInfo.smsCode"
+					disabledColor="#ffffff"
+					placeholder="请输入验证码"
+					border="bottom"
+					maxlength="6"
+				></u--input>
+				<template #right>
+					<view class="identifying-code">
+						<u-code
+							ref="uCode2"
+							@change="codeChange2"
+							keep-running
+							start-text="获取验证码"
+						></u-code>
+						<text
+							@tap="getCode2"
+							:text="tips2"
+							class="u-page__code-text"
+						>{{tips2}}</text>
+					</view>
+				</template>
+
+			  </u-form-item>
+			</u--form>
+		</view>
+	</view>
+	<view @click="gotoBindAccountPassword()" class="op-btn-wrap">
+		<view class="h-btn">
+			<text>下一步</text>
+		</view>
+	</view>
+
+	<!-- 密码正确 -->
+	<u-popup :show="errShow" :round="10"  mode="center"  @close="close" @open="open">
+	  <view class="h-popo-content">
+		   <view class="h-img">
+			   <u-icon name="/static/login/u01.png" color="red" size="50"></u-icon>
+		   </view>
+		   <view class="h-text">
+			   <text>系统已检测到该手机号已绑定过账号</text>
+		   </view>
+		   <view class="h-text">
+		   		<text>请选择</text>
+		   </view>
+		   <view class="h-btn-wrap">
+			   <view @click="createNewAccount()" class="h-left-btn">
+			   	    <text>创建新账号</text>
+			   </view>
+			   <view @click="loginOldAccount()" class="h-right-btn">
+				   <text>登录老账号</text>
+			   </view>
+		   </view>
+	  </view>
+	</u-popup>
+
+  </view>
+</template>
+ <script>
+
+export default {
+	data() {
+		return {
+			errShow: false,
+			userInfo: {
+				phonenumber: '',
+				smsCode: '',
+				openId: '',
+				password: "",
+				transactionPassword: "",
+				reference: ""
+			},
+			tips2: '',
+			rules: {
+				phonenumber:  [
+					{
+						required: true,
+						min: 10,
+						max: 12,
+						message: '请输入11位电话号码',
+						trigger: ['blur', 'change'],
+					},
+					{
+						// 此为同步验证,可以直接返回true或者false,如果是异步验证,稍微不同,见下方说明
+						validator: (rule, value, callback) => {
+							// 调用uView自带的js验证规则,详见:https://www.uviewui.com/js/test.html
+							return !this.$isDataEmpty(value);
+						},
+						message: "请认真填写电话号码",
+						trigger: ['blur', 'change'],
+					}
+				],
+				smsCode: {
+					required: true,
+					min: 4,
+					max: 6,
+					message: '请输入6位验证码',
+					trigger: ['blur', 'change'],
+				},
+			},
+		}
+	},
+	onLoad(option) {
+		// 判断Openid是否为空
+		if(!this.$isDataEmpty(option.openId)){
+			this.userInfo.openId = option.openId;
+			console.log(option)
+		}
+	},
+	onReady() {
+		this.$refs.form1.setRules(this.rules)
+	},
+	methods: {
+		// 创建新账号
+		createNewAccount(){
+			this.errShow = false;
+			uni.$u.route({
+				url: '/pages/login/login-real-name-auth',
+				params: {
+					data: JSON.stringify(this.userInfo)
+				}
+			})
+		},
+		// 登录老账号
+		loginOldAccount(){
+			this.errShow = false;
+			uni.$u.route({
+				url: '/pages/login/account-password',
+				params: {
+					data: JSON.stringify(this.userInfo)
+				}
+			})
+		},
+		// 验证电话号码是否存在
+		validateSmsCode(){
+			let that = this;
+			// 验证电话号码是否存在
+			validateSmsCode(null,{data:this.userInfo}).then((res)=>{
+				console.log(res)
+				if(res.phoneIsExist){ // 正确
+					that.errShow = true;
+				} else {
+					uni.$u.route({
+						url: '/pages/login/retrieve-account-phone',
+						params: {
+							data: JSON.stringify(that.userInfo)
+						}
+					})
+				}
+			}).catch(() =>{
+				uni.showToast({
+					title: "操作失败"
+				})
+			});
+
+
+		},
+		// 去绑定账号密码页面
+		gotoBindAccountPassword(){
+			let that = this;
+			this.$refs.form1.validate().then(res => {
+				that.validateSmsCode();
+			}).catch(errors => {
+				uni.$u.toast('校验失败,请认真填写')
+			})
+		},
+		codeChange2(text) {
+			this.tips2 = text;
+		},
+		getCode2() {
+			let that = this;
+			if (this.$refs.uCode2.canGetCode) {
+				that.getSmsCode();
+			} else {
+				uni.$u.toast('倒计时结束后再发送');
+			}
+		},
+		// 获取手机验证码
+		getSmsCode(){
+			let that = this;
+			// 模拟向后端请求验证码
+			uni.showLoading({
+				title: '正在获取验证码'
+			})
+			getSmsCode({data:{phonenumber:this.userInfo.phonenumber,auth: true}}).then((res)=>{
+				uni.hideLoading();
+				// 这里此提示会被this.start()方法中的提示覆盖
+				uni.$u.toast('验证码已发送');
+				// 通知验证码组件内部开始倒计时
+				that.$refs.uCode2.start();
+			}).catch(() =>{
+				uni.showToast({
+					title: "操作失败"
+				})
+			});
+		},
+		open(){},
+		close() {}
+	}
+}
+</script>
+<style lang="scss">
+page,body{
+	background: #fff;
+}
+
+.h-popo-content{
+	height: 190px;
+	padding: 12px;
+	width: 300px;
+	text-align: center;
+	font-size: 14px;
+	font-family: PingFangSC-Semibold, PingFang SC;
+	.h-img{
+		display: flex;
+		justify-content: center;
+	}
+	.h-text{
+		margin-top: 12px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.text{
+		margin-top: 6px;
+		font-weight: 400;
+		color: #666666;
+	}
+	.h-btn-wrap{
+		display: flex;
+		justify-content: space-between;
+		color: #333333;
+		text-align: center;
+		margin-top: 14px;
+		.h-left-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #EEEEEE;
+			width: 100px;
+			text-align: center;
+			border-radius: 16px;
+			margin: 0 auto;
+		}
+		.h-right-btn{
+			height: 32px;
+			line-height: 30px;
+			background: #FFE05C;
+			width: 100px;
+			border-radius: 16px;
+			margin: 0 auto;
+
+		}
+	}
+}
+
+.container{
+	background: #fff;
+	height: 300px;
+	.login-wrap {
+		display: flex;
+		justify-content: center;
+		.login-form{
+			width: 90%;
+		}
+		.account{
+			display: flex;
+		}
+		.identifying-code{
+		}
+	}
+	.op-btn-wrap{
+		margin-top: 30px;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.h-btn{
+			text-align: center;
+			width: 343px;
+			height: 42px;
+			background: #FFE05C;
+			border-radius: 27px;
+			line-height: 42px;
+		}
+	}
+}
+</style>

+ 60 - 0
loginPages/login/retrieve-method.vue

@@ -0,0 +1,60 @@
+<template>
+<view class="container">
+	<view @click="gotoAccountPassword()" class="h-method">
+		<view class="h-img">
+			<u-icon name="lock-fill" color="#333" size="30"></u-icon>
+		</view>
+		<view class="h-name">
+			<text>通过账号密码找回</text>
+		</view>
+	</view>
+</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			userInfo: {
+				telphone: '',
+				code: '',
+			},
+			tips2: '',
+		}
+	},
+	onLoad(option) {
+		// 判断Openid是否为空
+		if(!this.$isDataEmpty(option)){
+			this.userInfo.telphone = option.data;
+		}
+	},
+	onReady() {
+	},
+	methods: {
+		// 去找回账号页面
+		gotoAccountPassword(){
+			let that = this;
+			uni.$u.route({
+				url: '/pages/login/retrieve-account-password',
+				params: {
+					data: that.userInfo.telphone
+				}
+			})
+		},
+	}
+}
+</script>
+
+<style lang="scss" scoped>
+page,body{
+	background: #fff;
+}
+.container{
+}
+.h-method{
+	height: 70vh;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+}
+</style>

+ 3 - 0
main.js

@@ -3,6 +3,8 @@ import App from './App'
 import Vue from 'vue'
 import './uni.promisify.adaptor'
 import api from './common/js/api'
+// 通用方法
+// import commonUtils from "./common/js/commonUtils.js"
 
 import uView from "uview-ui";
 const baseUrl = 'https://jje.admin.xinyuekj.com.cn/';
@@ -14,6 +16,7 @@ App.mpType = 'app'
 const app = new Vue({
   ...App
 })
+// app.config.globalProperties.$getImgUrlByOssId = commonUtils.getImgUrlByOssId;
 app.$mount()
 
 

+ 1 - 1
myPages/recharge/index.vue

@@ -94,7 +94,7 @@
 						<text>使用说明</text>
 					</view>
 					<view class="h-content">
-						
+
 					</view>
 				</view>
 			</view>

+ 0 - 0
orderDetail/index.rpx.css


+ 0 - 26
orderDetail/index.vue

@@ -1,26 +0,0 @@
-<template>
-	<view class="content">
-		订单详情
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				title: 'Hello'
-			}
-		},
-		onLoad() {
-
-		},
-		methods: {
-
-		}
-	}
-</script>
-
-<style>
-	@import '/common/css/common.css';
-	@import './index.rpx.css';
-</style>

+ 71 - 13
pages.json

@@ -13,7 +13,7 @@
 		{
 			"path": "pages/index/index",
 			"style": {
-				"navigationBarTitleText": "首页"
+				"navigationBarTitleText": ""
 			}
 		},
 		{
@@ -40,35 +40,94 @@
 				"navigationBarTitleText": "我的"
 			}
 		}
+
 	],
+
 	"subPackages": [
+		{
+			"root": "loginPages",
+			"pages": [{
+				"path": "login/bind-account",
+				"style": {
+					"navigationBarTitleText": "账号绑定",
+					"enablePullDownRefresh": false
+				}
+			}, {
+				"path": "login/bind-account-password",
+				"style": {
+					"navigationBarTitleText": "绑定账号密码",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "login/bind-transaction-password",
+				"style": {
+					"navigationBarTitleText": "绑定账号支付密码",
+					"enablePullDownRefresh": false
+				}
+
+			}
+			, {
+					"path": "login/login-old-account",
+					"style": {
+						"navigationBarTitleText": "输入账号密码",
+						"enablePullDownRefresh": false
+					}
+
+				}, {
+					"path": "login/login-real-name-auth",
+					"style": {
+						"navigationBarTitleText": "实名认证",
+						"enablePullDownRefresh": false
+					}
+
+				}, {
+					"path": "login/retrieve-account",
+					"style": {
+						"navigationBarTitleText": "账号密码找回",
+						"enablePullDownRefresh": false
+					}
+
+				}
+			, {
+					"path": "login/retrieve-account-password",
 		{
 			"root": "myPages",
 			"pages": [
 				{
 					"path": "recharge/index",
 					"style": {
-						"navigationBarTitleText": "储值服务",
+						"navigationBarTitleText": "账号密码找回",
 						"enablePullDownRefresh": false
 					}
-				},
-				{
-					"path": "coupon/index",
+
+				}	, {
+					"path": "login/retrieve-account-phone",
 					"style": {
-						"navigationBarTitleText": "优惠券",
+						"navigationBarTitleText": "账号找回",
 						"enablePullDownRefresh": false
 					}
+
+				}
+			, {
+					"path": "login/retrieve-method",
+					"style": {
+						"navigationBarTitleText": "账号找回方式",
+						"enablePullDownRefresh": false
+					}
+
 				}
 			]
 		},
 		{
-			"root": "loginPages",
+			"root": "otherPages",
 			"pages": [
 				{
-					"path": "bindAccount/index",
+					"path": "order/index",
 					"style": {
-						"navigationBarTitleText": "绑定手机号",
-						"enablePullDownRefresh": false
+						"navigationBarTitleText": "订单",
+						"enablePullDownRefresh": false,
+						"navigationStyle": "custom"
 					}
 				}
 			]
@@ -92,8 +151,7 @@
 		"selectedColor": "#B22338",
 		"borderStyle": "white",
 		"backgroundColor": "#ffffff",
-		"list": [
-			{
+		"list": [{
 				"pagePath": "pages/index/index"
 			},
 			{
@@ -118,4 +176,4 @@
 		"titleNView": false
 	},
 	"uniIdRouter": {}
-}
+}

+ 862 - 12
pages/index/index.vue

@@ -1,39 +1,889 @@
 <template>
-	<view class="content">
-		首页
+	<view class="content-wrap bg-color">
+
+
+		<view class="head-wrap ">
+			<view class="content-info ">
+
+				<view class="h-bg">
+					<!-- 轮播图 -->
+					<u-swiper
+							:list="bannerList"
+							:height="340"
+					></u-swiper>
+				</view>
+				<view class="content">
+
+					<!--  通知栏 -->
+					<view v-if="noticeList.length > 0" class="h-notice-bar">
+						<scroll-notice  :dataList="noticeList" :type="2" :interval="3000" :height="46" :fontSize="12" color="#666666" @click="handleNoticeClick"></scroll-notice>
+					</view>
+
+					<!-- 个人信息、钱包、商店 -->
+					<view class="h-content-wrap">
+						<!-- 欢迎语 -->
+						<view class="welcome-wrap">
+							<view class="logo">
+								<image v-if="userInfo.selfPhotoUrl" :src="userInfo.selfPhotoUrl" mode=""></image>
+								<image v-else src="../../static/logo.png" mode=""></image>
+							</view>
+							<view class="text">
+								<view class="phone">{{userInfo.cellPhone}}</view>
+								<view class="welcome">尊敬的{{userInfo.ncikName}},下午好~</view>
+							</view>
+							<view @click="gotoReceiveCoupons()" class="arrow-right">
+								<!-- <image v-if="userInfo.wxQrCode" class="qrcode" :src="userInfo.qrcode" mode=""></image> -->
+								<!-- <image class="qrcode" src="../../static/index/qrcode.png" mode=""></image>
+								<view class="h-text">会员码</view> -->
+								<view class="coupon-wrap">
+									<u-icon name="coupon-fill" color="#ffb83d" size="22"></u-icon>
+									<text>领券中心</text>
+								</view>
+							</view>
+						</view>
+
+						<!-- 余额信息 -->
+						<view class="balance-info">
+							<view @click="gotoRechargeService()" class="balance-amount">
+								<text class="number" v-if="userInfo.balance" >¥{{userInfo.balance}}</text>
+								<text class="number" v-else>¥0.00</text>
+								<view class="">余额 </view>
+							</view>
+							<view @click="gotoIntgral()" class="score-info">
+								<text class="number"  v-if="userInfo.integral" >{{userInfo.integral}}</text>
+								<text class="number"  v-else>0</text>
+								<view class="">积分 </view>
+							</view>
+							<view @click="gotoCoupon()" class="coupon-info">
+								<text class="number" v-if="userInfo.coupon">{{userInfo.coupon}}</text>
+								<text class="number" v-else>0</text>
+								<view class="">优惠券 </view>
+
+							</view>
+							<view class="e-currency-info">
+								<text class="number" v-if="userInfo.electronicCurrency">{{userInfo.electronicCurrency}}</text>
+								<text class="number" v-else>0</text>
+								<view class="">电子币</view>
+							</view>
+						</view>
+
+						<view class="custom-line"></view>
+
+						<view class="store-wrap">
+							<view class="store-info">
+								<view class="logo">
+									<image src="../../static/index/u55.png" mode=""></image>
+								</view>
+								<view @click="gotoStoreChoose()" class="store-content">
+									<view class="h-row">
+										<view class="store-desc">
+											<view class="store-name">
+												<view class="">{{storeInfo.storeName}}</view>
+											</view>
+										</view>
+										<view class="arrow-right">
+											<view  class="change-store">更换门店</view>
+											<u-icon name="arrow-right" color="#333" size="16"></u-icon>
+										</view>
+									</view>
+									<view class="h-row">
+										<text class="address">地址:{{storeInfo.address}}</text>
+										<!-- <text class="address">距你1.8km</text> -->
+									</view>
+								</view>
+							</view>
+
+						</view>
+					</view>
+
+					<!-- 上次订单 -->
+					<view class="nav-wrap ">
+
+						<view class="upper-order-wrap">
+							<!-- 左边内容 -->
+							<view @click="gotoServiceOrder()" class="left-content">
+								<view class="title">
+									服务点单
+								</view>
+								<view class="desc">
+									多种服务模式任您选择
+								</view>
+								<view class="bg-img">
+									<image src="../../static/index/u65.png" mode=""></image>
+								</view>
+							</view>
+							<view class="dashed-line"></view>
+							<!-- 右边内容 -->
+							<view class="right-content">
+								<view class="title">
+									产品点单
+								</view>
+								<view class="desc">
+									拼命研发中敬请期待...
+								</view>
+								<view class="bg-img">
+									<image src="../../static/index/u67.png" mode=""></image>
+								</view>
+							</view>
+						</view>
+
+						<!-- 导航菜单 -->
+						<view class="horizontal-dashed-line"></view>
+						<view class="menu-tab">
+							<view class="button-wrap">
+								<view @click="gotoComeOrder()" class="btn">
+									<view class="icon">
+										<u-icon name="/static/index/u213.png" color="red" size="30"></u-icon>
+									</view>
+									<view class="name">
+										再来一单
+									</view>
+								</view>
+							</view>
+							<view class="button-wrap">
+								<view @click="gotoRechargeService()" class="btn">
+									<view class="icon">
+										<u-icon name="/static/index/u215.png" color="red" size="30"></u-icon>
+									</view>
+									<view class="name">
+										储值服务
+									</view>
+								</view>
+							</view>
+							<view class="button-wrap">
+								<view @click="gotoOrder()" class="btn">
+									<view class="icon">
+										<u-icon name="/static/index/u217.png" color="red" size="30"></u-icon>
+									</view>
+									<view class="name">
+										当前订单
+									</view>
+								</view>
+							</view>
+							<view class="button-wrap">
+								<view @click="gotoReceiveCoupons()" class="btn">
+									<view class="icon">
+										<u-icon name="/static/index/u247.png" color="red" size="30"></u-icon>
+									</view>
+									<view class="name">
+										领优惠券
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+
+					<!-- 为你推荐 -->
+					<view class="recommend-wrap">
+						<view class="recommend-nav">
+							<view class="icon">
+								<image src="/static/index/u87.png" mode=""></image>
+							</view>
+							<view class="title">
+								为你推荐
+							</view>
+						</view>
+						<!-- 分割线 -->
+						<view class="custom-line"></view>
+						<!-- 门店列表 -->
+						<view class="store-wrap ">
+							<view class="store-list" v-for="item in 1">
+								<view class="store-content">
+									<view class="store-img">
+										<image src="../../static/logo.png" mode=""></image>
+									</view>
+									<view class="h-store-content">
+										<view class="title">
+											<text>{{storeInfo.storeName}}</text>
+										</view>
+										<view class="adress">
+											地址:{{storeInfo.address}}
+										</view>
+										<!-- <view class="price">
+											标准价格:<span class="red">¥200</span>
+										</view> -->
+										<view class="desc">
+											<view class="price">
+												<!-- 人均消费¥35起 -->
+											</view>
+											<view @click="gotoGoods()" class="order-btn">
+												<view class="btn">去下单</view>
+											</view>
+										</view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+					<view class="footer ">
+						<view class="">---到底了---</view>
+					</view>
+				</view>
+			</view>
+		</view>
 
-		<view class="tabBarLineHeight"></view>
 		<view class="tabBarView">
 			<tab-bar :tabIndex="tabIndex"></tab-bar>
 		</view>
 	</view>
+
 </template>
 
 <script>
 	import tabBar from "../../components/tabBar/tabBar";
+	import ScrollNotice  from '../../components/scroll-notice/ScrollNotice.vue';
 	export default {
-		components:{
-			tabBar
+		components: {
+			ScrollNotice,tabBar
 		},
 		data() {
 			return {
-				title: 'Hello',
-				tabIndex:0
+				noticeList: [],
+				notice: '',
+				userInfo: {},
+				bannerList: [],
+				reqParm: {
+					auth: true,
+					appid: 46,
+					telphone: '',
+					longitude: 0,
+					latitude: 0
+				},
+				storeList: [],
+				storeInfo: {}
+			};
+		},
+		mounted() {
+			// 获取经纬度信息
+			this.getLocation();
+
+			//公告信息
+			this.getNoticeListData();
+
+			// 获取banner图列表
+			this.getSlideshowList();
+
+			// 用户信息
+			this.userInfo = uni.getStorageSync('userInfo');
+			this.getImgUrlByOssId(this.userInfo.selfPhoto);
+
+			// 查询门店信息
+			const data = uni.getStorageSync('storeInfo');
+			if(!data){
+				// 获取门店列表数据
+				console.log('+++++++++++++++++++++++++++++++++',this.userInfo)
+				this.getStoreListData();
+			} else {
+				this.storeInfo = data;
 			}
+
 		},
-		onLoad() {
+		onLoad(){
 			uni.hideTabBar({
 				animation:false
 			})
 
+
 		},
+		// 分享到朋友圈
+		onShareTimeline() {},
+		// 分享到用户
+		onShareAppMessage(OBJECT) {},
 		methods: {
+			// 去服务点单页面
+			gotoServiceOrder(){
+				uni.$u.route({
+					url: '/pages/index/tabbar',
+					params: {
+						PageCur: 'goods'
+					},
+					method: 'reLaunch'
+				})
+			},
+			//点击通知
+			handleNoticeClick(e) {
+				console.log(e)
+				uni.$u.route({
+					url: '/pages/notice/notice-detail',
+					params: {
+						noticeId: e.noticeId
+					}
+				})
+			},
+			// 去优惠劵大厅
+			gotoReceiveCoupons(){
+				uni.$u.route({
+					url: '/pages/coupon/receive-coupons',
+					params: {}
+				})
+			},
+			// 去我的优惠劵页面
+			gotoCoupon(){
+				uni.$u.route({
+					url: '/pages/coupon/coupon',
+					params: {
+						name: 'lisa'
+					}
+				})
+			},
+			// 储值服务
+			gotoRechargeService(){
+				uni.$u.route({
+					url: '/pages/transaction/recharge-service',
+					params: {
+						name: 'lisa'
+					}
+				})
+			},
+			// 获取banner图片
+			getSlideshowList(){
+				let that = this;
+				this.$api.getSlideshowList({data:this.reqParm}).then((res)=>{
+					this.getImgUrlByBannerOssId(res.data.data);
+				}).catch(() =>{
+					uni.showToast({
+						title: "操作失败"
+					})
+				})
+			},
+			async getImgUrlByBannerOssId(items){
+				for(let i = 0; i <items.length; i++) {
+					this.$api.getImgUrlByOssId({ossId:items[i].slideshowId}).then(res=>{
+						this.bannerList.push(res.data.data[0].url.replace(/^http:/, "https:"))
+					})
+
+				}
+			},
+			// 获取门店列表数据
+			getStoreListData(){
+				let that = this;
+				// 用户绑定门店
+				this.$api.storeList(this.reqParm).then((res)=>{
+					console.log(res.data.data[0])
+						that.storeInfo = res.data.data[0]
+						// 更新用户选择的门店信息
+						uni.setStorageSync('storeInfo',res.data.data[0])
+				}).catch(() =>{
+					uni.showToast({
+						title: "操作失败"
+					})
+				})
+			},
+			// 积分详细页面
+			gotoIntgral(){
+				uni.$u.route({
+					url: '/pages/integral/integral',
+					params: {
+						name: 'lisa'
+					}
+				})
+			},
+			getNoticeListData(){
+				let req = {
+					auth: true,
+					noticeType:2
+				}
+				this.$api.noticeList({data:req}).then((res)=>{
+					if (res.data.rows.length === 1){
+						this.noticeList.push(res.data.rows[0])
+						this.noticeList.push(res.data.rows[0])
+					}else{
+						this.noticeList = res.data.rows;
+					}
+				}).catch(() =>{
+					uni.showToast({
+						title: "操作失败"
+					})
+				})
+			},
+
+			 getImgUrlByOssId(ossId){
+				if (ossId){
+					this.$api.getImgUrlByOssId(ossId).then(res=>{
+						console.log('++++++++用户头像+++++++++++++++',res)
+					})
+					this.userInfo.selfPhotoUrl = url;
+					return url;
+				}
+
+			},
+			// 获取经纬度信息
+			getLocation(){
+
+				uni.getLocation({
+					type: 'gcj02',
+					success: function(res) {
+						var latitude = res.latitude; // 纬度
+						var longitude = res.longitude; // 经度
+						var speed = res.speed; // 速度
+						var accuracy = res.accuracy; // 精确度
+						// 在这里可以对位置信息进行处理
+						console.log("纬度:"+latitude+";经度"+longitude)
+						this.reqParm.latitude = latitude
+						this.reqParm.longitude = longitude
+					}
+				});
+			},
+
+			// 去选择门店
+			gotoStoreChoose(){
+				uni.$u.route({
+					url: '/pages/goods/store-choose',
+					params: {
+						type: '1'
+					}
+				})
+			},
+			// 去再来一单
+			gotoComeOrder(){
+
+				uni.$u.route({
+					url: '/pages/index/tabbar',
+					params: {
+						PageCur: 'orderList',
+						status : '4'
+					}
+				})
+
+			},
+			// 储值服务
+			gotoRechargeService(){
+				uni.$u.route({
+					url: '/pages/transaction/recharge-service',
+					params: {
+						name: 'lisa'
+					}
+				})
+			},
+			// 去优惠劵页面
+			gotoCoupon(){
+				uni.$u.route({
+					url: '/pages/coupon/coupon',
+					params: {
+						name: 'lisa'
+					}
+				})
+			},
+			// 去订单页面
+			gotoOrder(){
+				uni.$u.route({
+					url: '/pages/index/tabbar',
+					params: {
+						PageCur: 'orderList'
+					}
+				})
+			},
+			// 去商品下单页面
+			gotoGoods(){
+				uni.$u.route({
+					url: '/pages/index/tabbar',
+					params: {
+						PageCur: 'goods'
+					}
+				})
+			},
+			// 去会员页面
+			gotoMember(){
+				uni.$u.route({
+					url: '/pages/index/tabbar',
+					params: {
+						PageCur: 'qrcode'
+					}
+				})
+			},
+			// 用户绑定门店
+			userBindStore(){
+				let that = this;
+				// 用户绑定门店
+				userBindStore(null,{data:this.reqParm}).then((res)=>{
+					console.log(this.reqParm)
+				}).catch(() =>{
+					uni.showToast({
+						title: "操作失败"
+					})
+				})
+			},
 
 		}
-	}
+	};
 </script>
 
-<style>
-	@import '/common/css/common.css';
-	@import './index.rpx.css';
+<style scoped lang="scss">
+
+	/* 头部内容 */
+	.head-wrap{
+		height: 1080px;
+		.content-info{
+			position: relative;
+			.h-bg{
+				height: 340px;
+			}
+			.content{
+				position: absolute;
+				top: 230px;
+				left: 12px;
+				right: 12px;
+				border-radius: 6px;
+				.h-notice-bar{
+					padding-left: 10px;
+					height: 46px;
+					background: #FFFFFF;
+					box-shadow: 0px 4px 8px 0px rgba(237,86,159,0.05);
+					border-radius: 10px;
+				}
+				.h-content-wrap{
+					background: #fff;
+					border-radius: 10px;
+					/* 欢迎语 */
+					.welcome-wrap{
+						padding-top: 12px;
+						display: flex;
+						margin-left: 12px;
+						margin-right: 12px;
+						margin-top: 16px;
+						align-items: center;
+						.logo {
+							width: 13%;
+							image{
+								border-radius: 15px;
+								width: 36px;
+								height: 36px;
+							}
+						}
+						.text{
+							width: 60%;
+							font-size: 14px;
+							.welcome-wrap{
+								font-size: 12px;
+								color: #999999 ;
+							}
+							.welcome{
+								font-size: 12px;
+								color: #999999 ;
+							}
+						}
+						.arrow-right{
+							width: 30%;
+							text-align: center;
+							cursor: pointer;
+							display: flex;
+							justify-content: center;
+							background: #fff8db;
+							// background: red;
+							height: 32px;
+							align-items: center;
+							border-radius: 16px;
+							.qrcode{
+								height: 20px;
+								width: 20px;
+							}
+							.h-text{
+								font-size: 12px;
+								color: #999999 ;
+							}
+							.coupon-wrap{
+								display: flex;
+								font-size: 14px;
+								color: #666;
+								align-items: center;
+							}
+						}
+
+					}
+
+					/* 钱包信息 */
+					.balance-info{
+						font-size: 12px;
+						padding-left: 12px;
+						margin-bottom: 16px;
+						margin-top: 12px;
+						color: #666;
+						display: flex;
+						justify-content: space-around;
+						text-align: center;
+						.balance-amount{padding-right: 4px;}
+						.score-info{padding-right: 4px;}
+						.coupon-info{padding-right: 4px;}
+						.e-currency-info{padding-right: 4px;}
+						.number{
+							color: #333333;
+							font-size: 14px;
+						}
+					}
+
+					/* 商店信息 */
+					.store-wrap{
+						margin: 10px;
+						.store-info{
+							display: flex;
+							.logo {
+								width: 10%;
+								text-align: center;
+								display: flex;
+								justify-content: center;
+								align-items: center;
+								image{
+									width: 30px;
+									height: 30px;
+								}
+							}
+							.store-content{
+								width: 90%;
+								padding-bottom: 13px;
+								.h-row{
+									display: flex;
+									align-items: center;
+									justify-content: space-between;
+									.store-desc{
+										width: 90%;
+										display: flex;
+										line-height: 30px;
+										font-size: 14px;
+										.store-name{
+										}
+
+									}
+									.arrow-right{
+										text-align: right;
+										margin: 0 auto;
+										cursor: pointer;
+										padding-top: 3px;
+										width: 100px;
+										display: flex;
+										font-size: 14px;
+										.change-store{
+											text-align: right;
+											color: #666;
+										}
+										image{
+											width: 18px;
+											height: 18px;
+										}
+									}
+									.address{
+										color: #999999;
+										font-size: 12px;
+										padding-right: 12px;
+									}
+								}
+							}
+
+						}
+						.adress{
+							font-size: 11px;
+							white-space: nowrap;
+							overflow: hidden;
+							text-overflow: ellipsis;
+							padding-left:40px;
+							color: #666;
+						}
+					}
+				}
+			}
+		}
+	}
+
+
+	/* 上次订单 */
+	.nav-wrap{
+		background: #fff;
+		border-radius: 8px;
+		margin-top: 16px;
+		.upper-order-wrap{
+			display: flex;
+			border-radius: 6px;
+			justify-content: center;
+			.left-content{
+				margin-top: 20px;
+				width: 50%;
+				font-size: 12px;
+				text-align: center;
+				border-radius: 10px;
+				.title{
+					font-size: 18px;
+					text-align: center;
+				}
+				.desc{
+					padding-top: 6px;
+					color: #999999;
+				}
+				.bg-img{
+					text-align: center;
+					height: 100px;
+					display: flex;
+					justify-content: center;
+					align-items: center;
+					image{
+						width: 78px;
+						height: 78px;
+					}
+				}
+			}
+			.right-content{
+				margin-top: 20px;
+				width: 50%;
+				font-size: 12px;
+				text-align: center;
+				.title{
+					font-size: 18px;
+					text-align: center;
+				}
+				.desc{
+					padding-top: 6px;
+					color: #999999;
+				}
+				.bg-img{
+					height: 100px;
+					text-align: center;
+					display: flex;
+					justify-content: center;
+					align-items: center;
+					image{
+						width: 78px;
+						height: 78px;
+					}
+				}
+			}
+		}
+		.menu-tab{
+			display: flex;
+			justify-content: space-around;  // 平均分布
+			justify-content: center;
+			padding-bottom: 8px;
+			.button-wrap{
+				flex: 1;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				margin-top: 16px;
+				margin-bottom: 18px;
+				.name{
+					padding-top: 3px;
+					font-size: 12px;
+					color: #666666;
+				}
+				.btn{
+					padding-left: 12px;
+					padding-right: 12px;
+					height: 36px;
+					border-radius: 18px;
+					.icon{
+						display: flex;
+						padding-right: 6px;
+						align-items: center;
+						justify-content: center;
+						image{
+							height: 14px;
+							width: 14px;
+						}
+					}
+				}
+			}
+		}
+	}
+
+
+	/* 为你推荐 */
+	.recommend-wrap{
+		margin-top: 16px;
+		background: #fff;
+		border-radius: 8px;
+		.recommend-nav{
+			display: flex;
+			margin-left: 12px;
+			padding-top: 8px;
+			padding-bottom: 4px;
+			align-items: center;
+			.icon{
+				padding-right: 4px;
+				image{
+					height: 26px;
+					width: 26px;
+				}
+			}
+			.title{
+				font-size: 16px;
+			}
+		}
+		/* 门店列表 */
+		.store-wrap{
+			margin: 12px;
+			height: 100px;
+			.store-list{
+				margin-top: 16px;
+				.store-content{
+					display: flex;
+					.store-img{
+						width: 30%;
+						image{
+							width: 100%;
+							height: 78px;
+							border-radius: 6px;
+						}
+					}
+					.h-store-content{
+						width: 70%;
+						padding-left: 8px;
+						padding-top: 4px;
+						.title{
+							font-size: 18px;
+							font-family: "黑体", sans-serif;
+						}
+						.adress{
+							font-size: 14px;
+							color: #666;
+						}
+						.price{
+							color: #666;
+							width: 60%;
+							font-size: 14px;
+							line-height: 22px;
+							.red{
+								color: red;
+								font-size: 16px;
+							}
+						}
+						.desc{
+							display: flex;
+							padding-top: 3px;
+							.price{
+								width: 60%;
+								font-size: 14px;
+								line-height: 22px;
+							}
+							.order-btn{
+								width: 100%;
+								.btn{
+									background: #FFE05C;
+									text-align: center;
+									border-radius: 14px;
+									height: 26px;
+									line-height: 26px;
+									color: #333;
+									font-size: 12px;
+								}
+							}
+						}
+					}
+				}
+
+			}
+		}
+	}
+
+	/* 底部 */
+	.footer{
+		margin-top: 30px;
+		height: 60px;
+		font-size: 12px;
+		text-align: center;
+		color: #666;
+		margin-bottom: 40px;
+	}
+
+	.tabBarView{
+		position: fixed;
+		bottom: 0;
+	}
+
 </style>

+ 2 - 5
pages/login/login.vue

@@ -62,11 +62,8 @@
 							uni.setStorageSync('phoneIsBind',res.data.data.phoneIsBind)
 
 							if (res.data.data.phoneIsBind){
-								// uni.switchTab({
-								// 	url: '/pages/index/index',
-								// })
-								uni.navigateTo({
-									url: '/loginPages/bindAccount/index',
+								uni.switchTab({
+									url: '/pages/index/index',
 								})
 							}else {
 								uni.navigateTo({

+ 1 - 2
pages/my/index.vue

@@ -262,7 +262,6 @@
 
 <script >
 import tabBar from "../../components/tabBar/tabBar";
-import { saveWechatUser } from '../../api/login/login';
 export default {
 	components: {
 		tabBar
@@ -372,7 +371,7 @@ export default {
 		gotoRechargeService() {
 			uni.navigateTo({
 				url: '/myPages/recharge/index'
-				
+
 			})
 		},
 		// 去实名认证

+ 4 - 0
pages/qrCode/index.rpx.css

@@ -35,6 +35,9 @@
     font-size: 40rpx;
     font-weight: 600;
 }
+.qrcode{
+    margin-top: 20rpx;
+}
 .qrcodeImage{
     width: 480rpx;
     height: 480rpx;
@@ -42,4 +45,5 @@
 .qrcode-desc{
     font-size: 28rpx;
     padding-bottom: 25rpx;
+    margin-top: 20rpx;
 }

+ 27 - 21
pages/qrCode/index.vue

@@ -4,20 +4,20 @@
 		<view class="content" :style="{'height':height}">
 			<view class="outView flex-col">
 				<view class="member-head-img flex-row justify-center">
-					<image class="imageLogo" v-if="userInfo.selfPhotoUrl" :src="userInfo.selfPhotoUrl" mode=""></image> <!-- 用户头像 -->
+					<image class="imageLogo" v-if="selfPhotoUrl" :src="selfPhotoUrl" mode=""></image> <!-- 用户头像 -->
 					<image class="imageLogo" v-else src="../../static/logo.png" mode=""></image> <!-- 用户头像 -->
 				</view>
 				<view class="member-content flex-col">
 					<view class="user-name flex-row justify-center">
 						<text>hi.亲爱的{{userInfo.ncikName}}</text>
 					</view> <!-- 用户名 -->
-					<view @click="perfectUserInfo()"  class="flex-row justify-center">
-						<text>你前资料尚不完善,</text>
-						<text>立即完善</text>
-					</view>
+<!--					<view @click="perfectUserInfo()"  class="flex-row justify-center">-->
+<!--						<text>你前资料尚不完善,</text>-->
+<!--						<text>立即完善</text>-->
+<!--					</view>-->
 					<view class="qrcode flex-row justify-center">
-						<image class="qrcodeImage bord" v-if="userInfo.qrCodeImg" :src="userInfo.qrCodeImg" mode=""></image> <!-- 二维码图片 -->
-						<image class="qrcodeImage bord" v-else src="../../static/index/u41.png" mode=""></image> <!-- 二维码图片 -->
+						<image class="qrcodeImage" v-if="qrCodeImg" :src="qrCodeImg" mode=""></image> <!-- 二维码图片 -->
+						<image class="qrcodeImage" v-else src="../../static/index/u41.png" mode=""></image> <!-- 二维码图片 -->
 					</view>
 					<view class="qrcode-desc flex-row justify-center">
 						<text>会员码,分享邀请好友加入</text>
@@ -45,33 +45,39 @@
 			return {
 				height: '',
 				tabIndex:2,
-				userInfo:''
+				userInfo:{},
+				qrCodeImg:'',
+				selfPhotoUrl:'',
+
 			}
 		},
 		onLoad() {
+			// 用户信息
+			this.userInfo = uni.getStorageSync('userInfo');
 			let sysInfo = uni.getSystemInfoSync()
 			this.height = sysInfo.screenHeight - (sysInfo.screenWidth/750)*138 + 'px'
-		},
-
-		mounted() {
-
-			// 用户信息
-			this.userInfo = this.$store.state.loginUserInfo;
 			this.getImgUrlByOssId(this.userInfo.selfPhoto, 1)
 			this.getImgUrlByOssId(this.userInfo.wxQrCode, 2)
-
 		},
 
 		methods: {
 
 			getImgUrlByOssId(ossId, type) {
-				let url =  this.$getImgUrlByOssId(ossId);
-				if (type == 1) {
-					this.userInfo.selfPhotoUrl = url;
-				} else if (type == 2) {
-					this.userInfo.qrCodeImg = url;
+				if (ossId===null){
+					return
 				}
-				return url;
+				this.$api.getImgUrlByOssId({
+					ossId:ossId,
+					auth:true
+				}).then(res=>{
+					console.log(res)
+					if (type === 1) {
+						this.selfPhotoUrl = res.data.data[0].url.replace(/^http:/, "https:");
+					} else if (type === 2) {
+						this.qrCodeImg = res.data.data[0].url.replace(/^http:/, "https:");
+					}
+				})
+
 			},
 
 			/* 用户信息 */