commit
374ccf43fd
|
@ -63,7 +63,7 @@
|
||||||
<detail-progress :percent="state.percent" />
|
<detail-progress :percent="state.percent" />
|
||||||
</view>
|
</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 class="subtitle-text ss-line-1">{{ state.goodsInfo.introduction }}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, computed, ref } from 'vue';
|
import { reactive, computed, ref, unref } from 'vue';
|
||||||
import { onLoad, onPageScroll } from '@dcloudio/uni-app';
|
import { onLoad, onPageScroll } from '@dcloudio/uni-app';
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { isEmpty, min } from 'lodash-es';
|
import { isEmpty, min } from 'lodash-es';
|
||||||
|
@ -198,7 +198,7 @@
|
||||||
|
|
||||||
// 分享信息 TODO 芋艿:待接入
|
// 分享信息 TODO 芋艿:待接入
|
||||||
const shareInfo = computed(() => {
|
const shareInfo = computed(() => {
|
||||||
if (isEmpty(activity)) return {};
|
if (isEmpty(unref(activity))) return {};
|
||||||
return sheep.$platform.share.getShareInfo(
|
return sheep.$platform.share.getShareInfo(
|
||||||
{
|
{
|
||||||
title: activity.value.name,
|
title: activity.value.name,
|
||||||
|
|
|
@ -86,7 +86,7 @@
|
||||||
// 选择地址
|
// 选择地址
|
||||||
function onSelectAddress() {
|
function onSelectAddress() {
|
||||||
let emitName = 'SELECT_ADDRESS'
|
let emitName = 'SELECT_ADDRESS'
|
||||||
let addressPage = '/pages/user/address/list'
|
let addressPage = '/pages/user/address/list?type=select';
|
||||||
if (state.value.deliveryType === 2){
|
if (state.value.deliveryType === 2){
|
||||||
emitName = 'SELECT_PICK_UP_INFO'
|
emitName = 'SELECT_PICK_UP_INFO'
|
||||||
addressPage = '/pages/user/goods_details_store/index'
|
addressPage = '/pages/user/goods_details_store/index'
|
||||||
|
|
|
@ -39,8 +39,8 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, onBeforeMount } from 'vue';
|
import { onBeforeMount, reactive } from 'vue';
|
||||||
import { onShow } from '@dcloudio/uni-app';
|
import { onShow, onLoad } from '@dcloudio/uni-app';
|
||||||
import sheep from '@/sheep';
|
import sheep from '@/sheep';
|
||||||
import { isEmpty } from 'lodash-es';
|
import { isEmpty } from 'lodash-es';
|
||||||
import AreaApi from '@/sheep/api/system/area';
|
import AreaApi from '@/sheep/api/system/area';
|
||||||
|
@ -49,10 +49,14 @@
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
list: [], // 地址列表
|
list: [], // 地址列表
|
||||||
loading: true,
|
loading: true,
|
||||||
|
openType: '', // 页面打开类型
|
||||||
});
|
});
|
||||||
|
|
||||||
// 选择收货地址
|
// 选择收货地址
|
||||||
const onSelect = (addressInfo) => {
|
const onSelect = (addressInfo) => {
|
||||||
|
if (state.openType !== 'select'){ // 不作为选择组件时阻断操作
|
||||||
|
return
|
||||||
|
}
|
||||||
uni.$emit('SELECT_ADDRESS', {
|
uni.$emit('SELECT_ADDRESS', {
|
||||||
addressInfo,
|
addressInfo,
|
||||||
});
|
});
|
||||||
|
@ -110,6 +114,12 @@
|
||||||
// #endif
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onLoad((option) => {
|
||||||
|
if (option.type) {
|
||||||
|
state.openType = option.type;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
onShow(async () => {
|
onShow(async () => {
|
||||||
state.list = (await AddressApi.getAddressList()).data;
|
state.list = (await AddressApi.getAddressList()).data;
|
||||||
state.loading = false;
|
state.loading = false;
|
||||||
|
|
Loading…
Reference in New Issue