页面优化
This commit is contained in:
parent
3f5d1d021b
commit
0621d6b735
1
app.json
1
app.json
@ -21,6 +21,7 @@
|
||||
"navigationBarBackgroundColor": "#ffffff"
|
||||
},
|
||||
"tabBar": {
|
||||
"custom": true,
|
||||
"color": "#515151",
|
||||
"selectedColor": "#FE9944",
|
||||
"list": [{
|
||||
|
4
app.wxss
4
app.wxss
@ -8,7 +8,7 @@ page {
|
||||
.page-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20rpx;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
@ -21,8 +21,6 @@ page {
|
||||
.custom-navbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 20rpx;
|
||||
padding-right: 20rpx;
|
||||
background-color: transparent;
|
||||
/* box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.05); */
|
||||
}
|
||||
|
40
components/tabbar/custom-tabbar.js
Normal file
40
components/tabbar/custom-tabbar.js
Normal file
@ -0,0 +1,40 @@
|
||||
Component({
|
||||
properties: {
|
||||
tabList: {
|
||||
type: Array,
|
||||
value: []
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
value: '#515151'
|
||||
},
|
||||
selectedColor: {
|
||||
type: String,
|
||||
value: '#FE9944'
|
||||
}
|
||||
},
|
||||
data: {},
|
||||
attached() {
|
||||
// 获取当前页面路径
|
||||
const pages = getCurrentPages();
|
||||
const currentPage = pages[pages.length - 1];
|
||||
const currentPath = `/${currentPage.route}`;
|
||||
const index = this.data.tabList.findIndex(item => item.pagePath === currentPath);
|
||||
if (index !== -1) {
|
||||
this.setData({
|
||||
selected: index
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
switchTab(e) {
|
||||
console.log('点击了')
|
||||
const index = e.currentTarget.dataset.index;
|
||||
const pagePath = this.data.tabList[index].pagePath;
|
||||
console.log(index, pagePath)
|
||||
wx.switchTab({
|
||||
url: '/' + pagePath
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
4
components/tabbar/custom-tabbar.json
Normal file
4
components/tabbar/custom-tabbar.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
6
components/tabbar/custom-tabbar.wxml
Normal file
6
components/tabbar/custom-tabbar.wxml
Normal file
@ -0,0 +1,6 @@
|
||||
<view class="tabbar">
|
||||
<view class="tabbar-item" wx:for="{{tabList}}" wx:key="index" bindtap="switchTab" data-index="{{index}}">
|
||||
<image class="tabbar-icon" src="{{item.selected? item.selectedIconPath : item.iconPath}}"></image>
|
||||
<view class="tabbar-text" style="color: {{item.selected? selectedColor : color}}">{{item.text}}</view>
|
||||
</view>
|
||||
</view>
|
29
components/tabbar/custom-tabbar.wxss
Normal file
29
components/tabbar/custom-tabbar.wxss
Normal file
@ -0,0 +1,29 @@
|
||||
.tabbar {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 160rpx;
|
||||
background-color: #FFFFFF;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
border-top: 1px solid #EEEEEE;
|
||||
}
|
||||
|
||||
.tabbar-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.tabbar-icon {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.tabbar-text {
|
||||
font-size: 12px;
|
||||
}
|
@ -12,6 +12,7 @@ const apiPath = {
|
||||
getPackageList: '/api/proj/servicepkg/packageorder/listpage/self', //获取套餐包
|
||||
getCommendProjectName: '/api/proj/recommend/list-proj-name/ai', //推荐项目名称
|
||||
createProject: '/api/proj/create-quick', //快速创建项目
|
||||
buildProject: '/api/proj/create-quick/proj-id/{projId}', //生成项目
|
||||
reCreate: '/api/proj/generate/proj-id/${projId}', //重新生成
|
||||
proLangList: '/api/env/custom/list-active-lang', //项目语言
|
||||
ruleData: '/app/agreementportal/getrelease/{id}', //使用规则 project="operator"
|
||||
@ -53,6 +54,11 @@ class ProjectService {
|
||||
static doCreateProject(data) {
|
||||
return request(apiPath.createProject, "POST", data)
|
||||
}
|
||||
//生成项目
|
||||
static doBuildProject(id) {
|
||||
const path = apiPath.buildProject.replace('{projId}', id)
|
||||
return request(path, "GET")
|
||||
}
|
||||
//重新生成
|
||||
static doReCreate(url) {
|
||||
const path = apiPath.reCreate.replace('${projId}', url)
|
||||
|
@ -31,7 +31,7 @@ function request(url, method = "GET", data = {}, params = {}, project = "copyrig
|
||||
baseUrl = operatorUrl
|
||||
} else if (project == 'copyright') {
|
||||
baseUrl = copyrightUrl
|
||||
} else if(project=='online') {
|
||||
} else if (project == 'online') {
|
||||
baseUrl = 'https://www.aimzhu.com/operator'
|
||||
}
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
@ -9,7 +9,7 @@ const {
|
||||
Page({
|
||||
data: {
|
||||
date: utils.formatDate(new Date()),
|
||||
completeDate: utils.formatDate(new Date()), //开发完成时间
|
||||
completeDate: '', //开发完成时间
|
||||
version: "v1.0", //系统版本
|
||||
type: 'ALL', //默认全托管 上级页面传递type参数 all全托管 material写材料
|
||||
languageList: ['JAVA'],
|
||||
@ -50,6 +50,7 @@ Page({
|
||||
urgent: 0, //加急费用
|
||||
isUrgentDisable: false, //是否禁用加急
|
||||
proPrice: 0, //价格
|
||||
transmitPId: '', //传递过来的套餐包ID
|
||||
},
|
||||
onLoad(options) {
|
||||
wx.setNavigationBarTitle({
|
||||
@ -65,21 +66,25 @@ Page({
|
||||
})
|
||||
const typeParams = options.type //类型
|
||||
const priceParams = options.price //价格
|
||||
const isUrgentParams = options.isUrgent
|
||||
const isUrgentParams = options.isUrgent //是否加急
|
||||
const pId = options.pId //套餐包ID
|
||||
console.log(priceParams)
|
||||
if (priceParams && priceParams > 0) {
|
||||
this.setData({
|
||||
price: priceParams,
|
||||
proPrice: priceParams,
|
||||
type: typeParams,
|
||||
isUrgent: isUrgentParams
|
||||
isUrgent: isUrgentParams,
|
||||
transmitPId: pId
|
||||
})
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: '数据有误,请重试',
|
||||
icon: 'error'
|
||||
this.setData({
|
||||
errorHint: '数据有误,请稍后重试',
|
||||
showError: true
|
||||
})
|
||||
wx.navigateBack()
|
||||
setTimeout(() => {
|
||||
wx.navigateBack()
|
||||
}, 1000);
|
||||
}
|
||||
if (this.data.type == 'ALL') {
|
||||
this.setData({
|
||||
@ -297,6 +302,23 @@ Page({
|
||||
_self.setData({
|
||||
packageList: res.rows
|
||||
})
|
||||
if (_self.data.transmitPId != '' && _self.data.transmitPId != 'undefined') {
|
||||
res.rows.map(item => {
|
||||
if (item.packageInfoId == _self.data.transmitPId) {
|
||||
_self.setData({
|
||||
selectPackage: item,
|
||||
showPackage: false,
|
||||
tempPackage: {},
|
||||
canSelCoupons: false,
|
||||
selectCoupons: {},
|
||||
tempCoupons: {},
|
||||
isUrgent: false, //取消加急
|
||||
isUrgentDisable: true, //加急不能选择
|
||||
price: 0
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}, err => {
|
||||
console.log(err)
|
||||
_self.setData({
|
||||
@ -472,6 +494,11 @@ Page({
|
||||
})
|
||||
}
|
||||
},
|
||||
clearTime() {
|
||||
this.setData({
|
||||
completeDate: ''
|
||||
})
|
||||
},
|
||||
//保存联系人
|
||||
doSaveContact() {
|
||||
//校验参数
|
||||
@ -486,7 +513,7 @@ Page({
|
||||
if (_self.data.contactPhone == '' || !isValidPhone(_self.data.contactPhone)) {
|
||||
_self.setData({
|
||||
showError: true,
|
||||
errorHint: '请输入合法的联系电话'
|
||||
errorHint: '请输入正确的联系电话'
|
||||
})
|
||||
return
|
||||
}
|
||||
@ -494,7 +521,7 @@ Page({
|
||||
if (!isValidEmail(_self.data.contactEmail)) {
|
||||
_self.setData({
|
||||
showError: true,
|
||||
errorHint: '请输入合法的邮箱'
|
||||
errorHint: '请输入正确的邮箱'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
</swiper>
|
||||
<view class="info-box">
|
||||
<view class="info-title">项目信息</view>
|
||||
<input value="{{projectName}}" bindinput="inputProjectName" class="info-value" placeholder="请输入系统全称(注:建议以'软件''平台''系统'等字眼结尾)" />
|
||||
<textarea value="{{projectName}}" bindinput="inputProjectName" class="info-value" placeholder="请输入系统全称(注:建议以'软件''平台''系统'等字眼结尾)" placeholder-style="font-size:14px;"></textarea>
|
||||
<view class="info-btn" bind:tap="doCommendProjectName">推荐</view>
|
||||
</view>
|
||||
<view class="content-box">
|
||||
@ -20,7 +20,7 @@
|
||||
<text class="label">产权联系人</text>
|
||||
<picker style="flex:1;" mode="selector" range="{{contactList}}" range-key="name" bindchange="doChangeContact">
|
||||
<view style="display: flex;align-items: center;">
|
||||
<view style="font-size: 13px;text-align: center;flex:1;">{{selectContact.name}}</view>
|
||||
<view style="font-size: 14px;text-align: center;flex:1;color: #000000;">{{selectContact.name}}</view>
|
||||
<view class="icon-arrow-down-line" style="width: 24rpx;height: 24rpx;margin-right: 20px;"></view>
|
||||
</view>
|
||||
</picker>
|
||||
@ -29,13 +29,13 @@
|
||||
<view class="item">
|
||||
<view class="flex-1">
|
||||
<text class="label" style="flex: 1;">系统版本</text>
|
||||
<input class="value" placeholder="v1.0" style="flex:1;" value="{{version}}" bindinput="inputVersion" />
|
||||
<input class="value {{version != '' ? 'v-select':''}}" placeholder="v1.0" style="flex:1;" value="{{version}}" bindinput="inputVersion" />
|
||||
</view>
|
||||
<view class="flex-1">
|
||||
<text class="label">系统语言</text>
|
||||
<view class="value selection-box ml-20">
|
||||
<view style="display: flex;align-items: center;">
|
||||
<view class="language-sel" bindtap="toggleOptions">{{selectLang}}</view>
|
||||
<view class="language-sel {{selectLang != ''? 'v-select':''}}" bindtap="toggleOptions">{{selectLang}}</view>
|
||||
<view class="icon-arrow-down-line" style="width: 28rpx;height: 28rpx;"></view>
|
||||
</view>
|
||||
</view>
|
||||
@ -43,12 +43,13 @@
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label">开发完成时间</view>
|
||||
<picker style="flex:1;" mode="date" value="{{date}}" start="2010-01-01" end="2050-01-01" bindchange="bindDateChange">
|
||||
<view class="desc">
|
||||
<view style="color:rgba(0,0,0,0.8)">{{completeDate}}</view>
|
||||
<view class="icon icon-calendar-ind"></view>
|
||||
</view>
|
||||
<picker mode="date" style="flex:1;" value="{{date}}" start="2010-01-01" end="2050-01-01" bindchange="bindDateChange">
|
||||
<view class="select-time {{completeDate ==''? 'value-hint':''}}">{{completeDate != ''? completeDate:'请选择开发完成时间'}}</view>
|
||||
</picker>
|
||||
<view style="display: flex;flex-direction: row;">
|
||||
<view wx:if="{{completeDate !=''}}" bind:tap="clearTime" class="icon-clear clear-icon"></view>
|
||||
<view wx:if="{{completeDate==''}}" class="icon-calendar-ind" style="height: 32rpx;width: 32rpx;"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@ -56,12 +57,12 @@
|
||||
<view class="section">
|
||||
<view wx:if="{{canSelPackage}}" class="item" style="justify-content: space-between;">
|
||||
<text class="label">套餐包</text>
|
||||
<text class="value" style="flex: 1;text-align: right;" bind:tap="doShowPackage">{{selectPackage.packageName?selectPackage.packageName:'请选择套餐包'}}</text>
|
||||
<text class="value {{!tools.isEmpty(selectPackage) ? 'v-select':''}}" style="flex: 1;text-align: right;" bind:tap="doShowPackage">{{selectPackage.packageName?selectPackage.packageName:'请选择套餐包'}}</text>
|
||||
<text wx:if="{{!tools.isEmpty(selectPackage)}}" class="link" bind:tap="clearSelectPackageOrCoupons">取消</text>
|
||||
</view>
|
||||
<view wx:if="{{canSelCoupons}}" class="item">
|
||||
<text class="label">优惠券</text>
|
||||
<text bindtap="doShowCoupons" style="flex:1;text-align: right;padding-right: 10px;color: #555;font-size: 14px;">{{selectCoupons.couponId? selectCoupons.coupon.title : '请选择优惠券'}}</text>
|
||||
<text bindtap="doShowCoupons" class="value {{!tools.isEmpty(selectCoupons)? 'v-select':''}}">{{selectCoupons.couponId? selectCoupons.coupon.title : '请选择优惠券'}}</text>
|
||||
<text class="link" wx:if="{{!tools.isEmpty(selectCoupons)}}" bind:tap="clearSelectPackageOrCoupons">取消</text>
|
||||
<text class="link" bindtap="doShowCoupons" wx:if="{{tools.isEmpty(selectCoupons)}}">选择</text>
|
||||
</view>
|
||||
@ -87,24 +88,24 @@
|
||||
<view class="form-box">
|
||||
<view class="form-item">
|
||||
<view class="form-item-title">姓名</view>
|
||||
<input adjust-position="{{true}}" cursor-spacing="{{50}}" value="{{contactName}}" placeholder="请输入联系人姓名" class="form-item-content" bindinput="inputContactName" />
|
||||
<input adjust-position="{{true}}" cursor-spacing="{{50}}" value="{{contactName}}" placeholder="请输入姓名" class="form-item-content" bindinput="inputContactName" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<view class="form-item-title">联系电话</view>
|
||||
<input adjust-position="{{true}}" cursor-spacing="{{50}}" value="{{contactPhone}}" placeholder="请输入联系电话" class="form-item-content" bindinput="inputContactPhone" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<view class="form-item-title no-after">联系邮箱</view>
|
||||
<input adjust-position="{{true}}" cursor-spacing="{{50}}" value="{{contactEmail}}" placeholder="请输入邮箱" class="form-item-content" bindinput="inputContactEmail" />
|
||||
<view class="form-item-title no-after" style="padding-left: 16rpx;">联系邮箱</view>
|
||||
<input adjust-position="{{true}}" cursor-spacing="{{50}}" value="{{contactEmail}}" placeholder="请输入联系邮箱" class="form-item-content" bindinput="inputContactEmail" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<view class="form-item-title no-after">公司</view>
|
||||
<view class="form-item-title no-after" style="padding-left: 16rpx;">公司</view>
|
||||
<input adjust-position="{{true}}" cursor-spacing="{{50}}" value="{{contactCompany}}" placeholder="请输入公司名称" class="form-item-content" bindinput="inputContactCompany" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view slot="footer">
|
||||
<button type="primary" bind:tap="doSaveContact">创建</button>
|
||||
<button class="confirm-btn" bind:tap="doSaveContact">保存</button>
|
||||
</view>
|
||||
</mp-half-screen-dialog>
|
||||
<!-- 推荐系统名称 -->
|
||||
@ -113,7 +114,7 @@
|
||||
<view slot="desc">
|
||||
<textarea bindinput="inputCommendProjectName" placeholder="请简单介绍您想创建的系统,我们会根据您的描述为您推荐系统全称" style="border: 1px solid #f2f2f2;width: 82vw;padding: 10px;height: 50px;"></textarea>
|
||||
<!-- 推荐回来的列表 -->
|
||||
<scroll-view scroll-y style="height: 300px;">
|
||||
<scroll-view scroll-y style="height: 300rpx;">
|
||||
<view class="project-box">
|
||||
<block wx:for="{{projectNameList}}" wx:key="index">
|
||||
<view class="project-item" bind:tap="doSelectProjectName" data-value="{{item}}">{{item}}</view>
|
||||
@ -121,37 +122,39 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view slot="footer" style="height: 0px;">
|
||||
<button type="primary" bind:tap="doCreateFullName">生成</button>
|
||||
<view slot="footer">
|
||||
<button class="confirm-btn" bind:tap="doCreateFullName">生成</button>
|
||||
</view>
|
||||
</mp-half-screen-dialog>
|
||||
<!-- 优惠卷弹窗 -->
|
||||
<mp-half-screen-dialog show="{{showCoupons}}">
|
||||
<view slot="title">优惠卷</view>
|
||||
<view slot="desc">
|
||||
<view class="coupons-list-box">
|
||||
<radio-group>
|
||||
<block wx:for="{{couponsList}}" wx:key="index">
|
||||
<view class="tickets" bind:tap="selectCoupons" data-value="{{item}}">
|
||||
<view class="l-tickets">
|
||||
<view class="ticket-title">
|
||||
<view style="display: flex;flex-direction: row;justify-content: center;align-items: center;">
|
||||
<view class="coupons-icon" style="width: 24px;height: 24px;">
|
||||
<scroll-view scroll-y style="height: 400rpx;">
|
||||
<view class="coupons-list-box">
|
||||
<radio-group>
|
||||
<block wx:for="{{couponsList}}" wx:key="index">
|
||||
<view class="tickets" bind:tap="selectCoupons" data-value="{{item}}">
|
||||
<view class="l-tickets">
|
||||
<view class="ticket-title">
|
||||
<view style="display: flex;flex-direction: row;justify-content: center;align-items: center;">
|
||||
<view class="coupons-icon" style="width: 24px;height: 24px;">
|
||||
</view>
|
||||
<text>优惠卷</text>
|
||||
</view>
|
||||
<text>优惠卷</text>
|
||||
<view>减{{item.coupon.amount/100}}元</view>
|
||||
</view>
|
||||
<view>减{{item.coupon.amount/100}}元</view>
|
||||
<view class="ticket-content">{{item.coupon.title}}</view>
|
||||
<view class="ticket-desc">有效期:{{item.coupon.useGmtStart}}至{{item.coupon.useGmtEnd}}</view>
|
||||
</view>
|
||||
<view class="r-tickets">
|
||||
<radio class="custom-radio" style="margin-left: 5px;" checked="{{tempCoupons.couponId==item.couponId}}"></radio>
|
||||
</view>
|
||||
<view class="ticket-content">{{item.coupon.title}}</view>
|
||||
<view class="ticket-desc">有效期:{{item.coupon.useGmtStart}}至{{item.coupon.useGmtEnd}}</view>
|
||||
</view>
|
||||
<view class="r-tickets">
|
||||
<radio class="custom-radio" style="margin-left: 5px;" checked="{{tempCoupons.couponId==item.couponId}}"></radio>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</radio-group>
|
||||
</view>
|
||||
</block>
|
||||
</radio-group>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view slot="footer">
|
||||
<button class="confirm-btn" style="margin-top: 10px;" bind:tap="confirmSelCoupons">确定</button>
|
||||
@ -161,25 +164,27 @@
|
||||
<mp-half-screen-dialog show="{{showPackage}}">
|
||||
<view slot="title">套餐包</view>
|
||||
<view slot="desc">
|
||||
<view class="coupons-list-box">
|
||||
<radio-group>
|
||||
<block wx:for="{{packageList}}" wx:key="index">
|
||||
<view class="tickets" bind:tap="selectPackage" data-value="{{item}}">
|
||||
<view class="l-tickets">
|
||||
<view class="ticket-title">
|
||||
<view>套餐包</view>
|
||||
<view>剩余{{item.packageTotalSurplusCount}}件</view>
|
||||
<scroll-view scroll-y style="height: 400rpx;">
|
||||
<view class="coupons-list-box">
|
||||
<radio-group>
|
||||
<block wx:for="{{packageList}}" wx:key="index">
|
||||
<view class="tickets" bind:tap="selectPackage" data-value="{{item}}">
|
||||
<view class="l-tickets">
|
||||
<view class="ticket-title">
|
||||
<view>套餐包</view>
|
||||
<view>剩余{{item.packageTotalSurplusCount}}件</view>
|
||||
</view>
|
||||
<view class="ticket-content">{{item.packageInfoAppDTO.packageName}}</view>
|
||||
<view class="ticket-desc">{{item.packageInfoAppDTO.packageDescription}}</view>
|
||||
</view>
|
||||
<view class="r-tickets">
|
||||
<radio class="custom-radio" style="margin-left: 5px;" checked="{{tempPackage.packageInfoId==item.packageInfoId}}"></radio>
|
||||
</view>
|
||||
<view class="ticket-content">{{item.packageInfoAppDTO.packageName}}</view>
|
||||
<view class="ticket-desc">{{item.packageInfoAppDTO.packageDescription}}</view>
|
||||
</view>
|
||||
<view class="r-tickets">
|
||||
<radio class="custom-radio" style="margin-left: 5px;" checked="{{tempPackage.packageInfoId==item.packageInfoId}}"></radio>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</radio-group>
|
||||
</view>
|
||||
</block>
|
||||
</radio-group>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view slot="footer">
|
||||
<button class="confirm-btn" style="margin-top: 10px;" bind:tap="confirmSelectPackage">确定</button>
|
||||
|
@ -62,15 +62,18 @@ page {
|
||||
|
||||
.info-title {
|
||||
font-size: 36rpx;
|
||||
font-weight: 500;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
margin-top: 20rpx;
|
||||
border: 1rpx solid #f2f2f2;
|
||||
padding: 24rpx;
|
||||
font-size: 28rpx;
|
||||
font-size: 14px;
|
||||
line-height: 16px;
|
||||
background-color: white;
|
||||
height: 65rpx;
|
||||
width: auto;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.info-btn {
|
||||
@ -104,6 +107,7 @@ page {
|
||||
|
||||
.label {
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.desc {
|
||||
@ -118,18 +122,46 @@ page {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.select-time {
|
||||
color: #000000;
|
||||
flex: 1;
|
||||
font-size: 14px;
|
||||
text-align: left;
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
|
||||
.clear-icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.desc .icon {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
|
||||
.value {
|
||||
color: #666;
|
||||
color: #9A9A9A;
|
||||
padding-right: 10px;
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
padding-right: 10px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
|
||||
.value-hint {
|
||||
color: #9A9A9A;
|
||||
}
|
||||
|
||||
.v-select {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
|
||||
.language-sel {
|
||||
font-size: 30rpx;
|
||||
font-size: 14px;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
@ -171,6 +203,8 @@ page {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
.weui-half-screen-dialog__ft {}
|
||||
|
||||
.bottom-box {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
@ -234,7 +268,7 @@ page {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.form-item-title:not(.no-after)::after {
|
||||
.form-item-title:not(.no-after)::before {
|
||||
content: "*";
|
||||
color: red;
|
||||
font-size: 14px;
|
||||
@ -244,19 +278,24 @@ page {
|
||||
|
||||
.form-item-content {
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.project-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
.project-item {
|
||||
font-size: 18px;
|
||||
background-color: #f5f5f5;
|
||||
margin: 10px;
|
||||
padding: 10px;
|
||||
font-size: 24rpx;
|
||||
background-color: #ffaa0034;
|
||||
text-align: center;
|
||||
color: #FFA900;
|
||||
text-align: center;
|
||||
margin: 20rpx;
|
||||
padding: 5rpx 20rpx;
|
||||
}
|
||||
|
||||
.confirm-btn {
|
||||
@ -264,15 +303,21 @@ page {
|
||||
color: white;
|
||||
font-size: 16px;
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
width: 85vw !important;
|
||||
}
|
||||
|
||||
|
||||
.weui-half-screen-dialog__bd {
|
||||
padding-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.coupons-list-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.tickets {
|
||||
@ -286,7 +331,7 @@ page {
|
||||
width: 60vw;
|
||||
position: relative;
|
||||
padding: 10px;
|
||||
background: radial-gradient(circle at right top, transparent 16rpx, #ffaa0017 0) right top / 100% 51% no-repeat,
|
||||
background: radial-gradient(circle at right top, transparent 16rpx, #ffaa0017 0) right top / 100% 50% no-repeat,
|
||||
radial-gradient(circle at right bottom, transparent 16rpx, #ffaa0017 0) right bottom / 100% 50% no-repeat;
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@ page {
|
||||
}
|
||||
|
||||
.input-money {
|
||||
font-size: 24px;
|
||||
font-size: 48rpx;
|
||||
font-weight: bold;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
|
@ -23,7 +23,7 @@ Page({
|
||||
companyName: '', //公司名称
|
||||
companyBank: '', //开户行
|
||||
companyBankNum: '', //账户号码
|
||||
packageId: null, //套餐ID
|
||||
packageId: '', //套餐ID
|
||||
payMoney: 0, //金额
|
||||
packageName: '', //套餐名称
|
||||
accountRechargeId: '', //订单ID
|
||||
@ -50,8 +50,9 @@ Page({
|
||||
// 获取完整的年月日时分秒,以及默认显示的数组
|
||||
const obj = dateTimePicker.dateTimePicker(this.data.startYear, this.data.endYear);
|
||||
console.log(obj.dateTime)
|
||||
console.log(typeof options.packageId)
|
||||
this.setData({
|
||||
packageId: options.packageId, //套餐包
|
||||
packageId: options.packageId && options.packageId != 'undefined' ? options.packageId : '', //套餐包
|
||||
packageName: options.name,
|
||||
payMoney: options.money, //金额
|
||||
dateTimeArray: obj.dateTimeArray,
|
||||
@ -62,6 +63,7 @@ Page({
|
||||
this.buildCurrentTime()
|
||||
this.getEnterpriseAccountInfo()
|
||||
//获取订单
|
||||
console.log(this.data.packageId)
|
||||
this.doGetOrder()
|
||||
},
|
||||
//公司名称
|
||||
@ -114,6 +116,7 @@ Page({
|
||||
title: '加载中...',
|
||||
})
|
||||
const _self = this
|
||||
console.log(_self.data.packageId)
|
||||
const data = {
|
||||
packageInfoId: _self.data.packageId ? _self.data.packageId : '',
|
||||
rechargeMoney: _self.data.payMoney,
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* pages/copyright/publicPay/publicPay.wxss */
|
||||
page {
|
||||
background: linear-gradient(to bottom, #F0F0F0, #FFFFFF);
|
||||
background-size: 100% 100vh;
|
||||
background-size: 100vw 100vh;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
@ -30,9 +30,9 @@ page {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 90vw;
|
||||
align-items: flex-start;
|
||||
padding: 6px 20px;
|
||||
width: 85vw;
|
||||
}
|
||||
|
||||
.red {
|
||||
@ -43,13 +43,13 @@ page {
|
||||
} */
|
||||
|
||||
.title {
|
||||
flex: .3;
|
||||
flex: 0.3;
|
||||
font-size: 14px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.content {
|
||||
flex: 1;
|
||||
flex: 0.7;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@ -132,9 +132,9 @@ page {
|
||||
}
|
||||
|
||||
.input-box {
|
||||
width: 60vw;
|
||||
flex: 1;
|
||||
background-color: #FAFAFA;
|
||||
border-radius: 20px;
|
||||
border-radius: 2rpx;
|
||||
padding: 3px 8px;
|
||||
text-align: left;
|
||||
font-size: 12px;
|
||||
|
@ -12,14 +12,19 @@ const deviceInfo = wx.getDeviceInfo()
|
||||
const screenInfo = wx.getWindowInfo();
|
||||
const statusBarHeight = screenInfo.statusBarHeight; // 状态栏高度
|
||||
const navBarHeight = deviceInfo.platform == 'IOS' ? 48 : 50; // 导航栏高度(iOS 为 44px,Android 为 48px)
|
||||
const tabBarHeight = screenInfo.screenHeight - (screenInfo.safeArea ? screenInfo.safeArea.bottom : 50);
|
||||
const screenHeight = screenInfo.screenHeight
|
||||
const screenWidth = screenInfo.screenWidth
|
||||
const windowHeight = screenInfo.windowHeight - navBarHeight - statusBarHeight; //可用内容高度
|
||||
|
||||
Page({
|
||||
data: {
|
||||
statusBarHeight: statusBarHeight,
|
||||
navBarHeight: navBarHeight,
|
||||
totalHeight: navBarHeight, // 导航栏总高度
|
||||
contentHeight: windowHeight,
|
||||
screenHeight: screenHeight, //屏幕高度
|
||||
screenWidth: screenWidth, //屏幕宽度
|
||||
tabBarHeight: tabBarHeight, //tabbar高度
|
||||
tagList: [],
|
||||
currentTag: '',
|
||||
imgUrl: previewUrl,
|
||||
@ -75,10 +80,26 @@ Page({
|
||||
showAd: false, //显示优惠卷广告
|
||||
tempCoupons: null, //优惠卷
|
||||
isNoShowToday: false, //今日不再显示
|
||||
tabList: [{
|
||||
"pagePath": "pages/index/index",
|
||||
"text": "首页",
|
||||
"iconPath": "/static/images/ic_home_normal.png",
|
||||
"selectedIconPath": "/static/images/ic_home_select.png",
|
||||
"selected": true
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/mine/mineIndex/mine",
|
||||
"text": "我的",
|
||||
"iconPath": "/static/images/ic_mine_normal.png",
|
||||
"selectedIconPath": "/static/images/ic_mine_select.png",
|
||||
"selected": false
|
||||
}
|
||||
],
|
||||
color: "#515151",
|
||||
selectedColor: "#FE9944",
|
||||
},
|
||||
onLoad(e) {
|
||||
const _self = this
|
||||
console.log(screenInfo.windowHeight)
|
||||
//获取通知
|
||||
_self.doGetNotice()
|
||||
//获取标签选项
|
||||
@ -86,10 +107,6 @@ Page({
|
||||
//获取列表
|
||||
const params = _self.buildParams(1, true)
|
||||
_self.doGetSelfList(params, true)
|
||||
const h = Utils.pxToRpx(_self.data.contentHeight)
|
||||
_self.setData({
|
||||
contentHeight: h
|
||||
})
|
||||
const noShowToday = Cache.get('noShowToday')
|
||||
const currentDate = new Date().toLocaleDateString();
|
||||
if (noShowToday && noShowToday === currentDate) {
|
||||
@ -99,6 +116,41 @@ Page({
|
||||
} else {
|
||||
_self.doGetClaimsCoupons()
|
||||
}
|
||||
this.countViewHeight()
|
||||
},
|
||||
onShow() {
|
||||
const pages = getCurrentPages();
|
||||
const currentPage = pages[pages.length - 1];
|
||||
const tabList = this.data.tabList;
|
||||
tabList.forEach(item => {
|
||||
item.selected = item.pagePath === currentPage.route;
|
||||
});
|
||||
this.setData({
|
||||
tabList
|
||||
});
|
||||
},
|
||||
//计算剩余高度
|
||||
countViewHeight() {
|
||||
const query = wx.createSelectorQuery();
|
||||
const _self = this
|
||||
// 指定要查询的 view 元素
|
||||
query.select('#title-box').boundingClientRect();
|
||||
query.exec((res) => {
|
||||
if (res[0]) {
|
||||
const height = res[0].height;
|
||||
//屏幕高度-内容高度-tabbar高度
|
||||
const contentHeight = _self.data.screenHeight - height - 50
|
||||
console.log('tabbarHeight:', _self.data.tabBarHeight)
|
||||
const h = Utils.pxToRpx(contentHeight, _self.data.screenWidth)
|
||||
const tempH = h - 130
|
||||
console.log('转后', h, '内容高度:', tempH)
|
||||
_self.setData({
|
||||
contentHeight: tempH
|
||||
})
|
||||
} else {
|
||||
console.log('未找到指定的 view 元素');
|
||||
}
|
||||
})
|
||||
},
|
||||
//获取可以申领的优惠卷
|
||||
doGetClaimsCoupons() {
|
||||
@ -381,6 +433,33 @@ Page({
|
||||
downloadProgress: 0
|
||||
})
|
||||
},
|
||||
//去生成项目
|
||||
doCreatePro(e) {
|
||||
wx.showLoading({
|
||||
title: '生成中...',
|
||||
})
|
||||
const _self = this
|
||||
const item = e.currentTarget.dataset.value
|
||||
ProjectService.doBuildProject(item.projId)
|
||||
.then(res => {
|
||||
// 刷新列表
|
||||
wx.hideLoading()
|
||||
console.log(res)
|
||||
_self.setData({
|
||||
successHint: '正在生成中,请耐心等待',
|
||||
showSuccess: true
|
||||
})
|
||||
_self.doRefreshList()
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
wx.hideLoading()
|
||||
_self.setData({
|
||||
errorHint: err.msg ? err.msg : '生成失败,请稍后重试',
|
||||
showError: true
|
||||
})
|
||||
})
|
||||
},
|
||||
//重新生成
|
||||
doReCreate(e) {
|
||||
console.log(e)
|
||||
|
@ -5,7 +5,8 @@
|
||||
"mp-toptips": "weui-miniprogram/toptips/toptips",
|
||||
"down-progress": "/components/down-progress/down-progress",
|
||||
"mp-loading": "weui-miniprogram/loading/loading",
|
||||
"ad-popup": "/components/ad-popup/ad-popup"
|
||||
"ad-popup": "/components/ad-popup/ad-popup",
|
||||
"custom-tabbar": "/components/tabbar/custom-tabbar"
|
||||
},
|
||||
"navigationStyle": "custom"
|
||||
}
|
@ -1,95 +1,105 @@
|
||||
<view class="bg-title" style="padding-bottom: 60rpx;">
|
||||
<view class="custom-navbar" style="height: {{totalHeight}}px; padding-top: {{statusBarHeight}}px;justify-content: flex-start;color: white;">
|
||||
<view class="navbar-title">AI喵著</view>
|
||||
</view>
|
||||
<view style="padding: 0px 10px 10px 10px;">
|
||||
<view class="title-func">
|
||||
<view class="create-btn" bind:tap="createCopy">
|
||||
<view class="icon-add" style="width: 40rpx;height: 40rpx;"></view>
|
||||
<text style="margin-left: 20rpx;text-align: center;font-size: 40rpx;">创建软著</text>
|
||||
<view style="position: relative;display: flex;flex-direction: column;">
|
||||
<view class="bg-title" style="position: absolute;height: 500rpx;width: 100vw;"></view>
|
||||
<view style="position: relative;top:0;left:0;">
|
||||
<view class="title-box" id="title-box">
|
||||
<view class="custom-navbar" style="height: {{totalHeight}}px; padding-top: {{statusBarHeight}}px;justify-content: flex-start;color: white;">
|
||||
<view class="navbar-title">AI喵著</view>
|
||||
</view>
|
||||
<view class="buy-btn" bind:tap="goPayment">充值</view>
|
||||
</view>
|
||||
<view class="notice-box">
|
||||
<view class="icon icon-horn-ind"></view>
|
||||
<view class="marquee-container">
|
||||
<view class="marquee-text">{{noticeContent}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-box">
|
||||
<view class="container-title">
|
||||
<view class="container-box">
|
||||
<view class="list-title-box">
|
||||
<view class="list-title-txt">软著列表</view>
|
||||
<view class="list-title-btns">
|
||||
<view bind:tap="doChangeStatus" data-value="PROCESSING" class="{{currentStatus=='PROCESSING'? 'btn-select':'btn-normal'}} border-left">进行中的</view>
|
||||
<view bind:tap="doChangeStatus" data-value="COMPLETE" class="{{currentStatus=='COMPLETE'? 'btn-select':'btn-normal'}} border-right">已完成的</view>
|
||||
<view>
|
||||
<view class="title-func">
|
||||
<view class="create-btn" bind:tap="createCopy">
|
||||
<view class="icon-add" style="width: 40rpx;height: 40rpx;"></view>
|
||||
<text style="margin-left: 20rpx;text-align: center;font-size: 40rpx;">创建软著</text>
|
||||
</view>
|
||||
<view class="buy-btn" bind:tap="goPayment">充值</view>
|
||||
</view>
|
||||
<view class="notice-box">
|
||||
<view class="icon icon-horn-ind"></view>
|
||||
<view class="marquee-container">
|
||||
<view class="marquee-text">{{noticeContent}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-x="{{true}}" class="mt-20">
|
||||
<view class="list-tabs">
|
||||
<block wx:for="{{typeList}}" wx:key="index">
|
||||
<view class="{{currentType==item.value? 'tab-select' :'tab-normal'}} item-margin" bind:tap="doChangeType" data-value="{{item.value}}">
|
||||
<text>{{item.label}}</text>
|
||||
<view id="tab-box" class="container-title">
|
||||
<view class="container-box">
|
||||
<view class="list-title-box">
|
||||
<view class="list-title-txt">
|
||||
<view class="title-line"></view>
|
||||
<view style="margin-left: 8rpx;">软著列表</view>
|
||||
</view>
|
||||
</block>
|
||||
<view class="divider-h"></view>
|
||||
<block wx:for="{{expandList}}" wx:key="index">
|
||||
<view class="{{currentExpand==item.value? 'tab-select' :'tab-normal'}} item-margin" bind:tap="doChangeExpand" data-value="{{item.value}}">
|
||||
<text>{{item.label}}</text>
|
||||
</view>
|
||||
</block>
|
||||
<view class="divider-h"></view>
|
||||
<block wx:for="{{tagList}}" wx:key="index">
|
||||
<view class="{{currentTag==item.key? 'tab-select' :'tab-normal'}} item-margin" bind:tap="doChangeTag" data-value="{{item.key}}">
|
||||
<text>{{item.value}}</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<container-loading loadingState="{{listLoading}}" style="height: {{contentHeight+110}}rpx;" bindrefresh="doRefreshList">
|
||||
<scroll-view scroll-y="{{true}}" style="height: {{contentHeight+110}}rpx;" bindrefresherrefresh="doRefreshList" refresher-enabled refresher-triggered="{{listRefreshTrig}}" bindscrolltolower="doLoadMore" lower-threshold='30'>
|
||||
<view class="list-content">
|
||||
<block wx:for="{{projectList}}" wx:key="index">
|
||||
<view class="list-item">
|
||||
<view class="item-img">
|
||||
<swiper class="cover" autoplay>
|
||||
<block wx:for="{{item.codeTypePage.previewImgs}}" wx:for-item="imgItem" wx:for-index="imgIndex" wx:key="imgIndex">
|
||||
<swiper-item class="cover">
|
||||
<image class="cover" src="{{imgItem}}"></image>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
<view class="item-img-status">
|
||||
<text>{{tools.status(item.generate.generateStatus)}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-content">
|
||||
<view class="item-content-title">
|
||||
<view class="project-name single-line">{{item.projName}}</view>
|
||||
<view class="project-status">{{item.pay.servicePackageId != '' ? '套餐包':item.pay.charge}}</view>
|
||||
</view>
|
||||
<view class="project-aff">
|
||||
<view class="icon icon-user-ind"></view>
|
||||
<text class="txt">{{item.apply.applyContactName}}</text>
|
||||
</view>
|
||||
<view class="project-btns">
|
||||
<view class="project-create-time">{{item.gmtCreate}}</view>
|
||||
<view wx:if="{{item.generate.generateStatus=='SUCCESS'}}" class="project-btn" bind:tap="doShowDownload" data-value="{{item}}">下载</view>
|
||||
<view wx:if="{{item.generate.generateStatus=='FAILED'}}" class="project-re-btn" bind:tap="doReCreate" data-value="{{item}}">重新生成</view>
|
||||
</view>
|
||||
<view class="list-title-btns">
|
||||
<view bind:tap="doChangeStatus" data-value="PROCESSING" class="{{currentStatus=='PROCESSING'? 'btn-select':'btn-normal'}} border-left">进行中的</view>
|
||||
<view bind:tap="doChangeStatus" data-value="COMPLETE" class="{{currentStatus=='COMPLETE'? 'btn-select':'btn-normal'}} border-right">已完成的</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<mp-loading show="{{isLoadMore}}" type="circle"></mp-loading>
|
||||
<scroll-view scroll-x="{{true}}" class="mt-20">
|
||||
<view class="list-tabs">
|
||||
<block wx:for="{{typeList}}" wx:key="index">
|
||||
<view class="{{currentType==item.value? 'tab-select' :'tab-normal'}} item-margin" bind:tap="doChangeType" data-value="{{item.value}}">
|
||||
<text>{{item.label}}</text>
|
||||
</view>
|
||||
</block>
|
||||
<view class="divider-h"></view>
|
||||
<block wx:for="{{expandList}}" wx:key="index">
|
||||
<view class="{{currentExpand==item.value? 'tab-select' :'tab-normal'}} item-margin" bind:tap="doChangeExpand" data-value="{{item.value}}">
|
||||
<text>{{item.label}}</text>
|
||||
</view>
|
||||
</block>
|
||||
<view class="divider-h"></view>
|
||||
<block wx:for="{{tagList}}" wx:key="index">
|
||||
<view class="{{currentTag==item.key? 'tab-select' :'tab-normal'}} item-margin" bind:tap="doChangeTag" data-value="{{item.key}}">
|
||||
<text>{{item.value}}</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</container-loading>
|
||||
</view>
|
||||
<view class="content-box">
|
||||
<container-loading loadingState="{{listLoading}}" style="height:{{contentHeight}}rpx;" bindrefresh="doRefreshList">
|
||||
<scroll-view scroll-y="{{true}}" style="height: {{contentHeight}}rpx;" bindrefresherrefresh="doRefreshList" refresher-enabled refresher-triggered="{{listRefreshTrig}}" bindscrolltolower="doLoadMore" lower-threshold='30'>
|
||||
<view class="list-content">
|
||||
<block wx:for="{{projectList}}" wx:key="index">
|
||||
<view class="list-item">
|
||||
<view class="item-img">
|
||||
<swiper class="cover" autoplay>
|
||||
<block wx:for="{{item.codeTypePage.previewImgs}}" wx:for-item="imgItem" wx:for-index="imgIndex" wx:key="imgIndex">
|
||||
<swiper-item class="cover">
|
||||
<image class="cover" mode="scaleToFill" src="{{imgItem}}"></image>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
<view class="item-img-status {{tools.statusColor(item.generate.generateStatus,item.aiSetting.settingStatus)}}">
|
||||
<text>{{tools.status(item.generate.generateStatus,item.aiSetting.settingStatus)}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-content">
|
||||
<view class="item-content-title">
|
||||
<view class="project-name single-line">{{item.projName}}</view>
|
||||
<view class="project-status">{{item.pay.servicePackageId != '' ? '套餐包':item.pay.charge}}</view>
|
||||
</view>
|
||||
<view class="project-aff">
|
||||
<view class="icon icon-user-ind"></view>
|
||||
<text class="txt">{{item.apply.applyContactName}}</text>
|
||||
</view>
|
||||
<view class="project-btns">
|
||||
<view class="project-create-time">{{item.gmtCreate}}</view>
|
||||
<view wx:if="{{item.generate.generateStatus=='SUCCESS'}}" class="project-btn" bind:tap="doShowDownload" data-value="{{item}}">下载</view>
|
||||
<view wx:if="{{item.generate.generateStatus=='FAILED'}}" class="project-re-btn" bind:tap="doReCreate" data-value="{{item}}">重新生成</view>
|
||||
<view wx:if="{{item.aiSetting.settingStatus=='NONE'}}" class="project-btn" bind:tap="doCreatePro" data-value="{{item}}">生成</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<mp-loading show="{{isLoadMore}}" type="circle"></mp-loading>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</container-loading>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<custom-tabbar tabList="{{tabList}}" color="{{color}}" selectedColor="{{selectedColor}}"></custom-tabbar>
|
||||
<mp-half-screen-dialog show="{{showDownload}}" ext-class="custom-dialog">
|
||||
<view slot="title" style="font-size: 16px;font-weight: bold;">资料下载</view>
|
||||
<view slot="desc" style="margin-top: 10px;">
|
||||
|
@ -9,18 +9,24 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20rpx;
|
||||
margin-top: -50rpx;
|
||||
margin-left: 20rpx;
|
||||
margin-right: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-left: 30rpx;
|
||||
margin-right: 30rpx;
|
||||
border-bottom-left-radius: 10rpx;
|
||||
border-bottom-right-radius: 10rpx;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(206, 206, 206, 0.4);
|
||||
box-shadow: 0rpx 2rpx 6rpx 0rpx rgba(206, 206, 206, 0.6);
|
||||
}
|
||||
|
||||
.container-title {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.title-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
padding: 0rpx 30rpx;
|
||||
}
|
||||
|
||||
.title-func {
|
||||
@ -91,13 +97,27 @@
|
||||
.container-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: white;
|
||||
padding: 20rpx;
|
||||
border-top-left-radius: 10rpx;
|
||||
border-top-right-radius: 10rpx;
|
||||
margin-top: 20rpx;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
box-shadow: 0rpx -6rpx 6rpx 0rpx rgba(206, 206, 206, 0.1);
|
||||
}
|
||||
|
||||
.list-title-box {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.title-line {
|
||||
width: 10rpx;
|
||||
height: 32rpx;
|
||||
border-radius: 17rpx;
|
||||
background-color: rgba(255, 169, 0, 1);
|
||||
}
|
||||
|
||||
.list-title-txt {
|
||||
@ -106,6 +126,10 @@
|
||||
font-size: 16px;
|
||||
font-family: TaipeiHei-bold;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.list-title-btns {
|
||||
@ -189,6 +213,7 @@
|
||||
background-color: #F7F7F7;
|
||||
border-radius: 2px;
|
||||
padding: 5px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.list-item:nth-of-type(n+2) {
|
||||
@ -203,31 +228,50 @@
|
||||
}
|
||||
|
||||
.item-img .cover {
|
||||
width: 95px;
|
||||
height: 68px;
|
||||
width: 210rpx;
|
||||
height: 136rpx;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.item-img-status {
|
||||
background-color: #AFE5C7;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 95px;
|
||||
width: 210rpx;
|
||||
font-size: 24rpx;
|
||||
border-bottom-left-radius: 2px;
|
||||
border-bottom-right-radius: 2px;
|
||||
}
|
||||
|
||||
.status-gray {
|
||||
background-color: #adadadc0;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.status-green {
|
||||
background-color: #AFE5C7;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.status-yellow {
|
||||
background-color: #fe9844c0;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.status-red {
|
||||
background-color: #FF0000C0;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.item-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
flex: 1;
|
||||
height: 72px;
|
||||
padding-left: 16px;
|
||||
width: 90vw;
|
||||
padding-left: 16rpx;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.item-content-title {
|
||||
@ -235,7 +279,6 @@
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 59vw;
|
||||
}
|
||||
|
||||
|
||||
@ -245,6 +288,10 @@
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
flex: 1;
|
||||
display: block;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.project-status {
|
||||
@ -254,12 +301,14 @@
|
||||
flex: .3;
|
||||
padding-left: 5px;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.item-content-title {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.project-aff {
|
||||
@ -287,7 +336,6 @@
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
width: 57vw;
|
||||
}
|
||||
|
||||
.project-create-time {
|
||||
@ -296,7 +344,7 @@
|
||||
}
|
||||
|
||||
.project-btn {
|
||||
font-size: 28rpx;
|
||||
font-size: 24rpx;
|
||||
background-color: #FE9944;
|
||||
color: white;
|
||||
padding: 2px 10px;
|
||||
@ -505,5 +553,5 @@
|
||||
|
||||
.weui-half-screen-dialog__ft {
|
||||
height: 0;
|
||||
padding: 0;
|
||||
/* padding: 0; */
|
||||
}
|
@ -128,11 +128,11 @@ Page({
|
||||
Cache.set("token", res.accessToken);
|
||||
//创建所属人
|
||||
if (res.phone && res.phone != '') {
|
||||
//判断是否存在所属人
|
||||
_self.setData({
|
||||
phone: res.phone
|
||||
})
|
||||
_self.doUpdateUserInfo('')
|
||||
_self.doGetCsaNo()
|
||||
_self.doGetMineContact()
|
||||
} else {
|
||||
//获取客服编号
|
||||
wx.switchTab({
|
||||
@ -153,6 +153,34 @@ Page({
|
||||
_self.doShowExit()
|
||||
}
|
||||
},
|
||||
//判断是否需要创建联系人
|
||||
doGetMineContact() {
|
||||
wx.showLoading({
|
||||
title: '加载中...',
|
||||
})
|
||||
const data = {
|
||||
page: 1,
|
||||
rows: 2
|
||||
}
|
||||
UserApi.doGetMineContactList(data)
|
||||
.then(res => {
|
||||
wx.hideLoading()
|
||||
if (res.rows && res.rows.length <= 0) {
|
||||
//需要创建
|
||||
_self.doUpdateUserInfo('')
|
||||
_self.doGetCsaNo()
|
||||
} else {
|
||||
//无需创建
|
||||
wx.switchTab({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
wx.hideLoading()
|
||||
_self.doShowExit()
|
||||
})
|
||||
},
|
||||
//创建用户
|
||||
doUpdateUserInfo(name) {
|
||||
const _self = this
|
||||
|
File diff suppressed because one or more lines are too long
@ -179,7 +179,7 @@ Page({
|
||||
if (_self.data.contactPhone == '' || !isValidPhone(_self.data.contactPhone)) {
|
||||
_self.setData({
|
||||
showError: true,
|
||||
errorHint: '请输入合法的联系电话'
|
||||
errorHint: '请输入正确的联系电话'
|
||||
})
|
||||
return
|
||||
}
|
||||
@ -187,7 +187,7 @@ Page({
|
||||
if (!isValidEmail(_self.data.contactEmail)) {
|
||||
_self.setData({
|
||||
showError: true,
|
||||
errorHint: '请输入合法的邮箱'
|
||||
errorHint: '请输入正确的邮箱'
|
||||
})
|
||||
return
|
||||
}
|
||||
@ -240,7 +240,7 @@ Page({
|
||||
if (_self.data.contactPhone == '' || !isValidPhone(_self.data.contactPhone)) {
|
||||
_self.setData({
|
||||
showError: true,
|
||||
errorHint: '请输入合法的联系电话'
|
||||
errorHint: '请输入正确的联系电话'
|
||||
})
|
||||
return
|
||||
}
|
||||
@ -248,7 +248,7 @@ Page({
|
||||
if (!isValidEmail(_self.data.contactEmail)) {
|
||||
_self.setData({
|
||||
showError: true,
|
||||
errorHint: '请输入合法的邮箱'
|
||||
errorHint: '请输入正确的邮箱'
|
||||
})
|
||||
return
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
<view class="contact-desc">
|
||||
<view class="contact-icon">
|
||||
<view class="ic-user" style="width: 24px;height: 24px;"></view>
|
||||
<view class="ml-10">{{item.name}}</view>
|
||||
<view class="ml-10 name">{{item.name}}</view>
|
||||
</view>
|
||||
<view>{{item.phone}}</view>
|
||||
<view class="options-box">
|
||||
@ -41,25 +41,25 @@
|
||||
<view class="form-box">
|
||||
<view class="form-item">
|
||||
<view class="form-item-title">姓名</view>
|
||||
<input adjust-position="{{true}}" cursor-spacing="{{50}}" value="{{contactName}}" placeholder="请输入联系人姓名" class="form-item-content" bindinput="inputContactName" />
|
||||
<input adjust-position="{{true}}" cursor-spacing="{{50}}" value="{{contactName}}" placeholder="请输入姓名" class="form-item-content" bindinput="inputContactName" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<view class="form-item-title">联系电话</view>
|
||||
<input adjust-position="{{true}}" cursor-spacing="{{50}}" value="{{contactPhone}}" placeholder="请输入联系电话" class="form-item-content" bindinput="inputContactPhone" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<view class="form-item-title no-after">联系邮箱</view>
|
||||
<input adjust-position="{{true}}" cursor-spacing="{{50}}" value="{{contactEmail}}" placeholder="请输入邮箱" class="form-item-content" bindinput="inputContactEmail" />
|
||||
<view class="form-item-title no-after" style="padding-left: 16rpx;">联系邮箱</view>
|
||||
<input adjust-position="{{true}}" cursor-spacing="{{50}}" value="{{contactEmail}}" placeholder="请输入联系邮箱" class="form-item-content" bindinput="inputContactEmail" />
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<view class="form-item-title no-after">公司</view>
|
||||
<view class="form-item-title no-after" style="padding-left: 16rpx;">公司</view>
|
||||
<input adjust-position="{{true}}" cursor-spacing="{{50}}" value="{{contactCompany}}" placeholder="请输入公司名称" class="form-item-content" bindinput="inputContactCompany" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view slot="footer">
|
||||
<button wx:if="{{isCreate}}" type="primary" bind:tap="doSaveContact">{{btnTxt}}</button>
|
||||
<button wx:if="{{!isCreate}}" type="primary" bind:tap="doEditContact">{{btnTxt}}</button>
|
||||
<button wx:if="{{isCreate}}" class="confirm-btn" bind:tap="doSaveContact">{{btnTxt}}</button>
|
||||
<button wx:if="{{!isCreate}}" class="confirm-btn" bind:tap="doEditContact">{{btnTxt}}</button>
|
||||
</view>
|
||||
</mp-half-screen-dialog>
|
||||
|
||||
|
@ -17,10 +17,12 @@ page {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 97vw;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
align-self: center;
|
||||
width: 96vw;
|
||||
}
|
||||
|
||||
.search-container {
|
||||
@ -29,7 +31,7 @@ page {
|
||||
border-radius: 5px;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
font-family: -regular;
|
||||
margin: 10px;
|
||||
margin: 10px 15px;
|
||||
padding: 5px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@ -114,6 +116,15 @@ page {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.name {
|
||||
line-height: 23rpx;
|
||||
color: rgba(0, 0, 0, 1);
|
||||
font-size: 32rpx;
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
font-family: SourceHanSansSC-black;
|
||||
}
|
||||
|
||||
.service-desc {
|
||||
padding: 0px 15px 15px 15px;
|
||||
line-height: 20px;
|
||||
@ -128,10 +139,10 @@ page {
|
||||
border-radius: 4px;
|
||||
background-color: rgba(122, 196, 131, 0.42);
|
||||
color: rgba(255, 255, 255, 1);
|
||||
font-size: 14px;
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
font-family: PingFangSC-regular;
|
||||
padding: 5px 15px;
|
||||
padding: 5rpx 10rpx;
|
||||
}
|
||||
|
||||
.del {
|
||||
@ -139,10 +150,10 @@ page {
|
||||
border-radius: 4px;
|
||||
background-color: rgba(247, 49, 42, 0.42);
|
||||
color: rgba(255, 255, 255, 1);
|
||||
font-size: 14px;
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
font-family: PingFangSC-regular;
|
||||
padding: 5px 15px;
|
||||
padding: 5rpx 10rpx;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
@ -188,7 +199,7 @@ page {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.form-item-title:not(.no-after)::after {
|
||||
.form-item-title:not(.no-after)::before {
|
||||
content: "*";
|
||||
color: red;
|
||||
font-size: 14px;
|
||||
@ -198,4 +209,23 @@ page {
|
||||
|
||||
.form-item-content {
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.confirm-btn {
|
||||
background-color: green;
|
||||
color: white;
|
||||
font-size: 16px;
|
||||
height: 40px;
|
||||
border-radius: 5px;
|
||||
text-align: center;
|
||||
width: 85vw !important;
|
||||
}
|
||||
|
||||
.weui-half-screen-dialog__ft {
|
||||
/* padding: 0rpx; */
|
||||
}
|
||||
|
||||
.weui-half-screen-dialog__bd {
|
||||
padding-bottom: 40rpx;
|
||||
}
|
@ -5,41 +5,39 @@
|
||||
<view wx:if="{{keywords !=''}}" bind:tap="clearSearch" class="icon-clear" style="width: 20px;height: 20px;"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-container">
|
||||
<container-loading loadingState="{{loadingState}}" style="height: 85vh;" bindrefresh="doRefreshList">
|
||||
<scroll-view scroll-y="{{true}}" style="height: 85vh;" bindrefresherrefresh="doRefreshList" refresher-enabled refresher-triggered="{{listRefreshTrig}}" bindscrolltolower="doLoadMore" lower-threshold='30'>
|
||||
<view class="order-box" style="padding-bottom: 30px;">
|
||||
<block wx:for="{{orderList}}" wx:key="index">
|
||||
<view class="order-item">
|
||||
<view class="order-title">
|
||||
<view class="order-no">订单号:{{item.orderNo}}</view>
|
||||
<view class="order-status">{{tools.orderStatus(item.orderStatus)}}</view>
|
||||
</view>
|
||||
<block wx:for="{{item.orderDetails}}" wx:for-item="detail" wx:for-index="dIndex" wx:key="dIndex">
|
||||
<view class="order-content">
|
||||
<view class="order-caption">{{detail.productName}}</view>
|
||||
<view class="order-types">
|
||||
<view class="or-type">{{tools.proType(detail.productType)}}</view>
|
||||
<view class="or-count">数量{{detail.quantity}}</view>
|
||||
<view class="or-price">单价{{detail.unitPrice/100}}</view>
|
||||
<view class="or-total">总金额{{item.totalAmount/100}}</view>
|
||||
</view>
|
||||
<view class="order-remark-box">
|
||||
<view class="order-remark-title">订单备注</view>
|
||||
<view class="order-remark-content">{{detail.notes}}</view>
|
||||
</view>
|
||||
<view class="order-remark-box">
|
||||
<view class="order-remark-title">商品描述</view>
|
||||
<view class="order-remark-content">{{detail.productDescription}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<container-loading loadingState="{{loadingState}}" style="height: 85vh;margin-top: 80rpx;" bindrefresh="doRefreshList">
|
||||
<scroll-view scroll-y="{{true}}" style="height: 85vh;" bindrefresherrefresh="doRefreshList" refresher-enabled refresher-triggered="{{listRefreshTrig}}" bindscrolltolower="doLoadMore" lower-threshold='30'>
|
||||
<view class="order-box">
|
||||
<block wx:for="{{orderList}}" wx:key="index">
|
||||
<view class="order-item">
|
||||
<view class="order-title">
|
||||
<view class="order-no">订单号:{{item.orderNo}}</view>
|
||||
<view class="order-status">{{tools.orderStatus(item.orderStatus)}}</view>
|
||||
</view>
|
||||
</block>
|
||||
<mp-loading show="{{isLoadMore}}" type="circle"></mp-loading>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</container-loading>
|
||||
</view>
|
||||
<block wx:for="{{item.orderDetails}}" wx:for-item="detail" wx:for-index="dIndex" wx:key="dIndex">
|
||||
<view class="order-content">
|
||||
<view class="order-caption">{{detail.productName}}</view>
|
||||
<view class="order-types">
|
||||
<view class="or-type">{{tools.proType(detail.productType)}}</view>
|
||||
<view class="or-count">数量{{detail.quantity}}</view>
|
||||
<view class="or-price">单价{{detail.unitPrice/100}}</view>
|
||||
<view class="or-total">总金额{{item.totalAmount/100}}</view>
|
||||
</view>
|
||||
<view class="order-remark-box">
|
||||
<view class="order-remark-title">订单备注</view>
|
||||
<view class="order-remark-content">{{detail.notes}}</view>
|
||||
</view>
|
||||
<view class="order-remark-box">
|
||||
<view class="order-remark-title">商品描述</view>
|
||||
<view class="order-remark-content">{{detail.productDescription}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</block>
|
||||
<mp-loading show="{{isLoadMore}}" type="circle"></mp-loading>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</container-loading>
|
||||
</view>
|
||||
<wxs src="../../../../utils/comm.wxs" module="tools"></wxs>
|
@ -1,6 +1,6 @@
|
||||
page {
|
||||
background: linear-gradient(to bottom, #F0F0F0, #FFFFFF);
|
||||
background-size: 100% 100vh;
|
||||
background-size: 100vw 100vh;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
@ -15,10 +15,10 @@ page {
|
||||
.search-container {
|
||||
position: relative;
|
||||
align-self: center;
|
||||
border-radius: 5px;
|
||||
border-radius: 5rpx;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
font-family: -regular;
|
||||
margin: 10px;
|
||||
margin: 20rpx 30rpx;
|
||||
padding: 5px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@ -51,6 +51,7 @@ page {
|
||||
.content-container {
|
||||
height: 86vh;
|
||||
margin-top: 50px;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
|
||||
@ -58,14 +59,13 @@ page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 100vw;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
|
||||
.order-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100vw;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.order-item:nth-of-type(n+2) {
|
||||
@ -77,9 +77,10 @@ page {
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 87vw;
|
||||
padding: 8px 17px;
|
||||
background-color: #7AC483;
|
||||
border-top-left-radius: 5rpx;
|
||||
border-top-right-radius: 5rpx;
|
||||
}
|
||||
|
||||
.order-no {
|
||||
@ -98,9 +99,10 @@ page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
background-color: white;
|
||||
padding: 17px;
|
||||
border-bottom-left-radius: 5rpx;
|
||||
border-bottom-right-radius: 5rpx;
|
||||
}
|
||||
|
||||
.order-caption {
|
||||
@ -116,7 +118,6 @@ page {
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 87vw;
|
||||
margin-top: 15px;
|
||||
}
|
||||
|
||||
@ -151,10 +152,8 @@ page {
|
||||
.order-remark-box {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
width: 87vw;
|
||||
}
|
||||
|
||||
.order-remark-title {
|
||||
@ -166,7 +165,7 @@ page {
|
||||
|
||||
.order-remark-content {
|
||||
color: rgba(16, 16, 16, 1);
|
||||
font-size: 10px;
|
||||
font-size: 20rpx;
|
||||
text-align: left;
|
||||
font-family: PingFangSC-light;
|
||||
border-radius: 5px;
|
||||
|
@ -1,5 +1,6 @@
|
||||
// pages/mine/mine.js
|
||||
import UserApi from '../../../net/api/userApi'
|
||||
import ProApi from '../../../net/api/projectApi'
|
||||
import {
|
||||
copyrightUrl
|
||||
} from '../../../net/http'
|
||||
@ -9,6 +10,9 @@ const deviceInfo = wx.getDeviceInfo()
|
||||
const screenInfo = wx.getWindowInfo();
|
||||
const statusBarHeight = screenInfo.statusBarHeight; // 状态栏高度
|
||||
const navBarHeight = deviceInfo.platform == 'IOS' ? 48 : 50; // 导航栏高度(iOS 为 44px,Android 为 48px)
|
||||
const tabBarHeight = screenInfo.screenHeight - (screenInfo.safeArea ? screenInfo.safeArea.bottom : 50);
|
||||
const screenHeight = screenInfo.screenHeight
|
||||
const screenWidth = screenInfo.screenWidth
|
||||
const windowHeight = screenInfo.windowHeight - navBarHeight - statusBarHeight; //可用内容高度
|
||||
Page({
|
||||
|
||||
@ -20,6 +24,9 @@ Page({
|
||||
navBarHeight: navBarHeight,
|
||||
totalHeight: navBarHeight, // 导航栏总高度
|
||||
contentHeight: windowHeight,
|
||||
screenHeight: screenHeight, //屏幕高度
|
||||
screenWidth: screenWidth, //屏幕宽度
|
||||
tabBarHeight: tabBarHeight, //tabbar高度
|
||||
allCount: 0,
|
||||
materialCount: 0,
|
||||
accountInfo: {},
|
||||
@ -49,6 +56,26 @@ Page({
|
||||
errorHint: '',
|
||||
animationData: {}, //刷新动画
|
||||
animation: null,
|
||||
tabList: [{
|
||||
"pagePath": "pages/index/index",
|
||||
"text": "首页",
|
||||
"iconPath": "/static/images/ic_home_normal.png",
|
||||
"selectedIconPath": "/static/images/ic_home_select.png",
|
||||
"selected": true
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/mine/mineIndex/mine",
|
||||
"text": "我的",
|
||||
"iconPath": "/static/images/ic_mine_normal.png",
|
||||
"selectedIconPath": "/static/images/ic_mine_select.png",
|
||||
"selected": false
|
||||
}
|
||||
],
|
||||
color: "#515151",
|
||||
selectedColor: "#FE9944",
|
||||
allPrice: 0, //全托管价格
|
||||
materialPrice: 0, //写材料价格
|
||||
urgent: 0, //加急价格
|
||||
},
|
||||
|
||||
/**
|
||||
@ -58,10 +85,6 @@ Page({
|
||||
const _self = this
|
||||
_self.getMineAccount()
|
||||
_self.getMinePackageCount()
|
||||
const h = Utils.pxToRpx(_self.data.contentHeight)
|
||||
_self.setData({
|
||||
contentHeight: h
|
||||
})
|
||||
// 创建一个动画实例
|
||||
const animation = wx.createAnimation({
|
||||
duration: 1000,
|
||||
@ -70,6 +93,125 @@ Page({
|
||||
this.setData({
|
||||
animation: animation
|
||||
})
|
||||
this.countViewHeight()
|
||||
this.doGetPrice()
|
||||
},
|
||||
//计算高度
|
||||
countViewHeight() {
|
||||
//
|
||||
const query = wx.createSelectorQuery();
|
||||
const _self = this
|
||||
// 指定要查询的 view 元素
|
||||
query.select('#func-box').boundingClientRect();
|
||||
query.exec((res) => {
|
||||
if (res[0]) {
|
||||
const height = res[0].height;
|
||||
//屏幕高度-内容高度-tabbar高度
|
||||
const contentHeight = _self.data.screenHeight - height - 50
|
||||
const h = Utils.pxToRpx(contentHeight, _self.data.screenWidth)
|
||||
const tempH = h - 140
|
||||
console.log('转后', h, '内容高度:', tempH)
|
||||
_self.setData({
|
||||
contentHeight: tempH
|
||||
})
|
||||
} else {
|
||||
console.log('未找到指定的 view 元素');
|
||||
}
|
||||
})
|
||||
},
|
||||
//跳转创建项目页面
|
||||
openCreate(e) {
|
||||
//计算价格
|
||||
const _self = this
|
||||
const type = e.currentTarget.dataset.type
|
||||
if (type == 'ALL') {
|
||||
if (_self.data.allCount > 0) {
|
||||
_self.doGetPackage(type)
|
||||
} else {
|
||||
//提示充值
|
||||
_self.setData({
|
||||
errorHint: '您的账户当前无套餐包,为正常使用请及时充值。',
|
||||
showError: true
|
||||
})
|
||||
}
|
||||
} else {
|
||||
if (_self.data.materialCount > 0) {
|
||||
_self.doGetPackage(type)
|
||||
} else {
|
||||
//提示充值
|
||||
_self.setData({
|
||||
errorHint: '您的账户当前无套餐包,为正常使用请及时充值。',
|
||||
showError: true
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
//获取套餐包详情
|
||||
doGetPackage(type) {
|
||||
const _self = this
|
||||
const data = {
|
||||
page: 1,
|
||||
rows: 10,
|
||||
packageType: type,
|
||||
keyong: 1,
|
||||
}
|
||||
ProApi.doGetPackageList(data)
|
||||
.then(res => {
|
||||
console.log(res.rows)
|
||||
if (res.rows && res.rows.length > 0) {
|
||||
const packageId = res.rows[0].packageInfoId
|
||||
const price = type == 'ALL' ? _self.data.allPrice : _self.data.materialPrice
|
||||
wx.navigateTo({
|
||||
url: '../../copyright/createProjectInfo/createProjectInfo?type=' + type + '&price=' + price + '&isUrgent=false&pId=' + packageId,
|
||||
})
|
||||
} else {
|
||||
_self.setData({
|
||||
errorHint: '您的账户当前无套餐包,为正常使用请及时充值。',
|
||||
showError: true
|
||||
})
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
_self.setData({
|
||||
errorHint: '获取套餐包失败,请稍后重试',
|
||||
showError: true
|
||||
})
|
||||
})
|
||||
},
|
||||
//获取单价
|
||||
doGetPrice() {
|
||||
wx.showLoading({
|
||||
title: '加载中...',
|
||||
})
|
||||
const _self = this
|
||||
ProApi.doGetPrice()
|
||||
.then(res => {
|
||||
wx.hideLoading()
|
||||
console.log(res)
|
||||
res.projTypes.forEach(el => {
|
||||
if (el.type == 'ALL') {
|
||||
_self.setData({
|
||||
allPrice: el.price
|
||||
})
|
||||
} else if (el.type == 'MATERIAL') {
|
||||
_self.setData({
|
||||
materialPrice: el.price
|
||||
})
|
||||
}
|
||||
});
|
||||
_self.setData({
|
||||
urgent: res.additional.urgent, //加急办理
|
||||
})
|
||||
}, err => {
|
||||
wx.hideLoading()
|
||||
wx.showToast({
|
||||
title: '数据有误,请稍后重试',
|
||||
icon: 'error',
|
||||
success: () => {
|
||||
wx.navigateBack()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
//刷新账户
|
||||
doRefresh() {
|
||||
@ -77,6 +219,7 @@ Page({
|
||||
_self.playAnimation()
|
||||
_self.getMineAccount() //获取账户信息
|
||||
_self.getMinePackageCount() //获取套餐包信息
|
||||
_self.doGetPrice() //获取单价
|
||||
},
|
||||
//播放刷新动画
|
||||
playAnimation() {
|
||||
@ -101,6 +244,15 @@ Page({
|
||||
}, 1100);
|
||||
},
|
||||
onShow(options) {
|
||||
const pages = getCurrentPages();
|
||||
const currentPage = pages[pages.length - 1];
|
||||
const tabList = this.data.tabList;
|
||||
tabList.forEach(item => {
|
||||
item.selected = item.pagePath === currentPage.route;
|
||||
});
|
||||
this.setData({
|
||||
tabList
|
||||
});
|
||||
this.getMineAccount() //获取账户信息
|
||||
this.getMinePackageCount() //获取套餐包信息
|
||||
},
|
||||
|
@ -1,7 +1,8 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"mp-dialog": "weui-miniprogram/dialog/dialog",
|
||||
"mp-toptips": "weui-miniprogram/toptips/toptips"
|
||||
"mp-toptips": "weui-miniprogram/toptips/toptips",
|
||||
"custom-tabbar": "/components/tabbar/custom-tabbar"
|
||||
},
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": true
|
||||
|
@ -1,10 +1,10 @@
|
||||
<view class="bg-container">
|
||||
<image class="bg-image" src="/static/images/bg_mine.png"></image>
|
||||
<view class="content-container">
|
||||
<view class="custom-navbar" style="height: {{totalHeight}}px; padding-top: {{statusBarHeight}}px;justify-content: center;">
|
||||
<view class="navbar-title" style="color:#532A00;">AI喵著</view>
|
||||
</view>
|
||||
<view class="container-content">
|
||||
<view id="func-box" style="padding: 0rpx 30rpx;">
|
||||
<view class="custom-navbar" style="height: {{totalHeight}}px; padding-top: {{statusBarHeight}}px;justify-content: center;">
|
||||
<view class="navbar-title" style="color:#532A00;">AI喵著</view>
|
||||
</view>
|
||||
<view class="container-box">
|
||||
<view class="box-up">
|
||||
<view class="balance" bind:tap="doRefresh">
|
||||
@ -19,11 +19,11 @@
|
||||
<view class="box-down">
|
||||
<view>套餐包余额</view>
|
||||
<view class="package-bag">
|
||||
<view class="package-bag-item">
|
||||
<view class="package-bag-item" bind:tap="openCreate" data-type="ALL">
|
||||
<text class="title">全托管</text>
|
||||
<text class="num">{{allCount}}</text>
|
||||
</view>
|
||||
<view class="package-bag-item">
|
||||
<view class="package-bag-item" bind:tap="openCreate" data-type="MATERIAL">
|
||||
<text class="title">写材料</text>
|
||||
<text class="num">{{materialCount}}</text>
|
||||
</view>
|
||||
@ -34,22 +34,23 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="menu-box" style="height: {{contentHeight+190}}rpx;">
|
||||
<scroll-view scroll-y style="height: {{contentHeight+190}}rpx;">
|
||||
<view class="menu-container">
|
||||
<block wx:for="{{menuList}}" wx:key="index">
|
||||
<view class="menu-item" bind:tap="itemClick" hover-class="menu-item-active" data-path="{{item.path}}">
|
||||
<view class="{{item.icon}}"></view>
|
||||
<view class="menu-title">{{item.title}}</view>
|
||||
</view>
|
||||
<view class="divider-padding"></view>
|
||||
</block>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="menu-box" style="height: {{contentHeight}}rpx;">
|
||||
<scroll-view scroll-y style="height: {{contentHeight}}rpx;">
|
||||
<view class="menu-container">
|
||||
<block wx:for="{{menuList}}" wx:key="index">
|
||||
<view class="menu-item" bind:tap="itemClick" hover-class="menu-item-active" data-path="{{item.path}}">
|
||||
<view class="{{item.icon}}"></view>
|
||||
<view class="menu-title">{{item.title}}</view>
|
||||
</view>
|
||||
<view class="divider-padding"></view>
|
||||
</block>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<custom-tabbar tabList="{{tabList}}" color="{{color}}" selectedColor="{{selectedColor}}"></custom-tabbar>
|
||||
<mp-dialog title="提示" show="{{showHint}}" buttons="{{buttons}}" bindbuttontap="closeHint">
|
||||
<view style="color: black;">{{hintTxt}}</view>
|
||||
</mp-dialog>
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
.content-container {
|
||||
position: relative;
|
||||
padding: 0rpx 10rpx 10rpx 10rpx;
|
||||
z-index: 1;
|
||||
color: white;
|
||||
}
|
||||
@ -131,6 +130,8 @@
|
||||
background: white;
|
||||
border-radius: 20rpx;
|
||||
padding-top: 20rpx;
|
||||
margin-left: 30rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.menu-item {
|
||||
|
@ -3,21 +3,39 @@ var isEmpty = function (obj) {
|
||||
if (typeof obj !== 'object') return false;
|
||||
return JSON.stringify(obj) === '{}';
|
||||
};
|
||||
var status = function (value) {
|
||||
var status = '排队中...'
|
||||
switch (value) {
|
||||
case 'NONE':
|
||||
status = '排队中...'
|
||||
break
|
||||
case 'GENERATING':
|
||||
status = '生成中...'
|
||||
break
|
||||
case 'SUCCESS':
|
||||
status = '生成成功'
|
||||
break
|
||||
case 'FAILED':
|
||||
status = '生成失败'
|
||||
break
|
||||
//state=AiSetting, value=generate
|
||||
var status = function (value, state) {
|
||||
var status = '未生成'
|
||||
if (state == 'SUCCESS') {
|
||||
switch (value) {
|
||||
case 'NONE':
|
||||
status = '未生成'
|
||||
break
|
||||
case 'PENDING':
|
||||
status = '等待'
|
||||
break
|
||||
case 'GENERATING':
|
||||
status = '生成中...'
|
||||
break
|
||||
case 'SUCCESS':
|
||||
status = '生成成功'
|
||||
break
|
||||
case 'FAILED':
|
||||
status = '生成失败'
|
||||
break
|
||||
}
|
||||
} else {
|
||||
switch (state) {
|
||||
case 'FAILED':
|
||||
status = '生成失败'
|
||||
break
|
||||
case 'GENERATING':
|
||||
status = '生成中...'
|
||||
break
|
||||
case 'NONE':
|
||||
status = '未生成'
|
||||
break
|
||||
}
|
||||
}
|
||||
return status
|
||||
};
|
||||
@ -42,6 +60,37 @@ var orderStatus = function (value) {
|
||||
}
|
||||
return statusStr
|
||||
};
|
||||
var statusColor = function (value, state) {
|
||||
var color = 'status-gray'
|
||||
if (state == 'SUCCESS') {
|
||||
switch (value) {
|
||||
case 'NONE':
|
||||
case 'PENDING':
|
||||
color = 'status-gray'
|
||||
break
|
||||
case 'GENERATING':
|
||||
case 'SUCCESS':
|
||||
color = 'status-green'
|
||||
break
|
||||
case 'FAILED':
|
||||
color = 'status-red'
|
||||
break
|
||||
}
|
||||
} else {
|
||||
switch (state) {
|
||||
case 'GENERATING':
|
||||
color = 'status-green'
|
||||
break
|
||||
case 'FAILED':
|
||||
color = 'status-red'
|
||||
break
|
||||
case 'NONE':
|
||||
color = 'status-gray'
|
||||
break
|
||||
}
|
||||
}
|
||||
return color
|
||||
}
|
||||
var proType = function (value) {
|
||||
// PROJ:项目、AGENT:代理、FULL_REFUND:全额退款、CORRECTION1_REFUND:补正1次退款、CORRECTION2_REFUND:补正2次退款
|
||||
var str = '项目创建'
|
||||
@ -109,5 +158,6 @@ module.exports = {
|
||||
proType: proType,
|
||||
boderStyle: boderStyle,
|
||||
fontColor: fontColor,
|
||||
timeSplit: timeSplit
|
||||
timeSplit: timeSplit,
|
||||
statusColor: statusColor
|
||||
};
|
@ -62,8 +62,11 @@ const dateTimePicker = (startYear, endYear) => {
|
||||
};
|
||||
}
|
||||
|
||||
const pxToRpx = (pxValue) => {
|
||||
return (pxValue / 750) * 750;
|
||||
const pxToRpx = (pxValue, screenWidth) => {
|
||||
console.log('转换Px', pxValue, '屏幕宽度', screenWidth)
|
||||
// return pxValue * (750 / screenWidth);
|
||||
const rpx = (750 / screenWidth) * Number(pxValue)
|
||||
return Math.floor(rpx);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user