Initial Commit
This commit is contained in:
42
pages/chuxiao/cx_wxParse/cx_wxParse.js
Normal file
42
pages/chuxiao/cx_wxParse/cx_wxParse.js
Normal file
@ -0,0 +1,42 @@
|
||||
const WxParse = require('../../../wxParse/wxParse.js');
|
||||
const app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
bgImg: app.globalData.bgImg,
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
wx.showLoading({
|
||||
title: '加载中',
|
||||
})
|
||||
wx.request({
|
||||
url: app.globalData.ip + '/wisdommining/api/banner/getPromotion',
|
||||
method: 'GET',
|
||||
header: {
|
||||
"content-type": "application/x-www-form-urlencoded",
|
||||
},
|
||||
data: {},
|
||||
success: res => {
|
||||
console.log(res)
|
||||
wx.hideLoading()
|
||||
if (res.data.code == 1) {
|
||||
WxParse.wxParse('article', 'html', res.data.value.welfarePhoto, this, 20);
|
||||
} else {
|
||||
wx.showModal({
|
||||
title: '获取数据失败!',
|
||||
content: res.data.message,
|
||||
showCancel: false,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
})
|
4
pages/chuxiao/cx_wxParse/cx_wxParse.json
Normal file
4
pages/chuxiao/cx_wxParse/cx_wxParse.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"navigationBarTitleText": "促销专区"
|
||||
}
|
4
pages/chuxiao/cx_wxParse/cx_wxParse.wxml
Normal file
4
pages/chuxiao/cx_wxParse/cx_wxParse.wxml
Normal file
@ -0,0 +1,4 @@
|
||||
<import src="../../../wxParse/wxParse.wxml" />
|
||||
<view class="cont">
|
||||
<template is="wxParse" data="{{wxParseData:article.nodes}}"/>
|
||||
</view>
|
34
pages/chuxiao/cx_wxParse/cx_wxParse.wxss
Normal file
34
pages/chuxiao/cx_wxParse/cx_wxParse.wxss
Normal file
@ -0,0 +1,34 @@
|
||||
@import "../../../wxParse/wxParse.wxss";
|
||||
.cont{
|
||||
width:750rpx;
|
||||
}
|
||||
.cont image{
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.btn{
|
||||
width: 480rpx;
|
||||
height: 80rpx;
|
||||
background-image: linear-gradient(90deg,
|
||||
#fcaa05 0%,
|
||||
#f48e14 100%);
|
||||
border-radius: 40rpx;
|
||||
position: fixed;
|
||||
left:135rpx;
|
||||
bottom: 100rpx;
|
||||
font-size: 36rpx;
|
||||
color: #ffffff;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.btn button{
|
||||
opacity: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
position: absolute;
|
||||
left:0;
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
}
|
Reference in New Issue
Block a user