diff --git a/config/index.js b/config/index.js
index 33e2254..ef3e1f2 100644
--- a/config/index.js
+++ b/config/index.js
@@ -1,6 +1,6 @@
// isdev 为 true 表示开发环境 false 表示发布环境
const isdev = true;
-const baseUrl = isdev ? 'http://e07b2b5.r9.cpolar.top' : 'http://eb467b6.r19.cpolar.top';// 办公室接口 & 测试环境
+const baseUrl = isdev ? 'http://47.116.50.126:8888' : 'http://eb467b6.r19.cpolar.top';// 办公室接口 & 测试环境
// const baseUrl = isdev ? 'http://192.168.1.133:8899' : 'https://api.gwkjxb.com';// 办公室接口 & 正式环境
// const baseUrl = 'https://api.gwkjxb.com';// 正式环境(由于本地测试后台没有启动,暂时通用正式服)
diff --git a/pages/index/result.vue b/pages/index/result.vue
index c1ecf40..f3a92b7 100644
--- a/pages/index/result.vue
+++ b/pages/index/result.vue
@@ -9,13 +9,12 @@
import api from "@/api/index.js"
const store = useStore()
onLoad((e) => {
+ res_.value = JSON.parse(decodeURIComponent(e.res))
+ console.log(res_.value)
randomFunc()
})
// 变量
- const res = ref([
- 4.1,
- 4.5
- ])
+ const res_ = ref(null)
const userInfo = ref(null)
const bg_imgs = ref([
'/static/result1.jpg',
@@ -23,9 +22,24 @@
'/static/result3.jpg',
])
const bg_index = ref(0)
+ const avatarUrl = ref(null)
+ const info = ref({left:'',right:''})
+ const show_ = ref(false)
// 函数
function randomFunc() {
bg_index.value = parseInt((Math.random()*3))
+ uni.getImageInfo({
+ src:bg_imgs.value[bg_index.value],
+ success:function(res) {
+ avatarUrl.value = uni.getStorageSync('avatarUrl')
+ info.value.left = res_.value.leftEyeVision
+ info.value.right = res_.value.rightEyeVision
+ show_.value = true
+ },
+ fail(err) {
+ console.log(err)
+ }
+ })
}
@@ -36,15 +50,29 @@
-
- 4.5
- 4.1
+
+
+
+
+ {{info.left}}
+ {{info.right}}