Gaoxs
4 years ago
9 changed files with 229 additions and 188 deletions
@ -1,7 +1,8 @@
|
||||
|
||||
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
|
||||
// export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api';
|
||||
export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api'; |
||||
// export const VUE_APP_API_URL = 'http://192.168.31.223:8008/api';
|
||||
export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api'; |
||||
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
|
||||
// export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
|
||||
export const VUE_APP_RESOURCES_URL = 'https://wx.yixiang.co/static'; |
||||
|
||||
|
@ -1,97 +1,119 @@
|
||||
<template> |
||||
<view class="lottie-bg"> |
||||
<view id="lottie"> |
||||
<image |
||||
src="../../static/images/live-logo.gif" |
||||
rel="preload" |
||||
mode="widthFix" |
||||
style="width: 100%;" |
||||
/> |
||||
<image src="../../static/images/live-logo.gif" rel="preload" mode="widthFix" style="width: 100%;" /> |
||||
</view> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import { mapState, mapMutations, mapActions } from "vuex"; |
||||
// 组件 |
||||
// import request from "@//api/request"; |
||||
import { wxappAuth, getUser } from "@/api/user"; |
||||
import dayjs from "dayjs"; |
||||
import cookie from "@/utils/store/cookie"; |
||||
import { parseQuery, login, handleQrCode } from "@/utils"; |
||||
import { |
||||
mapState, |
||||
mapMutations, |
||||
mapActions |
||||
} from "vuex"; |
||||
// 组件 |
||||
// import request from "@//api/request"; |
||||
import { |
||||
wxappAuth, |
||||
getUser |
||||
} from "@/api/user"; |
||||
import dayjs from "dayjs"; |
||||
import cookie from "@/utils/store/cookie"; |
||||
import { |
||||
parseQuery, |
||||
login, |
||||
handleQrCode |
||||
} from "@/utils"; |
||||
|
||||
export default { |
||||
name: "Loading", |
||||
data() { |
||||
return {}; |
||||
}, |
||||
onShow() { |
||||
|
||||
var url = handleQrCode(); |
||||
// 判断是否是分销 |
||||
if (url) { |
||||
var spread = cookie.get("spread"); |
||||
let urlSpread = parseInt(url.spread); |
||||
if (!Number.isNaN(urlSpread) && spread !== urlSpread) { |
||||
cookie.set("spread", urlSpread || 0); |
||||
} else if (spread === 0 || typeof spread !== "number") { |
||||
cookie.set("spread", urlSpread || 0); |
||||
export default { |
||||
name: "Loading", |
||||
data() { |
||||
return {}; |
||||
}, |
||||
onShow() { |
||||
|
||||
var url = handleQrCode(); |
||||
// 判断是否是分销 |
||||
if (url) { |
||||
var spread = cookie.get("spread"); |
||||
let urlSpread = parseInt(url.spread); |
||||
if (!Number.isNaN(urlSpread) && spread !== urlSpread) { |
||||
cookie.set("spread", urlSpread || 0); |
||||
} else if (spread === 0 || typeof spread !== "number") { |
||||
cookie.set("spread", urlSpread || 0); |
||||
} |
||||
} |
||||
} |
||||
if (this.$store.getters.token) { |
||||
this.toLaunch(); |
||||
return; |
||||
} |
||||
cookie.get("spread"); |
||||
// this.toLaunch(); |
||||
if (this.$deviceType == "app"||this.$deviceType == "h5") { |
||||
if (this.$store.getters.token) { |
||||
this.toLaunch(); |
||||
return; |
||||
} |
||||
// cookie.get("spread"); |
||||
// if (this.$deviceType == "weixin") { |
||||
// let path = parseQuery().path |
||||
// console.log(this) |
||||
// if (path) { |
||||
// this.$yrouter.push({ |
||||
// path |
||||
// }); |
||||
// } else { |
||||
// this.$yrouter.switchTab({ |
||||
// path: "/pages/home/index" |
||||
// }); |
||||
// } |
||||
|
||||
// return |
||||
// } |
||||
// this.toLaunch(); |
||||
this.$yrouter.switchTab({ |
||||
path: "/pages/home/index" |
||||
}); |
||||
return; |
||||
} |
||||
login().finally(() => { |
||||
this.$yrouter.switchTab({ |
||||
path: "/pages/home/index" |
||||
}); |
||||
}); |
||||
}, |
||||
methods: { |
||||
...mapActions(["changeAuthorization", "setUserInfo"]), |
||||
toLaunch() { |
||||
console.log("loading home"); |
||||
this.changeAuthorization(false); |
||||
this.$yrouter.switchTab({ |
||||
path: "/pages/home/index" |
||||
if (this.$deviceType == "app" || this.$deviceType == "h5") { |
||||
// this.toLaunch(); |
||||
|
||||
this.$yrouter.switchTab({ |
||||
path: "/pages/home/index" |
||||
}); |
||||
return; |
||||
} |
||||
login().finally(() => { |
||||
this.$yrouter.switchTab({ |
||||
path: "/pages/home/index" |
||||
}); |
||||
}); |
||||
}, |
||||
methods: { |
||||
...mapActions(["changeAuthorization", "setUserInfo"]), |
||||
toLaunch() { |
||||
console.log("loading home"); |
||||
this.changeAuthorization(false); |
||||
this.$yrouter.switchTab({ |
||||
path: "/pages/home/index" |
||||
}); |
||||
} |
||||
} |
||||
} |
||||
}; |
||||
}; |
||||
</script> |
||||
|
||||
<style scoped lang="less"> |
||||
.lottie-bg { |
||||
position: fixed; |
||||
left: 0; |
||||
top: 0; |
||||
background-color: #fff; |
||||
width: 100%; |
||||
height: 100%; |
||||
z-index: 999; |
||||
display: -webkit-flex; |
||||
display: flex; |
||||
-webkit-align-items: center; |
||||
align-items: center; |
||||
-webkit-justify-content: center; |
||||
justify-content: center; |
||||
} |
||||
.lottie-bg { |
||||
position: fixed; |
||||
left: 0; |
||||
top: 0; |
||||
background-color: #fff; |
||||
width: 100%; |
||||
height: 100%; |
||||
z-index: 999; |
||||
display: -webkit-flex; |
||||
display: flex; |
||||
-webkit-align-items: center; |
||||
align-items: center; |
||||
-webkit-justify-content: center; |
||||
justify-content: center; |
||||
} |
||||
|
||||
#lottie { |
||||
width: 35%; |
||||
display: block; |
||||
overflow: hidden; |
||||
transform: translate3d(0, 0, 0); |
||||
margin: auto; |
||||
} |
||||
#lottie { |
||||
width: 35%; |
||||
display: block; |
||||
overflow: hidden; |
||||
transform: translate3d(0, 0, 0); |
||||
margin: auto; |
||||
} |
||||
</style> |
||||
|
@ -1,32 +0,0 @@
|
||||
// 1、轮播背景问题
|
||||
// ~~ 延后处理
|
||||
|
||||
// 3、充值签名错误
|
||||
// ? 未测试出该问题
|
||||
|
||||
// 页面都多了一个头部
|
||||
// ~~ 需要打包h5的时候单独修改配置
|
||||
|
||||
// 6、评价图片上传不了
|
||||
// ?接口报错,反馈给老徐了
|
||||
|
||||
// 8、小程序绑定手机号报错
|
||||
// ?接口报错,反馈给老徐了
|
||||
|
||||
// 12、h5分享关系没形成,看下你那登陆怎么处理的参考下以前的h5
|
||||
// ?前端功能修改完,后台交给老徐了
|
||||
|
||||
// 13、海报分享,分享分享调整没问题,因为是首页,但是,商品详情海报,拼团海报,砍价海报路由跳转会有问题
|
||||
// ?前端功能修改完,后台交给老徐了
|
||||
// 海报相关页面
|
||||
// components/StorePoster.vue 商品详情
|
||||
// > 根据用户来源生成二维码
|
||||
// pages/activity/Poster/index 拼团
|
||||
// > 根据from
|
||||
// pages/activity/Poster/index 砍价
|
||||
// > 根据from
|
||||
// pages/user/promotion/Poster/index 分销
|
||||
|
||||
// 14、小程序已经开启了分享形成关系的问题看下
|
||||
// ! 需沟通
|
||||
|
Loading…
Reference in new issue