Browse Source

程序上线测试

master
前端-胡立永 5 months ago
parent
commit
f67d395cce
17 changed files with 396 additions and 67 deletions
  1. +1
    -0
      App.vue
  2. +5
    -1
      api/api.js
  3. +24
    -10
      components/PrivacyAgreementPoup/PrivacyAgreementPoup.vue
  4. +3
    -3
      config.js
  5. +1
    -1
      manifest.json
  6. +7
    -0
      pages.json
  7. +14
    -2
      pages/center/center.vue
  8. +62
    -40
      pages/contentDetail/contentDetail.vue
  9. +3
    -3
      pages/login/login.vue
  10. +5
    -3
      pages/login/wxUserInfo.vue
  11. BIN
      static/empty/noData.png
  12. BIN
      static/login/6.png
  13. +7
    -4
      store/store.js
  14. +2
    -0
      uni_modules/uni-section/changelog.md
  15. +167
    -0
      uni_modules/uni-section/components/uni-section/uni-section.vue
  16. +87
    -0
      uni_modules/uni-section/package.json
  17. +8
    -0
      uni_modules/uni-section/readme.md

+ 1
- 0
App.vue View File

@ -2,6 +2,7 @@
export default {
onLaunch: function() {
console.log('App Launch')
this.$store.commit('initConfig')
},
onShow: function() {
console.log('App Show')


+ 5
- 1
api/api.js View File

@ -19,7 +19,11 @@ const config = {
//获取订单列表
getPayOrderPage : {url : '/pay-api/info/getPayOrderPage', method : 'GET'},
//修改个人信息
updateInfo : {url : '/pay-api/info/updateInfo', method : 'GET', limit : 500},
updateInfo : {url : '/pay-api/info/updateInfo', method : 'POST', limit : 500},
//获取隐私政策
getPrivacyPolicy : {url : '/pay-api/login/getPrivacyPolicy', method : 'GET', limit : 500},
//获取用户协议
getUserAgreement : {url : '/pay-api/login/getUserAgreement', method : 'GET', limit : 500},
}


+ 24
- 10
components/PrivacyAgreementPoup/PrivacyAgreementPoup.vue View File

@ -6,7 +6,7 @@
</view>
<view class="content_pri">
<view class="text">
欢迎来到xx加油!我们根据最新的法律法规监管政策要求更新了用户协议隐私政策,请您认真阅读
欢迎来到家乐美统计系统!我们根据最新的法律法规监管政策要求更新了用户协议隐私政策,请您认真阅读
</view>
</view>
<view class="config">
@ -14,10 +14,10 @@
<view class="content">
<view style="display: flex;">
<uv-checkbox size="30rpx" :name="1"></uv-checkbox>
同意<text>xx加油隐私政策</text>
同意<text @click="goToPrivacy">家乐美统计系统隐私政策</text>
</view>
<view class="">
以及<text>用户协议</text>
以及<text @click="goToPrivacy">用户协议</text>
</view>
</view>
</uv-checkbox-group>
@ -40,6 +40,20 @@
checkboxValue : false
}
},
mounted() {
if(wx.getPrivacySetting){
wx.getPrivacySetting({
success: res => {
console.log(res)
if (res.needAuthorization) {
//
this.init()
}
},
fail: () => {}
})
}
},
methods: {
//
@ -66,18 +80,18 @@
//
confusePrivacy() {
this.$refs.popup.close()
this.resolvePrivacyAuthorization({
event: 'disagree'
})
// this.resolvePrivacyAuthorization({
// event: 'disagree'
// })
},
//
handleAgreePrivacyAuthorization() {
// id
this.resolvePrivacyAuthorization({
buttonId: 'agree-btn',
event: 'agree'
})
// this.resolvePrivacyAuthorization({
// buttonId: 'agree-btn',
// event: 'agree'
// })
this.$refs.popup.close()
}
}


+ 3
- 3
config.js View File

@ -4,17 +4,17 @@ import api from '@/api/api.js'
import utils from './utils/utils.js'
// 当前环境
const type = 'dev'
const type = 'prod'
// 环境配置
const config = {
dev : {
// baseUrl : 'http://noticeadmin.augcl.com/a-notice-api',
baseUrl : 'http://h5.xzaiyp.top/a-notice-api',
baseUrl : 'http://h5.xzaiyp.top/pay-admin',
},
prod : {
baseUrl : 'http://admin.anqi.shop/a-notice-api',
baseUrl : 'https://pay-admin.xzaiyp.top/pay-admin',
}
}


+ 1
- 1
manifest.json View File

@ -50,7 +50,7 @@
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wx3c24e397e3b132ea",
"appid" : "wxf173d7bec0f1bbe0",
"setting" : {
"urlCheck" : false
},


+ 7
- 0
pages.json View File

@ -18,6 +18,13 @@
"navigationBarTitleText": "登录",
"navigationStyle": "custom"
}
},
{
"path": "pages/login/wxUserInfo",
"style": {
"navigationBarTitleText": "授权用户信息",
"navigationStyle": "custom"
}
}
],
"globalStyle": {


+ 14
- 2
pages/center/center.vue View File

@ -4,7 +4,9 @@
<view class="content">
<view class="topBox">
<view class="users">
<view class="u-top" v-if="userInfo.appletOpenid">
<view class="u-top"
@click="$utils.navigateTo('/login/wxUserInfo')"
v-if="userInfo.appletOpenid">
<image class="img" :src="userInfo.headImage" mode="widthFix"></image>
<view class="tit">
{{ userInfo.nickName }}
@ -40,10 +42,17 @@
<view class="number">{{ item.price }}</view>
</view>
</div>
<view class="title"
style="padding: 20rpx;">
{{ item.title }}
</view>
</view>
</view>
<view v-if="false" class="no-data">
<view v-if="orderList.length == 0" class="no-data">
<image src="@/static/empty/noData.png" mode=""></image>
<view class="">
空空如也
</view>
</view>
</view>
</view>
@ -194,6 +203,7 @@
background: white;
border-radius: 20rpx;
margin-bottom: 20rpx;
overflow: hidden;
}
.order-item .order-item-top {
@ -238,6 +248,8 @@
display: flex;
justify-content: space-around;
align-items: center;
flex-direction: column;
color: #757575;
}
.listBox {


+ 62
- 40
pages/contentDetail/contentDetail.vue View File

@ -5,23 +5,30 @@
<image class="content-img" :src="shopInfo.image" />
<view class="content-left">
<u-row style="margin: 10rpx;">
<u-col>{{ shopInfo.title }}</u-col>
<u-col><text style="font-size: 32rpx;">{{ shopInfo.title }}</text></u-col>
</u-row>
<u-row justify="space-between" style="margin: 20rpx; font-size: 12px;">
<u-row justify="space-between" style="margin: 20rpx; font-size: 24rpx;">
<u-col span="6">
级别:初级
{{ shopInfo.classValue }}
</u-col>
<u-col span="6">
{{ shopInfo.num }}学习
{{ shopInfo.num }}购买
</u-col>
</u-row>
<u-row justify="space-between" style="margin: 10rpx; font-size: 16px;">
<u-row justify="space-between" style="margin: 10rpx; font-size: 30rpx;">
<u-col span="4" style="text-decoration:line-through">
<view style="color: #ddd;font-size: 28rpx;text-decoration:line-through;">
{{ shopInfo.oldPrice }}
</view>
</u-col>
<u-col span="4">
<view style="color: #ff7800;font-size: 45rpx;">
{{ shopInfo.price }}
</view>
</u-col>
<u-col span="4" style="text-decoration:line-through">
</u-row>
<u-row justify="space-between" style="margin: 10rpx; font-size: 30rpx;">
<u-col span="4" style="margin-top: 30rpx;">
<view class="icon">
<u-number-box style="margin: 0 auto;" v-model="registerForm.num" :min="1">
<view slot="minus" class="minus">
@ -45,40 +52,47 @@
<view class="cell">
<view class="cell-box">
<view>
无法查看资源内容请购买!
{{ shopInfo.titleText }}
</view>
</view>
</view>
<view class="book">
<view class="book-text">
<view style="padding-top: 20rpx;font-size: 14px;">资源介绍</view>
<uv-parse :content="shopInfo.content"></uv-parse>
<view style="padding-top: 20rpx;font-size: 30rpx;">资源介绍</view>
</view>
<uv-parse :content="shopInfo.content"></uv-parse>
</view>
<view class="bottom-flex">
<view class="icon">
<u-icon name="server-man" size="40rpx"></u-icon>
客服
</view>
<button open-type="contact"
class="contact">
<view class="icon">
<u-icon name="server-man" size="50rpx"></u-icon>
</view>
</button>
<view class="button">
<view class="button-right">
<view @click="createPayOrder">
立即购买 ({{ shopInfo.price * registerForm.num }})
立即购买 (<text>{{ shopInfo.price * registerForm.num }}</text>)
</view>
</view>
</view>
</view>
<PrivacyAgreementPoup/>
</view>
</template>
<script>
// wxf173d7bec0f1bbe0
import PrivacyAgreementPoup from '@/components/PrivacyAgreementPoup/PrivacyAgreementPoup'
export default {
components : {
PrivacyAgreementPoup
},
data() {
return {
registerForm: {
@ -104,6 +118,7 @@
this.registerForm.shopId = this.shopInfo.id
this.$api('createPayOrder', this.registerForm, res => {
this.registerForm.num = 1
if(res.code == 200){
uni.requestPayment({
provider: 'wxpay', //
@ -144,7 +159,7 @@
bottom: 0;
width: 100%;
display: flex;
height: 100rpx;
height: 120rpx;
padding: 10rpx 0;
background-color: #fff;
justify-content: space-between;
@ -158,6 +173,17 @@
justify-content: center;
align-items: center;
}
.contact{
background: transparent;
margin: 0;
padding: 0 20rpx;
display: flex;
justify-content: center;
align-items: center;
&::after{
border: none;
}
}
}
}
@ -173,29 +199,27 @@
top: 20rpx;
width: 100%;
height: 250rpx;
display: flex;
}
.content-img {
position: absolute;
top: 20rpx;
left: 20rpx;
width: 220rpx;
height: 160rpx;
width: 270rpx;
height: 200rpx;
border-radius: 10rpx;
margin-right: 20rpx;
margin-left: 20rpx;
}
.content-left {
position: absolute;
color: #fff;
font-size: 14px;
left: 35%;
top: 20rpx;
font-size: 28rpx;
line-height: 50rpx;
}
.cell {
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
height: 140rpx;
background-color: #fff;
@ -208,32 +232,27 @@
background-color: rgb(253, 194, 4);
height: 70rpx;
border-radius: 10rpx;
font-size: 12px;
font-size: 24rpx;
margin-top: 10rpx;
justify-content: center;
align-items: center;
}
/deep/ .book {
margin-top: 20rpx;
min-height: 600rpx;
background-color: #fff;
padding: 0 20rpx;
padding-bottom: 150rpx;
line-height: 50rpx;
font-size: 30rpx;
img {
width: 100% !important;
border-radius: 10rpx;
}
}
/deep/ .book-text {
width: 94%;
margin-left: 3%;
min-height: 700rpx;
font-size: 13px;
line-height: 40rpx;
padding-bottom: 100rpx;
img {
width: 100% !important;
}
padding-bottom: 20rpx;
}
.book-img {
@ -268,12 +287,15 @@
align-items: center;
flex: 1;
height: 100%;
// background-color: rgb(253, 194, 5);
background-color: rgb(51, 51, 51);
// border-top-right-radius: 50rpx;
// border-bottom-right-radius: 50rpx;
border-radius: 50rpx;
color: #fff;
text{
font-size: 32rpx;
}
}


+ 3
- 3
pages/login/login.vue View File

@ -4,7 +4,7 @@
<!-- <image src="/static/image/login/logo.png" mode=""></image> -->
</view>
<view class="title">
欢迎使用xx知识平台
欢迎使用家乐美统计系统
</view>
<view class="btn mt">
<view class="icon">
@ -33,10 +33,10 @@
size="30rpx"
:name="1"
></uv-checkbox>
阅读并同意我们的<text @click="openConfigDetail('privacyAgreement')">服务协议与隐私条款</text>
阅读并同意我们的<text @click="openConfigDetail('getPrivacyPolicy')">服务协议与隐私条款</text>
</view>
<view class="">
以及<text @click="openConfigDetail('userAgreement')">个人信息保护指引</text>
以及<text @click="openConfigDetail('getUserAgreement')">个人信息保护指引</text>
</view>
</view>
</uv-checkbox-group>


+ 5
- 3
pages/login/wxUserInfo.vue View File

@ -1,7 +1,7 @@
<template>
<view class="login">
<view class="title">
帧视界
家乐美统计系统
</view>
<view class="title">
申请获取你的头像昵称
@ -74,9 +74,11 @@
return
}
self.$api('infoUpdateInfo', self.userInfo, res => {
self.$api('updateInfo', self.userInfo, res => {
if (res.code == 200) {
uni.navigateBack(-1)
uni.switchTab({
url:'/pages/center/center'
})
}
})
})


BIN
static/empty/noData.png View File

Before After
Width: 300  |  Height: 300  |  Size: 17 KiB

BIN
static/login/6.png View File

Before After
Width: 80  |  Height: 80  |  Size: 1.4 KiB

+ 7
- 4
store/store.js View File

@ -19,11 +19,9 @@ const store = new Vuex.Store({
mutations: {
// 初始化配置
initConfig(state) {
let config = ['preferential', 'wx']
let config = ['getPrivacyPolicy', 'getUserAgreement']
config.forEach(k => {
api('getConfig', {
keyValue : k
}, res => {
api(k, res => {
if (res.code == 200) {
state.configList[k] = res.result
}
@ -75,6 +73,11 @@ const store = new Vuex.Store({
api('getInfo', res => {
if(res.code == 200){
state.userInfo = res.result
if (!state.userInfo.nickName || !state.userInfo.headImage) {
uni.navigateTo({
url: '/pages/login/wxUserInfo'
})
}
}
})
},


+ 2
- 0
uni_modules/uni-section/changelog.md View File

@ -0,0 +1,2 @@
## 0.0.1(2022-07-22)
- 初始化

+ 167
- 0
uni_modules/uni-section/components/uni-section/uni-section.vue View File

@ -0,0 +1,167 @@
<template>
<view class="uni-section">
<view class="uni-section-header" @click="onClick">
<view class="uni-section-header__decoration" v-if="type" :class="type" />
<slot v-else name="decoration"></slot>
<view class="uni-section-header__content">
<text :style="{'font-size':titleFontSize,'color':titleColor}" class="uni-section__content-title" :class="{'distraction':!subTitle}">{{ title }}</text>
<text v-if="subTitle" :style="{'font-size':subTitleFontSize,'color':subTitleColor}" class="uni-section-header__content-sub">{{ subTitle }}</text>
</view>
<view class="uni-section-header__slot-right">
<slot name="right"></slot>
</view>
</view>
<view class="uni-section-content" :style="{padding: _padding}">
<slot />
</view>
</view>
</template>
<script>
/**
* Section 标题栏
* @description 标题栏
* @property {String} type = [line|circle|square] 标题装饰类型
* @value line 竖线
* @value circle 圆形
* @value square 正方形
* @property {String} title 主标题
* @property {String} titleFontSize 主标题字体大小
* @property {String} titleColor 主标题字体颜色
* @property {String} subTitle 副标题
* @property {String} subTitleFontSize 副标题字体大小
* @property {String} subTitleColor 副标题字体颜色
* @property {String} padding 默认插槽 padding
*/
export default {
name: 'UniSection',
emits:['click'],
props: {
type: {
type: String,
default: ''
},
title: {
type: String,
required: true,
default: ''
},
titleFontSize: {
type: String,
default: '14px'
},
titleColor:{
type: String,
default: '#333'
},
subTitle: {
type: String,
default: ''
},
subTitleFontSize: {
type: String,
default: '12px'
},
subTitleColor: {
type: String,
default: '#999'
},
padding: {
type: [Boolean, String],
default: false
}
},
computed:{
_padding(){
if(typeof this.padding === 'string'){
return this.padding
}
return this.padding?'10px':''
}
},
watch: {
title(newVal) {
if (uni.report && newVal !== '') {
uni.report('title', newVal)
}
}
},
methods: {
onClick() {
this.$emit('click')
}
}
}
</script>
<style lang="scss" >
$uni-primary: #2979ff !default;
.uni-section {
background-color: #fff;
.uni-section-header {
position: relative;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
align-items: center;
padding: 12px 10px;
font-weight: normal;
&__decoration{
margin-right: 6px;
background-color: $uni-primary;
&.line {
width: 4px;
height: 12px;
border-radius: 10px;
}
&.circle {
width: 8px;
height: 8px;
border-top-right-radius: 50px;
border-top-left-radius: 50px;
border-bottom-left-radius: 50px;
border-bottom-right-radius: 50px;
}
&.square {
width: 8px;
height: 8px;
}
}
&__content {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: column;
flex: 1;
color: #333;
.distraction {
flex-direction: row;
align-items: center;
}
&-sub {
margin-top: 2px;
}
}
&__slot-right{
font-size: 14px;
}
}
.uni-section-content{
font-size: 14px;
}
}
</style>

+ 87
- 0
uni_modules/uni-section/package.json View File

@ -0,0 +1,87 @@
{
"id": "uni-section",
"displayName": "uni-section 标题栏",
"version": "0.0.1",
"description": "标题栏组件",
"keywords": [
"uni-ui",
"uniui",
"标题栏"
],
"repository": "https://github.com/dcloudio/uni-ui",
"engines": {
"HBuilderX": ""
},
"directories": {
"example": "../../temps/example_temps"
},
"dcloudext": {
"category": [
"前端组件",
"通用组件"
],
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
},
"uni_modules": {
"dependencies": [
"uni-scss"
],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "y"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y"
},
"快应用": {
"华为": "u",
"联盟": "u"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
}
}

+ 8
- 0
uni_modules/uni-section/readme.md View File

@ -0,0 +1,8 @@
## Section 标题栏
> **组件名:uni-section**
> 代码块: `uSection`
uni-section 组件主要用于文章、列表详情等标题展示
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-section)
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839

Loading…
Cancel
Save