银花优选微信小程序修改后的最新版本代码

This commit is contained in:
ss001
2026-02-07 16:22:31 +08:00
commit c00caf5744
516 changed files with 41796 additions and 0 deletions

View File

@@ -0,0 +1,73 @@
var WxParse = null;
var app = getApp()
var that=null
var aid=0
Page( {
data: {
loadingHidden:false,
type:0,
ltype:0,
body:""
},
onLoad: function(options) {
that = this
WxParse = require('../../wxParse/wxParse.js')
aid=options.id
that.rdata();//第一次加载数据
}, rdata: function () {
wx.request({
url: app.globalData.apiurl + "/xapiajax.ashx",
data: {
action:"getnewdetail",
id:aid
},
method:"GET",
dataType:"json",
header: {
"content-type": "application/json" // 默认值
},
success (res) {
WxParse.wxParse('body', 'html', res.data.content, that);
if(res.data.type==6||res.data.type==7){
wx.setNavigationBarTitle({
title: res.data.title
})
}else if(res.data.type==8){
wx.setNavigationBarTitle({
title: "健康知识"
})
}else if(res.data.type==9){
wx.setNavigationBarTitle({
title: "发图素材"
})
}else if(res.data.type==19){
wx.setNavigationBarTitle({
title: "操作教程"
})
}else{
wx.setNavigationBarTitle({
title: "公告详情"
})
}
that.setData({
loadingHidden:true,
type: res.data.type,
ltype: res.data.ltype,
title: res.data.title
})
}
})
},
// 下拉刷新
onPullDownRefresh: function () {
that.rdata();//第一次加载数据
}
})

View File

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

View File

@@ -0,0 +1,11 @@
<import src="../../wxParse/wxParse.wxml"/>
<view class="shopping_container">
<view class="title" wx:if="{{type!=6&&type!=7}}">{{title}}</view>
<view class="wxParse {{ltype==1?'shuping':''}}">
<template is="wxParse" data="{{wxParseData:body.nodes}}"/>
</view>
</view>
<loading hidden="{{loadingHidden}}">
加载中...
</loading>

View File

@@ -0,0 +1,57 @@
page{
background: #ccc;
}
.container {
position: relative;
width: 100%;
height: 100%;
font-size: 14px;
color: #000;
}
.shopping_container{
position: relative;
padding: 20rpx;
width:100%;
background-color:#fff;
box-sizing: border-box;
overflow: hidden;
}
.shopping_container .title{
margin: 20rpx 0;
width:100%;
text-align: center;
font-weight: bold;
color: #333;
}
.shopping_container .wxParse{
position: relative;
float: left;
padding: 0;
width:100%;
text-align: center;
box-sizing: border-box;
overflow: hidden;
}
.shopping_container .wxParse view{
text-indent: 2em;
}
.shopping_container .wxParse image{
position: relative;
float: left;
width:100%;
}
.shopping_container .wxParse img{
width:100%;
}
.shopping_container .wxParse video{
float: left;
width:100%;
height:18em;
background-color: #000;
}
.shopping_container .wxParse.shuping video{
height:35em;
}