Task:送礼相关接口
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
|||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 礼品卡送礼订单确认
|
||||||
|
* @param {*} data
|
||||||
|
*/
|
||||||
|
export function getGiftCardSendOrderConfirm(data) {
|
||||||
|
return request.post("/giftCard/confirm", data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 礼品卡送礼订单创建
|
||||||
|
* @param {*} data
|
||||||
|
*/
|
||||||
|
export function getGiftCardSendOrder(key) {
|
||||||
|
return request.post("/giftCard/create/" + key);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -67,6 +67,14 @@
|
|||||||
:disabled="(attr.productSelect.stock === 0 && attr.cartAttr)"
|
:disabled="(attr.productSelect.stock === 0 && attr.cartAttr)"
|
||||||
>加入购物车</u-button>
|
>加入购物车</u-button>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="v12-px-2 v12-mt-3" v-if="isGift">
|
||||||
|
<u-button
|
||||||
|
shape="circle"
|
||||||
|
color="#C52733"
|
||||||
|
@click="$emit('gift')"
|
||||||
|
:disabled="(attr.productSelect.stock === 0 && attr.cartAttr)"
|
||||||
|
>送给朋友</u-button>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="mask" @touchmove.prevent :hidden="attr.cartAttr === false" @click="closeAttr"></view>
|
<view class="mask" @touchmove.prevent :hidden="attr.cartAttr === false" @click="closeAttr"></view>
|
||||||
</view>
|
</view>
|
||||||
@@ -75,6 +83,10 @@
|
|||||||
export default {
|
export default {
|
||||||
name: "ProductWindow",
|
name: "ProductWindow",
|
||||||
props: {
|
props: {
|
||||||
|
isGift: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
paddingBottom: {
|
paddingBottom: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '140rpx'
|
default: '140rpx'
|
||||||
|
|||||||
Generated
+17700
File diff suppressed because it is too large
Load Diff
+145
-145
@@ -1,148 +1,148 @@
|
|||||||
{
|
{
|
||||||
"name": "xdd_mp",
|
"name": "xdd_mp",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"serve": "npm run dev:h5",
|
||||||
|
"build": "npm run build:h5",
|
||||||
|
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build",
|
||||||
|
"build:custom": "cross-env NODE_ENV=production uniapp-cli custom",
|
||||||
|
"build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
|
||||||
|
"build:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build",
|
||||||
|
"build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build",
|
||||||
|
"build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build",
|
||||||
|
"build:mp-jd": "cross-env NODE_ENV=production UNI_PLATFORM=mp-jd vue-cli-service uni-build",
|
||||||
|
"build:mp-kuaishou": "cross-env NODE_ENV=production UNI_PLATFORM=mp-kuaishou vue-cli-service uni-build",
|
||||||
|
"build:mp-lark": "cross-env NODE_ENV=production UNI_PLATFORM=mp-lark vue-cli-service uni-build",
|
||||||
|
"build:mp-qq": "cross-env NODE_ENV=production UNI_PLATFORM=mp-qq vue-cli-service uni-build",
|
||||||
|
"build:mp-toutiao": "cross-env NODE_ENV=production UNI_PLATFORM=mp-toutiao vue-cli-service uni-build",
|
||||||
|
"build:mp-weixin": "cross-env NODE_ENV=production UNI_PLATFORM=mp-weixin vue-cli-service uni-build",
|
||||||
|
"build:mp-xhs": "cross-env NODE_ENV=production UNI_PLATFORM=mp-xhs vue-cli-service uni-build",
|
||||||
|
"build:quickapp-native": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-native vue-cli-service uni-build",
|
||||||
|
"build:quickapp-webview": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview vue-cli-service uni-build",
|
||||||
|
"build:quickapp-webview-huawei": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-huawei vue-cli-service uni-build",
|
||||||
|
"build:quickapp-webview-union": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build",
|
||||||
|
"dev:app-plus": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch",
|
||||||
|
"dev:custom": "cross-env NODE_ENV=development uniapp-cli custom",
|
||||||
|
"dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve",
|
||||||
|
"dev:mp-360": "cross-env NODE_ENV=development UNI_PLATFORM=mp-360 vue-cli-service uni-build --watch",
|
||||||
|
"dev:mp-alipay": "cross-env NODE_ENV=development UNI_PLATFORM=mp-alipay vue-cli-service uni-build --watch",
|
||||||
|
"dev:mp-baidu": "cross-env NODE_ENV=development UNI_PLATFORM=mp-baidu vue-cli-service uni-build --watch",
|
||||||
|
"dev:mp-jd": "cross-env NODE_ENV=development UNI_PLATFORM=mp-jd vue-cli-service uni-build --watch",
|
||||||
|
"dev:mp-kuaishou": "cross-env NODE_ENV=development UNI_PLATFORM=mp-kuaishou vue-cli-service uni-build --watch",
|
||||||
|
"dev:mp-lark": "cross-env NODE_ENV=development UNI_PLATFORM=mp-lark vue-cli-service uni-build --watch",
|
||||||
|
"dev:mp-qq": "cross-env NODE_ENV=development UNI_PLATFORM=mp-qq vue-cli-service uni-build --watch",
|
||||||
|
"dev:mp-toutiao": "cross-env NODE_ENV=development UNI_PLATFORM=mp-toutiao vue-cli-service uni-build --watch",
|
||||||
|
"dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch --minimize",
|
||||||
|
"dev:mp-xhs": "cross-env NODE_ENV=development UNI_PLATFORM=mp-xhs vue-cli-service uni-build --watch",
|
||||||
|
"dev:quickapp-native": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-native vue-cli-service uni-build --watch",
|
||||||
|
"dev:quickapp-webview": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview vue-cli-service uni-build --watch",
|
||||||
|
"dev:quickapp-webview-huawei": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview-huawei vue-cli-service uni-build --watch",
|
||||||
|
"dev:quickapp-webview-union": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build --watch",
|
||||||
|
"info": "node node_modules/@dcloudio/vue-cli-plugin-uni/commands/info.js",
|
||||||
|
"serve:quickapp-native": "node node_modules/@dcloudio/uni-quickapp-native/bin/serve.js",
|
||||||
|
"test:android": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=android jest -i",
|
||||||
|
"test:h5": "cross-env UNI_PLATFORM=h5 jest -i",
|
||||||
|
"test:ios": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=ios jest -i",
|
||||||
|
"test:mp-baidu": "cross-env UNI_PLATFORM=mp-baidu jest -i",
|
||||||
|
"test:mp-weixin": "cross-env UNI_PLATFORM=mp-weixin jest -i"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@dcloudio/uni-app": "^2.0.2-3090920231225001",
|
||||||
|
"@dcloudio/uni-app-plus": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/uni-h5": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/uni-helper-json": "*",
|
||||||
|
"@dcloudio/uni-i18n": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/uni-mp-360": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/uni-mp-alipay": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/uni-mp-baidu": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/uni-mp-jd": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/uni-mp-kuaishou": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/uni-mp-lark": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/uni-mp-qq": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/uni-mp-toutiao": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/uni-mp-vue": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/uni-mp-weixin": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/uni-mp-xhs": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/uni-quickapp-native": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/uni-quickapp-webview": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/uni-stacktracey": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/uni-stat": "^2.0.1-35320220729002",
|
||||||
|
"@vue/composition-api": "^1.7.2",
|
||||||
|
"@vue/shared": "^3.0.0",
|
||||||
|
"animate.css": "^3.7.2",
|
||||||
|
"async-validator": "^3.2.4",
|
||||||
|
"core-js": "^3.6.5",
|
||||||
|
"dayjs": "^1.11.2",
|
||||||
|
"flyio": "^0.6.2",
|
||||||
|
"jweixin-module": "^1.6.0",
|
||||||
|
"miniapp-color-thief": "^1.0.5",
|
||||||
|
"number-precision": "^1.5.2",
|
||||||
|
"regenerator-runtime": "^0.12.1",
|
||||||
|
"uview-ui": "2.0.36",
|
||||||
|
"vconsole": "^3.14.6",
|
||||||
|
"vue": "^2.6.11",
|
||||||
|
"vue-ydui": "^1.2.6",
|
||||||
|
"vuex": "^3.2.0",
|
||||||
|
"wechat-jssdk": "^5.0.4"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@babel/runtime": "~7.17.9",
|
||||||
|
"@dcloudio/types": "^3.0.4",
|
||||||
|
"@dcloudio/uni-automator": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/uni-cli-i18n": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/uni-cli-shared": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/uni-migration": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/uni-template-compiler": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/vue-cli-plugin-uni": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/webpack-uni-mp-loader": "^2.0.1-35320220729002",
|
||||||
|
"@dcloudio/webpack-uni-pages-loader": "^2.0.1-35320220729002",
|
||||||
|
"@vue/cli-plugin-babel": "~4.5.19",
|
||||||
|
"@vue/cli-service": "~4.5.19",
|
||||||
|
"babel-plugin-import": "^1.11.0",
|
||||||
|
"cross-env": "^7.0.2",
|
||||||
|
"jest": "^25.4.0",
|
||||||
|
"less": "^4.1.0",
|
||||||
|
"less-loader": "^4.1.0",
|
||||||
|
"mini-types": "*",
|
||||||
|
"miniprogram-api-typings": "*",
|
||||||
|
"postcss-comment": "^2.0.0",
|
||||||
|
"sass": "^1.5.0",
|
||||||
|
"vue-template-compiler": "^2.6.11"
|
||||||
|
},
|
||||||
|
"browserslist": [
|
||||||
|
"Android >= 4.4",
|
||||||
|
"ios >= 9"
|
||||||
|
],
|
||||||
|
"resolutions": {
|
||||||
|
"@babel/runtime": "~7.17.9"
|
||||||
|
},
|
||||||
|
"uni-app": {
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "npm run dev:h5",
|
"mp-weixin-test": {
|
||||||
"build": "npm run build:h5",
|
"title": "微信小程序(Test环境)",
|
||||||
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build",
|
"env": {
|
||||||
"build:custom": "cross-env NODE_ENV=production uniapp-cli custom",
|
"UNI_PLATFORM": "mp-weixin",
|
||||||
"build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
|
"VUE_APP_ENV": "test",
|
||||||
"build:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build",
|
"UNI_OUTPUT_DIR": "dist"
|
||||||
"build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build",
|
},
|
||||||
"build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build",
|
"define": {
|
||||||
"build:mp-jd": "cross-env NODE_ENV=production UNI_PLATFORM=mp-jd vue-cli-service uni-build",
|
"CUSTOM-CONST": true
|
||||||
"build:mp-kuaishou": "cross-env NODE_ENV=production UNI_PLATFORM=mp-kuaishou vue-cli-service uni-build",
|
}
|
||||||
"build:mp-lark": "cross-env NODE_ENV=production UNI_PLATFORM=mp-lark vue-cli-service uni-build",
|
},
|
||||||
"build:mp-qq": "cross-env NODE_ENV=production UNI_PLATFORM=mp-qq vue-cli-service uni-build",
|
"mp-weixin": {
|
||||||
"build:mp-toutiao": "cross-env NODE_ENV=production UNI_PLATFORM=mp-toutiao vue-cli-service uni-build",
|
"title": "微信小程序(生产环境)",
|
||||||
"build:mp-weixin": "cross-env NODE_ENV=production UNI_PLATFORM=mp-weixin vue-cli-service uni-build",
|
"env": {
|
||||||
"build:mp-xhs": "cross-env NODE_ENV=production UNI_PLATFORM=mp-xhs vue-cli-service uni-build",
|
"UNI_PLATFORM": "mp-weixin",
|
||||||
"build:quickapp-native": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-native vue-cli-service uni-build",
|
"VUE_APP_ENV": "prod",
|
||||||
"build:quickapp-webview": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview vue-cli-service uni-build",
|
"UNI_OUTPUT_DIR": "dist"
|
||||||
"build:quickapp-webview-huawei": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-huawei vue-cli-service uni-build",
|
},
|
||||||
"build:quickapp-webview-union": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build",
|
"define": {
|
||||||
"dev:app-plus": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch",
|
"CUSTOM-CONST": true
|
||||||
"dev:custom": "cross-env NODE_ENV=development uniapp-cli custom",
|
}
|
||||||
"dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve",
|
}
|
||||||
"dev:mp-360": "cross-env NODE_ENV=development UNI_PLATFORM=mp-360 vue-cli-service uni-build --watch",
|
}
|
||||||
"dev:mp-alipay": "cross-env NODE_ENV=development UNI_PLATFORM=mp-alipay vue-cli-service uni-build --watch",
|
}
|
||||||
"dev:mp-baidu": "cross-env NODE_ENV=development UNI_PLATFORM=mp-baidu vue-cli-service uni-build --watch",
|
|
||||||
"dev:mp-jd": "cross-env NODE_ENV=development UNI_PLATFORM=mp-jd vue-cli-service uni-build --watch",
|
|
||||||
"dev:mp-kuaishou": "cross-env NODE_ENV=development UNI_PLATFORM=mp-kuaishou vue-cli-service uni-build --watch",
|
|
||||||
"dev:mp-lark": "cross-env NODE_ENV=development UNI_PLATFORM=mp-lark vue-cli-service uni-build --watch",
|
|
||||||
"dev:mp-qq": "cross-env NODE_ENV=development UNI_PLATFORM=mp-qq vue-cli-service uni-build --watch",
|
|
||||||
"dev:mp-toutiao": "cross-env NODE_ENV=development UNI_PLATFORM=mp-toutiao vue-cli-service uni-build --watch",
|
|
||||||
"dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch --minimize",
|
|
||||||
"dev:mp-xhs": "cross-env NODE_ENV=development UNI_PLATFORM=mp-xhs vue-cli-service uni-build --watch",
|
|
||||||
"dev:quickapp-native": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-native vue-cli-service uni-build --watch",
|
|
||||||
"dev:quickapp-webview": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview vue-cli-service uni-build --watch",
|
|
||||||
"dev:quickapp-webview-huawei": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview-huawei vue-cli-service uni-build --watch",
|
|
||||||
"dev:quickapp-webview-union": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview-union vue-cli-service uni-build --watch",
|
|
||||||
"info": "node node_modules/@dcloudio/vue-cli-plugin-uni/commands/info.js",
|
|
||||||
"serve:quickapp-native": "node node_modules/@dcloudio/uni-quickapp-native/bin/serve.js",
|
|
||||||
"test:android": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=android jest -i",
|
|
||||||
"test:h5": "cross-env UNI_PLATFORM=h5 jest -i",
|
|
||||||
"test:ios": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=ios jest -i",
|
|
||||||
"test:mp-baidu": "cross-env UNI_PLATFORM=mp-baidu jest -i",
|
|
||||||
"test:mp-weixin": "cross-env UNI_PLATFORM=mp-weixin jest -i"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@dcloudio/uni-app": "^2.0.2-3090920231225001",
|
|
||||||
"@dcloudio/uni-app-plus": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/uni-h5": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/uni-helper-json": "*",
|
|
||||||
"@dcloudio/uni-i18n": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/uni-mp-360": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/uni-mp-alipay": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/uni-mp-baidu": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/uni-mp-jd": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/uni-mp-kuaishou": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/uni-mp-lark": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/uni-mp-qq": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/uni-mp-toutiao": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/uni-mp-vue": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/uni-mp-weixin": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/uni-mp-xhs": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/uni-quickapp-native": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/uni-quickapp-webview": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/uni-stacktracey": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/uni-stat": "^2.0.1-35320220729002",
|
|
||||||
"@vue/composition-api": "^1.7.2",
|
|
||||||
"@vue/shared": "^3.0.0",
|
|
||||||
"animate.css": "^3.7.2",
|
|
||||||
"async-validator": "^3.2.4",
|
|
||||||
"core-js": "^3.6.5",
|
|
||||||
"dayjs": "^1.11.2",
|
|
||||||
"flyio": "^0.6.2",
|
|
||||||
"jweixin-module": "^1.6.0",
|
|
||||||
"miniapp-color-thief": "^1.0.5",
|
|
||||||
"number-precision": "^1.5.2",
|
|
||||||
"regenerator-runtime": "^0.12.1",
|
|
||||||
"uview-ui": "2.0.36",
|
|
||||||
"vconsole": "^3.14.6",
|
|
||||||
"vue": "^2.6.11",
|
|
||||||
"vue-ydui": "^1.2.6",
|
|
||||||
"vuex": "^3.2.0",
|
|
||||||
"wechat-jssdk": "^5.0.4"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@babel/runtime": "~7.17.9",
|
|
||||||
"@dcloudio/types": "^3.0.4",
|
|
||||||
"@dcloudio/uni-automator": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/uni-cli-i18n": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/uni-cli-shared": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/uni-migration": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/uni-template-compiler": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/vue-cli-plugin-uni": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/webpack-uni-mp-loader": "^2.0.1-35320220729002",
|
|
||||||
"@dcloudio/webpack-uni-pages-loader": "^2.0.1-35320220729002",
|
|
||||||
"@vue/cli-plugin-babel": "~4.5.19",
|
|
||||||
"@vue/cli-service": "~4.5.19",
|
|
||||||
"babel-plugin-import": "^1.11.0",
|
|
||||||
"cross-env": "^7.0.2",
|
|
||||||
"jest": "^25.4.0",
|
|
||||||
"less": "^4.1.0",
|
|
||||||
"less-loader": "^4.1.0",
|
|
||||||
"mini-types": "*",
|
|
||||||
"miniprogram-api-typings": "*",
|
|
||||||
"postcss-comment": "^2.0.0",
|
|
||||||
"sass": "^1.5.0",
|
|
||||||
"vue-template-compiler": "^2.6.11"
|
|
||||||
},
|
|
||||||
"browserslist": [
|
|
||||||
"Android >= 4.4",
|
|
||||||
"ios >= 9"
|
|
||||||
],
|
|
||||||
"resolutions": {
|
|
||||||
"@babel/runtime": "~7.17.9"
|
|
||||||
},
|
|
||||||
"uni-app": {
|
|
||||||
"scripts": {
|
|
||||||
"mp-weixin-test": {
|
|
||||||
"title": "微信小程序(Test环境)",
|
|
||||||
"env": {
|
|
||||||
"UNI_PLATFORM": "mp-weixin",
|
|
||||||
"VUE_APP_ENV": "test",
|
|
||||||
"UNI_OUTPUT_DIR": "dist"
|
|
||||||
},
|
|
||||||
"define": {
|
|
||||||
"CUSTOM-CONST": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mp-weixin": {
|
|
||||||
"title": "微信小程序(生产环境)",
|
|
||||||
"env": {
|
|
||||||
"UNI_PLATFORM": "mp-weixin",
|
|
||||||
"VUE_APP_ENV": "prod",
|
|
||||||
"UNI_OUTPUT_DIR": "dist"
|
|
||||||
},
|
|
||||||
"define": {
|
|
||||||
"CUSTOM-CONST": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -778,7 +778,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "views/giftList/receive",
|
"path": "views/gift/receive",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "好友赠送的礼包"
|
"navigationBarTitleText": "好友赠送的礼包"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="introduce bold">{{ storeInfo.storeName }}</view>
|
<view class="introduce bold">{{ storeInfo.storeName }}</view>
|
||||||
<view class="v12-primary v12-white-text v12-px-2 v12-py-1 v12-mt-2 v12-radius-20 v12-font-bold v12-justify-between v12-align-center">
|
<view v-if="storeInfo.isGiftCard === 1" class="v12-primary v12-white-text v12-px-2 v12-py-1 v12-mt-2 v12-radius-20 v12-font-bold v12-justify-between v12-align-center">
|
||||||
<view class="v12-font-28 v12-align-center">
|
<view class="v12-font-28 v12-align-center">
|
||||||
<img class="gift-img" :src="webUrl + '/orderIcon/gift.png'" mode="widthFix">
|
<img class="gift-img" :src="webUrl + '/orderIcon/gift.png'" mode="widthFix">
|
||||||
支持礼包赠送
|
支持礼包赠送
|
||||||
@@ -473,6 +473,8 @@
|
|||||||
:attr="attr"
|
:attr="attr"
|
||||||
:cartNum="cart_num"
|
:cartNum="cart_num"
|
||||||
@changeFun="changeFun"
|
@changeFun="changeFun"
|
||||||
|
@gift="gift"
|
||||||
|
:isGift="isGift"
|
||||||
/>
|
/>
|
||||||
<ServiceWin ref="serviceWin" :info="storeInfo.guarantee" />
|
<ServiceWin ref="serviceWin" :info="storeInfo.guarantee" />
|
||||||
<StorePoster v-on:setPosterImageStatus="setPosterImageStatus" :posterImageStatus="posterImageStatus"
|
<StorePoster v-on:setPosterImageStatus="setPosterImageStatus" :posterImageStatus="posterImageStatus"
|
||||||
@@ -554,6 +556,7 @@ export default {
|
|||||||
mixins: [pageListenMixins],
|
mixins: [pageListenMixins],
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
|
isGift: false,
|
||||||
// 商品信息是否展开
|
// 商品信息是否展开
|
||||||
isProductInfoExpand: true,
|
isProductInfoExpand: true,
|
||||||
shareInfoStatus: false,
|
shareInfoStatus: false,
|
||||||
@@ -772,10 +775,19 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
gift() {
|
||||||
|
this.goCat(2)
|
||||||
|
},
|
||||||
toGift() {
|
toGift() {
|
||||||
uni.navigateTo({
|
if ((this.attr.productSelect.stock === 0 && this.attr.cartAttr) || this.storeInfo.stock === 0) {
|
||||||
url: '/pkg_user/views/gift/gift'
|
return
|
||||||
})
|
}
|
||||||
|
this.isGift = true
|
||||||
|
// 2=送给朋友
|
||||||
|
this.goCat(2)
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: '/pkg_user/views/gift/gift'
|
||||||
|
// })
|
||||||
},
|
},
|
||||||
showService() {
|
showService() {
|
||||||
this.$refs.serviceWin.show = true
|
this.$refs.serviceWin.show = true
|
||||||
@@ -1335,6 +1347,7 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 0=加入购物车
|
// 0=加入购物车
|
||||||
|
this.isGift = false
|
||||||
this.goCat(0)
|
this.goCat(0)
|
||||||
},
|
},
|
||||||
// 立即购买
|
// 立即购买
|
||||||
@@ -1343,6 +1356,7 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 1=直接购买
|
// 1=直接购买
|
||||||
|
this.isGift = false
|
||||||
this.goCat(1)
|
this.goCat(1)
|
||||||
},
|
},
|
||||||
// 加入购物车
|
// 加入购物车
|
||||||
@@ -1379,7 +1393,7 @@ export default {
|
|||||||
const q = {
|
const q = {
|
||||||
productId: that.id,
|
productId: that.id,
|
||||||
cartNum: that.attr.productSelect.cart_num,
|
cartNum: that.attr.productSelect.cart_num,
|
||||||
new: news,
|
new: news === 2 ? 1 : news,
|
||||||
uniqueId: that.attr.productSelect !== undefined ?
|
uniqueId: that.attr.productSelect !== undefined ?
|
||||||
that.attr.productSelect.unique : ""
|
that.attr.productSelect.unique : ""
|
||||||
}
|
}
|
||||||
@@ -1398,16 +1412,22 @@ export default {
|
|||||||
postCartAdd(q).then(function (res) {
|
postCartAdd(q).then(function (res) {
|
||||||
that.isOpen = false
|
that.isOpen = false
|
||||||
that.attr.cartAttr = false
|
that.attr.cartAttr = false
|
||||||
console.log( that.couponId)
|
if (news === 1) {
|
||||||
if (news) {
|
|
||||||
that.$yrouter.push({
|
that.$yrouter.push({
|
||||||
path: "/pages/order/OrderSubmission/index",
|
path: "/pages/order/OrderSubmission/index",
|
||||||
query: {
|
query: {
|
||||||
id: res.data.cartId,
|
id: res.data.cartId,
|
||||||
couponId: that.couponId
|
couponId: that.couponId // 优惠券ID
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
return
|
||||||
|
}
|
||||||
|
if(news === 2) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pkg_user/views/gift/gift?cartId=' + res.data.cartId + '&couponId=' + that.couponId
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if(news === 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "添加购物车成功",
|
title: "添加购物车成功",
|
||||||
icon: "success",
|
icon: "success",
|
||||||
@@ -1416,6 +1436,7 @@ export default {
|
|||||||
that.getCartCount(true)
|
that.getCartCount(true)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
that.isOpen = false;
|
that.isOpen = false;
|
||||||
|
|||||||
@@ -0,0 +1,109 @@
|
|||||||
|
<template>
|
||||||
|
<u-popup
|
||||||
|
:show="show"
|
||||||
|
mode="bottom"
|
||||||
|
round="40rpx"
|
||||||
|
@close="close"
|
||||||
|
:customStyle="{height: '600rpx'}"
|
||||||
|
closeable>
|
||||||
|
<view class="cover-picker">
|
||||||
|
<view class="cover-title">选择封面</view>
|
||||||
|
<swiper
|
||||||
|
:autoplay="false"
|
||||||
|
:circular="true"
|
||||||
|
:indicator-dots="false"
|
||||||
|
@change="onChange"
|
||||||
|
previous-margin="120rpx"
|
||||||
|
next-margin="120rpx"
|
||||||
|
class="cover-swiper"
|
||||||
|
>
|
||||||
|
<swiper-item v-for="(item, index) in list" :key="index" >
|
||||||
|
<view class="cover-item">
|
||||||
|
<image :src="item.image" :class="{ 'v12-mt-3': currentIndex === index }" class="cover-image" mode="widthFix|heightFix" />
|
||||||
|
<view class="cover-name">{{ item.name }} </view>
|
||||||
|
</view>
|
||||||
|
</swiper-item>
|
||||||
|
</swiper>
|
||||||
|
<view class="v12-justify-center">
|
||||||
|
<view class="cover-confirm" @click="confirm">
|
||||||
|
确定
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
show: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
list: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
currentIndex: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
close() {
|
||||||
|
this.$emit('update:show', false)
|
||||||
|
},
|
||||||
|
onChange(e) {
|
||||||
|
this.currentIndex = e.detail.current
|
||||||
|
},
|
||||||
|
confirm() {
|
||||||
|
this.$emit('confirm', this.list[this.currentIndex])
|
||||||
|
this.$emit('update:show', false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.cover-swiper{
|
||||||
|
height: 540rpx;
|
||||||
|
}
|
||||||
|
.cover-picker {
|
||||||
|
padding: 30rpx;
|
||||||
|
.cover-title {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cover-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
.cover-image {
|
||||||
|
width: 380rpx;
|
||||||
|
height: 460rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
transition: all .2s ease-in-out;
|
||||||
|
}
|
||||||
|
.cover-name {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.cover-confirm {
|
||||||
|
margin-top: 40rpx;
|
||||||
|
width: 240rpx;
|
||||||
|
height: 80rpx;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
font-size: 32rpx;
|
||||||
|
background-color: #C52733 !important;
|
||||||
|
color: #fff !important;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 80rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<!-- 弹窗组件 -->
|
||||||
|
<u-popup
|
||||||
|
:show="showTips"
|
||||||
|
mode="center"
|
||||||
|
closeable
|
||||||
|
round="16rpx"
|
||||||
|
@close="showTips = false"
|
||||||
|
>
|
||||||
|
<view class="popup-content">
|
||||||
|
<!-- 标题 -->
|
||||||
|
<view class="title">购买须知</view>
|
||||||
|
<!-- 富文本内容 -->
|
||||||
|
<u-parse :content="richText" />
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
// 接收传递的参数
|
||||||
|
richText: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
showTips: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.popup-content {
|
||||||
|
width: 600rpx;
|
||||||
|
padding: 40rpx;
|
||||||
|
box-sizing: border-box;
|
||||||
|
.title {
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close-btn {
|
||||||
|
margin-top: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .u-parse {
|
||||||
|
max-height: 800rpx;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<view class="v12-font-28 v12-secondary-dark-text">送礼寄语</view>
|
<view class="v12-font-28 v12-secondary-dark-text">送礼寄语</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="v12-primary-text v12-font-26">
|
<view class="v12-primary-text v12-font-26">
|
||||||
<view>默认封面</view>
|
<view @click="showCoverPicker = true">默认封面</view>
|
||||||
<view>
|
<view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -23,23 +23,82 @@
|
|||||||
<view class="swich-btn">
|
<view class="swich-btn">
|
||||||
<view class="v12-font-28 v12-dark-text">是否支持好友转赠</view>
|
<view class="v12-font-28 v12-dark-text">是否支持好友转赠</view>
|
||||||
<view>
|
<view>
|
||||||
<u-switch v-model="value3" ></u-switch>
|
<u-switch v-model="canTransfe" ></u-switch>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="btn-wrap v12-mt-16 v12-justify-center">
|
<view class="btn-wrap v12-mt-16 v12-justify-center">
|
||||||
<view class="gift-submit">付款并赠送</view>
|
<view class="gift-submit" @click="submitGift">付款并赠送</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="tip-wrap v12-justify-center">
|
<view class="tip-wrap v12-justify-center">
|
||||||
<view class="tip-text v12-mr-1">好友未收下礼包,将于24小时后自动退款</view>
|
<view class="tip-text v12-mr-1">好友未收下礼包,将于24小时后自动退款</view>
|
||||||
<u-icon name="error-circle" color="#666" size="28rpx"></u-icon>
|
<u-icon @click="showTips" name="error-circle" color="#666" size="28rpx"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
|
<giftTips ref="giftTips" :richText="giftNotice"></giftTips>
|
||||||
|
<CoverPicker
|
||||||
|
:show.sync="showCoverPicker"
|
||||||
|
:list="coverList"
|
||||||
|
@confirm="onCoverConfirm"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { getGiftCardSendOrderConfirm } from '@/api/gift'
|
||||||
|
import giftTips from './components/giftTips.vue'
|
||||||
|
import CoverPicker from './components/CoverPicker.vue'
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
giftTips,
|
||||||
|
CoverPicker
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
canTransfe: false,
|
||||||
|
cartId: '',
|
||||||
|
couponId: '',
|
||||||
|
coverList: [],
|
||||||
|
giftNotice: '',
|
||||||
|
showCoverPicker: false,
|
||||||
|
selectedCover: '',
|
||||||
|
orderKey: '',
|
||||||
|
goodsInfo: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onLoad(opts) {
|
||||||
|
console.log(opts, 'gift');
|
||||||
|
this.cartId = opts.cartId
|
||||||
|
this.couponId = opts.couponId
|
||||||
|
this.getGift()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 付款并赠送
|
||||||
|
submitGift() {
|
||||||
|
const params = {
|
||||||
|
cartId: this.cartId,
|
||||||
|
couponId: this.couponId,
|
||||||
|
cover: this.selectedCover,
|
||||||
|
canTransfe: this.canTransfe
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onCoverConfirm(cover) {
|
||||||
|
this.selectedCover = cover.image
|
||||||
|
},
|
||||||
|
showTips() {
|
||||||
|
this.$refs.giftTips.showTips = true
|
||||||
|
},
|
||||||
|
getGift() {
|
||||||
|
const params = {
|
||||||
|
cartId: this.cartId,
|
||||||
|
}
|
||||||
|
getGiftCardSendOrderConfirm(params).then(res => {
|
||||||
|
this.coverList = res.data.giftCardTemplates
|
||||||
|
this.giftNotice = res.data.giftCardGiftNotice
|
||||||
|
this.orderKey = res.data.orderKey
|
||||||
|
this.goodsInfo = res.data.cartInfo[0]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user