xiaohaizhao 1 ヶ月 前
コミット
1ec8273b38

+ 0 - 9
app.json

@@ -131,15 +131,6 @@
         "Universal"
       ],
       "network": "all"
-    },
-    "pages/login/phone": {
-      "packages": [
-        "packageA",
-        "Eservice",
-        "select",
-        "Universal"
-      ],
-      "network": "all"
     }
   },
   "usingComponents": {

+ 45 - 29
components/Yl_FloatingButton/index.js

@@ -1,39 +1,55 @@
 Component({
   properties: {
-    radius: {
-      type: Number
-    }, //半径 单位px
-    useSlot: {
-      type: Boolean
-    }
+      radius: {
+          type: Number
+      }, //半径 单位px
+      useSlot: {
+          type: Boolean
+      },
+      zIndex: {
+          type: Number,
+          value: 99
+      }
   },
   data: {
-    top: "550px",
-    left: "345px",
-    viewHeight: null
+      top: "550px",
+      left: "345px",
+      viewHeight: null,
+      alternative: false,
+      viewWidth: 375
   },
   lifetimes: {
-    attached: function () {
-      let that = this;
-      wx.getSystemInfo({
-        success: (res => that.setData({
-          viewHeight: res.windowHeight
-        }))
-      });
-    },
+      attached: function () {
+          this.setData({
+              userid: wx.getStorageSync('userMsg').userid
+          })
+          let that = this;
+          wx.getSystemInfo({
+              success: (res => that.setData({
+                  viewHeight: res.windowHeight,
+                  viewWidth: res.windowWidth // ✅ 加这一行
+              }))
+          });
+      },
   },
   methods: {
-    viewTouchMove(e) {
-      let left = e.touches[0].pageX;
-      if (left > (375 - this.data.radius)) left = 375 - (this.data.radius / 2);
-      if (left < 0 + this.data.radius) left = 0 + this.data.radius;
-      let top = e.touches[0].pageY;
-      if (top < 0 + this.data.radius) top = 0 + this.data.radius;
-      if (top > this.data.viewHeight - this.data.radius) top = this.data.viewHeight - this.data.radius;
-      this.setData({
-        left: left + 'px',
-        top: top + 'px'
-      })
-    }
+      viewTouchMove(e) {
+          let left = e.touches[0].pageX;
+          if (left > (this.data.viewWidth - this.data.radius)) left = this.data.viewWidth - (this.data.radius / 2);
+          if (left < 0 + this.data.radius) left = 0 + this.data.radius;
+          let top = e.touches[0].pageY;
+          if (top < 0 + this.data.radius) top = 0 + this.data.radius;
+          if (top > this.data.viewHeight - this.data.radius) top = this.data.viewHeight - this.data.radius;
+          this.setData({
+              left: left + 'px',
+              top: top + 'px'
+          })
+      },
+      imageOnErr(e) {
+          console.log("图片加载失败")
+          this.setData({
+              alternative: true
+          })
+      }
   }
 })

+ 22 - 2
components/Yl_FloatingButton/index.scss

@@ -1,4 +1,24 @@
-.float-box{
+.float-box {
     position: fixed;
-    z-index: 99;
+}
+
+.circle-box {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    width: 160rpx;
+    height: 160rpx;
+    transform: translate(-50%, -50%);
+
+    .circle {
+        background-color: #1060E3;
+        width: 130rpx;
+        height: 130rpx;
+        text-align: center;
+        line-height: 120rpx;
+        border-radius: 50%;
+        color: #fff;
+        font-size: 90rpx;
+        box-sizing: border-box;
+    }
 }

+ 18 - 3
components/Yl_FloatingButton/index.wxml

@@ -1,4 +1,19 @@
-<view class="float-box" style="top: {{top}}; left: {{left}};" catchtouchmove="viewTouchMove">
-  <slot wx:if="{{useSlot}}" />
-  <image wx:else style="width: 160rpx; height: 160rpx; transform: translate(-50%,-50%);" src='../../static/image/add.png' data-title="新建线索" />
+<view wx:if="{{userid!=1487}}" class="float-box" style="top: {{top}}; left: {{left}}; z-index:{{zIndex}};" catchtouchmove="viewTouchMove">
+    <slot wx:if="{{useSlot}}" />
+    <image wx:elif='{{!alternative}}' style="width: 160rpx; height: 160rpx; transform: translate(-50%,-50%);" src='../../static/image/add.png' binderror='imageOnErr' data-title="新建线索" />
+    <view wx:else class="circle-box">
+        <view class="circle">
+            +
+        </view>
+    </view>
+</view>
+
+<view wx:else class="float-box" style="top: 70%; right:-50rpx; z-index:9999;">
+    <slot wx:if="{{useSlot}}" />
+    <image wx:elif='{{!alternative}}' style="width: 160rpx; height: 160rpx; transform: translate(-50%,-50%);" src='../../static/image/add.png' binderror='imageOnErr' data-title="新建线索" />
+    <view wx:else class="circle-box">
+        <view class="circle">
+            +
+        </view>
+    </view>
 </view>

+ 2 - 2
components/Yl_Tabbar/index.js

@@ -32,8 +32,8 @@ Component({
                 console.log(v.classnames)
                 return v
             })
-            if (numberA.length >= 5) {
-                let showList = numberA.splice(0, 3);
+            if (numberA.length >= 6) {
+                let showList = numberA.splice(0, 4);
                 showList.push({
                     classnames: "t-icon color-gengduo",
                     icon: "color-gengduo",

+ 5 - 5
packageA/invoice/update.js

@@ -11,15 +11,15 @@ Page({
 			errMsg: "",
 			type: "radio",
 			radioList: [{
-					name: 's/专用发票',
-					id: 's'
+					name: 'bs/专用发票',
+					id: 'bs'
 				},
 				{
-					name: 'p/普通发票(电票)',
-					id: 'p'
+					name: 'pc/普通发票(电票)',
+					id: 'pc'
 				},
 			],
-			value: "s",
+			value: "bs",
 			valueName: "invoiceline",
 			required: false,
 		}, {

+ 4 - 1
packageA/market/detail.js

@@ -15,10 +15,13 @@ Page({
 			sa_itemgroupid: options.id,
 			itemno: options.itemno
 		})
+		let options1 = wx.getStorageSync('auth').wmarket.options;
 		sa_brandid = options.sa_brandid;
 		this.setData({
 			userrole: wx.getStorageSync('userrole'),
-			siteid: wx.getStorageSync('userMsg').siteid
+			siteid: wx.getStorageSync('userMsg').siteid,
+			isNumber: options1.some(v => v == 'number'),
+			isText: options1.some(v => v == 'text'),
 		})
 
 		if (wx.getStorageSync('userrole') == '业务员') sys_enterpriseid = options.sys_enterpriseid

+ 2 - 1
packageA/market/detail.wxml

@@ -27,7 +27,8 @@
   <view class="else">
     <text>{{language['起订量']||'起订量'}}:{{detail.orderminqty}}({{detail.unitname}})</text>
     <text>{{language['装箱数']||'装箱数'}}:{{detail.packqty}}</text>
-    <text>{{language['库存']||'库存'}}:{{userrole=='经销商'?detail.stockstatus:detail.cansaleqty}}</text>
+    <text wx:if="{{isText}}">{{language['库存']||'库存'}}:{{detail.stockstatus}}</text>
+    <text wx:if="{{isNumber}}">{{language['库存']||'库存'}}:{{detail.cansaleqty}}</text>
   </view>
 </view>
 <!-- 选择型号 -->

+ 13 - 2
pages/login/phone.js

@@ -6,7 +6,9 @@ Page({
 		register: null,
 		languages: [],
 		language: {},
-		showDialog: false
+		showDialog: false,
+		pageShow: false,
+		showLogo: false
 	},
 	async onLoad() {
 		if (wx.getStorageSync('isAgree')) this.setData({
@@ -38,10 +40,19 @@ Page({
 			}
 		})
 		getApp().globalData.Language.getLanguagePackage(this, '账户登录');
+
+		const deviceInfo = wx.getDeviceInfo();
+		this.setData({
+			showLogo: !deviceInfo.system.includes("iOS 26")
+		})
+		if (!this.data.showLogo) setTimeout(() => {
+			this.setData({
+				showLogo: true
+			})
+		}, 1000);
 	},
 	changeLanguages(e) {
 		let item = this.data.languages[e.detail.value];
-		console.log("item", getApp().globalData.Language.getLanguages)
 		getApp().globalData.Language.getLanguages(item.languagecode).then(res => {
 			this.setData({
 				languagename: item.languagename || '简体中文',

+ 33 - 42
pages/login/phone.wxml

@@ -1,45 +1,36 @@
-<block wx:if="{{language['新建']}}">
-	<view class="logo">
-		<image src="/static/image/logo.png" bindtap="todev" />
-	</view>
+<view class="logo">
+	<image wx:if="{{showLogo}}" src="/static/image/logo.png" bindtap="todev" />
+</view>
 
-	<!-- 手机号登录  -->
-	<!-- <phone id='login' language="{{language}}" /> -->
-	<!-- 账号登录 -->
-	<account id='login' language="{{language}}" />
-	<view style="width: 100vw; text-align: center;margin-top: 60rpx;margin-bottom: 40rpx;">
-		<van-button disabled='{{disabled}}' custom-class='login' bindtap="userLogin" loading='{{loading}}'
-			loading-text="{{language['登录中']||'登录中'}}..." color='linear-gradient(90deg, #3874F6 0%, #095DE0 100%);'>
-			{{language['登录']||'登录'}}
-		</van-button>
-	</view>
-	<view class="agreement">
-		<van-checkbox icon-size="28rpx" label-class='con' value="{{ isAgree }}" bind:change="isAgreeChange">
-			{{language['已阅读并同意']||'已阅读并同意'}}<text catchtap="checkTheAgreement">《{{language['隐私协议']||'隐私协议'}}》</text>
-		</van-checkbox>
-	</view>
-	<block>
-		<view style="height: 100rpx;" />
-		<van-divider contentPosition="center">{{language['其他登录方式']||'其他登录方式'}}</van-divider>
-		<view style="width: 100%; text-align: center;">
-			<text class="iconfont icon-a-wodebangdingweixin" style="font-size: 100rpx; color:#07C160;"
-				bindtap="wechatLogin" />
-		</view>
-	</block>
+<!-- 手机号登录  -->
+<!-- <phone id='login' language="{{language}}" /> -->
+<!-- 账号登录 -->
+<account id='login' language="{{language}}" />
+<view style="width: 100vw; text-align: center;margin-top: 60rpx;margin-bottom: 40rpx;">
+	<van-button disabled='{{disabled}}' custom-class='login' bindtap="userLogin" loading='{{loading}}' loading-text="{{language['登录中']||'登录中'}}..." color='linear-gradient(90deg, #3874F6 0%, #095DE0 100%);'>
+		{{language['登录']||'登录'}}
+	</van-button>
+</view>
+<view class="agreement">
+	<van-checkbox icon-size="28rpx" label-class='con' value="{{ isAgree }}" bind:change="isAgreeChange">
+		{{language['已阅读并同意']||'已阅读并同意'}}<text catchtap="checkTheAgreement">《{{language['隐私协议']||'隐私协议'}}》</text>
+	</van-checkbox>
+</view>
+<view style="height: 100rpx;" />
+<van-divider contentPosition="center">{{language['其他登录方式']||'其他登录方式'}}</van-divider>
+<view style="width: 100%; text-align: center;">
+	<text class="iconfont icon-a-wodebangdingweixin" style="font-size: 100rpx; color:#07C160;" bindtap="wechatLogin" />
+</view>
 
-	<view wx:if="{{languages.length}}" style="text-align: center; margin-top: 20px;">
-		<picker mode="selector" range="{{languages}}" range-key='languagename' value="{{rowIndex}}"
-			bindchange='changeLanguages'>
-			{{languagename}}
-		</picker>
-	</view>
+<view wx:if="{{languagename}}" style="text-align: center; margin-top: 20px;">
+	<picker mode="selector" range="{{languages}}" range-key='languagename' value="{{rowIndex}}" bindchange='changeLanguages'>
+		{{languagename}}
+	</picker>
+</view>
 
-	<van-dialog use-slot show='{{ showDialog }}' confirmButtonText="{{language['同意并获取']||'同意并获取'}}"
-		cancelButtonText="{{language['取消']||'取消'}}" confirm-button-color='var(--assist)' show-cancel-button
-		bind:confirm='onConfirm'>
-		<view class="dialog">
-			{{language['请阅读并同意']||'请阅读并同意'}}
-			<navigator class="navigator" url="#" bind:tap="checkTheAgreement">《{{language['隐私协议']||'隐私协议'}}》</navigator>
-		</view>
-	</van-dialog>
-</block>
+<van-dialog use-slot show='{{ showDialog }}' confirmButtonText="{{language['同意并获取']||'同意并获取'}}" cancelButtonText="{{language['取消']||'取消'}}" confirm-button-color='var(--assist)' show-cancel-button bind:confirm='onConfirm'>
+	<view class="dialog">
+		{{language['请阅读并同意']||'请阅读并同意'}}
+		<navigator class="navigator" url="#" bind:tap="checkTheAgreement">《{{language['隐私协议']||'隐私协议'}}》</navigator>
+	</view>
+</van-dialog>