发正式版

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>
export default {
onLaunch: function() {
uni.setEnableDebug({
enableDebug: true
})
// uni.setEnableDebug({
// enableDebug: true
// })
},
onShow: function() {
console.log('App Launch');

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

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

@ -1,11 +1,11 @@
import Product from '@/config/product'
const files = [
'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220530/docx/1531155187057057792.docx', // 用户服务协议
'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220530/docx/1531156166884220928.docx', // 用户隐私协议
'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220601/docx/1531930503312596992.docx', // 人工智能
'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220601/docx/1531930756791164928.docx', // 大数据
'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220601/docx/1531929864150999040.docx', // 金融科技
'https://huorantech.cn/%E7%94%A8%E6%88%B7%E6%9C%8D%E5%8A%A1%E5%8D%8F%E8%AE%AE.docx', // 用户服务协议
'https://huorantech.cn/%E7%94%A8%E6%88%B7%E9%9A%90%E7%A7%81%E5%8D%8F%E8%AE%AE.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://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://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 {
// 路由跳转
@ -81,7 +81,6 @@ export default {
uni.downloadFile({
url: files[id],
success: function(res) {
console.log('downloadFile ==> ',res)
uni.hideLoading();
uni.showLoading({
title: '正在打开',

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

@ -35,7 +35,7 @@
<view :class="['line req', {err: err === 'orderType'}]">
<view class="name">订单类型</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 class="line">
<view class="name">订单编号</view>
@ -375,7 +375,7 @@
c.shrink = !c.shrink
},
//
calcTotal() {
calcTotal(out) {
this.handleErr('orderType')
const { form } = this
const isTrial = form.orderType === 2 //
@ -395,7 +395,8 @@
总成本和总利润为单个产品的采购成本价和利润的和
*/
list.map(e => {
if (isTrial) {
// out=1 && 0
if (out && isTrial) {
e.settlementPrice = 0
e.serviceFee = 0
e.finalPrice = 0
@ -407,9 +408,9 @@
profit += +e.finalPrice - curPurchase
}
})
form.purchaseCost = isTrial ? 0 : Math.round(purchase)
form.profit = isTrial ? 0 : Math.round(profit)
form.orderAmount = isTrial ? 0 : +form.purchaseCost + +form.profit
form.purchaseCost = Math.round(purchase)
form.profit = Math.round(profit)
form.orderAmount = +form.purchaseCost + +form.profit
},
//
handleErr(val) {

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

@ -30,12 +30,6 @@
<text class="name">设置</text>
</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 v-if="!per" class="per-mask">功能升级中敬请期待...</view>
@ -81,20 +75,6 @@
}).then(({ my }) => {
this.my = my
}).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
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
// this.link = `http://39.108.250.202/nakadai/#/join?accountId=${team.accountId}&id=${team.partnerId}`
this.link = `http://192.168.31.125:8086/#/join?accountId=${team.accountId}&id=${team.teamId}&isTeam=0`
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`
}).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="pwdIcon" title="密码" rightText="******" clickable @click="toPage('../password/password')" />
</uni-list>
<view v-if="auth('我的:退出账号')" class="logout" @click="logout">退出登录</view>
</view>
</template>
@ -57,11 +59,32 @@
},
toPage(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>
<style>
<style scoped lang="scss">
.logout {
padding: 30rpx 0;
margin-top: 30rpx;
font-size: 28rpx;
color: #333;
text-align: center;
background-color: #fff;
}
</style>

@ -7,7 +7,7 @@
<template v-if="list.length">
<ul class="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="c-name">{{ item.userName }}</view>
<view class="line">

Loading…
Cancel
Save