页面
5
app.json
@ -5,8 +5,9 @@
|
||||
"pages/treaty/privacy/privacy",
|
||||
"pages/treaty/service/service",
|
||||
"pages/mine/mine",
|
||||
"pages/copyright/create/create",
|
||||
"pages/copyright/createBuy/createBuy"
|
||||
"pages/copyright/createProjectInfo/createProjectInfo",
|
||||
"pages/copyright/createBuy/createBuy",
|
||||
"pages/copyright/payment/payment"
|
||||
],
|
||||
"window": {
|
||||
"navigationBarTextStyle": "black",
|
||||
|
75
app.wxss
@ -1,6 +1,12 @@
|
||||
/**自定义CheckBox**/
|
||||
page {
|
||||
background-color: white;
|
||||
background-color: #FAFAFA;
|
||||
}
|
||||
|
||||
.page-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
@ -13,43 +19,16 @@ page {
|
||||
.custom-navbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 16px;
|
||||
padding-right: 16px;
|
||||
background-color: #ffffff;
|
||||
box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.05);
|
||||
padding-left: 20rpx;
|
||||
padding-right: 20rpx;
|
||||
background-color: transparent;
|
||||
/* box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.05); */
|
||||
}
|
||||
|
||||
/* 标题 */
|
||||
.navbar-title {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
wx-checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
color: #fff !important;
|
||||
background-color: #3F72FF;
|
||||
border: 2rpx solid #3F72FF
|
||||
}
|
||||
|
||||
wx-checkbox .wx-checkbox-input {
|
||||
/*margin-right: 10rpx;*/
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
outline: 0;
|
||||
text-indent: 0;
|
||||
border-radius: 50%;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
background-color: transparent;
|
||||
position: relative;
|
||||
border: 1rpx solid rgb(85, 85, 85);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/*钩大小*/
|
||||
wx-checkbox .wx-checkbox-input.wx-checkbox-input-checked:before {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/***End***/
|
||||
@ -72,6 +51,10 @@ wx-checkbox .wx-checkbox-input.wx-checkbox-input-checked:before {
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.ml-20 {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.mb-10 {
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
@ -104,6 +87,32 @@ wx-checkbox .wx-checkbox-input.wx-checkbox-input-checked:before {
|
||||
padding: 10rpx;
|
||||
}
|
||||
|
||||
.mg-20 {
|
||||
margin: 20rpx;
|
||||
}
|
||||
|
||||
.mg-40 {
|
||||
margin: 40rpx;
|
||||
}
|
||||
|
||||
.pd-20 {
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.pd-40 {
|
||||
padding: 40rpx;
|
||||
}
|
||||
|
||||
.border-left {
|
||||
border-top-left-radius: 5rpx;
|
||||
border-bottom-left-radius: 5rpx;
|
||||
}
|
||||
|
||||
.border-right {
|
||||
border-top-right-radius: 5rpx;
|
||||
border-bottom-right-radius: 5rpx;
|
||||
}
|
||||
|
||||
.divider-v {
|
||||
margin-top: 5rpx;
|
||||
width: 90%;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<view class="ad-popup" wx:if="{{visible}}">
|
||||
<view class="ad-content">
|
||||
<image src="{{imageUrl}}" mode="aspectFill" />
|
||||
<image class="img" src="{{imageUrl}}" mode="aspectFill" />
|
||||
<view class="close-btn" bindtap="onClose">×</view>
|
||||
</view>
|
||||
</view>
|
@ -19,7 +19,7 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ad-content image {
|
||||
.ad-content .img {
|
||||
width: 100%;
|
||||
height: 300rpx;
|
||||
}
|
||||
|
30
components/container-loading/container-loading.js
Normal file
@ -0,0 +1,30 @@
|
||||
// components/container-loading/container-loading.js
|
||||
Component({
|
||||
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
loadingState: {
|
||||
type: String,
|
||||
value: 'loading'
|
||||
}
|
||||
},
|
||||
observers: {
|
||||
'loadingState': function (newVal) {
|
||||
this.setData({
|
||||
loadingVisible: newVal
|
||||
});
|
||||
}
|
||||
},
|
||||
data: {
|
||||
loadingVisible: 'loading'
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
|
||||
}
|
||||
})
|
4
components/container-loading/container-loading.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
9
components/container-loading/container-loading.wxml
Normal file
@ -0,0 +1,9 @@
|
||||
<view class="container">
|
||||
<view class="loading" wx:if="{{loadingVisible=='loading'}}"></view>
|
||||
<view wx:elif="{{loadingVisible=='error'}}" style="align-self: center;">
|
||||
<image src="/static/images/load_err.png" class="loading_err"></image>
|
||||
</view>
|
||||
<block wx:else="{{loadingVisible=='success'}}">
|
||||
<slot></slot>
|
||||
</block>
|
||||
</view>
|
60
components/container-loading/container-loading.wxss
Normal file
@ -0,0 +1,60 @@
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
width: 100%;
|
||||
min-height: 200rpx;
|
||||
}
|
||||
|
||||
.loading {
|
||||
position: relative;
|
||||
width: 40px;
|
||||
border-radius: 20px;
|
||||
perspective: 500px;
|
||||
align-self: center;
|
||||
margin-top: 80rpx;
|
||||
}
|
||||
|
||||
.loading:before,
|
||||
.loading:after {
|
||||
position: absolute;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
content: "";
|
||||
border-radius: 20px;
|
||||
animation: jumping 0.5s infinite alternate;
|
||||
background: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.loading:before {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.loading:after {
|
||||
right: 0;
|
||||
animation-delay: 0.15s;
|
||||
}
|
||||
|
||||
.loading_err {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
width: 150px;
|
||||
align-items: center;
|
||||
height: 100px;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
@keyframes jumping {
|
||||
0% {
|
||||
transform: scale(1) translateY(0px) rotateX(0deg);
|
||||
box-shadow: 0 0 0 rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(1.2) translateY(-25px) rotateX(45deg);
|
||||
background: #FE9944;
|
||||
box-shadow: 0 25px 40px #FE9944;
|
||||
}
|
||||
}
|
24
components/content-loading/loading.js
Normal file
@ -0,0 +1,24 @@
|
||||
// components/content-loading/loading.js
|
||||
Component({
|
||||
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
|
||||
}
|
||||
})
|
4
components/content-loading/loading.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
4
components/content-loading/loading.wxml
Normal file
@ -0,0 +1,4 @@
|
||||
<!--components/page-loading/page-loading.wxml-->
|
||||
<view class="page-body">
|
||||
<view class="loading"></view>
|
||||
</view>
|
54
components/content-loading/loading.wxss
Normal file
@ -0,0 +1,54 @@
|
||||
/* components/content-loading/loading.wxss */
|
||||
/* components/page-loading/page-loading.wxss */
|
||||
.page-body {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.loading {
|
||||
position: relative;
|
||||
width: 50px;
|
||||
border-radius: 25px;
|
||||
}
|
||||
|
||||
.loading:before,
|
||||
.loading:after {
|
||||
position: absolute;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
content: "";
|
||||
border-radius: 20px;
|
||||
animation: jumping 0.5s infinite alternate;
|
||||
background: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.loading:before {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.loading:after {
|
||||
right: 0;
|
||||
animation-delay: 0.15s;
|
||||
}
|
||||
|
||||
@keyframes jumping {
|
||||
0% {
|
||||
transform: scale(1) translateY(0px) rotateX(0deg);
|
||||
box-shadow: 0 0 0 rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(1.2) translateY(-25px) rotateX(45deg);
|
||||
background: #256742;
|
||||
box-shadow: 0 25px 40px #256742;
|
||||
}
|
||||
}
|
23
components/empty/empty.js
Normal file
@ -0,0 +1,23 @@
|
||||
// components/empty/empty.js
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
|
||||
}
|
||||
})
|
4
components/empty/empty.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
5
components/empty/empty.wxml
Normal file
@ -0,0 +1,5 @@
|
||||
<!--components/empty/empty.wxml-->
|
||||
<view class="data-empty">
|
||||
<image src="/images/ic_empty_data.png" mode="scaleToFill"></image>
|
||||
<text class="hint">暂无数据</text>
|
||||
</view>
|
24
components/empty/empty.wxss
Normal file
@ -0,0 +1,24 @@
|
||||
/* components/empty/empty.wxss */
|
||||
.data-empty {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
align-self: center;
|
||||
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%)translateY(-50%);
|
||||
}
|
||||
|
||||
.data-empty image {
|
||||
width: 180rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
|
||||
.data-empty .hint {
|
||||
margin-top: 30rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
40
components/fui-bottom-popup/fui-bottom-popup.js
Executable file
@ -0,0 +1,40 @@
|
||||
Component({
|
||||
properties: {
|
||||
show: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
//背景颜色
|
||||
background: {
|
||||
type: String,
|
||||
value: '#fff'
|
||||
},
|
||||
//圆角
|
||||
radius: {
|
||||
type: Number,
|
||||
optionalTypes: [String],
|
||||
value: 24
|
||||
},
|
||||
zIndex: {
|
||||
type: Number,
|
||||
optionalTypes: [String],
|
||||
value: 1001
|
||||
},
|
||||
//点击遮罩 是否可关闭
|
||||
maskClosable: {
|
||||
type: Boolean,
|
||||
value: true
|
||||
},
|
||||
maskBackground: {
|
||||
type: String,
|
||||
value: 'rgba(0,0,0,.6)'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClose(e) {
|
||||
if (!this.data.maskClosable) return;
|
||||
this.triggerEvent('close', {});
|
||||
},
|
||||
stop(e) {}
|
||||
}
|
||||
})
|
3
components/fui-bottom-popup/fui-bottom-popup.json
Executable file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"component": true
|
||||
}
|
5
components/fui-bottom-popup/fui-bottom-popup.wxml
Executable file
@ -0,0 +1,5 @@
|
||||
<view class="fui-bottom__popup-wrap {{show?'fui-bottom__popwrap-show':''}}" style="z-index:{{zIndex}};background:{{maskBackground}}" catchtap="handleClose" catchtouchmove="stop">
|
||||
<view class="fui-bottom__popup {{show?'fui-bottom__popup-show':''}}" style="border-top-left-radius:{{radius}}rpx;border-top-right-radius:{{radius}}rpx;background:{{background}}" catchtap="stop">
|
||||
<slot></slot>
|
||||
</view>
|
||||
</view>
|
36
components/fui-bottom-popup/fui-bottom-popup.wxss
Executable file
@ -0,0 +1,36 @@
|
||||
.fui-bottom__popup-wrap {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 1001;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
transition: all ease-in-out .2s;
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.fui-bottom__popwrap-show {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.fui-bottom__popup {
|
||||
width: 100%;
|
||||
transform: translate3d(0, 100%, 0);
|
||||
transition: all 0.3s ease-in-out;
|
||||
min-height: 20rpx;
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.fui-bottom__popup-show {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
23
components/loading/pageloading.js
Normal file
@ -0,0 +1,23 @@
|
||||
// components/loading/pageloading.js
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
|
||||
}
|
||||
})
|
4
components/loading/pageloading.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
5
components/loading/pageloading.wxml
Normal file
@ -0,0 +1,5 @@
|
||||
<!--components/loading/pageloading.wxml-->
|
||||
<view class="page-loading-box">
|
||||
<image src="/images/loading-small.gif" mode="scaleToFill"></image>
|
||||
<view class="text">加载中...</view>
|
||||
</view>
|
24
components/loading/pageloading.wxss
Normal file
@ -0,0 +1,24 @@
|
||||
/* components/loading/pageloading.wxss */
|
||||
.page-loading-box {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
/* background: rgba(255, 255, 255, 1); */
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.page-loading-box image {
|
||||
width: 128rpx;
|
||||
height: 128rpx;
|
||||
}
|
||||
|
||||
.page-loading-box .text {
|
||||
margin-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
152
components/mp-html/index.js
Normal file
@ -0,0 +1,152 @@
|
||||
"use strict";
|
||||
|
||||
function e(e, t, n) {
|
||||
return t in e ? Object.defineProperty(e, t, {
|
||||
value: n,
|
||||
enumerable: !0,
|
||||
configurable: !0,
|
||||
writable: !0
|
||||
}) : e[t] = n, e
|
||||
}
|
||||
/*!
|
||||
* mp-html v2.5.0
|
||||
* https://github.com/jin-yufeng/mp-html
|
||||
*
|
||||
* Released under the MIT license
|
||||
* Author: Jin Yufeng
|
||||
*/
|
||||
var t = require("./parser"),
|
||||
n = [];
|
||||
Component({
|
||||
data: {
|
||||
nodes: []
|
||||
},
|
||||
properties: {
|
||||
containerStyle: String,
|
||||
content: {
|
||||
type: String,
|
||||
value: "",
|
||||
observer: function (e) {
|
||||
this.setContent(e)
|
||||
}
|
||||
},
|
||||
copyLink: {
|
||||
type: Boolean,
|
||||
value: !0
|
||||
},
|
||||
domain: String,
|
||||
errorImg: String,
|
||||
lazyLoad: Boolean,
|
||||
loadingImg: String,
|
||||
pauseVideo: {
|
||||
type: Boolean,
|
||||
value: !0
|
||||
},
|
||||
previewImg: {
|
||||
type: null,
|
||||
value: !0
|
||||
},
|
||||
scrollTable: Boolean,
|
||||
selectable: null,
|
||||
setTitle: {
|
||||
type: Boolean,
|
||||
value: !0
|
||||
},
|
||||
showImgMenu: {
|
||||
type: Boolean,
|
||||
value: !0
|
||||
},
|
||||
tagStyle: Object,
|
||||
useAnchor: null
|
||||
},
|
||||
created: function () {
|
||||
this.plugins = [];
|
||||
for (var e = n.length; e--;) this.plugins.push(new n[e](this))
|
||||
},
|
||||
detached: function () {
|
||||
this._hook("onDetached")
|
||||
},
|
||||
methods: {
|
||||
in: function (e, t, n) {
|
||||
e && t && n && (this._in = {
|
||||
page: e,
|
||||
selector: t,
|
||||
scrollTop: n
|
||||
})
|
||||
},
|
||||
navigateTo: function (t, n) {
|
||||
var i = this;
|
||||
return new Promise(function (o, r) {
|
||||
if (!i.data.useAnchor) return void r(Error("Anchor is disabled"));
|
||||
var a = wx.createSelectorQuery().in(i._in ? i._in.page : i).select((i._in ? i._in.selector : "._root") + (t ? "".concat(">>>", "#").concat(t) : "")).boundingClientRect();
|
||||
i._in ? a.select(i._in.selector).scrollOffset().select(i._in.selector).boundingClientRect() : a.selectViewport().scrollOffset(), a.exec(function (t) {
|
||||
if (!t[0]) return void r(Error("Label not found"));
|
||||
var a = t[1].scrollTop + t[0].top - (t[2] ? t[2].top : 0) + (n || parseInt(i.data.useAnchor) || 0);
|
||||
i._in ? i._in.page.setData(e({}, i._in.scrollTop, a)) : wx.pageScrollTo({
|
||||
scrollTop: a,
|
||||
duration: 300
|
||||
}), o()
|
||||
})
|
||||
})
|
||||
},
|
||||
getText: function (e) {
|
||||
var t = "";
|
||||
return function e(n) {
|
||||
for (var i = 0; i < n.length; i++) {
|
||||
var o = n[i];
|
||||
if ("text" === o.type) t += o.text.replace(/&/g, "&");
|
||||
else if ("br" === o.name) t += "\n";
|
||||
else {
|
||||
var r = "p" === o.name || "div" === o.name || "tr" === o.name || "li" === o.name || "h" === o.name[0] && o.name[1] > "0" && o.name[1] < "7";
|
||||
r && t && "\n" !== t[t.length - 1] && (t += "\n"), o.children && e(o.children), r && "\n" !== t[t.length - 1] ? t += "\n" : "td" !== o.name && "th" !== o.name || (t += "\t")
|
||||
}
|
||||
}
|
||||
}(e || this.data.nodes), t
|
||||
},
|
||||
getRect: function () {
|
||||
var e = this;
|
||||
return new Promise(function (t, n) {
|
||||
wx.createSelectorQuery().in(e).select("._root").boundingClientRect().exec(function (e) {
|
||||
return e[0] ? t(e[0]) : n(Error("Root label not found"))
|
||||
})
|
||||
})
|
||||
},
|
||||
pauseMedia: function () {
|
||||
for (var e = (this._videos || []).length; e--;) this._videos[e].pause()
|
||||
},
|
||||
setPlaybackRate: function (e) {
|
||||
this.playbackRate = e;
|
||||
for (var t = (this._videos || []).length; t--;) this._videos[t].playbackRate(e)
|
||||
},
|
||||
setContent: function (e, n) {
|
||||
var i = this;
|
||||
this.imgList && n || (this.imgList = []), this._videos = [];
|
||||
var o = {},
|
||||
r = new t(this).parse(e);
|
||||
if (n)
|
||||
for (var a = this.data.nodes.length, s = r.length; s--;) o["nodes[".concat(a + s, "]")] = r[s];
|
||||
else o.nodes = r;
|
||||
if (this.setData(o, function () {
|
||||
i._hook("onLoad"), i.triggerEvent("load")
|
||||
}), this.data.lazyLoad || this.imgList._unloadimgs < this.imgList.length / 2) {
|
||||
var l = 0,
|
||||
c = function e(t) {
|
||||
t && t.height || (t = {}), t.height === l ? i.triggerEvent("ready", t) : (l = t.height, setTimeout(function () {
|
||||
i.getRect().then(e).catch(e)
|
||||
}, 350))
|
||||
};
|
||||
this.getRect().then(c).catch(c)
|
||||
} else this.imgList._unloadimgs || this.getRect().then(function (e) {
|
||||
i.triggerEvent("ready", e)
|
||||
}).catch(function () {
|
||||
i.triggerEvent("ready", {})
|
||||
})
|
||||
},
|
||||
_hook: function (e) {
|
||||
for (var t = n.length; t--;) this.plugins[t][e] && this.plugins[t][e]()
|
||||
},
|
||||
_add: function (e) {
|
||||
e.detail.root = this
|
||||
}
|
||||
}
|
||||
});
|
1
components/mp-html/index.json
Normal file
@ -0,0 +1 @@
|
||||
{"component":true,"usingComponents":{"node":"./node/node"}}
|
4
components/mp-html/index.wxml
Normal file
@ -0,0 +1,4 @@
|
||||
<view class="_root {{selectable?'_select':''}}" style="{{containerStyle}}">
|
||||
<slot wx:if="{{!nodes[0]}}" />
|
||||
<node id="_root" childs="{{nodes}}" opts="{{[lazyLoad,loadingImg,errorImg,showImgMenu,selectable]}}" catchadd="_add" />
|
||||
</view>
|
11
components/mp-html/index.wxss
Normal file
@ -0,0 +1,11 @@
|
||||
._root {
|
||||
padding: 1px 0;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
-webkit-overflow-scrolling: touch
|
||||
}
|
||||
|
||||
._select {
|
||||
-webkit-user-select: text;
|
||||
user-select: text
|
||||
}
|
147
components/mp-html/node/node.js
Normal file
@ -0,0 +1,147 @@
|
||||
"use strict";
|
||||
|
||||
function t(t, e) {
|
||||
var r = Object.keys(t);
|
||||
if (Object.getOwnPropertySymbols) {
|
||||
var i = Object.getOwnPropertySymbols(t);
|
||||
e && (i = i.filter(function (e) {
|
||||
return Object.getOwnPropertyDescriptor(t, e).enumerable
|
||||
})), r.push.apply(r, i)
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
function e(e) {
|
||||
for (var i = 1; i < arguments.length; i++) {
|
||||
var o = null != arguments[i] ? arguments[i] : {};
|
||||
i % 2 ? t(Object(o), !0).forEach(function (t) {
|
||||
r(e, t, o[t])
|
||||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(o)) : t(Object(o)).forEach(function (t) {
|
||||
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(o, t))
|
||||
})
|
||||
}
|
||||
return e
|
||||
}
|
||||
|
||||
function r(t, e, r) {
|
||||
return e in t ? Object.defineProperty(t, e, {
|
||||
value: r,
|
||||
enumerable: !0,
|
||||
configurable: !0,
|
||||
writable: !0
|
||||
}) : t[e] = r, t
|
||||
}
|
||||
Component({
|
||||
data: {
|
||||
ctrl: {},
|
||||
// isiOS: wx.getSystemInfoSync().system.includes("iOS")
|
||||
isiOS: wx.getDeviceInfo().system.includes("iOS")
|
||||
},
|
||||
properties: {
|
||||
childs: Array,
|
||||
opts: Array
|
||||
},
|
||||
options: {
|
||||
addGlobalClass: !0
|
||||
},
|
||||
attached: function () {
|
||||
this.triggerEvent("add", this, {
|
||||
bubbles: !0,
|
||||
composed: !0
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
noop: function () {},
|
||||
getNode: function (t) {
|
||||
try {
|
||||
for (var e = t.split("_"), r = this.data.childs[e[0]], i = 1; i < e.length; i++) r = r.children[e[i]];
|
||||
return r
|
||||
} catch (t) {
|
||||
return {
|
||||
text: "",
|
||||
attrs: {},
|
||||
children: []
|
||||
}
|
||||
}
|
||||
},
|
||||
play: function (t) {
|
||||
var r = t.target.dataset.i,
|
||||
i = this.getNode(r);
|
||||
if (this.root.triggerEvent("play", {
|
||||
source: i.name,
|
||||
attrs: e(e({}, i.attrs), {}, {
|
||||
src: i.src[this.data.ctrl[r] || 0]
|
||||
})
|
||||
}), this.root.data.pauseVideo) {
|
||||
for (var o = !1, s = t.target.id, a = this.root._videos.length; a--;) this.root._videos[a].id === s ? o = !0 : this.root._videos[a].pause();
|
||||
if (!o) {
|
||||
var n = wx.createVideoContext(s, this);
|
||||
n.id = s, this.root.playbackRate && n.playbackRate(this.root.playbackRate), this.root._videos.push(n)
|
||||
}
|
||||
}
|
||||
},
|
||||
imgTap: function (t) {
|
||||
var e = this.getNode(t.target.dataset.i);
|
||||
if (e.a) return this.linkTap(e.a);
|
||||
if (!e.attrs.ignore && (this.root.triggerEvent("imgtap", e.attrs), this.root.data.previewImg)) {
|
||||
var r = this.root.imgList[e.i];
|
||||
wx.previewImage({
|
||||
showmenu: this.root.data.showImgMenu,
|
||||
current: r,
|
||||
urls: this.root.imgList
|
||||
})
|
||||
}
|
||||
},
|
||||
imgLoad: function (t) {
|
||||
var e, i = t.target.dataset.i,
|
||||
o = this.getNode(i);
|
||||
o.w ? (this.data.opts[1] && !this.data.ctrl[i] || -1 === this.data.ctrl[i]) && (e = 1) : e = t.detail.width, e && this.setData(r({}, "ctrl." + i, e)), this.checkReady()
|
||||
},
|
||||
checkReady: function () {
|
||||
var t = this;
|
||||
this.root.data.lazyLoad || (this.root.imgList._unloadimgs -= 1, this.root.imgList._unloadimgs || setTimeout(function () {
|
||||
t.root.getRect().then(function (e) {
|
||||
t.root.triggerEvent("ready", e)
|
||||
}).catch(function () {
|
||||
t.root.triggerEvent("ready", {})
|
||||
})
|
||||
}, 350))
|
||||
},
|
||||
linkTap: function (t) {
|
||||
var e = t.currentTarget ? this.getNode(t.currentTarget.dataset.i) : {},
|
||||
r = e.attrs || t,
|
||||
i = r.href;
|
||||
this.root.triggerEvent("linktap", Object.assign({
|
||||
innerText: this.root.getText(e.children || [])
|
||||
}, r)), i && ("#" === i[0] ? this.root.navigateTo(i.substring(1)).catch(function () {}) : i.split("?")[0].includes("://") ? this.root.data.copyLink && wx.setClipboardData({
|
||||
data: i,
|
||||
success: function () {
|
||||
return wx.showToast({
|
||||
title: "链接已复制"
|
||||
})
|
||||
}
|
||||
}) : wx.navigateTo({
|
||||
url: i,
|
||||
fail: function () {
|
||||
wx.switchTab({
|
||||
url: i,
|
||||
fail: function () {}
|
||||
})
|
||||
}
|
||||
}))
|
||||
},
|
||||
mediaError: function (t) {
|
||||
var e = t.target.dataset.i,
|
||||
i = this.getNode(e);
|
||||
if ("video" === i.name || "audio" === i.name) {
|
||||
var o = (this.data.ctrl[e] || 0) + 1;
|
||||
if (o > i.src.length && (o = 0), o < i.src.length) return this.setData(r({}, "ctrl." + e, o))
|
||||
} else "img" === i.name && (this.data.opts[2] && this.setData(r({}, "ctrl." + e, -1)), this.checkReady());
|
||||
this.root && this.root.triggerEvent("error", {
|
||||
source: i.name,
|
||||
attrs: i.attrs,
|
||||
errMsg: t.detail.errMsg
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
1
components/mp-html/node/node.json
Normal file
@ -0,0 +1 @@
|
||||
{"component":true,"usingComponents":{"node":"./node"}}
|
34
components/mp-html/node/node.wxml
Normal file
@ -0,0 +1,34 @@
|
||||
<wxs module="isInline">
|
||||
var e = { abbr: !0, b: !0, big: !0, code: !0, del: !0, em: !0, i: !0, ins: !0, label: !0, q: !0, small: !0, span: !0, strong: !0, sub: !0, sup: !0 }; module.exports = function (n, i) { return e[n] || -1 !== (i || "").indexOf("inline") };
|
||||
</wxs><template name="el">
|
||||
<block wx:if="{{n.name==='img'}}">
|
||||
<rich-text wx:if="{{n.t}}" style="display:{{n.t}}" nodes="<img class='_img' style='{{n.attrs.style}}' src='{{n.attrs.src}}'>" data-i="{{i}}" catchtap="imgTap" />
|
||||
<block wx:else>
|
||||
<image wx:if="{{(opts[1]&&!ctrl[i])||ctrl[i]<0}}" class="_img" style="{{n.attrs.style}}" src="{{ctrl[i]<0?opts[2]:opts[1]}}" mode="widthFix" />
|
||||
<image id="{{n.attrs.id}}" class="_img {{n.attrs.class}}" :style="{{ctrl[i]===-1?'display:none;':''}}width:{{ctrl[i]||1}}px;height:1px;{{n.attrs.style}}" src="{{n.attrs.src}}" mode="{{!n.h?'widthFix':(!n.w?'heightFix':(n.m||'scaleToFill'))}}" lazy-load="{{opts[0]}}" webp="{{n.webp}}" show-menu-by-longpress="{{opts[3]&&!n.attrs.ignore}}" data-i="{{i}}" bindload="imgLoad" binderror="mediaError" catchtap="imgTap" bindlongpress="noop" />
|
||||
</block>
|
||||
</block><text wx:elif="{{n.text}}" user-select="{{opts[4]=='force'&&isiOS}}" decode>{{n.text}}</text><text wx:elif="{{n.name==='br'}}">\n</text>
|
||||
<view wx:elif="{{n.name==='a'}}" id="{{n.attrs.id}}" class="{{n.attrs.href?'_a ':''}}{{n.attrs.class}}" hover-class="_hover" style="display:inline;{{n.attrs.style}}" data-i="{{i}}" catchtap="linkTap">
|
||||
<node childs="{{n.children}}" opts="{{opts}}" style="display:inherit" />
|
||||
</view><video wx:elif="{{n.name==='video'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" autoplay="{{n.attrs.autoplay}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" muted="{{n.attrs.muted}}" object-fit="{{n.attrs['object-fit']}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError" /><audio wx:elif="{{n.name==='audio'}}" id="{{n.attrs.id}}" class="{{n.attrs.class}}" style="{{n.attrs.style}}" author="{{n.attrs.author}}" controls="{{n.attrs.controls}}" loop="{{n.attrs.loop}}" name="{{n.attrs.name}}" poster="{{n.attrs.poster}}" src="{{n.src[ctrl[i]||0]}}" data-i="{{i}}" bindplay="play" binderror="mediaError" />
|
||||
<rich-text wx:else id="{{n.attrs.id}}" style="{{n.f}}" user-select="{{opts[4]}}" nodes="{{[n]}}" />
|
||||
</template>
|
||||
<block wx:for="{{childs}}" wx:for-item="n1" wx:for-index="i1" wx:key="i1"><template wx:if="{{!n1.c&&(!n1.children||n1.name==='a'||!isInline(n1.name,n1.attrs.style))}}" is="el" data="{{n:n1,i:''+i1,opts:opts,ctrl:ctrl}}" />
|
||||
<view wx:else id="{{n1.attrs.id}}" class="_{{n1.name}} {{n1.attrs.class}}" style="{{n1.attrs.style}}">
|
||||
<block wx:for="{{n1.children}}" wx:for-item="n2" wx:for-index="i2" wx:key="i2"><template wx:if="{{!n2.c&&(!n2.children||n2.name==='a'||!isInline(n2.name,n2.attrs.style))}}" is="el" data="{{n:n2,i:i1+'_'+i2,opts:opts,ctrl:ctrl}}" />
|
||||
<view wx:else id="{{n2.attrs.id}}" class="_{{n2.name}} {{n2.attrs.class}}" style="{{n2.attrs.style}}">
|
||||
<block wx:for="{{n2.children}}" wx:for-item="n3" wx:for-index="i3" wx:key="i3"><template wx:if="{{!n3.c&&(!n3.children||n3.name==='a'||!isInline(n3.name,n3.attrs.style))}}" is="el" data="{{n:n3,i:i1+'_'+i2+'_'+i3,opts:opts,ctrl:ctrl}}" />
|
||||
<view wx:else id="{{n3.attrs.id}}" class="_{{n3.name}} {{n3.attrs.class}}" style="{{n3.attrs.style}}">
|
||||
<block wx:for="{{n3.children}}" wx:for-item="n4" wx:for-index="i4" wx:key="i4"><template wx:if="{{!n4.c&&(!n4.children||n4.name==='a'||!isInline(n4.name,n4.attrs.style))}}" is="el" data="{{n:n4,i:i1+'_'+i2+'_'+i3+'_'+i4,opts:opts,ctrl:ctrl}}" />
|
||||
<view wx:else id="{{n4.attrs.id}}" class="_{{n4.name}} {{n4.attrs.class}}" style="{{n4.attrs.style}}">
|
||||
<block wx:for="{{n4.children}}" wx:for-item="n5" wx:for-index="i5" wx:key="i5"><template wx:if="{{!n5.c&&(!n5.children||n5.name==='a'||!isInline(n5.name,n5.attrs.style))}}" is="el" data="{{n:n5,i:i1+'_'+i2+'_'+i3+'_'+i4+'_'+i5,opts:opts,ctrl:ctrl}}" />
|
||||
<node wx:else id="{{n5.attrs.id}}" class="_{{n5.name}} {{n5.attrs.class}}" style="{{n5.attrs.style}}" childs="{{n5.children}}" opts="{{opts}}" />
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
157
components/mp-html/node/node.wxss
Normal file
@ -0,0 +1,157 @@
|
||||
._a {
|
||||
padding: 1.5px 0 1.5px 0;
|
||||
color: #366092;
|
||||
word-break: break-all
|
||||
}
|
||||
|
||||
._hover {
|
||||
text-decoration: underline;
|
||||
opacity: .7
|
||||
}
|
||||
|
||||
._img {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
-webkit-touch-callout: none
|
||||
}
|
||||
|
||||
._b,
|
||||
._strong {
|
||||
font-weight: 700
|
||||
}
|
||||
|
||||
._code {
|
||||
font-family: monospace
|
||||
}
|
||||
|
||||
._del {
|
||||
text-decoration: line-through
|
||||
}
|
||||
|
||||
._em,
|
||||
._i {
|
||||
font-style: italic
|
||||
}
|
||||
|
||||
._h1 {
|
||||
font-size: 2em
|
||||
}
|
||||
|
||||
._h2 {
|
||||
font-size: 1.5em
|
||||
}
|
||||
|
||||
._h3 {
|
||||
font-size: 1.17em
|
||||
}
|
||||
|
||||
._h5 {
|
||||
font-size: .83em
|
||||
}
|
||||
|
||||
._h6 {
|
||||
font-size: .67em
|
||||
}
|
||||
|
||||
._h1,
|
||||
._h2,
|
||||
._h3,
|
||||
._h4,
|
||||
._h5,
|
||||
._h6 {
|
||||
display: block;
|
||||
font-weight: 700
|
||||
}
|
||||
|
||||
._ins {
|
||||
text-decoration: underline
|
||||
}
|
||||
|
||||
._li {
|
||||
display: list-item
|
||||
}
|
||||
|
||||
._ol {
|
||||
list-style-type: decimal
|
||||
}
|
||||
|
||||
._ol,
|
||||
._ul {
|
||||
display: block;
|
||||
padding-left: 40px;
|
||||
margin: 1em 0
|
||||
}
|
||||
|
||||
._q::before {
|
||||
content: '"'
|
||||
}
|
||||
|
||||
._q::after {
|
||||
content: '"'
|
||||
}
|
||||
|
||||
._sub {
|
||||
font-size: smaller;
|
||||
vertical-align: sub
|
||||
}
|
||||
|
||||
._sup {
|
||||
font-size: smaller;
|
||||
vertical-align: super
|
||||
}
|
||||
|
||||
._tbody,
|
||||
._tfoot,
|
||||
._thead {
|
||||
display: table-row-group
|
||||
}
|
||||
|
||||
._tr {
|
||||
display: table-row
|
||||
}
|
||||
|
||||
._td,
|
||||
._th {
|
||||
display: table-cell;
|
||||
vertical-align: middle
|
||||
}
|
||||
|
||||
._th {
|
||||
font-weight: 700;
|
||||
text-align: center
|
||||
}
|
||||
|
||||
._ul {
|
||||
list-style-type: disc
|
||||
}
|
||||
|
||||
._ul ._ul {
|
||||
margin: 0;
|
||||
list-style-type: circle
|
||||
}
|
||||
|
||||
._ul ._ul ._ul {
|
||||
list-style-type: square
|
||||
}
|
||||
|
||||
._abbr,
|
||||
._b,
|
||||
._code,
|
||||
._del,
|
||||
._em,
|
||||
._i,
|
||||
._ins,
|
||||
._label,
|
||||
._q,
|
||||
._span,
|
||||
._strong,
|
||||
._sub,
|
||||
._sup {
|
||||
display: inline
|
||||
}
|
||||
|
||||
._blockquote,
|
||||
._div,
|
||||
._p {
|
||||
display: block
|
||||
}
|
537
components/mp-html/parser.js
Normal file
@ -0,0 +1,537 @@
|
||||
"use strict";
|
||||
|
||||
function t(t, e) {
|
||||
var s;
|
||||
if ("undefined" == typeof Symbol || null == t[Symbol.iterator]) {
|
||||
if (Array.isArray(t) || (s = i(t)) || e && t && "number" == typeof t.length) {
|
||||
s && (t = s);
|
||||
var n = 0,
|
||||
a = function () {};
|
||||
return {
|
||||
s: a,
|
||||
n: function () {
|
||||
return n >= t.length ? {
|
||||
done: !0
|
||||
} : {
|
||||
done: !1,
|
||||
value: t[n++]
|
||||
}
|
||||
},
|
||||
e: function (t) {
|
||||
throw t
|
||||
},
|
||||
f: a
|
||||
}
|
||||
}
|
||||
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")
|
||||
}
|
||||
var r, o = !0,
|
||||
l = !1;
|
||||
return {
|
||||
s: function () {
|
||||
s = t[Symbol.iterator]()
|
||||
},
|
||||
n: function () {
|
||||
var t = s.next();
|
||||
return o = t.done, t
|
||||
},
|
||||
e: function (t) {
|
||||
l = !0, r = t
|
||||
},
|
||||
f: function () {
|
||||
try {
|
||||
o || null == s.return || s.return()
|
||||
} finally {
|
||||
if (l) throw r
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function i(t, i) {
|
||||
if (t) {
|
||||
if ("string" == typeof t) return e(t, i);
|
||||
var s = Object.prototype.toString.call(t).slice(8, -1);
|
||||
return "Object" === s && t.constructor && (s = t.constructor.name), "Map" === s || "Set" === s ? Array.from(t) : "Arguments" === s || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s) ? e(t, i) : void 0
|
||||
}
|
||||
}
|
||||
|
||||
function e(t, i) {
|
||||
(null == i || i > t.length) && (i = t.length);
|
||||
for (var e = 0, s = new Array(i); e < i; e++) s[e] = t[e];
|
||||
return s
|
||||
}
|
||||
|
||||
function s(t) {
|
||||
for (var i = Object.create(null), e = t.split(","), s = e.length; s--;) i[e[s]] = !0;
|
||||
return i
|
||||
}
|
||||
|
||||
function n(t, i) {
|
||||
for (var e = t.indexOf("&"); - 1 !== e;) {
|
||||
var s = t.indexOf(";", e + 3),
|
||||
n = void 0;
|
||||
if (-1 === s) break;
|
||||
"#" === t[e + 1] ? (n = parseInt(("x" === t[e + 2] ? "0" : "") + t.substring(e + 2, s)), isNaN(n) || (t = t.substr(0, e) + String.fromCharCode(n) + t.substr(s + 1))) : (n = t.substring(e + 1, s), (l.entities[n] || "amp" === n && i) && (t = t.substr(0, e) + (l.entities[n] || "&") + t.substr(s + 1))), e = t.indexOf("&", e + 1)
|
||||
}
|
||||
return t
|
||||
}
|
||||
|
||||
function a(t) {
|
||||
for (var i = t.length - 1, e = i; e >= -1; e--)(-1 === e || t[e].c || !t[e].name || "div" !== t[e].name && "p" !== t[e].name && "h" !== t[e].name[0] || (t[e].attrs.style || "").includes("inline")) && (i - e >= 5 && t.splice(e + 1, i - e, {
|
||||
name: "div",
|
||||
attrs: {},
|
||||
children: t.slice(e + 1, i + 1)
|
||||
}), i = e - 1)
|
||||
}
|
||||
|
||||
function r(t) {
|
||||
this.options = t.data || {}, this.tagStyle = Object.assign({}, l.tagStyle, this.options.tagStyle), this.imgList = t.imgList || [], this.imgList._unloadimgs = 0, this.plugins = t.plugins || [], this.attrs = Object.create(null), this.stack = [], this.nodes = [], this.pre = (this.options.containerStyle || "").includes("white-space") && this.options.containerStyle.includes("pre") ? 2 : 0
|
||||
}
|
||||
|
||||
function o(t) {
|
||||
this.handler = t
|
||||
}
|
||||
var l = {
|
||||
trustTags: s("a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,ruby,rt,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video"),
|
||||
blockTags: s("address,article,aside,body,caption,center,cite,footer,header,html,nav,pre,section"),
|
||||
ignoreTags: s("area,base,canvas,embed,frame,head,iframe,input,link,map,meta,param,rp,script,source,style,textarea,title,track,wbr"),
|
||||
voidTags: s("area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr"),
|
||||
entities: {
|
||||
lt: "<",
|
||||
gt: ">",
|
||||
quot: '"',
|
||||
apos: "'",
|
||||
ensp: " ",
|
||||
emsp: " ",
|
||||
nbsp: " ",
|
||||
semi: ";",
|
||||
ndash: "–",
|
||||
mdash: "—",
|
||||
middot: "·",
|
||||
lsquo: "‘",
|
||||
rsquo: "’",
|
||||
ldquo: "“",
|
||||
rdquo: "”",
|
||||
bull: "•",
|
||||
hellip: "…",
|
||||
larr: "←",
|
||||
uarr: "↑",
|
||||
rarr: "→",
|
||||
darr: "↓"
|
||||
},
|
||||
tagStyle: {
|
||||
address: "font-style:italic",
|
||||
big: "display:inline;font-size:1.2em",
|
||||
caption: "display:table-caption;text-align:center",
|
||||
center: "text-align:center",
|
||||
cite: "font-style:italic",
|
||||
dd: "margin-left:40px",
|
||||
mark: "background-color:yellow",
|
||||
pre: "font-family:monospace;white-space:pre",
|
||||
s: "text-decoration:line-through",
|
||||
small: "display:inline;font-size:0.8em",
|
||||
strike: "text-decoration:line-through",
|
||||
u: "text-decoration:underline"
|
||||
},
|
||||
svgDict: {
|
||||
animatetransform: "animateTransform",
|
||||
lineargradient: "linearGradient",
|
||||
viewbox: "viewBox",
|
||||
attributename: "attributeName",
|
||||
repeatcount: "repeatCount",
|
||||
repeatdur: "repeatDur",
|
||||
foreignobject: "foreignObject"
|
||||
}
|
||||
},
|
||||
h = {},
|
||||
// c = wx.getSystemInfoSync(),
|
||||
c = wx.getWindowInfo(),
|
||||
d = c.windowWidth,
|
||||
p = wx.getDeviceInfo().system,
|
||||
u = s(" ,\r,\n,\t,\f"),
|
||||
f = 0;
|
||||
r.prototype.parse = function (t) {
|
||||
for (var i = this.plugins.length; i--;) this.plugins[i].onUpdate && (t = this.plugins[i].onUpdate(t, l) || t);
|
||||
for (new o(this).parse(t); this.stack.length;) this.popNode();
|
||||
return this.nodes.length > 50 && a(this.nodes), this.nodes
|
||||
}, r.prototype.expose = function () {
|
||||
for (var t = this.stack.length; t--;) {
|
||||
var i = this.stack[t];
|
||||
if (i.c || "a" === i.name || "video" === i.name || "audio" === i.name) return;
|
||||
i.c = 1
|
||||
}
|
||||
}, r.prototype.hook = function (t) {
|
||||
for (var i = this.plugins.length; i--;)
|
||||
if (this.plugins[i].onParse && !1 === this.plugins[i].onParse(t, this)) return !1;
|
||||
return !0
|
||||
}, r.prototype.getUrl = function (t) {
|
||||
var i = this.options.domain;
|
||||
return "/" === t[0] ? "/" === t[1] ? t = (i ? i.split("://")[0] : "http") + ":" + t : i && (t = i + t) : !i || t.includes("data:") || t.includes("://") || (t = i + "/" + t), t
|
||||
}, r.prototype.parseStyle = function (t) {
|
||||
var i = t.attrs,
|
||||
e = (this.tagStyle[t.name] || "").split(";").concat((i.style || "").split(";")),
|
||||
s = {},
|
||||
n = "";
|
||||
i.id && !this.xml && (this.options.useAnchor ? this.expose() : "img" !== t.name && "a" !== t.name && "video" !== t.name && "audio" !== t.name && (i.id = void 0)), i.width && (s.width = parseFloat(i.width) + (i.width.includes("%") ? "%" : "px"), i.width = void 0), i.height && (s.height = parseFloat(i.height) + (i.height.includes("%") ? "%" : "px"), i.height = void 0);
|
||||
for (var a = 0, r = e.length; a < r; a++) {
|
||||
var o = e[a].split(":");
|
||||
if (!(o.length < 2)) {
|
||||
var l = o.shift().trim().toLowerCase(),
|
||||
h = o.join(":").trim();
|
||||
if ("-" === h[0] && h.lastIndexOf("-") > 0 || h.includes("safe")) n += ";".concat(l, ":").concat(h);
|
||||
else if (!s[l] || h.includes("import") || !s[l].includes("import")) {
|
||||
if (h.includes("url")) {
|
||||
var c = h.indexOf("(") + 1;
|
||||
if (c) {
|
||||
for (;
|
||||
'"' === h[c] || "'" === h[c] || u[h[c]];) c++;
|
||||
h = h.substr(0, c) + this.getUrl(h.substr(c))
|
||||
}
|
||||
} else h.includes("rpx") && (h = h.replace(/[0-9.]+\s*rpx/g, function (t) {
|
||||
return parseFloat(t) * d / 750 + "px"
|
||||
}));
|
||||
s[l] = h
|
||||
}
|
||||
}
|
||||
}
|
||||
return t.attrs.style = n, s
|
||||
}, r.prototype.onTagName = function (t) {
|
||||
this.tagName = this.xml ? t : t.toLowerCase(), "svg" === this.tagName && (this.xml = (this.xml || 0) + 1, l.ignoreTags.style = void 0)
|
||||
}, r.prototype.onAttrName = function (t) {
|
||||
t = this.xml ? t : t.toLowerCase(), "data-" === t.substr(0, 5) ? "data-src" !== t || this.attrs.src ? "img" === this.tagName || "a" === this.tagName ? this.attrName = t : this.attrName = void 0 : this.attrName = "src" : (this.attrName = t, this.attrs[t] = "T")
|
||||
}, r.prototype.onAttrVal = function (t) {
|
||||
var i = this.attrName || "";
|
||||
"style" === i || "href" === i ? this.attrs[i] = n(t, !0) : i.includes("src") ? this.attrs[i] = this.getUrl(n(t, !0)) : i && (this.attrs[i] = t)
|
||||
}, r.prototype.onOpenTag = function (t) {
|
||||
var i = Object.create(null);
|
||||
i.name = this.tagName, i.attrs = this.attrs, this.attrs = Object.create(null);
|
||||
var e = i.attrs,
|
||||
s = this.stack[this.stack.length - 1],
|
||||
n = s ? s.children : this.nodes,
|
||||
a = this.xml ? t : l.voidTags[i.name];
|
||||
if (h[i.name] && (e.class = h[i.name] + (e.class ? " " + e.class : "")), "embed" === i.name) {
|
||||
var r = e.src || "";
|
||||
r.includes(".mp4") || r.includes(".3gp") || r.includes(".m3u8") || (e.type || "").includes("video") ? i.name = "video" : (r.includes(".mp3") || r.includes(".wav") || r.includes(".aac") || r.includes(".m4a") || (e.type || "").includes("audio")) && (i.name = "audio"), e.autostart && (e.autoplay = "T"), e.controls = "T"
|
||||
}
|
||||
if ("video" !== i.name && "audio" !== i.name || ("video" !== i.name || e.id || (e.id = "v" + f++), e.controls || e.autoplay || (e.controls = "T"), i.src = [], e.src && (i.src.push(e.src), e.src = void 0), this.expose()), a) {
|
||||
if (!this.hook(i) || l.ignoreTags[i.name]) return void("base" !== i.name || this.options.domain ? "source" === i.name && s && ("video" === s.name || "audio" === s.name) && e.src && s.src.push(e.src) : this.options.domain = e.href);
|
||||
var o = this.parseStyle(i);
|
||||
if ("img" === i.name) {
|
||||
if (e.src && (e.src.includes("webp") && (i.webp = "T"), e.src.includes("data:") && "all" !== this.options.previewImg && !e["original-src"] && (e.ignore = "T"), !e.ignore || i.webp || e.src.includes("cloud://"))) {
|
||||
for (var c = this.stack.length; c--;) {
|
||||
var p = this.stack[c];
|
||||
"table" !== p.name || i.webp || e.src.includes("cloud://") || (!o.display || o.display.includes("inline") ? i.t = "inline-block" : i.t = o.display, o.display = void 0);
|
||||
var u = p.attrs.style || "";
|
||||
if (!u.includes("flex:") || u.includes("flex:0") || u.includes("flex: 0") || o.width && !(parseInt(o.width) > 100))
|
||||
if (u.includes("flex") && "100%" === o.width)
|
||||
for (var g = c + 1; g < this.stack.length; g++) {
|
||||
var m = this.stack[g].attrs.style || "";
|
||||
if (!m.includes(";width") && !m.includes(" width") && 0 !== m.indexOf("width")) {
|
||||
o.width = "";
|
||||
break
|
||||
}
|
||||
} else u.includes("inline-block") && (o.width && "%" === o.width[o.width.length - 1] ? (p.attrs.style += ";max-width:" + o.width, o.width = "") : p.attrs.style += ";max-width:100%");
|
||||
else {
|
||||
o.width = "100% !important", o.height = "";
|
||||
for (var v = c + 1; v < this.stack.length; v++) this.stack[v].attrs.style = (this.stack[v].attrs.style || "").replace("inline-", "")
|
||||
}
|
||||
"a" === p.name ? i.a = p.attrs : p.c = 1
|
||||
}
|
||||
i.i = this.imgList.length;
|
||||
var y = e["original-src"] || e.src;
|
||||
if (this.imgList.includes(y)) {
|
||||
var b = y.indexOf("://");
|
||||
if (-1 !== b) {
|
||||
b += 3;
|
||||
for (var x = y.substr(0, b); b < y.length && "/" !== y[b]; b++) x += Math.random() > .5 ? y[b].toUpperCase() : y[b];
|
||||
x += y.substr(b), y = x
|
||||
}
|
||||
}
|
||||
this.imgList.push(y), i.t || (this.imgList._unloadimgs += 1)
|
||||
}
|
||||
"inline" === o.display && (o.display = ""), e.ignore && (o["max-width"] = o["max-width"] || "100%", e.style += ";-webkit-touch-callout:none"), parseInt(o.width) > d && (o.height = void 0), isNaN(parseInt(o.width)) || (i.w = "T"), !isNaN(parseInt(o.height)) && (!o.height.includes("%") || s && (s.attrs.style || "").includes("height")) && (i.h = "T"), i.w && i.h && o["object-fit"] && ("contain" === o["object-fit"] ? i.m = "aspectFit" : "cover" === o["object-fit"] && (i.m = "aspectFill"))
|
||||
} else if ("svg" === i.name) return n.push(i), this.stack.push(i), void this.popNode();
|
||||
for (var w in o) o[w] && (e.style += ";".concat(w, ":").concat(o[w].replace(" !important", "")));
|
||||
e.style = e.style.substr(1) || void 0
|
||||
} else("pre" === i.name || (e.style || "").includes("white-space") && e.style.includes("pre")) && 2 !== this.pre && (this.pre = i.pre = 1), i.children = [], this.stack.push(i);
|
||||
n.push(i)
|
||||
}, r.prototype.onCloseTag = function (t) {
|
||||
t = this.xml ? t : t.toLowerCase();
|
||||
var i;
|
||||
for (i = this.stack.length; i-- && this.stack[i].name !== t;);
|
||||
if (-1 !== i)
|
||||
for (; this.stack.length > i;) this.popNode();
|
||||
else if ("p" === t || "br" === t) {
|
||||
var e = this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes;
|
||||
e.push({
|
||||
name: t,
|
||||
attrs: {
|
||||
class: h[t],
|
||||
style: this.tagStyle[t]
|
||||
}
|
||||
})
|
||||
}
|
||||
}, r.prototype.popNode = function () {
|
||||
var i = this.stack.pop(),
|
||||
e = i.attrs,
|
||||
s = i.children,
|
||||
n = this.stack[this.stack.length - 1],
|
||||
r = n ? n.children : this.nodes;
|
||||
if (!this.hook(i) || l.ignoreTags[i.name]) return "title" === i.name && s.length && "text" === s[0].type && this.options.setTitle && wx.setNavigationBarTitle({
|
||||
title: s[0].text
|
||||
}), void r.pop();
|
||||
if (i.pre && 2 !== this.pre) {
|
||||
this.pre = i.pre = void 0;
|
||||
for (var o = this.stack.length; o--;) this.stack[o].pre && (this.pre = 1)
|
||||
}
|
||||
if ("svg" === i.name) {
|
||||
if (this.xml > 1) return void this.xml--;
|
||||
var h = "",
|
||||
c = e.style;
|
||||
return e.style = "", e.xmlns = "http://www.w3.org/2000/svg",
|
||||
function i(e) {
|
||||
if ("text" === e.type) return void(h += e.text);
|
||||
var s = l.svgDict[e.name] || e.name;
|
||||
if ("foreignObject" === s) {
|
||||
var n, a = t(e.children || []);
|
||||
try {
|
||||
for (a.s(); !(n = a.n()).done;) {
|
||||
var r = n.value;
|
||||
if (r.attrs && !r.attrs.xmlns) {
|
||||
r.attrs.xmlns = "http://www.w3.org/1999/xhtml";
|
||||
break
|
||||
}
|
||||
}
|
||||
} catch (t) {
|
||||
a.e(t)
|
||||
} finally {
|
||||
a.f()
|
||||
}
|
||||
}
|
||||
h += "<" + s;
|
||||
for (var o in e.attrs) {
|
||||
var c = e.attrs[o];
|
||||
c && (h += " ".concat(l.svgDict[o] || o, '="').concat(c.replace(/"/g, ""), '"'))
|
||||
}
|
||||
if (e.children) {
|
||||
h += ">";
|
||||
for (var d = 0; d < e.children.length; d++) i(e.children[d]);
|
||||
h += "</" + s + ">"
|
||||
} else h += "/>"
|
||||
}(i), i.name = "img", i.attrs = {
|
||||
src: "data:image/svg+xml;utf8," + h.replace(/#/g, "%23"),
|
||||
style: c,
|
||||
ignore: "T"
|
||||
}, i.children = void 0, this.xml = !1, void(l.ignoreTags.style = !0)
|
||||
}
|
||||
var p = {};
|
||||
if (e.align && ("table" === i.name ? "center" === e.align ? p["margin-inline-start"] = p["margin-inline-end"] = "auto" : p.float = e.align : p["text-align"] = e.align, e.align = void 0), e.dir && (p.direction = e.dir, e.dir = void 0), "font" === i.name && (e.color && (p.color = e.color, e.color = void 0), e.face && (p["font-family"] = e.face, e.face = void 0), e.size)) {
|
||||
var u = parseInt(e.size);
|
||||
isNaN(u) || (u < 1 ? u = 1 : u > 7 && (u = 7), p["font-size"] = ["x-small", "small", "medium", "large", "x-large", "xx-large", "xxx-large"][u - 1]), e.size = void 0
|
||||
}
|
||||
if ((e.class || "").includes("align-center") && (p["text-align"] = "center"), Object.assign(p, this.parseStyle(i)), "table" !== i.name && parseInt(p.width) > d && (p["max-width"] = "100%", p["box-sizing"] = "border-box"), l.blockTags[i.name]) i.name = "div";
|
||||
else if (l.trustTags[i.name] || this.xml)
|
||||
if ("a" === i.name || "ad" === i.name) this.expose();
|
||||
else if ("video" === i.name || "audio" === i.name)(p.height || "").includes("auto") && (p.height = void 0), i.children = void 0;
|
||||
else if ("ul" !== i.name && "ol" !== i.name || !i.c)
|
||||
if ("table" === i.name) {
|
||||
var f = parseFloat(e.cellpadding),
|
||||
g = parseFloat(e.cellspacing),
|
||||
m = parseFloat(e.border),
|
||||
v = p["border-color"],
|
||||
y = p["border-style"];
|
||||
if (i.c && (isNaN(f) && (f = 2), isNaN(g) && (g = 2)), m && (e.style += ";border:".concat(m, "px ").concat(y || "solid", " ").concat(v || "gray")), i.flag && i.c) {
|
||||
i.flag = void 0, p.display = "grid", "collapse" === p["border-collapse"] && (p["border-collapse"] = void 0, g = 0), g ? (p["grid-gap"] = g + "px", p.padding = g + "px") : m && (e.style += ";border-left:0;border-top:0");
|
||||
var b = [],
|
||||
x = [],
|
||||
w = [],
|
||||
k = {};
|
||||
! function i(e) {
|
||||
for (var s = 0; s < e.length; s++)
|
||||
if ("tr" === e[s].name) x.push(e[s]);
|
||||
else if ("colgroup" === e[s].name) {
|
||||
var n, a = 1,
|
||||
r = t(e[s].children || []);
|
||||
try {
|
||||
for (r.s(); !(n = r.n()).done;) {
|
||||
var o = n.value;
|
||||
if ("col" === o.name) {
|
||||
var l = o.attrs.style || "",
|
||||
h = l.indexOf("width") ? l.indexOf(";width") : 0;
|
||||
if (-1 !== h) {
|
||||
var c = l.indexOf(";", h + 6); - 1 === c && (c = l.length), b[a] = l.substring(h ? h + 7 : 6, c)
|
||||
}
|
||||
a += 1
|
||||
}
|
||||
}
|
||||
} catch (t) {
|
||||
r.e(t)
|
||||
} finally {
|
||||
r.f()
|
||||
}
|
||||
} else i(e[s].children || [])
|
||||
}(s);
|
||||
for (var N = 1; N <= x.length; N++) {
|
||||
for (var T = 1, O = 0; O < x[N - 1].children.length; O++) {
|
||||
var j = x[N - 1].children[O];
|
||||
if ("td" === j.name || "th" === j.name) {
|
||||
for (; k[N + "." + T];) T++;
|
||||
j.c = 1;
|
||||
var S = j.attrs.style || "",
|
||||
C = S.indexOf("width") ? S.indexOf(";width") : 0;
|
||||
if (-1 !== C) {
|
||||
var I = S.indexOf(";", C + 6); - 1 === I && (I = S.length), j.attrs.colspan || (b[T] = S.substring(C ? C + 7 : 6, I)), S = S.substr(0, C) + S.substr(I)
|
||||
}
|
||||
if (S += ";display:flex;flex-direction:column", -1 !== (C = S.indexOf("vertical-align"))) {
|
||||
var A = S.substr(C + 15, 10);
|
||||
A.includes("middle") ? S += ";justify-content:center" : A.includes("bottom") && (S += ";justify-content:flex-end")
|
||||
} else S += ";justify-content:center";
|
||||
if (-1 !== (C = S.indexOf("text-align"))) {
|
||||
var L = S.substr(C + 11, 10);
|
||||
L.includes("center") ? S += ";justify-content: center" : L.includes("right") && (S += ";justify-content: right")
|
||||
}
|
||||
if (S = (m ? ";border:".concat(m, "px ").concat(y || "solid", " ").concat(v || "gray") + (g ? "" : ";border-right:0;border-bottom:0") : "") + (f ? ";padding:".concat(f, "px") : "") + ";" + S, j.attrs.colspan && (S += ";grid-column-start:".concat(T, ";grid-column-end:").concat(T + parseInt(j.attrs.colspan)), j.attrs.rowspan || (S += ";grid-row-start:".concat(N, ";grid-row-end:").concat(N + 1)), T += parseInt(j.attrs.colspan) - 1), j.attrs.rowspan) {
|
||||
S += ";grid-row-start:".concat(N, ";grid-row-end:").concat(N + parseInt(j.attrs.rowspan)), j.attrs.colspan || (S += ";grid-column-start:".concat(T, ";grid-column-end:").concat(T + 1));
|
||||
for (var z = 1; z < j.attrs.rowspan; z++)
|
||||
for (var F = 0; F < (j.attrs.colspan || 1); F++) k[N + z + "." + (T - F)] = 1
|
||||
}
|
||||
S && (j.attrs.style = S), w.push(j), T++
|
||||
}
|
||||
}
|
||||
if (1 === N) {
|
||||
for (var U = "", q = 1; q < T; q++) U += (b[q] ? b[q] : "auto") + " ";
|
||||
p["grid-template-columns"] = U
|
||||
}
|
||||
}
|
||||
i.children = w
|
||||
} else i.c && (p.display = "table"), isNaN(g) || (p["border-spacing"] = g + "px"), (m || f || i.c) && function t(e) {
|
||||
for (var s = 0; s < e.length; s++) {
|
||||
var n = e[s];
|
||||
i.c && (n.c = 1), "th" === n.name || "td" === n.name ? (m && (n.attrs.style = "border:".concat(m, "px ").concat(y || "solid", " ").concat(v || "gray", ";").concat(n.attrs.style || "")), f && (n.attrs.style = "padding:".concat(f, "px;").concat(n.attrs.style || ""))) : n.children && t(n.children)
|
||||
}
|
||||
}(s);
|
||||
if (this.options.scrollTable && !(e.style || "").includes("inline")) {
|
||||
var V = Object.assign({}, i);
|
||||
i.name = "div", i.attrs = {
|
||||
style: "overflow-x:auto;padding:1px"
|
||||
}, i.children = [V], e = V.attrs
|
||||
}
|
||||
} else if (("tbody" === i.name || "tr" === i.name) && i.flag && i.c) i.flag = void 0,
|
||||
function t(i) {
|
||||
for (var e = 0; e < i.length; e++)
|
||||
if ("td" === i[e].name)
|
||||
for (var s = 0, n = ["color", "background", "background-color"]; s < n.length; s++) {
|
||||
var a = n[s];
|
||||
p[a] && (i[e].attrs.style = a + ":" + p[a] + ";" + (i[e].attrs.style || ""))
|
||||
} else t(i[e].children || [])
|
||||
}(s);
|
||||
else if ("td" !== i.name && "th" !== i.name || !e.colspan && !e.rowspan) {
|
||||
if ("ruby" === i.name) {
|
||||
i.name = "span";
|
||||
for (var D = 0; D < s.length - 1; D++) "text" === s[D].type && "rt" === s[D + 1].name && (s[D] = {
|
||||
name: "span",
|
||||
attrs: {
|
||||
style: "display:inline-block;text-align:center"
|
||||
},
|
||||
children: [{
|
||||
name: "div",
|
||||
attrs: {
|
||||
style: "font-size:50%;" + (s[D + 1].attrs.style || "")
|
||||
},
|
||||
children: s[D + 1].children
|
||||
}, s[D]]
|
||||
}, s.splice(D + 1, 1))
|
||||
}
|
||||
} else
|
||||
for (var B = this.stack.length; B--;) "table" !== this.stack[B].name && "tbody" !== this.stack[B].name && "tr" !== this.stack[B].name || (this.stack[B].flag = 1);
|
||||
else {
|
||||
var M = {
|
||||
a: "lower-alpha",
|
||||
A: "upper-alpha",
|
||||
i: "lower-roman",
|
||||
I: "upper-roman"
|
||||
};
|
||||
M[e.type] && (e.style += ";list-style-type:" + M[e.type], e.type = void 0), i.c = 1;
|
||||
for (var P = s.length; P--;) "li" === s[P].name && (s[P].c = 1)
|
||||
} else i.name = "span";
|
||||
if ((p.display || "").includes("flex") && !i.c)
|
||||
for (var Z = s.length; Z--;) {
|
||||
var _ = s[Z];
|
||||
_.f && (_.attrs.style = (_.attrs.style || "") + _.f, _.f = void 0)
|
||||
}
|
||||
var E = n && ((n.attrs.style || "").includes("flex") || (n.attrs.style || "").includes("grid")) && !i.c && !(p.display || "").includes("inline");
|
||||
E && (i.f = ";max-width:100%"), s.length >= 50 && i.c && !(p.display || "").includes("flex") && a(s);
|
||||
for (var G in p)
|
||||
if (p[G]) {
|
||||
var W = ";".concat(G, ":").concat(p[G].replace(" !important", ""));
|
||||
E && (G.includes("flex") && "flex-direction" !== G || "align-self" === G || G.includes("grid") || "-" === p[G][0] || G.includes("width") && W.includes("%")) ? (i.f += W, "width" === G && (e.style += ";width:100%")) : e.style += W
|
||||
} e.style = e.style.substr(1) || void 0
|
||||
}, r.prototype.onText = function (t) {
|
||||
if (!this.pre) {
|
||||
for (var i, e = "", s = 0, a = t.length; s < a; s++) u[t[s]] ? (" " !== e[e.length - 1] && (e += " "), "\n" !== t[s] || i || (i = !0)) : e += t[s];
|
||||
if (" " === e && i) return;
|
||||
t = e
|
||||
}
|
||||
var r = Object.create(null);
|
||||
if (r.type = "text", r.text = n(t), this.hook(r)) {
|
||||
"force" === this.options.selectable && p.includes("iOS") && !wx.canIUse("rich-text.user-select") && this.expose();
|
||||
(this.stack.length ? this.stack[this.stack.length - 1].children : this.nodes).push(r)
|
||||
}
|
||||
}, o.prototype.parse = function (t) {
|
||||
this.content = t || "", this.i = 0, this.start = 0, this.state = this.text;
|
||||
for (var i = this.content.length; - 1 !== this.i && this.i < i;) this.state()
|
||||
}, o.prototype.checkClose = function (t) {
|
||||
var i = "/" === this.content[this.i];
|
||||
return !!(">" === this.content[this.i] || i && ">" === this.content[this.i + 1]) && (t && this.handler[t](this.content.substring(this.start, this.i)), this.i += i ? 2 : 1, this.start = this.i, this.handler.onOpenTag(i), "script" === this.handler.tagName ? (this.i = this.content.indexOf("</", this.i), -1 !== this.i && (this.i += 2, this.start = this.i), this.state = this.endTag) : this.state = this.text, !0)
|
||||
}, o.prototype.text = function () {
|
||||
if (this.i = this.content.indexOf("<", this.i), -1 === this.i) return void(this.start < this.content.length && this.handler.onText(this.content.substring(this.start, this.content.length)));
|
||||
var t = this.content[this.i + 1];
|
||||
if (t >= "a" && t <= "z" || t >= "A" && t <= "Z") this.start !== this.i && this.handler.onText(this.content.substring(this.start, this.i)), this.start = ++this.i, this.state = this.tagName;
|
||||
else if ("/" === t || "!" === t || "?" === t) {
|
||||
this.start !== this.i && this.handler.onText(this.content.substring(this.start, this.i));
|
||||
var i = this.content[this.i + 2];
|
||||
if ("/" === t && (i >= "a" && i <= "z" || i >= "A" && i <= "Z")) return this.i += 2, this.start = this.i, void(this.state = this.endTag);
|
||||
var e = "--\x3e";
|
||||
"!" === t && "-" === this.content[this.i + 2] && "-" === this.content[this.i + 3] || (e = ">"), this.i = this.content.indexOf(e, this.i), -1 !== this.i && (this.i += e.length, this.start = this.i)
|
||||
} else this.i++
|
||||
}, o.prototype.tagName = function () {
|
||||
if (u[this.content[this.i]]) {
|
||||
for (this.handler.onTagName(this.content.substring(this.start, this.i)); u[this.content[++this.i]];);
|
||||
this.i < this.content.length && !this.checkClose() && (this.start = this.i, this.state = this.attrName)
|
||||
} else this.checkClose("onTagName") || this.i++
|
||||
}, o.prototype.attrName = function () {
|
||||
var t = this.content[this.i];
|
||||
if (u[t] || "=" === t) {
|
||||
this.handler.onAttrName(this.content.substring(this.start, this.i));
|
||||
for (var i = "=" === t, e = this.content.length; ++this.i < e;)
|
||||
if (t = this.content[this.i], !u[t]) {
|
||||
if (this.checkClose()) return;
|
||||
if (i) return this.start = this.i, void(this.state = this.attrVal);
|
||||
if ("=" !== this.content[this.i]) return this.start = this.i, void(this.state = this.attrName);
|
||||
i = !0
|
||||
}
|
||||
} else this.checkClose("onAttrName") || this.i++
|
||||
}, o.prototype.attrVal = function () {
|
||||
var t = this.content[this.i],
|
||||
i = this.content.length;
|
||||
if ('"' === t || "'" === t) {
|
||||
if (this.start = ++this.i, this.i = this.content.indexOf(t, this.i), -1 === this.i) return;
|
||||
this.handler.onAttrVal(this.content.substring(this.start, this.i))
|
||||
} else
|
||||
for (; this.i < i; this.i++) {
|
||||
if (u[this.content[this.i]]) {
|
||||
this.handler.onAttrVal(this.content.substring(this.start, this.i));
|
||||
break
|
||||
}
|
||||
if (this.checkClose("onAttrVal")) return
|
||||
}
|
||||
for (; u[this.content[++this.i]];);
|
||||
this.i < i && !this.checkClose() && (this.start = this.i, this.state = this.attrName)
|
||||
}, o.prototype.endTag = function () {
|
||||
var t = this.content[this.i];
|
||||
if (u[t] || ">" === t || "/" === t) {
|
||||
if (this.handler.onCloseTag(this.content.substring(this.start, this.i)), ">" !== t && (this.i = this.content.indexOf(">", this.i), -1 === this.i)) return;
|
||||
this.start = ++this.i, this.state = this.text
|
||||
} else this.i++
|
||||
}, module.exports = r;
|
24
components/page-loading/page-loading.js
Normal file
@ -0,0 +1,24 @@
|
||||
// components/page-loading/page-loading.js
|
||||
Component({
|
||||
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
|
||||
}
|
||||
})
|
4
components/page-loading/page-loading.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
4
components/page-loading/page-loading.wxml
Normal file
@ -0,0 +1,4 @@
|
||||
<!--components/page-loading/page-loading.wxml-->
|
||||
<view class="page-body">
|
||||
<view class="loading"></view>
|
||||
</view>
|
55
components/page-loading/page-loading.wxss
Normal file
@ -0,0 +1,55 @@
|
||||
/* components/page-loading/page-loading.wxss */
|
||||
.page-body {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
z-index: 1;
|
||||
margin-top: 0px;
|
||||
top: 0px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.loading {
|
||||
position: relative;
|
||||
width: 50px;
|
||||
border-radius: 25px;
|
||||
}
|
||||
|
||||
.loading:before,
|
||||
.loading:after {
|
||||
position: absolute;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 20px;
|
||||
content: "";
|
||||
animation: jumping 0.5s infinite alternate;
|
||||
background: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.loading:before {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.loading:after {
|
||||
right: 0;
|
||||
animation-delay: 0.15s;
|
||||
}
|
||||
|
||||
@keyframes jumping {
|
||||
0% {
|
||||
transform: scale(1) translateY(0px) rotateX(0deg);
|
||||
box-shadow: 0 0 0 rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: scale(1.2) translateY(-25px) rotateX(45deg);
|
||||
background: #256742;
|
||||
box-shadow: 0 25px 40px #256742;
|
||||
}
|
||||
}
|
@ -5,7 +5,7 @@ Page({
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
@ -13,7 +13,13 @@ Page({
|
||||
*/
|
||||
onLoad(options) {
|
||||
wx.setNavigationBarTitle({
|
||||
title: '创建项目',
|
||||
title: '创建软著',
|
||||
})
|
||||
},
|
||||
//打开项目信息编辑页面
|
||||
doBuy(e) {
|
||||
wx.navigateTo({
|
||||
url: '../createProjectInfo/createProjectInfo?type=' + e.currentTarget.dataset.type,
|
||||
})
|
||||
}
|
||||
})
|
@ -1,30 +1,147 @@
|
||||
<view class="buy-container">
|
||||
<view class="buy-title"></view>
|
||||
<swiper indicator-dots style="height: 150rpx;" indicator-active-color="#fff">
|
||||
<swiper-item>
|
||||
<image src="https://img.shetu66.com/2023/08/23/1692758684593196.jpg" style="width: 100vw;height: 150rpx;"></image>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<image src="https://img.shetu66.com/2023/08/23/1692758684593196.jpg" style="width: 100vw;height: 150rpx;"></image>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<image src="https://img.shetu66.com/2023/08/23/1692758684593196.jpg" style="width: 100vw;height: 150rpx;"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<!-- 全托管 -->
|
||||
<view class="buy-all-box">
|
||||
<view class="buy-all-title">
|
||||
<view class="buy-all-txt">全托管</view>
|
||||
<view class="buy-all-btn">购买</view>
|
||||
</view>
|
||||
<view class="buy-desc-box">
|
||||
<view class="buy-desc-txt">从下单到取证,仅需提供基本信息,我们为您提供一站式管家服务.</view>
|
||||
<view class="buy-desc-title">提供的服务</view>
|
||||
<view class="buy-desc-item">
|
||||
<view class="buy-desc-row">包可运行软件开发与搭建</view>
|
||||
<view class="buy-desc-row">包鉴别材料撰写</view>
|
||||
</view>
|
||||
<view class="buy-desc-item">
|
||||
<view class="buy-desc-row">包代办,包下证,包开发票提</view>
|
||||
<view class="buy-desc-row">供可运行软件安装包</view>
|
||||
</view>
|
||||
<view class="buy-desc-item">
|
||||
<view class="buy-desc-row">
|
||||
<image src="/static/images/ic_check_fit.png" style="width: 28rpx;height: 28rpx;"></image>
|
||||
<text>提供可运行软件云服务900天</text>
|
||||
<view class="buy-all-container">
|
||||
<view class="buy-all-box">
|
||||
<view class="pd-20">
|
||||
<view class="buy-all-title">
|
||||
<view class="buy-all-txt">
|
||||
<text class="txt">全托管</text>
|
||||
<text class="money">¥280-1080</text>
|
||||
</view>
|
||||
<view class="buy-all-btn" bind:tap="doBuy" data-type="all">购买</view>
|
||||
</view>
|
||||
<view class="buy-desc-box mt-10">
|
||||
<view class="buy-desc-txt">从下单到取证,仅需提供基本信息,我们为您提供一站式管家服务.</view>
|
||||
<view class="mt-10">提供的服务</view>
|
||||
<view class="buy-desc-item mt-10">
|
||||
<view class="buy-desc-row">
|
||||
<image src="../../../static/images/ic_check_fit.png" class="buy-desc-row-icon"></image>
|
||||
<text class="txt">包可运行软件开发与搭建</text>
|
||||
</view>
|
||||
<view class="buy-desc-row">
|
||||
<image src="/static/images/ic_check_fit.png" class="buy-desc-row-icon"></image>
|
||||
<text class="txt">包鉴别材料撰写</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="buy-desc-item mt-10">
|
||||
<view class="buy-desc-row">
|
||||
<image src="/static/images/ic_check_fit.png" class="buy-desc-row-icon"></image>
|
||||
<text class="txt">包代办,包下证,包开发票提</text>
|
||||
</view>
|
||||
<view class="buy-desc-row">
|
||||
<image src="/static/images/ic_check_fit.png" class="buy-desc-row-icon"></image>
|
||||
<text class="txt">供可运行软件安装包</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="buy-desc-item mt-10">
|
||||
<view class="buy-desc-row">
|
||||
<image src="/static/images/ic_check_fit.png" class="buy-desc-row-icon"></image>
|
||||
<text class="txt">提供可运行软件云服务900天</text>
|
||||
</view>
|
||||
<view class="buy-desc-row">
|
||||
<image src="/static/images/ic_check_fit.png" class="buy-desc-row-icon"></image>
|
||||
<text class="txt">提供可运行软件演示视频</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="buy-desc-item mt-10">
|
||||
<view class="buy-desc-row">
|
||||
<image src="/static/images/ic_check_fit.png" class="buy-desc-row-icon"></image>
|
||||
<text class="txt">客服一对一服务</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-20">
|
||||
<text>使用流程</text>
|
||||
<view class="buy-desc-column mt-10 list">
|
||||
<view class="buy-desc-row-no-margin list-item">
|
||||
<text class="txt">填写系统名称</text>
|
||||
</view>
|
||||
<view class="buy-desc-row-no-margin list-item">
|
||||
<text class="txt">填写基本信息</text>
|
||||
</view>
|
||||
<view class="buy-desc-row-no-margin list-item">
|
||||
<text class="txt">接收证书</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="buy-desc-column box-bottom-options mt-20">
|
||||
<checkbox></checkbox>
|
||||
<view style="color: #532A00;padding-left: 10rpx;font-weight: 400;">加急办理800元</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 写材料 -->
|
||||
<view class="buy-all-box">
|
||||
<view class="pd-20">
|
||||
<view class="buy-all-title">
|
||||
<view class="buy-all-txt">写材料</view>
|
||||
<view class="buy-all-btn" bind:tap="doBuy" data-type="material">购买</view>
|
||||
</view>
|
||||
<view class="buy-desc-box">
|
||||
<view class="buy-desc-txt mt-10">通过平台自己搭建可运行软件后由平台自动生成相关鉴别材料,下载鉴别材料后可自行申报或找相关代理机构申报.</view>
|
||||
<view class="mt-10">提供的服务</view>
|
||||
<view class="buy-desc-item mt-10">
|
||||
<view class="buy-desc-row">
|
||||
<image src="../../../static/images/ic_check_fit.png" class="buy-desc-row-icon"></image>
|
||||
<text class="txt">通过平台自己搭建可运行软件</text>
|
||||
</view>
|
||||
<view class="buy-desc-row">
|
||||
<image src="/static/images/ic_check_fit.png" class="buy-desc-row-icon"></image>
|
||||
<text class="txt">平台自动撰写鉴别材料</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="buy-desc-item">
|
||||
<view class="buy-desc-row">
|
||||
<image src="/static/images/ic_check_fit.png" class="buy-desc-row-icon"></image>
|
||||
<text class="txt">包补正材料撰写一直到下证</text>
|
||||
</view>
|
||||
<view class="buy-desc-row">
|
||||
<image src="/static/images/ic_check_fit.png" class="buy-desc-row-icon"></image>
|
||||
<text class="txt">两次补正不通过平台退款</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="buy-desc-item">
|
||||
<view class="buy-desc-row">
|
||||
<image src="/static/images/ic_check_fit.png" class="buy-desc-row-icon"></image>
|
||||
<text class="txt">包开发票</text>
|
||||
</view>
|
||||
<view class="buy-desc-row">
|
||||
<image src="/static/images/ic_check_fit.png" class="buy-desc-row-icon"></image>
|
||||
<text class="txt">提供可运行软件云服务300天</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="buy-desc-item">
|
||||
<view class="buy-desc-row">
|
||||
<image src="/static/images/ic_check_fit.png" class="buy-desc-row-icon"></image>
|
||||
<text class="txt">客服一对一服务</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt-20">
|
||||
<text>使用流程</text>
|
||||
<view style="display: flex;flex-direction: column;">
|
||||
<view class="buy-desc-row-no-margin mt-10">
|
||||
<image src="/static/images/ic_check_fit.png" class="buy-desc-row-icon"></image>
|
||||
<text>按系统操作流程执行</text>
|
||||
</view>
|
||||
<view class="buy-desc-row-no-margin mt-10">
|
||||
<image src="/static/images/ic_check_fit.png" class="buy-desc-row-icon"></image>
|
||||
<text>如需视频文件和安装包请在下证后购买下载</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="buy-desc-row">提供可运行软件演示视频</view>
|
||||
</view>
|
||||
<view>客服一对一服务</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
@ -1,6 +1,26 @@
|
||||
/* pages/copyright/createBuy/createBuy.wxss */
|
||||
page {
|
||||
background-color: gray;
|
||||
wx-checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
color: #fff !important;
|
||||
background-color: #FFA900;
|
||||
border: 2rpx solid #FFA900
|
||||
}
|
||||
|
||||
wx-checkbox .wx-checkbox-input {
|
||||
/*margin-right: 10rpx;*/
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
outline: 0;
|
||||
text-indent: 0;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
background-color: transparent;
|
||||
position: relative;
|
||||
border: 1rpx solid #FFA900;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/*钩大小*/
|
||||
wx-checkbox .wx-checkbox-input.wx-checkbox-input-checked:before {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.buy-container {
|
||||
@ -14,13 +34,20 @@ page {
|
||||
background-color: blanchedalmond;
|
||||
}
|
||||
|
||||
.buy-all-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-radius: 10rpx;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.buy-all-box {
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
border-radius: 20rpx;
|
||||
background-color: white;
|
||||
box-shadow: 0rpx 0rpx 10rpx 10rpx #e9e8e88f;
|
||||
}
|
||||
|
||||
.buy-all-title {
|
||||
@ -33,12 +60,21 @@ page {
|
||||
.buy-all-txt {
|
||||
font-size: 42rpx;
|
||||
color: black;
|
||||
}
|
||||
|
||||
|
||||
.buy-all-txt .money {
|
||||
margin-left: 20rpx;
|
||||
font-size: 32rpx;
|
||||
color: #532A00;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.buy-all-btn {
|
||||
padding: 5rpx 20rpx;
|
||||
background-color: gray;
|
||||
padding: 5rpx 35rpx;
|
||||
border-radius: 10rpx;
|
||||
background-color: #FFA900;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.buy-desc-box {
|
||||
@ -66,5 +102,64 @@ page {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
font-size: 28rpx;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.buy-desc-row-no-margin {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
font-size: 28rpx;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.buy-desc-column {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
font-size: 28rpx;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.list {
|
||||
counter-reset: my-counter;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* 每个列表项递增计数器 */
|
||||
.list-item {
|
||||
counter-increment: my-counter;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* 使用 ::before 伪元素显示计数器值并设置圆形背景 */
|
||||
.list-item::before {
|
||||
content: counter(my-counter);
|
||||
background-color: #F4CE98;
|
||||
color: black;
|
||||
border-radius: 50%;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.buy-desc-row .txt {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.buy-desc-row-icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.box-bottom-options {
|
||||
justify-content: center;
|
||||
background-color: #FCF3E5;
|
||||
padding: 20rpx;
|
||||
}
|
@ -5,6 +5,16 @@ Page({
|
||||
date: utils.formatDate(new Date()),
|
||||
completeDate: utils.formatDate(new Date()), //开发完成时间
|
||||
version: "v1.0", //系统版本
|
||||
type: 'all', //默认全托管 上级页面传递type参数 all全托管 material写材料
|
||||
languageList: ['JAVA', "PYTHON", "GO", "KOTLIN"],
|
||||
isShowLanguage: false, //是否显示语言选择
|
||||
currentLanguage: 'JAVA', //当前选中的语言
|
||||
},
|
||||
onLoad(options) {
|
||||
wx.setNavigationBarTitle({
|
||||
title: '创建软著',
|
||||
})
|
||||
console.log(options)
|
||||
},
|
||||
//系统版本
|
||||
inputVersion(e) {
|
||||
@ -19,5 +29,17 @@ Page({
|
||||
this.setData({
|
||||
completeDate: e.detail.value
|
||||
})
|
||||
},
|
||||
toggleOptions() {
|
||||
this.setData({
|
||||
isShowLanguage: !this.data.isShowLanguage
|
||||
});
|
||||
},
|
||||
selectOption(e) {
|
||||
const selectedValue = e.currentTarget.dataset.value;
|
||||
this.setData({
|
||||
currentLanguage: selectedValue,
|
||||
isShowLanguage: false
|
||||
});
|
||||
}
|
||||
})
|
@ -1,5 +1,15 @@
|
||||
<view class="create-container">
|
||||
<view class="create-title"></view>
|
||||
<swiper indicator-dots style="height: 150rpx;" indicator-active-color="#fff">
|
||||
<swiper-item>
|
||||
<image src="https://img.shetu66.com/2023/08/23/1692758684593196.jpg" style="width: 100vw;height: 150rpx;"></image>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<image src="https://img.shetu66.com/2023/08/23/1692758684593196.jpg" style="width: 100vw;height: 150rpx;"></image>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<image src="https://img.shetu66.com/2023/08/23/1692758684593196.jpg" style="width: 100vw;height: 150rpx;"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="info-box">
|
||||
<view class="info-title">项目信息</view>
|
||||
<input class="info-value" placeholder="请输入系统全称(注:建议以'软件''平台''系统'等字眼结尾)" />
|
||||
@ -17,16 +27,32 @@
|
||||
<input class="desc" placeholder="请选择/创建知识产权联系人" />
|
||||
</view>
|
||||
<view class="item">
|
||||
<text class="label" style="flex: 1;">系统版本</text>
|
||||
<input class="value" placeholder="v1.0" style="flex:1;" value="{{version}}" bindinput="inputVersion"/>
|
||||
<text class="label" style="flex: 1;">系统语言</text>
|
||||
<text class="value" style="flex: 1;">JAVA</text>
|
||||
<text class="link" bindtap="selectSysLang">选择</text>
|
||||
<view class="flex-1">
|
||||
<text class="label" style="flex: 1;">系统版本</text>
|
||||
<input class="value" placeholder="v1.0" style="flex:1;" value="{{version}}" bindinput="inputVersion" />
|
||||
</view>
|
||||
<view class="flex-1">
|
||||
<text class="label">系统语言</text>
|
||||
<view class="value selection-box ml-20">
|
||||
<view style="display: flex;align-items: center;">
|
||||
<view class="language-sel" bindtap="toggleOptions">{{currentLanguage}}</view>
|
||||
<image src="/static/images/ic_arrow_down.png" style="width: 28rpx;height: 28rpx;"></image>
|
||||
</view>
|
||||
<view class="language-options" wx:if="{{isShowLanguage}}">
|
||||
<view class="option" wx:for="{{languageList}}" wx:key="index" data-value="{{item}}" bindtap="selectOption">
|
||||
{{item}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label">开发完成时间</view>
|
||||
<picker style="flex:1;" mode="date" value="{{date}}" start="2010-01-01" end="2050-01-01" bindchange="bindDateChange">
|
||||
<view class="desc">{{completeDate}}</view>
|
||||
<view class="desc">
|
||||
<view>{{completeDate}}</view>
|
||||
<image class="icon" src="/static/images/ic_calendar.png"></image>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -17,22 +17,24 @@
|
||||
}
|
||||
|
||||
.info-title {
|
||||
font-size: 30rpx;
|
||||
font-size: 36rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
margin-top: 10rpx;
|
||||
border: 1rpx solid black;
|
||||
padding: 20rpx;
|
||||
margin-top: 20rpx;
|
||||
border: 1rpx solid #f2f2f2;
|
||||
padding: 24rpx;
|
||||
font-size: 28rpx;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.info-btn {
|
||||
align-self: flex-end;
|
||||
background-color: #f2f2f2;
|
||||
margin-top: 10rpx;
|
||||
padding: 10rpx 40rpx;
|
||||
background-color: #FFA900;
|
||||
margin-top: 20rpx;
|
||||
padding: 5rpx 40rpx;
|
||||
color: white;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
@ -41,10 +43,11 @@
|
||||
}
|
||||
|
||||
.section {
|
||||
border: 1px solid #ccc;
|
||||
border: 1px solid #f4f4f4;
|
||||
border-radius: 5rpx;
|
||||
padding: 15rpx;
|
||||
margin-bottom: 15rpx;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.item {
|
||||
@ -62,13 +65,61 @@
|
||||
.desc {
|
||||
flex: 1;
|
||||
color: #999;
|
||||
text-align: right;
|
||||
text-align: left;
|
||||
padding-left: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.desc .icon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
|
||||
.value {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.language-sel {
|
||||
font-size: 30rpx;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
.link {
|
||||
color: #007AFF;
|
||||
}
|
||||
|
||||
.flex-1 {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.selection-box {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.language-options {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: -20rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
border: 1px solid #f2f2f2;
|
||||
border-top: none;
|
||||
background-color: white;
|
||||
box-shadow: 0rpx 0rpx 10rpx 10rpx #f2f2f2;
|
||||
}
|
||||
|
||||
.option {
|
||||
padding: 15rpx;
|
||||
cursor: pointer;
|
||||
border-bottom: 1rpx solid #f2f2f2;
|
||||
}
|
||||
|
||||
.option:hover {
|
||||
background-color: #f0f0f0;
|
||||
}
|
65
pages/copyright/payment/payment.js
Normal file
@ -0,0 +1,65 @@
|
||||
// pages/copyright/payment/payment.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
paySumOptions: [100, 300, 500, 1000, 2000, 5000],
|
||||
currentTab: 0, //充值金额选项
|
||||
payMoney: 100, //支付金额
|
||||
currentBagTab: 1, //当前套餐包tab
|
||||
payWay: 1, //支付方式 1微信 2对公
|
||||
},
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
//监听充值金额选项
|
||||
doChangePayMoney(e) {
|
||||
this.setData({
|
||||
payMoney: e.currentTarget.dataset.value
|
||||
})
|
||||
},
|
||||
//监听充值金额变化
|
||||
obMoney(e) {
|
||||
console.log(e)
|
||||
var _self = this
|
||||
const inputValue = e.detail.value
|
||||
const regex = /^[+-]?(\d+(\.\d*)?|\.\d+)$/;
|
||||
if (regex.test(inputValue)) {
|
||||
//数字
|
||||
_self.setData({
|
||||
payMoney: e.detail.value
|
||||
})
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: '请输入数字',
|
||||
icon: 'error',
|
||||
success: () => {
|
||||
setTimeout(() => {
|
||||
_self.setData({
|
||||
payMoney: 100
|
||||
})
|
||||
}, 1000);
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
//切换套餐包
|
||||
doChangeBagTab(e) {
|
||||
this.setData({
|
||||
currentBagTab: e.currentTarget.dataset.value
|
||||
})
|
||||
},
|
||||
//切换支付方式
|
||||
doChangePayWay(e) {
|
||||
console.log(e)
|
||||
this.setData({
|
||||
payWay: e.detail.value
|
||||
})
|
||||
},
|
||||
//去支付
|
||||
doPay() {
|
||||
|
||||
}
|
||||
})
|
3
pages/copyright/payment/payment.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
91
pages/copyright/payment/payment.wxml
Normal file
@ -0,0 +1,91 @@
|
||||
<view class="page-container">
|
||||
<swiper indicator-dots style="height: 180rpx;" indicator-active-color="#fff">
|
||||
<swiper-item>
|
||||
<image src="https://img.shetu66.com/2023/08/23/1692758684593196.jpg" style="width: 100vw;height: 180rpx;"></image>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<image src="https://img.shetu66.com/2023/08/23/1692758684593196.jpg" style="width: 100vw;height: 180rpx;"></image>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<image src="https://img.shetu66.com/2023/08/23/1692758684593196.jpg" style="width: 100vw;height: 180rpx;"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<!-- 充值金额输入 -->
|
||||
<view class="card-box sum-input-box">
|
||||
<view class="mt-20">充值金额</view>
|
||||
<view class="sum-input mt-20">
|
||||
<text>¥</text>
|
||||
<input type="digit" placeholder="请输入金额" bindinput="obMoney" value="{{payMoney}}" />
|
||||
</view>
|
||||
<scroll-view scroll-x="{{true}}" class="mt-20">
|
||||
<view class="list-tabs">
|
||||
<block wx:for="{{paySumOptions}}" wx:key="index">
|
||||
<view class="{{currentTab==index? 'tab-select' :'tab-normal'}} item-margin" bind:tap="doChangePayMoney" data-value="{{item}}">
|
||||
<text>{{item}}</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<!-- 付款方式 -->
|
||||
<view class="card-box">
|
||||
<view>付款方式</view>
|
||||
<radio-group bindchange="doChangePayWay" class="form-radio_wrap">
|
||||
<view class="pay-option-item mt-20">
|
||||
<view class="option-type">
|
||||
<image class="icon" src="/static/images/ic_wechat_pay.png"></image>
|
||||
<view>微信支付</view>
|
||||
</view>
|
||||
<radio class="radio" checked="{{payWay==1}}" value="1"></radio>
|
||||
</view>
|
||||
<view class="pay-option-item">
|
||||
<view class="option-type">
|
||||
<image class="icon" src="/static/images/ic_card_pay.png"></image>
|
||||
<view>对公转账</view>
|
||||
</view>
|
||||
<radio class="radio" checked="{{payWay==2}}" value="2"></radio>
|
||||
</view>
|
||||
</radio-group>
|
||||
</view>
|
||||
<!-- 套餐包 -->
|
||||
<view class="card-box">
|
||||
<view class="bag-box">
|
||||
<view class="{{currentBagTab==1?'bag-select':'bag-normal'}} border-left" bind:tap="doChangeBagTab" data-value="1">写材料套餐包</view>
|
||||
<view class="{{currentBagTab==2?'bag-select':'bag-normal'}} border-right" bind:tap="doChangeBagTab" data-value="2">全托管套餐包</view>
|
||||
</view>
|
||||
<view class="bag-list">
|
||||
<!-- 列表 -->
|
||||
<view class="bag-item">
|
||||
<view class="bag-item-title-box">
|
||||
<view class="title">70元套餐包</view>
|
||||
<view class="sum">70</view>
|
||||
</view>
|
||||
<view class="bag-item-desc-box">
|
||||
<view class="desc">平均写一件材料100元</view>
|
||||
<view class="btn">选购</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bag-item">
|
||||
<view class="bag-item-title-box">
|
||||
<view class="title">70元套餐包</view>
|
||||
<view class="sum">70</view>
|
||||
</view>
|
||||
<view class="bag-item-desc-box">
|
||||
<view class="desc">平均写一件材料100元</view>
|
||||
<view class="btn">选购</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bag-item">
|
||||
<view class="bag-item-title-box">
|
||||
<view class="title">70元套餐包</view>
|
||||
<view class="sum">70</view>
|
||||
</view>
|
||||
<view class="bag-item-desc-box">
|
||||
<view class="desc">平均写一件材料100元</view>
|
||||
<view class="btn">选购</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="green-bottom-btn" bind:tap="doPay">确认充值</view>
|
||||
</view>
|
230
pages/copyright/payment/payment.wxss
Normal file
@ -0,0 +1,230 @@
|
||||
/* pages/copyright/payment/payment.wxss */
|
||||
.form-radio_wrap .radio .wx-radio-input {
|
||||
height: 32rpx;
|
||||
width: 32rpx;
|
||||
border-radius: 50%;
|
||||
border: 2rpx solid #e6c171;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.form-radio_wrap .radio .wx-radio-input.wx-radio-input-checked::before {
|
||||
border-radius: 50%;
|
||||
/* 圆角 */
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
line-height: 20rpx;
|
||||
text-align: center;
|
||||
font-size: 0rpx;
|
||||
color: transparent;
|
||||
background: #e6c171;
|
||||
transform: translate(-50%, -50%) scale(1);
|
||||
-webkit-transform: translate(-50%, -50%) scale(1);
|
||||
}
|
||||
|
||||
.card-box {
|
||||
margin-top: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 30rpx;
|
||||
background-color: white;
|
||||
border: 1rpx solid #F5F5F5;
|
||||
}
|
||||
|
||||
.sum-input-box {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.sum-input-box .title {
|
||||
font-size: 24rpx;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.sum-input-box input {
|
||||
font-size: 42rpx;
|
||||
color: black;
|
||||
padding: 20rpx 10rpx;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.sum-input {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
border-bottom: 1rpx solid #dbdada;
|
||||
}
|
||||
|
||||
.pay-option-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.pay-option-item .option-type {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
margin: 20rpx 0rpx;
|
||||
}
|
||||
|
||||
.option-type .icon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
|
||||
.list-tabs {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.bag-box {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.bag-select {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
background-color: #FFA900;
|
||||
color: white;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.bag-normal {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
background-color: #FFFFFF;
|
||||
color: #FFA900;
|
||||
border: 1rpx solid #FFA900;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.tab-select {
|
||||
font-size: 20rpx;
|
||||
color: black;
|
||||
background-color: #FAE9D0;
|
||||
text-align: center;
|
||||
padding: 5rpx 30rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
||||
.item-margin {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.item-margin:nth-of-type(n+2) {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.tab-normal {
|
||||
font-size: 20rpx;
|
||||
color: #F4CC92;
|
||||
background: #FFFFFF;
|
||||
border: 1rpx solid #F4CC92;
|
||||
text-align: center;
|
||||
padding: 5rpx 30rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
|
||||
.green-bottom-btn {
|
||||
position: fixed;
|
||||
background-color: #37AD46;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
color: white;
|
||||
text-align: center;
|
||||
height: 100rpx;
|
||||
width: 94vw;
|
||||
line-height: 100rpx;
|
||||
border-radius: 20rpx;
|
||||
margin: 20rpx;
|
||||
}
|
||||
|
||||
.green-bottom-btn:active {
|
||||
background-color: #7ef58e;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.bag-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 20rpx;
|
||||
margin-bottom: 110rpx;
|
||||
}
|
||||
|
||||
.bag-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border: 1rpx solid #f2f2f2;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.bag-item-title-box {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.bag-item-title-box .title {
|
||||
font-size: 40rpx;
|
||||
color: black;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.bag-item-title-box .sum {
|
||||
font-size: 32rpx;
|
||||
color: black;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.bag-item-title-box .sum::before {
|
||||
content: "¥";
|
||||
font-size: 24rpx;
|
||||
color: black;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.bag-item-desc-box {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.bag-item-desc-box .desc {
|
||||
font-size: 28rpx;
|
||||
color: #363636;
|
||||
}
|
||||
|
||||
.bag-item-desc-box .btn {
|
||||
background-color: #FFC67D;
|
||||
padding: 10rpx 30rpx;
|
||||
color: white;
|
||||
border-radius: 20rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
/* <view class="bag-list">
|
||||
<!-- 列表 -->
|
||||
<view class="bag-item">
|
||||
<view class="bag-item-title-box">
|
||||
<view class="title">70元套餐包</view>
|
||||
<view class="sum">70</view>
|
||||
</view>
|
||||
<view class="bag-item-desc-box">
|
||||
<view class="desc">平均写一件材料100元</view>
|
||||
<view class="btn">选购</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> */
|
@ -1,9 +1,10 @@
|
||||
// index.js
|
||||
const app = getApp()
|
||||
const systemInfo = wx.getWindowInfo();
|
||||
const statusBarHeight = systemInfo.statusBarHeight; // 状态栏高度
|
||||
const navBarHeight = 44; // 导航栏高度(iOS 为 44px,Android 为 48px)
|
||||
const windowHeight = systemInfo.windowHeight - navBarHeight - statusBarHeight; //可用内容高度
|
||||
const deviceInfo = wx.getDeviceInfo()
|
||||
const screenInfo = wx.getWindowInfo();
|
||||
const statusBarHeight = screenInfo.statusBarHeight; // 状态栏高度
|
||||
const navBarHeight = deviceInfo.platform == 'IOS' ? 48 : 50; // 导航栏高度(iOS 为 44px,Android 为 48px)
|
||||
const windowHeight = screenInfo.windowHeight - navBarHeight - statusBarHeight; //可用内容高度
|
||||
Page({
|
||||
data: {
|
||||
statusBarHeight: statusBarHeight,
|
||||
@ -11,17 +12,55 @@ Page({
|
||||
totalHeight: navBarHeight, // 导航栏总高度
|
||||
contentHeight: windowHeight,
|
||||
tabList: ["写材料", "全托管", "安装包", "演示视频", "加急", "提交版权中心", "已经下证"],
|
||||
currentTab: "写材料"
|
||||
currentTypeTab: "写材料",
|
||||
currentStatus: 1, //默认状态 1进行 2完成
|
||||
listLoading: 'loading',
|
||||
listRefreshTrig: false, //是否正在刷新
|
||||
},
|
||||
onLoad(e) {
|
||||
const info = wx.getWindowInfo()
|
||||
const h = info.windowHeight - navBarHeight - statusBarHeight
|
||||
console.log(h)
|
||||
const _self = this
|
||||
setTimeout(() => {
|
||||
_self.setData({
|
||||
listLoading: 'success'
|
||||
})
|
||||
}, 1000);
|
||||
},
|
||||
printInfo() {},
|
||||
//创建项目
|
||||
createCopy() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/copyright/createBuy/createBuy',
|
||||
})
|
||||
},
|
||||
//充值
|
||||
goPayment() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/copyright/payment/payment',
|
||||
})
|
||||
},
|
||||
//切换状态
|
||||
doChangeStatus(e) {
|
||||
this.setData({
|
||||
currentStatus: e.currentTarget.dataset.value
|
||||
})
|
||||
},
|
||||
//切换类型
|
||||
doChangeTypeTab(e) {
|
||||
var _self = this
|
||||
_self.setData({
|
||||
currentTypeTab: e.currentTarget.dataset.value
|
||||
})
|
||||
},
|
||||
//刷新列表
|
||||
doRefreshList() {
|
||||
console.log('正在刷新...')
|
||||
const _self = this
|
||||
_self.setData({
|
||||
listRefreshTrig: true
|
||||
})
|
||||
setTimeout(() => {
|
||||
_self.setData({
|
||||
listRefreshTrig: false
|
||||
})
|
||||
}, 5000);
|
||||
}
|
||||
})
|
@ -1,4 +1,6 @@
|
||||
{
|
||||
"usingComponents": {},
|
||||
"usingComponents": {
|
||||
"container-loading": "/components/container-loading/container-loading"
|
||||
},
|
||||
"navigationStyle": "custom"
|
||||
}
|
@ -1,28 +1,32 @@
|
||||
<view class="custom-navbar" style="height: {{totalHeight}}px; padding-top: {{statusBarHeight}}px;justify-content: flex-start;">
|
||||
<view class="navbar-title">AI喵著</view>
|
||||
</view>
|
||||
<view class="content-box">
|
||||
<view class="container-title">
|
||||
<view class="bg-title" style="padding-bottom: 40rpx;">
|
||||
<view class="custom-navbar" style="height: {{totalHeight}}px; padding-top: {{statusBarHeight}}px;justify-content: flex-start;color: white;">
|
||||
<view class="navbar-title">AI喵著</view>
|
||||
</view>
|
||||
<view class="pd-20">
|
||||
<view class="title-func">
|
||||
<view class="create-btn" bind:tap="createCopy">
|
||||
<text>+</text>
|
||||
<text>创建软著</text>
|
||||
</view>
|
||||
<view class="buy-btn">充值</view>
|
||||
<view class="buy-btn" bind:tap="goPayment">充值</view>
|
||||
</view>
|
||||
<view class="notice-box">通知:你的软著已下证</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-box">
|
||||
<view class="container-title">
|
||||
<view class="container-box">
|
||||
<view class="list-title-box">
|
||||
<view class="list-title-txt">软著列表</view>
|
||||
<view class="list-title-btns">
|
||||
<view>进行中的</view>
|
||||
<view>已完成的</view>
|
||||
<view bind:tap="doChangeStatus" data-value="1" class="{{currentStatus==1? 'btn-select':'btn-normal'}} border-left">进行中的</view>
|
||||
<view bind:tap="doChangeStatus" data-value="2" class="{{currentStatus==2? 'btn-select':'btn-normal'}} border-right">已完成的</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-x="{{true}}" class="mt-20">
|
||||
<view class="list-tabs">
|
||||
<block wx:for="{{tabList}}" wx:key="index">
|
||||
<view class="{{currentTab==item? 'tab-select' :'tab-normal'}} item-margin" bind:tap="changeTab" data-id="{{item.newsDirectoriesId}}">
|
||||
<view class="{{currentTypeTab==item? 'tab-select' :'tab-normal'}} item-margin" bind:tap="doChangeTypeTab" data-value="{{item}}">
|
||||
<text>{{item}}</text>
|
||||
</view>
|
||||
</block>
|
||||
@ -30,111 +34,27 @@
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y="{{true}}" style="height: {{contentHeight-185}}px;">
|
||||
<view class="list-content">
|
||||
<view class="list-item">
|
||||
<view class="item-img">
|
||||
<image src="https://img.ixintu.com/download/jpg/201911/e25b904bc42a74d7d77aed81e66d772c.jpg!con"></image>
|
||||
<view class="item-img-status">状态</view>
|
||||
</view>
|
||||
<view class="item-content">
|
||||
<view class="item-content-title">
|
||||
<view class="project-name">项目名称</view>
|
||||
<view class="project-status">状态</view>
|
||||
<container-loading loadingState="{{listLoading}}" style="height:{{contentHeight-270}}px;">
|
||||
<scroll-view scroll-y="{{true}}" style="height: {{contentHeight-270}}px;" bindrefresherrefresh="doRefreshList" refresher-enabled refresher-triggered="{{listRefreshTrig}}">
|
||||
<view class="list-content">
|
||||
<view class="list-item">
|
||||
<view class="item-img">
|
||||
<image src="https://img.ixintu.com/download/jpg/201911/e25b904bc42a74d7d77aed81e66d772c.jpg!con"></image>
|
||||
<view class="item-img-status">状态</view>
|
||||
</view>
|
||||
<view class="project-aff">版权所属人</view>
|
||||
<view class="project-btns">
|
||||
<view class="project-create-time">创建时间</view>
|
||||
<view class="project-btn">下载</view>
|
||||
<view class="item-content">
|
||||
<view class="item-content-title">
|
||||
<view class="project-name">项目名称</view>
|
||||
<view class="project-status">状态</view>
|
||||
</view>
|
||||
<view class="project-aff">版权所属人</view>
|
||||
<view class="project-btns">
|
||||
<view class="project-create-time">创建时间</view>
|
||||
<view class="project-btn">下载</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-item">
|
||||
<view class="item-img">
|
||||
<image src="https://img.ixintu.com/download/jpg/201911/e25b904bc42a74d7d77aed81e66d772c.jpg!con"></image>
|
||||
<view class="item-img-status">状态</view>
|
||||
</view>
|
||||
<view class="item-content">
|
||||
<view class="item-content-title">
|
||||
<view class="project-name">项目名称</view>
|
||||
<view class="project-status">状态</view>
|
||||
</view>
|
||||
<view class="project-aff">版权所属人</view>
|
||||
<view class="project-btns">
|
||||
<view class="project-create-time">创建时间</view>
|
||||
<view class="project-btn">下载</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-item">
|
||||
<view class="item-img">
|
||||
<image src="https://img.ixintu.com/download/jpg/201911/e25b904bc42a74d7d77aed81e66d772c.jpg!con"></image>
|
||||
<view class="item-img-status">状态</view>
|
||||
</view>
|
||||
<view class="item-content">
|
||||
<view class="item-content-title">
|
||||
<view class="project-name">项目名称</view>
|
||||
<view class="project-status">状态</view>
|
||||
</view>
|
||||
<view class="project-aff">版权所属人</view>
|
||||
<view class="project-btns">
|
||||
<view class="project-create-time">创建时间</view>
|
||||
<view class="project-btn">下载</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-item">
|
||||
<view class="item-img">
|
||||
<image src="https://img.ixintu.com/download/jpg/201911/e25b904bc42a74d7d77aed81e66d772c.jpg!con"></image>
|
||||
<view class="item-img-status">状态</view>
|
||||
</view>
|
||||
<view class="item-content">
|
||||
<view class="item-content-title">
|
||||
<view class="project-name">项目名称</view>
|
||||
<view class="project-status">状态</view>
|
||||
</view>
|
||||
<view class="project-aff">版权所属人</view>
|
||||
<view class="project-btns">
|
||||
<view class="project-create-time">创建时间</view>
|
||||
<view class="project-btn">下载</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-item">
|
||||
<view class="item-img">
|
||||
<image src="https://img.ixintu.com/download/jpg/201911/e25b904bc42a74d7d77aed81e66d772c.jpg!con"></image>
|
||||
<view class="item-img-status">状态</view>
|
||||
</view>
|
||||
<view class="item-content">
|
||||
<view class="item-content-title">
|
||||
<view class="project-name">项目名称</view>
|
||||
<view class="project-status">状态</view>
|
||||
</view>
|
||||
<view class="project-aff">版权所属人</view>
|
||||
<view class="project-btns">
|
||||
<view class="project-create-time">创建时间</view>
|
||||
<view class="project-btn">下载</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="list-item">
|
||||
<view class="item-img">
|
||||
<image src="https://img.ixintu.com/download/jpg/201911/e25b904bc42a74d7d77aed81e66d772c.jpg!con"></image>
|
||||
<view class="item-img-status">状态</view>
|
||||
</view>
|
||||
<view class="item-content">
|
||||
<view class="item-content-title">
|
||||
<view class="project-name">项目名称</view>
|
||||
<view class="project-status">状态</view>
|
||||
</view>
|
||||
<view class="project-aff">版权所属人</view>
|
||||
<view class="project-btns">
|
||||
<view class="project-create-time">创建时间</view>
|
||||
<view class="project-btn">下载</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</scroll-view>
|
||||
</scroll-view>
|
||||
</container-loading>
|
||||
</view>
|
@ -1,15 +1,23 @@
|
||||
|
||||
.bg-title {
|
||||
background-image: url('https://sjbz-fd.zol-img.com.cn/t_s750x1334c/g5/M00/00/02/ChMkJ1fJVFOIV8kdAC3oDpyfq8YAAU9wQN1ivcALegm011.jpg');
|
||||
}
|
||||
|
||||
.content-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20rpx;
|
||||
margin-top: -30rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-right: 20rpx;
|
||||
background-color: white;
|
||||
border-radius: 20rpx;
|
||||
border: 1rpx solid #f2f2f2;
|
||||
}
|
||||
|
||||
.container-title {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 170px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.title-func {
|
||||
@ -22,24 +30,26 @@
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex: 2;
|
||||
background-color: greenyellow;
|
||||
flex: 2.5;
|
||||
background-color: #FFE5BC;
|
||||
color: #550101;
|
||||
}
|
||||
|
||||
.buy-btn {
|
||||
background-color: green;
|
||||
flex: 1;
|
||||
margin-left: 20rpx;
|
||||
height: 100rpx;
|
||||
height: 170rpx;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
line-height: 170rpx;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.notice-box {
|
||||
font-size: 26rpx;
|
||||
background-color: lavender;
|
||||
background-color: #FFE5BC;
|
||||
margin-top: 20rpx;
|
||||
line-height: 60rpx;
|
||||
padding: 10rpx 10rpx 10rpx 20rpx;
|
||||
@ -58,14 +68,34 @@
|
||||
}
|
||||
|
||||
.list-title-txt {
|
||||
font-size: 30rpx;
|
||||
font-size: 40rpx;
|
||||
color: black;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.list-title-btns {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
.btn-select {
|
||||
background-color: #FDF6EC;
|
||||
color: #FFA900;
|
||||
padding: 5rpx 10rpx;
|
||||
line-height: 48rpx;
|
||||
border: 1rpx solid transparent;
|
||||
}
|
||||
|
||||
.btn-normal {
|
||||
background-color: #FFFFFF;
|
||||
color: black;
|
||||
border: 1rpx solid #f2f2f2;
|
||||
padding: 5rpx 10rpx;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
|
||||
.list-tabs {
|
||||
@ -75,11 +105,19 @@
|
||||
}
|
||||
|
||||
.tab-select {
|
||||
font-size: 20rpx;
|
||||
color: white;
|
||||
background-color: #256742;
|
||||
font-size: 28rpx;
|
||||
background-color: #FFEFCE;
|
||||
text-align: center;
|
||||
padding: 5rpx 15rpx;
|
||||
white-space: nowrap;
|
||||
color: #742A25;
|
||||
}
|
||||
|
||||
.tab-normal {
|
||||
font-size: 28rpx;
|
||||
color: #A1A1A1;
|
||||
background: #FAFAFA;
|
||||
text-align: center;
|
||||
background: #256742;
|
||||
padding: 5rpx 15rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
@ -95,15 +133,6 @@
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.tab-normal {
|
||||
font-size: 20rpx;
|
||||
color: #3F3F3F;
|
||||
background: #EAEAEA;
|
||||
text-align: center;
|
||||
padding: 5rpx 30rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* list */
|
||||
.list-content {
|
||||
display: flex;
|
||||
|
@ -1,4 +1,31 @@
|
||||
/* pages/login/login.wxss */
|
||||
|
||||
wx-checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
color: #fff !important;
|
||||
background-color: #3F72FF;
|
||||
border: 2rpx solid #3F72FF
|
||||
}
|
||||
|
||||
wx-checkbox .wx-checkbox-input {
|
||||
/*margin-right: 10rpx;*/
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
outline: 0;
|
||||
text-indent: 0;
|
||||
border-radius: 50%;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
background-color: transparent;
|
||||
position: relative;
|
||||
border: 1rpx solid rgb(85, 85, 85);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/*钩大小*/
|
||||
wx-checkbox .wx-checkbox-input.wx-checkbox-input-checked:before {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.login {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
|
@ -1,9 +1,10 @@
|
||||
// pages/mine/mine.js
|
||||
const app = getApp()
|
||||
const systemInfo = wx.getWindowInfo();
|
||||
const statusBarHeight = systemInfo.statusBarHeight; // 状态栏高度
|
||||
const navBarHeight = 44; // 导航栏高度(iOS 为 44px,Android 为 48px)
|
||||
const windowHeight = systemInfo.windowHeight - navBarHeight - statusBarHeight; //可用内容高度
|
||||
const deviceInfo = wx.getDeviceInfo()
|
||||
const screenInfo = wx.getWindowInfo();
|
||||
const statusBarHeight = screenInfo.statusBarHeight; // 状态栏高度
|
||||
const navBarHeight = deviceInfo.platform == 'IOS' ? 48 : 50; // 导航栏高度(iOS 为 44px,Android 为 48px)
|
||||
const windowHeight = screenInfo.windowHeight - navBarHeight - statusBarHeight; //可用内容高度
|
||||
Page({
|
||||
|
||||
/**
|
||||
@ -41,4 +42,10 @@ Page({
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
//跳转充值页面
|
||||
doPay() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/copyright/payment/payment',
|
||||
})
|
||||
}
|
||||
})
|
@ -1,31 +1,45 @@
|
||||
<view class="custom-navbar" style="height: {{totalHeight}}px; padding-top: {{statusBarHeight}}px;justify-content: center;">
|
||||
<view class="navbar-title">AI喵著</view>
|
||||
</view>
|
||||
<view class="container-content">
|
||||
<view class="container-box">
|
||||
<view class="box-up">
|
||||
<view class="balance-box">
|
||||
<view class="balance">
|
||||
<view>2022</view>
|
||||
<view class="arrow-down"></view>
|
||||
<view class="bg-container">
|
||||
<image class="bg-image" src="/static/images/bg_mine.jpeg"></image>
|
||||
<view class="content-container">
|
||||
<view class="custom-navbar" style="height: {{totalHeight}}px; padding-top: {{statusBarHeight}}px;justify-content: center;">
|
||||
<view class="navbar-title" style="color:#532A00;">AI喵著</view>
|
||||
</view>
|
||||
<view class="container-content">
|
||||
<view class="container-box">
|
||||
<view class="box-up">
|
||||
<view class="balance">
|
||||
<view>10000000</view>
|
||||
<view class="arrow-down"></view>
|
||||
</view>
|
||||
<view class="balance-box">
|
||||
<view class="balance-desc">账户余额</view>
|
||||
<view class="balance-btn" bind:tap="doPay">充值</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-down">
|
||||
<view>套餐包余额</view>
|
||||
<view class="package-bag">
|
||||
<view class="package-bag-item">
|
||||
<text class="title">全托管</text>
|
||||
<text class="num">100</text>
|
||||
</view>
|
||||
<view class="package-bag-item">
|
||||
<text class="title">写材料</text>
|
||||
<text class="num">2000</text>
|
||||
</view>
|
||||
<view class="package-bag-item">
|
||||
<image src="/static/images/ic_coupon.png" class="icon"></image>
|
||||
<view class="title">优惠卷</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="balance-btn">充值</view>
|
||||
</view>
|
||||
<view class="balance-desc">账户余额</view>
|
||||
</view>
|
||||
<view class="box-down">
|
||||
<view>套餐包余额</view>
|
||||
<view class="package-bag">
|
||||
<view>全托管0</view>
|
||||
<view>写材料100</view>
|
||||
<view>优惠卷</view>
|
||||
<view class="menu-box" style="height: {{contentHeight-240}}px;">
|
||||
<view wx:for="{{menuList}}" wx:key="index" class="menu-item">
|
||||
<image src="{{item.icon}}" class="menu-icon"></image>
|
||||
<view class="menu-title">{{item.title}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="menu-box">
|
||||
<view wx:for="{{menuList}}" wx:key="index" class="menu-item">
|
||||
<image src="{{item.icon}}" class="menu-icon"></image>
|
||||
<view class="menu-title">{{item.title}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
@ -1,5 +1,30 @@
|
||||
/* pages/mine/mine.wxss */
|
||||
.bg-container {
|
||||
position: relative;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.bg-image {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.content-container {
|
||||
position: relative;
|
||||
padding: 0rpx 10rpx 10rpx 10rpx;
|
||||
z-index: 1;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.container-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
@ -11,13 +36,23 @@
|
||||
.box-up {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #FFD100;
|
||||
padding: 40rpx;
|
||||
color: white;
|
||||
background: linear-gradient(to right, #FFDBB4, #FFEDD2);
|
||||
padding: 20rpx 40rpx;
|
||||
color: #532A00;
|
||||
border-top-right-radius: 20rpx;
|
||||
border-top-left-radius: 20rpx;
|
||||
}
|
||||
|
||||
.box-down {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: linear-gradient(to right, #FFF0DE, #FEEBD0);
|
||||
padding: 10rpx 40rpx;
|
||||
color: #532A00;
|
||||
border-bottom-right-radius: 20rpx;
|
||||
border-bottom-left-radius: 20rpx;
|
||||
}
|
||||
|
||||
.balance-box {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@ -26,9 +61,10 @@
|
||||
}
|
||||
|
||||
.balance-btn {
|
||||
padding: 10rpx 20rpx;
|
||||
background-color: yellowgreen;
|
||||
padding: 10rpx 40rpx;
|
||||
background-color: #4EAF79;
|
||||
border-radius: 10rpx;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.balance-desc {
|
||||
@ -45,15 +81,7 @@
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.box-down {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: linear-gradient(to right, #FFE880, #FFD30A);
|
||||
padding: 40rpx;
|
||||
color: white;
|
||||
border-bottom-right-radius: 20rpx;
|
||||
border-bottom-left-radius: 20rpx;
|
||||
}
|
||||
|
||||
|
||||
.arrow-down {
|
||||
width: 0;
|
||||
@ -61,7 +89,7 @@
|
||||
margin-left: 30rpx;
|
||||
border-top: 14rpx solid transparent;
|
||||
border-bottom: 14rpx solid transparent;
|
||||
border-left: 14rpx solid white;
|
||||
border-left: 14rpx solid #532A00;
|
||||
}
|
||||
|
||||
.package-bag {
|
||||
@ -69,12 +97,38 @@
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.package-bag-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.package-bag-item .icon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
}
|
||||
|
||||
.package-bag .title {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.package-bag .num {
|
||||
margin-left: 10rpx;
|
||||
font-size: 40rpx;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.menu-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-top: 30rpx;
|
||||
background: white;
|
||||
border-radius: 20rpx;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
@ -82,7 +136,7 @@
|
||||
flex-direction: row;
|
||||
padding: 30rpx 40rpx;
|
||||
align-items: center;
|
||||
border-bottom: 1rpx solid rgb(238, 238, 238);
|
||||
border-bottom: 1rpx solid rgb(245, 244, 244);
|
||||
margin-left: 20rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
BIN
static/images/bg_mine.jpeg
Normal file
After Width: | Height: | Size: 236 KiB |
BIN
static/images/ic_arrow_down.png
Normal file
After Width: | Height: | Size: 629 B |
BIN
static/images/ic_calendar.png
Normal file
After Width: | Height: | Size: 835 B |
BIN
static/images/ic_card_pay.png
Normal file
After Width: | Height: | Size: 541 B |
Before Width: | Height: | Size: 836 B After Width: | Height: | Size: 720 B |
BIN
static/images/ic_coupon.png
Normal file
After Width: | Height: | Size: 932 B |
BIN
static/images/ic_wechat_pay.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
static/images/load_err.png
Normal file
After Width: | Height: | Size: 16 KiB |