This commit is contained in:
itgaojian163 2025-04-18 18:04:07 +08:00
parent 3e645eeeda
commit 2f262acff4
30 changed files with 1139 additions and 601 deletions

View File

@ -14,7 +14,7 @@
<style> <style>
/*每个页面公共css */ /*每个页面公共css */
@import "./static/style/icons.css"; @import "./common/style/icons.css";
/* 每个页面公共css */ /* 每个页面公共css */
/* 解决小程序和app滚动条的问题 */ /* 解决小程序和app滚动条的问题 */

View File

@ -99,6 +99,15 @@ const timeSplit = function(value) {
var regex = new RegExp('-', 'g'); var regex = new RegExp('-', 'g');
return value.replace(regex, '.'); return value.replace(regex, '.');
} }
const objIsEmpty = function(obj) {
if (obj === undefined) {
return true;
}
if (obj === null) {
return true;
}
return Object.keys(obj).length === 0;
}
export { export {
isEmpty, isEmpty,
status, status,
@ -106,5 +115,6 @@ export {
proType, proType,
boderStyle, boderStyle,
fontColor, fontColor,
timeSplit timeSplit,
objIsEmpty
} }

View File

@ -1,6 +1,6 @@
import { import {
request request
} from "/static/utils/net/http.js"; } from "./http.js";
// 公共API // 公共API
const apiPath = { const apiPath = {
getSelfProjectList: '/api/proj/listpage/self', //获取我的项目列表 getSelfProjectList: '/api/proj/listpage/self', //获取我的项目列表

296
components/ad-popup.vue Normal file

File diff suppressed because one or more lines are too long

View File

@ -50,7 +50,7 @@
"quickapp" : {}, "quickapp" : {},
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
"appid": "", "appid" : "wxe17874894f7ff27b",
"setting" : { "setting" : {
"urlCheck" : false "urlCheck" : false
}, },
@ -60,10 +60,12 @@
"usingComponents" : true "usingComponents" : true
}, },
"mp-baidu" : { "mp-baidu" : {
"usingComponents": true "usingComponents" : true,
"appid" : "testid"
}, },
"mp-toutiao" : { "mp-toutiao" : {
"usingComponents": true "usingComponents" : true,
"appid" : "testAppId"
}, },
"uniStatistics" : { "uniStatistics" : {
"enable" : false "enable" : false

View File

@ -86,6 +86,20 @@
{ {
"navigationBarTitleText" : "" "navigationBarTitleText" : ""
} }
},
{
"path" : "pages/common/rule/rule",
"style" :
{
"navigationBarTitleText" : ""
}
},
{
"path" : "components/ad-popup",
"style" :
{
"navigationBarTitleText" : ""
}
} }
], ],
"globalStyle": { "globalStyle": {

View File

@ -0,0 +1,93 @@
<template>
<view class="rule-content-box">
<text class="rule-content-title">{{title}}</text>
<rich-text class="rule-content-body" nodes="{{content}}"></rich-text>
<uni-popup type="message" ref="msg">
<uni-popup-message :type="msgType" :message="msgTxt" :duration="2000"></uni-popup-message>
</uni-popup>
</view>
</template>
<script>
import ProApi from '@/common/js/net/projectApi.js'
export default {
data() {
return {
msgType: 'info',
msgTxt: '',
content: "",
title: '',
id: '',
}
},
onLoad(options) {
this.id = options.id
uni.setNavigationBarColor({
frontColor: '#000000', // #ffffff#000000
backgroundColor: '#F0F0F0', //
animation: { //
duration: 500,
timingFunc: 'easeIn'
}
})
this.getDeal()
},
methods: {
//
getDeal() {
var _self = this
uni.showLoading({
title: '加载中...',
})
ProApi.doGetRuleDate(_self.id)
.then(res => {
uni.hideLoading()
if (res && res.content && res.content != '') {
_self.title = res.title
_self.content = res.content
} else {
_self.msgType = 'error'
_self.msgTxt = '很遗憾,当前服务器返回的数据有误,辛苦您过会儿再尝试。'
_self.$refs.msg.open()
setTimeout(() => {
uni.navigateBack()
}, 1500);
}
})
.catch((err) => {
uni.hideLoading()
console.log(err)
_self.msgType = 'error'
_self.msgTxt = '很遗憾,当前服务器返回的数据有误,辛苦您过会儿再尝试。'
_self.$refs.msg.open()
setTimeout(() => {
uni.navigateBack()
}, 1500);
})
}
}
}
</script>
<style>
.rule-content-box {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 20rpx;
}
.rule-content-title {
font-size: 28rpx;
font-weight: 500;
color: black;
}
.rule-content-body {
font-size: 24rpx;
color: gray;
margin-top: 20rpx;
padding: 20rpx;
}
</style>

View File

@ -74,13 +74,6 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="buy-desc-column box-bottom-options mt-20">
<checkbox-group bindchange="doUrgent">
<checkbox class="custom-wx-checkbox">
<tex style="color: #532A00;padding-left: 10rpx;font-weight: 400;">加急办理{{urgent/100}}</tex>
</checkbox>
</checkbox-group>
</view> -->
</view> </view>
</view> </view>
<!-- 写材料 --> <!-- 写材料 -->
@ -163,7 +156,7 @@
</template> </template>
<script> <script>
import ProApi from '../../../static/utils/net/projectApi.js' import ProApi from '@/common/js/net/projectApi.js'
export default { export default {
data() { data() {
return { return {
@ -245,10 +238,9 @@
uni.setClipboardData({ uni.setClipboardData({
data: 'https://www.aimzhu.com', data: 'https://www.aimzhu.com',
success: () => { success: () => {
_self.setData({ _self.msgTxt = '复制成功'
successHint: '复制成功', _self.msgType = 'success'
showSuccess: true _self.$refs.msg.open()
})
}, },
fail: err => { fail: err => {
console.log(err) console.log(err)
@ -259,7 +251,7 @@
} }
</script> </script>
<style lang="scss"> <style>
.buy-container { .buy-container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -312,6 +304,12 @@
border-radius: 10rpx; border-radius: 10rpx;
background-color: #FFA900; background-color: #FFA900;
color: white; color: white;
font-size: 16px;
}
.buy-all-btn:active {
background-color: #FFA900C0;
color: white;
} }
.buy-desc-box { .buy-desc-box {

View File

@ -91,22 +91,21 @@
<view class="money"> <view class="money">
<view>金额:<text class="price">{{price/100}}</text></view> <view>金额:<text class="price">{{price/100}}</text></view>
<checkbox-group @change="doUrgent" v-if="isShowUrgent"> <checkbox-group @change="doUrgent" v-if="isShowUrgent">
<checkbox :checked="isUrgent" color="#FFA900" style="transform: scale(0.7);align-self: center;" <checkbox :checked="isUrgent" color="#FFA900"
style="transform: scale(0.7);transform-origin: left center;margin-left: 8rpx;"
:disabled="isUrgentDisable"> :disabled="isUrgentDisable">
<text style="color: #532A00;padding-left: 15rpx;font-weight: 400;">加急办理{{urgent/100}}</text> <text style="color: #532A00;padding-left: 8rpx;font-weight: 400;">加急办理{{urgent/100}}</text>
</checkbox> </checkbox>
</checkbox-group> </checkbox-group>
</view> </view>
<view class="btn" bind:tap="doCreateProject">保存并付款</view> <view class="btn" @click="doCreateProject">保存并付款</view>
</view> </view>
</view>
<!-- 各类弹窗 -->
<view> <view>
<!-- 推荐项目名称 --> <!-- 推荐项目名称 -->
<uni-popup ref="commendDialog" type="bottom" background-color="#fff" border-radius="15rpx 15rpx 0rpx 0rpx"> <uni-popup ref="commendDialog" type="bottom" background-color="#fff" border-radius="15rpx 15rpx 0rpx 0rpx">
<view class="bottom-dialog-box"> <view class="bottom-dialog-box">
<view class="bottom-title-box"> <view class="bottom-title-box">
<view class="icon-close close-icon" @click="closePopup"></view> <view class="icon-close close-icon" @click="closeCommendDialog"></view>
<view class="bottom-title-txt">项目名称</view> <view class="bottom-title-txt">项目名称</view>
</view> </view>
<textarea @input="inputProjectName" placeholder="请简单介绍您想创建的系统,我们会根据您的描述为您推荐系统全称" <textarea @input="inputProjectName" placeholder="请简单介绍您想创建的系统,我们会根据您的描述为您推荐系统全称"
@ -138,13 +137,13 @@
</view> </view>
<view class="form-item"> <view class="form-item">
<view class="form-item-title">联系电话</view> <view class="form-item-title">联系电话</view>
<input :adjust-position="true" :cursor-spacing="50" :value="contactPhone" placeholder="请输入联系电话" <input :adjust-position="true" :cursor-spacing="50" :value="contactPhone"
class="form-item-content" @input="inputContactPhone" /> placeholder="请输入联系电话" class="form-item-content" @input="inputContactPhone" />
</view> </view>
<view class="form-item"> <view class="form-item">
<view class="form-item-title no-after" style="padding-left: 16rpx;">联系邮箱</view> <view class="form-item-title no-after" style="padding-left: 16rpx;">联系邮箱</view>
<input :adjust-position="true" :cursor-spacing="50" :value="contactEmail" placeholder="请输入联系邮箱" <input :adjust-position="true" :cursor-spacing="50" :value="contactEmail"
class="form-item-content" @input="inputContactEmail" /> placeholder="请输入联系邮箱" class="form-item-content" @input="inputContactEmail" />
</view> </view>
<view class="form-item"> <view class="form-item">
<view class="form-item-title no-after" style="padding-left: 16rpx;">公司</view> <view class="form-item-title no-after" style="padding-left: 16rpx;">公司</view>
@ -156,7 +155,8 @@
</view> </view>
</uni-popup> </uni-popup>
<!-- 语言选择 --> <!-- 语言选择 -->
<uni-popup ref="selectLangDialog" type="bottom" background-color="#fff" border-radius="15rpx 15rpx 0rpx 0rpx"> <uni-popup ref="selectLangDialog" type="bottom" background-color="#fff"
border-radius="15rpx 15rpx 0rpx 0rpx">
<view class="bottom-dialog-box"> <view class="bottom-dialog-box">
<view class="bottom-title-box"> <view class="bottom-title-box">
<view class="icon-close close-icon" @click="closeLangDialog"></view> <view class="icon-close close-icon" @click="closeLangDialog"></view>
@ -176,7 +176,8 @@
</view> </view>
</uni-popup> </uni-popup>
<!-- 套餐包弹窗 --> <!-- 套餐包弹窗 -->
<uni-popup ref="selPackageDialog" type="bottom" background-color="#fff" border-radius="15rpx 15rpx 0rpx 0rpx"> <uni-popup ref="selPackageDialog" type="bottom" background-color="#fff"
border-radius="15rpx 15rpx 0rpx 0rpx">
<view class="bottom-dialog-box"> <view class="bottom-dialog-box">
<view class="bottom-title-box"> <view class="bottom-title-box">
<view class="icon-close close-icon" @click="closePackage"></view> <view class="icon-close close-icon" @click="closePackage"></view>
@ -184,7 +185,7 @@
</view> </view>
<scroll-view scroll-y style="height: 500rpx;"> <scroll-view scroll-y style="height: 500rpx;">
<view class="coupons-list-box"> <view class="coupons-list-box">
<radio-group> <radio-group @change="radioSelPackage">
<block v-for="(item,index) in packageList" :key="index"> <block v-for="(item,index) in packageList" :key="index">
<view class="tickets" @click="choosePackage" :data-value="item"> <view class="tickets" @click="choosePackage" :data-value="item">
<view class="l-tickets"> <view class="l-tickets">
@ -193,11 +194,13 @@
<view>剩余{{item.packageTotalSurplusCount}}</view> <view>剩余{{item.packageTotalSurplusCount}}</view>
</view> </view>
<view class="ticket-content">{{item.packageInfoAppDTO.packageName}}</view> <view class="ticket-content">{{item.packageInfoAppDTO.packageName}}</view>
<view class="ticket-desc">{{item.packageInfoAppDTO.packageDescription}}</view> <view class="ticket-desc">{{item.packageInfoAppDTO.packageDescription}}
</view>
</view> </view>
<view class="r-tickets"> <view class="r-tickets">
<radio color="#FFA900" style="margin-left: 5px;transform:scale(0.8)" <radio color="#FFA900" style="margin-left: 5px;transform:scale(0.8)"
:value="index+''" :checked="tempPackage.packageInfoId==item.packageInfoId"> :value="index+''"
:checked="tempPackage.packageInfoId==item.packageInfoId">
</radio> </radio>
</view> </view>
</view> </view>
@ -210,7 +213,8 @@
</uni-popup> </uni-popup>
<!-- 优惠卷弹窗 --> <!-- 优惠卷弹窗 -->
<uni-popup ref="selCouponsDialog" type="bottom" background-color="#fff" border-radius="15rpx 15rpx 0rpx 0rpx"> <uni-popup ref="selCouponsDialog" type="bottom" background-color="#fff"
border-radius="15rpx 15rpx 0rpx 0rpx">
<view class="bottom-dialog-box"> <view class="bottom-dialog-box">
<view class="bottom-title-box"> <view class="bottom-title-box">
<view class="icon-close close-icon" @click="closeCoupons"></view> <view class="icon-close close-icon" @click="closeCoupons"></view>
@ -218,7 +222,7 @@
</view> </view>
<scroll-view scroll-y style="height: 500rpx;"> <scroll-view scroll-y style="height: 500rpx;">
<view class="coupons-list-box"> <view class="coupons-list-box">
<radio-group> <radio-group @change="radioSelCoupons">
<block v-for="(item,index) in couponsList" :key="index"> <block v-for="(item,index) in couponsList" :key="index">
<view class="tickets" @click="chooseCoupons" :data-value="item"> <view class="tickets" @click="chooseCoupons" :data-value="item">
<view class="l-tickets"> <view class="l-tickets">
@ -237,7 +241,8 @@
</view> </view>
<view class="r-tickets"> <view class="r-tickets">
<radio color="#FFA900" style="margin-left: 5px;transform: scale(0.8);" <radio color="#FFA900" style="margin-left: 5px;transform: scale(0.8);"
:checked="tempCoupons.couponId==item.couponId"></radio> :value="index+''" :checked="tempCoupons.couponId==item.couponId">
</radio>
</view> </view>
</view> </view>
</block> </block>
@ -251,18 +256,20 @@
<uni-popup-message :type="msgType" :message="msgTxt" :duration="2000"></uni-popup-message> <uni-popup-message :type="msgType" :message="msgTxt" :duration="2000"></uni-popup-message>
</uni-popup> </uni-popup>
</view> </view>
</view>
</template> </template>
<script> <script>
import ProApi from '../../../static/utils/net/projectApi.js' import ProApi from '@/common/js/net/projectApi.js'
import UserApi from '../../../static/utils/net/UserApi.js' import UserApi from '@/common/js/net/UserApi.js'
import { import {
formatDate formatDate
} from '../../../static/utils/util.js' } from '@/common/js/util.js'
import { import {
isEmpty isEmpty,
} from '../../../static/utils/conver.js' objIsEmpty
} from '@/common/js/conver.js'
export default { export default {
data() { data() {
return { return {
@ -580,6 +587,10 @@
choosePackage(e) { choosePackage(e) {
this.tempPackage = e.currentTarget.dataset.value this.tempPackage = e.currentTarget.dataset.value
}, },
//radio
radioSelPackage(e) {
this.tempPackage = this.packageList[e.detail.value]
},
// //
doConfirmPackage() { doConfirmPackage() {
this.selectPackage = this.tempPackage this.selectPackage = this.tempPackage
@ -589,7 +600,7 @@
this.tempCoupons = {} this.tempCoupons = {}
this.isUrgent = false // this.isUrgent = false //
this.isUrgentDisable = true // this.isUrgentDisable = true //
this.price = 0 this.countPrice()
this.$refs.selPackageDialog.close() this.$refs.selPackageDialog.close()
}, },
// //
@ -602,7 +613,7 @@
this.canSelPackage = true this.canSelPackage = true
this.isUrgent = false // this.isUrgent = false //
this.isUrgentDisable = false // this.isUrgentDisable = false //
this.price = this.proPrice // this.countPrice()
}, },
// //
doShowCoupons() { doShowCoupons() {
@ -620,25 +631,108 @@
_self.canSelPackage = false _self.canSelPackage = false
_self.selectPackage = {} _self.selectPackage = {}
_self.tempPackage = {} _self.tempPackage = {}
var newPrice = Number(_self.price) - Number(_self.selectCoupons.coupon.amount) _self.countPrice()
_self.price = newPrice > 0 ? newPrice : 0
this.$refs.selCouponsDialog.close() this.$refs.selCouponsDialog.close()
}, },
// //
chooseCoupons(e) { chooseCoupons(e) {
this.tempCoupons = e.currentTarget.dataset.value this.tempCoupons = e.currentTarget.dataset.value
}, },
//radio
radioSelCoupons(e) {
this.tempCoupons = this.couponsList[e.detail.value]
},
// //
doUrgent() { doUrgent() {
const _self = this const _self = this
_self.isUrgent = !_self.isUrgent _self.isUrgent = !_self.isUrgent
var newPrice = Number(_self.price) _self.countPrice()
if (_self.isUrgent) { },
newPrice = Number(_self.price) + Number(_self.urgent) //
countPrice() {
const _self = this;
const trPrice = Number(_self.proPrice);
let newPrice;
if (!objIsEmpty(_self.selectPackage)) {
newPrice = 0;
} else { } else {
newPrice = Number(_self.price) - Number(_self.urgent) const isAllType = _self.type === 'ALL';
const hasCoupon = !objIsEmpty(_self.selectCoupons);
const isUrgent = _self.isUrgent;
const couponAmount = hasCoupon ? Number(_self.selectCoupons.coupon.amount) : 0;
const urgentFee = isAllType && isUrgent ? Number(_self.urgent) : 0;
newPrice = trPrice + urgentFee - couponAmount;
}
_self.price = Math.max(0, newPrice);
},
//
doCheckProjectParams() {
const _self = this
if (_self.projectName == '') {
_self.msgTxt = '请输入项目名称'
_self.msgType = 'error'
_self.$refs.msg.open()
return false
}
if (Object.keys(_self.selectContact).length <= 0) {
_self.msgTxt = '请选中产权联系人'
_self.msgType = 'error'
_self.$refs.msg.open()
return false
}
return true
},
//
doCreateProject() {
//
const _self = this
const isLegal = _self.doCheckProjectParams()
if (isLegal) {
uni.showLoading({
title: '创建中...',
})
//
var list = []
if (_self.isUrgent != '') {
list = [_self.isUrgent]
}
const data = {
applyContactCsaNo: _self.selectContact.csaNo, //
applyContactId: _self.selectContact.projContactId, //ID
applyContactName: _self.selectContact.name, //
applyContactPhone: _self.selectContact.phone, //
projDevCompleteDate: _self.completeDate, //
projName: _self.projectName, //
projVersion: _self.version, //
backendCodeLang: _self.selectLang,
projChargeType: _self.type, // ALL,FREE,MATERIAL,MATERIAL_AGENT,MATERIAL_AGENT_URGENT
listProjChargeAdditional: list,
packageOrderId: _self.selectPackage.packageOrderId ? _self.selectPackage.packageOrderId :
'', //ID
couponId: _self.selectCoupons.couponId ? _self.selectCoupons.couponId : '', //ID
}
ProApi.doCreateProject(data)
.then(res => {
console.log(res)
uni.hideLoading()
_self.msgType = 'success'
_self.msgTxt = '项目创建流程圆满完成,系统正在生成配套材料,请您耐心等候。'
_self.$refs.msg.open()
setTimeout(() => {
uni.navigateBack()
}, 1500);
})
.catch(err => {
uni.hideLoading()
console.log(err)
_self.msgTxt = err.msg ? err.msg : '网络错误,请稍后重试'
_self.msgType = 'error'
_self.$refs.msg.open()
})
} }
_self.price = newPrice
} }
} }
} }
@ -702,6 +796,7 @@
align-self: center; align-self: center;
width: 85vw; width: 85vw;
margin-top: 20rpx; margin-top: 20rpx;
font-size: 28rpx;
} }
.info-box { .info-box {
@ -733,6 +828,7 @@
padding: 5rpx 40rpx; padding: 5rpx 40rpx;
color: white; color: white;
border-radius: 10rpx; border-radius: 10rpx;
font-size: 28rpx;
} }
.content-box { .content-box {
@ -868,7 +964,6 @@
background-color: white; background-color: white;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center;
align-items: center; align-items: center;
} }
@ -888,6 +983,8 @@
font-size: 20px; font-size: 20px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center;
justify-content: center;
} }
.price { .price {

View File

@ -40,26 +40,26 @@
</view> </view>
</view> </view>
</view> </view>
<scroll-view scroll-x="true" class="mt-20 scroll-view_H" show-scrollbar="false"> <scroll-view :scroll-x="true" class="mt-20 scroll-view_H" show-scrollbar="false">
<view class="list-tabs"> <view class="list-tabs">
<block v-for="(item,index) in typeList" :key="index"> <block v-for="(item,index) in typeList" :key="index">
<view :class="currentType==item.value? 'tab-select' :'tab-normal'" class="item-margin" <view :class="currentType==item.value? 'tab-select' :'tab-normal'" class="item-margin"
@click="doChangeType(item.value)"> @click="doChangeType(item.value)">
<view>{{item.label}}</view> {{item.label}}
</view> </view>
</block> </block>
<view class="divider-h"></view> <view class="divider-h"></view>
<block v-for="(item,index) in expandList" :key="index"> <block v-for="(item,index) in expandList" :key="index">
<view :class="currentExpand==item.value? 'tab-select' :'tab-normal'" class="item-margin" <view :class="currentExpand==item.value? 'tab-select' :'tab-normal'" class="item-margin"
@click="doChangeExpand(item.value)"> @click="doChangeExpand(item.value)">
<view>{{item.label}}</view> {{item.label}}
</view> </view>
</block> </block>
<view class="divider-h"></view> <view class="divider-h"></view>
<block v-for="(item,index) in tagList" :key="index"> <block v-for="(item,index) in tagList" :key="index">
<view :class="currentTag==item.key? 'tab-select' :'tab-normal'" class="item-margin" <view :class="currentTag==item.key? 'tab-select' :'tab-normal'" class="item-margin"
@click="doChangeTag(item.key)"> @click="doChangeTag(item.key)">
<view>{{item.value}}</view> {{item.value}}
</view> </view>
</block> </block>
</view> </view>
@ -116,7 +116,6 @@
</ContainerLoading> </ContainerLoading>
</view> </view>
</view> </view>
</view>
<uni-popup ref="downloadPopup" type="bottom" background-color="#fff" border-radius="15rpx 15rpx 0rpx 0rpx"> <uni-popup ref="downloadPopup" type="bottom" background-color="#fff" border-radius="15rpx 15rpx 0rpx 0rpx">
<view class="bottom-dialog-box"> <view class="bottom-dialog-box">
<view style="font-size: 16px;font-weight: bold;align-self: center;">资料下载</view> <view style="font-size: 16px;font-weight: bold;align-self: center;">资料下载</view>
@ -180,29 +179,36 @@
</uni-popup> </uni-popup>
<DownloadProgress :isShow="downloading" :progress="downloadProgress"></DownloadProgress> <DownloadProgress :isShow="downloading" :progress="downloadProgress"></DownloadProgress>
<!-- 通知消息 --> <!-- 通知消息 -->
<AdPopup :coupons="tempCoupons" @ad-close="doCloseAd" @ad-furl="doFurlCoupons" :visible="showAd"></AdPopup>
<uni-popup ref="msg" type="message"> <uni-popup ref="msg" type="message">
<uni-popup-message :type="msgType" :message="msgTxt" :duration="2000"></uni-popup-message> <uni-popup-message :type="msgType" :message="msgTxt" :duration="2000"></uni-popup-message>
</uni-popup> </uni-popup>
</view>
</template> </template>
<script> <script>
import AdPopup from '@/components/ad-popup.vue'
import ContainerLoading from '@/components/container-loading.vue' import ContainerLoading from '@/components/container-loading.vue'
import DownloadProgress from '@/components/download-progress.vue' import DownloadProgress from '@/components/download-progress.vue'
import ProApi from '../../static/utils/net/projectApi.js' import ProApi from '@/common/js/net/projectApi.js'
import UserApi from '@/common/js/net/UserApi.js'
import { import {
previewUrl, previewUrl,
copyrightUrl copyrightUrl
} from '../../static/utils/net/http.js' } from '@/common/js/net/http.js'
import { import {
status status
} from '../../static/utils/conver.js' } from '@/common/js/conver.js'
import { import {
get get,
} from '../../static/utils/cache/storage.js'; set
} from '@/common/js/cache/storage.js';
export default { export default {
components: { components: {
ContainerLoading, ContainerLoading,
DownloadProgress DownloadProgress,
AdPopup
}, },
data() { data() {
return { return {
@ -260,6 +266,9 @@
downloading: false, // downloading: false, //
msgType: 'success', // success error warn info msgType: 'success', // success error warn info
msgTxt: '', // msgTxt: '', //
showAd: false, //广
tempCoupons: null, //
isNoShowToday: false, //
} }
}, },
onLoad() { onLoad() {
@ -268,12 +277,51 @@
_self.doGetTagList() //Tag _self.doGetTagList() //Tag
const params = _self.buildParams(1, true) const params = _self.buildParams(1, true)
_self.doGetSelfList(params, true) _self.doGetSelfList(params, true)
const noShowToday = get('noShowToday')
const currentDate = new Date().toLocaleDateString();
if (noShowToday && noShowToday === currentDate) {
this.isNoShowToday = true
} else {
_self.doGetClaimsCoupons()
}
//
this.countBarHeight()
}, },
onReady() { onReady() {
this.calculateRemainingHeight() this.calculateRemainingHeight()
}, },
methods: { methods: {
status, status,
//
countBarHeight() {
//#ifdef MP-WEIXIN || H5
const windowInfo = uni.getWindowInfo()
const deviceInfo = uni.getDeviceInfo()
this.statusBarHeight = windowInfo.statusBarHeight
this.totalHeight = deviceInfo.osName.toLowerCase() == 'ios' ? 48 : 50 //
//#endif
//#ifdef MP-ALIPAY ||MP-BAIDU||MP-TOUTIAO || MP-KUAISHOU || MP-XHS
const deviceInfo = uni.getSystemInfoSync()
console.log('设备信息', deviceInfo);
this.statusBarHeight = deviceInfo.statusBarHeight
this.totalHeight = deviceInfo.osName.toLowerCase() == 'ios' ? 48 : 50 //
console.log('系统平台', deviceInfo.osName);
//#endif
},
//
doGetClaimsCoupons() {
const _self = this
UserApi.doGetClaimsCouponsList()
.then(res => {
if (res && res.length > 0) {
this.tempCoupons = res[0]
this.showAd = true
}
})
.catch(err => {
console.log(err)
})
},
// //
doGetNotice() { doGetNotice() {
const _self = this const _self = this
@ -412,16 +460,20 @@
// //
const systemInfo = uni.getSystemInfoSync(); const systemInfo = uni.getSystemInfoSync();
const windowHeight = systemInfo.windowHeight; const windowHeight = systemInfo.windowHeight;
console.log(windowHeight);
// bg-title container-title // bg-title container-title
// //
const query = uni.createSelectorQuery().in(this); const query = uni.createSelectorQuery().in(this);
query.select('#up-box').boundingClientRect(data => { query.select('#up-box').boundingClientRect(data => {
if (data) { if (data) {
const occupiedHeight = data.height; const occupiedHeight = data.height;
console.log(occupiedHeight);
// //
this.contentHeight = windowHeight - occupiedHeight - 50; this.contentHeight = windowHeight - occupiedHeight - this.totalHeight - this
.statusBarHeight;
console.log('窗口高度', windowHeight);
console.log('内容高度', this.contentHeight)
console.log('头布局高度', occupiedHeight);
} else {
console.log('未获取到高度');
} }
}).exec(); }).exec();
}, },
@ -494,7 +546,8 @@
if (fileName) { if (fileName) {
console.log('下载的文件路径:', downloadRes.tempFilePath + fileName); console.log('下载的文件路径:', downloadRes.tempFilePath + fileName);
uni.getFileSystemManager().saveFile({ uni.getFileSystemManager().saveFile({
tempFilePath: downloadRes.tempFilePath + fileName, tempFilePath: res.tempFilePath,
filePath: uni.env.USER_DATA_PATH + '/' + fileName,
success: saveRes => { success: saveRes => {
// //
console.log('打开文件', saveRes.savedFilePath); console.log('打开文件', saveRes.savedFilePath);
@ -552,12 +605,55 @@
_self.showDownload = false _self.showDownload = false
_self.downloading = false _self.downloading = false
_self.downloadProgress = 0 _self.downloadProgress = 0
_self.$refs.msg.open()
},
//广
doCloseAd(e) {
const isShow = e
console.log('关闭广告', e);
if (isShow) {
const currentDate = new Date().toLocaleDateString();
set('noShowToday', currentDate)
this.isNoShowToday = true
} }
this.showAd = false
},
//
doFurlCoupons(e) {
console.log('收下优惠卷')
const _self = this
const isShow = e
// isShow=true
if (isShow) {
const currentDate = new Date().toLocaleDateString();
set('noShowToday', currentDate)
_slef.isNoShowToday = true
}
uni.showLoading({
title: '领取中...',
})
const coupons = {
couponId: _self.tempCoupons.couponId
}
UserApi.doSaveCoupons(coupons)
.then(res => {
uni.hideLoading()
_self.msgType = 'success'
_self.msgTxt = '本次领取操作已成功,您可以在 “我的” 页面查看相关信息。'
_self.$refs.msg.open()
})
.catch(err => {
uni.hideLoading()
_self.msgType = 'error'
_self.msgTxt = err.msg ? err.msg : '本次领取操作未成功,请重新进入小程序后再次尝试。'
_self.$refs.msg.open()
})
},
} }
} }
</script> </script>
<style> <style lang="scss">
scroll-view ::-webkit-scrollbar { scroll-view ::-webkit-scrollbar {
display: none; display: none;
width: 0 !important; width: 0 !important;
@ -778,6 +874,7 @@
color: rgba(93, 57, 0, 1); color: rgba(93, 57, 0, 1);
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;
flex-wrap: nowrap;
padding: 2px 5px; padding: 2px 5px;
} }
@ -788,6 +885,7 @@
color: rgba(154, 154, 154, 1); color: rgba(154, 154, 154, 1);
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;
flex-wrap: nowrap;
white-space: nowrap; white-space: nowrap;
padding: 2px 5px; padding: 2px 5px;
} }
@ -961,18 +1059,21 @@
.marquee-text { .marquee-text {
display: inline-block; display: inline-block;
animation: marquee 9s linear infinite;
color: rgba(85, 0, 0, 1); color: rgba(85, 0, 0, 1);
font-size: 14px; font-size: 14px;
margin-left: 15px; margin-left: 15px;
white-space: nowrap;
transform: translateX(100%);
animation: marquee 10s linear infinite;
} }
@keyframes marquee { @keyframes marquee {
0% { 0% {
transform: translateX(0); transform: translateX(100%);
} }
100% { 100% {
/* 滚动到容器左侧外部 */
transform: translateX(-100%); transform: translateX(-100%);
} }
} }

View File

@ -8,9 +8,9 @@
iconColor="#FE9944"> iconColor="#FE9944">
阅读并同意</checkbox> 阅读并同意</checkbox>
</checkbox-group> </checkbox-group>
<text class="link">用户服务协议</text> <text class="link" @click="showServiceDeal">用户服务协议</text>
<text></text> <text></text>
<text class="link">隐私条款</text> <text class="link" @click="showPrivacyDeal">隐私条款</text>
</view> </view>
<button :class="isActive?'btn-login-disable':'btn-login'" open-type="getPhoneNumber" <button :class="isActive?'btn-login-disable':'btn-login'" open-type="getPhoneNumber"
@getphonenumber="decryptPhoneNumber" :disabled="isActive">授权登录</button> @getphonenumber="decryptPhoneNumber" :disabled="isActive">授权登录</button>
@ -19,13 +19,10 @@
</template> </template>
<script> <script>
import {
isReactive
} from 'vue';
import { import {
set set
} }
from '../../static/utils/cache/storage.js' from '@/common/js/cache/storage.js'
export default { export default {
data() { data() {
return { return {
@ -33,21 +30,32 @@
} }
}, },
onLoad() { onLoad() {
// #ifdef MP-WEIXIN || MP-TOUTIAO
uni.login({
success: res => {
console.log('登录成功', res)
uni.switchTab({
url: '/pages/index/home'
})
},
fail: err => {
console.log('登录失败', err)
}
})
// #endif
// #ifdef H5 || MP-BAIDU
set('token', set('token',
'NjBIOFRORDcraDc4U1RsUTI4a3B5em50VVVzclp2QjdFWDV2dVJJc0VLL3Fhazd0bjZPaU9Tc3E1cHc2cmYyZTc0Y2FITTdRR0pMTk1xaVRHM0I1d0NiTnJ4b1BVSVNtUFl4SlFtR1g2M0tCQTc2TXM4L3d4ZVhwM09VREN0bDMrTXNoa0trWDR1eG5PdG84OXZ4UVE0dDhRUDdQRk1Qd2N0ZWVLSzJaZzBjcC82NXdueGQvUkZNSm1vZ2doQmFncnRQN0pFQ240enZHaEdFcGpVTDZqY3VpdHRUZERUS2Y5RG5BdXZmeE1kNVVyM29icTZTV054RzNYdURDa2lvR3dIbi9nNmJLOHduNUl4Snp3Qm1qTDRkYXFXZ2plaGNQRmw3ZXBZTlgxV3cwZkVuaGxHZlhRb0ZZMlEveEJhQS9zeWE5NnpxRlUxTmJWYkRmMitvMTZXRnExVytHNEhEb1JPZkE4TG5UVzc0PQ==' 'NjBIOFRORDcraDc4U1RsUTI4a3B5em50VVVzclp2QjdFWDV2dVJJc0VLL3Fhazd0bjZPaU9Tc3E1cHc2cmYyZTc0Y2FITTdRR0pMTk1xaVRHM0I1d0NiTnJ4b1BVSVNtUFl4SlFtR1g2M0tCQTc2TXM4L3d4ZVhwM09VREN0bDMrTXNoa0trWDR1eG5PdG84OXZ4UVE0dDhRUDdQRk1Qd2N0ZWVLSzJaZzBjcC82NXdueGQvUkZNSm1vZ2doQmFncnRQN0pFQ240enZHaEdFcGpVTDZqY3VpdHRUZERUS2Y5RG5BdXZmeE1kNVVyM29icTZTV054RzNYdURDa2lvR3dIbi9nNmJLOHduNUl4Snp3Qm1qTDRkYXFXZ2plaGNQRmw3ZXBZTlgxV3cwZkVuaGxHZlhRb0ZZMlEveEJhQS9zeWE5NnpxRlUxTmJWYkRmMitvMTZXRnExVytHNEhEb1JPZkE4TG5UVzc0PQ=='
) )
setTimeout(() => { setTimeout(() => {
console.log('调用');
uni.switchTab({ uni.switchTab({
url: '/pages/index/home', url: '/pages/index/home'
success() {
console.log('成功');
},
fail(err) {
console.log('失败', err);
}
}) })
}, 2000) }, 1000)
// #endif
},
onUnload() {
console.log('页面卸载');
}, },
methods: { methods: {
// //
@ -56,12 +64,24 @@
}, },
decryptPhoneNumber(e) { decryptPhoneNumber(e) {
console.log(e) console.log(e)
} },
//
showServiceDeal() {
uni.navigateTo({
url: '/pages/common/rule/rule?id=68eee8f5-33d3-4246-aeee-a33956677101',
})
},
//
showPrivacyDeal() {
uni.navigateTo({
url: '/pages/common/rule/rule?id=93679af4-e264-4d1c-bd49-538028daa95d'
})
},
} }
} }
</script> </script>
<style> <style lang="scss">
.content { .content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -118,7 +138,7 @@
font-family: PingFangSC-regular; font-family: PingFangSC-regular;
} }
..btn-login-disable::before { .btn-login-disable::before {
border: none !important; border: none !important;
} }

View File

@ -2,6 +2,7 @@
<view class="body-container"> <view class="body-container">
<view class="search-box"> <view class="search-box">
<view class="search-container"> <view class="search-container">
<view class="search-input-icon"></view>
<input class="search-input" :value="keywords" @input="inputKeywords" @confirm="doSearchKeyWord" <input class="search-input" :value="keywords" @input="inputKeywords" @confirm="doSearchKeyWord"
type="text" confirm-type="search" placeholder="搜索" /> type="text" confirm-type="search" placeholder="搜索" />
<view v-if="keywords !=''" @click="clearSearch" class="icon-clear" style="width: 20px;height: 20px;"> <view v-if="keywords !=''" @click="clearSearch" class="icon-clear" style="width: 20px;height: 20px;">
@ -9,11 +10,11 @@
</view> </view>
<view class="add-btn" @click="showCreateDialog">创建联系人</view> <view class="add-btn" @click="showCreateDialog">创建联系人</view>
</view> </view>
<view class="content-container"> <ContainerLoading :loadingVisible="loadingState" style="height: 83vh;margin-top: 30rpx;"
<ContainerLoading :loadingVisible="loadingState" style="height: 85vh;" @doRefresh="doRefreshList"> @doRefresh="doRefreshList">
<scroll-view scroll-y style="height: 85vh;padding-bottom: 40px;" refresher-enabled <scroll-view scroll-y style="height: 83vh;" refresher-enabled :refresher-triggered="listRefreshTrig"
:refresher-triggered="listRefreshTrig" :refresher-threshold="100" :lower-threshold="100" :refresher-threshold="100" :lower-threshold="100" refresher-background="#FFFFFF00"
refresher-background="#FFFFFF00" @refresherrefresh="doRefreshList" @scrolltolower="doLoadMore"> @refresherrefresh="doRefreshList" @scrolltolower="doLoadMore">
<view class="order-box"> <view class="order-box">
<block v-for="(item,index) in contactList" :key="index"> <block v-for="(item,index) in contactList" :key="index">
<view class="order-item"> <view class="order-item">
@ -37,7 +38,6 @@
</scroll-view> </scroll-view>
</ContainerLoading> </ContainerLoading>
</view> </view>
</view>
<view> <view>
<!-- 确认弹窗 --> <!-- 确认弹窗 -->
<uni-popup type="dialog" ref="confirmDialog"> <uni-popup type="dialog" ref="confirmDialog">
@ -88,11 +88,11 @@
<script> <script>
import ContainerLoading from '@/components/container-loading.vue' import ContainerLoading from '@/components/container-loading.vue'
import UserApi from '../../../../static/utils/net/UserApi' import UserApi from '@/common/js/net/UserApi'
import { import {
isValidPhone, isValidPhone,
isValidEmail isValidEmail
} from '../../../../static/utils/validator.js' } from '@/common/js/validator.js'
export default { export default {
components: { components: {
ContainerLoading ContainerLoading
@ -399,7 +399,7 @@
} }
</script> </script>
<style> <style lang="scss">
.ic-user { .ic-user {
background-image: url('data:image/svg+xml;charset=utf-8;base64,PHN2ZyB0PSIxNzQzOTg4MzkwNjkwIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjM0MDkiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTUxMiAxMDI0QzIyOS4yMDUzMzMgMTAyNCAwIDc5NC43OTQ2NjcgMCA1MTJTMjI5LjIwNTMzMyAwIDUxMiAwczUxMiAyMjkuMjA1MzMzIDUxMiA1MTItMjI5LjIwNTMzMyA1MTItNTEyIDUxMnogbTAtNDk2LjQ2OTMzM2ExNzAuNjY2NjY3IDE3MC42NjY2NjcgMCAxIDAgMC0zNDEuMzMzMzM0IDE3MC42NjY2NjcgMTcwLjY2NjY2NyAwIDAgMCAwIDM0MS4zMzMzMzR6IG0yNjMuNzY1MzMzIDI2My43MjI2NjZhMjYzLjc2NTMzMyAyNjMuNzY1MzMzIDAgMSAwLTUyNy41MzA2NjYgMGg1MjcuNTMwNjY2eiIgcC1pZD0iMzQxMCIgZmlsbD0iIzEyOTZkYiI+PC9wYXRoPjwvc3ZnPg=='); background-image: url('data:image/svg+xml;charset=utf-8;base64,PHN2ZyB0PSIxNzQzOTg4MzkwNjkwIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjM0MDkiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTUxMiAxMDI0QzIyOS4yMDUzMzMgMTAyNCAwIDc5NC43OTQ2NjcgMCA1MTJTMjI5LjIwNTMzMyAwIDUxMiAwczUxMiAyMjkuMjA1MzMzIDUxMiA1MTItMjI5LjIwNTMzMyA1MTItNTEyIDUxMnogbTAtNDk2LjQ2OTMzM2ExNzAuNjY2NjY3IDE3MC42NjY2NjcgMCAxIDAgMC0zNDEuMzMzMzM0IDE3MC42NjY2NjcgMTcwLjY2NjY2NyAwIDAgMCAwIDM0MS4zMzMzMzR6IG0yNjMuNzY1MzMzIDI2My43MjI2NjZhMjYzLjc2NTMzMyAyNjMuNzY1MzMzIDAgMSAwLTUyNy41MzA2NjYgMGg1MjcuNTMwNjY2eiIgcC1pZD0iMzQxMCIgZmlsbD0iIzEyOTZkYiI+PC9wYXRoPjwvc3ZnPg==');
background-size: cover; background-size: cover;
@ -408,30 +408,22 @@
.search-box { .search-box {
position: fixed;
top: 100rpx;
left: 0;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center;
justify-content: center;
align-self: center;
width: 96vw;
} }
.search-container { .search-container {
position: relative;
align-self: center; align-self: center;
border-radius: 5px; border-radius: 5px;
background-color: rgba(255, 255, 255, 1); background-color: rgba(255, 255, 255, 1);
font-family: -regular; font-family: -regular;
margin: 10px 15px;
padding: 5px; padding: 5px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: baseline;
flex: 1; flex: 1;
margin-right: 15rpx;
} }
.search-input { .search-input {
@ -442,19 +434,16 @@
flex: 1; flex: 1;
} }
.search-input::after { .search-input-icon {
content: ''; content: '';
position: absolute;
left: 10px;
top: 50%;
transform: translateY(-50%);
width: 20px; width: 20px;
height: 20px; height: 20px;
margin-top: -1px;
background-size: cover; background-size: cover;
background-image: url('data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSI2NCA2NCA4OTYgODk2IiB3aWR0aD0iMTQiIGhlaWdodD0iMTkiIHN0eWxlPSIiIGZpbHRlcj0ibm9uZSI+CiAgICAKICAgIDxnPgogICAgPHBhdGggZD0iTTkwOS42IDg1NC41TDY0OS45IDU5NC44QzY5MC4yIDU0Mi43IDcxMiA0NzkgNzEyIDQxMmMwLTgwLjItMzEuMy0xNTUuNC04Ny45LTIxMi4xLTU2LjYtNTYuNy0xMzItODcuOS0yMTIuMS04Ny45cy0xNTUuNSAzMS4zLTIxMi4xIDg3LjlDMTQzLjIgMjU2LjUgMTEyIDMzMS44IDExMiA0MTJjMCA4MC4xIDMxLjMgMTU1LjUgODcuOSAyMTIuMUMyNTYuNSA2ODAuOCAzMzEuOCA3MTIgNDEyIDcxMmM2NyAwIDEzMC42LTIxLjggMTgyLjctNjJsMjU5LjcgMjU5LjZhOC4yIDguMiAwIDAgMCAxMS42IDBsNDMuNi00My41YTguMiA4LjIgMCAwIDAgMC0xMS42ek01NzAuNCA1NzAuNEM1MjggNjEyLjcgNDcxLjggNjM2IDQxMiA2MzZzLTExNi0yMy4zLTE1OC40LTY1LjZDMjExLjMgNTI4IDE4OCA0NzEuOCAxODggNDEyczIzLjMtMTE2LjEgNjUuNi0xNTguNEMyOTYgMjExLjMgMzUyLjIgMTg4IDQxMiAxODhzMTE2LjEgMjMuMiAxNTguNCA2NS42UzYzNiAzNTIuMiA2MzYgNDEycy0yMy4zIDExNi4xLTY1LjYgMTU4LjR6IiBmaWxsPSJyZ2JhKDIwNCwyMDQsMjA0LDEpIj48L3BhdGg+CiAgICA8L2c+CiAgPC9zdmc+'); background-image: url('data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSI2NCA2NCA4OTYgODk2IiB3aWR0aD0iMTQiIGhlaWdodD0iMTkiIHN0eWxlPSIiIGZpbHRlcj0ibm9uZSI+CiAgICAKICAgIDxnPgogICAgPHBhdGggZD0iTTkwOS42IDg1NC41TDY0OS45IDU5NC44QzY5MC4yIDU0Mi43IDcxMiA0NzkgNzEyIDQxMmMwLTgwLjItMzEuMy0xNTUuNC04Ny45LTIxMi4xLTU2LjYtNTYuNy0xMzItODcuOS0yMTIuMS04Ny45cy0xNTUuNSAzMS4zLTIxMi4xIDg3LjlDMTQzLjIgMjU2LjUgMTEyIDMzMS44IDExMiA0MTJjMCA4MC4xIDMxLjMgMTU1LjUgODcuOSAyMTIuMUMyNTYuNSA2ODAuOCAzMzEuOCA3MTIgNDEyIDcxMmM2NyAwIDEzMC42LTIxLjggMTgyLjctNjJsMjU5LjcgMjU5LjZhOC4yIDguMiAwIDAgMCAxMS42IDBsNDMuNi00My41YTguMiA4LjIgMCAwIDAgMC0xMS42ek01NzAuNCA1NzAuNEM1MjggNjEyLjcgNDcxLjggNjM2IDQxMiA2MzZzLTExNi0yMy4zLTE1OC40LTY1LjZDMjExLjMgNTI4IDE4OCA0NzEuOCAxODggNDEyczIzLjMtMTE2LjEgNjUuNi0xNTguNEMyOTYgMjExLjMgMzUyLjIgMTg4IDQxMiAxODhzMTE2LjEgMjMuMiAxNTguNCA2NS42UzYzNiAzNTIuMiA2MzYgNDEycy0yMy4zIDExNi4xLTY1LjYgMTU4LjR6IiBmaWxsPSJyZ2JhKDIwNCwyMDQsMjA0LDEpIj48L3BhdGg+CiAgICA8L2c+CiAgPC9zdmc+');
background-repeat: no-repeat;
} }
.add-btn { .add-btn {
border-radius: 4px; border-radius: 4px;
background-color: rgba(50, 112, 255, 1); background-color: rgba(50, 112, 255, 1);
@ -472,7 +461,7 @@
.content-container { .content-container {
height: 86vh; height: 86vh;
margin-top: 130rpx; margin-top: 30rpx;
} }
@ -624,6 +613,4 @@
.confirm-btn:active { .confirm-btn:active {
background-color: rgba(7, 193, 96, 0.5); background-color: rgba(7, 193, 96, 0.5);
} }
</style> </style>

View File

@ -57,13 +57,13 @@
</template> </template>
<script> <script>
import ContainerLoading from '../../../../components/container-loading.vue'; import ContainerLoading from '@/components/container-loading.vue';
import ProApi from '../../../../static/utils/net/projectApi.js' import ProApi from '@/common/js/net/projectApi.js'
import { import {
boderStyle, boderStyle,
fontColor, fontColor,
timeSplit timeSplit
} from '../../../../static/utils/conver.js' } from '@/common/js/conver.js'
export default { export default {
components: { components: {
ContainerLoading ContainerLoading
@ -197,7 +197,7 @@
} }
</script> </script>
<style> <style lang="scss">
.list-title-btns { .list-title-btns {
position: fixed; position: fixed;
top: 45px; top: 45px;

View File

@ -1,21 +1,21 @@
<template> <template>
<view class="body-container"> <view class="body-container">
<view class="info-container"> <view class="user-info-container">
<view class="item"> <view class="user-item">
<view class="item-title">姓名</view> <view class="user-item-title">姓名</view>
<view class="item-content"> <view class="user-item-content">
<input :value="userInfo.userInfoName" @input="inputName" placeholder="请输入姓名" /> <input :value="userInfo.userInfoName" @input="inputName" placeholder="请输入姓名" />
</view> </view>
</view> </view>
<view class="item"> <view class="user-item">
<view class="item-title">联系电话</view> <view class="user-item-title">联系电话</view>
<view class="item-content"> <view class="user-item-content">
<input :value="userInfo.contactPhone" @input="inputPhone" type="number" placeholder="请输入联系电话" /> <input :value="userInfo.contactPhone" @input="inputPhone" type="number" placeholder="请输入联系电话" />
</view> </view>
</view> </view>
</view> </view>
<view class="bottom-box"> <view class="user-bottom-box">
<view class="green-bottom-btn" @click="doUpdateInfo">保存</view> <view class="user-green-bottom-btn" @click="doUpdateInfo">保存</view>
</view> </view>
</view> </view>
<uni-popup ref="msg" type="message"> <uni-popup ref="msg" type="message">
@ -26,8 +26,8 @@
<script> <script>
import { import {
isValidPhone isValidPhone
} from '../../../../static/utils/validator.js' } from '@/common/js/validator.js'
import UserApi from '../../../../static/utils/net/UserApi.js' import UserApi from '@/common/js/net/UserApi.js'
export default { export default {
data() { data() {
return { return {
@ -136,15 +136,15 @@
} }
</script> </script>
<style> <style scoped>
.info-container { .user-info-container {
height: 100vh; height: 100vh;
background-color: white; background-color: white;
border-radius: 10px; border-radius: 10px;
padding: 20px; padding: 20px;
} }
.item { .user-item {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: flex-start; justify-content: flex-start;
@ -152,16 +152,16 @@
padding: 10px 5px; padding: 10px 5px;
} }
.item-title { .user-item-title {
flex: .3; flex: .3;
} }
.item-content { .user-item-content {
flex: .7; flex: .7;
text-align: right; text-align: right;
} }
.bottom-box { .user-bottom-box {
position: fixed; position: fixed;
left: 0; left: 0;
bottom: 0; bottom: 0;
@ -172,7 +172,7 @@
align-items: center; align-items: center;
} }
.green-bottom-btn { .user-green-bottom-btn {
height: 42px; height: 42px;
width: 90vw; width: 90vw;
line-height: 42px; line-height: 42px;
@ -186,7 +186,7 @@
} }
.green-bottom-btn:active { .user-green-bottom-btn:active {
background-color: rgba(255, 169, 0, 0.3); background-color: rgba(255, 169, 0, 0.3);
color: white; color: white;
} }

View File

@ -7,11 +7,11 @@
<view v-if="keywords !=''" @click="clearSearch" class="icon-clear icon-position"></view> <view v-if="keywords !=''" @click="clearSearch" class="icon-clear icon-position"></view>
</view> </view>
</view> </view>
<ContainerLoading :loadingVisible="loadingState" style="height: 85vh;margin-top: 100rpx;" <ContainerLoading :loadingVisible="loadingState" style="height: 85vh;margin-top: 30rpx;"
@doRefresh="doRefreshList"> @doRefresh="doRefreshList">
<scroll-view scroll-y style="height: 85vh;" refresher-enabled :refresher-triggered="listRefreshTrig" <scroll-view scroll-y style="height: 85vh;" refresher-enabled :refresher-triggered="listRefreshTrig"
:refresher-threshold="100" :lower-threshold="100" @refresherrefresh="doRefreshList" refresher-background="#FFFFFF00" :refresher-threshold="100" :lower-threshold="100" @refresherrefresh="doRefreshList"
@scrolltolower="doLoadMore"> refresher-background="#FFFFFF00" @scrolltolower="doLoadMore">
<view class="order-box"> <view class="order-box">
<block v-for="(item,index) in orderList" :key="index"> <block v-for="(item,index) in orderList" :key="index">
<view class="order-item"> <view class="order-item">
@ -49,11 +49,11 @@
<script> <script>
import ContainerLoading from '@/components/container-loading.vue' import ContainerLoading from '@/components/container-loading.vue'
import UserApi from '../../../../static/utils/net/UserApi.js' import UserApi from '@/common/js/net/UserApi.js'
import { import {
orderStatus, orderStatus,
proType proType
} from '../../../../static/utils/conver.js' } from '@/common/js/conver.js'
export default { export default {
components: { components: {
ContainerLoading ContainerLoading
@ -161,12 +161,10 @@
} }
</script> </script>
<style> <style lang="scss">
.search-box { .search-box {
position: fixed; display: flex;
top: 100rpx; flex-direction: row;
left: 0;
width: 100vw;
} }
.search-container { .search-container {
@ -175,12 +173,12 @@
border-radius: 5rpx; border-radius: 5rpx;
background-color: rgba(255, 255, 255, 1); background-color: rgba(255, 255, 255, 1);
font-family: -regular; font-family: -regular;
margin: 20rpx 30rpx;
padding: 5px; padding: 5px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 100vw;
} }
.search-input { .search-input {

View File

@ -65,9 +65,9 @@
<script> <script>
import { import {
copyrightUrl copyrightUrl
} from '../../../static/utils/net/http.js' } from '@/common/js/net/http.js'
import UserApi from '../../../static/utils/net/UserApi.js' import UserApi from '@/common/js/net/UserApi.js'
import ProApi from '../../../static/utils/net/projectApi.js' import ProApi from '@/common/js/net/projectApi.js'
export default { export default {
data() { data() {
return { return {
@ -112,6 +112,7 @@
}); });
this.animation = animation this.animation = animation
this.doGetPrice() this.doGetPrice()
this.countBarHeight()
}, },
onReady() { onReady() {
this.calculateRemainingHeight() this.calculateRemainingHeight()
@ -121,6 +122,21 @@
this.getMinePackageCount() this.getMinePackageCount()
}, },
methods: { methods: {
//
countBarHeight() {
//#ifdef MP-WEIXIN || H5
const windowInfo = uni.getWindowInfo()
const deviceInfo = uni.getDeviceInfo()
this.statusBarHeight = windowInfo.statusBarHeight
this.totalHeight = deviceInfo.osName.toLowerCase() == 'ios' ? 48 : 50 //
//#endif
//#ifdef MP-ALIPAY ||MP-BAIDU||MP-TOUTIAO || MP-KUAISHOU || MP-XHS
const deviceInfo = uni.getSystemInfoSync()
this.statusBarHeight = deviceInfo.statusBarHeight
this.totalHeight = deviceInfo.osName.toLowerCase() == 'ios' ? 48 : 50 //
console.log('手机平台', deviceInfo.osName)
//#endif
},
// //
calculateRemainingHeight() { calculateRemainingHeight() {
// //
@ -133,9 +149,15 @@
query.select('#func-box').boundingClientRect(data => { query.select('#func-box').boundingClientRect(data => {
if (data) { if (data) {
const occupiedHeight = data.height; const occupiedHeight = data.height;
console.log(occupiedHeight); console.log('头布局高度', occupiedHeight);
// //
this.contentHeight = windowHeight - occupiedHeight - 40;
this.contentHeight = windowHeight - occupiedHeight - this.totalHeight - this
.statusBarHeight;
console.log('内容高度', this.contentHeight)
console.log('窗口高度', windowHeight)
} else {
console.log('未获取到高度');
} }
}).exec(); }).exec();
}, },
@ -155,7 +177,16 @@
}, },
// //
openCreate(e) { openCreate(e) {
const type = e.currentTarget.dataset.type const _self = this;
const type = e.currentTarget.dataset.type;
const count = type === 'ALL' ? _self.allCount : _self.materialCount;
if (count > 0) {
_self.doGetPackage(type);
} else {
_self.msgType = 'error';
_self.msgTxt = '您的账户当前无套餐包,为正常使用请及时充值。';
_self.$refs.msg.open();
}
}, },
// //
doCoupons() { doCoupons() {
@ -249,6 +280,41 @@
_self.$refs.msg.open() _self.$refs.msg.open()
}) })
}, },
//
doGetPackage(type) {
const _self = this
uni.showLoading({
title: '加载中...'
})
const data = {
page: 1,
rows: 10,
packageType: type,
keyong: 1,
}
ProApi.doGetPackageList(data)
.then(res => {
uni.hideLoading()
console.log(res.rows)
if (res.rows && res.rows.length > 0) {
const packageId = res.rows[0].packageInfoId
const price = type == 'ALL' ? _self.allPrice : _self.materialPrice
uni.navigateTo({
url: `/pages/copyright/createProjectInfo/createProjectInfo?type=${type}&price=${price}&isUrgent=false&pId=${packageId}`
})
} else {
_self.msgTxt = '您的账户当前无套餐包,为正常使用请及时充值。'
_self.msgType = 'error'
_self.$refs.msg.open()
}
})
.catch(err => {
uni.hideLoading()
_self.msgTxt = '获取套餐包失败,请稍后重试'
_self.msgType = 'error'
_self.$refs.msg.open()
})
},
} }
} }
</script> </script>

View File

@ -35,7 +35,7 @@
} }
</script> </script>
<style> <style lang="scss">
page { page {
background-color: white; background-color: white;
} }

View File

@ -86,7 +86,7 @@
<script> <script>
import ContainerLoading from '@/components/container-loading.vue'; import ContainerLoading from '@/components/container-loading.vue';
import PayService from '../../../static/utils/net/payApi.js'; import PayService from '@/common/js/net/payApi.js';
export default { export default {
components: { components: {
ContainerLoading ContainerLoading
@ -285,7 +285,7 @@
} }
</script> </script>
<style> <style lang="scss">
.input-money { .input-money {
font-size: 48rpx; font-size: 48rpx;
font-weight: bold; font-weight: bold;

View File

@ -91,11 +91,11 @@
<script> <script>
import { import {
get get
} from '../../../static/utils/cache/storage.js' } from '@/common/js/cache/storage.js'
import PayApi from '../../../static/utils/net/payApi' import PayApi from '@/common/js/net/payApi'
import { import {
uploadImgUrl uploadImgUrl
} from '../../../static/utils/net/http.js' } from '@/common/js/net/http.js'
export default { export default {
data() { data() {
return { return {
@ -333,7 +333,7 @@
} }
</script> </script>
<style> <style lang="scss">
.container-box { .container-box {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -482,6 +482,7 @@
width: 50rpx !important; width: 50rpx !important;
height: 4rpx !important; height: 4rpx !important;
} }
:deep(.uni-datetime-picker--btn) { :deep(.uni-datetime-picker--btn) {
background-color: rgba(255, 169, 0, 0.3) !important; background-color: rgba(255, 169, 0, 0.3) !important;
color: white !important; color: white !important;

View File

@ -1,42 +0,0 @@
// components/container-loading/container-loading.js
Component({
/**
* 组件的属性列表
*/
properties: {
loadingState: {
type: String,
value: 'loading'
},
widgetHeight: {
type: Number,
value: 200
}
},
observers: {
'loadingState': function (newVal) {
this.setData({
loadingVisible: newVal
});
},
'widgetHeight': function (newVal) {
this.setData({
height: newVal
})
}
},
data: {
loadingVisible: 'loading',
height: 200
},
/**
* 组件的方法列表
*/
methods: {
notifyParentToRefresh() {
// 触发自定义事件 'parentRefresh',并可以传递数据(这里传递一个空对象)
this.triggerEvent('refresh', {});
}
}
})

View File

@ -1,4 +0,0 @@
{
"component": true,
"usingComponents": {}
}

View File

@ -1,14 +0,0 @@
<view class="container">
<view v-if="loadingVisible=='loading'" class="loading"></view>
<view v-elif="loadingVisible=='error'" class="error-box" @click="notifyParentToRefresh">
<image src="/static/images/load_err.png" class="loading_err"></image>
<text style="align-self: center;margin-top: 10px;color: #cecece;font-size: 14px;">加载失败</text>
</view>
<view v-elif="loadingVisible=='empty'" class="error-box" @click="notifyParentToRefresh">
<image src="/static/images/load_err.png" class="loading_err"></image>
<text style="align-self: center;margin-top: 10px;color: #cecece;font-size: 14px;">暂无数据</text>
</view>
<block v-else="loadingVisible=='success'">
<slot></slot>
</block>
</view>

View File

@ -1,85 +0,0 @@
.container {
/* display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
min-height: 200rpx; */
width: 100%;
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
background-color: transparent;
}
.loading {
position: relative;
width: 40px;
border-radius: 20px;
perspective: 500px;
align-self: center;
margin-top: 40%;
}
.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;
}
}
.error-box {
/* display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: auto;
margin-top: 20%; */
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
align-self: center;
min-height: 200px;
}