Browse Source

设置页面

LiFei 6 years atrás
parent
commit
8086f1dbe1
7 changed files with 110 additions and 2 deletions
  1. 2 1
      app.json
  2. 6 0
      pages/mine/index.js
  3. 1 1
      pages/mine/index.wxml
  4. 47 0
      pages/set/index.js
  5. 3 0
      pages/set/index.json
  6. 9 0
      pages/set/index.wxml
  7. 42 0
      pages/set/index.wxss

+ 2 - 1
app.json

@@ -51,7 +51,8 @@
     "pages/reward/index",
     "pages/pt-tip/index",
     "pages/collection-list/index",
-    "pages/interview/index"
+    "pages/interview/index",
+    "pages/set/index"
   ],
   "window": {
     "backgroundTextStyle": "light",

+ 6 - 0
pages/mine/index.js

@@ -151,5 +151,11 @@ Page({
     wx.navigateTo({
       url: '../interview/index',
     })
+  },
+  setup(){
+    //设置
+    wx.navigateTo({
+      url: '../set/index',
+    })
   }
 })

+ 1 - 1
pages/mine/index.wxml

@@ -94,7 +94,7 @@
   <image class='jiantou' src='{{imgServerUrl}}/images/happyjob/rightwjt.png'></image>
 </view>
 
-<view class='query'>
+<view class='query' bindtap='setup'>
   <view class='querys'>
     <image class='moneytb' src='{{imgServerUrl}}/images/happyjob/shezhi.png'></image>
     <text class='queryxz'>设置</text>

+ 47 - 0
pages/set/index.js

@@ -0,0 +1,47 @@
+import {
+  imgServerUrl
+} from '../../config/config.js'
+import {
+  showToast
+} from '../../utils/tips.js'
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    imgServerUrl: imgServerUrl,
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+  toclear(){
+    wx.showModal({
+      title: '清除缓存',
+      content: '是否清除所有缓存内容',
+      success(res) {
+        if (res.confirm) {
+          try {
+            wx.clearStorage()
+            wx.clearStorageSync()
+            showToast('清除成功')
+          } catch (e) {
+            // Do something when catch error
+          }
+        } else if (res.cancel) {
+          console.log('用户点击取消')
+        }
+      }
+    })
+  },
+  toabout(){
+    wx.navigateTo({
+      url: '../about/index',
+    })
+  }
+
+})

+ 3 - 0
pages/set/index.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 9 - 0
pages/set/index.wxml

@@ -0,0 +1,9 @@
+<view class='clear' bindtap='toclear'>
+  <view class='cleartip'>清除缓存</view>
+  <image class='jiantou' src='{{imgServerUrl}}/images/happyjob/rightwjt.png'></image>
+</view>
+
+<view class='about' bindtap='toabout'>
+  <view class='aboutus'>关于我们</view>
+  <image class='jiantou' src='{{imgServerUrl}}/images/happyjob/rightwjt.png'></image>
+</view>

+ 42 - 0
pages/set/index.wxss

@@ -0,0 +1,42 @@
+.clear {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  align-items: center;
+  height: 76rpx;
+  width: 100%;
+  border-bottom: 1rpx solid rgba(221, 221, 221, 1);
+  border-top: 1rpx solid rgba(242, 242, 242, 1);
+}
+
+.cleartip {
+  font-size: 28rpx;
+  font-family: SourceHanSansCN-Regular;
+  font-weight: 400;
+  color: rgba(34, 34, 34, 1);
+  margin-left: 30rpx;
+}
+
+.jiantou {
+  width: 17rpx;
+  height: 29rpx;
+  margin-right: 30rpx;
+}
+
+.about {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  align-items: center;
+  height: 76rpx;
+  width: 100%;
+  border-bottom: 1rpx solid rgba(221, 221, 221, 1);
+}
+
+.aboutus {
+  font-size: 28rpx;
+  font-family: SourceHanSansCN-Regular;
+  font-weight: 400;
+  color: rgba(34, 34, 34, 1);
+  margin-left: 30rpx;
+}