From cf1162858b8d53ba7b70bcce4fae709cfea13fa9 Mon Sep 17 00:00:00 2001
From: yujialong <479214531@qq.com>
Date: Fri, 14 Jul 2023 10:17:32 +0800
Subject: [PATCH] fix
---
apis/request.js | 2 +
order/addCourse/addCourse.vue | 4 +-
order/editCourse/editCourse.vue | 16 +-
order/orderDetail/orderDetail.vue | 257 ++++++++++++++++++++++----
order/productDetail/productDetail.vue | 7 +-
order/products/products.vue | 3 +-
order/shopCart/shopCart.vue | 105 +++++++++--
pages.json | 6 +-
pages/index/index.vue | 12 +-
pages/login/login.vue | 44 +++--
pages/person/person.vue | 14 +-
pages/reg/reg.vue | 60 +++---
static/image/tab1-1.png | Bin 434 -> 368 bytes
static/image/tab1.png | Bin 239 -> 218 bytes
static/image/tab2-1.png | Bin 265 -> 223 bytes
static/image/tab2.png | Bin 440 -> 372 bytes
static/image/tab3-1.png | Bin 246 -> 195 bytes
static/image/tab3.png | Bin 377 -> 331 bytes
static/image/tab4-1.png | Bin 229 -> 222 bytes
static/image/tab4.png | Bin 468 -> 410 bytes
team/qrcode/qrcode.vue | 4 +-
21 files changed, 404 insertions(+), 130 deletions(-)
diff --git a/apis/request.js b/apis/request.js
index 7cb0904..a736015 100644
--- a/apis/request.js
+++ b/apis/request.js
@@ -41,6 +41,8 @@ const request = options => {
})
}, 1500)
reject(data)
+ } else if (status == 10028) { // 用户不存在
+ resolve(data)
} else if (!status) {
resolve(data)
} else {
diff --git a/order/addCourse/addCourse.vue b/order/addCourse/addCourse.vue
index 3d21088..d6c6e47 100644
--- a/order/addCourse/addCourse.vue
+++ b/order/addCourse/addCourse.vue
@@ -230,7 +230,9 @@
miniProgramPictureAddress: e.appletIcon || '', // 图标
settlementPrice: trial ? 0 : '', // 结算价
settlementPriceUnit: e.settlementPrice || 0, // 结算单价
- serviceFee: 0 // 平台服务费(前端计算后展示,不入库)
+ serviceFee: 0, // 平台服务费(前端计算后展示,不入库)
+ mallNonAssociatedLinks: e.mallNonAssociatedLinks, // 产品链接
+ typeName: e.typeName
}
},
// 判断是否为客户已有的课程
diff --git a/order/editCourse/editCourse.vue b/order/editCourse/editCourse.vue
index a6e75de..5bc749c 100644
--- a/order/editCourse/editCourse.vue
+++ b/order/editCourse/editCourse.vue
@@ -16,7 +16,7 @@
产品类型
- {{ productTypes.find(e => e.id === item.productType).name }}
+ {{ item.typeName }}
使用期限
@@ -95,20 +95,6 @@
id: 2
}],
unitText: ['日', '月', '年'],
- productTypes: [
- {
- name: '实训课程',
- id: 1
- },
- {
- name: '理论课程',
- id: 0
- },
- {
- name: '数据产品',
- id: 2
- }
- ],
courses: {} , // 上一页缓存的产品
orderRepeat: [],
repeatMsg: '',
diff --git a/order/orderDetail/orderDetail.vue b/order/orderDetail/orderDetail.vue
index 738e5bc..9724676 100644
--- a/order/orderDetail/orderDetail.vue
+++ b/order/orderDetail/orderDetail.vue
@@ -60,7 +60,7 @@
{{ c.name }}
- -
+
-
@@ -73,28 +73,59 @@
+ 起始日期
+ {{ item.endTime ? item.startTime + ' - ' + item.endTime : item.startTime}}
+
+
+ {{ item.endTime ? item.startTime + ' - ' + item.endTime : item.startTime}}
+
+
+
+
使用期限
- {{ item.startTime + (item.endTime ? ' - ' + item.endTime : '') }}
+ {{item.periodOfUse}}{{ units.find(e => e.id === item.options).text }}
+
+
+
+ {{ units.find(e => e.id === item.options).text }}
+
+
+
+
+
+ 数量
+ 1
+
+
+
- 市场价(元)
- {{ item.marketValue && item.marketValue + '元' }}
+ {{ item.authority ? '市场价' : '市场单价' }}
+ {{ item.marketValue && item.marketValue + '元' }}
结算价
- {{ item.settlementPrice && item.settlementPrice + '元' }}
+ {{ item.settlementPrice }}
+
+
+ 元
+
折扣率
- {{ item.discountRate }}
+ {{ item.discountRate }}
市场服务费
- {{ item.serviceFee }}元
+ {{ item.serviceFee }}元
-
- 成交价格
- {{ item.finalPrice }}元
+
+ 成交价
+ {{ item.finalPrice }}
+
+
+ 元
+
@@ -200,7 +231,19 @@
customerListAll: [],
err: '',
rate: '',
- shipInfo: ''
+ shipInfo: '',
+ orderRepeat:[],
+ units: [{
+ text: '日',
+ id: 0
+ }, {
+ text: '月',
+ id: 1
+ }, {
+ text: '年',
+ id: 2
+ }],
+ unitText: ['日', '月', '年'],
}
},
watch: {
@@ -234,12 +277,6 @@
}
this.courseList = store
this.courses = list
- // this.$nextTick(() => {
- // uni.pageScrollTo({
- // selector: '#products',
- // })
- // })
-
try {
uni.removeStorageSync('courses')
} catch (e) {}
@@ -459,7 +496,7 @@
} else {
this.calcDiscount(e)
this.dealSettlePrice(e)
- this.calcFinalPrice(e)
+ // this.calcFinalPrice(e)
const curPurchase = +e.settlementPrice + +e.serviceFee
purchase += curPurchase
profit += +e.finalPrice - curPurchase
@@ -469,15 +506,82 @@
form.profit = profit
form.orderAmount = (+form.purchaseCost + +form.profit).toFixed(2)
},
- calcDiscount(row) {
- const price = row.authority ? row.finalPrice : row.finalValue
- const { marketValue } = row
- // (原价-现价)÷原价 x100%
- if (price) row.discountRate = marketValue != 0 ? ((marketValue - price) / marketValue * 100).toFixed(2) + '%' : '0%'
+ // 计算订单总额
+ calcAmount() {
+ const { form } = this
+ const list = this.courses
+ let purchase = 0 // 总采购成本
+ let profit = 0 // 总利润
+ list.map(e => {
+ const curPurchase = +e.settlementPrice + +e.serviceFee
+ purchase += curPurchase
+ profit += +e.finalPrice - curPurchase
+ })
+ form.purchaseCost = Math.round(purchase)
+ form.profit = Math.round(profit)
+ form.orderAmount = (+form.purchaseCost + +form.profit).toFixed(2)
+ console.log(111, this.courseList, this.courses)
+ },
+ calcDate(row, fromData) {
+ clearTimeout(this.timer)
+ this.timer = setTimeout(() => {
+ const { periodOfUse, options } = row
+ let optionsData = 0
+ if (periodOfUse) {
+ if (options == 1){
+ optionsData = periodOfUse === '12' ? 31536000000 : periodOfUse*30*24*60*60*1000
+ } else if (options == 2){
+ optionsData = periodOfUse*365*24*60*60*1000
+ } else {
+ optionsData = periodOfUse*24*60*60*1000
+ }
+ }
+ let time = new Date(row.startTime).getTime()
+ let endTime = time + optionsData
+ row.endTime = time + optionsData
+ let dt = new Date(endTime)
+ row.endTime = (dt.getFullYear()) + "-" + (dt.getMonth() + 1) + "-" + (dt.getDate())
+ let endYear = endTime - time
+ let endYears = endYear/1000/60/60/24
+ row.remainingPeriod = endYears
+ const unit = row.options // 使用期限单位
+ const useUnit = row.periodOfUse // 使用期限
+ // 计算市场价
+ const price = row.marketPrice || 0 // 市场单价
+ // 结算单价是元/年,所以如果选择的不是年,要进行换算(日:/365,月:/12)
+ row.marketValue = (!unit ?
+ price / 365 * useUnit :
+ unit === 1 ?
+ price / 12 * useUnit :
+ price * useUnit).toFixed(2)
+ this.dealSettlePrice(row)
+ // 只有改变了起止日期才需要调接口查询订单,该接口作用是把开始时间传过去,会返回一个提示或者时间,如果是时间,则把时间+1天,如果是提示,则无法保存
+ if (!fromData) {
+ const cId = row.dataOrCourseId
+ const date = new Date(row.startTime)
+ const orderRepeat = this.orderRepeat
+ getOrderOtherTime({
+ customerId: this.customerId,
+ id: cId,
+ startTime: this.$util.formatDate(date, 'yyyy-MM-dd'),
+ endTime: row.endTime
+ }).then(res => {
+ orderRepeat.includes(cId) && orderRepeat.splice(orderRepeat.findIndex(e => e === cId), 1)
+ if (res.endTime) {
+ let time = new Date(res.endTime)
+ time = new Date(time.setDate(time.getDate() + 1))
+ row.startTime = this.$util.formatDate(time, 'yyyy-MM-dd')
+ }
+ }).catch(res => {
+ this.repeatMsg = res.message
+ orderRepeat.includes(cId) || orderRepeat.push(cId)
+ })
+ }
+ // 折扣率
+ this.calcDiscount(row)
+ }, 500)
},
- // 计算结算价及平台服务费
dealSettlePrice(row) {
- console.log('row==>',row)
// 如果是试用或者没选择,结算价和平台服务费都是0
if (this.form.orderType != 1) {
row.settlementPrice = 0
@@ -485,9 +589,10 @@
} else {
const unit = row.options // 使用期限单位
const useUnit = row.periodOfUse // 使用期限
+ let sPrice = ''
// 结算单价。计算规则:结算单价(**元/年)*购买时长(单位年)*数量(课程为1,数据为账号数量)
const priceUnit = row.settlementPriceUnit
- let sPrice = ((!unit ?
+ sPrice = ((!unit ?
priceUnit / 365 * useUnit :
unit === 1 ?
priceUnit / 12 * useUnit :
@@ -496,11 +601,41 @@
row.accountNum)).toFixed((2))
row.settlementPrice = this.$util.handleNaN(sPrice)
// 平台服务费
- if (row.settlementPrice) {
- row.serviceFee = (row.finalPrice * (this.rate / 100)).toFixed(2)
- }
+ row.serviceFee = (row.finalPrice * (this.rate / 100)).toFixed(2)
+ this.calcAmount()
+ console.log('row.settlementPrice =>' ,row.settlementPrice,row.settlementPriceUnit,sPrice,row)
}
},
+ calcDiscount(row) {
+ const price = row.authority ? row.finalPrice : row.finalValue
+ const { marketValue } = row
+ // (原价-现价)÷原价 x100%
+ if (price) row.discountRate = marketValue != 0 ? ((marketValue - price) / marketValue * 100).toFixed(2) + '%' : '0%'
+ },
+ selectUnit(item) {
+ const that = this
+ uni.showActionSheet({
+ title: '标题',
+ itemList: that.unitText,
+ success: ({ tapIndex }) => {
+ item.options = tapIndex
+ that.calcDate(item)
+ }
+ })
+ },
+ // 成交价修改后,计算成交单价,数据才需要 计算规则:成交价/账号数/时间(成交单价为元/账号/年,所以时间要换算成年的单位去计算)
+ calcFinalValue(row) {
+ clearTimeout(this.timer)
+ this.timer = setTimeout(() => {
+ const { authority, periodOfUse, options, accountNum, finalPrice } = row
+ if (!authority && periodOfUse && accountNum && finalPrice) {
+ row.finalValue = (finalPrice / accountNum / periodOfUse).toFixed(2)
+ }
+ // 折扣率
+ this.calcDiscount(row)
+ this.dealSettlePrice(row)
+ }, 500)
+ },
// 计算成交价。计算规则:成交单价*账号数*时间(成交单价为元/账号/年,所以时间要换算成年的单位去计算)
calcFinalPrice(row) {
clearTimeout(this.timer)
@@ -524,6 +659,10 @@
this.dealSettlePrice(row)
}, 500)
},
+ // 结算价修改后计算平台服务费
+ updateServiceFee(row) {
+ options.serviceFee = (row.finalPrice * (this.rate / 100)).toFixed(2)
+ },
// 显示发货信息
showShip(row) {
let val = ''
@@ -661,21 +800,24 @@
color: #333;
background: linear-gradient(90deg, #FFF5E5 0%, #FFFFFF 100%);
}
+ .left {
+ display: inline-flex;
+ align-items: center;
+ max-width: 480rpx;
+ margin-right: 10rpx;
+ }
.course-action {
display: inline-flex;
align-items: center;
}
- .info-btn {
+ .course-btn {
padding: 0 16rpx;
- margin-left: 10rpx;
+ margin-right: 10rpx;
font-size: 28rpx;
white-space: nowrap;
- }
- .left {
- display: inline-flex;
- align-items: center;
- max-width: 480rpx;
- margin-right: 10rpx;
+ &.mg {
+ margin-left: 10rpx;
+ }
}
.del {
width: 40rpx;
@@ -697,6 +839,10 @@
font-size: 12px;
}
.label {
+ font-size: 28rpx;
+ color: #333;
+ }
+ .ph {
font-size: 28rpx;
color: #999;
}
@@ -715,8 +861,15 @@
font-size: 32rpx;
color: #007EFF;
}
+ .period {
+ flex: none;
+ width: 100rpx;
+ font-size: 28rpx;
+ text-align: center;
+ }
}
.bottom {
+ z-index: 2;
position: fixed;
bottom: 0;
padding-bottom: env(safe-area-inset-bottom);
@@ -812,6 +965,36 @@
background-color: #007EFF;
}
}
+.unit {
+ display: inline-flex;
+ align-items: center;
+ .icon {
+ width: 28rpx;
+ margin-left: 20rpx;
+ }
+ input {
+ font-size: 28rpx;
+ }
+ text{
+ font-size: 28rpx;
+ }
+}
+.line {
+ .inline {
+ display: flex;
+ align-items: center;
+ font-size: 28rpx;
+ input {
+ text-align: right;
+ margin-right: 10rpx;
+ margin-left: 20rpx;
+ color: #333;
+ }
+ }
+ .edit {
+ margin-left: 10rpx;
+ }
+}
.ship-info {
height: 400rpx;
padding: 20rpx;
diff --git a/order/productDetail/productDetail.vue b/order/productDetail/productDetail.vue
index d1b4e4d..d41d74d 100644
--- a/order/productDetail/productDetail.vue
+++ b/order/productDetail/productDetail.vue
@@ -88,7 +88,7 @@
{{ file.fileName }}
- 下载
+ 下载
@@ -141,8 +141,8 @@
selectedBorder: '1px rgba(83, 200, 249,0.9) solid'
},
mpStyle: {
- p: 'font-size: 26rpx !important;font-family: Microsoft Yahei !important;',
- span: 'font-size: 26rpx !important;font-family: Microsoft Yahei !important;'
+ p: 'font-size: 26rpx !important;font-family: Microsoft Yahei !important;color: #333 !important;',
+ span: 'font-size: 26rpx !important;font-family: Microsoft Yahei !important;color: #333 !important;'
}
}
},
@@ -446,6 +446,7 @@
left: 0;
display: flex;
justify-content: space-between;
+ align-items: center;
width: 100%;
padding: 24rpx 32rpx 24rpx 73rpx;
background-color: #fff;
diff --git a/order/products/products.vue b/order/products/products.vue
index 7377ac3..3d540df 100644
--- a/order/products/products.vue
+++ b/order/products/products.vue
@@ -65,7 +65,7 @@
-
+
@@ -353,6 +353,7 @@
min-width: 58rpx;
height: 58rpx;
margin-right: 20rpx;
+ border-radius: 4px;
}
}
.info {
diff --git a/order/shopCart/shopCart.vue b/order/shopCart/shopCart.vue
index c78ab09..4bc5580 100644
--- a/order/shopCart/shopCart.vue
+++ b/order/shopCart/shopCart.vue
@@ -1,18 +1,34 @@
- -
- checkChange(e, i)">
- checkChange(e, i)">
-
- {{ item.productName }}
-
+
+
+ -
+ checkChange(e, i)">
+ checkChange(e, i)">
+
+
+ {{ item.productName }}
+ 市场建议价:{{ item.marketUnitPrice }}元/年
+
+
+
+
- 生成订单
+
+ 删除
+ 生成订单
+
@@ -40,6 +56,12 @@
value: 1
}],
checked: [], // 已经勾选的集合
+ delOption: [{
+ text: '删除',
+ style: {
+ backgroundColor: '#F56C6C'
+ }
+ }],
}
},
// 下拉刷新
@@ -63,8 +85,7 @@
try {
uni.removeStorageSync('orderForm')
} catch (e) {}
- this.page = 1
- this.getList()
+ this.initList()
},
methods: {
// 购物车列表
@@ -161,6 +182,43 @@
shopCartId// 购物车id,订单提交后,调删除购物车的接口把这个产品删除
}
},
+ // 删除
+ del(e) {
+ const that = this
+ uni.showModal({
+ title: '提示',
+ content: '确定要删除吗?',
+ success(res) {
+ if (res.confirm) {
+ delCart([e.id]).then(res => {
+ that.initList()
+ }).catch(e => {})
+ }
+ }
+ })
+ },
+ // 批量删除
+ batchDel() {
+ const list = this.checked // 已选产品
+ if (list.length) {
+ const that = this
+ uni.showModal({
+ title: '提示',
+ content: '确定要删除吗?',
+ success(res) {
+ if (res.confirm) {
+ delCart(list.map(e => e.id)).then(res => {
+ that.checkAll = []
+ that.checked = []
+ that.initList()
+ }).catch(e => {})
+ }
+ }
+ })
+ } else {
+ this.$util.errMsg('请选择产品!')
+ }
+ },
// 确定
submit() {
const list = this.checked // 已选产品
@@ -184,7 +242,7 @@
this.$util.to(`/order/editCourse/editCourse`)
})
} else {
- this.$util.errMsg('请选择产品!')
+ this.$util.errMsg('请先添加产品!')
}
}
}
@@ -201,14 +259,24 @@
align-items: center;
padding: 30rpx 24rpx;
margin: 16rpx 24rpx;
- font-size: 30rpx;
- color: #333;
background-color: #fff;
border-radius: 16rpx;
}
+ .name {
+ margin-bottom: 10rpx;
+ font-size: 30rpx;
+ color: #333;
+ }
+ .price {
+ font-size: 26rpx;
+ color: #333;
+ }
.icon {
- width: 80rpx;
+ width: 100rpx;
+ min-width: 100rpx;
+ height: 100rpx;
margin: 0 20rpx;
+ border-radius: 4px;
}
}
/deep/.check {
@@ -228,9 +296,16 @@
.btn-wrap {
position: fixed;
justify-content: space-between;
+ .btns {
+ display: inline-flex;
+ }
.btn {
- width: 340rpx;
- margin-left: 27rpx;
+ width: auto;
+ padding: 0 50rpx;
+ }
+ .del {
+ margin-right: 20rpx;
+ background-color: #b5b5b5;
}
}
diff --git a/pages.json b/pages.json
index a9d2e35..1a8bbb8 100644
--- a/pages.json
+++ b/pages.json
@@ -148,7 +148,7 @@
"style" :
{
"navigationBarTitleText": "购物车",
- "enablePullDownRefresh": false
+ "enablePullDownRefresh": true
}
}
@@ -293,8 +293,8 @@
"selectedColor": "#007FFF",
"borderStyle": "white",
"backgroundColor": "#ffffff",
- "fontSize": "16px",
- "iconWidth": "45px",
+ "fontSize": "22px",
+ "iconWidth": "20px",
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/image/tab1.png",
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 709fc40..6982360 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -28,7 +28,7 @@
热销产品
-
+
@@ -48,7 +48,7 @@
官方推荐
-
+
@@ -66,7 +66,7 @@
-
+
@@ -308,8 +308,8 @@
margin-bottom: 28rpx;
}
.pic {
- width: 120rpx;
- height: 120rpx;
+ width: 100rpx;
+ height: 100rpx;
margin-right: 20rpx;
border-radius: 8px;
}
@@ -323,7 +323,7 @@
}
.des {
margin: 10rpx 0;
- font-size: 24rpx;
+ font-size: 22rpx;
color: #666;
}
.meta {
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 02c31de..be24577 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -12,7 +12,7 @@
微信授权登录
- 没有账号?申请注册
+
@@ -80,20 +80,38 @@
login({
code,
avatarUrl: userInfo.avatarUrl
- }).then(({ data }) => {
- const e = data.sessionKey
- this.sessionKey = e.session_key
- this.openid = e.openid
- this.unionid = e.unionid
- uni.setStorageSync('sessionKey', e.session_key)
- uni.setStorageSync('openid', e.openid)
+ }).then((res) => {
+ const { data, status } = res
this.submiting = false
- // 如果没有绑定手机号,则显示绑定按钮,引导用户绑定,否则,直接跳到首页
- if (data.state === 'login') {
- this.toIndex()
- uni.setStorageSync('token', data.token)
+ // 用户不存在,则让用户授权手机号,直接去注册
+ if (status == 10028) {
+ // 这里需要再调一次uni的login,因为code用过了一次,已经失效了
+ uni.login({
+ success: ({ code }) => {
+ getSessionKey({
+ code,
+ }).then(({ sessionKey }) => {
+ this.sessionKey = sessionKey.session_key
+ this.openid = sessionKey.openid
+ this.isLogin = true
+ }).catch(e => {})
+ this.isReg = true
+ }
+ })
} else {
- this.isLogin = true
+ const e = data.sessionKey
+ this.sessionKey = e.session_key
+ this.openid = e.openid
+ this.unionid = e.unionid
+ uni.setStorageSync('sessionKey', e.session_key)
+ uni.setStorageSync('openid', e.openid)
+ // 如果没有绑定手机号,则显示绑定按钮,引导用户绑定,否则,直接跳到首页
+ if (data.state === 'login') {
+ this.toIndex()
+ uni.setStorageSync('token', data.token)
+ } else {
+ this.isLogin = true
+ }
}
}).catch(e => {
this.submiting = false
diff --git a/pages/person/person.vue b/pages/person/person.vue
index b29b73c..ab6112a 100644
--- a/pages/person/person.vue
+++ b/pages/person/person.vue
@@ -16,7 +16,14 @@
- 我的团队
+ {{ disabled ? '所属团队' : '我的团队' }}
+
+
+
+
+
+
+ 创建自己的团队
@@ -128,7 +135,6 @@
}
},
onShow() {
- console.log(11, uni.getStorageSync('avatar'))
this.per = true
this.initRole()
this.disabled = uni.getStorageSync('team').isTeam == 0 // 成员不能改省份城市
@@ -177,6 +183,10 @@
}
})
},
+ // 创建自己的团队
+ createTeam() {
+ this.$util.to(`../reg/reg?openid=${uni.getStorageSync('openid')}&phone=${this.my.info.phone}`)
+ },
// 进入设置
toSet() {
this.$util.to(`/team/setting/setting`)
diff --git a/pages/reg/reg.vue b/pages/reg/reg.vue
index 0be5b25..2c30698 100644
--- a/pages/reg/reg.vue
+++ b/pages/reg/reg.vue
@@ -57,40 +57,36 @@
methods: {
// 检查登录状态
checkLogin() {
- if (uni.getStorageSync('token')) {
- this.toIndex()
- } else {
- // 根据手机号获取是否注册过,如果有,则判断是否是队长(isTeam 1:队长,0:成员),如果没有返回team,则注册
- queryPartnerAccount(this.phone).then(({ team, username }) => {
- if (team) {
- team.teamId && uni.setStorageSync('teamId', team.teamId)
- this.form.userName = team.userName
- if (team) this.exist = true
- if (team.isTeam) {
- this.form = team
- this.getCity()
- } else {
- this.form.isTeam = 0
- if (team.userName) this.form.userName = team.userName
- uni.showModal({
- title: '提示',
- content: `或然科技城市合伙人,欢迎回来!您已在${team.teamName},是否要创建自己的团队?`,
- success: function (res) {
- if (res.confirm) {
- console.log('用户点击确定');
- } else if (res.cancel) {
- uni.redirectTo({
- url: '../login/login'
- })
- }
+ // 根据手机号获取是否注册过,如果有,则判断是否是队长(isTeam 1:队长,0:成员),如果没有返回team,则注册
+ queryPartnerAccount(this.phone).then(({ team, username }) => {
+ if (team) {
+ team.teamId && uni.setStorageSync('teamId', team.teamId)
+ this.form.userName = team.userName
+ if (team) this.exist = true
+ if (team.isTeam) {
+ this.form = team
+ this.getCity()
+ } else {
+ this.form.isTeam = 0
+ if (team.userName) this.form.userName = team.userName
+ uni.showModal({
+ title: '提示',
+ content: `或然科技城市合伙人,欢迎回来!您已在${team.teamName},是否要创建自己的团队?`,
+ success: function (res) {
+ if (res.confirm) {
+ console.log('用户点击确定');
+ } else if (res.cancel) {
+ uni.redirectTo({
+ url: '../login/login'
+ })
}
- })
- }
- } else if (username) { // 没有团队,只有username
- this.form.userName = username
+ }
+ })
}
- }).catch(e => {})
- }
+ } else if (username) { // 没有团队,只有username
+ this.form.userName = username
+ }
+ }).catch(e => {})
},
// 获取省份
getProvince() {
diff --git a/static/image/tab1-1.png b/static/image/tab1-1.png
index 3c5b26ce3ed1de64c0f977911e06b26f634d2ca2..819c91517a44b9298f913d6da8e9fa06e47a58fb 100644
GIT binary patch
literal 368
zcmeAS@N?(olHy`uVBq!ia0vp^8X(NU3?z3ec*FxK?*N|=S0K&M@SmX`jM`uf2p3KQ
z6#!8qn1rx_Qguj*fl~GVZzVgF0Zo%A3GxeOs51S@K4tHc>+^b=1N9Vz4{urX?&baS
zQ9EC5x&l?>42{Hr}BA~){#xtTQx(Z
zuVlXn4K9_feWm4hd7hq?pJH5T>CXkl{XLUQe3wZ`Yv%dvXbkFI^TvtU+S+j^i}kK~
zFVt7AoWfV2cgXUmdKI;Vst039ltwg3PC
literal 434
zcmeAS@N?(olHy`uVBq!ia0vp^W+2SL3?z5Yp7kC`_k*If?`1asa0=tScU#~p=lrWGQy1x|t`NNMd+k-n
z{LpDy2j2^6i$2O);xS#4T+UTZdAT@b*
z-goyNZHeo~3lo^Wuy*S(ILk#R
RcBp{@-_zC4Wt~$(69A@5y(Itu
diff --git a/static/image/tab1.png b/static/image/tab1.png
index d63846b6b9712970f7919b0d27b78963a9983bdc..6b1255da4afd078f6745f110a61f8484b15a1a79 100644
GIT binary patch
literal 218
zcmeAS@N?(olHy`uVBq!ia0vp^8X(NV3?%C=ER6$Fq5(c3u0VRn&K(f6eaFu2yLJNE
z&1o0(fD&vaL4LsuUteFXujdJVa0)1r=jq}YqH+Fg|3S_M2ObvxBiaYI>w9nP6HfiD
z@2J`?z3IjAYK!>?3^-Lxm6){{MR@&9u9PsU$R@nmB*XV*`yGw+j9CvKxE?<;VGWP7
z)}}2Jk|)$mvZ-~+Y~D04sPgRp6M7zpPkz!fPE`su`g4RaKd3dm_dPGjW(H4JKbLh*
G2~7aK=~Nm3
literal 239
zcmeAS@N?(olHy`uVBq!ia0vp^W+2SM3?%Ea%ijShi2$DvS0KG(=MFg9zGLV1T|0r?
z!!{dhfO705L4Lsuf4{!IT3fQTm?w((B@qCVi#Jz2129W|WaoR;@9YMmG9kKV7F8ALSiD;S`V%pd#cKTdUrSZ>h
aYld*GnU-nCg>C?y!rftgU$)REegzGj-@+XXKY)%Ggx-^)*$Bx-SnAy95-R=;`7ZVsZNIBtxzi0|D3l>vV3M-8A)XT%vdX
zgS9qInl8__Nu^6YRbMde*R1~!Eobl?JY1S3nxj$jbbH9v4Zm;PN$?fYb6aq(J0M+h
z#^(^lb%FZqv2zRc%fHO&RV_7}al>1@*>dCB?>9dD*QrU)E_LcMN^lo_&QfvP=68JF
t^%HmY?%BB7i0_E#zU+E^WjQ}1=2=r7_C^;dFaaIM;OXk;vd$@?2>>1!Z5#jq
diff --git a/static/image/tab2.png b/static/image/tab2.png
index be8ad9e4160d5ec6d2b578a53afac29109aa1b1f..a343fd8da3127bfb72243710ed010f530be87e41 100644
GIT binary patch
literal 372
zcmeAS@N?(olHy`uVBq!ia0vp^8X(NU3?z3ec*FxKzW|>QS0KG}*UlY4xEn+Q(XQRQ
zfMDCMZ9w+ky?cS|9lLhy+zFHb$pRIF07MH=5G(?e0x8?MW3{DJEYL*Bk|4iehWGdQ
zj~}wq=YA;_8KiM*`>ZL6m)0%rbt-G8n?F3nvy7SY45tly(V&xjubmP
zUKN|u3sil_)5S5w^FmWve&J8#yzPu3UM
z)^z^+ZnK?U2d@^22mZdm$KSEyyk3~X>Wx{w$9CRZZh88*zDd?GT?_6tn^ad$h;+@<
zPMsNe=43?9yvV6NTP<`Z7_Ml4qn1+Gx@PhZ|6_vTPHA^UbE{|QJn(URKE?au-^JG=
z?YXVD7q34s$%<)0ve!MW>H|KCrgBFvznG^`YB+ml=8{iuMYJc1?q%cLl=X7w+6l{T
ze(Nu@Pv(j|T9H3nbDGxP4KGjJxs&=+PDJ-d&HWdgoQJ}idOnBr0sYC~>FVdQ&MBb@
E08iQ5=l}o!
diff --git a/static/image/tab3-1.png b/static/image/tab3-1.png
index 37b6aa7b6fcf08e4f06fc7b360f1f4ab1dc894ee..72ae725d8ab37909c0c2cffca84ea5348808de6e 100644
GIT binary patch
literal 195
zcmeAS@N?(olHy`uVBq!ia0vp^8X(NV3?%C=ER6$Fq5(c3u0Wcx{y#(ge;~Oc?HAPNedKYF2r15nEke^DWM_s_X1I$!ZB_W%F@
literal 246
zcmeAS@N?(olHy`uVBq!ia0vp^W+2SM3?%Ea%ijShxd5LKS0K$$|DUn`KZIng{|96P
zN#;h7$jfBaNT34Fk|4iehClZ{efxglWyE2(QaPYtou`Xqh{fq-iH{9|0-O>HPI;bl
zVQQ*)qQ<9YxuCz`)W&mjG#kA8Tm=-{Gvz-P1uxLaDVm(9lauD8+&H0j%4xxE`BHM_
zexXdvuAVjDcq4btTv61c@$18h%0;Il&$*mSUhy)x$Y_#`beD`prBcH~9~;XJ0YL(c
dQW9>AK>Jmn{JZ=4lb|ff1D>vaF6*2UngG4^T9p6*
diff --git a/static/image/tab3.png b/static/image/tab3.png
index 99bb52254acfce0e7b42091bc2d20ff2b4fc4ff7..b8560b25dc5739ebfff9668821f254d021fb01bc 100644
GIT binary patch
literal 331
zcmeAS@N?(olHy`uVBq!ia0vp^8X(NU3?z3ec*FxK*8raoS0KG(*N$DgcJ0`?W9QDD
zJ9g|iaNq!tyK~o0pg52OF~CwFHjoFD+6^LsDna6VK(d9^KW+dG5-SPv3uf3{`?J4*
z%j@a21vc*+qwZvCD2QG*R%{1X>eIrYMyMp8sv1Wxgy?
zsC`pr_W!TqOq|BAjHlYfi8tJ@2dq3u?<%Y_vSu
zRGs!~h6yZuRxm~3PtbG)hlTGCq$W&c>3x*Sd1+zfx4!lJEVtyYh+k~5J&|SZ{H+1p
zuUZ`E`tnx1S@88Qmj}1Q#(ApzEAOtfl094!TJY+*En`cp`|}`9_hO(^89ZJ6T-G@y
GGywos&yz9$
literal 377
zcmeAS@N?(olHy`uVBq!ia0vp^W+2SL3?z5Yp7kC`#Rm9I`W;cidRDbg1NuU%20cE%E+P-riRQYX#B6J>;rsI<4bjCZQVaUt9NW<$8QyndP4tOGC1c+{9X;pp+f_$W?w^}^
zH9Y!UVdU0H$sMPET)pw-@f3B>nQM8|qbj&kEu;_LntoR1R7t;erD)@uy^ZSi+q&Fe
tW;eJCty$Kb60CB0v1U!rB9)sjnYVi+2K-;K#1H6j22WQ%mvv4FO#sugxWNDb
diff --git a/static/image/tab4-1.png b/static/image/tab4-1.png
index a6c864d8a88c331626039c3fab7b3a562dac43e1..e8894676e7e1a1a7b458cd6b04d02a0c76851b81 100644
GIT binary patch
literal 222
zcmeAS@N?(olHy`uVBq!ia0vp^8X(NV3?%C=ER6$Fq5(c3u0Wch{yzjU*8gX00I?Ha
z^4tN6vy}w-1vC8mxbw-b&WqE%fFebnE{-7@=aUzxdNebo7@Fxc`D8}0+}yyqEKxA!
zklG2inF&&6j)prTxSTHV=*?(IQTx~=pf|&1tDH`&u8HtQ)^w(64gN>OWN#>S7WgPR
zSvD~4@0Xa^;HpL1BkmO
zeMS#ZioGPrFPP!i$DKc(?20pbb^<6=>gnPbVsZNIMMJIz10L23`h2mwzjEyDbJx^(
z_Nz(O$+zA?OYc{^UjLK{{r1kBLBUpPcQz#-(zTc-JNdb;h1p8o@Yz=rjFL*1);Y62
zKm1;D?yotwlr_W}76|cbmmgodTV?Cnb&lLq)Y5u*mt70{z4Te>?S0KFu2zKt+xf6&%3?SOK
zZy!ix7f@^`kc0^C+`V(ht{uB}0Wnk=NERr#d&lnGyMcm0-gY3|15!V4o|iPxXql2A
zzhDNwUz=y&n85KR+ThuPvn3g!dsesDtICSJaXaGUq-(+lRCmqO#WBR<^x4a&`I;33
z94-p7xHx{yz5Vn5`<$lE8x{)PYH#lzc;vvu@?-uKX_r=a*E5#F0bE`#LYLmjWu0kW
zb+Sb^&1oL@YM&Jb!s|pr9FDBZW7aBc^%v@U@p$R^_xC3iq*?Q(+C75PPOs}*Rdl#t
z%Jb$-Wx@S16W2{xQ*@+$;pKGmjTR}T1zrhC(hCl!Je=5OqQie<$wGxXlgMI+lRe%Pzkhz&IO*Agv)eL4_pC0CvDZ_TeRFkwPkWS`iSUuS
z3Li0csnSNEju)OTjv*e$-(ES%*Q_AW@Gvl-Ab$1T@8^EoCk6AF`pV8J`VjP=JI2m~
zgTdRoSiRdzqvrX?kcm7k=apQV3PtCezBrWf=15UV(oE@KKc7Xy*8PT@lUeU)@m|i|
zceC~2w~SMN!lO5T?>)HdfPw8A!EXmnxCiqxY@PYGVY2##kgH22gE`mi>c6g5mGDi2
zeW~q(a((7viJO9TukXn5tz|dfa!Pq_m&(m0R;R*kia%Zd5h&w(TJP}0lKk-ALl;95
z|GS@%irUI}_K@(>B@W)2N4d7R#m+c&ZW~MYTOR?Rn~^>nVl#pticb5tSv_!7jMITR
S_6a~gGkCiCxvXP
diff --git a/team/qrcode/qrcode.vue b/team/qrcode/qrcode.vue
index 1c33c7a..a499e21 100644
--- a/team/qrcode/qrcode.vue
+++ b/team/qrcode/qrcode.vue
@@ -63,8 +63,8 @@
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())}`
- this.link = `https://huorantech.cn/#/join?accountId=${team.accountId}&id=${team.teamId}&isTeam=0&teamName=${this.my.info.userName}&provinceId=${uni.getStorageSync('provinceId')}&cityId=${uni.getStorageSync('cityId')}`
- // this.link = `http://121.37.12.51/backstage/#/join?accountId=${team.accountId}&id=${team.teamId}&isTeam=0&teamName=${this.my.info.userName}&provinceId=${uni.getStorageSync('provinceId')}&cityId=${uni.getStorageSync('cityId')}`
+ // this.link = `https://huorantech.cn/#/join?accountId=${team.accountId}&id=${team.teamId}&isTeam=0&teamName=${this.my.info.userName}&provinceId=${uni.getStorageSync('provinceId')}&cityId=${uni.getStorageSync('cityId')}`
+ this.link = `http://121.37.12.51/backstage/#/join?accountId=${team.accountId}&id=${team.teamId}&isTeam=0&teamName=${this.my.info.userName}&provinceId=${uni.getStorageSync('provinceId')}&cityId=${uni.getStorageSync('cityId')}`
}).catch(e => {})
},
// 二维码组件生成完成钩子。生成后把图片导出给image组件,image组件才可以长按二维码转发