Browse Source

修复bug

zhaoxiaohai 4 years ago
parent
commit
eef4940086

+ 2 - 2
components/My_MembersAndProducts/index.wxml

@@ -18,8 +18,8 @@
             </view>
         </view>
         <!-- 图标 -->
-        <view class="grey_rectangle_icon" wx:if="{{fisadministrator}}">
-            <image src="/static/changeImg.png" mode="aspectFit" bindtap="changeMessage"></image>
+        <view class="grey_rectangle_icon">
+            <image wx:if="{{fisadministrator}}" src="/static/changeImg.png" mode="aspectFit" bindtap="changeMessage"></image>
         </view>
     </view>
 </view>

+ 4 - 1
components/My_RectangularFrame/index.wxss

@@ -7,6 +7,7 @@
     padding-top: 40rpx;
     padding-bottom: 70rpx;
     overflow: hidden;
+    z-index: 1;
 }
 
 /* 盒子背景颜色 */
@@ -18,7 +19,7 @@
     opacity: 0.4;
     top: 0;
     left: 0;
-    z-index: -5;
+    z-index: -1;
 }
 
 /* 标题 */
@@ -29,10 +30,12 @@
     font-weight: 600;
     color: #000000;
     margin-bottom: 30rpx;
+    z-index: 1;
 }
 
 /* 插入内容 */
 .slot_con{
     width: 510rpx;
     margin: 0 auto;
+    z-index: 1;
 }

+ 5 - 2
components/My_UploadFiles/index.js

@@ -29,11 +29,13 @@ Component({
         Tips: {
             type: String
         },
+
         /* 显示隐藏 */
         UploadShow: {
-            type: Boolean,
-            value: false
+            type: Number,
+            value: 2 // 1 是登录样式  2 是产品上传图片样式
         },
+
         /* 文本行高 */
         lineHeight: {
             type: String,
@@ -61,6 +63,7 @@ Component({
     /* 生命周期 */
     lifetimes: {
         attached: function () {
+            console.log(this.data.UploadShow)
             // 图片临时 id = 数字类型的 userid + 去掉前五位的时间戳
             const forTheTimeId = parseInt(wx.getStorageSync('userData').userid + (Date.parse(new Date()).toString().slice(5)));
             this.setData({

+ 10 - 2
components/My_UploadFiles/index.wxml

@@ -1,6 +1,6 @@
 <van-uploader file-list="{{ upType!='userImage'?fileList:'' }}" disabled="{{fisadministrator}}" preview-size='{{previewSize}}' max-count="{{maxCount}}" bind:after-read="afterRead" deletable="{{ true }}" use-before-read bind:before-read="beforeRead" bind:delete="imagesDelete" multiple="{{true}}">
     <!-- 默认样式 -->
-    <view wx:if="{{UploadShow}}" style="height: 100%; display: flex; align-items: center;">
+    <view wx:if="{{UploadShow===1}}" style="height: 100%; display: flex; align-items: center;">
         <view class="upImage_ltem">
             <van-icon class="upImage_add" name="plus" />
         </view>
@@ -8,8 +8,16 @@
             <van-icon name="clear" />{{Tips}}
         </view>
     </view>
+    <view wx:if="{{UploadShow==2}}" class="style2" style="height: 100%; display: flex; align-items: center;">
+        <view class="upImage_ltem">
+            <image class="image" src="/static/icon-10.png"></image>
+        </view>
+        <view class="image-tips" wx:if="{{logoTips}}">
+            <van-icon name="clear" />{{Tips}}
+        </view>
+    </view>
     <!-- 文本样式 -->
-    <view wx:else style="display: flex;align-items: center; height: {{lineHeight}};">
+    <view wx:if="{{UploadShow==3}}" style="display: flex;align-items: center; height: {{lineHeight}};">
         <slot></slot>
     </view>
 </van-uploader>

+ 19 - 2
components/My_UploadFiles/index.wxss

@@ -22,9 +22,26 @@
     width: 350rpx;
     top: 50%;
     right: -365rpx;
-    transform: translate(0,-50%);
+    transform: translate(0, -50%);
 }
 
-.van-uploader__preview-image{
+.van-uploader__preview-image {
     width: 50rpx !important;
+}
+
+/* 样式2 */
+.style2 .upImage_ltem {
+    display: flex;
+    align-items: center;
+    width: 120rpx;
+    height: 120rpx;
+    background: #333333;
+    border-radius: 8px;
+    background-color: rgba(51, 51, 51, 0.09);
+}
+
+.style2 .image {
+    width: 44rpx;
+    height: 44rpx;
+    z-index: 3;
 }

+ 5 - 1
components/My_VerticalBox/index.wxss

@@ -1,6 +1,5 @@
 .VerticalBox {
     display: flex;
-    justify-content: space-around;
     width: 100%;
     height: 100%;
 }
@@ -11,6 +10,11 @@
     text-align: center;
     background: #F6F7F8;
     border-radius: 12rpx;
+    margin-left: 30rpx;
+}
+
+.VerticalBox-item:nth-child(1){
+    margin-left: 0;
 }
 
 .VerticalBox-image {

File diff suppressed because it is too large
+ 0 - 0
miniprogram_npm/@vant/weapp/uploader/index.wxss


+ 2 - 3
pages/announceDemand/index.wxml

@@ -1,8 +1,7 @@
 <My_GeneralTemplate padBot="20rpx">
     <view class="store_message">
         <My_GreyRectangleForm title="需求分类" required>
-            <view style="width: 100%; height: 100%; z-index: 999; position: absolute;" bindtap="showPop"></view>
-            <van-field autosize type="textarea" model:value="{{ ftype }}" data-name="ftype" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.ftype}}" input-class="input-class" placeholder="点击选择" border="{{ false }}" />
+            <view class="clickPop" bindtap="showPop">{{ftype?ftype:"点击选择"}}</view>
         </My_GreyRectangleForm>
         <My_GreyRectangleForm title="需求标题" required>
             <van-field autosize type="textarea" model:value="{{ ftitle }}" data-name="ftitle" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.ftitle}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
@@ -11,7 +10,7 @@
             <van-field autosize type="textarea" model:value="{{ fcontent }}" data-name="fcontent" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fcontent}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
         </My_GreyRectangleForm>
         <My_GreyRectangleForm title="产品图">
-            <My_UploadFiles id="UploadFiles" fileList="{{attinfos}}" upType="SupplyAndDemand" UploadShow="{{true}}" maxCount="3" tsupplyanddemand="{{tsupplyanddemand}}" previewSize="65px" bindimageChange="imageChange"></My_UploadFiles>
+            <My_UploadFiles id="UploadFiles" fileList="{{attinfos}}" upType="SupplyAndDemand" UploadShow="2" previewSize="60px" maxCount="3" tsupplyanddemand="{{tsupplyanddemand}}" previewSize="65px" bindimageChange="imageChange"></My_UploadFiles>
         </My_GreyRectangleForm>
         <My_GreyRectangleForm title="下架日期">
             <!-- 时间选择器 -->

+ 9 - 0
pages/announceDemand/index.wxss

@@ -2,4 +2,13 @@
 
 .store_message {
     padding: 0 30rpx;
+}
+
+.clickPop {
+    text-align: right;
+    width: 380rpx;
+    height: 40rpx;
+    font-size: 32rpx;
+    color: #000000;
+    opacity: .3;
 }

+ 4 - 4
pages/login/index.wxml

@@ -61,7 +61,7 @@
             <!-- 品牌LOGO -->
             <view class="input_text_title">品牌LOGO<text>*</text></view>
             <view class="box_mar_bot">
-                <My_UploadFiles id="UploadFiles" fileList="{{attinfos}}" UploadShow="{{true}}" upType="Logo" maxCount='1' logoTips="{{errTips.logoTips}}" size="65px" Tips="请上传logo图片" bindimageChange="imageChange"></My_UploadFiles>
+                <My_UploadFiles id="UploadFiles" UploadShow="1" fileList="{{attinfos}}" UploadShow="{{true}}" upType="Logo" maxCount='1' logoTips="{{errTips.logoTips}}" size="55px" Tips="请上传logo图片" bindimageChange="imageChange"></My_UploadFiles>
             </view>
             <!-- 经营类目 -->
             <view style="position: relative; margin-bottom: 15rpx;">
@@ -98,7 +98,7 @@
             <view class="input_text_title">公司介绍</view>
             <view class="input_text_box box_mar_bot textarea">
                 <!-- 未做数据绑定 -->
-                <textarea value="{{fintroduction}}" placeholder="请输入公司介绍" placeholder-style="color:#DAD9DB; font-size:30rpx;"></textarea>
+                <textarea value="{{fintroduction}}" placeholder="公司介绍" placeholder-style="color:#DAD9DB; font-size:30rpx;"></textarea>
             </view>
             <!-- 地址 -->
             <view class="input_text_title">地址</view>
@@ -131,11 +131,11 @@
 </view>
 <!-- 跳过 -->
 <view hidden="{{pageType=='login'||pageType=='changeUser'}}" class="jump-over">
-    <text bindtap="jumpOverToIndex">{{pageType=="signin"?'进入首页':'跳过'}}</text>
+    <text bindtap="jumpOverToIndex">跳过</text>
 </view>
 <!-- 背景图片 -->
 <My_Background></My_Background>
 <!-- 弹出层 -->
 <van-action-sheet show="{{ popups }}" bind:close="showPop">
-    <My_Checkbox title="经营类目" saleprodclass="{{saleprodclass}}" bind:saleprodChange="saleprodChange"></My_Checkbox>
+    <My_Checkbox title="经营类目" bind:saleprodChange="saleprodChange"></My_Checkbox><!-- saleprodclass="{{saleprodclass}}" -->
 </van-action-sheet>

+ 3 - 2
pages/login/index.wxss

@@ -2,11 +2,11 @@
 
 
 /* 输入提示定位 */
-.input_text_tips{
+.input_text_tips {
     position: absolute;
     top: 0;
     left: 200rpx;
-    transform: translate(0,-63%);
+    transform: translate(0, -63%);
 }
 
 /* logo */
@@ -39,4 +39,5 @@
     font-size: 32rpx;
     margin-top: 15rpx;
     color: #000000;
+    opacity: .5;
 }

+ 2 - 2
pages/productManagement/change.js

@@ -18,7 +18,7 @@ Page({
         ftag: [], //产品标签
         showSaleprod: "", //标签显示
         tagents_productid: 0, //识别产品ID
-        checked: false, //开关控件
+        checked: true, //开关控件
         fisonsale: 0, //是否上架
         throttle: false, //保存节流阀
         errTips: {
@@ -140,7 +140,7 @@ Page({
                 icon: "none"
             });
             this.setData({
-                throttle: true//设置节流阀
+                throttle: true //设置节流阀
             });
             let content = {
                 ownerid: res.data[0].tagents_productid,

+ 2 - 2
pages/productManagement/change.wxml

@@ -9,7 +9,7 @@
         </My_GreyRectangleForm>
 
         <My_GreyRectangleForm title="产品图" required>
-            <My_UploadFiles id="UploadFiles" fileList="{{attinfos}}" upType="productImage" UploadShow="{{true}}" maxCount="3" tagents_productid="{{tagents_productid}}" previewSize="65px" bindimageChange="imageChange"></My_UploadFiles>
+            <My_UploadFiles id="UploadFiles" fileList="{{attinfos}}" upType="productImage" maxCount="3" tagents_productid="{{tagents_productid}}" UploadShow="2" previewSize="60px" bindimageChange="imageChange"></My_UploadFiles>
         </My_GreyRectangleForm>
 
         <My_GreyRectangleForm title="标签">
@@ -24,7 +24,7 @@
         </My_GreyRectangleForm>
 
         <My_GreyRectangleForm title="产品上架">
-            <van-switch style="position: absolute; margin-left: -110rpx; margin-top: 10rpx;" checked="{{ checked }}" bind:change="switchChange" />
+            <van-switch style="position: absolute; margin-left: -110rpx; margin-top: 10rpx;" size="24px" active-color="#4CBECF" checked="{{ checked }}" bind:change="switchChange" />
         </My_GreyRectangleForm>
 
     </view>

+ 1 - 1
pages/storeMessage/index.wxml

@@ -6,7 +6,7 @@
         </My_GreyRectangleForm>
 
         <My_GreyRectangleForm title="品牌LOGO" required>
-            <My_UploadFiles id="UploadFiles" UploadShow="{{true}}" fisadministrator="{{isDisabled}}" fileList="{{attinfos}}" bind:imageChange="logoChange" previewSize="65px" upType="Logo" maxCount='1' Tips="请上传logo图片" bindimageChange="imageChange"></My_UploadFiles>
+            <My_UploadFiles id="UploadFiles" fisadministrator="{{isDisabled}}" fileList="{{attinfos}}" bind:imageChange="logoChange" previewSize="57px" upType="Logo" maxCount='1' Tips="请上传logo图片" bindimageChange="imageChange"></My_UploadFiles>
         </My_GreyRectangleForm>
 
         <My_GreyRectangleForm title="经营类目" required>

+ 12 - 11
pages/tabbar-pages/user/index.js

@@ -50,8 +50,8 @@ Page({
                 url: '/pages/productManagement/index'
             })
         } else if (name == '商户管理') {
-             /* 查询商户信息,有跳转到商户信息 没有跳转商户入口选择 */
-             _Http.basic({
+            /* 查询商户信息,有跳转到商户信息 没有跳转商户入口选择 */
+            _Http.basic({
                 "accesstoken": wx.getStorageSync('userData').token,
                 "classname": "customer.tagents.tagents",
                 "method": "query_enterpriseAgentsMain",
@@ -64,20 +64,21 @@ Page({
                 if (data.ftype != '个人') return wx.navigateTo({
                     url: '/pages/storeMessage/index?data=' + JSON.stringify(data),
                 });
-                if(data.fisauthenticating==1){
+                if (data.fisauthenticating == 1) {
                     //正在审核中
-                    return wx.navigateTo({
-                        url: '/pages/storeMessage/index?data='+ data.fisauthenticating,
-                    });
-                }else{
+                    return wx.showModal({
+                        title: "提示",
+                        content: '商户信息正在审核中'
+                    })
+                } else {
                     //无商户信息子账号
-                    if(wx.getStorageSync('userData').fisadministrator==0) return wx.showToast({
-                      title: '暂无商户信息',
-                      icon:"none"
+                    if (wx.getStorageSync('userData').fisadministrator == 0) return wx.showToast({
+                        title: '暂无商户信息',
+                        icon: "none"
                     })
                     //未认证
                     wx.navigateTo({
-                      url: '/pages/storeMessage/select',
+                        url: '/pages/storeMessage/select',
                     })
                 }
             })

+ 11 - 4
pages/teamManagement/change.js

@@ -18,7 +18,7 @@ Page({
         tenterprise_userid: 0, //用户id
         checked: true, //是否启用
         fisused: 1,
-        throttle:false,//节流阀
+        throttle: false, //节流阀
         /* 必填项 */
         errTips: {
             fname: false,
@@ -33,6 +33,8 @@ Page({
     onLoad: function (options) {
         if (options.data) {
             const memberMessage = JSON.parse(options.data);
+            console.log(memberMessage)
+
             const checked = (memberMessage.fisused == 1) ? true : false
             this.setData({
                 fname: memberMessage.fname,
@@ -42,7 +44,8 @@ Page({
                 subusers: memberMessage.subusers,
                 fisused: memberMessage.fisused,
                 tenterprise_userid: memberMessage.tenterprise_userid,
-                checked
+                checked,
+                fisadministrator: memberMessage.fisadministrator
             })
         }
     },
@@ -52,7 +55,7 @@ Page({
             title: '请检查表单内容',
             icon: "none"
         });
-        if(this.data.throttle) return;
+        if (this.data.throttle) return;
         _Http.basic({
             "accesstoken": wx.getStorageSync('userData').token,
             "classname": "customer.usercenter.teammsg.teammsg",
@@ -73,7 +76,7 @@ Page({
             });
             //节流阀
             this.setData({
-                throttle:true
+                throttle: true
             })
             wx.showToast({
                 title: '保存成功',
@@ -144,6 +147,10 @@ Page({
     },
     /* 开关 */
     onChange() {
+        if (this.data.fisadministrator == 1) return wx.showToast({
+            title: '商户主账号不可停用',
+            icon: "none"
+        });
         const checked = !this.data.checked,
             fisused = (checked) ? 1 : 0
         this.setData({

+ 4 - 7
pages/teamManagement/change.wxml

@@ -1,22 +1,19 @@
 <My_GeneralTemplate>
     <view style="padding: 0 30rpx 20rpx;">
         <My_GreyRectangleForm title="账号名称" required>
-            <van-field autosize type="textarea" model:value="{{ fname }}"  data-name="fname" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fname}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
+            <van-field model:value="{{ fname }}" data-name="fname" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fname}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
         </My_GreyRectangleForm>
 
         <My_GreyRectangleForm title="身份/职位" required>
-            <van-field autosize type="textarea" model:value="{{ frole }}" data-name="frole" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.frole}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
+            <van-field model:value="{{ frole }}" data-name="frole" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.frole}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
         </My_GreyRectangleForm>
 
         <My_GreyRectangleForm title="手机号码" required>
-            <van-field autosize type="textarea" model:value="{{ fphonenumber }}" data-name="fphonenumber" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fphonenumber}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
-        </My_GreyRectangleForm>
-
-        <My_GreyRectangleForm title="权限设置">
+            <van-field model:value="{{ fphonenumber }}" data-name="fphonenumber" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fphonenumber}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
         </My_GreyRectangleForm>
 
         <My_GreyRectangleForm title="是否启用">
-            <van-switch style="position: absolute; margin-left: -110rpx; margin-top: 10rpx;" checked="{{ checked }}" bind:change="onChange" />
+            <van-switch style="position: absolute; margin-left: -110rpx; margin-top: 10rpx;" size="24px" active-color="#4CBECF" checked="{{ checked }}" bind:change="onChange" />
         </My_GreyRectangleForm>
 
     </view>

+ 10 - 3
pages/teamManagement/index.js

@@ -38,7 +38,6 @@ Page({
      * 生命周期函数--监听页面显示
      */
     onShow: function () {
-
         //获取成员列表
         _Http.basic({
             "accesstoken": wx.getStorageSync('userData').token,
@@ -49,13 +48,21 @@ Page({
             }
         }).then(res => {
             if (res.msg != '成功') return;
+            const memberList = res.data.sort(this.compare('fisadministrator'));
             this.setData({
-                memberList: res.data,
+                memberList,
                 fisadministrator: (wx.getStorageSync('userData').fisadministrator == 1) ? true : false
             })
         })
     },
-
+    /* 排序 */
+    compare(data) {
+        return function (a, b) {
+            let value1 = a[data],
+                value2 = b[data];
+            return value2 - value1;
+        }
+    },
     /**
      * 生命周期函数--监听页面隐藏
      */

+ 1 - 0
pages/tradeShow/index.js

@@ -16,6 +16,7 @@ Page({
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
+        console.log(options)
         /* 热门展商 */
         _Http.basic({
             "classname": "publicmethod.live.live",

+ 7 - 7
pages/userCenter/index.wxml

@@ -8,7 +8,7 @@
                 <image wx:else src="/static/userImage.png" mode="aspectFit"></image>
             </view>
             <!-- 修改头像 -->
-            <My_UploadFiles id="UploadFiles" upType="userImage" bind:imageChange="userImageChange" fileList="{{attinfos}}" UploadShow='{{false}}' lineHeight="130rpx">
+            <My_UploadFiles id="UploadFiles" upType="userImage" bind:imageChange="userImageChange" fileList="{{attinfos}}" UploadShow='3' lineHeight="130rpx">
                 <view class="changeImage">修改头像</view>
             </My_UploadFiles>
         </view>
@@ -17,19 +17,19 @@
     <!-- 表单输入区 -->
     <view class="user_message_input">
         <My_GreyRectangleForm title="账号名" required>
-            <van-field autosize model:value="{{ fname }}" autosize type="textarea" data-name="fname" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fname}}" input-class="input-class" placeholder="请输入账户名" border="{{ false }}" />
+            <van-field model:value="{{ fname }}" data-name="fname" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fname}}" input-class="input-class" placeholder="请输入账户名" border="{{ false }}" />
         </My_GreyRectangleForm>
         <My_GreyRectangleForm title="身份/职位" required>
-            <van-field autosize model:value="{{ frole }}" autosize type="textarea" data-name="frole" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.frole}}" input-class="input-class" placeholder="身份/职位" border="{{ false }}" />
+            <van-field model:value="{{ frole }}" autosize type="textarea" data-name="frole" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.frole}}" input-class="input-class" placeholder="身份/职位" border="{{ false }}" />
         </My_GreyRectangleForm>
         <My_GreyRectangleForm title="手机" required>
-            <van-field autosize disabled model:value="{{ fphonenumber }}" data-name="fphonenumber" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fphonenumber}}" input-class="input-class" placeholder="手机号" border="{{ false }}" />
+            <van-field disabled model:value="{{ fphonenumber }}" data-name="fphonenumber" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.fphonenumber}}" input-class="input-class" placeholder="手机号" border="{{ false }}" />
         </My_GreyRectangleForm>
         <My_GreyRectangleForm title="微信">
-            <van-field autosize model:value="{{ fwechatno }}" autosize type="textarea" input-class="input-class" placeholder="微信号/手机号" border="{{ false }}" />
+            <van-field model:value="{{ fwechatno }}" autosize type="textarea" input-class="input-class" placeholder="微信号/手机号" border="{{ false }}" />
         </My_GreyRectangleForm>
         <My_GreyRectangleForm title="地址">
-            <van-field autosize model:value="{{ faddress }}" autosize type="textarea" input-class="input-class" placeholder="请输入地址" border="{{ false }}" />
+            <van-field model:value="{{ faddress }}" autosize type="textarea" input-class="input-class" placeholder="请输入地址" border="{{ false }}" />
         </My_GreyRectangleForm>
         <My_GreyRectangleForm title="性别">
             <van-radio-group value="{{ fsex }}" bind:change="sexOnChange" direction="horizontal">
@@ -47,7 +47,7 @@
             </picker>
         </My_GreyRectangleForm>
         <My_GreyRectangleForm title="邮箱">
-            <van-field autosize model:value="{{ femail }}" autosize type="textarea" input-class="input-class" placeholder="邮箱地址" border="{{ false }}" data-name="femail" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.femail}}" />
+            <van-field model:value="{{ femail }}" autosize type="textarea" input-class="input-class" placeholder="邮箱地址" border="{{ false }}" data-name="femail" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.femail}}" />
         </My_GreyRectangleForm>
     </view>
 </My_GeneralTemplate>

BIN
static/icon-10.png


Some files were not shown because too many files changed in this diff