#4 fox

Merged
Fox merged 2 commits from fox into master 1 week ago
  1. +4
    -0
      common.scss
  2. +8
    -2
      components/home/productSwiper.vue
  3. +0
    -4
      pages/index/cart.vue
  4. +3
    -6
      pages/index/center.vue
  5. +48
    -3
      pages/index/index.vue
  6. +0
    -1
      pages/index/product.vue
  7. +29
    -6
      pages/index/report.vue
  8. +0
    -4
      pages_order/address/addressCard.vue
  9. +0
    -2
      pages_order/address/addressPopup.vue
  10. +1
    -1
      pages_order/applyService/index.vue
  11. +0
    -5
      pages_order/applyService/serviceSelectPopup.vue
  12. +0
    -2
      pages_order/auth/wxLogin.vue
  13. +0
    -1
      pages_order/auth/wxUserInfo.vue
  14. +3
    -4
      pages_order/center/reportCard.vue
  15. +0
    -3
      pages_order/checkup/checkupBook/apply.vue
  16. +0
    -2
      pages_order/checkup/checkupBook/detail.vue
  17. +0
    -1
      pages_order/checkup/checkupCard.vue
  18. +0
    -2
      pages_order/checkup/checkupTrackingNoPopup.vue
  19. +1
    -4
      pages_order/comment/commentCard.vue
  20. +8
    -6
      pages_order/comment/commentRecords.vue
  21. +0
    -1
      pages_order/home/followUsIntro.vue
  22. +0
    -1
      pages_order/home/healthRecordsIntro.vue
  23. +10
    -6
      pages_order/home/recommendSwiper.vue
  24. +3
    -24
      pages_order/order/orderConfirm/index.vue
  25. +14
    -15
      pages_order/order/orderDetail/index.vue
  26. +2
    -6
      pages_order/order/payPopup.vue
  27. +1
    -11
      pages_order/product/agreementPopup.vue
  28. +1
    -1
      pages_order/product/productCard.vue
  29. +11
    -49
      pages_order/product/productCustomView.vue
  30. +6
    -6
      pages_order/product/productDetail.vue
  31. +0
    -2
      pages_order/product/specOptionsPopup.vue
  32. +0
    -10
      pages_order/report/compare/reportRecordCard.vue
  33. +0
    -1
      pages_order/report/compare/select.vue
  34. +2
    -2
      pages_order/report/reportSummary/index.vue
  35. +0
    -1
      pages_order/report/result/index.vue
  36. +0
    -1
      pages_order/report/result/resultSummary.vue
  37. +2
    -4
      pages_order/report/test/intro.vue
  38. BIN
      pages_order/static/temp-1.png

+ 4
- 0
common.scss View File

@ -69,3 +69,7 @@
/deep/ .uv-modal__content { /deep/ .uv-modal__content {
padding: 0 !important; padding: 0 !important;
} }
/deep/ .uv-rate__content__item__icon-wrap--half {
width: 50% !important;
}

+ 8
- 2
components/home/productSwiper.vue View File

@ -1,9 +1,9 @@
<template> <template>
<view>
<view class="product-swiper__view">
<swiper <swiper
class="swiper" class="swiper"
:current="current" :current="current"
:autoplay="true"
:autoplay="autoplay"
@change="onChange" @change="onChange"
> >
<swiper-item v-for="item in list" :key="item.id"> <swiper-item v-for="item in list" :key="item.id">
@ -49,6 +49,12 @@
export default { export default {
components: { components: {
indicator, indicator,
},
props: {
autoplay: {
type: Boolean,
default: false,
},
}, },
data() { data() {
return { return {


+ 0
- 4
pages/index/cart.vue View File

@ -134,8 +134,6 @@
// }, // },
totalPrice() { totalPrice() {
return this.selectedList.reduce((price, item) => { return this.selectedList.reduce((price, item) => {
// todo: check key
// return price + item.price * (item.count || 1)
return price + item.currentPrice return price + item.currentPrice
}, 0) }, 0)
}, },
@ -267,8 +265,6 @@
}) })
}, },
onBuy() { onBuy() {
// todo: check id
const list = this.selectedList.map(item => { const list = this.selectedList.map(item => {
const { id, product, currentPrice, specId, specName } = item const { id, product, currentPrice, specId, specName } = item


+ 3
- 6
pages/index/center.vue View File

@ -119,15 +119,12 @@
list1: [ list1: [
{ id: '001', label: '检测预约', icon: '/pages_order/static/center/icon-detectBook.png', path: '/pages_order/checkup/checkupRecords' }, { id: '001', label: '检测预约', icon: '/pages_order/static/center/icon-detectBook.png', path: '/pages_order/checkup/checkupRecords' },
{ id: '002', label: '联系客服', icon: '/pages_order/static/center/icon-service.png', key: 'service' }, { id: '002', label: '联系客服', icon: '/pages_order/static/center/icon-service.png', key: 'service' },
// todo: check key
{ id: '003', label: '服用说明', icon: '/pages_order/static/center/icon-instruc.png', path: `/pages_order/common?key=instruc&title=服用说明` },
// todo: check key
{ id: '004', label: '用户须知', icon: '/pages_order/static/center/icon-userAgreement.png', path: `/pages_order/common?key=userAgreement&title=用户须知` },
{ id: '003', label: '服用说明', icon: '/pages_order/static/center/icon-instruc.png', path: `/pages_order/common?key=medication_instructions&title=服用说明` },
{ id: '004', label: '用户须知', icon: '/pages_order/static/center/icon-userAgreement.png', path: `/pages_order/common?key=user_notice&title=用户须知` },
], ],
list2: [ list2: [
{ id: '005', label: '我的评价', icon: '/pages_order/static/center/icon-comment.png', key: 'comment' }, { id: '005', label: '我的评价', icon: '/pages_order/static/center/icon-comment.png', key: 'comment' },
// todo: check key
{ id: '006', label: '关于我们', icon: '/pages_order/static/center/icon-aboutUs.png', path: `/pages_order/common?key=aboutUs&title=关于我们` },
{ id: '006', label: '关于我们', icon: '/pages_order/static/center/icon-aboutUs.png', path: `/pages_order/common?key=about_us&title=关于我们` },
{ id: '007', label: '修改信息', icon: '/pages_order/static/center/icon-modifyInfo.png', path: `/pages_order/auth/wxUserInfo?mode=edit` }, { id: '007', label: '修改信息', icon: '/pages_order/static/center/icon-modifyInfo.png', path: `/pages_order/auth/wxUserInfo?mode=edit` },
{ id: '008', label: '退出登录', icon: '/pages_order/static/center/icon-logout.png', key: 'logout' }, { id: '008', label: '退出登录', icon: '/pages_order/static/center/icon-logout.png', key: 'logout' },
], ],


+ 48
- 3
pages/index/index.vue View File

@ -6,11 +6,15 @@
</navbar> </navbar>
<view class="content"> <view class="content">
<productSwiper></productSwiper>
<view id="productSwiper" class="swiper">
<productSwiper :autoplay="autoplay.productSwiper"></productSwiper>
</view>
<view class="section"> <view class="section">
<sectionHeader title="个性推荐" desc="Personal Recommendation"></sectionHeader> <sectionHeader title="个性推荐" desc="Personal Recommendation"></sectionHeader>
<recommend-swiper></recommend-swiper>
<view id="recommendSwiper" class="swiper">
<recommend-swiper :autoplay="autoplay.recommendSwiper"></recommend-swiper>
</view>
<health-records-intro></health-records-intro> <health-records-intro></health-records-intro>
</view> </view>
@ -62,6 +66,12 @@
}, },
data() { data() {
return { return {
isMounted: false,
observer: null,
autoplay: {
productSwiper: false,
recommendSwiper: false,
},
} }
}, },
onLoad() { onLoad() {
@ -71,7 +81,37 @@
} }
}, },
onShow() {
if (this.isMounted) {
this.observeElement()
}
},
mounted() {
this.observeElement()
this.isMounted = true
},
unmounted() {
this.observer.disconnect()
},
onHide() {
this.observer.disconnect()
this.observer = null
this.autoplay.productSwiper = false
this.autoplay.recommendSwiper = false
},
methods: { methods: {
observeElement() {
this.observer = uni.createIntersectionObserver(this, { observeAll: true, thresholds: [0, 1] });
this.observer.relativeTo('.content').observe('.swiper', res => {
if (res.intersectionRatio === 0) {
this.autoplay[res.id] = false
} else if (res.intersectionRatio === 1) {
this.autoplay[res.id] = true
}
})
},
}, },
} }
</script> </script>
@ -91,8 +131,13 @@
} }
.content { .content {
// padding: 80rpx 32rpx 182rpx 32rpx;
width: 100vw;
height: calc(100vh - (var(--status-bar-height) + 120rpx) - (env(safe-area-inset-bottom) + 120rpx));
padding: 70rpx 0 182rpx 0; padding: 70rpx 0 182rpx 0;
// padding-bottom: calc(env(safe-area-inset-bottom) + 120rpx + 182rpx);
box-sizing: border-box;
overflow-x: hidden;
overflow-y: auto;
} }
.section { .section {


+ 0
- 1
pages/index/product.vue View File

@ -95,7 +95,6 @@
onTabChange(e) { onTabChange(e) {
console.log('current', e.index) console.log('current', e.index)
this.current = e.index this.current = e.index
// todo
this.queryParams.pageNo = 1 this.queryParams.pageNo = 1
this.queryParams.pageSize = 10 this.queryParams.pageSize = 10


+ 29
- 6
pages/index/report.vue View File

@ -12,7 +12,7 @@
<recommend-test></recommend-test> <recommend-test></recommend-test>
</view> </view>
<view class="section">
<view id="paperList" class="section">
<view class="filter"> <view class="filter">
<view class="filter-item" <view class="filter-item"
v-for="item in filters" v-for="item in filters"
@ -67,17 +67,17 @@
} }
}, },
onShow() { onShow() {
console.log('onShow')
if(uni.getStorageSync('token')){ if(uni.getStorageSync('token')){
this.$store.commit('getUserInfo') this.$store.commit('getUserInfo')
this.fetchRecentReport()
this.getData()
this.initData()
} }
}, },
methods: { methods: {
async fetchRecentReport() {
async initData() {
try { try {
const result = await this.$fetch('getRecentReport') const result = await this.$fetch('getRecentReport')
if (result?.length) {
const [currentReport, lastReport] = result const [currentReport, lastReport] = result
let change = 0 let change = 0
@ -92,7 +92,30 @@
score: parseInt(currentReport.score), score: parseInt(currentReport.score),
change, change,
} }
console.log('summaryData', this.summaryData)
this.getData()
return
}
this.queryParams.type = 1 //
await this.getData()
this.summaryData = {
id: null,
paperId: this.list[0]?.id,
score: 0,
change: 0,
}
this.$nextTick(() => {
uni.pageScrollTo({
// scrollTop: 600, //
duration: 300, // ms
selector: '#paperList' // H5
})
})
} catch (err) { } catch (err) {
} }


+ 0
- 4
pages_order/address/addressCard.vue View File

@ -63,8 +63,6 @@
return return
} }
// todo: set this address as default
this.$emit('defaultChange', val) this.$emit('defaultChange', val)
}, },
get() { get() {
@ -86,7 +84,6 @@
this.isDefault = 1 this.isDefault = 1
}, },
onEdit() { onEdit() {
// todo
this.$emit('edit') this.$emit('edit')
}, },
onDelete() { onDelete() {
@ -94,7 +91,6 @@
title: '确认删除?', title: '确认删除?',
success : e => { success : e => {
if(e.confirm){ if(e.confirm){
// todo
this.$emit('delete') this.$emit('delete')
} }
} }


+ 0
- 2
pages_order/address/addressPopup.vue View File

@ -286,8 +286,6 @@
.footer { .footer {
width: 100%; width: 100%;
// todocheck
// height: 214rpx;
padding: 32rpx 40rpx; padding: 32rpx 40rpx;
box-sizing: border-box; box-sizing: border-box;
border-top: 2rpx solid #F1F1F1; border-top: 2rpx solid #F1F1F1;


+ 1
- 1
pages_order/applyService/index.vue View File

@ -212,6 +212,7 @@
let params = { let params = {
orderId: this.id, orderId: this.id,
productId: this.applyServiceProduct.map(item => item.productId).join(','), productId: this.applyServiceProduct.map(item => item.productId).join(','),
type,
} }
if (type == 2) { // if (type == 2) { //
@ -221,7 +222,6 @@
params.num = num params.num = num
params.price = price params.price = price
params.image = images.join(',') params.image = images.join(',')
// todo: check key
params.phone = phone params.phone = phone
} }


+ 0
- 5
pages_order/applyService/serviceSelectPopup.vue View File

@ -63,7 +63,6 @@
return { return {
id: null, id: null,
appletOrderProductList: [], appletOrderProductList: [],
// todo: check type value
typeOptions: [ typeOptions: [
{ {
id: '001', id: '001',
@ -83,7 +82,6 @@
], ],
form: { form: {
type: null, type: null,
// todo: check key
appletOrderProductList: [], appletOrderProductList: [],
}, },
rules: { rules: {
@ -139,7 +137,6 @@
appletOrderProductList, appletOrderProductList,
} = this.form } = this.form
// todo: submit
this.$store.commit('setApplyServiceProduct', appletOrderProductList) this.$store.commit('setApplyServiceProduct', appletOrderProductList)
this.$utils.navigateTo(`/pages_order/applyService/index?id=${this.id}&type=${type}`) this.$utils.navigateTo(`/pages_order/applyService/index?id=${this.id}&type=${type}`)
@ -249,8 +246,6 @@
.footer { .footer {
width: 100%; width: 100%;
// todocheck
// height: 214rpx;
padding: 32rpx 40rpx; padding: 32rpx 40rpx;
box-sizing: border-box; box-sizing: border-box;
border-top: 2rpx solid #F1F1F1; border-top: 2rpx solid #F1F1F1;


+ 0
- 2
pages_order/auth/wxLogin.vue View File

@ -25,10 +25,8 @@
</uv-checkbox-group> </uv-checkbox-group>
<view class="desc"> <view class="desc">
我已阅读并同意 我已阅读并同意
<!-- todo: 替换配置项key -->
<text class="highlight" @click="$refs.modal.open('user_ys', '服务协议与隐私条款')">服务协议与隐私条款</text> <text class="highlight" @click="$refs.modal.open('user_ys', '服务协议与隐私条款')">服务协议与隐私条款</text>
<!-- todo: 替换配置项key -->
<text class="highlight" @click="$refs.modal.open('user_bh', '个人信息保护指引')">个人信息保护指引</text> <text class="highlight" @click="$refs.modal.open('user_bh', '个人信息保护指引')">个人信息保护指引</text>
</view> </view>
</view> </view>


+ 0
- 1
pages_order/auth/wxUserInfo.vue View File

@ -166,7 +166,6 @@
avatar, avatar,
} }
// todo: check 415 Unsupported Media Type
const res = await this.$fetch('updateInfo', params, false) const res = await this.$fetch('updateInfo', params, false)
if (res.code == 200) { if (res.code == 200) {


+ 3
- 4
pages_order/center/reportCard.vue View File

@ -68,9 +68,9 @@
data() { data() {
return { return {
data: { data: {
BMI: 20.3,
BMIchange: -0.2,
BMItag: '正常',
BMI: null,
BMIchange: null,
BMItag: null,
fat: null, fat: null,
fatChange: null, fatChange: null,
fatTag: null, fatTag: null,
@ -186,7 +186,6 @@
.divider { .divider {
flex: none; flex: none;
// todo
width: 4rpx; width: 4rpx;
height: 32rpx; height: 32rpx;
background: #B5B8CE; background: #B5B8CE;


+ 0
- 3
pages_order/checkup/checkupBook/apply.vue View File

@ -432,7 +432,6 @@
} }
if (currentHour > startHour) { if (currentHour > startHour) {
// todo: check
startHour = currentHour startHour = currentHour
} }
@ -557,8 +556,6 @@
}); });
setTimeout(() => { setTimeout(() => {
// todo: check
// this.$utils.navigateBack()
this.$utils.redirectTo(`/pages_order/checkup/checkupBook/detail?id=${this.id}`) this.$utils.redirectTo(`/pages_order/checkup/checkupBook/detail?id=${this.id}`)
}, 800) }, 800)


+ 0
- 2
pages_order/checkup/checkupBook/detail.vue View File

@ -226,11 +226,9 @@
this.$refs.checkupTrackingNoPopup.open(this.id) this.$refs.checkupTrackingNoPopup.open(this.id)
}, },
onBook() { onBook() {
// todo: check redirectTo or navigateTo
this.$utils.redirectTo(`/pages_order/checkup/checkupBook/apply?id=${this.detail.id}&type=${this.detail.type}`) this.$utils.redirectTo(`/pages_order/checkup/checkupBook/apply?id=${this.detail.id}&type=${this.detail.type}`)
}, },
onEdit() { onEdit() {
// todo: check redirectTo or navigateTo
this.$utils.redirectTo(`/pages_order/checkup/checkupBook/apply?id=${this.detail.id}&type=${this.detail.type}`) this.$utils.redirectTo(`/pages_order/checkup/checkupBook/apply?id=${this.detail.id}&type=${this.detail.type}`)
}, },
async onCancel() { async onCancel() {


+ 0
- 1
pages_order/checkup/checkupCard.vue View File

@ -14,7 +14,6 @@
<template v-if="data.status == 0"> <template v-if="data.status == 0">
<view class="flex row"> <view class="flex row">
<view class="row-label">下单时间</view> <view class="row-label">下单时间</view>
<!-- todo: check key -->
<view class="row-content">{{ data.createTime }}</view> <view class="row-content">{{ data.createTime }}</view>
</view> </view>
</template> </template>


+ 0
- 2
pages_order/checkup/checkupTrackingNoPopup.vue View File

@ -165,8 +165,6 @@
.footer { .footer {
width: 100%; width: 100%;
// todocheck
// height: 214rpx;
padding: 32rpx 40rpx; padding: 32rpx 40rpx;
box-sizing: border-box; box-sizing: border-box;
border-top: 2rpx solid #F1F1F1; border-top: 2rpx solid #F1F1F1;


+ 1
- 4
pages_order/comment/commentCard.vue View File

@ -1,16 +1,13 @@
<template> <template>
<view class="card"> <view class="card">
<!-- todo: delete -->
<view class="flex header"> <view class="flex header">
<view class="flex left"> <view class="flex left">
<view class="avatar"> <view class="avatar">
<!-- todo: check key -->
<image class="avatar-img" :src="data.user.avatar"></image> <image class="avatar-img" :src="data.user.avatar"></image>
</view> </view>
<view class="info"> <view class="info">
<view class="name">{{ data.user.name }}</view> <view class="name">{{ data.user.name }}</view>
<view>{{ $dayjs(data.createTime).format('YYYY-MM-DD') }}</view> <view>{{ $dayjs(data.createTime).format('YYYY-MM-DD') }}</view>
<!-- todo: check key -->
<!-- <view>{{ `${data.countDesc || ''} | ${$dayjs(data.createTime).format('YYYY-MM-DD')}` }}</view> --> <!-- <view>{{ `${data.countDesc || ''} | ${$dayjs(data.createTime).format('YYYY-MM-DD')}` }}</view> -->
</view> </view>
</view> </view>
@ -63,7 +60,7 @@
images() { images() {
const { image } = this.data || {} const { image } = this.data || {}
return image?.split?.(',')
return image?.split?.(',').filter(val => val)
} }
}, },
methods: { methods: {


+ 8
- 6
pages_order/comment/commentRecords.vue View File

@ -1,7 +1,7 @@
<template> <template>
<view class="page__view"> <view class="page__view">
<navbar :title="title" leftClick @leftClick="$utils.navigateBack" color="#191919" bgColor="#FFFFFF" />
<navbar title="我的评价" leftClick @leftClick="$utils.navigateBack" color="#191919" bgColor="#FFFFFF" />
<view class="main"> <view class="main">
<view class="tabs"> <view class="tabs">
@ -51,12 +51,15 @@
}, },
data() { data() {
return { return {
title: '我的评价',
tabs: [ tabs: [
{ name: '全部' }, { name: '全部' },
{ name: '有图/视频' }, { name: '有图/视频' },
{ name: '最新' }, { name: '最新' },
], ],
queryParams: {
pageNo: 1,
pageSize: 10,
},
mixinsListApi: 'myEvaluate', mixinsListApi: 'myEvaluate',
} }
}, },
@ -69,12 +72,11 @@
methods: { methods: {
//tab //tab
clickTabs({ index }) { clickTabs({ index }) {
// todo
return
// type01
if (index == 0) { if (index == 0) {
delete this.queryParams.status
delete this.queryParams.type
} else { } else {
this.queryParams.status = index - 1
this.queryParams.type = index - 1
} }
this.getData() this.getData()
}, },


+ 0
- 1
pages_order/home/followUsIntro.vue View File

@ -3,7 +3,6 @@
<view> <view>
<view class="card" v-for="article in list" :key="article.id" @click="jumpToArticle(article.id)"> <view class="card" v-for="article in list" :key="article.id" @click="jumpToArticle(article.id)">
<image class="card-img" :src="article.image" mode="scaleToFill"></image> <image class="card-img" :src="article.image" mode="scaleToFill"></image>
<!-- todo: check is need to show? -->
<!-- <view class="card-title">{{ article.title }}</view> --> <!-- <view class="card-title">{{ article.title }}</view> -->
</view> </view>
</view> </view>


+ 0
- 1
pages_order/home/healthRecordsIntro.vue View File

@ -2,7 +2,6 @@
<view class="view"> <view class="view">
<view class="top"> <view class="top">
<view class="route"> <view class="route">
<!-- todo -->
<image class="img" :src="configList.home_science_3" mode="widthFix"></image> <image class="img" :src="configList.home_science_3" mode="widthFix"></image>
</view> </view>
</view> </view>


+ 10
- 6
pages_order/home/recommendSwiper.vue View File

@ -3,15 +3,14 @@
<swiper <swiper
class="swiper" class="swiper"
:current="current" :current="current"
:autoplay="true"
:autoplay="autoplay"
:display-multiple-items="1.5" :display-multiple-items="1.5"
@change="onChange" @change="onChange"
> >
<swiper-item v-for="item in list" :key="item.id" style="display: inline-block;"> <swiper-item v-for="item in list" :key="item.id" style="display: inline-block;">
<view class="swiper-item"> <view class="swiper-item">
<view class="swiper-item-content"> <view class="swiper-item-content">
<!-- todo: check img url? -->
<image class="img" src="@/pages_order/static/temp-1.png" mode="widthFix"></image>
<image class="img" :src="item.image" mode="widthFix"></image>
<view class="content"> <view class="content">
<view> <view>
@ -47,6 +46,12 @@
export default { export default {
components: { components: {
indicator, indicator,
},
props: {
autoplay: {
type: Boolean,
default: false,
},
}, },
data() { data() {
return { return {
@ -63,12 +68,11 @@
let result = await this.$fetch('getPersonalized') let result = await this.$fetch('getPersonalized')
this.list = result.map(item => { this.list = result.map(item => {
const { id, title, subTitle, info, btnTxt, paperId } = item
const { id, title, subTitle, info, image, btnTxt, paperId } = item
return { return {
id, id,
// todo: check img url?
// url
image,
arr: [ arr: [
{ text: title, class: 'font1' }, { text: title, class: 'font1' },
{ text: subTitle, class: 'font2' }, { text: subTitle, class: 'font2' },


+ 3
- 24
pages_order/order/orderConfirm/index.vue View File

@ -51,12 +51,9 @@
</uv-checkbox-group> </uv-checkbox-group>
<view class="desc"> <view class="desc">
我已阅读并同意 我已阅读并同意
<!-- todo: 替换配置项key -->
<text class="highlight" @click="$refs.modal.open('config_agreement', '用户协议')">用户协议</text>
<!-- todo: 替换配置项key -->
<text class="highlight" @click="$refs.modal.open('config_privacy', '隐私协议')">隐私协议</text>
<!-- todo: 替换配置项key -->
<text class="highlight" @click="$refs.modal.open('config_privacy', '消费者告知')">消费者告知</text>
<text class="highlight" @click="$refs.modal.open('user_agreement', '用户协议')">用户协议</text>
<text class="highlight" @click="$refs.modal.open('privacy_policy', '隐私协议')">隐私协议</text>
<text class="highlight" @click="$refs.modal.open('consumer_notification', '消费者告知')">消费者告知</text>
</view> </view>
</view> </view>
<view class="flex bar"> <view class="flex bar">
@ -126,15 +123,6 @@
// todo: check include Overseas Product ? // todo: check include Overseas Product ?
// this.$utils.navigateTo('/pages_order/order/userInfo/infoFill') // this.$utils.navigateTo('/pages_order/order/userInfo/infoFill')
return
this.orderData = {
id: '001',
number: 'BH872381728321983929',
createTime: '2025-04-28 08:14',
}
console.log('orderData', this.orderData)
}, },
onUnload() { onUnload() {
this.$store.commit('setAddressInfo', null) this.$store.commit('setAddressInfo', null)
@ -211,28 +199,19 @@
return this.productList.every(item => item.type == '1') return this.productList.every(item => item.type == '1')
}, },
onPaySuccess() { onPaySuccess() {
// todo: check jump?
setTimeout(() => { setTimeout(() => {
if (this.isDetectProduct()) { if (this.isDetectProduct()) {
// uni.reLaunch({
// url: `/pages_order/order/orderDetail/index?id=${id}`
// });
uni.reLaunch({ uni.reLaunch({
url: `/pages_order/checkup/checkupRecords` url: `/pages_order/checkup/checkupRecords`
}); });
return return
} }
// todo: check jump to order list page ?
uni.reLaunch({ uni.reLaunch({
url: `/pages_order/order/orderList/index` url: `/pages_order/order/orderList/index`
}); });
}, 700) }, 700)
// uni.reLaunch({
// url: '/pages_order/order/orderList/index'
// })
}, },
onPayCancel() { onPayCancel() {
// todo: check jump to order list page?
uni.redirectTo({ uni.redirectTo({
url: `/pages_order/order/orderList/index?index=1` url: `/pages_order/order/orderList/index?index=1`
}); });


+ 14
- 15
pages_order/order/orderDetail/index.vue View File

@ -23,12 +23,10 @@
<view class="row">{{ item.productName }}</view> <view class="row">{{ item.productName }}</view>
<view class="flex row"> <view class="flex row">
<view class="row-label">产品类型</view> <view class="row-label">产品类型</view>
<!-- todo: check key -->
<view class="row-content">{{ getTypeDesc(item.type) || '--' }}</view> <view class="row-content">{{ getTypeDesc(item.type) || '--' }}</view>
</view> </view>
<view class="flex row"> <view class="flex row">
<view class="row-label">产品内容</view> <view class="row-label">产品内容</view>
<!-- todo: check key -->
<view class="row-content">{{ item.content || '--' }}</view> <view class="row-content">{{ item.content || '--' }}</view>
</view> </view>
<view class="flex price"> <view class="flex price">
@ -119,16 +117,17 @@
<template v-else-if="status == 1"> <template v-else-if="status == 1">
<button class="flex col btn" @click="onApplyService">申请售后</button> <button class="flex col btn" @click="onApplyService">申请售后</button>
<!-- 自采检测 --> <!-- 自采检测 -->
<template v-if="detectProduct && detectProduct.subscribeType == 0">
<!-- <template v-if="detectProduct && detectProduct.subscribeType == 0">
<button class="flex col btn btn-primary" @click="onDetectModify">修改</button> <button class="flex col btn btn-primary" @click="onDetectModify">修改</button>
</template>
</template> -->
</template> </template>
<!-- 待收货 --> <!-- 待收货 -->
<template v-else-if="status == 2"> <template v-else-if="status == 2">
<button class="flex col btn" @click="onApplyService">申请售后</button> <button class="flex col btn" @click="onApplyService">申请售后</button>
<button class="flex col btn btn-primary" @click="onConfirmReceipt">确认收货</button>
<!-- 检测 subscribeType: 0自采1上门2到店3已取消 --> <!-- 检测 subscribeType: 0自采1上门2到店3已取消 -->
<template v-if="detectProduct">
<!-- 自采检测 -->
<!-- <template v-if="detectProduct">
自采检测
<template v-if="detectProduct.subscribeType == 0"> <template v-if="detectProduct.subscribeType == 0">
<button class="flex col btn btn-primary" @click="onDetectSendBack">线上回寄试剂盒</button> <button class="flex col btn btn-primary" @click="onDetectSendBack">线上回寄试剂盒</button>
</template> </template>
@ -136,10 +135,10 @@
<button class="flex col btn btn-primary" @click="onDetectBook">检测预约</button> <button class="flex col btn btn-primary" @click="onDetectBook">检测预约</button>
</template> </template>
</template> </template>
<!-- 其他商品 -->
其他商品
<template v-else> <template v-else>
<button class="flex col btn btn-primary" @click="onConfirmReceipt">确认收货</button> <button class="flex col btn btn-primary" @click="onConfirmReceipt">确认收货</button>
</template>
</template> -->
</template> </template>
<!-- 待评价 --> <!-- 待评价 -->
<template v-else-if="status == 3"> <template v-else-if="status == 3">
@ -208,15 +207,15 @@
statusDesc() { statusDesc() {
return STATUS_AND_DESC_MAPPING[this.status] return STATUS_AND_DESC_MAPPING[this.status]
}, },
detectProduct() {
const { appletOrderProductList } = this.orderData || {}
// detectProduct() {
// const { appletOrderProductList } = this.orderData || {}
if (appletOrderProductList?.length == 1 && appletOrderProductList?.[0]?.type == 1) { // type: 012
return appletOrderProductList[0]
}
// if (appletOrderProductList?.length == 1 && appletOrderProductList?.[0]?.type == 1) { // type: 012
// return appletOrderProductList[0]
// }
return null
},
// return null
// },
}, },
onShow() { onShow() {
console.log('onShow') console.log('onShow')


+ 2
- 6
pages_order/order/payPopup.vue View File

@ -43,10 +43,8 @@
</uv-checkbox-group> </uv-checkbox-group>
<view class="desc"> <view class="desc">
我已阅读并同意 我已阅读并同意
<!-- todo: 替换配置项key -->
<text class="highlight" @click="$refs.modal.open('config_privacy', '应用内支付用户协议')">应用内支付用户协议</text>
<!-- todo: 替换配置项key -->
<text class="highlight" @click="$refs.modal.open('config_agreement', '支付与隐私的声明')">支付与隐私的声明</text>
<text class="highlight" @click="$refs.modal.open('payment_user_agreement', '应用内支付用户协议')">应用内支付用户协议</text>
<text class="highlight" @click="$refs.modal.open('statement_on_payment_and_privacy', '支付与隐私的声明')">支付与隐私的声明</text>
</view> </view>
</view> </view>
</view> </view>
@ -287,8 +285,6 @@
.footer { .footer {
width: 100%; width: 100%;
// todocheck
// height: 214rpx;
padding: 32rpx 40rpx; padding: 32rpx 40rpx;
box-sizing: border-box; box-sizing: border-box;
border-top: 2rpx solid #F1F1F1; border-top: 2rpx solid #F1F1F1;


+ 1
- 11
pages_order/product/agreementPopup.vue View File

@ -28,17 +28,7 @@ export default {
}, },
methods: { methods: {
open() { open() {
// todo
// this.content = this.configList[key]
this.content = `
<p>
亲爱的用户欢迎选购我们的健康营养素包<br/>
在购买前请仔细阅读以下内容我们所提供的营养素包均严格遵循国际健康标准与规范进行研发和生产旨在根据您的问卷调查或个人体检情况精准匹配适合您的营养补充方案<br/>
在下单购买时请确保您所提供的身体信息真实准确以便我们为您推荐最合适的营养素组合同时由于海外运输及海关政策可能会影响包裹的送达时间我们会在发货后第一时间为您更新物流信息预计送达时间仅供参考请耐心等待<br/>
若您在购买过程中有任何疑问或是收到产品后遇到任何问题我们的客服团队将竭诚为您提供 24 小时服务祝您健康常伴
</p>
`
this.content = this.configList.tips_cross_border
this.$refs.popup.open() this.$refs.popup.open()
}, },


+ 1
- 1
pages_order/product/productCard.vue View File

@ -1,7 +1,7 @@
<template> <template>
<view class="card product-card__view" :style="cardStyle" @click="jumpToProductDetail"> <view class="card product-card__view" :style="cardStyle" @click="jumpToProductDetail">
<view class="card-img flex" :style="imgStyle"> <view class="card-img flex" :style="imgStyle">
<image class="img" :src="coverImg" mode="scaleToFill"></image>
<image class="img" :src="coverImg" mode="aspectFit"></image>
</view> </view>
<view class="card-detail"> <view class="card-detail">
<view class="product-name text-ellipsis">{{ data.name }}</view> <view class="product-name text-ellipsis">{{ data.name }}</view>


+ 11
- 49
pages_order/product/productCustomView.vue View File

@ -25,6 +25,7 @@
}" }"
lineWidth="0" lineWidth="0"
lineHeight="0" lineHeight="0"
:current="level1"
@change="onLevel1TabChange" @change="onLevel1TabChange"
></uv-tabs> ></uv-tabs>
<view v-if="tabs[level1] && tabs[level1].children && tabs[level1].children.length" <view v-if="tabs[level1] && tabs[level1].children && tabs[level1].children.length"
@ -48,6 +49,7 @@
}" }"
lineWidth="0" lineWidth="0"
lineHeight="0" lineHeight="0"
:current="level2"
@change="onLevel2TabChange" @change="onLevel2TabChange"
></uv-tabs> ></uv-tabs>
</view> </view>
@ -96,50 +98,6 @@
mounted() { mounted() {
this.fetchCategory() this.fetchCategory()
return
this.list = [
{
id: '001',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包',
sales: 24770,
price: 688.00,
originalPrice: 1664,
},
{
id: '002',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包',
sales: 24770,
price: 688.00,
originalPrice: 1664,
},
{
id: '003',
url: '/pages_order/static/index/recommend-pic.png',
name: '月度装定制营养包',
sales: 24770,
price: 688.00,
originalPrice: 1664,
},
]
let children = [
{ name: '草本类' },
{ name: '蔬菜类' },
{ name: '维生素类' },
{ name: '草本类' },
{ name: '蔬菜类' },
]
this.tabs = [
{ name: '全部' },
{ name: '皮肤', children, },
{ name: '身材管理', children, },
{ name: '精力', children, },
]
}, },
methods: { methods: {
async fetchCategory() { async fetchCategory() {
@ -147,10 +105,9 @@
let result = await this.$fetch('getProductCategory', { type: this.type }) // type: 012 let result = await this.$fetch('getProductCategory', { type: this.type }) // type: 012
this.tabs = result.reduce((arr, item) => { this.tabs = result.reduce((arr, item) => {
const { id, name } = item
const { id, name, child } = item
// todo: check children?
let obj = { id, name }
let obj = { id, name, children: child }
arr.push(obj) arr.push(obj)
@ -163,13 +120,18 @@
onLevel1TabChange(e) { onLevel1TabChange(e) {
console.log('level1', e.index) console.log('level1', e.index)
this.level1 = e.index this.level1 = e.index
this.level2 = this.tabs[this.level1].children?.length ? 0 : null
if (this.tabs[this.level1].children?.length) {
this.level2 = 0
this.$emit('categoryChange', { classId: this.tabs[this.level1].children[this.level2].id })
} else {
this.level2 = null
this.$emit('categoryChange', { classId: this.tabs[this.level1].id }) this.$emit('categoryChange', { classId: this.tabs[this.level1].id })
}
}, },
onLevel2TabChange(e) { onLevel2TabChange(e) {
console.log('level2', e.index) console.log('level2', e.index)
this.level2 = e.index this.level2 = e.index
// todo
this.$emit('categoryChange', { classId: this.tabs[this.level1].children[this.level2].id })
}, },
}, },
} }


+ 6
- 6
pages_order/product/productDetail.vue View File

@ -7,8 +7,7 @@
<view class="summary"> <view class="summary">
<view class="card info"> <view class="card info">
<!-- todo: check key -->
<view class="name">{{ detail.name }}</view>
<view class="name">{{ detail.content || data.name }}</view>
<!-- todo: check key --> <!-- todo: check key -->
<view class="flex tags" v-if="detail.tags"> <view class="flex tags" v-if="detail.tags">
<view class="tag" v-for="(tag, tIdx) in detail.tags" :key="tIdx"> <view class="tag" v-for="(tag, tIdx) in detail.tags" :key="tIdx">
@ -48,7 +47,6 @@
<view class="flex row"> <view class="flex row">
<view class="flex row-content"> <view class="flex row-content">
<view class="label">服务</view> <view class="label">服务</view>
<!-- todo: check key -->
<view class="value">{{ detail.service }}</view> <view class="value">{{ detail.service }}</view>
</view> </view>
</view> </view>
@ -181,7 +179,7 @@
}, },
onBuy() { onBuy() {
const { specId, specs } = this.detail
const { specId, specs, isCrossBorder } = this.detail
console.log('specId', specId, 'specs', specs, !specId && specs?.length) console.log('specId', specId, 'specs', specs, !specId && specs?.length)
@ -191,8 +189,10 @@
return return
} }
// todo: check timing
// this.$refs.agreementPopup.open()
if (isCrossBorder == 'Y') {
this.$refs.agreementPopup.open()
return
}
this.$store.commit('createOrder', [this.detail]) this.$store.commit('createOrder', [this.detail])
}, },


+ 0
- 2
pages_order/product/specOptionsPopup.vue View File

@ -251,8 +251,6 @@ export default {
.footer { .footer {
width: 100%; width: 100%;
// todocheck
// height: 214rpx;
padding: 32rpx 40rpx; padding: 32rpx 40rpx;
box-sizing: border-box; box-sizing: border-box;


+ 0
- 10
pages_order/report/compare/reportRecordCard.vue View File

@ -62,16 +62,6 @@
} }
}, },
methods: { methods: {
onChange(arr) {
this.checked = arr[0] == 1 ? true : false
},
jumpToReport() {
console.log('data', this.data)
this.$utils.navigateTo(`/pages_order/report/result/index?id=${this.data.id}`)
},
jumpToContinueAnswer() {
// todo
},
}, },
} }
</script> </script>


+ 0
- 1
pages_order/report/compare/select.vue View File

@ -44,7 +44,6 @@
// queryParams: { // queryParams: {
// pageNo: 1, // pageNo: 1,
// pageSize: 10, // pageSize: 10,
// // todo
// status: 1, // status: 1,
// }, // },
// mixinsListApi: '', // mixinsListApi: '',


+ 2
- 2
pages_order/report/reportSummary/index.vue View File

@ -9,7 +9,7 @@
<text class="score-change-unit"></text> <text class="score-change-unit"></text>
</view> </view>
<button class="btn btn-test" @click="jumpToTest">重新测评</button>
<button v-if="data.paperId" class="btn btn-test" @click="jumpToTest">重新测评</button>
<view class="user flex"> <view class="user flex">
<view class="avatar"> <view class="avatar">
@ -19,7 +19,7 @@
<view class="info-title"><text class="highlight">{{ userInfo.name }}</text><text>的专属配方</text></view> <view class="info-title"><text class="highlight">{{ userInfo.name }}</text><text>的专属配方</text></view>
<view class="info-desc">{{ userInfo.phone }}</view> <view class="info-desc">{{ userInfo.phone }}</view>
</view> </view>
<button class="btn btn-formula" @click="showFormula">查看配方</button>
<button v-if="data.id" class="btn btn-formula" @click="showFormula">查看配方</button>
</view> </view>
</view> </view>
</template> </template>


+ 0
- 1
pages_order/report/result/index.vue View File

@ -72,7 +72,6 @@
}) })
}, },
unmounted() { unmounted() {
console.log('unmounted')
this.observer.disconnect() this.observer.disconnect()
}, },
methods: { methods: {


+ 0
- 1
pages_order/report/result/resultSummary.vue View File

@ -23,7 +23,6 @@
<view class="flex"> <view class="flex">
<radarChart :score="data.scoreDetail"></radarChart> <radarChart :score="data.scoreDetail"></radarChart>
</view> </view>
<!-- todo: use detail -->
<view class="section" v-for="item in data.detail" :key="item.id"> <view class="section" v-for="item in data.detail" :key="item.id">
<div class="title"> <div class="title">
<div class="title-zh">{{ item.name }}</div> <div class="title-zh">{{ item.name }}</div>


+ 2
- 4
pages_order/report/test/intro.vue View File

@ -27,10 +27,8 @@
</uv-checkbox-group> </uv-checkbox-group>
<view class="desc"> <view class="desc">
我已阅读并同意 我已阅读并同意
<!-- todo: 替换配置项key -->
<text class="highlight" @click="$refs.modal.open('config_agreement', '用户协议')">用户协议</text>
<!-- todo: 替换配置项key -->
<text class="highlight" @click="$refs.modal.open('config_privacy', '隐私协议')">隐私协议</text>
<text class="highlight" @click="$refs.modal.open('user_agreement', '用户协议')">用户协议</text>
<text class="highlight" @click="$refs.modal.open('privacy_policy', '隐私协议')">隐私协议</text>
</view> </view>
</view> </view>
<view class="bar"> <view class="bar">


BIN
pages_order/static/temp-1.png View File

Before After
Width: 300  |  Height: 204  |  Size: 85 KiB

Loading…
Cancel
Save