Browse Source

更新兼容APP样式

master
luyisha 3 years ago
parent
commit
1f25b69116
  1. 12
      manifest.json
  2. 23
      pages.json
  3. 9
      pages/NoticeDetails/NoticeDetails.vue
  4. 8
      pages/about/about.vue
  5. 8
      pages/about/bannerManage/addBanner.vue
  6. 8
      pages/about/bannerManage/bannerManage.vue
  7. 8
      pages/about/bonusSet/bonusList.vue
  8. 9
      pages/about/bonusSet/bonusSet.vue
  9. 8
      pages/about/bonusSet/index.vue
  10. 8
      pages/about/noticeManage/addNotice.vue
  11. 8
      pages/about/noticeManage/noticeManage.vue
  12. 42
      pages/about/rechargeSet/rechargeSet.vue
  13. 8
      pages/about/serviceSet/serviceSet.vue
  14. 209
      pages/home/echarts.vue
  15. 282
      pages/home/home.vue
  16. 3
      pages/list/agent.vue
  17. 9
      pages/list/team.vue
  18. 2
      pages/list/user.vue
  19. 9
      pages/recharge/recharge.vue
  20. 9
      pages/recordsList/recordsList.vue
  21. 68
      pages/scratchCard/scratchCard.vue
  22. 27
      pages/service/service.vue
  23. 15
      pages/ucenter/ucenter.vue
  24. 45
      static/echarts.min.js
  25. BIN
      static/home/4.jpg
  26. 12
      uni_modules/uni-id-pages/init.js
  27. 24
      uni_modules/uni-id-pages/pages/login/login-withpwd.vue
  28. 5
      uni_modules/uni-id-pages/pages/register/register.vue
  29. 14
      uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd.vue
  30. 18
      uni_modules/uni-id-pages/pages/userinfo/userinfo.vue

12
manifest.json

@ -1,6 +1,6 @@
{ {
"name" : "ggjuni", "name" : "ggjuni",
"appid" : "__UNI__49E3CD6", "appid" : "__UNI__6E73513",
"description" : "云端一体应用快速开发基本项目模版", "description" : "云端一体应用快速开发基本项目模版",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : "100", "versionCode" : "100",
@ -34,13 +34,17 @@
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
] ],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
},
"ios" : {
"dSYMs" : false
}, },
"ios" : {},
"sdkConfigs" : { "sdkConfigs" : {
"push" : { "push" : {
"unipush" : null "unipush" : null
} },
"ad" : {}
} }
} }
}, },

23
pages.json

@ -65,7 +65,8 @@
"popGesture": "none" "popGesture": "none"
} }
} }
}, { },
{
"path": "pages/ucenter/settings/settings", "path": "pages/ucenter/settings/settings",
"style": { "style": {
"navigationBarTitleText": "设置" "navigationBarTitleText": "设置"
@ -156,6 +157,11 @@
{ {
"navigationBarTitleText": "专区", "navigationBarTitleText": "专区",
"enablePullDownRefresh": false "enablePullDownRefresh": false
// "app-plus": {
// "animationType": "slide-in-bottom",
// "background": "transparent",
// "popGesture": "none"
// }
} }
} }
@ -453,17 +459,18 @@
// "rpxCalcIncludeWidth":0 // "rpxCalcIncludeWidth":0
}, },
"condition": { "condition": {
"list": [{ "list": [
"path": "pages/list/detail" {
}, "path": "pages/home/home"
}
// { // {
// "path": "pages/list/list" // "path": "pages/list/list"
// }, // },
{ // {
"path": "pages/ucenter/settings/settings" // "path": "pages/ucenter/settings/settings"
} // }
], ],
"current": 1 "current": 0
}, },
"tabBar": { "tabBar": {
"color": "#999999", "color": "#999999",

9
pages/NoticeDetails/NoticeDetails.vue

@ -48,13 +48,16 @@
background-color: #fff; background-color: #fff;
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05); box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05);
width: 700rpx; width: 700rpx;
height: 88rpx;
padding: 0px 25rpx; padding: 0px 25rpx;
padding-top: var(--status-bar-height); /* #ifdef H5 */
height: 88rpx;padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef APP-PLUS */
height: 2px;
/* #endif */
box-sizing: content-box; box-sizing: content-box;
color: #b0b0b0; color: #b0b0b0;
font-size: 14px; font-size: 14px;
} }
.wrapper{ .wrapper{
text-align: center; text-align: center;

8
pages/about/about.vue

@ -80,9 +80,13 @@
background-color: #fff; background-color: #fff;
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05); box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05);
width: 700rpx; width: 700rpx;
height: 88rpx;
padding: 0px 25rpx; padding: 0px 25rpx;
padding-top: var(--status-bar-height); /* #ifdef H5 */
height: 88rpx;padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef APP-PLUS */
height: 2px;
/* #endif */
box-sizing: content-box; box-sizing: content-box;
color: #b0b0b0; color: #b0b0b0;
font-size: 14px; font-size: 14px;

8
pages/about/bannerManage/addBanner.vue

@ -110,9 +110,13 @@
background-color: #fff; background-color: #fff;
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05); box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05);
width: 700rpx; width: 700rpx;
height: 88rpx;
padding: 0px 25rpx; padding: 0px 25rpx;
padding-top: var(--status-bar-height); /* #ifdef H5 */
height: 88rpx;padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef APP-PLUS */
height: 2px;
/* #endif */
box-sizing: content-box; box-sizing: content-box;
color: #b0b0b0; color: #b0b0b0;
font-size: 14px; font-size: 14px;

8
pages/about/bannerManage/bannerManage.vue

@ -82,9 +82,13 @@
background-color: #fff; background-color: #fff;
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05); box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05);
width: 700rpx; width: 700rpx;
height: 88rpx;
padding: 0px 25rpx; padding: 0px 25rpx;
padding-top: var(--status-bar-height); /* #ifdef H5 */
height: 88rpx;padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef APP-PLUS */
height: 2px;
/* #endif */
box-sizing: content-box; box-sizing: content-box;
color: #b0b0b0; color: #b0b0b0;
font-size: 14px; font-size: 14px;

8
pages/about/bonusSet/bonusList.vue

@ -108,9 +108,13 @@
background-color: #fff; background-color: #fff;
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05); box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05);
width: 700rpx; width: 700rpx;
height: 88rpx;
padding: 0px 25rpx; padding: 0px 25rpx;
padding-top: var(--status-bar-height); /* #ifdef H5 */
height: 88rpx;padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef APP-PLUS */
height: 2px;
/* #endif */
box-sizing: content-box; box-sizing: content-box;
color: #b0b0b0; color: #b0b0b0;
font-size: 14px; font-size: 14px;

9
pages/about/bonusSet/bonusSet.vue

@ -104,6 +104,7 @@
}) })
this.showEdit = false; this.showEdit = false;
this.editInfo = {}; this.editInfo = {};
this.getList();
}) })
}, },
getList(){ getList(){
@ -135,9 +136,13 @@
background-color: #fff; background-color: #fff;
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05); box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05);
width: 700rpx; width: 700rpx;
height: 88rpx;
padding: 0px 25rpx; padding: 0px 25rpx;
padding-top: var(--status-bar-height); /* #ifdef H5 */
height: 88rpx;padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef APP-PLUS */
height: 2px;
/* #endif */
box-sizing: content-box; box-sizing: content-box;
color: #b0b0b0; color: #b0b0b0;
font-size: 14px; font-size: 14px;

8
pages/about/bonusSet/index.vue

@ -86,9 +86,13 @@
background-color: #fff; background-color: #fff;
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05); box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05);
width: 700rpx; width: 700rpx;
height: 88rpx;
padding: 0px 25rpx; padding: 0px 25rpx;
padding-top: var(--status-bar-height); /* #ifdef H5 */
height: 88rpx;padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef APP-PLUS */
height: 2px;
/* #endif */
box-sizing: content-box; box-sizing: content-box;
color: #b0b0b0; color: #b0b0b0;
font-size: 14px; font-size: 14px;

8
pages/about/noticeManage/addNotice.vue

@ -78,9 +78,13 @@
background-color: #fff; background-color: #fff;
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05); box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05);
width: 700rpx; width: 700rpx;
height: 88rpx;
padding: 0px 25rpx; padding: 0px 25rpx;
padding-top: var(--status-bar-height); /* #ifdef H5 */
height: 88rpx;padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef APP-PLUS */
height: 2px;
/* #endif */
box-sizing: content-box; box-sizing: content-box;
color: #b0b0b0; color: #b0b0b0;
font-size: 14px; font-size: 14px;

8
pages/about/noticeManage/noticeManage.vue

@ -92,9 +92,13 @@
background-color: #fff; background-color: #fff;
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05); box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05);
width: 700rpx; width: 700rpx;
height: 88rpx;
padding: 0px 25rpx; padding: 0px 25rpx;
padding-top: var(--status-bar-height); /* #ifdef H5 */
height: 88rpx;padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef APP-PLUS */
height: 2px;
/* #endif */
box-sizing: content-box; box-sizing: content-box;
color: #b0b0b0; color: #b0b0b0;
font-size: 14px; font-size: 14px;

42
pages/about/rechargeSet/rechargeSet.vue

@ -2,29 +2,43 @@
<view> <view>
<view class="nav_area"></view> <view class="nav_area"></view>
<view class="setPage"> <view class="setPage">
<view class="switch_item"> <view class="switch_item" v-for="(item, index) in dataList" :key="index">
<view class="icon_new"><image src="../../../static/user/ze-gold-coin-o@2x.png" mode=""></image></view> <view class="icon_new"><image src="../../../static/user/ze-gold-coin-o@2x.png" mode=""></image></view>
<view style="flex:1;">用户端充值按钮</view> <view style="flex:1;">{{item.title}}</view>
<switch checked="true" @change="" color="#00E266" /> <switch :checked="item.is_open===1" @change="changeStatus($event, item.type)" color="#00E266" />
</view>
<view class="switch_item">
<view class="icon_new"><image src="../../../static/user/ze-gold-coin-o@2x.png" mode=""></image></view>
<view style="flex:1;">代理端充值按钮</view>
<switch checked="true" @change="" color="#00E266" />
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import API from '@/common/js/api.js'
export default { export default {
data() { data() {
return { return {
dataList: []
} }
}, },
onLoad() {
this.getStatus();
},
methods: { methods: {
getStatus(){
API.request('/setting/rechargeSetInfo', {}, res=>{
this.dataList = res.data;
})
},
changeStatus(e, type){
// console.log(e.detail.value);
API.request('/setting/openRecharge', {
is_open: e.detail.value?1:0,
type: type
}, res=>{
uni.showToast({
title: res.msg
})
})
}
} }
} }
</script> </script>
@ -38,9 +52,13 @@
background-color: #fff; background-color: #fff;
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05); box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05);
width: 700rpx; width: 700rpx;
height: 88rpx;
padding: 0px 25rpx; padding: 0px 25rpx;
padding-top: var(--status-bar-height); /* #ifdef H5 */
height: 88rpx;padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef APP-PLUS */
height: 2px;
/* #endif */
box-sizing: content-box; box-sizing: content-box;
color: #b0b0b0; color: #b0b0b0;
font-size: 14px; font-size: 14px;

8
pages/about/serviceSet/serviceSet.vue

@ -149,9 +149,13 @@
background-color: #fff; background-color: #fff;
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05); box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05);
width: 700rpx; width: 700rpx;
height: 88rpx;
padding: 0px 25rpx; padding: 0px 25rpx;
padding-top: var(--status-bar-height); /* #ifdef H5 */
height: 88rpx;padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef APP-PLUS */
height: 2px;
/* #endif */
box-sizing: content-box; box-sizing: content-box;
color: #b0b0b0; color: #b0b0b0;
font-size: 14px; font-size: 14px;

209
pages/home/echarts.vue

@ -0,0 +1,209 @@
<template>
<view id="mychart" style="width: 670rpx;height: 250px;" @click="echarts.onClick" :prop="optionData"
:change:prop="echarts.updateEcharts">
</view>
</template>
<script>
export default {
props: {
option: {
type: Object,
require: true
}
}
}
</script>
<script module="echarts" lang="renderjs">
export default {
data() {
return {
chart: null
}
},
mounted() {
if (typeof window.echarts === 'object') {
this.init()
} else {
//
const script = document.createElement('script')
script.src = '../../static/echarts.min.js'
// script.src = './static/echarts/echarts.min.js'
script.onload = this.init
document.head.appendChild(script)
}
},
methods: {
/**
* 初始化echarts
*/
init() {
this.chart = echarts.init(this.$el)
this.update(this.option)
},
/**
* 监测数据更新
* @param {Object} option
*/
update(option) {
if (this.chart) {
// Apprenderjs
if (option) {
// tooltip
if (option.tooltip) {
// tooltip
if (option.tooltip.positionStatus) {
option.tooltip.position = this.tooltipPosition()
}
// tooltip
if (option.tooltip.formatterStatus) {
option.tooltip.formatter = this.tooltipFormatter(option.tooltip.formatterUnit, option
.tooltip.formatFloat2, option.tooltip.formatThousands)
}
}
// if (option.xAxis[0].data.length >= 5) {
// option.xAxis[0].axisLabel.formatter = function formatter(params) {
// if (params > 5) {
// return params;
// }
// var maxLength = 4;
// //使...
// if (params && params.length > maxLength) {
// return params.substring(0, maxLength - 1) + '...';
// } else {
// return params;
// }
// }
// } else if(option.xAxis[0].data.length === 1){
// option.xAxis[0].axisLabel.formatter = function formatter(params) {
// return params
// }
// } else {
// option.xAxis[0].axisLabel.formatter = function formatter(params) {
// if (params > 5) {
// return params;
// }
// var maxLength = 6;
// //使...
// if (params && params.length > maxLength) {
// return params.substring(0, maxLength - 1) + '...';
// } else {
// return params;
// }
// }
// }
// option
this.chart.setOption(option, option.notMerge)
}
}
},
/**
* 设置tooltip的位置防止超出画布
*/
tooltipPosition() {
return (point, params, dom, rect, size) => {
//pointsizeviewSizecontentSizedivtooltip
let x = point[0]
let y = point[1]
let viewWidth = size.viewSize[0]
let viewHeight = size.viewSize[1]
let boxWidth = size.contentSize[0]
let boxHeight = size.contentSize[1]
let posX = 0 //x
let posY = 0 //y
if (x < boxWidth) { //
posX = 5
} else { //
posX = x - boxWidth
}
if (y < boxHeight) { //
posY = 5
} else { //
posY = y - boxHeight
}
return [posX, posY]
}
},
/**
* tooltip格式化
* @param {Object} unit 数值后的单位
* @param {Object} formatFloat2 是否保留两位小数
* @param {Object} formatThousands 是否添加千分位
*/
tooltipFormatter(unit, formatFloat2, formatThousands) {
return params => {
let result = ''
unit = unit ? unit : ''
for (let i in params) {
if (i == 0) {
result += params[i].axisValueLabel
}
let value = '--'
if (params[i].data !== null) {
value = params[i].data
//
if (formatFloat2) {
value = this.formatFloat2(value)
}
//
if (formatThousands) {
value = this.formatThousands(value)
}
}
// #ifdef H5
result += '\n' + params[i].seriesName + ':' + value + ' ' + unit
// #endif
// #ifdef APP-PLUS
result += '<br/>' + params[i].marker + params[i].seriesName + ':' + value + ' ' + unit
// #endif
}
return result
}
},
/**
* 保留两位小数
* @param {Object} value
*/
formatFloat2(value) {
let temp = Math.round(parseFloat(value) * 100) / 100
let xsd = temp.toString().split('.')
if (xsd.length === 1) {
temp = (isNaN(temp) ? '0' : temp.toString()) + '.00'
return temp
}
if (xsd.length > 1) {
if (xsd[1].length < 2) {
temp = temp.toString() + '0'
}
return temp
}
},
/**
* 添加千分位
* @param {Object} value
*/
formatThousands(value) {
if (value === undefined || value === null) {
value = ''
}
if (!isNaN(value)) {
value = value + ''
}
let re = /\d{1,3}(?=(\d{3})+$)/g
let n1 = value.replace(/^(\d+)((\.\d+)?)$/, function(s, s1, s2) {
return s1.replace(re, '$&,') + s2
})
return n1
}
}
}
</script>
<style lang="scss" scoped>
.echarts {
width: 100%;
height: 100%;
}
</style>

282
pages/home/home.vue

@ -58,7 +58,12 @@
用户统计 用户统计
</view> </view>
<view class="pie_area"> <view class="pie_area">
<!-- #ifdef H5 -->
<view class="pie_box" id="piechart"></view> <view class="pie_box" id="piechart"></view>
<!-- #endif -->
<!-- #ifdef APP-PLUS -->
<view class="pie_box" ref="piechart"></view>
<!-- #endif -->
<view class="sum"> <view class="sum">
{{userStatistics.sum.num}} {{userStatistics.sum.num}}
</view> </view>
@ -93,24 +98,35 @@
<view class="" style="color: #999;font-size: 14px;"> <view class="" style="color: #999;font-size: 14px;">
{{ chartIndex==1?'上分总数':'下分总数' }}<text style="color: #101010;">{{ UpDownSta.sum_value }}</text> {{ chartIndex==1?'上分总数':'下分总数' }}<text style="color: #101010;">{{ UpDownSta.sum_value }}</text>
</view> </view>
<!-- #ifdef H5 -->
<view class="" id="mychart" style="width: 670rpx;height: 250px;"></view> <view class="" id="mychart" style="width: 670rpx;height: 250px;"></view>
<!-- #endif -->
<!-- #ifdef APP-PLUS -->
<view class="" ref="mychart" style="width: 670rpx;height: 250px;">
<echarts1 :option="optionData" id="myChart1" style="height: 110vw;margin-left: 2vw;width: 100%;padding: 4vw 0 0 0;"></echarts1>
</view>
<!-- #endif -->
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import * as echarts from 'echarts';
import API from '@/common/js/api.js' import API from '@/common/js/api.js'
import updateTabBar from '@/common/js/updateTabBar.js' import updateTabBar from '@/common/js/updateTabBar.js'
export default { // #ifdef H5
data() { import * as echarts from 'echarts';//npm
// #endif
import echarts1 from './echarts.vue';
export default {
data(){
return { return {
userType: 'background',//user|agent|background userType: 'background',//user|agent|background
bannerList: [], bannerList: [],
goodsList: [], goodsList: [],
recordsList: [1,2,3,4,5,6], recordsList: [1,2,3,4,5,6],
chartIndex: 1,//12 chartIndex: 1,//12
myChart: null, myChart: null,
@ -151,68 +167,101 @@
}, },
notice: { notice: {
title: '' title: ''
} },
} // 1#ifdef APP-PLUS
optionData: {
color: ['#5087EC','#74C0C8'],
grid: {
top: '12%',
bottom: '5%',
left: '2%',
right: '4%',
containLabel: true//
},
tooltip: {
trigger: 'axis',
triggerOn: 'mousemove|click'
},
xAxis: {
data: this.UpDownSta&&this.UpDownSta.xData || ['1月', '2月', '3月', '4月', '5月'],
axisLine: {
lineStyle: {
color: "#aaa",
width: 2
}
},
axisTick: {
lineStyle: {
color: "#aaa",
width: 2
}
},
axisLabel: {
color: '#444'
},
},
yAxis: {
type: 'value',
min: 0,
max: this.interval*5,
interval: this.interval,
axisLine: {
show: false,
lineStyle: {
color: "#ddd"
}
},
axisLabel: {
color: '#444'
},
splitLine: {
lineStyle: {
color: "#ddd"
}
}
},
series: [
{
name: '',
type: 'bar',
barMaxWidth: 30,
data: this.UpDownSta&&this.UpDownSta.data || [155, 250, 360, 100, 180, 204]
}
]
},
// 1#endif
}
}, },
components: {
echarts1
},
computed: { computed: {
isLogin(){ isLogin(){
return uni.getStorageSync('user_token'); return uni.getStorageSync('user_token');
},
interval(){
let yMax = ([...this.UpDownSta.data].sort())[this.UpDownSta.data.length-1];
if(!yMax){
yMax = 200;
}
let interval = yMax / 5;
if((interval+'-').indexOf('.')!=-1){
interval = Math.ceil(interval);
}
return interval;
} }
}, },
onShow() { methods: {
setTimeout(()=>{ changeAudio(){
if(this.userType=='user'){ if(this.userType!=='user') return;
updateTabBar.changeUser(); if(this.isPlay){
this.getZoneList(); this.isPlay = false;
this.getRotationChart(); this.innerAudioContext.pause();
this.getAwardRecords(); }else{
this.getNotice(); this.isPlay = true;
}else if(this.userType=='background'){ this.innerAudioContext.play();
this.chartIndex = 1;
updateTabBar.changebackground();
this.getNeedSta();
this.getUserSta();
this.getUpDownSta();
this.pieChart = echarts.init(document.getElementById('piechart'));
this.myChart = echarts.init(document.getElementById('mychart'));
setTimeout(()=>{
this.renderPie();
this.renderChart();
}, 200)
} }
}, 500) },
},
onHide() {
if(this.userType=='user' && this.isPlay){
// this.isPlay = false;
// this.innerAudioContext.pause();
}
},
created() {
this.userType = uni.getStorageSync('userType');
},
mounted() {
if(this.userType=='user'){
this.innerAudioContext = uni.createInnerAudioContext();
this.innerAudioContext.autoplay = false;
this.innerAudioContext.loop = true;
this.innerAudioContext.src = '../../static/audio/bgm.mp3';
this.innerAudioContext.onPlay(() => {
console.log('开始播放');
});
this.innerAudioContext.onPause(() => {
console.log('暂停播放');
});
this.innerAudioContext.onError((res) => {
console.log(res.errMsg);
console.log(res.errCode);
});
}
},
methods: {
toUrl(item){ toUrl(item){
if(item=='login'){ if(item=='login'){
uni.navigateTo({ uni.navigateTo({
@ -240,15 +289,6 @@
}, 200) }, 200)
}, },
renderChart(){ renderChart(){
let yMax = ([...this.UpDownSta.data].sort())[this.UpDownSta.data.length-1];
if(!yMax){
yMax = 200;
}
let interval = yMax / 5;
if((interval+'-').indexOf('.')!=-1){
interval = Math.ceil(interval);
}
yMax = interval*5;
let option = { let option = {
color: ['#5087EC','#74C0C8'], color: ['#5087EC','#74C0C8'],
grid: { grid: {
@ -283,8 +323,8 @@
yAxis: { yAxis: {
type: 'value', type: 'value',
min: 0, min: 0,
max: yMax, max: this.interval*5,
interval: interval, interval: this.interval,
axisLine: { axisLine: {
show: false, show: false,
lineStyle: { lineStyle: {
@ -311,9 +351,6 @@
}; };
this.myChart.setOption(option); this.myChart.setOption(option);
this.myChart.dispatchAction({
type: 'showTip'
});
}, },
renderPie(){ renderPie(){
let option = { let option = {
@ -353,16 +390,7 @@
this.pieChart.setOption(option); this.pieChart.setOption(option);
}, },
changeAudio(){
if(this.userType!=='user') return;
if(this.isPlay){
this.isPlay = false;
this.innerAudioContext.pause();
}else{
this.isPlay = true;
this.innerAudioContext.play();
}
},
/*轮播图*/ /*轮播图*/
getRotationChart(){ getRotationChart(){
@ -377,7 +405,7 @@
API.getZoneList({}, res=>{ API.getZoneList({}, res=>{
this.goodsList = res.data; this.goodsList = res.data;
}) })
}, },
/*记录*/ /*记录*/
getAwardRecords(page=1, limit=20){ getAwardRecords(page=1, limit=20){
API.getAwardRecords({ API.getAwardRecords({
@ -404,7 +432,7 @@
/*总后台上下分统计数据*/ /*总后台上下分统计数据*/
getUpDownSta(type=1){ getUpDownSta(type=1){
API.request('/adminStatistics/upAndDownStatistics', {type: type}, res=>{ API.request('/adminStatistics/upAndDownStatistics', {type: type}, res=>{
this.UpDownSta = res.data; this.UpDownSta = {...res.data, xData: [], data: []};
this.UpDownSta.xData = this.UpDownSta.histogram.map(item=>{ this.UpDownSta.xData = this.UpDownSta.histogram.map(item=>{
return +item.date+'月'; return +item.date+'月';
}) })
@ -419,21 +447,86 @@
this.notice = res.data; this.notice = res.data;
}, fail=>{}, false) }, fail=>{}, false)
}, },
},
mounted() {
if(this.userType=='user'){
this.innerAudioContext = uni.createInnerAudioContext();
this.innerAudioContext.autoplay = false;
this.innerAudioContext.loop = true;
this.innerAudioContext.src = '../../static/audio/bgm.mp3';
this.innerAudioContext.onPlay(() => {
console.log('开始播放');
});
this.innerAudioContext.onPause(() => {
console.log('暂停播放');
});
this.innerAudioContext.onError((res) => {
console.log(res.errMsg);
console.log(res.errCode);
});
}
// this.userType='background';
if(this.userType=='background'){
console.log(this.$refs, 'this.$refs----');
console.log(this.$refs.piechart, 'this.$refs.piechart----');
}
},
onShow() {
setTimeout(()=>{
// debugger;
if(this.userType=='user'){
updateTabBar.changeUser();
this.getZoneList();
this.getRotationChart();
this.getAwardRecords();
this.getNotice();
}else if(this.userType=='background'){
this.chartIndex = 1;
updateTabBar.changebackground();
this.getNeedSta();
this.getUserSta();
this.getUpDownSta();
// #ifdef H5
this.pieChart = echarts.init(document.getElementById('piechart'));
this.myChart = echarts.init(document.getElementById('mychart'));
// #endif
// #ifdef APP-PLUS
// this.pieChart = echarts.init(this.$refs.piechart);
// this.myChart = echarts.init(this.$refs.mychart);
// #endif
setTimeout(()=>{
this.renderPie();
this.renderChart();
}, 200)
}
}, 500)
},
onHide() {
},
created() {
this.userType = uni.getStorageSync('userType');
}, },
onReachBottom() { onReachBottom() {
console.log(111);
if(this.userType=='user' && !this.nomore){ if(this.userType=='user' && !this.nomore){
this.page++; this.page++;
this.getAwardRecords(this.page, 10); this.getAwardRecords(this.page, 10);
} }
}, },
onUnload(){ onUnload(){
this.innerAudioContext.pause(); if(this.userType=='user' && this.isPlay){
} this.isPlay = false;
} this.innerAudioContext.pause();
</script> }
}
}
</script>
<style lang="scss" scoped> <style lang="scss" scoped>
.dis-flex{ .dis-flex{
display: flex; display: flex;
@ -446,6 +539,9 @@
.homePage{ .homePage{
padding: 90rpx 12.5px 50px; padding: 90rpx 12.5px 50px;
/* #ifdef APP-PLUS */
padding-top: calc(90rpx + var(--status-bar-height));
/* #endif */
} }
.nav_area { .nav_area {
position: fixed; position: fixed;

3
pages/list/agent.vue

@ -1,5 +1,5 @@
<template> <template>
<view class="" style="padding-top: 88rpx;"> <view class="" style="padding-top: calc(var(--status-bar-height) + 88rpx);">
<view class="nav_area dis-flex-between-center"> <view class="nav_area dis-flex-between-center">
<view style="flex: 0.3;"></view> <view style="flex: 0.3;"></view>
<view class="" style="font-size: 18px;color: #101010;">代理</view> <view class="" style="font-size: 18px;color: #101010;">代理</view>
@ -286,7 +286,6 @@
box-sizing: content-box; box-sizing: content-box;
color: #b0b0b0; color: #b0b0b0;
font-size: 14px; font-size: 14px;
} }
.search_area{ .search_area{
.search_box{ .search_box{

9
pages/list/team.vue

@ -162,13 +162,16 @@
background-color: #fff; background-color: #fff;
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05); box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05);
width: 700rpx; width: 700rpx;
height: 88rpx;
padding: 0px 25rpx; padding: 0px 25rpx;
padding-top: var(--status-bar-height); /* #ifdef H5 */
height: 88rpx;padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef APP-PLUS */
height: 2px;
/* #endif */
box-sizing: content-box; box-sizing: content-box;
color: #b0b0b0; color: #b0b0b0;
font-size: 14px; font-size: 14px;
} }
.search_area{ .search_area{

2
pages/list/user.vue

@ -1,5 +1,5 @@
<template> <template>
<view class="" style="padding-top: 88rpx;"> <view class="" style="padding-top: calc(var(--status-bar-height) + 88rpx);">
<view class="nav_area dis-flex-between-center"> <view class="nav_area dis-flex-between-center">
<view style="flex: 0.3;"></view> <view style="flex: 0.3;"></view>
<view class="" style="font-size: 18px;color: #101010;">用户</view> <view class="" style="font-size: 18px;color: #101010;">用户</view>

9
pages/recharge/recharge.vue

@ -56,13 +56,16 @@
background-color: #fff; background-color: #fff;
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05); box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05);
width: 700rpx; width: 700rpx;
height: 88rpx;
padding: 0px 25rpx; padding: 0px 25rpx;
padding-top: var(--status-bar-height); /* #ifdef H5 */
height: 88rpx;padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef APP-PLUS */
height: 2px;
/* #endif */
box-sizing: content-box; box-sizing: content-box;
color: #b0b0b0; color: #b0b0b0;
font-size: 14px; font-size: 14px;
} }
.rechargePage{ .rechargePage{
padding: 20rpx 40rpx; padding: 20rpx 40rpx;

9
pages/recordsList/recordsList.vue

@ -306,13 +306,16 @@
background-color: #fff; background-color: #fff;
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05); box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05);
width: 700rpx; width: 700rpx;
height: 88rpx;
padding: 0px 25rpx; padding: 0px 25rpx;
padding-top: var(--status-bar-height); /* #ifdef H5 */
height: 88rpx;padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef APP-PLUS */
height: 2px;
/* #endif */
box-sizing: content-box; box-sizing: content-box;
color: #b0b0b0; color: #b0b0b0;
font-size: 14px; font-size: 14px;
} }
.record-item{ .record-item{
padding: 20rpx 40rpx 0px; padding: 20rpx 40rpx 0px;

68
pages/scratchCard/scratchCard.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="prizePage" :style="{'background-image':`url('${ticketInfo.bg_image}')`}"> <view class="prizePage" :style="{'background-image':`url('${ticketInfo.bg_image}')`}">
<view class="ticketInfoPrice">面值{{ticketInfo.price}}</view> <!-- <view class="ticketInfoPrice">面值{{ticketInfo.price}}</view> -->
<view class="ticketInfoPrice2">面值{{ticketInfo.price}}</view> <!-- <view class="ticketInfoPrice2">面值{{ticketInfo.price}}</view> -->
<view class="scratch"> <view class="scratch">
<view class="box"> <view class="box">
<!-- 刮奖结果图片 --> <!-- 刮奖结果图片 -->
@ -31,23 +31,23 @@
</cover-view> </cover-view>
</cover-view> </cover-view>
</view> </view>
<view class="mask" v-if="isWin || isThank"> <cover-view class="mask" v-if="isWin || isThank">
</view> </cover-view>
<view class="winPrize" v-if="isWin"> <cover-view class="winPrize" v-if="isWin">
{{awards_amount}} {{awards_amount}}
<view style="width: 300rpx;height: 90rpx;position: absolute;left: 225rpx;top: 680rpx;z-index: 4;" @click="again"></view> <cover-view style="width: 300rpx;height: 90rpx;position: absolute;left: 225rpx;top: 680rpx;z-index: 4;" @click="again"></cover-view>
<view class="close" @click="isWin = false"></view> <cover-view class="close" @click="close(1)"></cover-view>
</view> </cover-view>
<view class="noPrize" v-if="isThank"> <cover-view class="noPrize" v-if="isThank">
<view class="thank">谢谢惠顾</view> <cover-view class="thank">谢谢惠顾</cover-view>
<view class="thank2">再接再厉</view> <cover-view class="thank2">再接再厉</cover-view>
<view class="again" @click="again">再刮一次</view> <cover-view class="again" @click="again">再刮一次</cover-view>
<view class="close" @click="isThank = false"></view> <cover-view class="close" @click="close(2)"></cover-view>
</view> </cover-view>
</view> </view>
<view class="ticketInfoCon">{{ticketInfo.content}}</view> <!-- <view class="ticketInfoCon">{{ticketInfo.content}}</view> -->
<view class="ticketInfoCon2">{{ticketInfo.content}}</view> <!-- <view class="ticketInfoCon2">{{ticketInfo.content}}</view> -->
</view> </view>
</template> </template>
@ -55,13 +55,14 @@
<script> <script>
import API from '@/common/js/api.js' import API from '@/common/js/api.js'
import Scratch from './scratch.js' import Scratch from './scratch.js'
// import VConsole from './renderjs.js'
export default { export default {
data () { data () {
return { return {
id: '', id: '',
ticketInfo: { ticketInfo: {
// bgImg: '../../static/home/prize-bg.png', bg_image: '../../static/home/4.jpg',
bgImg: '', // bg_image: '',
price: '20', price: '20',
content: `刮开覆盖膜,如果出现背书标志“1倍”、“2倍”、“5倍”、“10倍”、“20倍”、 content: `刮开覆盖膜,如果出现背书标志“1倍”、“2倍”、“5倍”、“10倍”、“20倍”、
50100既中得该标志下方所示的金额乘以该倍数 50100既中得该标志下方所示的金额乘以该倍数
@ -91,7 +92,7 @@ export default {
showResult: false, // showResult: false, //
isWin: false, // isWin: false, //
scratchWidth: 330, // scratchWidth: 330, //
scratchHeight: 280, // scratchHeight: 250, //
scratchSize: 10, // scratchSize: 10, //
scratchScale: 0.6, // scratchScale: 0.6, //
prize_img: '', // prize_img: '', //
@ -189,6 +190,14 @@ export default {
this.isShow = false; this.isShow = false;
this.guaCanvas.show = false; this.guaCanvas.show = false;
this.initInfo(); this.initInfo();
},
close(type){
if(type===1){
this.isWin = false;
}
if(type===2){
this.isThank = false;
}
} }
}, },
} }
@ -197,10 +206,10 @@ export default {
<style lang="scss"> <style lang="scss">
.prizePage{ .prizePage{
width: 750rpx; width: 750rpx;
min-height: 100vh; min-height: calc(100vh - 88rpx - var(--status-bar-height));
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: contain; background-size: contain;
background-color: #8c8c8c; background-color: #fff;
.ticketInfoPrice{ .ticketInfoPrice{
position: fixed;top: 60px;right: 20px;z-index: 3; position: fixed;top: 60px;right: 20px;z-index: 3;
@ -231,10 +240,10 @@ export default {
} }
.scratch { .scratch {
position: relative; position: relative;
padding-top: 380px; padding-top: 600rpx;
// padding-top: 280px; // padding-top: 280px;
width: 330px; width: 660rpx;
height: 280px; height: 500rpx;
margin: 0px auto; margin: 0px auto;
.box { .box {
width: 100%; width: 100%;
@ -382,14 +391,15 @@ export default {
position: fixed; position: fixed;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
z-index: 4; z-index: 5;
} }
} }
.noPrize{ .noPrize{
width: 550rpx; width: 550rpx;
height: 370rpx; height: 550rpx;
background-image: url("../../static/home/noPrize.png"); background-image: url("../../static/home/noPrize.png");
background-size: contain; background-size: contain;
background-repeat: no-repeat;
position: fixed; position: fixed;
top: 50%; top: 50%;
left: 50%; left: 50%;
@ -398,18 +408,21 @@ export default {
animation: showPrize 1s ease-in-out; animation: showPrize 1s ease-in-out;
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
// background-color: rgba(0,0,0,0.5);
.thank{ .thank{
width: 100%; width: 100%;
color: #fff; color: #fff;
position: absolute; position: absolute;
top: 20rpx; top: 20rpx;
z-index: 4;
} }
.thank2{ .thank2{
line-height: 150px; line-height: 150px;
color: #DB4542; color: #DB4542;
font-weight: bold; font-weight: bold;
font-size: 30px; font-size: 30px;
z-index: 4;
} }
.again{ .again{
width: 240rpx; width: 240rpx;
@ -421,6 +434,7 @@ export default {
top: 256rpx; top: 256rpx;
color: #F05859; color: #F05859;
background-color: #FFE1AE; background-color: #FFE1AE;
z-index: 5;
} }
.close{ .close{
width: 50px; width: 50px;
@ -431,7 +445,7 @@ export default {
left: 50%; left: 50%;
top: 230px; top: 230px;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
z-index: 4; z-index: 5;
} }
} }
@keyframes showPrize { @keyframes showPrize {

27
pages/service/service.vue

@ -51,27 +51,13 @@
} }
API.request(url, {}, res=>{ API.request(url, {}, res=>{
let list = res.data.list; let list = res.data.list;
if(this.page===1){ list.length>0 ? this.noMore=false : false;
list.length>0 ? this.noMore=false : false; this.serviceList = list;
this.serviceList = list;
}else{
if(res.data.list.length==0){
uni.showToast({
title: '没有更多了',
icon: 'none'
})
this.noMore = true;
}
this.serviceList = this.serviceList.concat(list)
}
}) })
}, },
}, },
onReachBottom() { onReachBottom() {
if(this.noMore) return;
this.page++;
this.getList();
} }
} }
</script> </script>
@ -85,13 +71,16 @@
background-color: #fff; background-color: #fff;
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05); box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05);
width: 700rpx; width: 700rpx;
height: 88rpx;
padding: 0px 25rpx; padding: 0px 25rpx;
padding-top: var(--status-bar-height); /* #ifdef H5 */
height: 88rpx;padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef APP-PLUS */
height: 2px;
/* #endif */
box-sizing: content-box; box-sizing: content-box;
color: #b0b0b0; color: #b0b0b0;
font-size: 14px; font-size: 14px;
} }
.record-item{ .record-item{
padding: 80rpx 88rpx 0px; padding: 80rpx 88rpx 0px;

15
pages/ucenter/ucenter.vue

@ -316,13 +316,13 @@
}, },
onLoad() { onLoad() {
//#ifdef APP-PLUS //#ifdef APP-PLUS
this.ucenterList[this.ucenterList.length - 2].unshift({ // this.ucenterList[this.ucenterList.length - 2].unshift({
title:this.$t('mine.checkUpdate'),// this.this.$t('mine.checkUpdate')"" // title:this.$t('mine.checkUpdate'),// this.this.$t('mine.checkUpdate')""
rightText: this.appVersion.version + '-' + this.appVersion.versionCode, // rightText: this.appVersion.version + '-' + this.appVersion.versionCode,
event: 'checkVersion', // event: 'checkVersion',
icon: 'loop', // icon: 'loop',
showBadge: this.appVersion.hasNew // showBadge: this.appVersion.hasNew
}) // })
//#endif //#endif
@ -623,6 +623,7 @@
flex-direction: column; flex-direction: column;
background-color: #fff; background-color: #fff;
padding: 90rpx 0px 0px; padding: 90rpx 0px 0px;
padding-top: calc(var(--status-bar-height) + 90rpx);
min-height: calc(100vh - 50px); min-height: calc(100vh - 50px);
} }

45
static/echarts.min.js

File diff suppressed because one or more lines are too long

BIN
static/home/4.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 KiB

12
uni_modules/uni-id-pages/init.js

@ -47,12 +47,12 @@ export default async function () {
// #ifdef APP-PLUS // #ifdef APP-PLUS
// 如果uni-id-pages配置的登录功能有一键登录,有则执行预登录(异步) // 如果uni-id-pages配置的登录功能有一键登录,有则执行预登录(异步)
if (loginTypes.includes('univerify')) { if (loginTypes.includes('univerify')) {
uni.preLogin({ // uni.preLogin({
provider: 'univerify', // provider: 'univerify',
complete: e => { // complete: e => {
// console.log(e); // // console.log(e);
} // }
}) // })
} }
// #endif // #endif

24
uni_modules/uni-id-pages/pages/login/login-withpwd.vue

@ -79,6 +79,25 @@
if(e.phone){ if(e.phone){
this.username = e.phone; this.username = e.phone;
} }
//
// token
if(uni.getStorageSync('user_token')){
let newUrl = '';
switch (uni.getStorageSync('userType')){
case 'user':
newUrl = '/pages/home/home';
break;
case 'agent':
newUrl = '/pages/list/team';
break;
case 'background':
newUrl = '/pages/home/home';
break;
}
uni.switchTab({
url:newUrl
})
}
}, },
onShow() { onShow() {
// #ifdef H5 // #ifdef H5
@ -249,7 +268,12 @@
.nav_area{ .nav_area{
background-color: #fff; background-color: #fff;
width: 750rpx; width: 750rpx;
/* #ifdef H5 */
height: 88rpx; height: 88rpx;
/* #endif */
/* #ifdef APP-PLUS */
height: 108rpx;
/* #endif */
padding-top: var(--status-bar-height); padding-top: var(--status-bar-height);
} }
.logo_area{ .logo_area{

5
uni_modules/uni-id-pages/pages/register/register.vue

@ -227,7 +227,12 @@
.nav_area{ .nav_area{
background-color: #fff; background-color: #fff;
width: 750rpx; width: 750rpx;
/* #ifdef H5 */
height: 88rpx; height: 88rpx;
/* #endif */
/* #ifdef APP-PLUS */
height: 108rpx;
/* #endif */
padding-top: var(--status-bar-height); padding-top: var(--status-bar-height);
} }
.logo_area{ .logo_area{

14
uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd.vue

@ -10,7 +10,7 @@
<text class="title title-box">修改密码</text> <text class="title title-box">修改密码</text>
</match-media> </match-media>
<uni-forms ref="form" :value="formData" err-show-type="toast"> <uni-forms ref="form" :value="formData" err-show-type="toast">
<uni-forms-item name="oldPassword"> <uni-forms-item name="oldPassword" v-if="0">
<uni-easyinput :focus="focusOldPassword" @blur="focusOldPassword = false" class="input-box" <uni-easyinput :focus="focusOldPassword" @blur="focusOldPassword = false" class="input-box"
type="password" :inputBorder="false" v-model="formData.oldPassword" placeholder="原密码"> type="password" :inputBorder="false" v-model="formData.oldPassword" placeholder="原密码">
</uni-easyinput> </uni-easyinput>
@ -148,19 +148,23 @@
} }
} }
.nav_area { .nav_area {
width: 100vw;
position: fixed; position: fixed;
top: 0px; top: 0px;
left: 0px; left: 0px;
z-index: 99; z-index: 99;
background-color: #fff; background-color: #fff;
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05); box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.05);
height: 88rpx; width: 700rpx;
padding: 0px 25rpx; padding: 0px 25rpx;
padding-top: var(--status-bar-height); /* #ifdef H5 */
height: 88rpx;padding-top: var(--status-bar-height);
/* #endif */
/* #ifdef APP-PLUS */
height: 2px;
/* #endif */
box-sizing: content-box;
color: #b0b0b0; color: #b0b0b0;
font-size: 14px; font-size: 14px;
} }
.uni-content /deep/ .uni-easyinput__content{ .uni-content /deep/ .uni-easyinput__content{
background-color: #fff !important; background-color: #fff !important;

18
uni_modules/uni-id-pages/pages/userinfo/userinfo.vue

@ -111,15 +111,15 @@ const uniIdCo = uniCloud.importObject("uni-id-co")
}, },
bindMobile() { bindMobile() {
// #ifdef APP-PLUS // #ifdef APP-PLUS
uni.preLogin({ // uni.preLogin({
provider: 'univerify', // provider: 'univerify',
success: this.univerify(), // // success: this.univerify(), //
fail: (res) => { // // fail: (res) => { //
// // //
console.log(res) // console.log(res)
this.bindMobileBySmsCode() // this.bindMobileBySmsCode()
} // }
}) // })
// #endif // #endif
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN

Loading…
Cancel
Save