diff --git a/.env b/.env
index e69de29..07cad84 100644
--- a/.env
+++ b/.env
@@ -0,0 +1,3 @@
+# 邮储奶茶活动
+VITE_YCNC_APPID = '2vikrqptiia9pe9bf5ztrd'
+VITE_YCNC_SECRET = '6fpfwdkgcggyk0yf2yb6bt'
\ No newline at end of file
diff --git a/.env.development b/.env.development
index 6d34854..872f370 100644
--- a/.env.development
+++ b/.env.development
@@ -1,5 +1,5 @@
#请求url前缀
# 中信建投
# VITE_BASE_URL = 'http://zxjt.test.86698.cn'
-# 兴业优酷
-VITE_BASE_URL = 'http://192.168.110.39:8083'
+# 邮储奶茶活动
+VITE_BASE_URL = 'http://milk.api.test.86698.cn'
diff --git a/.env.production b/.env.production
index a8f5910..d873cf3 100644
--- a/.env.production
+++ b/.env.production
@@ -1,5 +1,5 @@
#请求url前缀
# 中信建投
# VITE_BASE_URL = 'https://zxjt.86698.cn'
-# 兴业优酷
-VITE_BASE_URL = 'http://192.168.110.39:8083'
\ No newline at end of file
+# 邮储奶茶活动
+VITE_BASE_URL = 'http://milk.api.test.86698.cn'
\ No newline at end of file
diff --git a/custom.page.js b/custom.page.js
index d157da7..e940aed 100644
--- a/custom.page.js
+++ b/custom.page.js
@@ -1,7 +1,7 @@
const config = {
pages:'./src/pages',
- pagesInclude:['xyyk']
+ pagesInclude:['ycnc']
}
export default config
\ No newline at end of file
diff --git a/index.html b/index.html
index 975a238..0992e8c 100644
--- a/index.html
+++ b/index.html
@@ -15,7 +15,7 @@
-
+
diff --git a/package.json b/package.json
index a0dda60..13821d6 100644
--- a/package.json
+++ b/package.json
@@ -55,7 +55,9 @@
"@dcloudio/uni-mp-xhs": "3.0.0-4010520240507001",
"@dcloudio/uni-quickapp-webview": "3.0.0-4010520240507001",
"@dcloudio/uni-ui": "^1.5.5",
+ "dayjs": "^1.11.11",
"js-md5": "^0.8.3",
+ "qs": "^6.12.1",
"vue": "^3.4.21",
"vue-i18n": "^9.1.9",
"wot-design-uni": "^1.2.26"
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 355d6e4..2165210 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -53,9 +53,15 @@ importers:
'@dcloudio/uni-ui':
specifier: ^1.5.5
version: 1.5.5
+ dayjs:
+ specifier: ^1.11.11
+ version: 1.11.11
js-md5:
specifier: ^0.8.3
version: 0.8.3
+ qs:
+ specifier: ^6.12.1
+ version: 6.12.1
vue:
specifier: ^3.4.21
version: 3.4.28
@@ -2059,6 +2065,9 @@ packages:
resolution: {integrity: sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==}
engines: {node: '>=10'}
+ dayjs@1.11.11:
+ resolution: {integrity: sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==}
+
debug@2.6.9:
resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==}
peerDependencies:
@@ -3184,6 +3193,10 @@ packages:
resolution: {integrity: sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==}
engines: {node: '>=0.6'}
+ qs@6.12.1:
+ resolution: {integrity: sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==}
+ engines: {node: '>=0.6'}
+
querystringify@2.2.0:
resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==}
@@ -6770,6 +6783,8 @@ snapshots:
whatwg-mimetype: 2.3.0
whatwg-url: 8.7.0
+ dayjs@1.11.11: {}
+
debug@2.6.9:
dependencies:
ms: 2.0.0
@@ -8067,6 +8082,10 @@ snapshots:
dependencies:
side-channel: 1.0.6
+ qs@6.12.1:
+ dependencies:
+ side-channel: 1.0.6
+
querystringify@2.2.0: {}
queue-microtask@1.2.3: {}
diff --git a/shims-uni.d.ts b/shims-uni.d.ts
new file mode 100644
index 0000000..ed4adcf
--- /dev/null
+++ b/shims-uni.d.ts
@@ -0,0 +1,10 @@
+///
+import 'vue'
+
+declare module '@vue/runtime-core' {
+ type Hooks = App.AppInstance & Page.PageInstance;
+
+ interface ComponentCustomOptions extends Hooks {
+
+ }
+}
diff --git a/src/api/index.js b/src/api/index.js
index 2c0c23e..fdbdf22 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -1,17 +1,17 @@
-import request from "../utils/request";
+import http from "../utils/http";
-export const checkTradeNo = (params) => request({
+export const checkTradeNo = (params) => http({
url:'/backend/zxjt_redpacket/orders/is_exist',
method:'POST',
...params
})
-export const getAccessPage = (params) => request({
+export const getAccessPage = (params) => http({
url:'/backend/zxjt_redpacket/orders/access_page',
...params
})
-export const sendPacket = (params) => request({
+export const sendPacket = (params) => http({
url:'/backend/zxjt_redpacket/orders/send_packet',
method:'POST',
...params
diff --git a/src/api/xyyk.js b/src/api/xyyk.js
index 7d4ea0e..4e3c792 100644
--- a/src/api/xyyk.js
+++ b/src/api/xyyk.js
@@ -1,30 +1,30 @@
-import request from "../utils/request";
+import http from "../utils/http";
-export const login = (params) => request({
+export const login = (params) => http({
url:'/v1/xy/login',
method:'POST',
...params
})
-export const getProduceList = (params) => request({
+export const getProduceList = (params) => http({
url:'/v1/auth/activity',
method:'POST',
...params
})
-export const goBuy = (params) => request({
+export const goBuy = (params) => http({
url:'/v1/auth/order/buy',
method:'POST',
...params
})
-export const getTicketList = (params) => request({
+export const getTicketList = (params) => http({
url:'/v1/auth/order/list',
method:'POST',
...params
})
-export const queryOrder = (params) => request({
+export const queryOrder = (params) => http({
url:'/v1/auth/order/query',
...params
})
diff --git a/src/api/ycnc.js b/src/api/ycnc.js
index 67188f6..5f6c22b 100644
--- a/src/api/ycnc.js
+++ b/src/api/ycnc.js
@@ -1,31 +1,32 @@
-import request from "../utils/request";
+import http from "../utils/http";
-export const login = (params) => request({
+export const login = (params) => http({
url:'/api/v1/UnionLogin',
method:'POST',
+ noToken:true,
...params
})
-export const getProductList = (params) => request({
+export const getProductList = (params) => http({
url:'/api/v1/VoucherList',
method:'POST',
...params
})
-export const detail = (params) => request({
+export const queryDetail = (params) => http({
url:'/api/v1/product/detail',
method:'POST',
...params
})
-export const getOrderList = (params) => request({
+export const getOrderList = (params) => http({
url:'/api/v1/auth/order/list',
method:'POST',
...params
})
-export const goPay = (params) => request({
+export const goPay = (params) => http({
url:'/api/v1/auth/order/create',
method:'POST',
...params
diff --git a/src/interceptors/index.js b/src/interceptors/index.js
new file mode 100644
index 0000000..4c874f4
--- /dev/null
+++ b/src/interceptors/index.js
@@ -0,0 +1 @@
+export { requestInterceptor } from './request'
\ No newline at end of file
diff --git a/src/interceptors/request.js b/src/interceptors/request.js
new file mode 100644
index 0000000..50ff467
--- /dev/null
+++ b/src/interceptors/request.js
@@ -0,0 +1,40 @@
+import qs from 'qs'
+
+// 请求基准地址
+const baseUrl = import.meta.env.VITE_BASE_URL
+
+// 拦截器配置
+const httpInterceptor = {
+ // 拦截前触发
+ invoke(options) {
+ // 接口请求支持通过 query 参数配置 queryString
+ console.log('options', options)
+ if (options.query) {
+ const queryStr = qs.stringify(options.query)
+ if (options.url.includes('?')) {
+ options.url += `&${queryStr}`
+ } else {
+ options.url += `?${queryStr}`
+ }
+ }
+ if (options.params) {
+ options.data = options.params || {}
+ }
+ options.url = baseUrl + options.url
+ options.method = options.method || 'GET'
+ // 1. 请求超时
+ options.timeout = 10000 // 10s
+ // 2. 添加 token 请求头标识
+ const token = uni.getStorageSync('token');
+ if (token && !options.noToken) {
+ options.header.Authorization = `Bearer ${token}`
+ }
+ }
+}
+
+export const requestInterceptor = {
+ install() {
+ // 拦截 request 请求
+ uni.addInterceptor('request', httpInterceptor)
+ },
+}
diff --git a/src/lib/YT_Client_api.js b/src/lib/YT_Client_api.js
deleted file mode 100644
index ba76137..0000000
--- a/src/lib/YT_Client_api.js
+++ /dev/null
@@ -1,454 +0,0 @@
-/**
- * @author 何杰
- * @date 2016-08-01 12:00:00
- * @address www.yitong.com.cn
- * @mail hj@yitong.com.cn
- * @desc: 屹通客户端组件api
- */
-var Fw = {}; Fw.device = {};
-Fw.device.Device = function () {
- var userAgent = navigator.userAgent;
- //ios 事件队列
- var eventQueue = [];
- return {
- //是否iOS设备
- is_ios: userAgent.indexOf('iPhone') > -1 || userAgent.indexOf('iPad') > -1,
- //是否Android设备
- is_android: userAgent.indexOf('Android') > -1,
- /**
- * ios
- * 注册事件
- * @param code 事件编码
- * @param options 参数
- */
- addEvent : function(code, options) {
- if (options && code) {
- eventQueue.push(JSON.stringify({
- code : code,
- name : options
- }));
- }
- },
- /**
- * ios
- * 原生调用,从队列中获取事件
- * @returns {string}
- */
- getEvent : function() {
- return eventQueue.length > 0 ? eventQueue.shift() : '0';
- }
- };
-}();
-/**
- * 供第三方调用API
- */
-Fw.device.api = function () {
- var device = Fw.device.Device;
- return {
-
-
- /**
- * @brief 获取经纬度
- */
- handCodeGetLocation : function (fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- var option = {};
- option.callBack = fn;
- device.is_ios && device.addEvent("51",JSON.stringify(option));
- device.is_android && GetInfoJs.getLocation(JSON.stringify(option));
- },
- /**
- * @brief 获取用户信息
- */
- getUserInfo : function (fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- var option = {};
- option.callback = fn;
- device.is_ios && device.addEvent("getUserInfo",JSON.stringify(option));
- device.is_android && GetInfoJs.getUserInfo(JSON.stringify(option));
- },
- /**
- * @brief
- */
- getCustNo : function (fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- device.is_ios && device.addEvent("getCustNo",fn);
- device.is_android && GetInfoJs.getCustNo(fn);
- },
-
- initTitle : function (option) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
-
- device.is_ios && device.addEvent("initTitle",JSON.stringify(option));
- device.is_android && GetInfoJs.initTitle(JSON.stringify(option));
-
- },
-
- setBackFun : function (option) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- device.is_ios && device.addEvent("goBack",JSON.stringify(option));
- device.is_android && GetInfoJs.goBack(JSON.stringify(option));
- },
- setRightButton : function (option) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- device.is_ios && device.addEvent("setRightButton",JSON.stringify(option));
- device.is_android && GetInfoJs.setRightButton(JSON.stringify(option));
- },
- getBackFun : function (fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- device.is_ios && device.addEvent("getBackFun",fn);
- device.is_android && GetInfoJs.getBackFun(option);
- },
-
-
- startRecordVoice : function (option) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- device.is_ios && device.addEvent("startRecordVoice",JSON.stringify(option));
- device.is_android && GetInfoJs.startRecordVoice();
- },
- stopRecordVoice : function (fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- device.is_ios && device.addEvent("stopRecordVoice",fn);
- device.is_android && GetInfoJs.stopRecordVoice(fn);
- },
- getPhoneNo : function (fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- device.is_ios && device.addEvent("getPhoneNo",fn);
- device.is_android && GetInfoJs.getPhoneNo(fn);
- },
- /**
- *扫一扫
- */
- openScanPage : function (option) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- device.is_ios && device.addEvent("goToQrCode",JSON.stringify(option));
- device.is_android && GetInfoJs.openScanPage();
- },
- /**
- *付款码
- */
- openPaymentCode : function (option) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- device.is_ios && device.addEvent("gotoPaymentCode",JSON.stringify(option));
- device.is_android && GetInfoJs.openPaymentCode(JSON.stringify(option));
- },
-
- /**
- * 拨打电话
- */
- gotoSystemPhone : function (fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- device.is_ios && device.addEvent("gotoSystemPhone",fn);
- device.is_android && GetInfoJs.gotoSystemPhone(fn);
- },
-
- /**
- * 关闭当前页面
- */
- goBack : function (option) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- device.is_ios && device.addEvent("getBackFun",JSON.stringify(option));
- device.is_android && GetInfoJs.goBack();
- },
-
- /**
- * 调用物理返回键
- */
- nativeBack : function () {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- option = {};
-// device.is_ios && device.addEvent("getBackFun",JSON.stringify(option));
- device.is_android && GetInfoJs.nativeBack();
- },
- /**
- * 地图导航
- */
- openMap : function (option) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- device.is_ios && device.addEvent("openMap",JSON.stringify(option));
- device.is_android && GetInfoJs.openMap(JSON.stringify(option));
- },
-
- /**
- * 登录
- */
- gotoLoginCallback : function (fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- device.is_ios && device.addEvent("goToLoginView",JSON.stringify(fn));
- device.is_android && GetInfoJs.gotoLoginCallback(JSON.stringify(fn));
- },
-
- loginStatus : function (option) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- device.is_ios && device.addEvent("loginStatus",JSON.stringify(option));
- device.is_android && GetInfoJs.loginStatus(JSON.stringify(option));
- },
-
-
- checkRecordVoicePermission : function (fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- // device.is_ios && device.addEvent("getBackFun",JSON.stringify(option));
- device.is_android && GetInfoJs.checkRecordVoicePermission(fn);
- },
- openMenu : function (fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- // device.is_ios && device.addEvent("getBackFun",JSON.stringify(option));
- device.is_android && GetInfoJs.gotoCommonlyUsedMenu(fn);
- },
-
- /**
- * @brief 分享
- */
- handCodeShare : function (param,fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- var option = {};
- option.fn = fn;
- option.param = param;
- device.is_ios && device.addEvent("41",JSON.stringify(param));
- device.is_android && GetInfoJs.showShare(JSON.stringify(option));
- },
- /**
- * @brief 拍照、相册
- */
- handCodeGetPhotos : function (fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- var option = {};
- option.fn = fn;
- device.is_ios && device.addEvent("41",JSON.stringify(param));
- device.is_android && GetInfoJs.takePhotos(JSON.stringify(option));
- },
-
- /**
- * @brief 拍照
- */
- openCamera : function (fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- var option = {};
- option.fn = fn;
-// device.is_ios && device.addEvent("41",JSON.stringify(param));
- device.is_android && GetInfoJs.openCamera(JSON.stringify(option));
- },
-
- /**
- * @brief 相册
- */
- photoAlbum : function (fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- var option = {};
- option.fn = fn;
-// device.is_ios && device.addEvent("41",JSON.stringify(param));
- device.is_android && GetInfoJs.photoAlbum(JSON.stringify(option));
- },
-
-
- /**
- * @brief 复制到粘贴板
- */
- pasteStringToSystem : function (fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
-
- device.is_ios && device.addEvent("pasteStringToSystem",fn);
- device.is_android && GetInfoJs.pasteStringToSystem(fn);
- },
-
- queryAppFamily : function (fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- //TODO ios粘贴方法
-
- device.is_android && GetInfoJs.queryAppFamily(fn);
- },
-
- getHeaderImg : function (fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- //TODO ios粘贴方法
-
- device.is_android && GetInfoJs.getHeaderImg(fn);
- },
-
- getSystemVersion : function (fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- device.is_ios && device.addEvent("getEquipmentInfo",fn);
- device.is_android && GetInfoJs.getSystemVersion(fn);
- },
-
- /**
- * @brief 跳转VUE
- */
- goVUEPage : function (param,fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- var option = {};
- option.fn = fn;
- option.param = param;
- device.is_ios && device.addEvent("goToAresPage",JSON.stringify(param));
- device.is_android && GetInfoJs.showShare(JSON.stringify(option));
- },
- /**
- 甘肃宁波观影
- */
- checkDiscountLevel : function (fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- var option = {};
- option.fn = "callbackCheckDiscountLevel";
- option.shopid = "1100529310001000001";
- option.sign = "bd91222d6fcff0de67dd28583926ae92"
- device.is_ios && device.addEvent("checkDiscountLevel",JSON.stringify(option));
- device.is_android && GetInfoJs.checkDiscountLevel(fn);
- },
- /**
- 宁波活动
- */
- checkBFMLevel : function (fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- var option = {};
- option.fn = "callbackCheckBFMLevel";
- option.shopid = "1100529310001000009";
- device.is_ios && device.addEvent("checkBFMLevel",JSON.stringify(option));
- device.is_android && GetInfoJs.checkBFMLevel(option);
- },
- uploadThirdCertifyEvents : function (param ,fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- var option = {};
- option.fn = "callBackUploadThirdCertifyEvents";
- option.param = param;
- device.is_ios && device.addEvent("uploadThirdCertifyEvents",JSON.stringify(param));
- device.is_android && GetInfoJs.uploadThirdCertifyEvents(option);
- },
- checkUserChangeOrNoAndLoginStatus : function (param,fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- var option = {};
- option.fn = fn;
- option.param = param;
- device.is_ios && device.addEvent("checkUserChangeOrNoAndLoginStatus",JSON.stringify(param));
- device.is_android && GetInfoJs.checkUserChangeOrNoAndLoginStatus(JSON.stringify(option));
- },
- handCodePay : function (param,fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- var option = {};
- option.fn = fn;
- option.param = param;
- device.is_ios && device.addEvent("handCodePay",JSON.stringify(param));
- device.is_android && GetInfoJs.go2pay(JSON.stringify(option));
- },
- publicActivityEvents : function (param,fn) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- var option = {};
- option.fn = fn;
- option.param = param;
- device.is_ios && device.addEvent("publicActivityEvents",JSON.stringify(option));
- device.is_android && GetInfoJs.publicActivityEvents(JSON.stringify(option));
- },
- getNewAuthorization : function (param) {
- if(!device.is_ios && !device.is_android){
- alert("请在ios/android设备上使用!");
- return;
- }
- device.is_ios && device.addEvent("getNewAuthorization",JSON.stringify(param));
- device.is_android && GetInfoJs.getNewAuthorization(JSON.stringify(param));
- }
- }
-}();
diff --git a/src/main.js b/src/main.js
index 795cd88..6514f69 100644
--- a/src/main.js
+++ b/src/main.js
@@ -4,10 +4,11 @@ import {
} from "vue";
import App from "./App.vue";
import 'virtual:uno.css';
-import '@/lib/YT_Client_api.js'
+import { requestInterceptor } from './interceptors'
export function createApp() {
const app = createSSRApp(App);
+ app.use(requestInterceptor)
return {
app,
};
diff --git a/src/pages.json b/src/pages.json
index a37bb36..8c03873 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -1,12 +1,28 @@
{
"pages": [
{
- "path": "pages/xyyk/index",
- "type": "page"
+ "path": "pages/ycnc/index",
+ "type": "home",
+ "style": {
+ "navigationStyle": "custom",
+ "navigationBarTitleText": "奶茶活动"
+ }
},
{
- "path": "pages/xyyk/tickets",
- "type": "page"
+ "path": "pages/ycnc/detail",
+ "type": "page",
+ "style": {
+ "navigationStyle": "custom",
+ "navigationBarTitleText": "商品详情"
+ }
+ },
+ {
+ "path": "pages/ycnc/order",
+ "type": "page",
+ "style": {
+ "navigationStyle": "custom",
+ "navigationBarTitleText": "我的订单"
+ }
}
],
"globalStyle": {
diff --git a/src/pages/ycnc/components/brand.vue b/src/pages/ycnc/components/brand.vue
index f21c096..d7edb1f 100644
--- a/src/pages/ycnc/components/brand.vue
+++ b/src/pages/ycnc/components/brand.vue
@@ -1,31 +1,45 @@
-
-
-
+
+
+
+
+
-
+
\ No newline at end of file
diff --git a/src/pages/ycnc/components/order-item.vue b/src/pages/ycnc/components/order-item.vue
index ad7e202..3bb2371 100644
--- a/src/pages/ycnc/components/order-item.vue
+++ b/src/pages/ycnc/components/order-item.vue
@@ -7,7 +7,7 @@
@@ -23,33 +23,28 @@
- 下单时间:2021-08-31 16:37:05
+ 下单时间:{{ detail.create_time }}
+
+
+
+ 立即付款
+ 查看卡密
-
@@ -81,7 +76,6 @@
display: block;
width:90rpx;
height:90rpx;
- border:1rpx solid red;
margin-right:34rpx;
}
}
diff --git a/src/pages/ycnc/components/product-item.vue b/src/pages/ycnc/components/product-item.vue
index 3b89c74..cd7bcff 100644
--- a/src/pages/ycnc/components/product-item.vue
+++ b/src/pages/ycnc/components/product-item.vue
@@ -1,20 +1,27 @@
-
- {{ detail.brandFlag }}
- {{ detail.voucherTitle }}
-
- {{ detail.voucherAmount }}元
+
+
+
+ {{ config[detail.brandFlag].name}}
+ {{ detail.voucherTitle }}
+
+ {{ detail.voucherAmount }}元
+
+ {{ detail.voucherOriginalPrice }}
+
+
+ 点击购买
- {{ detail.voucherOriginalPrice }}
-
-
- 点击购买
\ No newline at end of file
diff --git a/src/pages/ycnc/config.js b/src/pages/ycnc/config.js
new file mode 100644
index 0000000..cebd58b
--- /dev/null
+++ b/src/pages/ycnc/config.js
@@ -0,0 +1,66 @@
+import MX from '../../static/ycnc/bg-mxbc.png'
+import BW from '../../static/ycnc/bg-bwcj.png'
+import NX from '../../static/ycnc/bg-nxdc.png'
+import CoCo from '../../static/ycnc/bg-coco.png'
+import CBD from '../../static/ycnc/bg-cbd.png'
+import CYYS from '../../static/ycnc/bg-cyys.png'
+
+const config = {
+ "MX":{
+ name:'蜜雪冰城',
+ src:MX,
+ height:948,
+ },
+ "BW":{
+ name:'霸王茶姬',
+ src:BW,
+ height:948,
+ },
+ "NX":{
+ name:'奈雪的茶',
+ src:NX,
+ height:558,
+ },
+ "CoCo":{
+ name:'COCO',
+ src:CoCo,
+ height:558,
+ },
+ "CBD":{
+ name:'茶百道',
+ src:CBD,
+ height:558,
+ },
+ "CYYS":{
+ name:'茶颜悦色',
+ src:CYYS,
+ height:948,
+ },
+}
+
+export const stateConfig = {
+ 1: '待支付',
+ 2: '已支付',
+ 3: '充值完成',
+ 4: '充值异常',
+ 5: '订单核销',
+ 6: '退款中',
+ 7: '退款完成',
+ 8: '退款失败'
+}
+
+export const tabs = [{
+ tabName:'全部订单',
+ state:0,
+},{
+ tabName:'待付款',
+ state:1,
+},{
+ tabName:'处理中',
+ state:2,
+},{
+ tabName:'已完成',
+ state:3,
+}]
+
+export default config
\ No newline at end of file
diff --git a/src/pages/ycnc/detail.vue b/src/pages/ycnc/detail.vue
index d0c5c8b..db16c86 100644
--- a/src/pages/ycnc/detail.vue
+++ b/src/pages/ycnc/detail.vue
@@ -19,13 +19,12 @@
{{ detailObj.price }}
-
- 购买须知
-
+
+
-
+
立即支付
@@ -34,7 +33,8 @@