From 3f0d19c4bd918c34872077981a3aa22a0f2331ac Mon Sep 17 00:00:00 2001
From: "Mr.jiang" <714156421@qq.com>
Date: Wed, 26 Jun 2024 09:49:50 +0800
Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
index.html | 3 +-
manifest.json | 5 +-
pages/index/index.vue | 4 ++
pages/my/index.vue | 115 +++++++++++++++++++++++++++-------
pages/therapist/therapist.vue | 10 ++-
5 files changed, 110 insertions(+), 27 deletions(-)
diff --git a/index.html b/index.html
index a012471..eb1a67b 100644
--- a/index.html
+++ b/index.html
@@ -21,7 +21,8 @@
window._AMapSecurityConfig = {
//securityJsCode: "js秘钥",
// serviceHost: 'https://wx.sjajk.com/_AMapService',
- serviceHost: 'http://120.46.52.165/_AMapService',
+ // serviceHost: 'http://120.46.52.165/_AMapService',
+ serviceHost: 'http://192.168.2.222:8187/_AMapService',
};
diff --git a/manifest.json b/manifest.json
index 9939b2e..42e3310 100644
--- a/manifest.json
+++ b/manifest.json
@@ -184,11 +184,12 @@
"key" : "2acf1b8c3d1aaf0070472dec19018d96",
"securityJsCode" : "2b07c8496878c327a8ae7a19de33e2a7",
// "serviceHost" : "http://wx.sjajk.com/_AMapService"//生产需替换
- // "serviceHost" : "http://120.46.52.165/_AMapService"
- "serviceHost" : "http://192.168.2.222:8187/_AMapService"
+ // "serviceHost" : "http://120.46.52.165/_AMapService",
+ "serviceHost" : "http://192.168.2.222:8187/_AMapService"
}
}
},
+ // "serviceHost" : "http://192.168.2.222:8187/_AMapService"
// "serviceHost" : "http://47.75.182.93:8090/_AMapService"
"template" : "index.html"
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index fa15d8c..010e5e5 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -448,6 +448,10 @@
this.getHomeArtificerList();
this.latitude = uni.getStorageSync('latitude')
this.longitude = uni.getStorageSync('longitude')
+ }else{
+ uni.navigateTo({
+ url: '/pages/public/login'
+ })
}
that.token = uni.getStorageSync('token');
// that.getKTCityList();
diff --git a/pages/my/index.vue b/pages/my/index.vue
index dbbdd77..7c10b3a 100644
--- a/pages/my/index.vue
+++ b/pages/my/index.vue
@@ -32,11 +32,11 @@
优惠券
-
+
券码兑换
-
+
积分兑换
@@ -130,10 +130,12 @@
{urlImg:'../../static/my-gong-7.png',text:'设置中心',link:'/my/setting/index'},
{urlImg:'../../static/my-gong-8.png',text:'浏览历史',link:'/pages/my/historyMy'},
{urlImg:'../../static/my-gong-9.png',text:'我的团队',link:'/pages/my/myteam'},
- ]
+ ],
+ token:''
}
},
onLoad(e) {
+ this.token = uni.getStorageSync('token');
this.XCXIsSelect = this.$queue.getData("XCXIsSelect");
if (e.money && e.couponnum) {
this.money = e.money;
@@ -323,7 +325,6 @@
}
},
goNav(e, name) {
- console.log(e)
if (this.userId) {
uni.navigateTo({
url: e
@@ -435,40 +436,110 @@
});
},
chonghi(link){//我的钱包
- if(link=='充值'){
- uni.navigateTo({
- url:'/my/wallet/index?text='+'my'
- })
- }else{
- uni.navigateTo({
- url:'/my/wallet/mymoneydetail'
+ if (this.userId) {
+ if(link=='充值'){
+ uni.navigateTo({
+ url:'/my/wallet/index?text='+'my'
+ })
+ }else{
+ uni.navigateTo({
+ url:'/my/wallet/mymoneydetail'
+ })
+ }
+ } else {
+ uni.showModal({
+ title: '提示',
+ content: '您还未登录,请先登录',
+ success: function(res) {
+ if (res.confirm) {
+ console.log('用户点击确定');
+ uni.navigateTo({
+ url: '/pages/public/login'
+ })
+ } else if (res.cancel) {
+ console.log('用户点击取消');
+ }
+ }
})
}
+
+
},
youhui(link){//优惠劵,券码兑换,积分兑换 跳页
+ if (this.userId) {
uni.navigateTo({
url:link
})
+ } else {
+ uni.showModal({
+ title: '提示',
+ content: '您还未登录,请先登录',
+ success: function(res) {
+ if (res.confirm) {
+ console.log('用户点击确定');
+ uni.navigateTo({
+ url: '/pages/public/login'
+ })
+ } else if (res.cancel) {
+ console.log('用户点击取消');
+ }
+ }
+ })
+ }
},
useToUrl(item){//常用功能跳转页面
var link=item.link
+ if (this.userId) {
uni.navigateTo({
url:link
})
+ } else {
+ uni.showModal({
+ title: '提示',
+ content: '您还未登录,请先登录',
+ success: function(res) {
+ if (res.confirm) {
+ console.log('用户点击确定');
+ uni.navigateTo({
+ url: '/pages/public/login'
+ })
+ } else if (res.cancel) {
+ console.log('用户点击取消');
+ }
+ }
+ })
+ }
},
meServe(item){
- if(item=="服务套餐"){
- uni.navigateTo({
- url:'/pages/my/servicePackage'
- })
- }else if(item=="项目次卡"){
- uni.navigateTo({
- url:'/pages/my/cika'
- })
- }else if(item=="服务疗程"){
- uni.navigateTo({
- url:'/pages/my/fuwuliaocheng'
+ if (this.userId) {
+ if(item=="服务套餐"){
+ uni.navigateTo({
+ url:'/pages/my/servicePackage'
+ })
+ }else if(item=="项目次卡"){
+ uni.navigateTo({
+ url:'/pages/my/cika'
+ })
+ }else if(item=="服务疗程"){
+ uni.navigateTo({
+ url:'/pages/my/fuwuliaocheng'
+ })
+ }
+ } else {
+ uni.showModal({
+ title: '提示',
+ content: '您还未登录,请先登录',
+ success: function(res) {
+ if (res.confirm) {
+ console.log('用户点击确定');
+ uni.navigateTo({
+ url: '/pages/public/login'
+ })
+ } else if (res.cancel) {
+ console.log('用户点击取消');
+ }
+ }
})
}
},
diff --git a/pages/therapist/therapist.vue b/pages/therapist/therapist.vue
index 7251cc4..65db353 100644
--- a/pages/therapist/therapist.vue
+++ b/pages/therapist/therapist.vue
@@ -342,7 +342,8 @@ import permision from "@/components/permission.js";
massageTypeId: null,
currentMarkerIndex: -1,
showPopup: false,
- dataIndex:''
+ dataIndex:'',
+ userId:''
}
},
@@ -410,7 +411,12 @@ import permision from "@/components/permission.js";
that.city = uni.getStorageSync('city') ? uni.getStorageSync('city') : '请选择城市'
that.getTpCount();
that.getTpMy();
-
+ that.userId = uni.getStorageSync('userId')
+ if (!this.userId) {
+ uni.navigateTo({
+ url: '/pages/public/login'
+ })
+ }
that.token = uni.getStorageSync('token')
if (uni.getStorageSync('token')) {
if (that.latitude && that.longitude) {