zhaoxiaohai 3 tahun lalu
induk
melakukan
5df382aa73

+ 12 - 0
app.js

@@ -78,6 +78,18 @@ App({
       }
     })
   },
+  getUserProfile() {
+    if (wx.getStorageSync('getUserInfo')) return;
+    wx.getUserProfile({
+        desc: '用于完善客户信息资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
+        success: (res) => {
+            wx.setStorageSync('getUserInfo', true)
+        },
+        fail: (err) => {
+            wx.setStorageSync('getUserInfo', false)
+        }
+    })
+},
   globalData: {
     myNavBorHeight: 0, //自定义头部导航高度
     safeAreaBottom: 0, //底部安全距离

+ 1 - 1
css/form2.wxss

@@ -16,7 +16,6 @@
 .submit_but {
     width: 240rpx;
     height: 88rpx;
-    box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.1);
     border-radius: 44px;
     margin: 60rpx auto;
     font-size: 32rpx !important;
@@ -27,4 +26,5 @@
 .custom-class {
     width: 100% !important;
     z-index: 99;
+    box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.1);
 }

+ 1 - 1
pages/liveStreaming/index.js

@@ -169,7 +169,7 @@ Page({
   showModelCallBack1({
     detail
   }) {
-    if (detail == 'true') this.copyTheAddress(this.data.accountMsg.fliveurl_client);
+    if (detail == 'true') this.copyTheAddress(this.data.accountMsg.fassistanturl);
   },
   /* 显示自定义model */
   showMyModel() {

+ 4 - 4
pages/liveStreaming/index.wxml

@@ -22,9 +22,9 @@
                     <view class="row-title copy" data-url='{{accountMsg.fliveurl_web}}' catchtap="copyTheAddress">复制</view>
                 </view>
                 <view class="live-msg-row">
-                    <view class="row-title">管理端开播地址</view>
-                    <view class="row-content u-line-1">{{accountMsg.fliveurl_client}}</view>
-                    <view class="row-title copy" data-url='{{accountMsg.fliveurl_client}}' catchtap="copyTheAddress">复制</view>
+                    <view class="row-title">直播间设置地址</view>
+                    <view class="row-content u-line-1">{{accountMsg.fassistanturl}}</view>
+                    <view class="row-title copy" data-url='{{accountMsg.fassistanturl}}' catchtap="copyTheAddress">复制</view>
                 </view>
             </view>
             <!-- {{accountStatus!=1 && isSy}} 暂无账号 点击申请 -->
@@ -140,7 +140,7 @@
     </My_liveAccountMsg>
 </view>
 <!-- 自定义model -->
-<My_showModel isShow='{{myShowMode3}}' content="管理地址:{{accountMsg.fliveurl_client}}" confirm='一键复制' cancel='知道了' bindcallBack='showModelCallBack1' />
+<My_showModel isShow='{{myShowMode3}}' content="直播间设置地址:{{accountMsg.fassistanturl}}" confirm='一键复制' cancel='知道了' bindcallBack='showModelCallBack1' />
 <!-- 自定义model -->
 <My_showModel isShow='{{myShowModel}}' content="直播地址:{{accountMsg.fliveurl_web}}" confirm='一键复制' cancel='知道了' bindcallBack='showModelCallBack' />
 <!-- 自定义model -->

+ 40 - 0
pages/login/index.js

@@ -13,6 +13,7 @@ Page({
      * 页面的初始数据
      */
     data: {
+        rulesChecked: true,
         popups: false, //弹出层控制
         pageType: "login", //页面类型 login 手机登录页面 signin 注册页面 firm 商户认证 changeUser 切换用户
         butText: "", //按钮文本
@@ -52,6 +53,39 @@ Page({
             [name]: _Verify.Eliminate(value.detail)
         })
     },
+    /* 用户守则 */
+    rulesOnChange() {
+        this.setData({
+            rulesChecked: !this.data.rulesChecked
+        })
+    },
+    viewRules() {
+        wx.downloadFile({
+          url: 'https://bwj.obs.cn-east-2.myhuaweicloud.com/resources/PrivacyPolicy.docx',
+          success:(res)=>{
+              console.log(res)
+              wx.openDocument({
+                filePath: res.tempFilePath,
+                fail: (err) => {
+                    console.log(err)
+                    wx.showToast({
+                        title: '读取失败,请稍后再试',
+                        icon: "none"
+                    })
+                }
+            })
+          },
+          fail:(err)=>{
+              console.log(err)
+              wx.showToast({
+                title: '读取失败,请稍后再试',
+                icon: "none"
+            })
+          }
+        })
+        return
+        
+    },
     /**
      * 生命周期函数--监听页面加载
      */
@@ -176,8 +210,13 @@ Page({
             name
         } = e.currentTarget.dataset;
         if (name == "login") {
+            if(!this.data.rulesChecked) return wx.showToast({
+              title: '请勾选同意协议后登录',
+              icon:"none"
+            })
             //登录页面提交信息
             this.loginSubmit()
+            //getApp().getUserProfile();
         } else if (name == "changeUser") {
             //多账号选择
             this.retentionOfCriticalData(this.data.userIndex)
@@ -206,6 +245,7 @@ Page({
                     dataList
                 })
             })
+            //getApp().getUserProfile();
             //更改按钮内容
             this.changeButText()
         } else if (name == "firm") {

+ 2 - 1
pages/login/index.json

@@ -4,6 +4,7 @@
     "My_RectangularFrame": "../../components/My_RectangularFrame/index",
     "My_ChangeUser": "../../components/My_ChangeUser/index",
     "My_UploadFiles": "../../components/My_UploadFiles/index",
-    "van-count-down": "@vant/weapp/count-down/index"
+    "van-count-down": "@vant/weapp/count-down/index",
+    "van-checkbox": "@vant/weapp/checkbox/index"
   }
 }

+ 4 - 0
pages/login/index.wxml

@@ -23,6 +23,10 @@
                     {{countDownTime==60?'获取':countDownTime+'s'}}
                 </view>
             </view>
+            <view class="rules">
+                <van-checkbox checked-color='#4CBECF' icon-size="12px" label-class='rules-text' value="{{ rulesChecked }}" bind:change="rulesOnChange" />
+                <view class="view" bindtap="viewRules">《<text>阅读用户隐私协议</text>》</view>
+            </view>
         </view>
     </My_RectangularFrame>
 </block>

+ 24 - 2
pages/login/index.wxss

@@ -6,6 +6,7 @@
     font-family: PingFangSC-Medium, PingFang SC !important;
     font-weight: 500;
     line-height: 58rpx;
+    box-shadow: 0px 0px 20rpx 0px rgba(0, 0, 0, 0.2);
 }
 
 /* 输入提示定位 */
@@ -34,8 +35,6 @@
     height: 98rpx;
     margin: 70rpx auto 0;
     border-radius: 49rpx;
-    box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.2);
-    overflow: hidden;
 }
 
 /* 跳过 */
@@ -47,4 +46,27 @@
     margin-top: 15rpx;
     color: #000000;
     opacity: .5;
+}
+
+/* 用户隐私协议 */
+.rules {
+    height: 44rpx;
+    font-size: 24rpx;
+    font-family: PingFangSC-Regular, PingFang SC;
+    line-height: 44rpx;
+    width: 100%;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    margin-top: -15rpx;
+    color: #4CBECF;
+    margin-bottom: -40rpx;
+}
+
+.rules .view {
+    margin-left: -20rpx;
+}
+
+.rules text {
+    text-decoration: underline;
 }

+ 6 - 7
pages/portal/index.js

@@ -49,7 +49,7 @@ Page({
                 processingData.imageType(res.data, 'cover');
                 let list = [];
                 if (res.data.length > 3) {
-                    list=res.data.slice(0,3)
+                    list = res.data.slice(0, 3)
                 } else {
                     list = res.data;
                 }
@@ -236,16 +236,14 @@ Page({
     },
     //新发布商品
     getHotProductsList() {
-        let arr = ["窗帘", "沙发布"];
+        let arr = ["窗帘", "沙发布"];
         for (let i = 0; i < arr.length; i++) {
             _Http.basic({
                 "classname": "publicmethod.homepage.homepage",
-                "method": "getHotProductsList",
+                "method": "getNewProduct",
                 "content": {
                     "getdatafromdbanyway": true,
-                    "pageNumber": 1,
-                    "pageSize": 5,
-                    "ftype": arr[i]
+                    "fprodclassname": arr[i],
                 }
             }).then(res => {
                 if (res.msg != '成功') return wx.showToast({
@@ -336,7 +334,7 @@ Page({
                     "ftype": type
                 }
             }
-        }).then(res => {
+        }, false).then(res => {
             if (res.msg != '成功') return wx.showToast({
                 title: res.data,
                 icon: "none"
@@ -362,6 +360,7 @@ Page({
         wx.navigateTo({
             url: '/pages/login/index',
         })
+        // getApp().getUserProfile();
     },
     /**
      * 生命周期函数--监听页面初次渲染完成

+ 2 - 2
pages/portal/index.wxml

@@ -153,7 +153,7 @@
                 <image wx:else src="/static/annunciate/cover.png" mode="aspectFill"></image>
             </swiper-item>
         </swiper>
-        <view class="new-product-name u-line-1">{{newProduct1[newProductIndex1].fname}}[{{newProduct1[newProductIndex1].ftype}}]</view>
+        <view class="new-product-name u-line-1"><text wx:if="{{newProduct1[newProductIndex1].fprodname}}">{{newProduct1[newProductIndex1].fprodname}}</text><text wx:if="{{newProduct1[newProductIndex1].fbrand}}">[{{newProduct1[newProductIndex1].fbrand}}]</text></view>
     </view>
     <view>
         <view class="new-product-title">
@@ -165,7 +165,7 @@
                 <image wx:else src="/static/annunciate/cover.png" mode="aspectFill"></image>
             </swiper-item>
         </swiper>
-        <view class="new-product-name u-line-1">{{newProduct2[newProductIndex2].fname}}[{{newProduct2[newProductIndex2].ftype}}]</view>
+        <view class="new-product-name u-line-1"><text wx:if="{{newProduct2[newProductIndex2].fprodname!=null}}">{{newProduct2[newProductIndex2].fprodname}}</text><text wx:if="{{newProduct2[newProductIndex2].fbrand!=null}}">[{{newProduct2[newProductIndex2].fbrand}}]</text></view>
     </view>
 </view>
 <!-- 招商图片 -->

+ 2 - 2
pages/portal/portalLive/live.wxml

@@ -9,12 +9,12 @@
                 </view>
             </view>
             <view class="brand-audience">
-                <view class="brand u-line-1">{{item.fagentname!=null?item.fagentname:'暂无名称'}}</view>
+                <view class="brand u-line-1">{{item.fbrand!=null?item.fbrand:'暂无名称'}}</view>
                 <view class="audience">
                     {{item.viewers}}人
                 </view>
             </view>
-            <view wx:if="{{!isShow}}" class="explain u-line-1">{{item.faddress!=null?item.faddress:'暂无地址'}}</view>
+            <view wx:if="{{!isShow}}" class="explain u-line-1">{{item.faddress==null&&item.faddress=='null'?item.faddress:'暂无地址'}}</view>
             <view wx:else class="explain u-line-1">{{item.flocation!=null?item.flocation:'暂无地址'}}</view>
         </view>
     </view>

+ 1 - 1
pages/portal/search.wxml

@@ -9,7 +9,7 @@
 </view>
 <!-- 直播 -->
 <view hidden="{{ftype!=1}}">
-    <portalLice list='{{liveList}}'></portalLice>
+    <portalLice wx:if="{{liveList.length!=0}}" list='{{liveList}}'></portalLice>
 </view>
 <!-- 供需 -->
 <view hidden="{{ftype!=2}}">

+ 1 - 1
pages/storeMessage/index.js

@@ -66,7 +66,7 @@ Page({
             //处理数据
             const data = JSON.parse(options.data);
             this.returnData(data)
-        }
+        };
     },
     //跳转富文本
     toRichText() {

+ 1 - 1
pages/tabbar-pages/supplyAndDemand/index.js

@@ -267,7 +267,7 @@ Page({
                 "pageSize": 20,
                 "where": where
             }
-        }).then(res => {
+        },false).then(res => {
             console.log("供需列表", res)
             if (res.msg != "成功") return wx.showToast({
                 title: res.data,

+ 1 - 1
pages/tabbar-pages/user/index.wxss

@@ -92,7 +92,6 @@
     width: 240rpx;
     height: 88rpx;
     border-radius: 44rpx;
-    box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.1);
     border: 2rpx solid #4BBECF;
     margin: 60rpx auto 0;
     box-sizing: border-box;
@@ -104,4 +103,5 @@
     color: #4BBECF !important;
     font-family: PingFangSC-Medium, PingFang SC !important;
     font-weight: 500 !important;
+    box-shadow: 0px 0px 12rpx 0px rgba(0, 0, 0, 0.1);
 }

+ 7 - 3
project.config.json

@@ -58,6 +58,13 @@
     "staticServerOptions": {
         "servePath": ""
     },
+    "watchOptions": {
+        "ignore": []
+    },
+    "simulatorType": "wechat",
+    "simulatorPluginLibVersion": {
+        "qywx_simulator_plugin": "2.4.0"
+    },
     "condition": {
         "search": {
             "list": []
@@ -77,8 +84,5 @@
         "miniprogram": {
             "list": []
         }
-    },
-    "watchOptions": {
-        "ignore": []
     }
 }

+ 18 - 2
project.private.config.json

@@ -31,7 +31,17 @@
         "useStaticServer": true,
         "minifyWXML": true
     },
+    "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
     "condition": {
+        "plugin": {
+            "list": []
+        },
+        "game": {
+            "list": []
+        },
+        "gamePlugin": {
+            "list": []
+        },
         "miniprogram": {
             "list": [
                 {
@@ -278,9 +288,15 @@
                     "query": "",
                     "launchMode": "default",
                     "scene": null
+                },
+                {
+                    "name": "登录",
+                    "pathName": "pages/login/index",
+                    "query": "",
+                    "scene": null,
+                    "launchMode": "default"
                 }
             ]
         }
-    },
-    "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
+    }
 }