zhaoxiaohai 4 лет назад
Родитель
Сommit
43fe0b332c

+ 17 - 5
components/My_NavTabs/index.js

@@ -1,4 +1,3 @@
-// components/My_NavTabs/index.js
 Component({
     /**
      * 组件的属性列表
@@ -28,7 +27,7 @@ Component({
      * 组件的初始数据
      */
     data: {
-
+        informShow: false
     },
 
     /**
@@ -44,9 +43,22 @@ Component({
             })
             this.triggerEvent("setIndex", index)
         },
-        /* 下载app */
-        downloadApp(){
-            console.log("下载app")
+        /* 开播指引 */
+        downloadApp() {
+            this.setData({
+                informShow: true
+            });
+            setTimeout(() => {
+                this.setData({
+                    informShow: false
+                });
+            }, 3000)
+        },
+        /* 关闭提示 */
+        inform() {
+            this.setData({
+                informShow: false
+            });
         }
     }
 })

+ 3 - 1
components/My_NavTabs/index.json

@@ -1,4 +1,6 @@
 {
     "component": true,
-    "usingComponents": {}
+    "usingComponents": {
+        "van-transition": "@vant/weapp/transition/index"
+    }
 }

+ 12 - 2
components/My_NavTabs/index.wxml

@@ -2,5 +2,15 @@
     <view class="tbas_list" bindtap="setTabsIndex">
         <view wx:for="{{tabsList}}" data-index="{{index}}" class="{{tabsIndex==index?'active':''}}">{{item}}</view>
     </view>
-    <view wx:if="{{liveDownload}}" class="live-download"><view bindtap="downloadApp">下载直播客户端<van-icon name="arrow" /><van-icon style="margin-left: -15rpx;" name="arrow" /></view></view>
-</view>
+    <view wx:if="{{liveDownload}}" class="live-download">
+        <view catchtap="downloadApp">开播指引
+            <van-icon name="arrow" />
+            <van-icon style="margin-left: -15rpx;" name="arrow" />
+        </view>
+    </view>
+</view>
+<van-transition show="{{ informShow }}" custom-class="block">
+    <view catchtap="inform" class="inform">
+        复制web端开播地址到电脑浏览器,即可开启直播
+    </view>
+</van-transition>

+ 16 - 0
components/My_NavTabs/index.wxss

@@ -50,4 +50,20 @@
     line-height: 32rpx;
     color: #4CBECF;
     margin-right: 22rpx;
+}
+
+.inform {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    color: #FFFFFF;
+    position: fixed;
+    font-size: 28rpx;
+    width: 100vw;
+    height: 80rpx;
+    background-color: #ce192e;
+    top: 0;
+    left: 0;
+    border-radius: 0 0 30rpx 30rpx;
+    opacity: 0.95;
 }

+ 3 - 3
components/My_navBar/index.js

@@ -16,10 +16,10 @@ Component({
             const that = this;
             setTimeout(() => {
                 let data = getApp().globalData.account_list[wx.getStorageSync('userData').index];
+                console.log(data)
                 let userName = '';
-                (data.fbrand != null && data.fbrand != undefined) ? userName = data.fbrand + '-': userName = data.fname + '-'
-                userName += data.frole;
-                console.log(userName)
+                (data.fbrand != null && data.fbrand != undefined) ? userName = data.fbrand + '-': userName = data.fname + '-';
+                userName += (data.frole ? data.frole : '未知');
                 that.setData({
                     userName
                 })

+ 1 - 1
pages/liveStreaming/index.wxml

@@ -1,5 +1,5 @@
 <view style="height: 14rpx;"></view>
-<My_NavTabs tabsList="{{tabsList}}" tabsIndex="{{tabsIndex}}" bindsetIndex="setIndex" liveDownload="{{true}}" />
+<My_NavTabs tabsList="{{tabsList}}" tabsIndex="{{tabsIndex}}" bindsetIndex="setIndex" liveDownload="{{accountStatus==1}}" />
 <!-- 私域直播 -->
 <My_liveAccountMsg wx:if="{{tabsIndex==0}}" accountStatus="{{accountStatus}}" accountMsg="{{accountMsg}}">
     <view class="msgBox-but">

+ 7 - 1
pages/storeMessage/index.js

@@ -88,7 +88,8 @@ Page({
             events: {
                 richTextCallBack: function (richText) {
                     that.setData({
-                        fintroduction: richText.richText
+                        fintroduction: richText.richText,
+                        'errTips.fintroduction': false
                     })
                 }
             }
@@ -255,6 +256,11 @@ Page({
             errTips.fintroduction = true;
             verify = false;
         }
+        /* 验证商户介绍  */
+        if (this.data.fintroduction == '<p><br></p>') {
+            errTips.fintroduction = true;
+            verify = false;
+        }
         /* 验证地址  */
         if (!_Verify.required(this.data.faddress)) {
             errTips.faddress = true;

+ 2 - 2
pages/storeMessage/index.wxml

@@ -30,13 +30,13 @@
         </My_GreyRectangleForm>
         <import src="/wxParse/wxParse" />
         <My_GreyRectangleForm title="公司介绍" required>
-            <view style="width: 400rpx; text-align: right; color: #4BBECF; text-decoration: underline;" catchtap="toRichText">
+            <view style="width: 400rpx; text-align: right; color:{{errTips.fintroduction?'#EF2855':'#4BBECF'}} ; text-decoration: underline;" catchtap="toRichText">
                 编辑/预览
             </view>
         </My_GreyRectangleForm>
 
         <My_GreyRectangleForm title="地址" required>
-            <van-field autosize type="textarea" disabled="{{isDisabled}}" value="{{ faddress }}" bind:input='eliminate' data-name="faddress" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.faddress}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
+            <van-field disabled="{{isDisabled}}" value="{{ faddress }}" bind:input='eliminate' data-name="faddress" bind:focus='inputFocus' bindblur='inputBlur' error="{{errTips.faddress}}" input-class="input-class" placeholder="点击填写" border="{{ false }}" />
         </My_GreyRectangleForm>
         <My_GreyRectangleForm title="统一社会代码">
             <van-field disabled="{{isDisabled}}" value="{{ fdutyparagraph }}" data-name="fdutyparagraph" bind:input='eliminate' input-class="input-class" placeholder="点击填写" border="{{ false }}" />