@zscreate/zhxy-app-component 1.0.343 → 1.0.345

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2119,6 +2119,8 @@ export default {
2119
2119
  } else if(this.widget.type === "slider"){
2120
2120
  if(typeof value == "string" && value === ""){
2121
2121
  this.dataModel = 0;
2122
+ } else {
2123
+ this.dataModel = value;
2122
2124
  }
2123
2125
  } else {
2124
2126
  this.dataModel = value
@@ -2163,8 +2165,14 @@ export default {
2163
2165
  let departId = -1
2164
2166
  let departName = ""
2165
2167
  if (this.widget.options.departRelation) {
2166
- const userInfo = uni.getStorageSync('userinfo')
2167
- console.log("userInfo: ", userInfo)
2168
+ let userInfo = uni.getStorageSync('userinfo')
2169
+ if (typeof userinfo === 'string') {
2170
+ try {
2171
+ userinfo = JSON.parse(userinfo);
2172
+ } catch (e) {
2173
+ userinfo = {};
2174
+ }
2175
+ }
2168
2176
  departId = this.widget.options.departId || userInfo.departId || userInfo.depart_id
2169
2177
  departName = this.widget.options.departName || userInfo.departName || userInfo.depart_name
2170
2178
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zscreate/zhxy-app-component",
3
- "version": "1.0.343",
3
+ "version": "1.0.345",
4
4
  "private": false,
5
5
  "description": "zhxy-app-component",
6
6
  "main": "index.js",