<template>
  <view>
    <button @click="yanxeu">研学</button>
    <button @click="home">首页</button>
    <button @click="huodong">活动</button>
    <!-- <u--input type="text" v-model="page" />
    <button @click="jump">走！</button> -->
    <button @click="openCalendar">日历</button>
    <button @click="toStudyOrder">研学订单</button>
    <button @click="toShare">记录研学历程</button>
    <button @click="jscode">获取jscode</button>
    <button @click="fenxiang">研学分享</button>
    <button @click="daijia">代驾</button>
    <uni-calendar ref="calendar" :showMonth="false" style="z-index: 999;" :insert="false" @confirm="confirm"
      title="出发时间" :showCancelAndOk="false">
      <template v-slot:btn>
        <view style="margin: 0 24rpx;">
          <u-button shape="circle" type="primary" text="确定"></u-button>
        </view>
      </template>
    </uni-calendar>
  </view>
</template>

<script>

export default {
  data() {
    return {
      page: "/pages/index/index",
      info: { "shopId": "65fe8e5874d67a7dbd842c5a", "goodsId": "1820779910092951552", "goodsName": "探索光圈科技", "goodsDescribe": "研学类型商品", "goodsType": "801", "isStudy": true, "goodsLabel": "专享折扣价", "goodsLabelId": 8, "goodsCateId": "24", "crossedPrice": 0, "marketPrice": 998, "realPrice": 0.01, "goodsPath": "http://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/65fe8e5874d67a7dbd842c5a/ext/GOODS_INFO/School.png/5.png", "goodsDetail": "<p style=\"text-align: start;\"><img class=\"img_class\"  src=\"http://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/65fe8e5874d67a7dbd842c5a/ext/OTHER/wallhaven-4lp55p.png/1.png\" alt=\"\" data-href=\"\" style=\"\"></p><p style=\"text-align: start;\">什巍表芽棘率幸枪元退贺川冈襄琅俭流共右沫您怎县贺蓝月悟挺锁醚靳申己兽茎据意措撤嫂精荣闪？</p><p style=\"text-align: start;\">泥稀愤缠拢注牌拚？</p><p style=\"text-align: start;\">哀白裕冰狮考超煞嘻烈展。凌儒助铸节输鱼址凸骑佩罩己沈鲍搭满野资岗恨台场型热佐可碑镦减奠雾污；蝼悠固壕跌雹；碎凉廉戒烫园冠局畜锡糊昏陋螟撇锻往借剿橘礁仇苦撤鸡荆致稍损锐及递雀灿巧陕滋受衍爹洼克跃稼乏姿图势舌横治祭矮屯湾刀永破奈包伍涨摇尊骂桥踢踩学兄池撇或葱砌隔国也鞭佳酷错醋已轻馆肠答侯档扔晰酯贸钒肤酬想捞衷灰傀衬迹孟坠歼铆。壮？</p><p style=\"text-align: start;\">予绩。锻潜。汉骂逸炕豌弊们腐钢殷彭琢撑伤母稠！当码！荫玻赌南婆弧话</p><p style=\"text-align: start;\"><br></p>", "goodsSort": 1, "status": 3, "stockNum": 2000, "stockThresholdNum": 0, "saleNum": 1254, "applyState": 0, "applyTime": "2024-08-09 17:35:10", "checkUserId": "657c35e3cae1326607ea9ed2", "checkDetail": "test", "checkTime": "2024-08-09 17:26:04", "syncEnable": 1, "syncRang": "", "validEnable": 1, "validRang": "", "specs": [{ "specId": 609, "goodsId": "1820779910092951552", "specName": "xxx", "specValues": [{ "specId": 609, "specValue": "123", "specImg": null, "status": 1, "specPrice": 0, "price": null, "marketPrice": null, "stockNum": null, "sku": null }] }], "attrs": [{ "goodsId": "1820779910092951552", "attrName": "validDay", "attrValue": "90", "status": 1 }, { "goodsId": "1820779910092951552", "attrName": "使用说明", "attrValue": "袭膨寇伴汗妇，碗层捧颈纷谎喂绳借炸勒齿招纱杰镦役哪寻橄幼痰潭畦首！", "status": 1 }], "taxRate": 0, "withdrawalRate": 0, "shareId": 1, "goodsSets": [], "sharePlatformVo": { "shareRule": "平台抽成20%，购买商户70%，核销店铺10%", "shareType": 1, "cycle": 0, "platformRate": 20, "buyShopRate": 70, "checkShopRate": 10, "createTime": "2023-11-29 17:45:24" }, "validDay": 90, "realStockNum": 2000, "isGzuGood": false, "shopInfo": { "shopId": "65fe8e5874d67a7dbd842c5a", "shopName": "周黑鸭重庆江北店", "serviceName": "", "serviceTel": "18716330270", "address": "重庆市江北区中野路191号嘛嘛公寓(观音桥店)西南88米", "mapLon": "106.54497098121142", "mapLat": "29.57767497468472", "logoPath": "http://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/657c35e3cae1326607ea9ed2/ext/SHOP_INFO/1977.jpg_wh300.jpg/6.jpg", "doorImg": "", "shopLabel": "", "district": "江北区" }, "refundType": 1, "services": [], "goodsService": null, "showType": 1, "courses": [{ "id": 45, "courseName": "1", "courseImg": "http://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/65fe8e5874d67a7dbd842c5a/ext/GOODS_INFO/School.png/6.png", "columnId": null, "courseMsg": "1", "status": 1, "goodsId": "1820779910092951552", "type": "2", "chapterUrl": "http://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/65fe8e5874d67a7dbd842c5a/ext/GOODS_INFO/16.mp4/5.mp4", "chapterName": "16.mp4", "videoSize": null, "viewedCount": null, "per": 0 }, { "id": 46, "courseName": "易…鞋谬的胶请，位贩？", "courseImg": "http://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/65fe8e5874d67a7dbd842c5a/ext/GOODS_INFO/wallhaven-d5we7o.png/1.png", "columnId": null, "courseMsg": "塑科搏迫兜场矿哺勤塑渐芒浙璃购芒楔镗设。捧脓玛腹浸休杆阮嫌溴架钴眇祭已策毛骚乌娟黎厂！", "status": 1, "goodsId": "1820779910092951552", "type": "2", "chapterUrl": "http://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/65fe8e5874d67a7dbd842c5a/ext/GOODS_INFO/192d9a98d782d9c74c96f09db9378d93.mp4/19.mp4", "chapterName": "192d9a98d782d9c74c96f09db9378d93.mp4", "videoSize": null, "viewedCount": null, "per": 0 }], "saleTimeType": "1", "saleWeekDays": "", "saleStartTime": "2024-08-04 00:00:00", "saleEndTime": "2024-09-15 00:00:00" }
    };
  },
  methods: {
    daijia(){
      uni.navigateTo({
        url: '/trip/index/index'
      });
    },
    openCalendar() {
      this.$refs.calendar.open();
    },
    confirm(e) {
      console.log(e);
    },
    yanxeu() {
      uni.navigateTo({
        url: '/study/index'
      });
    },
    jump() {
      uni.navigateTo({
        url: this.page
      });
    },
    home() {
      uni.switchTab({
        url: '/pages/index/index'
      });
    },
    huodong() {
      uni.switchTab({
        url: '/pages/activity/index'
      });
    },
    toStudyOrder() {
      let that = this
      uni.navigateTo({
        url: `/study/pay/order`,
        success: function (res) {
          // 通过eventChannel向被打开页面传送数据
          res.eventChannel.emit('pay', that.info)
        }
      })
    },
    toShare() {
      uni.navigateTo({
        url: '/share/sharePosts'
      });
    },
    jscode() {
      uni.login({
        provider: 'weixin',
        success: function (loginRes) {
          console.log('登录成功！' + JSON.stringify(loginRes));
        }
      });
    },
    fenxiang() {
      uni.navigateTo(
        {
          url: '/share/index'
        }
      )
    }
  },
};
</script>

<style lang="scss" scoped></style>
