瀏覽代碼

活动二维码+二维码核销

zxy 1 年之前
父節點
當前提交
0eced19c18

+ 6 - 1
nngkxxdp/pom.xml

@@ -231,7 +231,12 @@
             <artifactId>smiley-http-proxy-servlet</artifactId>
             <version>1.12.1</version>
         </dependency>
-
+        <!--生成二维码-->
+        <dependency>
+            <groupId>com.google.zxing</groupId>
+            <artifactId>javase</artifactId>
+            <version>3.3.0</version>
+        </dependency>
     </dependencies>
     <profiles>
         <profile>

+ 1 - 0
nngkxxdp/src/main/java/com/example/nngkxxdp/filters/LoginFilter.java

@@ -53,6 +53,7 @@ public class LoginFilter implements Filter {
                 case "/mini/hlw/forward":
                 case "/mini/hlw/getAllLeader":
                 case "/mini/hlw/favorites":
+                case "/mini/qrCode/writeOffQrCode":
                     chain.doFilter(req, response);
                     break;
                 default:

+ 90 - 0
nngkxxdp/src/main/java/com/example/nngkxxdp/program/controller/QrCodeController.java

@@ -0,0 +1,90 @@
+package com.example.nngkxxdp.program.controller;
+
+import cn.hutool.core.util.StrUtil;
+import com.example.nngkxxdp.program.constant.MiniConstant;
+import com.example.nngkxxdp.program.entity.QrcodeWriteoff;
+import com.example.nngkxxdp.program.service.QrcodeWriteoffService;
+import com.example.nngkxxdp.program.util.MiniTokenUtil;
+import com.example.nngkxxdp.util.Blank;
+import com.example.nngkxxdp.util.ConstStr;
+import com.example.nngkxxdp.util.SendUtil;
+import com.google.zxing.BarcodeFormat;
+import com.google.zxing.WriterException;
+import com.google.zxing.client.j2se.MatrixToImageWriter;
+import com.google.zxing.common.BitMatrix;
+import com.google.zxing.qrcode.QRCodeWriter;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.Map;
+
+@RestController
+@RequestMapping("/mini/qrCode")
+public class QrCodeController {
+
+    @Resource
+    QrcodeWriteoffService qrcodeWriteoffService;
+
+    /**
+     * 获取二维码
+     *
+     * @param response
+     * @throws WriterException
+     * @throws IOException
+     */
+    @GetMapping("/getQrCode")
+    public void getQrCode(HttpServletRequest request, HttpServletResponse response, String qrcodeSign) throws WriterException, IOException {
+        //获取userId
+        String token = request.getHeader(MiniConstant.MINI_TOKEN);
+        String userId = Blank.isNotEmpty(token) ? MiniTokenUtil.getId(token).asString() : null;
+        if (StrUtil.isEmpty(userId)) {
+            response.setStatus(401);
+        }
+        //根据二维码标记和用户id判断用户此次活动二维码是否已经核销
+        QrcodeWriteoff qrcodeWriteoff = qrcodeWriteoffService.queryOneByQrcodeSignAndUserId(userId, qrcodeSign);
+        if (qrcodeWriteoff != null && qrcodeWriteoff.getWriteoffStatus() == 2) {
+            response.setStatus(400);
+        }
+        if (qrcodeWriteoff == null) {
+            qrcodeWriteoff = new QrcodeWriteoff();
+            qrcodeWriteoff.setAppletUserId(userId);
+            qrcodeWriteoff.setQrcodeSign(qrcodeSign);
+            qrcodeWriteoff.setWriteoffStatus(1);
+            qrcodeWriteoffService.add(qrcodeWriteoff);
+        }
+        QRCodeWriter qrCodeWriter = new QRCodeWriter();
+        BitMatrix bitMatrix = qrCodeWriter.encode(
+                "https://www.cqna.gov.cn/mnazw/mini/qrCode/writeOffQrCode?recordId=" + qrcodeWriteoff.getId(),
+                BarcodeFormat.QR_CODE, 350, 350
+        );
+        MatrixToImageWriter.writeToStream(bitMatrix, "PNG", response.getOutputStream());
+        response.setStatus(200);
+    }
+
+    /**
+     * 核销二维码
+     *
+     * @param recordId
+     * @return
+     */
+    @GetMapping("/writeOffQrCode")
+    public Map<String, Object> writeOffQrCode(HttpServletRequest request, HttpServletResponse response, Integer recordId) throws IOException {
+        QrcodeWriteoff qrcodeWriteoff = qrcodeWriteoffService.queryById(recordId);
+        if (qrcodeWriteoff == null) {
+            return SendUtil.send(false, ConstStr.REQUEST_WRONGPARAMS);
+        }
+        if (qrcodeWriteoff.getWriteoffStatus() == 2) {
+            response.sendRedirect("https://www.cqna.gov.cn/mnazw/applet/writeOff-fail.png" );
+            return SendUtil.send(false, "该二维码已核销:" + recordId);
+        }
+
+        Boolean result = qrcodeWriteoffService.writeoff(recordId);
+        response.sendRedirect(result ? "https://www.cqna.gov.cn/mnazw/applet/writeOff-success.png" : "https://www.cqna.gov.cn/mnazw/applet/writeOff-fail.png");
+        return SendUtil.send(result, result ? "二维码核销成" : "二维码核销失败");
+    }
+}

+ 20 - 0
nngkxxdp/src/main/java/com/example/nngkxxdp/program/dao/QrcodeWriteoffDao.java

@@ -0,0 +1,20 @@
+package com.example.nngkxxdp.program.dao;
+
+import com.example.nngkxxdp.program.entity.QrcodeWriteoff;
+import org.apache.ibatis.annotations.*;
+
+public interface QrcodeWriteoffDao {
+    @Select("SELECT * FROM t_qrcode_writeoff WHERE applet_user_id = #{userId} AND qrcode_sign = #{qrcodeSign}")
+    QrcodeWriteoff queryOneByQrcodeSignAndUserId(@Param("userId") String userId, @Param("qrcodeSign") String qrcodeSign);
+
+    @Insert("INSERT INTO `nazw`.`t_qrcode_writeoff` (`applet_user_id`, `qrcode_sign`, `writeoff_status`, `writeoff_time`)" +
+            " VALUES (#{appletUserId}, #{qrcodeSign}, #{writeoffStatus}, #{writeoffTime});")
+    @SelectKey(statement = "SELECT LAST_INSERT_ID()", keyProperty = "id", keyColumn = "id", before = false, resultType = Integer.class)
+    Integer add(QrcodeWriteoff qrcodeWriteoff);
+
+    @Update("UPDATE t_qrcode_writeoff SET writeoff_status = 2, writeoff_time = NOW() WHERE id = #{id}")
+    Integer writeoff(@Param("id") Integer id);
+
+    @Select("SELECT * FROM t_qrcode_writeoff WHERE id = #{id}")
+    QrcodeWriteoff queryById(@Param("id") Integer id);
+}

+ 19 - 0
nngkxxdp/src/main/java/com/example/nngkxxdp/program/entity/QrcodeWriteoff.java

@@ -0,0 +1,19 @@
+package com.example.nngkxxdp.program.entity;
+
+import lombok.Data;
+
+@Data
+public class QrcodeWriteoff {
+    private static final long serialVersionUID = 1L;
+
+    private int id;
+
+    //小程序用户id
+    private String appletUserId;
+    //二维码标记(每个标记代表一个活动)
+    private String qrcodeSign;
+    //核销状态(1:未核销,2:已核销)
+    private Integer writeoffStatus;
+    //核销时间
+    private String writeoffTime;
+}

+ 36 - 0
nngkxxdp/src/main/java/com/example/nngkxxdp/program/service/Impl/QrcodeWriteoffServiceImpl.java

@@ -0,0 +1,36 @@
+package com.example.nngkxxdp.program.service.Impl;
+
+import com.example.nngkxxdp.program.dao.QrcodeWriteoffDao;
+import com.example.nngkxxdp.program.entity.QrcodeWriteoff;
+import com.example.nngkxxdp.program.service.QrcodeWriteoffService;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+
+@Service
+public class QrcodeWriteoffServiceImpl implements QrcodeWriteoffService {
+
+    @Resource
+    QrcodeWriteoffDao qrcodeWriteoffDao;
+
+    @Override
+    public QrcodeWriteoff queryOneByQrcodeSignAndUserId(String userId, String qrcodeSign) {
+        return qrcodeWriteoffDao.queryOneByQrcodeSignAndUserId(userId, qrcodeSign);
+    }
+
+    @Override
+    public boolean add(QrcodeWriteoff qrcodeWriteoff) {
+        return qrcodeWriteoffDao.add(qrcodeWriteoff) > 0;
+    }
+
+    @Override
+    public boolean writeoff(Integer id) {
+        return qrcodeWriteoffDao.writeoff(id) > 0;
+    }
+
+    @Override
+    public QrcodeWriteoff queryById(Integer id) {
+        return qrcodeWriteoffDao.queryById(id);
+    }
+}

+ 13 - 0
nngkxxdp/src/main/java/com/example/nngkxxdp/program/service/QrcodeWriteoffService.java

@@ -0,0 +1,13 @@
+package com.example.nngkxxdp.program.service;
+
+import com.example.nngkxxdp.program.entity.QrcodeWriteoff;
+
+public interface QrcodeWriteoffService {
+    QrcodeWriteoff queryOneByQrcodeSignAndUserId(String userId, String qrcodeSign);
+
+    boolean add(QrcodeWriteoff qrcodeWriteoff);
+
+    boolean writeoff(Integer id);
+
+    QrcodeWriteoff queryById(Integer id);
+}

+ 1 - 1
nngkxxdp/src/main/java/com/example/nngkxxdp/task/WxTask.java

@@ -41,7 +41,7 @@ public class WxTask {
     /**
      * TODO 网站更新需将此定时任务取消
      */
-//    @Scheduled(cron = "0 0 0/2 * * ?")
+    @Scheduled(cron = "0 0 0/2 * * ?")
     public void getWxToken(){
         System.err.println("定时开始");
         String post = HttpUtil.post(MiniConstant.ACCESSTOKEN+"?grant_type=client_credential&appid="+MiniConstant.APPID+"&secret="+MiniConstant.SECRET,"");

+ 130 - 129
nnzwminiapp/app.json

@@ -1,132 +1,133 @@
 {
-  "pages": [
-    "pages/index/index",
-    "pages/publics/index/index",
-    "pages/collection/collection",
-    "pages/newsPaper/newsPaper",
-    "pages/customerServe/customerServe",
-    "pages/ZCWDK/add/add",
-    "pages/ZCWDK/index/index",
-    "pages/nais/nais",
-    "pages/dataCenterZWTJ/dataCenterZWTJ",
-    "pages/login/login",
-    "pages/deliciousList/deliciousList",
-    "pages/aticleList/aticleList",
-    "pages/commentList/commentList",
-    "pages/serve/serve",
-    "pages/dataCenter/dataCenter",
-    "pages/dataCenterXXTJ/dataCenterXXTJ",
-    "pages/ZCWDK/info/info",
-    "pages/articlDetail/articlDetail",
-    "pages/yjzjDetail/yjzjDetail",
-    "pages/programList/programList",
-    "pages/leaveMessage/leaveMessage",
-    "pages/leaveMessage2/leaveMessage2",
-    "pages/web/web",
-    "pages/comment/comment",
-    "pages/publics/government/government",
-    "pages/publics/publicLeaderDetail/publicLeaderDetail",
-    "pages/publics/leaderInfo/leaderInfo",
-    "pages/publics/governmentArticles/governmentArticles",
-    "pages/publics/governmentArticlesDetail/governmentArticlesDetail",
-    "pages/publics/baseAffairs/baseAffairs",
-    "pages/publics/interpretation/interpretation",
-    "pages/publics/fileList/fileList",
-    "pages/publics/fileDetail/fileDetail",
-    "pages/myCenter/myCenter",
-    "pages/ourCanteen/ourCanteen",
-    "pages/publics/topics/topics",
-    "pages/zxft/fileList",
-    "pages/blankpage/blankpage",
-    "pages/publics/publicSystem/publicSystem",
-    "pages/publics/publicContent/publicContent",
-    "pages/zmhd/zmhd",
-    "pages/videoRecommend/videoRecommend",
-    "pages/phoneNewsPaper/phoneNewsPaper",
-    "pages/map/map",
-    "pages/map-vr/map-vr",
-    "pages/aticle1/aticle",
-    "pages/aticle2/aticle",
-    "pages/nnzzd/nnzzd"
-  ],
-  "requiredPrivateInfos": [
-    "getLocation",
-    "choosePoi"
-  ],
-  "subpackages": [
-    {
-      "root": "pagesPublic",
-      "pages": [
-        "pages/yxnaJfq/yxnaJfq",
-        "pages/yxnaJfh/yxnaJfh",
-        "pages/yxnaQxn/yxnaQxn",
-        "pages/yxna/yxna",
-        "pages/album/album",
-        "pages/albumDetail/albumDetail",
-        "pages/albumEdit/albumEdit",
-        "pages/menu/menu",
-        "pages/myCollection/myCollection",
-        "pages/myComment/myComment",
-        "pages/like/like",
-        "pages/work-order/work-order",
-        "pages/work-order-detail/work-order-detail"
-      ]
+    "pages": [
+        "pages/index/index",
+        "pages/publics/index/index",
+        "pages/collection/collection",
+        "pages/newsPaper/newsPaper",
+        "pages/customerServe/customerServe",
+        "pages/ZCWDK/add/add",
+        "pages/ZCWDK/index/index",
+        "pages/nais/nais",
+        "pages/dataCenterZWTJ/dataCenterZWTJ",
+        "pages/login/login",
+        "pages/deliciousList/deliciousList",
+        "pages/aticleList/aticleList",
+        "pages/commentList/commentList",
+        "pages/serve/serve",
+        "pages/dataCenter/dataCenter",
+        "pages/dataCenterXXTJ/dataCenterXXTJ",
+        "pages/ZCWDK/info/info",
+        "pages/articlDetail/articlDetail",
+        "pages/yjzjDetail/yjzjDetail",
+        "pages/programList/programList",
+        "pages/leaveMessage/leaveMessage",
+        "pages/leaveMessage2/leaveMessage2",
+        "pages/web/web",
+        "pages/comment/comment",
+        "pages/publics/government/government",
+        "pages/publics/publicLeaderDetail/publicLeaderDetail",
+        "pages/publics/leaderInfo/leaderInfo",
+        "pages/publics/governmentArticles/governmentArticles",
+        "pages/publics/governmentArticlesDetail/governmentArticlesDetail",
+        "pages/publics/baseAffairs/baseAffairs",
+        "pages/publics/interpretation/interpretation",
+        "pages/publics/fileList/fileList",
+        "pages/publics/fileDetail/fileDetail",
+        "pages/myCenter/myCenter",
+        "pages/ourCanteen/ourCanteen",
+        "pages/publics/topics/topics",
+        "pages/zxft/fileList",
+        "pages/blankpage/blankpage",
+        "pages/publics/publicSystem/publicSystem",
+        "pages/publics/publicContent/publicContent",
+        "pages/zmhd/zmhd",
+        "pages/videoRecommend/videoRecommend",
+        "pages/phoneNewsPaper/phoneNewsPaper",
+        "pages/map/map",
+        "pages/map-vr/map-vr",
+        "pages/aticle1/aticle",
+        "pages/aticle2/aticle",
+        "pages/nnzzd/nnzzd",
+        "pages/doings/doings"
+    ],
+    "requiredPrivateInfos": [
+        "getLocation",
+        "choosePoi"
+    ],
+    "subpackages": [
+        {
+            "root": "pagesPublic",
+            "pages": [
+                "pages/yxnaJfq/yxnaJfq",
+                "pages/yxnaJfh/yxnaJfh",
+                "pages/yxnaQxn/yxnaQxn",
+                "pages/yxna/yxna",
+                "pages/album/album",
+                "pages/albumDetail/albumDetail",
+                "pages/albumEdit/albumEdit",
+                "pages/menu/menu",
+                "pages/myCollection/myCollection",
+                "pages/myComment/myComment",
+                "pages/like/like",
+                "pages/work-order/work-order",
+                "pages/work-order-detail/work-order-detail"
+            ]
+        }
+    ],
+    "window": {
+        "backgroundTextStyle": "light",
+        "navigationBarBackgroundColor": "#fff",
+        "navigationBarTitleText": "Weixin",
+        "navigationBarTextStyle": "black"
+    },
+    "tabBar": {
+        "custom": true,
+        "color": "#999",
+        "selectedColor": "#3D98FF",
+        "backgroundColor": "#fff",
+        "borderStyle": "white",
+        "list": [
+            {
+                "selectedIconPath": "pages/images/f-fw2.png",
+                "iconPath": "pages/images/f-sy.png",
+                "pagePath": "pages/index/index",
+                "text": "首页"
+            },
+            {
+                "selectedIconPath": "pages/images/f-gk2.png",
+                "iconPath": "pages/images/f-gk.png",
+                "pagePath": "pages/publics/index/index",
+                "text": "公开"
+            },
+            {
+                "selectedIconPath": "pages/images/f-gk2.png",
+                "iconPath": "pages/images/f-gk.png",
+                "pagePath": "pages/nais/nais",
+                "text": "这是南岸"
+            },
+            {
+                "selectedIconPath": "pages/images/f-fw2.png",
+                "iconPath": "pages/images/f-fw.png",
+                "pagePath": "pages/serve/serve",
+                "text": "服务"
+            },
+            {
+                "selectedIconPath": "pages/images/f-wd2.png",
+                "iconPath": "pages/images/f-wd.png",
+                "pagePath": "pages/myCenter/myCenter",
+                "text": "我的"
+            }
+        ]
+    },
+    "plugins": {
+        "routePlan": {
+            "version": "1.0.19",
+            "provider": "wx50b5593e81dd937a"
+        }
+    },
+    "permission": {
+        "scope.userLocation": {
+            "desc": "我们将获取您的定位信息用于地点展示"
+        }
     }
-  ],
-  "window": {
-    "backgroundTextStyle": "light",
-    "navigationBarBackgroundColor": "#fff",
-    "navigationBarTitleText": "Weixin",
-    "navigationBarTextStyle": "black"
-  },
-  "tabBar": {
-    "custom": true,
-    "color": "#999",
-    "selectedColor": "#3D98FF",
-    "backgroundColor": "#fff",
-    "borderStyle": "white",
-    "list": [
-      {
-        "selectedIconPath": "pages/images/f-fw2.png",
-        "iconPath": "pages/images/f-sy.png",
-        "pagePath": "pages/index/index",
-        "text": "首页"
-      },
-      {
-        "selectedIconPath": "pages/images/f-gk2.png",
-        "iconPath": "pages/images/f-gk.png",
-        "pagePath": "pages/publics/index/index",
-        "text": "公开"
-      },
-      {
-        "selectedIconPath": "pages/images/f-gk2.png",
-        "iconPath": "pages/images/f-gk.png",
-        "pagePath": "pages/nais/nais",
-        "text": "这是南岸"
-      },
-      {
-        "selectedIconPath": "pages/images/f-fw2.png",
-        "iconPath": "pages/images/f-fw.png",
-        "pagePath": "pages/serve/serve",
-        "text": "服务"
-      },
-      {
-        "selectedIconPath": "pages/images/f-wd2.png",
-        "iconPath": "pages/images/f-wd.png",
-        "pagePath": "pages/myCenter/myCenter",
-        "text": "我的"
-      }
-    ]
-  },
-  "plugins": {
-    "routePlan": {
-      "version": "1.0.19",
-      "provider": "wx50b5593e81dd937a"
-    }
-  },
-  "permission": {
-    "scope.userLocation": {
-      "desc": "我们将获取您的定位信息用于地点展示"
-    }
-  }
 }

+ 19 - 0
nnzwminiapp/pages/doings/doings-item.wxml

@@ -0,0 +1,19 @@
+<view>
+    <scroll-view class="item-he" scroll-y>
+        <view class="item-main" bindtap="tourl" data-item="{{item.linkUrl}}"   wx:for="{{eventDataList}}" wx:key="index">
+            <view class="item-right">
+                <view class="item-title" style="background-image: url('{{imgUrl}}nnzzditemtitle.png');">{{item.eventTitle}}</view>
+                <view class="item-c">
+                    <view class="item-context">
+                        <view class="itemitme" wx:for="{{item.templateContent}}" wx:for-index="dateIndex" wx:for-item="dateItem">
+                            <view class="key">{{dateItem.label}}</view>
+                            <text  class="value">{{dateItem.value}}</text>
+                        </view>
+                        
+                    </view>
+                </view>
+            </view>
+        </view>
+        <view style="height:40rpx"></view>
+    </scroll-view>
+</view>

+ 146 - 0
nnzwminiapp/pages/doings/doings.js

@@ -0,0 +1,146 @@
+// pages/doings/doings.js
+import {
+	imgUrl,
+  request,
+  request2,
+  baseUrl
+} from "../api/request"
+
+import {
+	cacheGet
+} from "../../utils/cacheUtil"
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    dyrs:1000,
+    imgUrl:imgUrl,
+    eventDataList: [],
+    codeImg: '',
+    hidden: true
+  },
+  confirm(){
+    this.setData({
+        hidden: true
+    })
+    this.setData({
+        codeImg: ''
+    })
+  },
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    request({
+        url: '/event/page?page=1&limit=9999',
+        method: 'GET'
+    }).then(res => {
+      let a = []
+        res.data.forEach(element => {
+          element.templateContent =  JSON.parse(element.templateContent)
+          a.push(element)
+       }); 
+      this.setData({
+            eventDataList: a
+      })
+    })
+    request({
+        url: '/subscribe/getSubscribeNumber',
+        method: 'GET'
+    }).then(res => {
+        this.setData({
+            dyrs: res.data
+        })
+    })
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+  dy(){
+    let that = this
+    wx.requestSubscribeMessage({
+        tmplIds: ['0Rh0woW2g6Mu6SDwDSs4x2pm6b5Re0xo_7Ugc_3pJps'],
+        success (res) {
+            if(res['0Rh0woW2g6Mu6SDwDSs4x2pm6b5Re0xo_7Ugc_3pJps']=='accept'){
+                wx.request({
+                    url: baseUrl + '/mini/qrCode/getQrCode?qrcodeSign=nazzd',
+                    method: 'GET',
+                    responseType: 'arraybuffer',
+                    header: {
+                        'mini-token':cacheGet('token')
+                    },
+                    success: function(res){
+                        console.log(res);
+                        if(res.statusCode == 200){
+                            let url ="data:image/png;base64," + wx.arrayBufferToBase64(res.data)
+                            that.setData({
+                                codeImg : url, //设置data里面的图片url
+                            })
+                            that.setData({
+                                hidden: false
+                            })
+                        }else if(res.statusCode == 400){//二维码已经核销
+                            
+                        }else if(res.statusCode == 401){//获取用户id失败
+                            
+                        }
+                    }
+                })
+            }
+         }
+      })
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  },
+  tourl(){
+    wx.navigateTo({
+      url: '/pages/web/web?url=https://www.cqna.gov.cn/zwgk_254/zfxxgkml/zcjd/wzjd/202307/t20230711_12139969.html',
+    })
+  }
+})

+ 4 - 0
nnzwminiapp/pages/doings/doings.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "活动"
+  }

+ 35 - 0
nnzwminiapp/pages/doings/doings.wxml

@@ -0,0 +1,35 @@
+<!--pages/doings/doings.wxml-->
+<view style="height: 1972rpx;">
+    <modal hidden="{{hidden}}" title="" confirm-text="关闭" bindconfirm="confirm" no-cancel="{{true}}">
+        <view>
+            <image style="width: 620rpx;height: 540rpx;margin-left: -33rpx;" src="{{codeImg}}" mode='aspectFill'></image>
+        </view>
+        <view style="text-align: center;">凭此二维码领取礼品</view>
+    </modal>
+    <view class="title" style="background-image: url('{{imgUrl}}nnzzditembg.png');">
+        <view class="titleTitle">
+        </view>
+        <view class="tips" > 
+            <view class="tips-left">
+                <image class="tips-icon" src="https://img1.imgtp.com/2023/07/12/jLlqS9XQ.png" />
+                <view class="tips-text">南岸最新资讯</view>
+            </view>
+            <view class="tips-right">
+                <image class="tips-icon" src="https://img1.imgtp.com/2023/07/12/SpLoEPXM.png" />
+                <view class="tips-text">动态掌握全面</view>
+            </view>
+            <view ></view>
+        </view>
+        <view class="dy" bindtap="dy"></view>
+        <view class="dyrs"><view class="dysl1">已订阅人数</view><view class="dys2">{{dyrs}}↑</view></view>
+    </view>
+    <view class="news" style="background-image: url('{{imgUrl}}nnzzdtitlebg.png'); margin-top: -102rpx;">
+        <view class="newsbg">
+
+            <include src="doings-item.wxml"/>
+        </view>
+        
+    </view>
+    
+</view>
+

+ 161 - 0
nnzwminiapp/pages/doings/doings.wxss

@@ -0,0 +1,161 @@
+/* pages/doings/doings.wxss */
+
+.title{
+    width: 100%;
+    height: 900rpx;
+    
+    background-size: contain;
+    background-repeat: no-repeat;
+    padding-top: 60rpx;
+}
+.news{
+    width: 100%;
+    height: 1120rpx;
+    background-size: contain;
+    background-repeat: no-repeat;
+}
+.newsbg{
+    width: 86.5%;
+    height: 100%;
+    margin: 0 auto;
+    position: relative;
+    background: #efefef;
+}
+.titleTitle{
+    background-image: url(https://img1.imgtp.com/2023/07/12/9nTrRBU3.png);
+    width: 450rpx;
+    height: 100rpx;
+    background-size: contain;
+    background-repeat: no-repeat;
+    margin: 0 auto 0;
+}
+.tips{
+    width: 60%;
+    height: 40rpx;
+    margin: 0 auto;
+}
+.tips-left{
+    width: 50%;
+    height: 40rpx;
+    line-height: 40rpx;
+    text-align: center;
+    float: left;
+    color: #f0f4fa;
+}
+
+.tips-right{
+    width: 50%;
+    height: 40rpx;
+    line-height: 40rpx;
+    text-align: center;
+    float: left;
+    color: #f0f4fa;
+    text-align: center;
+	display: table-cell;
+	vertical-align: middle;
+}
+.tips-icon{
+    /* display: block; */
+    width:  28rpx;
+    height: 28rpx;
+    /* float: left; */
+    /* margin: auto 0; */
+}
+.tips-text{
+    margin-top: -4rpx;
+    font-size: 28rpx;
+    float: right;
+}
+.dy{
+    width: 300rpx;
+    height: 80rpx;
+    background-image: url(https://img1.imgtp.com/2023/07/12/35zNfCJb.png);
+    background-size: contain;
+    background-repeat: no-repeat;
+    margin: 30rpx auto 0;
+}
+.dyrs{
+    width: 600rpx;
+    height: 50rpx;
+    margin: 30rpx auto 0;
+    font-size: 30rpx;
+    text-align: center;
+    color: #fff;
+    
+}
+.dysl1{
+    width: 50%;
+    float: left;
+    height: 50rpx;
+    line-height: 50rpx;
+    text-align: right;
+}
+.dys2{
+    width: 45%;
+    float: left;
+    height: 50rpx;
+    line-height: 50rpx;
+    text-align: left;
+    font-size: 38rpx;
+    font-weight: bold;
+    background: linear-gradient(to top,#fff3e8, #f1d2ab);
+    -webkit-background-clip: text;
+    color: transparent;
+}
+.dyicon{
+    width: 30rpx;
+    height: 50rpx;
+}
+.item-he{
+    height: 1120rpx; 
+}
+.item-main{
+    width: 95%;
+    min-height:300rpx;
+    margin: 0 auto;
+    /* background-color: #d1ddf8; */
+}
+.item-title{
+    width: 525rpx;
+    height: 65rpx;
+    margin: 0 auto;
+    text-align: center;
+    color: #fff;
+    font-weight: bold;
+    background-size: contain;
+    background-repeat: no-repeat;
+    margin-bottom: 12rpx;
+
+}
+.item-right{
+    width: 90%;
+    /* min-height: 334rpx; */
+    margin: 0 auto 40rpx;
+    
+}
+.item-c{
+    width: 100%;
+    /* border-radius: 10rpx; */
+    min-height: 334rpx;
+    background: #fff;
+    padding-top: 20rpx;
+}
+.item-context{
+    width: 93%;
+    min-height: 334rpx;
+    margin: 0 auto;
+    color: #666666;
+}
+.itemitme{
+    width: 100%;
+}
+
+.key{
+    width: 30%;
+    float: left;
+}
+
+.value{
+    width: 70%;
+    float: left;
+}