产品等修复

master
yujialong 2 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) => { export const userBinding = (data) => {
return post('users/users/user/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 { 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"> <style scoped lang="scss">
.page { .page {
padding-bottom: 150rpx; height: calc(100vh - 120rpx - env(safe-area-inset-bottom));
overflow: auto;
} }
.info { .info {
.name { .name {
@ -294,7 +295,7 @@
.action { .action {
z-index: 2; z-index: 2;
position: fixed; position: fixed;
bottom: 0; bottom: env(safe-area-inset-bottom);
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
width: 100%; width: 100%;

@ -27,9 +27,46 @@
const pages = getCurrentPages() const pages = getCurrentPages()
const { options } = const { options } =
this.src = `http://view.xdocin.com/xdoc?_xdoc=${this.files[pages[pages.length - 1].options.id]}` this.src = `http://view.xdocin.com/xdoc?_xdoc=${this.files[pages[pages.length - 1].options.id]}`
// this.preview()
}, },
methods: { 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> </script>

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

@ -2,7 +2,7 @@
<view class="page"> <view class="page">
<image class="bg" src="@/static/image/index/index2.png" mode="widthFix"></image> <image class="bg" src="@/static/image/index/index2.png" mode="widthFix"></image>
<view class="team"> <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>
<view class="banner"> <view class="banner">
@ -107,7 +107,7 @@
export default { export default {
data() { data() {
return { return {
partnerId: this.$util.getBmId() || '', teamId: uni.getStorageSync('team').teamId || '',
list: [], list: [],
id: '', id: '',
teamList: [] teamList: []
@ -125,12 +125,11 @@
treeList().then(({ treeList }) => { treeList().then(({ treeList }) => {
this.teamList = treeList this.teamList = treeList
this.getId(treeList, '', data[0].teamId) this.getId(treeList, '', data[0].teamId)
data[0].teamId = this.id
// id() // id()
getTheBusinessManagerIdsUnderTheTeam(this.id).then(res => { this.id && getTheBusinessManagerIdsUnderTheTeam(this.id).then(res => {
data[0].businessManagerIds = res data[0].businessManagerIds = res
// //
this.partnerId = data[0].partnerId this.teamId = data[0].teamId
uni.setStorageSync('team', data[0]) uni.setStorageSync('team', data[0])
}).catch(e => {}) }).catch(e => {})
}).catch(e => {}) }).catch(e => {})
@ -150,15 +149,15 @@
}, },
// //
teamChange() { teamChange() {
const { partnerId } = this const { teamId } = this
const e = this.list.find(e => e.partnerId == partnerId) const e = this.list.find(e => e.teamId == teamId)
if (e) {
this.getId(this.teamList, '', e.teamId) this.getId(this.teamList, '', e.teamId)
e.teamId = this.id this.id && getTheBusinessManagerIdsUnderTheTeam(this.id).then(res => {
getTheBusinessManagerIdsUnderTheTeam(this.id).then(res => {
e.businessManagerIds = res e.businessManagerIds = res
uni.setStorageSync('team', e) uni.setStorageSync('team', e)
}).catch(e => {}) }).catch(e => {})
}
}, },
// //
toPanel(i) { toPanel(i) {
@ -173,6 +172,7 @@
position: relative; position: relative;
min-height: 100%; min-height: 100%;
padding: 30rpx 22rpx; padding: 30rpx 22rpx;
box-sizing: border-box;
} }
.bg { .bg {
z-index: -1; z-index: -1;

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

@ -1,27 +1,49 @@
<template> <template>
<view class="page"> <view class="page">
<view class="input"> <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>
<view class="input"> <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>
<view class="input"> <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> </view>
<button type="primary" @click="submit('valiForm')">确认</button> <button type="primary" @click="submit">确认</button>
</view> </view>
</template> </template>
<script> <script>
import { examinePassword } from '@/apis/modules/user.js'
export default { export default {
data() { data() {
return { return {
form: {
password: '',
newPassword: '',
reNewPassword: ''
},
} }
}, },
methods: { 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> </script>
@ -31,7 +53,10 @@
padding: 20px; padding: 20px;
background-color: #fff; background-color: #fff;
} }
.input { /deep/.input {
margin-bottom: 15px; margin-bottom: 15px;
.is-input-border {
border-color: #dedede !important;
}
} }
</style> </style>

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

@ -3,6 +3,7 @@
<uni-list> <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="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="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-item :show-extra-icon="true" showArrow :extra-icon="pwdIcon" title="密码" rightText="******" clickable @click="toPage('../password/password')" />
</uni-list> </uni-list>
</view> </view>
@ -22,6 +23,11 @@
size: '22', size: '22',
type: 'email' type: 'email'
}, },
accountIcon: {
color: '#007eff',
size: '22',
type: 'account'
},
pwdIcon: { pwdIcon: {
color: '#007eff', color: '#007eff',
size: '22', size: '22',

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

Loading…
Cancel
Save