From 10558bd2a21898085a4c131f37c01f88948cb5e0 Mon Sep 17 00:00:00 2001 From: liuminjian Date: Wed, 23 Mar 2022 16:21:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nsgk_entry/app.json | 6 +- nsgk_entry/env/env.js | 6 - nsgk_entry/pages/index/index.js | 6 +- nsgk_entry/pages/index/index.wxss | 2 + nsgk_entry/pages/logs/logs.js | 66 ----- nsgk_entry/pages/logs/logs.wxml | 2 - nsgk_entry/pages/show/show.js | 275 ------------------ nsgk_entry/pages/show/show.json | 7 - nsgk_entry/pages/show/show.wxml | 19 -- nsgk_entry/pages/show/show.wxss | 195 ------------- nsgk_entry/project.config.json | 150 +++++----- .../templates/bottomUserSQ/bottomUserSQ.wxml | 14 - .../templates/bottomUserSQ/bottomUserSQ.wxss | 86 ------ nsgk_entry/utils/util.js | 4 - 14 files changed, 84 insertions(+), 754 deletions(-) delete mode 100644 nsgk_entry/pages/logs/logs.js delete mode 100644 nsgk_entry/pages/logs/logs.wxml delete mode 100644 nsgk_entry/pages/show/show.js delete mode 100644 nsgk_entry/pages/show/show.json delete mode 100644 nsgk_entry/pages/show/show.wxml delete mode 100644 nsgk_entry/pages/show/show.wxss delete mode 100644 nsgk_entry/templates/bottomUserSQ/bottomUserSQ.wxml delete mode 100644 nsgk_entry/templates/bottomUserSQ/bottomUserSQ.wxss diff --git a/nsgk_entry/app.json b/nsgk_entry/app.json index 2356614..16d5830 100644 --- a/nsgk_entry/app.json +++ b/nsgk_entry/app.json @@ -1,14 +1,12 @@ { "pages": [ "pages/user/login/login", - "pages/index/index", - "pages/show/show", - "pages/logs/logs" + "pages/index/index" ], "window": { "backgroundTextStyle": "light", "navigationBarBackgroundColor": "#fff", - "navigationBarTitleText": "微信框架", + "navigationBarTitleText": "农燊高科", "navigationBarTextStyle": "black" }, "style": "v2", diff --git a/nsgk_entry/env/env.js b/nsgk_entry/env/env.js index 99f9ba7..ae30e35 100644 --- a/nsgk_entry/env/env.js +++ b/nsgk_entry/env/env.js @@ -1,13 +1,7 @@ module.exports = { - LOCAL: { - URL_PREFIX: 'http://116.255.223.226:8081/nsgk_test', - }, DEV: { URL_PREFIX: 'http://116.255.223.226:8081/nsgk_test', }, - TEST: { - URL_PREFIX: 'http://116.255.223.226:8081/nsgk_test', - }, PRE: { URL_PREFIX: 'http://116.255.223.226:8081/nsgk_test', }, diff --git a/nsgk_entry/pages/index/index.js b/nsgk_entry/pages/index/index.js index 5c6579e..1b46b05 100644 --- a/nsgk_entry/pages/index/index.js +++ b/nsgk_entry/pages/index/index.js @@ -8,9 +8,13 @@ Page({ userInfoObj:{} //用户信息 }, onLoad: function (options) { - this.computeBarLocation(); + //获取用户信息 this.getUserInfo() + + + //获取滚动条高度 + this.computeBarLocation(); }, /* 计算bar 高度*/ computeBarLocation() { diff --git a/nsgk_entry/pages/index/index.wxss b/nsgk_entry/pages/index/index.wxss index a5d2d8d..ed21581 100644 --- a/nsgk_entry/pages/index/index.wxss +++ b/nsgk_entry/pages/index/index.wxss @@ -75,6 +75,8 @@ line-height: 44rpx; border-top-left-radius: 44rpx; border-bottom-left-radius: 44rpx; + margin-top: -1rpx; + margin-left: -1rpx; } .information_header .task_wrap .flex_block .desc::before{ diff --git a/nsgk_entry/pages/logs/logs.js b/nsgk_entry/pages/logs/logs.js deleted file mode 100644 index 07800be..0000000 --- a/nsgk_entry/pages/logs/logs.js +++ /dev/null @@ -1,66 +0,0 @@ -// pages/logs/logs.js -Page({ - - /** - * 页面的初始数据 - */ - data: { - - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () { - - } -}) \ No newline at end of file diff --git a/nsgk_entry/pages/logs/logs.wxml b/nsgk_entry/pages/logs/logs.wxml deleted file mode 100644 index c49f50c..0000000 --- a/nsgk_entry/pages/logs/logs.wxml +++ /dev/null @@ -1,2 +0,0 @@ - -pages/logs/logs.wxml diff --git a/nsgk_entry/pages/show/show.js b/nsgk_entry/pages/show/show.js deleted file mode 100644 index 327c7be..0000000 --- a/nsgk_entry/pages/show/show.js +++ /dev/null @@ -1,275 +0,0 @@ -import * as UTIL from '../../utils/util.js'; -import * as API from '../../utils/API.js'; -Page({ - - /** - * 页面的初始数据 - */ - - data: { - //底部自定义tabbar - isSHowZDYTabBar: true, - //底部弹框显示 - showDownTS: true, - //顶部胶囊按钮位置信息rect - CustomMenuButton: null, - BarMarginLeft: 0, - BarWidth: 0, - - list: [], - isIPhoneX:false - }, - /** - * 计算bar 高度 - */ - computeBarLocation() { - var that = this; - let CustomMenuButton = wx.getMenuButtonBoundingClientRect(); - let CustomMenuButton_margin_right = wx.getSystemInfoSync().windowWidth - CustomMenuButton.right; - let bar_margin_left = CustomMenuButton_margin_right + CustomMenuButton.width; - let bar_width = wx.getSystemInfoSync().windowWidth - CustomMenuButton_margin_right * 2 - CustomMenuButton.width * 2; - console.log("bar宽:" + bar_width + ";窗口宽度" + wx.getSystemInfoSync().windowWidth); - that.setData({ - CustomMenuButton: CustomMenuButton, - BarMarginLeft: bar_margin_left, - BarWidth: bar_width - }); - }, - - /** - * 生命周期函数--监听页面加载 - */ - onLoad: function (options) { - let that = this; - - that.simulativeData(); - that.computeBarLocation(); - that.setData({ - isIPhoneX:UTIL.isIPhoneX() - }) - }, - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () {}, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () {}, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () {}, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () {}, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () {}, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () {}, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage: function () {}, - - onItemClickMethod: function (e) { - var that = this; - var num = parseInt(e.currentTarget.id); - console.log(num) - switch (num) { - case 0: - //更新机制 - break; - case 1: - //网络访问 - that.httpTestMethod(); - break; - case 4: - //获取地理位置 - that.getLocationInfo(); - break; - case 5: - //全局loading - that.showLoadingIcon(); - break; - case 6: - that.showModalConentMethod(); - break; - case 7: - that.showModalAllMethod(); - break; - } - }, - /** - * 获取地理位置 - */ - getLocationInfo() { - UTIL.getLocationFromWX( - { - success: (res) => { - UTIL.showToastNoneIcon("当前经纬度:" + getApp().globalData.setInfo.latitude + "," + getApp().globalData.setInfo.longitude) - - } - , - fail: (res) => { - // wx.navigateTo({ - // url: '/pages/wxAuth/wxAuth', - // }) - - } - } - ); - - } - - , - /** - * loading小图标 - */ - showLoadingIcon() { - - UTIL.showLoadingHaveMask('数据加载中...'); - setTimeout(function () { - UTIL.hideLoadingHaveMask(); - }, 2000) - - } - , - /** - * 显示提示框 - */ - showModalConentMethod() { - UTIL.showModalNoneCancel('温馨提示', '这是一个按钮的弹框', '知道了'); - - }, - /** - * 显示完整提示框 并监听 - */ - showModalAllMethod() { - UTIL.showModalOnClick('提示', '两个按钮并回调', 'OK', 'NO', - { - confirm() { - UTIL.showToastNoneIcon('点击了OK'); - - } - , - cancel() { - UTIL.showToastNoneIcon('点击了NO'); - - } - - }); - } - , - //底部弹框允许 - okOnClick(e) { - console.log("底部弹框-允许"); - UTIL.showToastNoneIcon("底部弹框-允许"); - this.setData({ - showDownTS: true - }) - - }, - /** - * 底部弹框-黑色背景点击 - */ - blackOnClick() { - this.setData({ - showDownTS: true - }) - } - , - /** - * 底部弹框拒绝 - */ - refuseOnClick() { - console.log("底部弹框-拒绝"); - UTIL.showToastNoneIcon("底部弹框-拒绝"); - this.setData({ - showDownTS: true - }) - }, - bindgetUserProfile(e) { - UTIL.getUserInfoFomWX({ - success(res){ - UTIL.showToastNoneIcon("获取到昵称:"+getApp().globalData.wxUserInfo.nickName); - } - }); - } - , - /** - * 网络访问 - */ - httpTestMethod() { - let sendData = { - centerShopId: 10000, - centerWarehouseId: 10051, - channel: 220, - channelType: 22, - rows: 40, - shopId: 10005, - token: "LWXAPP1636599316684iv6qkhyqhr4izg", - v: 3, - warehouseId: 10005 - } - // UTIL.httpRequest(API.URL_ZB_RECOMMEND_LIST, sendData, - // { - // success: (res) => { - // if (res._code == API.SUCCESS_CODE) { - // UTIL.showToastNoneIcon("数据共:" + res._data.length + "条"); - // } else { - // UTIL.showToastNoneIcon(res._msg) - // } - // }, - // fail: (res) => { - // UTIL.showToastNoneIcon(API.MSG_FAIL_HTTP) - // }, - // complete: (res) => { - // } - // }); - } - , - - /** - * 模拟数据 - */ - simulativeData() { - let list = [ - { - title: '更新机制(已嵌入)', - },{ - title: '网络访问(点击获取)' - },{ - title: '自动申请微信地理授权(已嵌入)' - },{ - title: '获取微信OPenId(已嵌入)' - },{ - title: '获取微信地理位置(点击获取)', - tapBtn: 'getLocationInfo' - },{ - title: 'loading小图标', - tapBtn: 'showLoadingIcon' - },{ - title: 'Modal弹框仅提示', - tapBtn: 'showModalConentMethod', - },{ - title: 'Modal两个按钮并监听', - tapBtn: 'showModalAllMethod' - } - ]; - this.setData({ - list: list, - }) - } -}) \ No newline at end of file diff --git a/nsgk_entry/pages/show/show.json b/nsgk_entry/pages/show/show.json deleted file mode 100644 index 794e4d2..0000000 --- a/nsgk_entry/pages/show/show.json +++ /dev/null @@ -1,7 +0,0 @@ -{ -"navigationBarTitleText": "String", -"usingComponents": { - "icon-loading":"/component/iconLoading/iconLoading" -} - -} \ No newline at end of file diff --git a/nsgk_entry/pages/show/show.wxml b/nsgk_entry/pages/show/show.wxml deleted file mode 100644 index fb4a487..0000000 --- a/nsgk_entry/pages/show/show.wxml +++ /dev/null @@ -1,19 +0,0 @@ - - - - 悦团购 - - - -设备是否有刘海屏:{{isIPhoneX}} - - - - - {{item.title}} - - - - - - \ No newline at end of file diff --git a/nsgk_entry/pages/show/show.wxss b/nsgk_entry/pages/show/show.wxss deleted file mode 100644 index e044363..0000000 --- a/nsgk_entry/pages/show/show.wxss +++ /dev/null @@ -1,195 +0,0 @@ - -@import '/templates/bottomUserSQ/bottomUserSQ.wxss'; -.scroll_page -{ - height: 100vh; -} -.page_content -{ - width: 100%; - height: auto; - display: block; - -} -.list-item -{ - height: 35px; - -} -.list-item-tv -{ - width: 80%; - height: 100%; - margin-left: 10%; - - - -} -/* .black_bj -{ - position:absolute; - bottom: 0rpx; - left: 0rpx; - width: 100vw; - height: 100vh; - -} -.dialog_sq -{ - position:absolute; - bottom: 0rpx; - left: 0rpx; - background: white; - width: 100%; - height: 500rpx; -} */ - -/**index.wxss**/ -.container -{ - width: 100vw; - -} -.title -{ - color: black; - text-align: center; - width: auto; -} -.address_top_transverse -{ - display: flex; - height: 64rpx; - background-color: white; - padding-bottom: 16rpx; - - - -} -.address_top_transverse .address_tap -{ - width: auto; - display: flex; - align-items: center; - - -} - .address_top_transverse .address_tap image -{ - width: 48rpx; - height: 48rpx; - margin-right: 16rpx; - margin-left: 16rpx; - -} -.address_top_transverse .address_tap .choice_address -{ - margin-right: 16rpx; - -} -.address_top_transverse .address_tap .change_view -{ - font-size: 26rpx; - width: 80rpx; - -} - -.address_top_transverse .search_container -{ - display: flex; - width: auto; - height: 100%; - - align-items: center; - border-radius: 32rpx; - min-width: 130rpx; - margin-right: 16rpx; - flex: 1; - -} -.address_top_transverse .search_container .search_img -{ - width: 34rpx; - height: 34rpx; - margin-left: 16rpx; -} -.address_top_transverse .search_container .input_search -{ - - color: #94969c; - min-width: 160rpx; - height: 64rpx; - font-size: 24rpx; - line-height: 64rpx; - padding-left: 30rpx; -} -.tab_container -{ - width: 100%; - height: 72rpx; - position: relative; - - -} - -.tab_container .right_icon_view -{ - position: absolute; - right: 0rpx; - top: 0rpx; - width: 10vw; - height: 72rpx; - line-height: 72rpx; - text-align: center; -} -.banner_container -{ - position: relative; -} -.banner_container .banner_item -{ - width: 100%; - height: 100%; - margin-top: 16rpx; -} -.banner_img_sc{ - margin-left: 2.5%; - border-radius: 16rpx; - width: 95%; - background: url(https://shgm.jjyyx.com/m/images/banner_w_bg.png) no-repeat center; - -} - -.banner_container .banner_toast -{ - position: absolute; - bottom: -17rpx; - left: 5%; - - width: 340rpx; - height: 50rpx; - z-index: 10; -} -.type_swiper -{ - margin-top: 16rpx; - display: block; -} -.todayAndHot -{ - margin-top:16rpx; - display: block; - -} -.secon_kill -{ - margin-top: 16rpx; - display: block; -} -.preSale_collage -{ - margin-top: 16rpx; - display: block; -} - - diff --git a/nsgk_entry/project.config.json b/nsgk_entry/project.config.json index 90d6b57..9d51a13 100644 --- a/nsgk_entry/project.config.json +++ b/nsgk_entry/project.config.json @@ -1,82 +1,82 @@ { - "description": "项目配置文件", - "packOptions": { - "ignore": [ - { - "type": "file", - "value": ".eslintrc.js" - } - ] + "description": "项目配置文件", + "packOptions": { + "ignore": [ + { + "type": "file", + "value": ".eslintrc.js" + } + ] + }, + "setting": { + "urlCheck": false, + "es6": true, + "enhance": true, + "postcss": true, + "preloadBackgroundData": false, + "minified": true, + "newFeature": false, + "coverView": true, + "nodeModules": false, + "autoAudits": false, + "showShadowRootInWxmlPanel": true, + "scopeDataCheck": false, + "uglifyFileName": false, + "checkInvalidKey": true, + "checkSiteMap": false, + "uploadWithSourceMap": true, + "compileHotReLoad": false, + "lazyloadPlaceholderEnable": false, + "useMultiFrameRuntime": true, + "useApiHook": true, + "useApiHostProcess": true, + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" }, - "setting": { - "urlCheck": false, - "es6": true, - "enhance": true, - "postcss": true, - "preloadBackgroundData": false, - "minified": true, - "newFeature": false, - "coverView": true, - "nodeModules": false, - "autoAudits": false, - "showShadowRootInWxmlPanel": true, - "scopeDataCheck": false, - "uglifyFileName": false, - "checkInvalidKey": true, - "checkSiteMap": false, - "uploadWithSourceMap": true, - "compileHotReLoad": false, - "lazyloadPlaceholderEnable": false, - "useMultiFrameRuntime": true, - "useApiHook": true, - "useApiHostProcess": true, - "babelSetting": { - "ignore": [], - "disablePlugins": [], - "outputPath": "" - }, - "useIsolateContext": true, - "userConfirmedBundleSwitch": false, - "packNpmManually": false, - "packNpmRelationList": [], - "minifyWXSS": true, - "disableUseStrict": false, - "minifyWXML": true, - "showES6CompileOption": false, - "useCompilerPlugins": false, - "ignoreUploadUnusedFiles": true + "useIsolateContext": true, + "userConfirmedBundleSwitch": false, + "packNpmManually": false, + "packNpmRelationList": [], + "minifyWXSS": true, + "disableUseStrict": false, + "minifyWXML": true, + "showES6CompileOption": false, + "useCompilerPlugins": false, + "ignoreUploadUnusedFiles": true + }, + "compileType": "miniprogram", + "libVersion": "2.21.1", + "appid": "wxaace54cc2cf8924b", + "projectname": "WXMB", + "debugOptions": { + "hidedInDevtools": [] + }, + "scripts": {}, + "staticServerOptions": { + "baseURL": "", + "servePath": "" + }, + "isGameTourist": false, + "condition": { + "search": { + "list": [] }, - "compileType": "miniprogram", - "libVersion": "2.21.1", - "appid": "wxaace54cc2cf8924b", - "projectname": "WXMB", - "debugOptions": { - "hidedInDevtools": [] + "conversation": { + "list": [] }, - "scripts": {}, - "staticServerOptions": { - "baseURL": "", - "servePath": "" + "game": { + "list": [] }, - "isGameTourist": false, - "condition": { - "search": { - "list": [] - }, - "conversation": { - "list": [] - }, - "game": { - "list": [] - }, - "plugin": { - "list": [] - }, - "gamePlugin": { - "list": [] - }, - "miniprogram": { - "list": [] - } + "plugin": { + "list": [] + }, + "gamePlugin": { + "list": [] + }, + "miniprogram": { + "list": [] } + } } \ No newline at end of file diff --git a/nsgk_entry/templates/bottomUserSQ/bottomUserSQ.wxml b/nsgk_entry/templates/bottomUserSQ/bottomUserSQ.wxml deleted file mode 100644 index 9bba69b..0000000 --- a/nsgk_entry/templates/bottomUserSQ/bottomUserSQ.wxml +++ /dev/null @@ -1,14 +0,0 @@ - diff --git a/nsgk_entry/templates/bottomUserSQ/bottomUserSQ.wxss b/nsgk_entry/templates/bottomUserSQ/bottomUserSQ.wxss deleted file mode 100644 index f7b8c1b..0000000 --- a/nsgk_entry/templates/bottomUserSQ/bottomUserSQ.wxss +++ /dev/null @@ -1,86 +0,0 @@ - -.black_view -{ - background-color: black; - opacity: 0.3; - width: 100vw; - height: 100vh; - position:fixed; - left: 0rpx; - top: 0rpx; - z-index: 99999; - -} -.white_view -{ - z-index: 99999; - position:absolute; - bottom: 0rpx; - left: 0rpx; - width: 100vw; - height: 500rpx; - display: block; - background-color:#f5f4f7; - - border-top-left-radius: 15rpx; - border-top-right-radius: 15rpx; - - -} - .title_tv -{ - font-size: 29rpx; - color: #444; - margin-top: 60rpx; - margin-left: 5%; -} -.tv1 -{ - font-size: 30rpx; - color: black; - margin-top: 60rpx; - margin-left: 5%; -} - .tv2 -{ - font-size: 28rpx; - margin-top: 15rpx; - margin-left: 5%; -} -.view_button -{ - display: flex; - margin-left: 5%; - margin-top: 80rpx; - margin-right: 5%; - width: auto; - justify-content: space-between; - -} -.no_btn -{ - background-color: white; - color: mediumseagreen; - height: 80rpx; - line-height: 80rpx; - padding: 0rpx; - border-radius: 10rpx; - border-color: #e6e6e6; - border-width: 1rpx; - font-size: 28rpx; - width: auto; - -} - .ok_btn -{ - background-color: mediumseagreen; - color: white; - height: 80rpx; - line-height: 80rpx; - padding: 0rpx; - border-radius: 10rpx; - font-size: 28rpx; - width: auto; - margin-left: 50rpx; - -} \ No newline at end of file diff --git a/nsgk_entry/utils/util.js b/nsgk_entry/utils/util.js index 4b0ade9..16f7783 100644 --- a/nsgk_entry/utils/util.js +++ b/nsgk_entry/utils/util.js @@ -121,7 +121,6 @@ function httpRequest(url, data, { timeout: 60000, header: { 'Authorization':'Bearer '+getApp().globalData.userInfo.token - // 'Authorization':'1111111111' }, success: function (response) { if (response.data && response.data._code == API.INVALID_USER_TOKEN_CODE) { @@ -355,14 +354,11 @@ export { showModalOnClick, showLoadingHaveMask, hideLoadingHaveMask, - httpRequest, httpRequestNoneDetal, getCOdeFromWX, getLocationFromWX, getUserInfoFomWX, - convert_length, isIPhoneX - }