diff --git a/App.vue b/App.vue
index be62cf0..bd74810 100644
--- a/App.vue
+++ b/App.vue
@@ -2,12 +2,10 @@
export default {
onLaunch: function() {
console.log('App Launch')
+ this.$store.commit('initConfig')
},
onShow: function() {
-
-
-
},
onHide: function() {
diff --git a/components/home/homeList.vue b/components/home/homeList.vue
new file mode 100644
index 0000000..dd0e241
--- /dev/null
+++ b/components/home/homeList.vue
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+ {{item.title}}
+
+
+ {{item.homeType}}
+ {{item.timeGo}}年
+
+
+
+
+
+ {{items}}
+
+
+
+
+
+
+ {{item.num}}
+
+
+
+ ¥{{item.price}}元/{{item.unit}}
+ {{item.address}}
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/config.js b/config.js
index 9f2c73d..7e3dfbd 100644
--- a/config.js
+++ b/config.js
@@ -5,7 +5,7 @@ import uvUI from '@/uni_modules/uv-ui-tools'
Vue.use(uvUI);
// 当前环境
-const type = 'local'
+const type = 'prod'
// 环境配置
diff --git a/main.js b/main.js
index 90979dd..bb5991e 100644
--- a/main.js
+++ b/main.js
@@ -7,9 +7,11 @@ import Vue from 'vue'
Vue.config.productionTip = false
-console.info('config')
import './config.js'
import './utils/index.js'
+import mixinConfigList from '@/mixins/configList.js'
+
+Vue.mixin(mixinConfigList)
App.mpType = 'app'
diff --git a/mixins/configList.js b/mixins/configList.js
new file mode 100644
index 0000000..b5956a6
--- /dev/null
+++ b/mixins/configList.js
@@ -0,0 +1,47 @@
+
+
+import { mapState } from 'vuex'
+export default {
+ data() {
+ return {
+ // 默认的全局分享内容
+ Gshare: {
+ // title: '三只青蛙',
+ path: '/pages/index/index', // 全局分享的路径,比如 首页
+ // imageUrl: '/static/image/login/logo.png', // 全局分享的图片(可本地可网络)
+ }
+ }
+ },
+ computed: {
+ ...mapState(['userInfo']),
+ },
+ // 定义全局分享
+ // 1.发送给朋友
+ // onShareAppMessage(res) {
+ // let o = {
+ // title : this.configList.logo_name,
+ // ...this.Gshare,
+ // }
+ // if(this.userInfo.id){
+ // if(this.Gshare.path.includes('?')){
+ // o.path += '&shareId=' + this.userInfo.id
+ // }else{
+ // o.path += '?shareId=' + this.userInfo.id
+ // }
+ // }
+ // return o
+ // },
+ // //2.分享到朋友圈
+ // onShareTimeline(res) {
+ // let o = {
+ // ...this.Gshare,
+ // title : this.configList.logo_name,
+ // }
+ // if(this.userInfo.id){
+ // o.path = this.Gshare.path + '?shareId=' + this.userInfo.id
+ // }
+ // return o
+ // },
+ methods: {
+ }
+}
\ No newline at end of file
diff --git a/pages.json b/pages.json
index 9a98c59..bf4ba7b 100644
--- a/pages.json
+++ b/pages.json
@@ -56,6 +56,14 @@
"style": {
"navigationBarTitleText": "申请"
}
+ },
+ {
+ "path": "pages/tourGuide/tourGuide",
+ "style": {
+ "navigationBarTitleText": "地图导览",
+ "navigationBarBackgroundColor": "#1EC77A",
+ "navigationBarTextStyle": "white"
+ }
}
],
"subPackages": [
@@ -170,14 +178,6 @@
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
- },
- {
- "path": "tourGuide/tourGuide",
- "style": {
- "navigationBarTitleText": "地图导览",
- "navigationBarBackgroundColor": "#1EC77A",
- "navigationBarTextStyle": "white"
- }
}
]
}
@@ -198,6 +198,12 @@
"selectedIconPath": "static/bar/home_selected.png",
"text": "首页"
},
+ {
+ "pagePath": "pages/tourGuide/tourGuide",
+ "iconPath": "static/bar/find.png",
+ "selectedIconPath": "static/bar/find_selected.png",
+ "text": "发现"
+ },
// {
// "pagePath": "pages/discover/index",
// "iconPath": "static/bar/find.png",
diff --git a/pages/auth/index.vue b/pages/auth/index.vue
index 233ba47..e25f409 100644
--- a/pages/auth/index.vue
+++ b/pages/auth/index.vue
@@ -12,6 +12,11 @@
微信登录
+
@@ -98,7 +103,7 @@
title: '登录中...'
})
uni.login({
- success(res) {
+ success : res => {
console.info(res.code)
if(res.errMsg != "login:ok"){
return
@@ -119,24 +124,19 @@
uni.setStorageSync('token', response.result.token)
uni.setStorageSync('sessionKey', response.result.userInfo.sessionKey)
uni.setStorageSync('userInfo', response.result.userInfo)
- // that.commit('setUserInfo',{userInfo:response.result.userInfo,token:response.result.token})
- getInfo({}).then(result=>{
- // console.info('resultresult',result)
+
+ let userInfo =response.result.userInfo
+
+ if(!userInfo.nickName
+ || !userInfo.phone){
uni.navigateTo({
url:"/pages/login/index"
})
- // if(result.result.nickName){
- // uni.switchTab({
- // url:"/pages/home/index"
- // })
- // }else{
-
- // }
- }).catch(err=>{
-
- })
-
-
+ }else{
+ uni.switchTab({
+ url:"/pages/home/index"
+ })
+ }
}).catch((error) =>{
diff --git a/pages/home/index.vue b/pages/home/index.vue
index f38ccda..0449f7e 100644
--- a/pages/home/index.vue
+++ b/pages/home/index.vue
@@ -34,7 +34,7 @@
-
+
+
+
-
+
@@ -90,9 +92,11 @@
import citySelect from "@/components/cityselect/index.vue"
const lineBg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAANCAYAAAC3mX7tAAAAAXNSR0IArs4c6QAAAbxJREFUOE+lk0FrE1EUhc+ZDOhMigjZdNcWdCPJqNCdlkZw4TKL2mVwkKLQ/gAFRcEu/AEKuumDrEopNEsXSlNoV+2iTYIbBdNdNwGpmRmFyVx5oQk6mYSpvt1799z7zTnvDQPlBAJcRGxZOLXotn7Gz8ftZePaROCZP+IaEh36a04LxFS8mMmgcKFcb54H9Kvi5LtdNIZ6BMf0lVMDMD88UJ7abuP1eUDeWuEZyVcJPZ/oKeclgRcJxRMrG17l4udOGthZbF8ATMb1IvKcXiU/y66xnziM2LQf1O+nAfnq+hYgpSStCeMmdcFXzi6AWyMGrlvZcGmUs54T31QQLIzo37Pd+u0eKFD5osDYHvPlJyLyNopYnbgUtrSuc2pOG4aUSC4nxTWYFXHOfni02wPp5anCO4KP0sSUViOQ91m38VjrByDZLprBt/ZHkAkvMO3oP3QiO9ZM7i7v1MK/QHoj6sblQLrV/4ZpCDMluoff++iBo/6Bdua32m/+NUYdlz2dW+k7GQnqF84eyOqY1xjPcw8Rn+iLTwp6yFFcpP8zhLxHsgjBFRrI9WKO0AbxVURqMOVDttw8GHeTvwFKoZ4cmcUYJAAAAABJRU5ErkJggg==";
import QQMapWX from "@/util/qqmap-wx-jssdk.min.js"
+ import homeList from '@/components/home/homeList.vue'
export default{
components:{
- citySelect
+ citySelect,
+ homeList,
},
data(){
return{
@@ -144,7 +148,6 @@
this.onHousePageList();
this.onHouseType();
// this.onGetConfig()
- this.$store.commit('initConfig')
},
onPullDownRefresh() {
@@ -210,12 +213,12 @@
let hasMapGuide = that.nav.some(item => item.url === '/pages_subpack/tourGuide/tourGuide')
if(!hasMapGuide) {
// 添加地图导览入口
- that.nav.push({
- id: 'map_guide',
- title: '地图导览',
- image: 'https://tennis-oss.xzaiyp.top/2024-12-08/9704d4a0-e8d8-40fc-a2b6-28b928013a60.png',
- url: '/pages_subpack/tourGuide/tourGuide'
- })
+ // that.nav.push({
+ // id: 'map_guide',
+ // title: '地图导览',
+ // image: 'https://tennis-oss.xzaiyp.top/2024-12-08/9704d4a0-e8d8-40fc-a2b6-28b928013a60.png',
+ // url: '/pages/tourGuide/tourGuide'
+ // })
}
}).catch(error=>{
diff --git a/pages/login/index.vue b/pages/login/index.vue
index dafb430..12f931c 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -23,14 +23,14 @@
-
+
@@ -94,30 +94,32 @@
let params={
avatarUrl:that.imagUrl,
nickName:that.nameUser,
- // phone:that.phone
+ phone:that.phone
}
// &&that.phone
- if(that.imagUrl&&that.nameUser){
- UpdateInfo(params).then((response) => {
- if(this.back==1){
- uni.navigateBack({
- delta:1
- })
- }else{
- uni.switchTab({
- url:"/pages/home/index"
- })
- }
- }).catch((error) =>{
-
- })
- }else{
- return uni.showToast({
- icon:"none",
- title:"头像和昵称不能为空!"
- })
+
+ if (that.$utils.verificationAll(params, {
+ avatarUrl: '请选择头像',
+ nickName: '请填写昵称',
+ phone: '请填写手机号',
+ })) {
+ return
}
+ UpdateInfo(params).then((response) => {
+ if(this.back==1){
+ uni.navigateBack({
+ delta:1
+ })
+ }else{
+ uni.switchTab({
+ url:"/pages/home/index"
+ })
+ }
+ }).catch((error) =>{
+
+ })
+
}
}
diff --git a/pages_subpack/tourGuide/tourGuide.vue b/pages/tourGuide/tourGuide.vue
similarity index 94%
rename from pages_subpack/tourGuide/tourGuide.vue
rename to pages/tourGuide/tourGuide.vue
index 4f896f8..38e1b9c 100644
--- a/pages_subpack/tourGuide/tourGuide.vue
+++ b/pages/tourGuide/tourGuide.vue
@@ -65,7 +65,7 @@
-
+
@@ -74,13 +74,13 @@