diff --git a/issus.txt b/issus.txt index d2ee631..ed28374 100644 --- a/issus.txt +++ b/issus.txt @@ -1,10 +1,8 @@ 1、小程序登录与H5登录差异化 2、H5支付实现问题 3、生成照片失败时的错误处理(包括退换积分、页面展示、生成历史列表的展现形式) -<<<<<<< HEAD 4、生成照片失败是否从草稿恢复 -======= (1)自动重试 (2)错误时的友好提示 (3)重试直到成功,通知用户 ->>>>>>> dev +5、百度图片审核API失效问题 \ No newline at end of file diff --git a/src/api/coin.js b/src/api/coin.js new file mode 100644 index 0000000..c2ad2c6 --- /dev/null +++ b/src/api/coin.js @@ -0,0 +1,41 @@ +import request from "../utils/request" + +/** +* @description:获取金币价格列表 +* @param {*} (pageSize, pageNum) +* @return: list +*/ +export function getCoinList(pageSize, pageNum) { + return request({ + url: `api/product/list?projectType=5&type=1&pageSize=${pageSize}&pageNum=${pageNum}`, + method: 'get' + }) +} + +/** +* @description:购买金币下单 +* @param productId +* @return: data +*/ +export function createOrder(productId) { + return request({ + url: `api/productOrder/createOrder`, + method: 'post', + data: { + productId + } + }) +} + +/** +* @description:获取收银台数据 +* @param data +* @return: data +*/ +export function createPay(data) { + return request({ + url: `api/productOrder/createPay`, + method: 'post', + data + }) +} diff --git a/src/pages.json b/src/pages.json index 7f2ae35..a5bdb78 100644 --- a/src/pages.json +++ b/src/pages.json @@ -66,6 +66,12 @@ "navigationBarTitleText": "智像相机用户使用协议" } }, + { + "path": "pages/protocol/coin", + "style": { + "navigationBarTitleText": "慧拍金币充值协议" + } + }, { "path": "pages/generateVideo/index", "style": { diff --git a/src/pages/index/buyCoin.vue b/src/pages/index/buyCoin.vue index c31e377..89fe580 100644 --- a/src/pages/index/buyCoin.vue +++ b/src/pages/index/buyCoin.vue @@ -2,50 +2,81 @@ 金币可以用来生成写真和制作视频 - 金币{{ item.num }}枚 - ¥{{ item.money }} + {{ item.title }} + ¥{{ item.sellPriceRmb / 100 }} + + + 立刻购买 + 《慧拍金币充值协议》 - 立刻购买 diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index 1af2289..b03d197 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -23,16 +23,22 @@ class="bottomBtn" open-type="getPhoneNumber" type="default" + id="getPhoneNumber" @getphonenumber="toCreate" > 开始制作我的数字分身 - + @@ -62,11 +68,10 @@ const pageClass = computed(() => { } }); //#region 勾选 -const checkboxValue1 = ref([]); -const checkboxList1 = ref([ +const checkboxValue = ref([]); +const checkboxList = ref([ { name: "同意智像相机用户使用协议", - disabled: false, }, ]); @@ -106,7 +111,7 @@ async function getphonenumber(e) { } async function toCreate(e) { - if (checkboxValue1.value[0]) { + if (checkboxValue.value[0]) { // await handleLogin(); await getphonenumber(e); } else { @@ -115,7 +120,7 @@ async function toCreate(e) { content: "同意慧图相机用户使用协议?", success: function (res) { if (res.confirm) { - checkboxList1.value[0].disabled = true; + checkboxValue.value[0] = true; // handleLogin(); getphonenumber(e); } else if (res.cancel) { diff --git a/src/pages/protocol/coin.vue b/src/pages/protocol/coin.vue new file mode 100644 index 0000000..12d53c8 --- /dev/null +++ b/src/pages/protocol/coin.vue @@ -0,0 +1,194 @@ + + + + +