diff --git a/package.json b/package.json index c7d18a5..f90cecd 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "postcss-px2rem": "^0.3.0", "qs": "^6.10.1", "vue": "^2.6.11", + "vue-check-view": "^0.3.0", "vue-count-to": "^1.0.13", "vue-router": "^3.5.2", "vue-wordcloud": "^1.1.1", diff --git a/src/api/login/index.js b/src/api/login/index.js index bc0a64b..6e1959d 100644 --- a/src/api/login/index.js +++ b/src/api/login/index.js @@ -70,3 +70,29 @@ export function updPhonePwd(params) { } }) } + +// 注册 +export function registerApi(params) { + let obj = Object.assign({action: 'regUser'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} + +// 获取品牌的 接口 +export function getUserBrand(params) { + let obj = Object.assign({action: 'getUserBrandHome'}, params) + return httpService({ + url: `/api/v6.ashx`, + method: 'post', + data: obj, + headers: { + 'content-type': 'application/x-www-form-urlencoded' + } + }) +} diff --git a/src/main.js b/src/main.js index 8a3f572..cfdeec9 100644 --- a/src/main.js +++ b/src/main.js @@ -21,6 +21,7 @@ import compon from "@/lycomponents/index.js"; import mixins from "@/mixins" import vuescroll from 'vuescroll' import createOps from '@/utils/gol/ops'; +import checkView from 'vue-check-view' import '@/utils/rem'; @@ -31,6 +32,7 @@ Vue.use(selfUi); Vue.use(compon); Vue.use(mixins); Vue.use(VueLazyComponent); +Vue.use(checkView); Vue.use(vuescroll, {ops: createOps(true, true),name: 'vue-scroll'}); Vue.config.productionTip = false Vue.prototype.$vuiSize = 'small' diff --git a/src/mixins/index.js b/src/mixins/index.js index 58b8b00..ac780b3 100644 --- a/src/mixins/index.js +++ b/src/mixins/index.js @@ -94,6 +94,20 @@ export default { clearInterval(el.__vueSetInterval__); } }, + // 监听元素是否在可视区域 + see: { + bind(el) { + function isReize() { + const style = document.defaultView.getComputedStyle(el); + const scrollTop = document.body.scrollTop; + console.log(scrollTop) + } + el.__vueSetInterval__ = setInterval(isReize, 300); + }, + unbind(el) { + clearInterval(el.__vueSetInterval__); + } + }, // 调整元素高度 highly: { bind(el, binding) { // el为绑定的元素,binding为绑定给指令的对象 diff --git a/src/views/BrandInsight/brandTop/index.vue b/src/views/BrandInsight/brandTop/index.vue index c6d5e60..c6181e9 100644 --- a/src/views/BrandInsight/brandTop/index.vue +++ b/src/views/BrandInsight/brandTop/index.vue @@ -7,7 +7,7 @@ * @FilePath: /data-show/src/views/BrandInsight/brandTop/index.vue -->