Kaynağa Gözat

更换图片

wangxin 5 yıl önce
ebeveyn
işleme
53e8ccdfc0

+ 10 - 10
pages/clock/clock-rule/clock-rule.js

@@ -2,7 +2,7 @@
 import {
   imgServerUrl
 } from '../../../config/config.js'
-const WxParse = require('../../../plugins/wxParse/wxParse.js');
+// const WxParse = require('../../../plugins/wxParse/wxParse.js');
 
 Page({
 
@@ -31,15 +31,15 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-    WxParse.wxParse('rule', 'html', `
-    这里是周结打卡细则:
-    1,这里是规则明细;
-    1,这里是规则明细;
-    1,这里是规则明细;
-    1,这里是规则明细;
-    1,这里是规则明细;
-    1,这里是规则明细;
-    1,这里是规则明细;`, this, 5);
+    // WxParse.wxParse('rule', 'html', `
+    // 这里是周结打卡细则:
+    // 1,这里是规则明细;
+    // 1,这里是规则明细;
+    // 1,这里是规则明细;
+    // 1,这里是规则明细;
+    // 1,这里是规则明细;
+    // 1,这里是规则明细;
+    // 1,这里是规则明细;`, this, 5);
   },
 
   /**

+ 4 - 4
pages/clock/clock-rule/clock-rule.wxml

@@ -1,6 +1,6 @@
 <!--pages/clock/clock-rule/clock-rule.wxml-->
-<import src="../../../plugins/wxParse/wxParse.wxml" />
-<image src='{{imgServerUrl}}/images/clock/clock-rule.png'></image>
-<view class="content">
+<!-- <import src="../../../plugins/wxParse/wxParse.wxml" /> -->
+<image src='{{imgServerUrl}}/images/clock/clock-rule.png' mode="widthFix"></image>
+<!-- <view class="content">
   <template is="wxParse" data="{{wxParseData:rule.nodes}}" />
-</view>
+</view> -->

+ 6 - 5
pages/clock/clock-rule/clock-rule.wxss

@@ -1,17 +1,18 @@
 /* pages/clock/clock-rule/clock-rule.wxss */
 page {
-  background-color: #f5f5f5;
+  /* background-color: #f5f5f5; */
+  font-size: 0;
 }
 
 image {
   width: 100%;
-  height: 440rpx;
-  margin: 22rpx 0;
+  /* height: 440rpx;
+  margin: 22rpx 0; */
 }
 
-.content {
+/* .content {
   width: 100%;
   box-sizing: border-box;
   background-color: #fff;
   padding: 30rpx;
-}
+} */

+ 6 - 1
pages/clock/clock.js

@@ -39,6 +39,11 @@ Page({
     sumMoney: 0,
     wsPunchClockId: null
   },
+  toRule() {
+    wx.navigateTo({
+      url: './clock-rule/clock-rule',
+    })
+  },
   getLocation() {
     return new Promise(reslove => {
       wx.getLocation({
@@ -157,7 +162,7 @@ Page({
   async load() {
     const data = await this.location()
     punchClockNeedInfo({ longitude: data.longitude, latitude: data.latitude }).then(data => {
-    // punchClockNeedInfo({ longitude: 120.353312, latitude: 31.535582 }).then(data => {
+      // punchClockNeedInfo({ longitude: 120.353312, latitude: 31.535582 }).then(data => {
       let {
         authenticationStatus,
         startPunch,

+ 3 - 3
pages/clock/clock.wxml

@@ -20,7 +20,7 @@
         前往认证
       </navigator>
     </view>
-    <image src="{{imgServerUrl}}/images/clock/clock-video.png" class="video"></image>
+    <image bindtap="toRule" src="{{imgServerUrl}}/images/clock/clock-video.png" class="video"></image>
   </view>
   <view class="no-pass" wx:elif="{{approveStatus === 2}}">
     <view class="header">
@@ -101,7 +101,7 @@
         <text>{{statusMessage}}</text>
       </view>
       <view class="reload-location" bindtap="load" wx:if="{{clockType === 3}}">
-        <image src="../../images/clock/refresh.png"></image>
+        <image src="{{imgServerUrl}}/images/clock/refresh.png"></image>
         <text>重新定位</text>
       </view>
       <view class="prepayable">
@@ -112,6 +112,6 @@
         </view>
       </view>
     </view>
-    <image src="{{imgServerUrl}}/images/clock/clock-video-home.png" class="video"></image>
+    <image bindtap="toRule" src="{{imgServerUrl}}/images/clock/clock-video.png" class="video"></image>
   </view>
 </view>

+ 2 - 2
pages/clock/clock.wxss

@@ -312,7 +312,7 @@ page {
 }
 
 .video {
-  height: 248rpx;
-  width: 690rpx;
+  height: 268rpx;
+  width: 710rpx;
   margin: 0 auto;
 }