Browse Source

first commit

liyongli 3 years ago
parent
commit
2b4370a715

+ 2 - 2
miniprogram/custom-tab-bar/index.wxml

@@ -4,12 +4,12 @@
     <cover-view data-index="0" class="{{'text ' + (type === 0? 'act' : '')}}">
       频道广告
     </cover-view>
-    <cover-view wx:if="{{type === 0}}" class="line">1</cover-view>
+    <cover-view wx:if="{{type == 0}}" class="line">1</cover-view>
   </cover-view>
   <cover-view data-index="1" bindtap="changepage" class="item">
     <cover-view data-index="1" class="{{'text ' + (type === 1? 'act' : '')}}">
       行业广告
     </cover-view>
-    <cover-view wx:if="{{type === 1}}" class="line">1</cover-view>
+    <cover-view wx:if="{{type == 1}}" class="line">1</cover-view>
   </cover-view>
 </cover-view>

+ 7 - 6
miniprogram/custom-tab-bar/index.wxss

@@ -3,8 +3,8 @@
   position: fixed;
   z-index: 1;
   width: 100%;
-  height: 33px;
-  line-height: 33px;
+  height: 35px;
+  line-height: 35px;
   background-color: #fff;
   top: 0;
   display: flex;
@@ -19,16 +19,17 @@
 
 .text {
   color: #646566;
-  height: 2em;
-  line-height: 2em;
-  font-size: 14px;
+  height: 1.5em;
+  line-height: 1.5em;
+  font-size: 18px;
+  font-weight: 600;
   display: inline-block;
 }
 
 .line {
   width: 4em;
   height: 5rpx;
-  margin: 0 auto;
+  margin: -5rpx auto;
   background-color: #1989fa;
 }
 

+ 6 - 6
miniprogram/miniprogram_npm/@vant/weapp/action-sheet/index.js

@@ -50,12 +50,12 @@ var button_1 = require("../mixins/button");
                     this.onClose();
                 }
                 if (item.openType === 'getUserInfo' && canIUseGetUserProfile) {
-                    wx.getUserProfile({
-                        desc: item.getUserProfileDesc || '  ',
-                        complete: function (userProfile) {
-                            _this.$emit('getuserinfo', userProfile);
-                        },
-                    });
+                    // wx.getUserProfile({
+                    //     desc: item.getUserProfileDesc || '  ',
+                    //     complete: function (userProfile) {
+                    //         _this.$emit('getuserinfo', userProfile);
+                    //     },
+                    // });
                 }
             }
         },

+ 7 - 7
miniprogram/miniprogram_npm/@vant/weapp/button/index.js

@@ -54,13 +54,13 @@ if ((0, version_1.canIUseFormFieldButton)()) {
             this.$emit('click', event);
             var _a = this.data, canIUseGetUserProfile = _a.canIUseGetUserProfile, openType = _a.openType, getUserProfileDesc = _a.getUserProfileDesc, lang = _a.lang;
             if (openType === 'getUserInfo' && canIUseGetUserProfile) {
-                wx.getUserProfile({
-                    desc: getUserProfileDesc || '  ',
-                    lang: lang || 'en',
-                    complete: function (userProfile) {
-                        _this.$emit('getuserinfo', userProfile);
-                    },
-                });
+                // wx.getUserProfile({
+                //     desc: getUserProfileDesc || '  ',
+                //     lang: lang || 'en',
+                //     complete: function (userProfile) {
+                //         _this.$emit('getuserinfo', userProfile);
+                //     },
+                // });
             }
         },
     },

+ 2 - 1
miniprogram/miniprogram_npm/@vant/weapp/common/version.js

@@ -53,6 +53,7 @@ function canIUseCanvas2d() {
 }
 exports.canIUseCanvas2d = canIUseCanvas2d;
 function canIUseGetUserProfile() {
-    return !!wx.getUserProfile;
+    return false;
+    // return !!wx.getUserProfile;
 }
 exports.canIUseGetUserProfile = canIUseGetUserProfile;

+ 30 - 30
miniprogram/miniprogram_npm/@vant/weapp/uploader/utils.js

@@ -59,42 +59,42 @@ function chooseFile(_a) {
     return new Promise(function (resolve, reject) {
         switch (accept) {
             case 'image':
-                wx.chooseImage({
-                    count: multiple ? Math.min(maxCount, 9) : 1,
-                    sourceType: capture,
-                    sizeType: sizeType,
-                    success: function (res) { return resolve(formatImage(res)); },
-                    fail: reject,
-                });
+                // wx.chooseImage({
+                //     count: multiple ? Math.min(maxCount, 9) : 1,
+                //     sourceType: capture,
+                //     sizeType: sizeType,
+                //     success: function (res) { return resolve(formatImage(res)); },
+                //     fail: reject,
+                // });
                 break;
             case 'media':
-                wx.chooseMedia({
-                    count: multiple ? Math.min(maxCount, 9) : 1,
-                    sourceType: capture,
-                    maxDuration: maxDuration,
-                    sizeType: sizeType,
-                    camera: camera,
-                    success: function (res) { return resolve(formatMedia(res)); },
-                    fail: reject,
-                });
+                // wx.chooseMedia({
+                //     count: multiple ? Math.min(maxCount, 9) : 1,
+                //     sourceType: capture,
+                //     maxDuration: maxDuration,
+                //     sizeType: sizeType,
+                //     camera: camera,
+                //     success: function (res) { return resolve(formatMedia(res)); },
+                //     fail: reject,
+                // });
                 break;
             case 'video':
-                wx.chooseVideo({
-                    sourceType: capture,
-                    compressed: compressed,
-                    maxDuration: maxDuration,
-                    camera: camera,
-                    success: function (res) { return resolve(formatVideo(res)); },
-                    fail: reject,
-                });
+                // wx.chooseVideo({
+                //     sourceType: capture,
+                //     compressed: compressed,
+                //     maxDuration: maxDuration,
+                //     camera: camera,
+                //     success: function (res) { return resolve(formatVideo(res)); },
+                //     fail: reject,
+                // });
                 break;
             default:
-                wx.chooseMessageFile({
-                    count: multiple ? maxCount : 1,
-                    type: accept,
-                    success: function (res) { return resolve(formatFile(res)); },
-                    fail: reject,
-                });
+                // wx.chooseMessageFile({
+                //     count: multiple ? maxCount : 1,
+                //     type: accept,
+                //     success: function (res) { return resolve(formatFile(res)); },
+                //     fail: reject,
+                // });
                 break;
         }
     });

+ 0 - 13
miniprogram/pages/channelAdvertising/index.ts

@@ -87,17 +87,4 @@ Page({
       this.setData(p);
     })
   },
-  getUserProfile() {
-    // 获取用户信息,妥善保管用户快速填写的头像昵称,避免重复弹窗
-    wx.getUserProfile({
-      desc: '大数据平台账户信息完善', // 声明获取用户个人信息后的用途,后续会展示在弹窗中
-      success: (res) => {
-        if (!res.signature) return
-        wx.setStorageSync("userInfo", res)
-        this.setData({
-          userInfo: res,
-        })
-      }
-    })
-  },
 })

+ 0 - 1
miniprogram/pages/channelAdvertising/index.wxml

@@ -1,5 +1,4 @@
 <!--index.wxml-->
-<!-- <button wx:if="{{userInfo.signature === undefined}}" bindtap="getUserProfile"> 获取头像昵称 </button> -->
 <local-tab type="0"></local-tab>
 <view class="channel">
   <van-row>

+ 11 - 11
miniprogram/pages/industryAdvertising/index.ts

@@ -108,16 +108,16 @@ Page({
     })
   },
   getUserProfile() {
-    // 获取用户信息,妥善保管用户快速填写的头像昵称,避免重复弹窗
-    wx.getUserProfile({
-      desc: '大数据平台账户信息完善', // 声明获取用户个人信息后的用途,后续会展示在弹窗中
-      success: (res) => {
-        if (!res.signature) return
-        wx.setStorageSync("userInfo", res)
-        this.setData({
-          userInfo: res,
-        })
-      }
-    })
+    // // 获取用户信息,妥善保管用户快速填写的头像昵称,避免重复弹窗
+    // wx.getUserProfile({
+    //   desc: '大数据平台账户信息完善', // 声明获取用户个人信息后的用途,后续会展示在弹窗中
+    //   success: (res) => {
+    //     if (!res.signature) return
+    //     wx.setStorageSync("userInfo", res)
+    //     this.setData({
+    //       userInfo: res,
+    //     })
+    //   }
+    // })
   },
 })