!71 修复一些 issues 提到的问题

Merge pull request !71 from puhui999/master
pull/73/MERGE
芋道源码 2024-08-09 13:38:49 +00:00 committed by Gitee
commit 374ccf43fd
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 16 additions and 6 deletions

View File

@ -63,7 +63,7 @@
<detail-progress :percent="state.percent" />
</view>
<view class="title-text ss-line-2 ss-m-b-6">{{ state.goodsInfo?.name }}</view>
<view class="title-text ss-line-2 ss-m-b-6">{{ state.goodsInfo.name || '' }}</view>
<view class="subtitle-text ss-line-1">{{ state.goodsInfo.introduction }}</view>
</view>
@ -135,7 +135,7 @@
</template>
<script setup>
import { reactive, computed, ref } from 'vue';
import { reactive, computed, ref, unref } from 'vue';
import { onLoad, onPageScroll } from '@dcloudio/uni-app';
import sheep from '@/sheep';
import { isEmpty, min } from 'lodash-es';
@ -198,7 +198,7 @@
// TODO
const shareInfo = computed(() => {
if (isEmpty(activity)) return {};
if (isEmpty(unref(activity))) return {};
return sheep.$platform.share.getShareInfo(
{
title: activity.value.name,

View File

@ -86,7 +86,7 @@
//
function onSelectAddress() {
let emitName = 'SELECT_ADDRESS'
let addressPage = '/pages/user/address/list'
let addressPage = '/pages/user/address/list?type=select';
if (state.value.deliveryType === 2){
emitName = 'SELECT_PICK_UP_INFO'
addressPage = '/pages/user/goods_details_store/index'

View File

@ -39,8 +39,8 @@
</template>
<script setup>
import { reactive, onBeforeMount } from 'vue';
import { onShow } from '@dcloudio/uni-app';
import { onBeforeMount, reactive } from 'vue';
import { onShow, onLoad } from '@dcloudio/uni-app';
import sheep from '@/sheep';
import { isEmpty } from 'lodash-es';
import AreaApi from '@/sheep/api/system/area';
@ -49,10 +49,14 @@
const state = reactive({
list: [], //
loading: true,
openType: '', //
});
//
const onSelect = (addressInfo) => {
if (state.openType !== 'select'){ //
return
}
uni.$emit('SELECT_ADDRESS', {
addressInfo,
});
@ -110,6 +114,12 @@
// #endif
}
onLoad((option) => {
if (option.type) {
state.openType = option.type;
}
});
onShow(async () => {
state.list = (await AddressApi.getAddressList()).data;
state.loading = false;