Forráskód Böngészése

强制修改默认密码

xiaohaizhao 5 hónapja
szülő
commit
8117634f8d

+ 1 - 1
packageA/account/index.wxml

@@ -56,7 +56,7 @@
 <navigator url="#" class="record" wx:for="{{recordList}}" wx:key="sa_accountclassid">
 <navigator url="#" class="record" wx:for="{{recordList}}" wx:key="sa_accountclassid">
     <view class="content">
     <view class="content">
         <view class="title">{{item.type==0?'支出':'收入'}}{{item.source?'-'+item.source:""}}</view>
         <view class="title">{{item.type==0?'支出':'收入'}}{{item.source?'-'+item.source:""}}</view>
-        <view class="exp">{{item.accountname}}:{{item.showBalance}}</view>
+        <!-- <view class="exp">{{item.accountname}}:{{item.showBalance}}</view> -->
         <view class="exp">优惠金额:{{item.discountamount}}</view>
         <view class="exp">优惠金额:{{item.discountamount}}</view>
         <view class="exp">分类:{{item.class || ' --'}}</view>
         <view class="exp">分类:{{item.class || ' --'}}</view>
         <view class="exp">交易备注:{{item.remarks || ' --'}}</view>
         <view class="exp">交易备注:{{item.remarks || ' --'}}</view>

+ 2 - 2
packageA/fittings/modules/product/index.js

@@ -235,10 +235,10 @@ Component({
                         "id": 20230208140203,
                         "id": 20230208140203,
                         "content": {
                         "content": {
                             "isadmin": 1,
                             "isadmin": 1,
-                            ishasitem:true,
+                            ishasitem: 1,
                             "where": {
                             "where": {
                                 "sys_enterpriseid_service": this.data.base.sys_enterpriseid,
                                 "sys_enterpriseid_service": this.data.base.sys_enterpriseid,
-                                ishasitem:true,
+                                ishasitem: 1,
                             },
                             },
                             "pageSize": 20,
                             "pageSize": 20,
                             "pageNumber": 1,
                             "pageNumber": 1,

+ 1 - 8
packageA/fittings/modules/product/list/index.wxml

@@ -159,14 +159,6 @@
                 {{viewItem.machinemodel || '--'}}
                 {{viewItem.machinemodel || '--'}}
             </view>
             </view>
         </view>
         </view>
-        <view class="item">
-            <view class="label">
-                规格
-            </view>
-            <view class="value">
-                {{viewItem.spec || '--'}}
-            </view>
-        </view>
         <view class="item">
         <view class="item">
             <view class="label">
             <view class="label">
                 工单号
                 工单号
@@ -191,6 +183,7 @@
                 {{viewItem.workorderstatus || '--'}}
                 {{viewItem.workorderstatus || '--'}}
             </view>
             </view>
         </view>
         </view>
+        <view class="item"></view>
         <view class="item">
         <view class="item">
             <view class="label">
             <view class="label">
                 历史申报数
                 历史申报数

+ 1 - 14
pages/index/index.js

@@ -30,20 +30,7 @@ Page({
 
 
 		this.updateMsgCount();
 		this.updateMsgCount();
 		this.getAnnunciate();
 		this.getAnnunciate();
-		if (getApp().globalData.remindchangepassword_str) wx.showModal({
-			title: "提示",
-			content: getApp().globalData.remindchangepassword_str,
-			confirmText: '前往修改',
-			cancelText: "下次再说",
-			success: ({
-				confirm
-			}) => {
-				getApp().globalData.remindchangepassword_str = null;
-				if (confirm) wx.navigateTo({
-					url: '/pages/index/userCenter/changePassword/index',
-				})
-			},
-		})
+
 		getApp().globalData.http.refreshData = this.refreshData.bind(this);
 		getApp().globalData.http.refreshData = this.refreshData.bind(this);
 		this.getVIndete();
 		this.getVIndete();
 	},
 	},

+ 17 - 12
pages/index/userCenter/changePassword/index.js

@@ -2,9 +2,6 @@ const md5 = require("../../../../utils/md5");
 const _Http = getApp().globalData.http;
 const _Http = getApp().globalData.http;
 import Toast from '@vant/weapp/toast/toast';
 import Toast from '@vant/weapp/toast/toast';
 Page({
 Page({
-    /**
-     * 页面的初始数据
-     */
     data: {
     data: {
         from: {
         from: {
             password: "", //原密码
             password: "", //原密码
@@ -15,12 +12,24 @@ Page({
         loading: false,
         loading: false,
         confirmPassword: "",
         confirmPassword: "",
     },
     },
-
-    /**
-     * 生命周期函数--监听页面加载
-     */
     onLoad(options) {
     onLoad(options) {
-
+        console.log(options)
+        let site = wx.getStorageSync('siteP');
+        if (options.token) {
+            _Http.base({
+                "classname": "webmanage.site.site",
+                "method": "querySite_Parameter",
+                "content": {},
+                accesstoken: options.token
+            }).then(res => {
+                console.log("获取站点数据", res)
+                if (res.msg != '成功') return wx.showToast({
+                    title: res.msg,
+                    icon: "none"
+                });
+                site = res.data;
+            })
+        }
     },
     },
     /* 修改密码 */
     /* 修改密码 */
     changePassword() {
     changePassword() {
@@ -49,10 +58,6 @@ Page({
                 title: res.msg,
                 title: res.msg,
                 icon: "none"
                 icon: "none"
             })
             })
-            /* Toast({
-                           message: res.msg,
-                           position: 'bottom'
-                       }); */
             this.setData({
             this.setData({
                 disabled: true
                 disabled: true
             })
             })

+ 14 - 1
pages/login/modules/account.js

@@ -69,6 +69,20 @@ Component({
 				"imagecaptcha": this.data.imagecaptcha || '',
 				"imagecaptcha": this.data.imagecaptcha || '',
 				"systemclient": "wechatsaletool"
 				"systemclient": "wechatsaletool"
 			}).then(res => {
 			}).then(res => {
+				if (res.remindchangepassword) return wx.showModal({
+					title: '提示',
+					content: '当前密码为系统初始化密码,请修改后重新登录',
+					showCancel: false,
+					confirmText: "前去修改",
+					complete: () => {
+						wx.navigateTo({
+							url: '/pages/index/userCenter/changePassword/index?token=' + res.account_list[0].token
+						})
+						getCurrentPages()[0].setData({
+							loading: false
+						})
+					}
+				})
 				getCurrentPages()[0].setData({
 				getCurrentPages()[0].setData({
 					loading: false
 					loading: false
 				})
 				})
@@ -81,7 +95,6 @@ Component({
 					password: (this.data.memory) ? this.data.password : ''
 					password: (this.data.memory) ? this.data.password : ''
 				})
 				})
 				loginMsg.loginMsg(res);
 				loginMsg.loginMsg(res);
-				getApp().globalData.remindchangepassword_str = res.remindchangepassword_str;
 			})
 			})
 		}
 		}
 	}
 	}

+ 1 - 1
pages/login/modules/account.wxml

@@ -26,5 +26,5 @@
         bind:change="isMemory">
         bind:change="isMemory">
         记住密码
         记住密码
     </van-checkbox>
     </van-checkbox>
-    <navigator url="./retrievePassword" class="view">忘记密码?</navigator>
+    <!-- <navigator url="./retrievePassword" class="view">忘记密码?</navigator> -->
 </view>
 </view>

+ 0 - 5
pages/login/modules/login.js

@@ -9,11 +9,6 @@ function loginMsg(res) {
             title: '该账号已被停用,无法登录',
             title: '该账号已被停用,无法登录',
             icon: "none"
             icon: "none"
         });
         });
-        if (item.usertype == 2) return wx.showModal({
-            title: '提示',
-            content: '该账号为区域经理,请使用云链E营销小程序登录',
-            showCancel: false
-        })
         wx.setStorageSync('userrole', item.usertype == 1 ? '业务员' : '经销商');
         wx.setStorageSync('userrole', item.usertype == 1 ? '业务员' : '经销商');
         wx.setStorageSync('userMsg', item)
         wx.setStorageSync('userMsg', item)
         query_userauth();
         query_userauth();

+ 0 - 1
pages/login/phone.js

@@ -47,7 +47,6 @@ Page({
                             icon: "none"
                             icon: "none"
                         })
                         })
                         loginMsg.loginMsg(res);
                         loginMsg.loginMsg(res);
-                        getApp().globalData.remindchangepassword_str = res.remindchangepassword_str;
                     })
                     })
                 } else {
                 } else {
                     console.log('登录失败!' + res.errMsg)
                     console.log('登录失败!' + res.errMsg)