feat(custom): 地图apiKey更换,订单核销详情新增支付方式
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
<script setup lang="ts">
|
||||
// import { computed, ref } from "vue";
|
||||
import Taro from '@tarojs/taro';
|
||||
import {login} from '@/api/user';
|
||||
import { login } from '@/api/user';
|
||||
|
||||
defineProps({
|
||||
visible: {
|
||||
@@ -40,9 +40,9 @@ const onOk = () => {
|
||||
desc: '完善用户资料',
|
||||
success: async user => {
|
||||
Taro.login({
|
||||
success: async ({code}) => {
|
||||
success: async ({ code }) => {
|
||||
try {
|
||||
const {data}: any = await login({
|
||||
const { data }: any = await login({
|
||||
code: code,
|
||||
nickName: user.userInfo.nickName,
|
||||
avatarUrl: user.userInfo.avatarUrl,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<view class="head-wrapper" :style="{top: BarHeight + 'px'}">
|
||||
<view class="head-wrapper" :style="{ top: BarHeight + 'px' }">
|
||||
<view class="head-menu">
|
||||
<Left class="iconfont" @click="returns" />
|
||||
<view class="line"></view>
|
||||
@@ -11,8 +11,8 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import Taro from '@tarojs/taro';
|
||||
import {computed} from 'vue';
|
||||
import {Home, Left} from '@nutui/icons-vue-taro';
|
||||
import { computed } from 'vue';
|
||||
import { Home, Left } from '@nutui/icons-vue-taro';
|
||||
|
||||
const statusBarHeight = Taro.getSystemInfoSync()?.statusBarHeight as number;
|
||||
const BarHeight = computed(() => statusBarHeight - 7);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {addCart, getCart, clearCart} from '@/api/cart';
|
||||
import {Plus, Minus} from '@nutui/icons-vue-taro';
|
||||
import {createActiveOrder} from '@/api/goods';
|
||||
import {createAfterOrder, getUserPoint} from '@/api/admin';
|
||||
import { addCart, getCart, clearCart } from '@/api/cart';
|
||||
import { Plus, Minus } from '@nutui/icons-vue-taro';
|
||||
import { createActiveOrder } from '@/api/goods';
|
||||
import { createAfterOrder, getUserPoint } from '@/api/admin';
|
||||
import Pay from '@/components/Pay.vue';
|
||||
|
||||
interface CardList {
|
||||
@@ -221,7 +221,7 @@ defineExpose({
|
||||
</view>
|
||||
<!-- 购物车弹窗 -->
|
||||
<nut-popup
|
||||
:style="{padding: '15px'}"
|
||||
:style="{ padding: '15px' }"
|
||||
round
|
||||
position="bottom"
|
||||
z-index="1"
|
||||
|
||||
@@ -82,13 +82,13 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {calculateDistance, parseQueryString} from '@/utils';
|
||||
import {bindParent, getBanner} from '@/api/user';
|
||||
import {getMerList} from '@/api/goods';
|
||||
import { calculateDistance, parseQueryString } from '@/utils';
|
||||
import { bindParent, getBanner } from '@/api/user';
|
||||
import { getMerList } from '@/api/goods';
|
||||
|
||||
const classId = defineModel({default: 0});
|
||||
const classId = defineModel({ default: 0 });
|
||||
|
||||
const list1 = ref<Array<MerData>>([]);
|
||||
const list2 = ref<Array<MerData>>([]);
|
||||
@@ -166,7 +166,7 @@ const get_mer_list = async () => {
|
||||
const bannerList = ref<any[]>([]);
|
||||
|
||||
const get_banner_list = async () => {
|
||||
const {data}: any = await getBanner();
|
||||
const { data }: any = await getBanner();
|
||||
bannerList.value = data.data;
|
||||
};
|
||||
|
||||
@@ -175,7 +175,7 @@ const toPage = async (url: string) => {
|
||||
// url转对象
|
||||
const obj = parseQueryString(url);
|
||||
if (obj.type === '1') {
|
||||
const {data: res} = await getMerList({});
|
||||
const { data: res } = await getMerList({});
|
||||
const mer = res.data.filter(item => item.bid === obj.bid)[0];
|
||||
Taro.setStorageSync('mer_info', mer);
|
||||
}
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
round
|
||||
safe-area-inset-bottom
|
||||
:close-on-click-overlay="false"
|
||||
:style="{height: 'auto'}"
|
||||
:style="{ height: 'auto' }"
|
||||
:visible="isShowPay"
|
||||
@click-close-icon="closePay">
|
||||
<view class="div">
|
||||
<view style="text-align: center">支付方式</view>
|
||||
<nut-cell-group
|
||||
:style="{margin: interval ? '40rpx 0 150rpx 0' : '40rpx 0'}">
|
||||
:style="{ margin: interval ? '40rpx 0 150rpx 0' : '40rpx 0' }">
|
||||
<nut-cell
|
||||
title="微信支付"
|
||||
desc="使用微信快捷支付"
|
||||
@@ -45,11 +45,11 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {ref, watch} from 'vue';
|
||||
import {IconFont} from '@nutui/icons-vue-taro';
|
||||
import { ref, watch } from 'vue';
|
||||
import { IconFont } from '@nutui/icons-vue-taro';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {payOrder} from '@/api/order';
|
||||
import {getPersonalInfo} from '@/api/user';
|
||||
import { payOrder } from '@/api/order';
|
||||
import { getPersonalInfo } from '@/api/user';
|
||||
|
||||
const prop = defineProps({
|
||||
interval: {
|
||||
@@ -75,7 +75,7 @@ const prop = defineProps({
|
||||
|
||||
const emit = defineEmits(['closePay', 'successPay']);
|
||||
|
||||
const info = ref<{integral?: any}>({});
|
||||
const info = ref<{ integral?: any }>({});
|
||||
|
||||
watch(
|
||||
() => prop.isShowPay,
|
||||
@@ -106,7 +106,7 @@ const goPay = async (type: number) => {
|
||||
try {
|
||||
console.log(prop.jfInfo);
|
||||
// 1微信支付 2积分支付 3专属积分兑换
|
||||
const {data} = await payOrder({
|
||||
const { data } = await payOrder({
|
||||
oid: prop.jfInfo.oid,
|
||||
OrderType: prop.OrderType,
|
||||
PayType: type,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
|
||||
const isShow = ref(false);
|
||||
|
||||
@@ -108,11 +108,11 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {reactive} from 'vue';
|
||||
import { reactive } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {BASE_URL} from '@/utils/request';
|
||||
import { BASE_URL } from '@/utils/request';
|
||||
|
||||
const {content} = defineProps<{
|
||||
const { content } = defineProps<{
|
||||
content: string;
|
||||
}>();
|
||||
|
||||
@@ -143,7 +143,7 @@ function onEditorReady() {
|
||||
}
|
||||
|
||||
// 失去焦点时,获取富文本的内容
|
||||
function getCtx(e: {detail: {html: any}}) {
|
||||
function getCtx(e: { detail: { html: any } }) {
|
||||
data.richText = e.detail.html;
|
||||
emits('input', e.detail.html);
|
||||
}
|
||||
@@ -159,15 +159,15 @@ function redo() {
|
||||
}
|
||||
|
||||
//修改样式
|
||||
function format(e: {target: {dataset: {name: any; value: any}}}) {
|
||||
function format(e: { target: { dataset: { name: any; value: any } } }) {
|
||||
// console.log("format", e.target.dataset);
|
||||
let {name, value} = e.target.dataset;
|
||||
let { name, value } = e.target.dataset;
|
||||
if (!name) return;
|
||||
data.editorCtx.format(name, value);
|
||||
}
|
||||
|
||||
//通过 Context 方法改变编辑器内样式时触发,返回选区已设置的样式
|
||||
function onStatusChange(e: {detail: any}) {
|
||||
function onStatusChange(e: { detail: any }) {
|
||||
data.formats = e.detail;
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ function insertImage() {
|
||||
Taro.uploadFile({
|
||||
url: `${BASE_URL}/upload`,
|
||||
name: 'file',
|
||||
header: {token: Taro.getStorageSync('token')},
|
||||
header: { token: Taro.getStorageSync('token') },
|
||||
filePath: res.tempFilePaths[0],
|
||||
success: res => {
|
||||
console.log(res);
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {getStoreList} from '@/api/home';
|
||||
import { getStoreList } from '@/api/home';
|
||||
import Taro from '@tarojs/taro';
|
||||
import {ref} from 'vue';
|
||||
import { ref } from 'vue';
|
||||
const name = defineModel({
|
||||
default: '',
|
||||
});
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {BASE_URL} from '@/utils/request';
|
||||
import {computed, ref} from 'vue';
|
||||
import { BASE_URL } from '@/utils/request';
|
||||
import { computed, ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
|
||||
const props = defineProps({
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<script lang="ts" setup>
|
||||
import {computed, ref} from 'vue';
|
||||
import { computed, ref } from 'vue';
|
||||
import Taro from '@tarojs/taro';
|
||||
import headImg from '../static/def_avatar.png';
|
||||
import logoImg from '../static/logo.jpg';
|
||||
import {BASE_URL} from '@/utils/request';
|
||||
import {getPhone, login} from '@/api/user';
|
||||
import { BASE_URL } from '@/utils/request';
|
||||
import { getPhone, login } from '@/api/user';
|
||||
|
||||
const props = defineProps({
|
||||
isShow: {
|
||||
@@ -36,7 +36,7 @@ const closeAttr = () => {
|
||||
};
|
||||
|
||||
const onChooseAvatar = e => {
|
||||
const {avatarUrl} = e.detail;
|
||||
const { avatarUrl } = e.detail;
|
||||
Taro.uploadFile({
|
||||
url: `${BASE_URL}/upload`,
|
||||
filePath: avatarUrl,
|
||||
@@ -57,7 +57,7 @@ const getPhoneNumber = async (e: any) => {
|
||||
title: '授权手机号中',
|
||||
mask: true,
|
||||
});
|
||||
const {code} = e.detail;
|
||||
const { code } = e.detail;
|
||||
const res = await getPhone({
|
||||
code: code,
|
||||
});
|
||||
@@ -112,7 +112,7 @@ const formSubmit = async (e: any) => {
|
||||
position="bottom"
|
||||
safe-area-inset-bottom
|
||||
closeable
|
||||
:style="{padding: '20px 10px'}"
|
||||
:style="{ padding: '20px 10px' }"
|
||||
v-model:visible="show"
|
||||
@close="closeAttr"
|
||||
:close-on-click-overlay="false">
|
||||
|
||||
Reference in New Issue
Block a user