diff --git a/App.vue b/App.vue index bdd538d..be66fcb 100644 --- a/App.vue +++ b/App.vue @@ -1,365 +1,437 @@ \ No newline at end of file diff --git a/api/activity.js b/api/activity.js index b308093..e81bde4 100644 --- a/api/activity.js +++ b/api/activity.js @@ -314,9 +314,9 @@ export function qrcode(data) { } -// 生成二维码 +// 邀请记录 export function merchantRecord(data) { - return request.get(`merchantRecord`, data); + return request.get(`user/merchantRecord`, data); } diff --git a/components/Loading.vue b/components/Loading.vue new file mode 100644 index 0000000..ac77b4b --- /dev/null +++ b/components/Loading.vue @@ -0,0 +1,95 @@ + + + + + \ No newline at end of file diff --git a/components/recommend/index.vue b/components/recommend/index.vue index bd62e87..cb25b7a 100644 --- a/components/recommend/index.vue +++ b/components/recommend/index.vue @@ -38,7 +38,7 @@ - + {{item.name}} {{item.desc}} diff --git a/config/app.js b/config/app.js index de184c3..82935af 100644 --- a/config/app.js +++ b/config/app.js @@ -13,9 +13,14 @@ let VUE_APP_WS_URL = `ws://${location.hostname}?type=user` let openPlantGrass = '-openPlantGrass-' +let httpSix, httpApi; + // 网络接口修改此字符 小程序域名要求https -// let httpApi = 'http://192.168.31.106:8324' //测试 -let httpApi = 'https://test.shop.lihaink.cn' //生产 +// httpApi = 'http://192.168.31.106:8324' //测试 +httpApi = 'https://test.shop.lihaink.cn' //生产 + +httpSix = 'https://ceshi-new-wokr.lihaink.cn' +// httpSix = 'https://new-worker.lihaink.cn' // 聊天接口修改此字符 小程序聊天要求wss 例如:wss://mer.crmeb.net // let wsApi = 'ws://192.168.3.20:8324' @@ -35,6 +40,7 @@ module.exports = { // 聊天长连接地址 VUE_APP_WS_URL: wsApi ? `${wsApi}?type=user` : VUE_APP_WS_URL, // #endif + HTTP_REQUEST_URL_SIX: httpSix, openPlantGrass: openPlantGrass, HEADER: { 'content-type': 'application/json', diff --git a/main.js b/main.js index d93cc30..eeaa3be 100644 --- a/main.js +++ b/main.js @@ -18,9 +18,11 @@ import { import skeleton from './components/skeleton/index.vue' import BaseMoney from './components/BaseMoney.vue'; import loadmore from './components/loadmore'; +import Loading from './components/Loading.vue'; Vue.component('skeleton', skeleton) Vue.component('BaseMoney', BaseMoney) Vue.component('loadmore', loadmore) +Vue.component('Loading', Loading) Vue.prototype.$util = util; Vue.prototype.$Cache = Cache; Vue.prototype.$eventHub = new Vue(); diff --git a/pages.json b/pages.json index 29b0a1b..459df4a 100644 --- a/pages.json +++ b/pages.json @@ -303,8 +303,9 @@ "path" : "specialty/specialty", "style" : { - "navigationBarTitleText" : "", - "enablePullDownRefresh" : false + "navigationBarTitleText" : "名优特产", + "enablePullDownRefresh" : false, + "navigationStyle": "custom" } }] }, { diff --git a/pages/cloud_warehouse/specialty/specialty.vue b/pages/cloud_warehouse/specialty/specialty.vue index 10053ff..b925381 100644 --- a/pages/cloud_warehouse/specialty/specialty.vue +++ b/pages/cloud_warehouse/specialty/specialty.vue @@ -60,7 +60,7 @@ height: 70rpx; padding: 2px 2px 2px 21.05rpx; border-radius: 80rpx; - pic: #EDEFF2; + background: #EDEFF2; position: relative; box-sizing: border-box; @@ -215,14 +215,13 @@ - - - - - - + + + + + + diff --git a/pages/gather/gather.vue b/pages/gather/gather.vue index eecc21b..559e6e3 100644 --- a/pages/gather/gather.vue +++ b/pages/gather/gather.vue @@ -223,6 +223,7 @@ + @@ -320,52 +321,11 @@ uni.$emit('showLoading', false); }, methods: { - scrolling() { - // 滚动条距文档顶部的距离 - let scrollTop = - window.pageYOffset || - document.documentElement.scrollTop || - document.body.scrollTop; - // 滚动条滚动的距离 - let scrollStep = scrollTop - this.oldScrollTop; - // console.log("header 滚动距离 ", scrollTop); - // 更新——滚动前,滚动条距文档顶部的距离 - this.oldScrollTop = scrollTop; - - //变量windowHeight是可视区的高度 - let windowHeight = - document.documentElement.clientHeight || document.body.clientHeight; - //变量scrollHeight是滚动条的总高度 - let scrollHeight = - document.documentElement.scrollHeight || document.body.scrollHeight; - - //滚动条到底部的条件 - if (scrollTop + windowHeight == scrollHeight) { - //你想做的事情 - // console.log("header 你已经到底部了"); - } - - - if (scrollTop <= 20) { - this.backColor = 'rgba(252, 252, 252, 0)' - this.isFshow = false - } else if (20 < scrollTop && scrollTop <= 100) { - this.backColor = 'rgba(252, 252, 252, .5)' - this.isFshow = true - } else if (scrollTop > 100) { - this.backColor = 'rgba(252, 252, 252, 1)' - this.isFshow = true - - - } - - - }, initAllAppLet() { applet().then(res => { this.AllMenuList = res.data; this.initMenu(); - // this.showControllerAllLet(); + this.showControllerAllLet(); }).catch(e => { console.log(e); }) @@ -376,16 +336,8 @@ if (typeof this.$store.state.app.userInfo == 'string') { user = JSON.parse(this.$store.state.app.userInfo) } else user = JSON.parse(JSON.stringify(this.$store.state.app.userInfo)) - if (user?.show_controller_applet) { - this.AllMenuList.push({ - name: '大屏控制', - icon: '/static/applet/dp.png', - data: { - id: '__UNI__83ABA97', - url: 'https://ceshi-worker-task.lihaink.cn/uploads/files/20231016/20231016112144fac6d9128.wgt', - }, - type: 4, - }) + if (!user?.show_controller_applet) { + this.AllMenuList = this.AllMenuList.filter(item=>item.app_id!="__UNI__83ABA97"); //隐藏大屏控制 } }, // 初始化菜单 @@ -403,7 +355,6 @@ this.nowMenuList = now; } catch (e) { this.nowMenuList = []; - console.log(e); } }, clickMenu(data) { diff --git a/pages/goods_details/index.vue b/pages/goods_details/index.vue index eb3fcf6..d65d04f 100644 --- a/pages/goods_details/index.vue +++ b/pages/goods_details/index.vue @@ -351,7 +351,7 @@ - + diff --git a/pages/users/invite_code/index.vue b/pages/users/invite_code/index.vue index ec0e47e..4e78644 100644 --- a/pages/users/invite_code/index.vue +++ b/pages/users/invite_code/index.vue @@ -24,23 +24,35 @@ + 序号 用户名称 用户ID - 采购金额 - 销售金额 + 状态 + 采购金额 + 销售金额 - - - {{item.real_name}} - {{item.uid}} - ¥{{item.buy_amount}} - ¥{{item.sale_amount}} + + + + + + {{index+1}} + {{item.real_name || '-'}} + {{item.uid}} + {{item.status == 0?'未入驻':'已入驻'}} + ¥{{item.buy_amount}} + ¥{{item.sale_amount}} + + + + {{loadTitle}} + - + - + @@ -51,6 +63,9 @@ qrcode, merchantRecord } from "@/api/activity.js"; + import { + Toast + } from '../../../libs/uniApi'; export default { components: { @@ -73,41 +88,46 @@ onLoad() { this.getQrcode(); this.getList(); - this.getUserInfo() - }, - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function() { - this.getList(); + this.getUserInfo(); }, methods: { + scrolltolower(e) { + this.getList(); + }, + // 获取二维码 getQrcode() { qrcode().then(res => { this.qrcodeUrl = res.data.url; + }).catch(err => { + uni.showModal({ + content: '暂未开通邀请码,需开通邀请码请联系管理员', + showCancel: false, + success: (res) => { + uni.navigateBack(); + } + }) }) }, + // 获取好友列表 getList() { let that = this; if (that.loading) return; if (that.loadend) return; that.loading = true; - that.loadTitle = ''; merchantRecord({ page: that.page, limit: that.limit }).then(res => { let list = res.data.list, loadend = list.length < that.limit; - that.list = that.$util.SplitArray(list, that.list); - that.$set(that, 'list', that.list); + that.list = that.list.concat(list); that.page = that.page + 1; that.loading = false; that.loadend = loadend; - that.loadTitle = loadend ? '哼~😕我也是有底线的~' : "加载更多"; + that.loadTitle = loadend ? '我也是有底线的~' : "加载更多"; }, function(res) { this.loading = false; that.loadTitle = '加载更多'; @@ -169,7 +189,7 @@