Commit 824456cf authored by haiyoucuv's avatar haiyoucuv

init

parent 10dfbccc
......@@ -29,9 +29,7 @@ ComponentWithStore({
canIUseGetUserProfile: wx.canIUse('getUserProfile'),
canIUseNicknameComp: wx.canIUse('input.type.nickname'),
},
methods: {
async onShow() {
store.doLog(507, 10)
created() {
// 登录
wx.login({
success: async (res) => {
......@@ -41,6 +39,11 @@ ComponentWithStore({
await this.updateHomeInfo();
},
});
},
methods: {
async onShow() {
store.doLog(507, 10)
await this.updateHomeInfo();
const {channel, city} = this.options || {};
store.paramsObj = {channel, city};
},
......@@ -100,7 +103,7 @@ ComponentWithStore({
// 跳转活动页
jumpActPage: _asyncThrottle(async function () {
store.doLog(508, 4)
wx.switchTab({ url: "/pages/activity/activity" })
wx.switchTab({url: "/pages/activity/activity"})
}),
closeGetPanel() {
......@@ -120,7 +123,7 @@ ComponentWithStore({
getPos() {
wx.getLocation({
type: 'wgs84',
success (res) {
success(res) {
const latitude = res.latitude
const longitude = res.longitude
const speed = res.speed
......@@ -135,7 +138,7 @@ ComponentWithStore({
wx.getFileSystemManager().readFile({
filePath: e.detail.avatarUrl, //地址
encoding: 'base64', //编码格式
success: async(res) => {
success: async (res) => {
let base64 = 'data:image/png;base64,' + res.data
const data = await store.doImgUpload(base64)
console.info('头像上传后data', data);
......
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