Commit c38bcaf5 by zhangcheng

调整首页

parent 0af5f384
<template>
<!-- Tab -->
<u-tabbar v-model="selectedTabbar" :border="false" inactive-color="#000000" active-color="#006ECF" :fixed="true" :safeAreaInsetBottom="true" @change="beforeSwitch">
<u-tabbar-item v-for="(item,index) in list" :key="item.text" :text="item.text" :icon="selectedTabbar==index?item.activeIcon:item.icon"></u-tabbar-item>
</u-tabbar>
</template>
<script>
export default {
data() {
return{
}
},
props:['selectedTabbar'],
computed:{
list(){
// tabbar List
return this.$store.state.list;
}
},
methods:{
//点击tab
beforeSwitch(index) {
uni.switchTab({url:this.list[index].pagePath});
return true;
}
}
}
</script>
<style>
</style>
\ No newline at end of file
......@@ -50,7 +50,12 @@
"quickapp" : {},
/* 小程序特有相关 */
"mp-weixin" : {
"appid" : "wxdb0df0ee46a184be",
"appid" : "wx71aa3662dfd3227d",
"permission": {
"scope.userLocation": {
"desc": "你的位置信息将用于小程序位置接口的效果展示"
}
},
"setting" : {
"urlCheck" : false,
"es6" : false,
......
<template>
<view>
<!-- Tab -->
<u-tabbar v-model="selectedTabbar" :border="false" inactive-color="#000000" active-color="#006ECF" :fixed="true" :safeAreaInsetBottom="true" @change="beforeSwitch">
<u-tabbar-item v-for="(item,index) in list" :key="item.text" :text="item.text" :icon="selectedTabbar==index?item.activeIcon:item.icon"></u-tabbar-item>
</u-tabbar>
<tabBar :selectedTabbar="selectedTabbar"></tabBar>
</view>
</template>
......@@ -15,16 +12,9 @@
}
},
computed:{
list(){
// tabbar List
return this.$store.state.list;
}
},
methods: {
beforeSwitch(index) {
uni.switchTab({url:this.list[index].pagePath});
return true;
}
}
}
</script>
......
<template>
<view>
<!-- Tab -->
<u-tabbar v-model="selectedTabbar" :border="false" inactive-color="#000000" active-color="#006ECF" :fixed="true" :safeAreaInsetBottom="true" @change="beforeSwitch">
<u-tabbar-item v-for="(item,index) in list" :key="item.text" :text="item.text" :icon="selectedTabbar==index?item.activeIcon:item.icon"></u-tabbar-item>
</u-tabbar>
<tabBar :selectedTabbar="selectedTabbar"></tabBar>
</view>
</template>
......@@ -16,16 +13,10 @@
}
},
computed:{
list(){
// tabbar List
return this.$store.state.list;
}
},
methods: {
beforeSwitch(index) {
uni.switchTab({url:this.list[index].pagePath});
return true;
}
}
}
</script>
......
import Config from '../static/config/index.js';
import WXBizDataCrypt from "./WXBizDataCrypt.js";
uni.getLocation({
type: 'gcj02', //返回可以用于uni.openLocation的经纬度
success: function (res) {
console.log(res, 'res')
var params = {
lat: res.latitude,
lng: res.longitude
}
// getAddress(params).then(res => {
// console.log(res, 'aaa')
// })
}
})
export default{
uniLogin() {
uni.login({
......@@ -21,6 +34,21 @@ export default{
}
})
},
getLocation() {
uni.getLocation({
type: 'gcj02', //返回可以用于uni.openLocation的经纬度
success: function (res) {
console.log(res, 'res')
var params = {
lat: res.latitude,
lng: res.longitude
}
getAddress(params).then(res => {
console.log(res, 'aaa')
})
}
})
},
// 解密手机
async onGetPhoneNumber(appid,session_key,encryptedData,iv) {
let pc = await new WXBizDataCrypt(appid,session_key);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment