Skip to content

Commit

Permalink
首页分类增加文章分类,发票增加用户协议和隐私条款
Browse files Browse the repository at this point in the history
  • Loading branch information
gooking committed Jan 8, 2022
1 parent b9e1775 commit 981b1c8
Show file tree
Hide file tree
Showing 23 changed files with 246 additions and 149 deletions.
6 changes: 4 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"pages/live/index",
"pages/help/detail",
"pages/help/index",
"pages/cms/list",
"pages/about/index",
"pages/idCheck/index",
"pages/peisong/detail",
Expand All @@ -53,7 +54,8 @@
"pages/recycle/index",
"pages/recycle/orders",
"pages/recycle/order-detail",
"pages/card/logs"
"pages/card/logs",
"pages/notagree/index"
],
"subpackages": [
{
Expand Down Expand Up @@ -143,7 +145,7 @@
}
},
"usingComponents": {
"float-menu": "/components/float-menu/index",
"fuwuxieyi": "/components/fuwuxieyi/index",
"parser":"/components/parser.20200414.min/parser",
"van-notice-bar": "@vant/weapp/notice-bar/index",
"van-search": "@vant/weapp/search/index",
Expand Down
28 changes: 0 additions & 28 deletions components/float-menu/index.wxml

This file was deleted.

52 changes: 0 additions & 52 deletions components/float-menu/index.wxss

This file was deleted.

1 change: 0 additions & 1 deletion components/float-menu/sn.txt

This file was deleted.

39 changes: 28 additions & 11 deletions components/float-menu/index.js → components/fuwuxieyi/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,33 @@ Component({
* 组件的对外属性,是属性名到属性设置的映射表
*/
properties: {
activePos: String,
k: String,
},

/**
* 组件的内部数据,和 properties 一同用于组件的模板渲染
*/
data: {
isClose: true
s: false
},
// 组件数据字段监听器,用于监听 properties 和 data 的变化
observers: {

},
lifetimes: {
attached: function () {
this.setData({

})
if (!this.data.k) {
this.setData({
s: true
})
return
}
const agreeYxtk = wx.getStorageSync('agreeYxtk_' + this.data.k)
if (!agreeYxtk) {
this.setData({
s: true
})
}
},
detached: function () {
// 在组件实例被从页面节点树移除时执行
Expand All @@ -35,15 +44,23 @@ Component({
* 组件的方法列表
*/
methods: {
//回退
open(){
aggree(){
if (this.data.k) {
wx.setStorageSync('agreeYxtk_' + this.data.k, true)
}
this.setData({
isClose: false
s: false
})
},
close(){
this.setData({
isClose: true
notagree(){
wx.navigateTo({
url: '/pages/notagree/index'
})
},
goYstk(e){
const k = e.currentTarget.dataset.k
wx.navigateTo({
url: '/pages/about/index?key=' + k,
})
},
navBack: function () {
Expand Down
File renamed without changes.
18 changes: 18 additions & 0 deletions components/fuwuxieyi/index.wxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<van-popup show="{{ s }}" custom-class="btn-add-box-popup" round close-on-click-overlay="{{ false }}">
<view class="t">用户协议及隐私政策</view>
<view class="content">
您在使用我们的服务时,我们可能会收集和
使用您的相关信息。我们希望通过本
<text class="link" data-k="yhxy" bindtap="goYstk">《用户协议》</text>
及<text class="link" data-k="ysxy" bindtap="goYstk">《隐私协议》</text>向您说明,在使用我
们的服务时,我们如何收集、使用、储存和
分享这些信息,以及我们为您提供的访问、
更新、控制和保护这些信息的方式。本<text class="link" data-k="yhxy" bindtap="goYstk">《用户协议》</text>及
<text class="link" data-k="ysxy" bindtap="goYstk">《隐私协议》</text>,希望您仔细闭读,
充分理解协议中的内容后再点击同意。
</view>
<view class="btn-group">
<van-button type="primary" block size="small" bind:click="aggree">同意</van-button>
<van-button type="danger" block size="small" bind:click="notagree">不同意</van-button>
</view>
</van-popup>
32 changes: 32 additions & 0 deletions components/fuwuxieyi/index.wxss
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.btn-add-box-popup .t {
font-size: 36rpx;
text-align: center;
height: 88rpx;
line-height: 88rpx;
font-weight: bold;
}
.btn-add-box-popup .bd {
padding: 0 32rpx;
padding-bottom: 32rpx;
}
.btn-add-box-popup .del-btn {
margin-top: 32rpx;
}

.content {
width: 600rpx;
padding: 32rpx;
font-size: 32rpx;
line-height: 54rpx;
}
.link {
color: #10AEFF;
}
.btn-group {
padding: 32rpx;
display: flex;
justify-content: space-around;
}
.mt32 {
margin-top: 32rpx;
}
4 changes: 4 additions & 0 deletions components/fuwuxieyi/sn.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
在需要的页面上加这句代码即可
<fuwuxieyi k="invoice_apply" />
k 为页面唯一编号,随便命名即可
不传k,每次都会弹出
4 changes: 2 additions & 2 deletions config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
version: '12.10.1',
note: '修复订单列表页面,没有触底加载下一页', // 这个为版本描述,无需修改
version: '12.11.0',
note: '首页分类增加文章分类,发票增加用户协议和隐私条款', // 这个为版本描述,无需修改
subDomain: 'tz', // liu123 此处改成你自己的专属域名。什么是专属域名?请看教程 https://www.it120.cc/help/qr6l4m.html
merchantId: 951, // 商户ID,可在后台工厂设置-->商户信息查看
sdkAppID: 1400450467, // 腾讯实时音视频应用编号,请看教程 https://www.it120.cc/help/nxoqsl.html
Expand Down
4 changes: 3 additions & 1 deletion pages/about/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Page({

},
onLoad: function (options) {
options.key = 'aboutus'
if (!options.key) {
options.key = 'aboutus'
}
this.data.key = options.key
this.cmsPage()
},
Expand Down
49 changes: 49 additions & 0 deletions pages/cms/list.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
const WXAPI = require('apifm-wxapi')
Page({
data: {
categoryId: undefined, // 分类id
},
onLoad (options) {
this.data.categoryId = options.categoryId
this.cmsCategoryDetail()
this.articles()
},
onShow: function () {

},
async cmsCategoryDetail() {
const res = await WXAPI.cmsCategoryDetail(this.data.categoryId)
if (res.code == 0) {
this.setData({
category: res.data
})
wx.setNavigationBarTitle({
title: res.data.info.name,
})
}
},
async articles() {
wx.showLoading({
title: '',
})
const res = await WXAPI.cmsArticles({
categoryId: this.data.categoryId
})
wx.hideLoading()
if (res.code == 0) {
this.setData({
cmsArticles: res.data
})
} else {
this.setData({
cmsArticles: null
})
}
},
onShareAppMessage: function() {
return {
title: this.data.category.info.name,
path: '/pages/cms/list?categoryId='+ this.data.categoryId +'&inviter_id=' + wx.getStorageSync('uid')
}
},
})
3 changes: 3 additions & 0 deletions pages/cms/list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"navigationBarTitleText": ""
}
2 changes: 2 additions & 0 deletions pages/cms/list.wxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<van-empty wx:if="{{!cmsArticles}}" description="暂无记录" />
<van-cell wx:for="{{cmsArticles}}" wx:key="id" title="{{item.title}}" is-link url="/pages/help/detail?id={{item.id}}" />
1 change: 1 addition & 0 deletions pages/cms/list.wxss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* pages/cms/list.wxss */
Loading

0 comments on commit 981b1c8

Please sign in to comment.