发正式版

master
yujialong 2 years ago
parent fa5db483a3
commit ec58ad8bba
  1. 6
      App.vue
  2. 2
      apis/modules/user.js
  3. 6
      config/request.js
  4. 11
      libs/util.js
  5. 22
      order/addCourse/addCourse.vue
  6. 13
      order/orderDetail/orderDetail.vue
  7. 6
      pages/login/login.vue
  8. 20
      pages/person/person.vue
  9. 4
      pages/qrcode/qrcode.vue
  10. 27
      pages/setting/setting.vue
  11. 2
      pages/teams/teams.vue

@ -1,9 +1,9 @@
<script> <script>
export default { export default {
onLaunch: function() { onLaunch: function() {
uni.setEnableDebug({ // uni.setEnableDebug({
enableDebug: true // enableDebug: true
}) // })
}, },
onShow: function() { onShow: function() {
console.log('App Launch'); console.log('App Launch');

@ -2,7 +2,7 @@ import request from '@/apis/request.js'
const { get, post } = request const { get, post } = request
export const login = (data) => { export const login = (data) => {
return get('users/users/user/weChatAppletCallback', data) return post('users/users/user/weChatAppletCallback', data)
} }
export const userBinding = (data) => { export const userBinding = (data) => {

@ -5,9 +5,9 @@
*/ */
export default { export default {
// baseURL: 'https://huorantech.cn/', baseURL: 'https://huorantech.cn/',
// baseURL: 'http://192.168.31.151:9000/', // baseURL: 'http://192.168.31.137:9000/',
baseURL: 'http://121.37.12.51/', // baseURL: 'http://121.37.12.51/',
headers: { headers: {
'Content-Type': 'application/json;charset=UTF-8' 'Content-Type': 'application/json;charset=UTF-8'
}, },

@ -1,11 +1,11 @@
import Product from '@/config/product' import Product from '@/config/product'
const files = [ const files = [
'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220530/docx/1531155187057057792.docx', // 用户服务协议 'https://huorantech.cn/%E7%94%A8%E6%88%B7%E6%9C%8D%E5%8A%A1%E5%8D%8F%E8%AE%AE.docx', // 用户服务协议
'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220530/docx/1531156166884220928.docx', // 用户隐私协议 'https://huorantech.cn/%E7%94%A8%E6%88%B7%E9%9A%90%E7%A7%81%E5%8D%8F%E8%AE%AE.docx', // 用户隐私协议
'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220601/docx/1531930503312596992.docx', // 人工智能 'https://huorantech.cn/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD%E5%AE%9E%E9%AA%8C%E5%AE%A4%E5%BB%BA%E8%AE%BE%E6%96%B9%E6%A1%88-2020.1.docx', // 人工智能
'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220601/docx/1531930756791164928.docx', // 大数据 'https://huorantech.cn/%E5%A4%A7%E6%95%B0%E6%8D%AE%E7%AE%A1%E7%90%86%E4%B8%8E%E5%BA%94%E7%94%A8%E4%B8%93%E4%B8%9A%E5%BB%BA%E8%AE%BE%E6%96%B9%E6%A1%88.docx', // 大数据
'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220601/docx/1531929864150999040.docx', // 金融科技 'https://huorantech.cn/%E9%87%91%E8%9E%8D%E7%A7%91%E6%8A%80%E5%AE%9E%E9%AA%8C%E5%AE%A4%E5%BB%BA%E8%AE%BE%E6%96%B9%E6%A1%88V2.0.docx', // 金融科技
] ]
export default { export default {
// 路由跳转 // 路由跳转
@ -81,7 +81,6 @@ export default {
uni.downloadFile({ uni.downloadFile({
url: files[id], url: files[id],
success: function(res) { success: function(res) {
console.log('downloadFile ==> ',res)
uni.hideLoading(); uni.hideLoading();
uni.showLoading({ uni.showLoading({
title: '正在打开', title: '正在打开',

@ -168,19 +168,33 @@
const item = this.list[i] const item = this.list[i]
const { id, productType } = item const { id, productType } = item
const include = checked.findIndex(e => e.id === id && e.productType === productType) const include = checked.findIndex(e => e.id === id && e.productType === productType)
console.log(11, this.list, e, i)
// pushpush // pushpush
if (e.detail.value.length) { if (e.detail.value.length) {
include === -1 && checked.push(item) include === -1 && checked.push(item)
} else { } else {
// //
include === -1 || checked.splice(include, 1) if (include !== -1) {
checked.splice(include, 1)
this.checkAll = []
}
} }
}, },
// //
allChange(e) { allChange(e) {
const checked = !!e.detail.value.length const isCheck = !!e.detail.value.length //
this.list.map(e => e.check = checked ? [1] : []) // [1][] const { checked, list } = this
list.map(e => {
e.check = isCheck ? 1 : 0
const { id, productType } = e
const include = checked.findIndex(n => n.id === id && n.productType === productType)
// pushpush
if (isCheck) {
include === -1 && checked.push(e)
} else {
//
include === -1 || checked.splice(include, 1)
}
})
}, },
// //
createParam(e) { createParam(e) {

@ -35,7 +35,7 @@
<view :class="['line req', {err: err === 'orderType'}]"> <view :class="['line req', {err: err === 'orderType'}]">
<view class="name">订单类型</view> <view class="name">订单类型</view>
<view v-if="isDetail" class="val">{{ orderTypes.find(e => e.value === form.orderType).text }}</view> <view v-if="isDetail" class="val">{{ orderTypes.find(e => e.value === form.orderType).text }}</view>
<uni-data-picker v-else class="picker-input" placeholder="请选择订单类型" popup-title="请选择订单类型" preload :clear-icon="false" :localdata="orderTypes" v-model="form.orderType" @change="calcTotal"></uni-data-picker> <uni-data-picker v-else class="picker-input" placeholder="请选择订单类型" popup-title="请选择订单类型" preload :clear-icon="false" :localdata="orderTypes" v-model="form.orderType" @change="calcTotal(1)"></uni-data-picker>
</view> </view>
<view class="line"> <view class="line">
<view class="name">订单编号</view> <view class="name">订单编号</view>
@ -375,7 +375,7 @@
c.shrink = !c.shrink c.shrink = !c.shrink
}, },
// //
calcTotal() { calcTotal(out) {
this.handleErr('orderType') this.handleErr('orderType')
const { form } = this const { form } = this
const isTrial = form.orderType === 2 // const isTrial = form.orderType === 2 //
@ -395,7 +395,8 @@
总成本和总利润为单个产品的采购成本价和利润的和 总成本和总利润为单个产品的采购成本价和利润的和
*/ */
list.map(e => { list.map(e => {
if (isTrial) { // out=1 && 0
if (out && isTrial) {
e.settlementPrice = 0 e.settlementPrice = 0
e.serviceFee = 0 e.serviceFee = 0
e.finalPrice = 0 e.finalPrice = 0
@ -407,9 +408,9 @@
profit += +e.finalPrice - curPurchase profit += +e.finalPrice - curPurchase
} }
}) })
form.purchaseCost = isTrial ? 0 : Math.round(purchase) form.purchaseCost = Math.round(purchase)
form.profit = isTrial ? 0 : Math.round(profit) form.profit = Math.round(profit)
form.orderAmount = isTrial ? 0 : +form.purchaseCost + +form.profit form.orderAmount = +form.purchaseCost + +form.profit
}, },
// //
handleErr(val) { handleErr(val) {

@ -70,13 +70,17 @@
lang: 'zh_CN', lang: 'zh_CN',
desc: '登录', desc: '登录',
success: ({ userInfo }) => { success: ({ userInfo }) => {
console.log(22, userInfo)
uni.setStorageSync('userName', userInfo.nickName) uni.setStorageSync('userName', userInfo.nickName)
uni.setStorageSync('avatar', userInfo.avatarUrl) uni.setStorageSync('avatar', userInfo.avatarUrl)
uni.login({ uni.login({
success: ({ code }) => { success: ({ code }) => {
if (code) { if (code) {
this.submiting = true this.submiting = true
login({ code }).then(({ data }) => { login({
code,
avatarUrl: userInfo.avatarUrl
}).then(({ data }) => {
const e = data.sessionKey const e = data.sessionKey
this.sessionKey = e.session_key this.sessionKey = e.session_key
this.openId = e.openid this.openId = e.openid

@ -30,12 +30,6 @@
<text class="name">设置</text> <text class="name">设置</text>
</view> </view>
</view> </view>
<view v-if="auth('我的:退出账号')" class="item" @click="logout">
<view class="left">
<image class="icon" src="@/static/image/person4.png" mode=""></image>
<text class="name">退出账号</text>
</view>
</view>
</view> </view>
</view> </view>
<view v-if="!per" class="per-mask">功能升级中敬请期待...</view> <view v-if="!per" class="per-mask">功能升级中敬请期待...</view>
@ -81,20 +75,6 @@
}).then(({ my }) => { }).then(({ my }) => {
this.my = my this.my = my
}).catch(e => {}) }).catch(e => {})
},
// 退
logout() {
const that = this
uni.showModal({
title: '提示',
content: '确定要退出账号吗?',
success(res) {
if (res.confirm) {
uni.clearStorageSync()
that.$util.to('../login/login')
}
}
})
} }
} }
} }

@ -45,8 +45,8 @@
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())}`
const team = this.team const team = this.team
// this.link = `http://39.108.250.202/nakadai/#/join?accountId=${team.accountId}&id=${team.partnerId}` this.link = `https://huorantech.cn/#/join?accountId=${team.accountId}&id=${team.teamId}&isTeam=0`
this.link = `http://192.168.31.125:8086/#/join?accountId=${team.accountId}&id=${team.teamId}&isTeam=0` // this.link = `http://192.168.31.125:8086/#/join?accountId=${team.accountId}&id=${team.teamId}&isTeam=0`
}).catch(e => {}) }).catch(e => {})
}, },
} }

@ -6,6 +6,8 @@
<uni-list-item :show-extra-icon="true" showArrow :extra-icon="accountIcon" title="账号" :rightText="info.account" clickable @click="toPage('../account/account')" /> <uni-list-item :show-extra-icon="true" showArrow :extra-icon="accountIcon" title="账号" :rightText="info.account" clickable @click="toPage('../account/account')" />
<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 v-if="auth('我的:退出账号')" class="logout" @click="logout">退出登录</view>
</view> </view>
</template> </template>
@ -57,11 +59,32 @@
}, },
toPage(path) { toPage(path) {
this.$util.to(path) this.$util.to(path)
},
// 退
logout() {
const that = this
uni.showModal({
title: '提示',
content: '确定要退出账号吗?',
success(res) {
if (res.confirm) {
uni.clearStorageSync()
that.$util.to('../login/login')
}
}
})
} }
} }
} }
</script> </script>
<style> <style scoped lang="scss">
.logout {
padding: 30rpx 0;
margin-top: 30rpx;
font-size: 28rpx;
color: #333;
text-align: center;
background-color: #fff;
}
</style> </style>

@ -7,7 +7,7 @@
<template v-if="list.length"> <template v-if="list.length">
<ul class="list"> <ul class="list">
<li v-for="item in list"> <li v-for="item in list">
<image class="avatar" src="@/static/image/avatar.png" mode=""></image> <image class="avatar" :src="item.userAvatars || require('@/static/image/avatar.png')" mode=""></image>
<view class="info"> <view class="info">
<view class="c-name">{{ item.userName }}</view> <view class="c-name">{{ item.userName }}</view>
<view class="line"> <view class="line">

Loading…
Cancel
Save