init
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<s-pages title="计算">
|
||||
<view class="p-x-32">
|
||||
<view class="flex-center m-b-20">
|
||||
<view class="w_150">利润:</view>
|
||||
<uni-easyinput class="flex1" v-model="num1" type="number" placeholder="利润" />
|
||||
</view>
|
||||
<view class="flex-center m-b-20">
|
||||
<view class="w_150">上架数:</view>
|
||||
<uni-easyinput class="flex1" v-model="num2" type="number" placeholder="上架数" />
|
||||
</view>
|
||||
<view class="m-b-20">25天的利润: {{ num3 }}</view>
|
||||
<view class="m-b-20">每天的利润: {{ num3 / 25 }}</view>
|
||||
<view class="m-b-20">每天的利润20%: {{ (num3 / 25) * 0.2 }}</view>
|
||||
<view class="m-b-20">每天的利润80%: {{ (num3 / 25) * 0.8 }}</view>
|
||||
<view @click="sub" class="ai-button">提交</view></view
|
||||
>
|
||||
</s-pages>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, getCurrentInstance } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
const { proxy } = getCurrentInstance();
|
||||
let num1 = ref(0);
|
||||
let num2 = ref(0);
|
||||
let num3 = ref(0);
|
||||
const sub = () => {
|
||||
// num1 / num2 / 40 天 * (1.125)^40
|
||||
// 这个商品的每天利润总额 / 这个商品的当天AI店铺上架产品数 / 40 天 * (1.125)^40
|
||||
num3.value = (num1.value / num2.value / 40) * Math.pow(1.125, 40);
|
||||
console.log((2.78 / Math.pow(1.125, 40)) * 40 * 200);
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss"></style>
|
||||
Reference in New Issue
Block a user