|
@@ -10,26 +10,40 @@
|
|
|
<div class="info">
|
|
|
<p class="info-item">
|
|
|
<span class="info-label">Version: </span>
|
|
|
- <span class="info-value">xxxxx</span>
|
|
|
+ <span class="info-value">{{ info.product_name }}</span>
|
|
|
</p>
|
|
|
<p class="info-item">
|
|
|
<span class="info-label">Duration: </span>
|
|
|
- <span class="info-value">xxxxx</span>
|
|
|
+ <span class="info-value"
|
|
|
+ >{{ info.start_time }}-{{ info.end_time }}</span
|
|
|
+ >
|
|
|
</p>
|
|
|
<p class="info-item">
|
|
|
<span class="info-label">Phone brand: </span>
|
|
|
- <span class="info-value">xxxxx</span>
|
|
|
+ <span class="info-value">{{ info.phone_info.split(' ')[0] }}</span>
|
|
|
</p>
|
|
|
<p class="info-item">
|
|
|
<span class="info-label">Phone model: </span>
|
|
|
- <span class="info-value">xxxxx</span>
|
|
|
+ <span class="info-value">{{ phoneModel }}</span>
|
|
|
</p>
|
|
|
</div>
|
|
|
<div class="button-group">
|
|
|
- <button class="ptc-button" @click="$router.push('/imei/bind')">
|
|
|
+ <button
|
|
|
+ class="ptc-button"
|
|
|
+ @click="
|
|
|
+ $router.push(
|
|
|
+ `/imei/bind?id=${$route.query.id}&v=${info.product_name}`
|
|
|
+ )
|
|
|
+ "
|
|
|
+ >
|
|
|
BIND IMEI
|
|
|
</button>
|
|
|
- <button class="ptc-button ptc-button--stroke">CHECK ORDER</button>
|
|
|
+ <button
|
|
|
+ class="ptc-button ptc-button--stroke"
|
|
|
+ @click="$router.push(`/order/${$route.query.id}`)"
|
|
|
+ >
|
|
|
+ CHECK ORDER
|
|
|
+ </button>
|
|
|
<button class="ptc-button ptc-button--stroke">HOMEPAGE</button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -48,12 +62,33 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
-<script setup lang="ts">
|
|
|
+<script>
|
|
|
+import { defineComponent } from 'vue'
|
|
|
+import { getOrderInfo } from '@/service/order'
|
|
|
import { state } from '@/store'
|
|
|
|
|
|
-defineProps<{ status: 'success' | 'fail' }>()
|
|
|
-
|
|
|
-state.bgWhite = true
|
|
|
+export default defineComponent({
|
|
|
+ name: 'PayResult',
|
|
|
+ props: ['status'], // 'success' | 'fail'
|
|
|
+ async beforeRouteEnter(to, from, next) {
|
|
|
+ const { results } = await getOrderInfo(to.query.id)
|
|
|
+ next(vm => {
|
|
|
+ vm.info = results
|
|
|
+ state.bgWhite = true
|
|
|
+ })
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ /** @type {any} */
|
|
|
+ info: {},
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ phoneModel() {
|
|
|
+ return (this.info.phone_info || '').split(' ').slice(1).join(' ')
|
|
|
+ },
|
|
|
+ },
|
|
|
+})
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|