|
@@ -279,11 +279,11 @@ export default {
|
|
|
|
|
|
|
|
if (e.shareUserId){
|
|
if (e.shareUserId){
|
|
|
//用户点击分享到好友或者朋友圈传递过来的参数
|
|
//用户点击分享到好友或者朋友圈传递过来的参数
|
|
|
- console.log('shareUserId===============>',e.shareUserId)
|
|
|
|
|
- setTimeout(()=>{
|
|
|
|
|
- this.userInfo = uni.getStorageSync('userInfo');
|
|
|
|
|
- this.scanCode(this.userInfo.otherId,e.shareUserId);
|
|
|
|
|
- },5000)
|
|
|
|
|
|
|
+ uni.setStorageSync('shareUserId',e.shareUserId)
|
|
|
|
|
+ }
|
|
|
|
|
+ if (e.scene){
|
|
|
|
|
+ //用户扫用户的会员吗进入小程序
|
|
|
|
|
+ uni.setStorageSync('shareUserId',e.scene)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if(e.q){
|
|
if(e.q){
|
|
@@ -296,41 +296,14 @@ export default {
|
|
|
param[b[i].split('=')[0]] = b[i].split('=')[1]
|
|
param[b[i].split('=')[0]] = b[i].split('=')[1]
|
|
|
}
|
|
}
|
|
|
if (param.expandUserId){ //从拓客端进来的用户
|
|
if (param.expandUserId){ //从拓客端进来的用户
|
|
|
- setTimeout(()=>{
|
|
|
|
|
- this.userBindMember({
|
|
|
|
|
- ...param,
|
|
|
|
|
- memberId:this.userInfo.id
|
|
|
|
|
- })
|
|
|
|
|
- },5000)
|
|
|
|
|
|
|
+ uni.setStorageSync('expandParam',param)
|
|
|
}else { //从技师端进来的用户
|
|
}else { //从技师端进来的用户
|
|
|
uni.setStorageSync('promotionParam',param)
|
|
uni.setStorageSync('promotionParam',param)
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
- console.log('param==============>',param)
|
|
|
|
|
- console.log('++++++++++param.expandUserId+++++++++++',param.expandUserId)
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- // uni.hideTabBar({
|
|
|
|
|
- // animation: false
|
|
|
|
|
- // })
|
|
|
|
|
-
|
|
|
|
|
- if (e.scene){
|
|
|
|
|
- let scene = e.scene
|
|
|
|
|
- setTimeout(()=>{
|
|
|
|
|
- this.userInfo = uni.getStorageSync('userInfo');
|
|
|
|
|
- this.scanCode(this.userInfo.otherId,scene);
|
|
|
|
|
- },5000)
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 获取经纬度信息
|
|
|
|
|
- // uni.getLocation({
|
|
|
|
|
- // success: (e) => {
|
|
|
|
|
- // console.log('++++++++++getLocation++success+++++++++++',e.longitude,e.latitude)
|
|
|
|
|
- // },
|
|
|
|
|
- // fail:(err) =>{
|
|
|
|
|
- // console.log('++++++++++getLocation++fail+++++++++++',err)
|
|
|
|
|
- // }
|
|
|
|
|
- // })
|
|
|
|
|
|
|
+ this.getLocation();
|
|
|
|
|
|
|
|
//公告信息
|
|
//公告信息
|
|
|
this.getNoticeListData();
|
|
this.getNoticeListData();
|
|
@@ -391,25 +364,6 @@ export default {
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
|
|
|
- userBindMember(param){
|
|
|
|
|
- console.log('绑定开始param=>', param)
|
|
|
|
|
- this.$api.userBindMember(param).then(res=>{
|
|
|
|
|
- console.log('用户绑定成功',res)
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- scanCode(otherId,memberId){
|
|
|
|
|
- console.log('绑定开始memberId=>'+memberId)
|
|
|
|
|
- this.$api.scanCode({
|
|
|
|
|
- openId:otherId,
|
|
|
|
|
- memberId:memberId
|
|
|
|
|
- }).then(res=>{
|
|
|
|
|
- console.log('用户绑定成功',res)
|
|
|
|
|
- console.log('绑定结束memberId=>'+memberId)
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
goQrCode(){
|
|
goQrCode(){
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
url: '/pages/qrCode/index'
|
|
url: '/pages/qrCode/index'
|
|
@@ -513,22 +467,29 @@ export default {
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
// 获取经纬度信息
|
|
// 获取经纬度信息
|
|
|
- // 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
|
|
|
|
|
- // }
|
|
|
|
|
- // });
|
|
|
|
|
- // },
|
|
|
|
|
|
|
+ getLocation() {
|
|
|
|
|
+
|
|
|
|
|
+ uni.getLocation({
|
|
|
|
|
+ type: 'gcj02',
|
|
|
|
|
+ success: function (res) {
|
|
|
|
|
+ console.log(res)
|
|
|
|
|
+ let latitude = res.latitude; // 纬度
|
|
|
|
|
+ let longitude = res.longitude; // 经度
|
|
|
|
|
+ let speed = res.speed; // 速度
|
|
|
|
|
+ let accuracy = res.accuracy; // 精确度
|
|
|
|
|
+ // 在这里可以对位置信息进行处理
|
|
|
|
|
+ console.log("纬度:" + latitude + ";经度" + longitude)
|
|
|
|
|
+ this.reqParm.latitude = latitude
|
|
|
|
|
+ this.reqParm.longitude = longitude
|
|
|
|
|
+ },
|
|
|
|
|
+ fail:function (fail) {
|
|
|
|
|
+ console.log('获取用户地址失败==》',fail)
|
|
|
|
|
+ },
|
|
|
|
|
+ complete:function () {
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
// 去选择门店
|
|
// 去选择门店
|
|
|
gotoStoreChoose() {
|
|
gotoStoreChoose() {
|