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

列表页面移除city获取用户微信的城市信息,不需要

ZhangWenQiang 6 éve
szülő
commit
1f33103925

+ 1 - 1
pages/city/index.js

@@ -195,7 +195,7 @@ Page({
     });
     wx.getSetting({
       success: function(res) {
-        if (!res.authSetting['scope.userInfo'] || !res.authSetting['scope.userLocation']) {
+        if (!res.authSetting['scope.userLocation']) {
           wx.hideLoading();
           wx.showModal({
             title: '授权提示',

+ 1 - 1
pages/fuli/index.js

@@ -65,7 +65,7 @@ Page({
 
   },
   start() {
-    let cityName = wx.getStorageSync('city') || app.globalData.userInfo.city || '无锡';
+    let cityName = wx.getStorageSync('city') || '无锡';
     let cityCode = wx.getStorageSync('cityCode') || '320200';
     console.log(cityName)
     this.setData({

+ 1 - 1
pages/fulltime/index.js

@@ -43,7 +43,7 @@ Page({
 
   },
   start() {
-    let cityName = wx.getStorageSync('city') || app.globalData.userInfo.city || '无锡';
+    let cityName = wx.getStorageSync('city') || '无锡';
     let cityCode = wx.getStorageSync('cityCode') || '320200';
     console.log(cityName)
     this.setData({

+ 1 - 1
pages/index/index.js

@@ -60,7 +60,7 @@ Page({
       this.start();
   },
   start() {
-    let cityName = wx.getStorageSync('city') || app.globalData.userInfo.city || '无锡'
+    let cityName = wx.getStorageSync('city') || '无锡';
     let cityCode = wx.getStorageSync('cityCode') || '320200';
     console.log(cityName)
     console.log(cityCode)

+ 1 - 1
pages/jipin/index.js

@@ -44,7 +44,7 @@ Page({
   },
 
   start() {
-    let cityName = wx.getStorageSync('city') || app.globalData.userInfo.city || '无锡';
+    let cityName = wx.getStorageSync('city') || '无锡';
     let cityCode = wx.getStorageSync('cityCode') || '320200';
     console.log(cityName)
     this.setData({

+ 2 - 2
pages/mine/index.wxml

@@ -63,8 +63,8 @@
   </view>
 
   <view class='percent'>
-    <text class='full' wx:if="{{percent==100}}">{{percent}}%</text>
-    <text class='unfull' wx:if="{{percent!=100}}">{{percent}}%</text>
+    <view class='full' wx:if="{{percent==100}}">{{percent}}%</view>
+    <view class='unfull' wx:if="{{percent!=100}}">{{percent}}%</view>
     <view class='nows' wx:if="{{percent!=100}}">
       <image src='{{imgServerUrl}}/images/happyjob/edit.png'></image>
       <text class='unwz'>继续完善</text>

+ 1 - 2
pages/mine/index.wxss

@@ -263,6 +263,7 @@ page {
 .jianli .percent {
   display: flex;
   flex-direction: column;
+  padding-right: 20rpx;
 }
 
 .jianli .percent .full {
@@ -270,7 +271,6 @@ page {
   font-family: Arial-BoldMT;
   font-weight: bold;
   color: rgba(255, 64, 14, 1);
-  padding-right: 30rpx;
 }
 
 .jianli .percent .unfull {
@@ -278,7 +278,6 @@ page {
   font-family: Arial-BoldMT;
   font-weight: bold;
   color: rgba(153, 153, 153, 1);
-  padding-right: 30rpx;
 }
 
 .jianli .percent .nows {

+ 1 - 1
pages/parttime/index.js

@@ -70,7 +70,7 @@ Page({
   },
 
   start() {
-    let cityName = wx.getStorageSync('city') || app.globalData.userInfo.city || '无锡';
+    let cityName = wx.getStorageSync('city') || '无锡';
     let cityCode = wx.getStorageSync('cityCode') || '320200';
     console.log(cityName)
     this.setData({

+ 17 - 19
pages/pt/index.js

@@ -27,7 +27,6 @@ Page({
     myFormat: ['天', ':', ':', ' '],
     list: [],
     showNoMore: "没有更多信息...", //显示已无更多
-    canIUse: wx.canIUse('button.open-type.getUserInfo'),
   },
   onLoad: function(options) {
 
@@ -35,6 +34,23 @@ Page({
   onReady: function() {
 
   },
+  onShow: function() {
+    this.start();
+  },
+  start() {
+    let cityName = wx.getStorageSync('city') || '无锡'
+    let cityCode = wx.getStorageSync('cityCode') || '320200';
+    console.log(cityName)
+    console.log(cityCode)
+    this.setData({
+      cityName: cityName,
+      cityCode: cityCode,
+      pageNo: 1, //当前分页
+      isScroll: true, //是否可以滚动
+      list: []
+    })
+    this.fetchList()
+  },
   //下拉刷新
   onPullDownRefresh: function() {
     this.setData({
@@ -52,24 +68,6 @@ Page({
     })
     this.fetchList()
   },
-  onShow: function() {
-    this.start();
-  },
-  start() {
-    let cityName = wx.getStorageSync('city') || app.globalData.userInfo.city || '无锡'
-    let cityCode = wx.getStorageSync('cityCode') || '320200';
-    console.log(cityName)
-    console.log(cityCode)
-    this.setData({
-      cityName: cityName,
-      cityCode: cityCode,
-      pageNo: 1, //当前分页
-      isScroll: true, //是否可以滚动
-      list: []
-    })
-    this.fetchList()
-  },
-
   //获取拼团列表数据
   fetchList() {
     if (!this.data.isScroll) {

+ 1 - 1
pages/reward/index.js

@@ -44,7 +44,7 @@ Page({
   },
 
   start() {
-    let cityName = wx.getStorageSync('city') || app.globalData.userInfo.city || '无锡';
+    let cityName = wx.getStorageSync('city') || '无锡';
     let cityCode = wx.getStorageSync('cityCode') || '320200';
     console.log(cityName)
     this.setData({