产品等修复

master
yujialong 3 years ago
parent a0bde60175
commit 8813740799
  1. 6
      apis/modules/user.js
  2. 2
      config/product.js
  3. 5
      pages/clientDetail/clientDetail.vue
  4. 39
      pages/detail/detail.vue
  5. 2
      pages/editCourse/editCourse.vue
  6. 20
      pages/index/index.vue
  7. 33
      pages/orderDetail/orderDetail.vue
  8. 37
      pages/password/password.vue
  9. 16
      pages/qrcode/qrcode.vue
  10. 6
      pages/setting/setting.vue
  11. 1
      styles/common.scss

@ -8,3 +8,9 @@ export const login = (data) => {
export const userBinding = (data) => {
return post('users/users/user/userBinding', data)
}
export const examinePassword = (data) => {
return post('users/users/userAccount/examinePassword', data)
}
export const updateUserAvatars = `http://39.108.250.202:9000/users/users/userAccount/updateUserAvatars`

@ -5,5 +5,5 @@
*/
export default {
normalIcon: 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220609/png/1534733700683030528.png'
normalIcon: 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220609/png/1534733700683030528.png' // 通用图标
}

@ -282,7 +282,8 @@
<style scoped lang="scss">
.page {
padding-bottom: 150rpx;
height: calc(100vh - 120rpx - env(safe-area-inset-bottom));
overflow: auto;
}
.info {
.name {
@ -294,7 +295,7 @@
.action {
z-index: 2;
position: fixed;
bottom: 0;
bottom: env(safe-area-inset-bottom);
display: flex;
justify-content: space-around;
width: 100%;

@ -27,9 +27,46 @@
const pages = getCurrentPages()
const { options } =
this.src = `http://view.xdocin.com/xdoc?_xdoc=${this.files[pages[pages.length - 1].options.id]}`
// this.preview()
},
methods: {
preview() {
uni.showLoading({
title: '加载中',
mask: true
})
//
uni.downloadFile({
url: this.src,
success: function(res) {
console.log('downloadFile ==> ',res)
uni.hideLoading();
var filePath = res.tempFilePath;
uni.showLoading({
title: '正在打开',
mask: true
})
// doc, xls, ppt, pdf, docx, xlsx, pptx
uni.openDocument({
filePath: filePath,
fileType: 'docx',// doc, xls, ppt, pdf, docx, xlsx, pptx
// showMenu: true, //
success: res => {
uni.hideLoading();
console.log('打开文档成功',res);
},
fail: openError => {
uni.hideLoading();
console.log('fail:' + JSON.stringify(openError));
}
});
},
fail: function(err) {
uni.hideLoading();
console.log('fail:' + JSON.stringify(err));
}
});
}
}
}
</script>

@ -309,7 +309,7 @@
<style scoped lang="scss">
.page {
height: calc(100vh - 140rpx);
height: calc(100vh - 140rpx - env(safe-area-inset-bottom));
overflow: auto;
}
.block {

@ -2,7 +2,7 @@
<view class="page">
<image class="bg" src="@/static/image/index/index2.png" mode="widthFix"></image>
<view class="team">
<uni-data-picker class="picker-input" placeholder="切换团队" popup-title="切换团队" preload :clear-icon="false" :localdata="list" :map="{text: 'partnerClassificationName', value: 'partnerId'}" v-model="partnerId" @change="teamChange"></uni-data-picker>
<uni-data-picker class="picker-input" placeholder="切换团队" popup-title="切换团队" preload :clear-icon="false" :localdata="list" :map="{text: 'partnerClassificationName', value: 'teamId'}" v-model="teamId" @change="teamChange"></uni-data-picker>
</view>
<view class="banner">
@ -107,7 +107,7 @@
export default {
data() {
return {
partnerId: this.$util.getBmId() || '',
teamId: uni.getStorageSync('team').teamId || '',
list: [],
id: '',
teamList: []
@ -125,12 +125,11 @@
treeList().then(({ treeList }) => {
this.teamList = treeList
this.getId(treeList, '', data[0].teamId)
data[0].teamId = this.id
// id()
getTheBusinessManagerIdsUnderTheTeam(this.id).then(res => {
this.id && getTheBusinessManagerIdsUnderTheTeam(this.id).then(res => {
data[0].businessManagerIds = res
//
this.partnerId = data[0].partnerId
this.teamId = data[0].teamId
uni.setStorageSync('team', data[0])
}).catch(e => {})
}).catch(e => {})
@ -150,15 +149,15 @@
},
//
teamChange() {
const { partnerId } = this
const e = this.list.find(e => e.partnerId == partnerId)
const { teamId } = this
const e = this.list.find(e => e.teamId == teamId)
if (e) {
this.getId(this.teamList, '', e.teamId)
e.teamId = this.id
getTheBusinessManagerIdsUnderTheTeam(this.id).then(res => {
this.id && getTheBusinessManagerIdsUnderTheTeam(this.id).then(res => {
e.businessManagerIds = res
uni.setStorageSync('team', e)
}).catch(e => {})
}
},
//
toPanel(i) {
@ -173,6 +172,7 @@
position: relative;
min-height: 100%;
padding: 30rpx 22rpx;
box-sizing: border-box;
}
.bg {
z-index: -1;

@ -114,9 +114,9 @@
</view>
<view class="info">
总采购成本:
<text class="num num1">{{ purchase }}</text>
<text class="num num1">{{ form.purchaseCost }}</text>
总产品利润:
<text class="num"> {{ profit }}</text>
<text class="num"> {{ form.profit }}</text>
</view>
</view>
<view v-if="!isDetail" class="btn" @click="submit">提交</view>
@ -164,12 +164,13 @@
phone: '',
orderAmount: 0,
customerName: '',
profit: 0, //
purchaseCost: '', //
teamId: uni.getStorageSync('team').teamId,
businessManagerId: this.$util.getBmId()
},
courseList: {},
courses: [], //
purchase: 0,
profit: 0,
contract: { //
contractName: '', //
contractFile: '', //
@ -335,6 +336,9 @@
},
//
calcTotal() {
const { form } = this
//
if (!form.purchaseCost && !form.profit) {
let total = 0
const list = this.courses
let purchase = 0 //
@ -355,9 +359,10 @@
purchase += curPurchase
profit += +e.finalPrice - curPurchase
})
this.purchase = Math.round(purchase)
this.profit = Math.round(profit)
this.form.orderAmount = +this.purchase + +this.profit
form.purchaseCost = Math.round(purchase)
form.profit = Math.round(profit)
}
form.orderAmount = +form.purchaseCost + +form.profit
},
//
submit() {
@ -395,11 +400,11 @@
<style scoped lang="scss">
.page {
height: calc(100vh - 300rpx);
height: calc(100vh - 300rpx - env(safe-area-inset-bottom));
overflow: auto;
}
.show {
height: calc(100vh - 130rpx);
height: calc(100vh - 130rpx - env(safe-area-inset-bottom));
}
.pro-wrap {
position: relative;
@ -465,7 +470,7 @@
}
.bottom {
position: fixed;
bottom: 0;
bottom: env(safe-area-inset-bottom);
width: 100%;
}
/deep/.add-btn {
@ -498,7 +503,8 @@
font-size: 24rpx;
color: #666;
.num {
font-size: 30rpx;
margin: 0 5rpx;
font-size: 34rpx;
color: #007EFF;
}
}
@ -506,7 +512,8 @@
font-size: 24rpx;
color: #333;
.num {
font-size: 24rpx;
margin: 0 5rpx;
font-size: 32rpx;
color: #007EFF;
}
}
@ -517,7 +524,7 @@
width: 196rpx;
margin-left: 27rpx;
line-height: 80rpx;
font-size: 30rpx;
font-size: 32rpx;
text-align: center;
color: #fff;
border-radius: 10rpx;

@ -1,27 +1,49 @@
<template>
<view class="page">
<view class="input">
<uni-easyinput type="password" v-model="password" placeholder="请输入旧密码"></uni-easyinput>
<uni-easyinput type="password" v-model.trim="form.password" placeholder="请输入旧密码"></uni-easyinput>
</view>
<view class="input">
<uni-easyinput type="password" v-model="password" placeholder="请输入新密码"></uni-easyinput>
<uni-easyinput type="password" v-model.trim="form.newPassword" placeholder="请输入新密码"></uni-easyinput>
</view>
<view class="input">
<uni-easyinput type="password" v-model="password" placeholder="请再次输入新密码"></uni-easyinput>
<uni-easyinput type="password" v-model.trim="form.reNewPassword" placeholder="请再次输入新密码"></uni-easyinput>
</view>
<button type="primary" @click="submit('valiForm')">确认</button>
<button type="primary" @click="submit">确认</button>
</view>
</template>
<script>
import { examinePassword } from '@/apis/modules/user.js'
export default {
data() {
return {
form: {
password: '',
newPassword: '',
reNewPassword: ''
},
}
},
methods: {
submit() {
const { form } = this
const { password, newPassword, reNewPassword } = form
if(!password) return this.$util.errMsg('请输入旧密码')
if(!newPassword) return this.$util.errMsg('请输入新密码')
if(!reNewPassword) return this.$util.errMsg('请确认新密码')
if(newPassword.length < 6 || reNewPassword.length < 6) return this.$util.errMsg('请输入6位数以上的密码')
if(newPassword !== reNewPassword) return this.$util.errMsg('输入的新密码不一致,请重新确认')
if(password === newPassword) return this.$util.errMsg('旧密码跟新密码不能一致')
form.accountId = uni.getStorageSync('team').accountId
examinePassword(form).then(res => {
this.$util.sucMsg('修改成功!')
setTimeout(() => {
uni.navigateBack()
}, 1000)
}).catch(e => {})
}
}
}
</script>
@ -31,7 +53,10 @@
padding: 20px;
background-color: #fff;
}
.input {
/deep/.input {
margin-bottom: 15px;
.is-input-border {
border-color: #dedede !important;
}
}
</style>

@ -11,9 +11,7 @@
<view class="com">{{ team.partnerClassificationName }}</view>
</view>
</view>
<view class="qrcode">
<u-qrcode ref="qrcode" canvas-id="qrcode" :size="size" :value="link"></u-qrcode>
</view>
<view class="tips">扫一扫加入我们吧</view>
</view>
<view class="warn">邀请二维码失效日期{{ expireTime }}</view>
@ -37,12 +35,12 @@
},
onShow() {
this.getQrcode()
},
methods: {
//
getQrcode() {
const { team } = this
//
generateInvitationCode(uni.getStorageSync('team').accountId).then(({ expireTime }) => {
const date = new Date(Date.now() + expireTime * 1000) // *1000
this.expireTime = `${date.getFullYear()}-${this.$util.preZero(date.getMonth() + 1)}-${this.$util.preZero(date.getDate())} ${this.$util.preZero(date.getHours())}:${this.$util.preZero(date.getMinutes())}:${this.$util.preZero(date.getMinutes())}`
@ -57,11 +55,14 @@
<style scoped lang="scss">
.page {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
overflow: hidden;
}
.wrap {
padding-bottom: 40rpx;
margin: 120rpx 80rpx 0;
text-align: center;
background-color: #fff;
.inner {
@ -70,6 +71,7 @@
.info {
display: flex;
align-items: center;
margin-bottom: 30rpx;
text-align: left;
}
.avatar {
@ -79,7 +81,6 @@
border-radius: 50%;
}
.invite {
margin-bottom: 10rpx;
font-size: 26rpx;
}
.name {
@ -90,11 +91,8 @@
.com {
font-size: 30rpx;
}
.qrcode {
margin-top: 80rpx;
}
.tips {
margin: 80rpx 0 20rpx;
margin: 30rpx 0 20rpx;
font-size: 12px;
color: #333;
}

@ -3,6 +3,7 @@
<uni-list>
<uni-list-item :show-extra-icon="true" showArrow :extra-icon="phoneIcon" title="手机号" rightText="135617623" />
<uni-list-item :show-extra-icon="true" showArrow :extra-icon="mailIcon" title="邮箱" rightText="135617623" />
<uni-list-item :show-extra-icon="true" showArrow :extra-icon="accountIcon" title="账号" rightText="135617623" />
<uni-list-item :show-extra-icon="true" showArrow :extra-icon="pwdIcon" title="密码" rightText="******" clickable @click="toPage('../password/password')" />
</uni-list>
</view>
@ -22,6 +23,11 @@
size: '22',
type: 'email'
},
accountIcon: {
color: '#007eff',
size: '22',
type: 'account'
},
pwdIcon: {
color: '#007eff',
size: '22',

@ -143,6 +143,7 @@ ul {
.btn-wrap {
z-index: 2;
position: fixed;
// bottom: env(safe-area-inset-bottom);
bottom: 0;
display: flex;
justify-content: flex-end;

Loading…
Cancel
Save