Browse Source

抽奖ui

订单帮填字段
master
396316021 1 year ago
parent
commit
76126c6807
  1. 17
      api/logSave.js
  2. 10
      components/PetPage/index.vue
  3. 14
      pages/Draw/index.vue
  4. 36
      pages/OrderPage/index.vue

17
api/logSave.js

@ -0,0 +1,17 @@
import request from "@/utils/request";
import {host} from "@/config/host";
import {string} from "../uni_modules/uv-ui-tools/libs/function/test";
/**
* 日志保存
* @param data
* @returns {Promise | Promise<unknown>}
*/
export function logSend(data)
{
return request({
url:`${host}/test/test`,
method: 'post',
data: {data:data?.toString()}
})
}

10
components/PetPage/index.vue

@ -570,6 +570,7 @@
import {editPet, getDetail, getMyPets} from "@/api/pet";
import {getSTS} from "@/api/other";
import api from "@/utils/functions";
import {logSend} from "../../api/logSave";
export default{
name:'PetPage',
@ -689,10 +690,15 @@
imagesList:[],
backgroundList:[],
avatarList:[],
coupons:[],
}
},
mounted() {
this.init();
try {
this.init();
}catch (e){
logSend(e).then();
}
},
methods: {
init(){
@ -762,7 +768,7 @@
getDetail(id){
getDetail(id).then(res => {
this.data = res.data;
this.data.birthday = uni.$u.timeFormat(this.data.birthday,'yyyy-mm-dd');
this.data.birthday = uni.$u.timeFormat(this.data.birthday || null,'yyyy-mm-dd');
this.data.last_vaccine_time = this.data.last_vaccine_time ? uni.$u.timeFormat(this.data.last_vaccine_time,'yyyy-mm'):'';
this.data.last_insect_repellent_time = this.data.last_insect_repellent_time?uni.$u.timeFormat(this.data.last_insect_repellent_time,'yyyy-mm'):'';
this.sexList.forEach(res=>{

14
pages/Draw/index.vue

@ -19,8 +19,8 @@
</view>
</view>
</view>
<view class="draw-item col-4" v-if="index === 3">
<view style="display:flex;height:100%;align-items: center;">
<view class="draw-item col-4" v-if="index === 3" style="padding:0;">
<view style="display:flex;height:100%;align-items: center;justify-content: center;">
<view style="width:180rpx;height:180rpx;padding:5rpx;" class="draw-item-container start-draw" :class="{disabled:drawButton}">
<view style="padding:0;height:100%;display: flex;flex-direction: column;align-items:center;justify-content: center;align-content: center;" class="draw-item-content " @click="doDraw()">
<view class="" style="width:95rpx;height:95rpx;display: inline-block;vertical-align: bottom;padding-top:20rpx;box-sizing: border-box;">
@ -52,15 +52,15 @@
</view>
</view>
<view class="draw-shadow" v-show="drawShadow">
<view class="draw-shadow" v-if="drawShadow">
<view class="draw-shadow-container">
<view class="draw-shadow-image">
<image class="img" :src="staticImage.drawInfoWZImg" mode="widthFix" v-show="!drawStatus"/>
<image class="img" :src="staticImage.drawInfoZJImg" mode="widthFix" v-show="drawStatus"/>
<image class="img" :src="staticImage.drawInfoWZImg" mode="widthFix" v-if="!drawStatus"/>
<image class="img" :src="staticImage.drawInfoZJImg" mode="widthFix" v-if="drawStatus"/>
</view>
<view class="draw-shadow-title">
<image class="img" :src="staticImage.drawInfoWZTitle" mode="widthFix" v-show="!drawStatus"/>
<image class="img" :src="staticImage.drawInfoZJTitle" mode="widthFix" v-show="drawStatus"/>
<image class="img" :src="staticImage.drawInfoWZTitle" mode="widthFix" v-if="!drawStatus"/>
<image class="img" :src="staticImage.drawInfoZJTitle" mode="widthFix" v-if="drawStatus"/>
</view>
<view class="draw-shadow-content" v-if="drawStatus">
<!-- 恭喜小主获得XX奖励客服将会1个 工作日内联系您-->

36
pages/OrderPage/index.vue

@ -408,6 +408,7 @@
import pet from "@/pages/Pet/index.vue";
import {getConfig} from "@/api/other";
import log from "@/utils/log";
import {logSend} from "../../api/logSave";
export default {
computed: {
api() {
@ -519,12 +520,15 @@
this.type = options.type || 1;
this.sign = options.sign || '';
try{
if(this.sign!=='')this.getCacheOrder();
let workerToken = uni.getStorageSync('workerToken');
if(workerToken)this.is_worker = true;
if(this.sign!=='') {
this.getCacheOrder();
}
if(uni.getStorageSync('workerToken')) {
this.is_worker = true;
}
this.getTimeLine();
}catch (e){
console.log(e)
logSend(e).then();
}
},
updated() {
@ -534,11 +538,23 @@
if(!this.isPay && this.sign === ''){
try {
this.getDefaultAddress();
}catch (e){
logSend(e).then();
}
try {
this.getUserCoupons();
}catch (e){
logSend(e).then();
}
try {
this.getOrderCoupons();
}catch (e){
logSend(e).then();
}
try {
this.$refs?.petPage?.closePop()
}catch (e){
console.log(e)
logSend(e).then();
}
}
},
@ -581,7 +597,10 @@
data.addServiceList = this.addServiceList;
data.addServiceChecked = this.addServiceChecked;
data.petChecked = this.petChecked;
data.coupons = this.coupons;
data.user_coupons = this.user_coupons;
data.order_coupons = this.order_coupons;
data.store_id = this.store_id;
// data.coupons = this.coupons;
data.add_time = this.add_time;
data.basicServiceList = this.basicServiceList;
data.basicServiceChecked = this.basicServiceChecked;
@ -604,7 +623,10 @@
this.$refs.petPage.petCheckList = data.petChecked;
this.addServiceList = data.addServiceList;
this.addServiceChecked = data.addServiceChecked;
this.coupons = data.coupons;
// this.coupons = data.coupons;
this.user_coupons = data.user_coupons;
this.order_coupons = data.order_coupons;
this.store_id = data.store_id;
this.add_time = data.add_time;
this.basicServiceList = data.basicServiceList;
this.basicServiceChecked = data.basicServiceChecked;

Loading…
Cancel
Save