This commit is contained in:
parent
afb296cc5f
commit
80256c7069
|
@ -6,6 +6,10 @@ const ROOTPATH3 = "wss://192.168.2.222:8187/wss/websocket/";
|
|||
const ROOTPATH = "http://192.168.2.222:8187/sqx_fast";
|
||||
const ROOTPATH1 = "http://192.168.2.222:8187/sqx_fast";
|
||||
|
||||
// const ROOTPATH3 = "wss://47.75.182.93:8090/wss/websocket/";
|
||||
// const ROOTPATH = "http://47.75.182.93:8090/sqx_fast";
|
||||
// const ROOTPATH1 = "http://47.75.182.93:8090/sqx_fast";
|
||||
|
||||
|
||||
// const ROOTPATH = "http://192.168.2.13:8187/sqx_fast";
|
||||
// const ROOTPATH1 = "http://192.168.2.13:8187/sqx_fast";
|
||||
|
@ -40,7 +44,7 @@ const TX_MAP_KEY = 'VIWBZ-5OM3F-CV7JZ-NLKJY-AXSYV-TMFM6';
|
|||
//const TX_MAP_KEY = '55UBZ-STNK4-DSNUM-F4A75-Q7BC5-FRBMS';
|
||||
|
||||
//ws基础连接地址
|
||||
// const WS_BASE_PATH = 'ws://192.168.2.13:8187/sqx_fast/';
|
||||
// const WS_BASE_PATH = 'ws://47.75.182.93:8090/sqx_fast/';
|
||||
const WS_BASE_PATH = 'ws://192.168.2.222:8187/sqx_fast/';
|
||||
// const WS_BASE_PATH = 'ws://120.46.52.165/sqx_fast/';
|
||||
// const WS_BASE_PATH = 'wss://admin.sjajk.com/sqx_fast/';//生产需替换
|
||||
|
|
|
@ -21,14 +21,14 @@ module.exports = {
|
|||
// return 'https://admin.sjajk.com'//生产需替换
|
||||
// return 'http://120.46.52.165'
|
||||
return 'http://192.168.2.222:8187'
|
||||
// return 'http://192.168.2.13:8187'
|
||||
// return 'http://47.75.182.93:8090:8187'
|
||||
},
|
||||
//全局域名 部分html中需要单独替换 需要修改config中的网络请求域名
|
||||
publicYuMingApp() {
|
||||
// return 'https://wx.sjajk.com'//生产需替换
|
||||
// return 'http://120.46.52.165'
|
||||
return 'http://192.168.2.222:8187'
|
||||
// return 'http://192.168.2.13:8187'
|
||||
// return 'http://47.75.182.93:8090:8187'
|
||||
},
|
||||
logout() {
|
||||
this.remove("token");
|
||||
|
|
|
@ -186,7 +186,7 @@
|
|||
// "serviceHost" : "http://wx.sjajk.com/_AMapService"//生产需替换
|
||||
// "serviceHost" : "http://120.46.52.165/_AMapService"
|
||||
"serviceHost" : "http://192.168.2.222:8187/_AMapService"
|
||||
// "serviceHost" : "http://192.168.2.13:8187/_AMapService"
|
||||
// "serviceHost" : "http://47.75.182.93:8090/_AMapService"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -236,9 +236,10 @@
|
|||
|
||||
import * as webMap from 'utils/webMap.js';
|
||||
|
||||
import permision from "@/components/permission.js";
|
||||
// 调用手机系统权限
|
||||
// #ifdef APP-PLUS
|
||||
import permision from "@/components/permission.js";
|
||||
// import permision from "@/components/permission.js";
|
||||
// #endif
|
||||
export default {
|
||||
data() {
|
||||
|
@ -318,42 +319,247 @@
|
|||
classifyId: '',
|
||||
page:1,
|
||||
limit:10,
|
||||
arr: [],
|
||||
txAppKey: '',
|
||||
tpSel: 0,
|
||||
tpCount: 0,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
onShareAppMessage(res) { //发送给朋友
|
||||
return {
|
||||
title: this.tuiguang,
|
||||
path: '/pages/index/index?invitation=' + this.invitationCode,
|
||||
imageUrl: this.tuiguangImg,
|
||||
}
|
||||
},
|
||||
onShareTimeline(res) { //分享到朋友圈
|
||||
return {
|
||||
title: this.tuiguang,
|
||||
path: '/pages/index/index?invitation=' + this.invitationCode,
|
||||
imageUrl: this.tuiguangImg,
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
let that = this
|
||||
that.getBannerList()
|
||||
that.getHomeArtificerList()
|
||||
// that.getKTCityList();
|
||||
that.remen()
|
||||
that.getKTCityList();
|
||||
// 获取邀请码保存到本地
|
||||
if (e.invitation) {
|
||||
that.$queue.setData('inviterCode', e.invitation);
|
||||
}
|
||||
// #ifdef MP-WEIXIN
|
||||
if (e.scene) {
|
||||
const scene = decodeURIComponent(e.scene);
|
||||
this.$queue.setData('inviterCode', scene.split(',')[0]);
|
||||
}
|
||||
// #endif
|
||||
|
||||
that.$Request.getT('/app/common/type/250').then(res => { //理疗师完成通知
|
||||
if (res.code == 0) {
|
||||
if (res.data && res.data.value) {
|
||||
that.arr.push(res.data.value)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
that.$Request.getT('/app/common/type/248').then(res => { //理疗师取消通知
|
||||
if (res.code == 0) {
|
||||
if (res.data && res.data.value) {
|
||||
that.arr.push(res.data.value)
|
||||
}
|
||||
}
|
||||
})
|
||||
that.$Request.getT('/app/common/type/217').then(res => { //腾讯地图key
|
||||
if (res.code == 0) {
|
||||
if (res.data && res.data.value) {
|
||||
that.txAppKey = res.data.value;
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(11)
|
||||
uni.getLocation({
|
||||
type: 'gcj02',
|
||||
geocode: true, //设置该参数为true可直接获取经纬度及城市信息
|
||||
success: function(res) {
|
||||
console.log(res, '地理位置')
|
||||
that.latitude = res.latitude
|
||||
that.longitude = res.longitude
|
||||
uni.setStorageSync('latitude', res.latitude)
|
||||
uni.setStorageSync('longitude', res.longitude)
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
that.city = res.address.city
|
||||
that.selectCity(that.longitude, that.latitude);
|
||||
uni.setStorageSync('city', res.address.city)
|
||||
// that.page = 1
|
||||
// that.getorderlist('')
|
||||
that.getKTCityList();
|
||||
// #endif
|
||||
|
||||
// #ifdef H5
|
||||
that.selectCity(that.longitude, that.latitude);
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.request({
|
||||
url: 'https://apis.map.qq.com/ws/geocoder/v1/?location=' + that.latitude +
|
||||
',' + that.longitude + '&key=' + that.txAppKey,
|
||||
success(re) {
|
||||
if (re.statusCode === 200) {
|
||||
let citydata = re.data.result.address_component.city
|
||||
// console.log("获取城市名称成功", citydata)/
|
||||
that.city = citydata ? citydata : '未知'
|
||||
uni.setStorageSync('city', citydata)
|
||||
that.getKTCityList();
|
||||
// that.page = 1
|
||||
// that.getorderlist('')
|
||||
} else {
|
||||
console.log("获取信息失败,请重试!")
|
||||
}
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
fail: function() {
|
||||
// #ifdef APP-PLUS
|
||||
that.checkPermission();
|
||||
// #endif
|
||||
}
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
let that = this
|
||||
that.XCXIsSelect = this.$queue.getData("XCXIsSelect");
|
||||
that.city = uni.getStorageSync('city') ? uni.getStorageSync('city') : '请选择城市'
|
||||
let userId = uni.getStorageSync('userId')
|
||||
if (userId) {
|
||||
this.getTpMy();
|
||||
this.getTpCount();
|
||||
// this.checkNewUser();
|
||||
// #ifdef MP-WEIXIN
|
||||
//订阅
|
||||
if (this.showModal) {
|
||||
this.openMsg()
|
||||
}
|
||||
// #endif
|
||||
this.city = uni.getStorageSync('city')
|
||||
console.log(this.city)
|
||||
this.getKTCityList();
|
||||
this.getHomeArtificerList();
|
||||
this.latitude = uni.getStorageSync('latitude')
|
||||
this.longitude = uni.getStorageSync('longitude')
|
||||
}
|
||||
that.token = uni.getStorageSync('token');
|
||||
that.getKTCityList();
|
||||
if (uni.getStorageSync('token')) {
|
||||
uni.getLocation({
|
||||
type: 'gcj02',
|
||||
geocode: true, //设置该参数为true可直接获取经纬度及城市信息
|
||||
// that.getKTCityList();
|
||||
// if (uni.getStorageSync('token')) {
|
||||
// console.log(22)
|
||||
// if (that.latitude && that.longitude) {
|
||||
// that.page = 1
|
||||
// that.getHomeArtificerList()
|
||||
// } else {
|
||||
// console.log(33)
|
||||
// uni.getLocation({
|
||||
// type: 'wgs84',
|
||||
// // highAccuracyExpireTime: 500,
|
||||
// geocode: true, //设置该参数为true可直接获取经纬度及城市信息
|
||||
success: function(res) {
|
||||
console.log('地理位置',res)
|
||||
that.city=res.address.city
|
||||
that.latitude = res.latitude
|
||||
that.longitude = res.longitude
|
||||
that.getBannerList()
|
||||
that.getHomeArtificerList()
|
||||
// success: function(res) {
|
||||
// console.log(44)
|
||||
// console.log( '------>地理位置',res)
|
||||
// that.latitude = res.latitude
|
||||
// that.longitude = res.longitude
|
||||
// that.page = 1
|
||||
// that.getHomeArtificerList()
|
||||
// },
|
||||
// fail: function() {
|
||||
// console.log(55)
|
||||
// console.log('获取地址失败2')
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
},
|
||||
fail: function() {
|
||||
console.log('获取地址失败2')
|
||||
methods: {
|
||||
// 开启订阅消息
|
||||
openMsg() {
|
||||
console.log('订阅消息')
|
||||
var that = this
|
||||
uni.getSetting({
|
||||
withSubscriptions: true, //是否获取用户订阅消息的订阅状态,默认false不返回
|
||||
success(ret) {
|
||||
console.log(ret.subscriptionsSetting, '------------------')
|
||||
// if (ret.subscriptionsSetting.itemSettings && Object.keys(ret.subscriptionsSetting.itemSettings).length == 2) {
|
||||
if (ret.subscriptionsSetting.itemSettings) {
|
||||
uni.setStorageSync('sendMsg', true)
|
||||
uni.openSetting({ // 打开设置页
|
||||
success(rea) {
|
||||
console.log(rea.authSetting)
|
||||
}
|
||||
});
|
||||
} else { // 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
|
||||
uni.setStorageSync('sendMsg', false)
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '为了更好的体验,请绑定消息推送',
|
||||
confirmText: '确定',
|
||||
cancelText: '取消',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
wx.requestSubscribeMessage({
|
||||
tmplIds: that.arr,
|
||||
success(re) {
|
||||
var datas = JSON.stringify(re);
|
||||
if (datas.indexOf("accept") != -1) {
|
||||
console.log(re)
|
||||
// uni.setStorageSync('sendMsg', true)
|
||||
}
|
||||
},
|
||||
fail: (res) => {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
// uni.setStorageSync('sendMsg', true)
|
||||
|
||||
that.showModal = false
|
||||
} else if (res.cancel) {
|
||||
console.log('取消')
|
||||
// uni.setStorageSync('sendMsg', false)
|
||||
that.showModal = true
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
// that.myId = uni.getStorageSync('userId')
|
||||
}
|
||||
})
|
||||
},
|
||||
getTpCount() {
|
||||
this.$Request.getT('/app/message/selectCityCount?city=' + this.city).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tpCount = res.data ? res.data : 0;
|
||||
}
|
||||
});
|
||||
},
|
||||
getTpMy() {
|
||||
this.$Request.getT('/app/message/selectMessageByUserId?page=1&limit=1&state=11').then(res => {
|
||||
if (res.code == 0) {
|
||||
if (res.data && res.data.list && res.data.list.length > 0) {
|
||||
this.tpSel = 1;
|
||||
} else {
|
||||
this.tpSel = 2;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
selectCity(longitude, latitude) {
|
||||
this.$Request.get('/app/Login/selectCity?lat=' + latitude + '&lng=' + longitude).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.city = res.data.city ? res.data.city : '未知'
|
||||
uni.setStorageSync('city', res.data.city)
|
||||
this.page = 1
|
||||
this.getorderlist('')
|
||||
this.getKTCityList();
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
chaoji(){//超级满减
|
||||
uni.navigateTo({
|
||||
url:'/my/wallet/index'
|
||||
|
@ -453,6 +659,7 @@
|
|||
url:'/pages/therapist/therapist'
|
||||
})
|
||||
},
|
||||
|
||||
getCity(e) {
|
||||
console.log("得到的城市-------------》",e[0].label);
|
||||
this.city = e[0].label;
|
||||
|
|
|
@ -357,6 +357,7 @@
|
|||
}
|
||||
// #endif
|
||||
this.city = uni.getStorageSync('city')
|
||||
console.log(this.city)
|
||||
this.getKTCityList();
|
||||
this.latitude = uni.getStorageSync('latitude')
|
||||
this.longitude = uni.getStorageSync('longitude')
|
||||
|
|
|
@ -236,8 +236,10 @@
|
|||
let data = {
|
||||
userId: uni.getStorageSync('userId'),
|
||||
couponId: that.couponId,
|
||||
oldSumMoney: that.mainData.oldPrice*that.detailData.length,
|
||||
sumMoney: that.mainData.price*that.detailData.length,
|
||||
oldSumMoney: that.mainData.oldPrice,
|
||||
sumMoney: that.mainData.price,
|
||||
// oldSumMoney: that.mainData.oldPrice*that.detailData.length,
|
||||
// sumMoney: that.mainData.price*that.detailData.length,
|
||||
ordersPackageList:[
|
||||
{packageId: that.mainData.id,num: that.detailData.length},
|
||||
]
|
||||
|
|
|
@ -50,8 +50,9 @@
|
|||
<button v-if="!weixinLogin" class='confirm-btn' @click="register">手机号登录</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<button class='confirm-btn' v-if="isopen" @click="bingwx">微信一键登录</button>
|
||||
<button v-if="!isopen" class='confirm-btn' @click="register">登录</button>
|
||||
<!-- <button class='confirm-btn' v-if="isopen" @click="bingwx">微信一键登录</button> -->
|
||||
<!-- <button v-if="!isopen" class='confirm-btn' @click="register">登录</button> -->
|
||||
<button class='confirm-btn' @click="register">登录</button>
|
||||
<!-- #endif -->
|
||||
<view v-if="!isopen"
|
||||
style="width: 100%;text-align: center;margin-top: 20upx;color: #096f4b;text-decoration:underline;"
|
||||
|
|
|
@ -236,7 +236,7 @@
|
|||
import commonConfig from 'common/config.js';
|
||||
|
||||
import * as webMap from 'utils/webMap.js';
|
||||
import permision from "@/components/permission.js";
|
||||
import permision from "@/components/permission.js";
|
||||
// 调用手机系统权限
|
||||
// #ifdef APP-PLUS
|
||||
// import permision from "@/components/permission.js";
|
||||
|
|
|
@ -104,7 +104,7 @@ class Request {
|
|||
// baseUrl: 'https://admin.sjajk.com/', // 请求的根域名//生产需替换
|
||||
// baseUrl: 'http://120.46.52.165/', // 请求的根域名
|
||||
baseUrl: 'http://192.168.2.222:8187/',
|
||||
// baseUrl: 'http://192.168.2.27:8187/',
|
||||
// baseUrl: 'http://47.75.182.93:8090/',
|
||||
// 默认的请求头
|
||||
header: {},
|
||||
method: 'POST',
|
||||
|
|
Loading…
Reference in New Issue