123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- const Parse = getApp().Parse;
- const company = getApp().globalData.company
- // const login = require('../../../utils/login')
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- },
- /**
- * 组件的初始数据
- */
- data: {
- user: null,
- },
- ready: async function () {
- // this.getmy()
- },
- /**
- * 组件的方法列表
- */
- methods: {
- async getmy() {
- // let userLogin = wx.getStorageSync("userLogin");
- // if (userLogin == "") {
- // login.loginNow();
- // return;
- // }
- let uid = Parse.User.current().id
- console.log(uid);
- let ShopOrder = new Parse.Query('_User')
- let shopOrder = await ShopOrder.get(uid)
- this.setData({
- user: shopOrder.toJSON()
- })
- console.log(this.data.user);
- },
- goodsorder() {
- wx.navigateTo({
- url: `/nova-tourism/pages/my/shop-order/index?type=shop&themeColor=#46a9a4`
- });
- },
- myinformation() {
- wx.navigateTo({
- url: '/common-page/pages/info/index'
- });
- },
- refund() {
- wx.navigateTo({
- url: '/nova-tourism/pages/my/refund/refund-list/index'
- });
- },
- homestayorder() {
- wx.navigateTo({
- url: '/nova-tourism/pages/my/homestay-order/index'
- });
- },
- orderdetails() {
- wx.navigateTo({
- url: '/nova-tourism/pages/my/order-details/index'
- });
- },
- comments() {
- wx.navigateTo({
- url: '/nova-tourism/pages/my/comments/index'
- });
- },
- merchant() {
- let merchant = wx.getStorageSync('merchant');
- if (merchant) {
- wx.navigateTo({
- url: '/nova-tourism/pages/my/merchant/merchant-home/index'
- });
- } else {
- wx.navigateTo({
- url: '/nova-tourism/pages/my/merchant/login/index'
- });
- }
- },
- feedback() {
- wx.navigateTo({
- url: '/nova-tourism/pages/my/feedback/index'
- });
- },
- foodorder() {
- wx.navigateTo({
- url: '/nova-tourism/pages/my/eat/index'
- });
- }
- }
- })
|