初始化
This commit is contained in:
8
.gitignore
vendored
Normal file
8
.gitignore
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
/node_modules
|
||||
.env
|
||||
.env.backup
|
||||
.phpunit.result.cache
|
||||
docker-compose.override.yml
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
/unpackage
|
||||
30
.hbuilderx/launch.json
Normal file
30
.hbuilderx/launch.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
// launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
|
||||
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
|
||||
"version" : "0.0",
|
||||
"configurations" : [
|
||||
{
|
||||
"app-plus" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"default" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"mp-alipay" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"mp-weixin" :
|
||||
{
|
||||
"launchtype" : "local"
|
||||
},
|
||||
"type" : "uniCloud"
|
||||
},
|
||||
{
|
||||
"playground" : "standard",
|
||||
"type" : "uni-app:app-ios"
|
||||
}
|
||||
]
|
||||
}
|
||||
5
.mini-ide/project-ide.json
Normal file
5
.mini-ide/project-ide.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"ignoreHttpDomainCheck": true,
|
||||
"ignoreWebViewDomainCheck": true,
|
||||
"ignoreCertificateDomainCheck": true
|
||||
}
|
||||
6
.vscode/settings.json
vendored
Normal file
6
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"files.associations": {
|
||||
"*.ttml": "xml",
|
||||
"*.ttss": "css"
|
||||
}
|
||||
}
|
||||
62
App.vue
Normal file
62
App.vue
Normal file
@@ -0,0 +1,62 @@
|
||||
<script>
|
||||
import api_ from '@/common/js/api.js'
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
// uni.login({
|
||||
// provider: 'weixin',
|
||||
// success:(res) => {
|
||||
// console.log(res.code)
|
||||
// }
|
||||
// });
|
||||
// #ifdef H5
|
||||
this.$isResolve()
|
||||
// #endif
|
||||
},
|
||||
async onShow() {
|
||||
this.$store.commit('updateTheme', 'haircut')
|
||||
this.$store.dispatch("HeightActions"); //获取随时获取页面的高度
|
||||
// // 当向小程序后台请求完新版本信息,会进行回调。res: {hasUpdate: true, version: 1.0.0}
|
||||
// const updateManager = uni.getUpdateManager();
|
||||
// updateManager.onCheckForUpdate(function(res) {
|
||||
// if (res.hasUpdate) { // 有更新
|
||||
// uni.showLoading({
|
||||
// title: '更新中...'
|
||||
// }); // 开始下载前,显示Loading
|
||||
// }
|
||||
// });
|
||||
// // 当新版本下载完成,会进行回调
|
||||
// updateManager.onUpdateReady(function() {
|
||||
// uni.hideLoading(); // 关闭 Loading
|
||||
// uni.showModal({ // 弹确认框(强制更新)
|
||||
// title: '更新提示',
|
||||
// content: '更新完毕,是否重启?',
|
||||
// success: function(res) {
|
||||
// if (res.confirm) {
|
||||
// updateManager.applyUpdate(); // 强制小程序重启并使用新版本。
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// });
|
||||
// // 当新版本下载失败,会进行回调
|
||||
// updateManager.onUpdateFailed(function() {
|
||||
// uni.hideLoading(); // 关闭 Loading
|
||||
// uni.showToast({
|
||||
// title: '更新失败,稍后再试...',
|
||||
// icon: "error"
|
||||
// });
|
||||
// });
|
||||
|
||||
},
|
||||
onHide: function() {}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import '@/uni_modules/uview-ui/index.scss';
|
||||
/* #ifndef APP-PLUS-NVUE */
|
||||
@import './common/css/uni.scss';
|
||||
/* #endif */
|
||||
/* uni.scss */
|
||||
@import './common/css/theme.scss';
|
||||
@import './common/css/flex.css';
|
||||
</style>
|
||||
110
README.md
110
README.md
@@ -1 +1,109 @@
|
||||
#appointment_weapp
|
||||
# project
|
||||
|
||||
#### 介绍
|
||||
{**以下是 Gitee 平台说明,您可以替换此简介**
|
||||
Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台
|
||||
无论是个人1、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
|
||||
|
||||
## 目录说明
|
||||
```
|
||||
站点根目录
|
||||
├─common //公共文件
|
||||
├─api //api接口定义
|
||||
├─css //公共css定义
|
||||
└─js //公共js定义
|
||||
├─components //uniapp组件目录
|
||||
├─framework //自定义js框架
|
||||
├─0-conf.js //项目请求地址配置
|
||||
├─1-utils.js //工具js
|
||||
├─2-url.js //获取当前页面路由地址
|
||||
├─3-pro.js //uni系统相关api
|
||||
├─4-queue.js //队列
|
||||
├─5-pro-ext.js //页面跳转相关方法
|
||||
├─6-event.js //事件监听
|
||||
├─7-qiniu.js //七牛云js
|
||||
├─8-cache.js //缓存方法
|
||||
├─9-modal.js //AB页面传参
|
||||
├─11-api.js //uni.request()方法封装
|
||||
├─13-mixin //页面混入方法
|
||||
├─14-device.js //调用uni系统震动
|
||||
├─bootstrap.js //js入口文件
|
||||
├─bridge.js //与原生交互
|
||||
├─md5.js //md5加密
|
||||
├─sign.js //签名
|
||||
├─vConsole.js //控制台
|
||||
├─pages //应用页面
|
||||
├─home //个人中心
|
||||
├─index //首页
|
||||
├─news //新闻
|
||||
├─public //公共页面(登录注册)
|
||||
├─shop //商城页面
|
||||
├─type //分类页面
|
||||
├─web //项目外链
|
||||
├─static //图片资源
|
||||
├─store //vuex状态管理
|
||||
├─unpackage //编译后目录
|
||||
├─uview-ui //uview-ui插件依赖
|
||||
├─app.vue //uni-app配置文件
|
||||
├─main.js //vue入口js
|
||||
├─manifest.json //uniapp项目配置文件
|
||||
├─pages.json //页面路由配置页
|
||||
├─uni.scss //uniapp内置的常用样式变量
|
||||
```
|
||||
#### 项目说明
|
||||
1. 项目基于Vue-uniApp,使用uview框架。
|
||||
|
||||
#### 安装教程
|
||||
|
||||
1. 下载安装:「HBuildX」
|
||||
2. 将项目拖进【HBuildX】- 运行 - 运行到浏览器 - 完成
|
||||
|
||||
|
||||
#### 使用说明
|
||||
1. ui框架使用uviewui https://www.uviewui.com/js/intro.html
|
||||
2. 请求接口统一定义在common/index.js (使用方式uni.ajax(option)
|
||||
3. 状态管理 使用vuex模块(module)
|
||||
4. css布局采用flex布局(详见common/css/flex.css)
|
||||
5. 接口域名配置(framework/0-conf.js)
|
||||
const debug = true//true是本地代理配置false服务器环境
|
||||
const proxyApi = "/api/"
|
||||
let baseUrl="";
|
||||
uni.is_online = false; //false 为测试服 true正式服
|
||||
if (uni.is_online) {
|
||||
//正式
|
||||
baseUrl = debug ? proxyApi : 'http://mc.test.hmsc000111.com/'
|
||||
} else {
|
||||
// 测试
|
||||
baseUrl = debug ? proxyApi : 'http://mc.test.hmsc000111.com/'
|
||||
}
|
||||
#### 开发规范
|
||||
0. 写注释要注意:写明代码的作用,重要的地方写注释
|
||||
1. js使用ES6语法
|
||||
2. 页面布局flex布局
|
||||
3. 减少页面代码体积,复杂,重复性代码应提取封装成组件引入
|
||||
4. 公共js函数统一封装在common/js目录下
|
||||
5. css统一使用scss
|
||||
6. 加载外链使用 page/web/index.vue
|
||||
7. 公共组件封装在根目录下 components 命名方式(ixxxxxx)
|
||||
8. 某个页面独享组件(封装在当前页面所在目录下components)
|
||||
9. 图片:除非特别要求图片必须高质量的显示,否则都应该进行对应的压缩处理
|
||||
10. 避免过多的if else判断
|
||||
|
||||
|
||||
|
||||
#### 参与贡献
|
||||
|
||||
1. Fork 本仓库
|
||||
2. 新建 Feat_xxx 分支
|
||||
3. 提交代码
|
||||
4. 新建 Pull Request
|
||||
|
||||
|
||||
#### 特技
|
||||
|
||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
||||
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
|
||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
|
||||
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
|
||||
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
||||
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
||||
48
common/css/flex.css
Normal file
48
common/css/flex.css
Normal file
@@ -0,0 +1,48 @@
|
||||
.flex-center{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.flex-start{
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.flex-end{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.flex-colum{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.flex-colum-start{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.flex-colum-end{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: flex-end;
|
||||
}
|
||||
.flex-between{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.flex-around{
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
15
common/css/theme.scss
Normal file
15
common/css/theme.scss
Normal file
@@ -0,0 +1,15 @@
|
||||
/* 普通字体颜色 */
|
||||
$text-color: var(--text-color);
|
||||
/* 按钮字体颜色 */
|
||||
$text-color-reverse: var(--text-color-reverse);
|
||||
/* tab字体颜色 */
|
||||
$text-color-tab: var(--text-color-tab);
|
||||
|
||||
/* 普通背景颜色 */
|
||||
$bg-color: var(--bg-color);
|
||||
|
||||
/* 普通阴影颜色 */
|
||||
$bg-shadow: var(--bg-shadow);
|
||||
|
||||
/* 主题颜色 */
|
||||
$theme-color: var(--theme-color);
|
||||
1534
common/css/uni.scss
Normal file
1534
common/css/uni.scss
Normal file
File diff suppressed because it is too large
Load Diff
35
common/js/WXBizDataCrypt.js
Normal file
35
common/js/WXBizDataCrypt.js
Normal file
@@ -0,0 +1,35 @@
|
||||
var crypto = require('crypto')
|
||||
|
||||
function WXBizDataCrypt(appId, sessionKey) {
|
||||
this.appId = appId
|
||||
this.sessionKey = sessionKey
|
||||
}
|
||||
|
||||
WXBizDataCrypt.prototype.decryptData = function (encryptedData, iv) {
|
||||
// base64 decode
|
||||
var sessionKey = new Buffer(this.sessionKey, 'base64')
|
||||
encryptedData = new Buffer(encryptedData, 'base64')
|
||||
iv = new Buffer(iv, 'base64')
|
||||
|
||||
try {
|
||||
// 解密
|
||||
var decipher = crypto.createDecipheriv('aes-128-cbc', sessionKey, iv)
|
||||
// 设置自动 padding 为 true,删除填充补位
|
||||
decipher.setAutoPadding(true)
|
||||
var decoded = decipher.update(encryptedData, 'binary', 'utf8')
|
||||
decoded += decipher.final('utf8')
|
||||
|
||||
decoded = JSON.parse(decoded)
|
||||
|
||||
} catch (err) {
|
||||
throw new Error('Illegal Buffer')
|
||||
}
|
||||
|
||||
if (decoded.watermark.appid !== this.appId) {
|
||||
throw new Error('Illegal Buffer')
|
||||
}
|
||||
|
||||
return decoded
|
||||
}
|
||||
|
||||
module.exports = WXBizDataCrypt
|
||||
224
common/js/api.js
Normal file
224
common/js/api.js
Normal file
@@ -0,0 +1,224 @@
|
||||
export default {
|
||||
userlogin(data) { //登录
|
||||
return uni.api.post("/user/login", data);
|
||||
},
|
||||
classificationbottomnavigation(data) { //底部导航
|
||||
return uni.api.post("/classification/bottomnavigation", data);
|
||||
},
|
||||
usermy(data) { //我的
|
||||
return uni.api.post("/my", data);
|
||||
},
|
||||
smssend(data) { //发送验证码
|
||||
return uni.api.post("/sms/send", data);
|
||||
},
|
||||
userbindingphone(data) { //绑定手机号
|
||||
return uni.api.post("/user/bindingphone", data);
|
||||
},
|
||||
useruserinfo(data) { //个人资料
|
||||
return uni.api.post("/user/userinfo", data);
|
||||
},
|
||||
useruserinfoedit(data) { //个人资料修改
|
||||
return uni.api.post("/user/userinfoedit", data);
|
||||
},
|
||||
reservationclassyy(data) { //预约分类
|
||||
return uni.api.post("/reservation/classyy", data);
|
||||
},
|
||||
reservationlist(data) { //预约列表
|
||||
return uni.api.post("/reservation/list", data, false);
|
||||
},
|
||||
indexworksdetail(data) { //作品详情
|
||||
return uni.api.post("/index/worksdetail", data);
|
||||
},
|
||||
indexworks(data) { //作品
|
||||
return uni.api.post("/index/works", data);
|
||||
},
|
||||
indexappclassindex(data) { //店铺详情
|
||||
return uni.api.post("/index/appclassindex", data);
|
||||
},
|
||||
indexnewappclassindex(data) { //新店铺详情
|
||||
return uni.api.post("/index/newappclassindex", data);
|
||||
},
|
||||
positionindex(data) { //首页
|
||||
return uni.api.post("/index", data, false);
|
||||
},
|
||||
reservationdetail(data) { //服务详情
|
||||
return uni.api.post("/reservation/detail", data, false);
|
||||
},
|
||||
okmakenowreservation(data) { //确认预约页面
|
||||
return uni.api.post("/reservation/okmakenow", data);
|
||||
},
|
||||
reservationmakenowsub(data) { //确认支付
|
||||
return uni.api.post("/reservation/makenowsub", data, false, 1);
|
||||
},
|
||||
paygetpayparams(data) { //获取支付参数
|
||||
return uni.api.post("/pay/getpayparams", data, false, 1);
|
||||
},
|
||||
payorderstatus(data) { //获取支付状态
|
||||
return uni.api.post("/pay/orderstatus", data);
|
||||
},
|
||||
orderlist(data) { //订单列表
|
||||
return uni.api.post("/order/list", data);
|
||||
},
|
||||
orderorderdetail(data) { //订单详情
|
||||
return uni.api.post("/order/orderdetail", data);
|
||||
},
|
||||
orderordercancel(data) { //取消订单
|
||||
return uni.api.post("/order/ordercancel", data);
|
||||
},
|
||||
orderorderdelete(data) { //取消订单订单
|
||||
return uni.api.post("/order/orderdelete", data);
|
||||
},
|
||||
orderorderrefund(data) { //申请/修改退款
|
||||
return uni.api.post("/order/orderrefund", data);
|
||||
},
|
||||
orderrefunddetail(data) { //退款详情
|
||||
return uni.api.post("/order/orderrefunddetail", data);
|
||||
},
|
||||
userusercarlist(data) { //会员卡列表
|
||||
return uni.api.post("/user/usercarlist", data);
|
||||
},
|
||||
userbalancerechange(data) { //余额卡充值金额
|
||||
return uni.api.post("/user/balancerechange", data);
|
||||
},
|
||||
userreceivebalancecar(data) { //领取会员卡
|
||||
return uni.api.post("/user/receivebalancecar", data);
|
||||
},
|
||||
orderorderrefundcancel(data) { //取消退款
|
||||
return uni.api.post("/order/orderrefundcancel", data);
|
||||
},
|
||||
useruserpolicy(data) { //
|
||||
return uni.api.post("/user/userpolicy", data);
|
||||
},
|
||||
userbalancerechangesub(data) { //取消退款
|
||||
return uni.api.post("/user/balancerechangesub", data);
|
||||
},
|
||||
usergetwechatphone(data) { //微信获取手机号
|
||||
return uni.api.post("/user/getwechatphone", data);
|
||||
},
|
||||
userputopenid(data) { //openid
|
||||
return uni.api.post("/user/putopenid", data);
|
||||
},
|
||||
reservationmakenow(data) { //可预约时间
|
||||
return uni.api.post("/reservation/makenow", data);
|
||||
},
|
||||
reservationattendantavailable(data) { //有空服务员
|
||||
return uni.api.post("/reservation/attendantavailable", data);
|
||||
},
|
||||
uservippassword(data) { //设置安全密码
|
||||
return uni.api.post("/user/vippassword", data, true);
|
||||
},
|
||||
reservationdirectorder(data) { //直接下单
|
||||
return uni.api.post("/reservation/directorder", data);
|
||||
},
|
||||
reservationorderecho(data) { //订单回显
|
||||
return uni.api.post("/reservation/orderecho", data);
|
||||
},
|
||||
reservationvipdetail(data) { //店铺会员卡详情
|
||||
return uni.api.post("/reservation/vipdetail", data);
|
||||
},
|
||||
useropenuserseccrd(data) { //开通次卡
|
||||
return uni.api.post("/user/openuserseccrd", data);
|
||||
},
|
||||
useruserbalance(data) { //用户余额卡信息
|
||||
return uni.api.post("/user/userbalance", data);
|
||||
},
|
||||
reservationdesignerviewtime(data) { //设计师可预约时间
|
||||
return uni.api.post("/reservation/designerviewtime", data);
|
||||
},
|
||||
reservationpeopleinfo(data) { //服务员详情
|
||||
return uni.api.post("/reservation/peopleinfo", data);
|
||||
},
|
||||
reservationpaythebill(data) { //买单页面
|
||||
return uni.api.post("/reservation/paythebill", data);
|
||||
},
|
||||
reservationpaythebillsub(data) { //买单付款
|
||||
return uni.api.post("/reservation/paythebillsub", data);
|
||||
},
|
||||
shoppingindex(data) { //商城首页
|
||||
return uni.api.post("/shopping/index", data);
|
||||
},
|
||||
shoppingindexgoodsclass(data) { //商品分类
|
||||
return uni.api.post("/shopping/index/goodsclass", data);
|
||||
},
|
||||
shoppingindexgoodsgoodsdetail(data) { //商品详情
|
||||
return uni.api.post("/shopping/goods/goodsdetail", data);
|
||||
},
|
||||
shoppingindexgoodindexsaddcar(data) { //添加购物车
|
||||
return uni.api.post("/shopping/index/addcar",data);
|
||||
},
|
||||
shoppingindexgoodindexcarlistr(data) { //购物车列表
|
||||
return uni.api.post("/shopping/index/carlist",data,false);
|
||||
},
|
||||
shoppingindexgoodindexcardelcarr(data) { //删除购物车
|
||||
return uni.api.post("/shopping/index/delcar",data);
|
||||
},
|
||||
shoppingindexgoodindexcareditcar(data) { //编辑购物车
|
||||
return uni.api.post("/shopping/index/editcar",data);
|
||||
},
|
||||
shoppingindexgoodindexoforders(data) { //结算/确认订单
|
||||
return uni.api.post("/shopping/index/oforders",data);
|
||||
},
|
||||
shoppingindexgoodindexsuborder(data) { //提交订单
|
||||
return uni.api.post("/shopping/index/suborder",data,false, 1);
|
||||
},
|
||||
shoppingindexgoodindexgetpayparams(data) { //获取支付参数
|
||||
return uni.api.post("/shopping/index/getpayparams", data, false, 1);
|
||||
},
|
||||
usermyaddresslist(data) { //我的地址列表
|
||||
return uni.api.post("/user/myaddresslist", data);
|
||||
},
|
||||
usereditaddress(data) { //编辑/添加地址
|
||||
return uni.api.post("/user/editaddress", data);
|
||||
},
|
||||
useredeleteaddress(data) { //删除地址
|
||||
return uni.api.post("/user/deleteaddress", data);
|
||||
},
|
||||
usereaddressshow(data) { //地址回显
|
||||
return uni.api.post("/user/addressshow", data);
|
||||
},
|
||||
shoppingorderlist(data) { //商城订单列表
|
||||
return uni.api.post("/shopping/order/list", data);
|
||||
},
|
||||
shoppingorderordercancel(data) { //商城订单取消
|
||||
return uni.api.post("/shopping/order/ordercancel", data);
|
||||
},
|
||||
shoppingorderorderorderdelete(data) { //商城删除订单
|
||||
return uni.api.post("/shopping/order/orderdelete", data);
|
||||
},
|
||||
shoppingorderorderororderrefund(data) { //商城申请/修改退款
|
||||
return uni.api.post("/shopping/order/orderrefund", data);
|
||||
},
|
||||
shoppingorderoorderdetail(data) { //商城订单详情
|
||||
return uni.api.post("/shopping/order/orderdetail", data);
|
||||
},
|
||||
shoppingorderorderrefunddetail(data) { //商城退款详情
|
||||
return uni.api.post("/shopping/order/orderrefunddetail", data);
|
||||
},
|
||||
shoppingorderorderorderrefundcancel(data) { //商城取消退款
|
||||
return uni.api.post("/shopping/order/orderrefundcancel", data);
|
||||
},
|
||||
shoppingorderordershoppingorderstatus(data) { //商城支付状态查询
|
||||
return uni.api.post("/shopping/user/shoppingorderstatus", data);
|
||||
},
|
||||
shoppinggoodsproductspec(data) { //商品规格
|
||||
return uni.api.post("/shopping/goods/productspec", data);
|
||||
},
|
||||
shoppingbuyingspeciallist(data) { //每日特价
|
||||
return uni.api.post("/shopping//buying/speciallist",data);
|
||||
},
|
||||
reservationhoteldetial(data) { //酒店详情
|
||||
return uni.api.post("/reservation/hoteldetial",data);
|
||||
},
|
||||
reservationhotelconfirm(data) { //确认支付页面
|
||||
return uni.api.post("/reservation/hotelconfirm",data);
|
||||
},
|
||||
reservationhotelsub(data) { //立即提交
|
||||
return uni.api.post("/reservation/hotelsub",data);
|
||||
},
|
||||
reservationhotelgetpay(data) { //获取支付参数
|
||||
return uni.api.post("/reservation/hotelgetpay",data);
|
||||
},
|
||||
payhotelorderstatus(data) { //获取支付参数
|
||||
return uni.api.post("/pay/hotelorderstatus",data);
|
||||
},
|
||||
}
|
||||
74
common/js/lange.js
Normal file
74
common/js/lange.js
Normal file
@@ -0,0 +1,74 @@
|
||||
const env = {
|
||||
aliyunServerURL: 'https://czg-oss.oss-cn-beijing.aliyuncs.com',
|
||||
accessid: 'LTAI5tMLHwnM1zYYAFuRa1fK',
|
||||
AccessKeySecret: 'jS1h2STq1vcODczDNFQkjcU6ODyYAj',
|
||||
timeout: 100000
|
||||
}
|
||||
|
||||
const Base64 = require('./Base64.js');
|
||||
|
||||
require('./hmac.js');
|
||||
require('./sha1.js');
|
||||
const Crypto = require('./crypto.js');
|
||||
|
||||
|
||||
const uploadFile = function(filePath, key = new Date().getTime()) {
|
||||
return new Promise((resolve, reject) => {
|
||||
// const aliyunFileKey = `${new Date().getTime()}_${userId}`;
|
||||
const aliyunServerURL = env.aliyunServerURL;
|
||||
const accessid = env.accessid;
|
||||
const policyBase64 = getPolicyBase64();
|
||||
const signature = getSignature(policyBase64);
|
||||
|
||||
wx.uploadFile({
|
||||
url: aliyunServerURL, //仅为示例,非真实的接口地址
|
||||
filePath: filePath,
|
||||
name: 'file',
|
||||
formData: {
|
||||
'key': 'headportrait/' + key,
|
||||
'OSSAccessKeyId': accessid,
|
||||
'policy': policyBase64,
|
||||
'Signature': signature,
|
||||
'success_action_status': '200',
|
||||
},
|
||||
success: function(res) {
|
||||
if (res.statusCode != 200) {
|
||||
reject('上传错误:' + JSON.stringify(res))
|
||||
return;
|
||||
}
|
||||
resolve(`https://czh5.sxczgkj.cn/headportrait/${key}`)
|
||||
},
|
||||
fail: function(err) {
|
||||
reject('上传错误:' + JSON.stringify(err))
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const getPolicyBase64 = function() {
|
||||
let date = new Date();
|
||||
date.setHours(date.getHours() + env.timeout);
|
||||
let srcT = date.toISOString();
|
||||
const policyText = {
|
||||
"expiration": srcT, //设置该Policy的失效时间,超过这个失效时间之后,就没有办法通过这个policy上传文件了 指定了Post请求必须发生在2020年01月01日12点之前("2020-01-01T12:00:00.000Z")。
|
||||
"conditions": [
|
||||
["content-length-range", 0, 20 * 1024 * 1024] // 设置上传文件的大小限制,1048576000=1000mb
|
||||
]
|
||||
};
|
||||
|
||||
const policyBase64 = Base64.encode(JSON.stringify(policyText));
|
||||
return policyBase64;
|
||||
}
|
||||
|
||||
const getSignature = function(policyBase64) {
|
||||
const accesskey = env.AccessKeySecret;
|
||||
|
||||
const bytes = Crypto.HMAC(Crypto.SHA1, policyBase64, accesskey, {
|
||||
asBytes: true
|
||||
});
|
||||
const signature = Crypto.util.bytesToBase64(bytes);
|
||||
|
||||
return signature;
|
||||
}
|
||||
|
||||
module.exports = uploadFile;
|
||||
1437
common/js/uqrCode.js
Normal file
1437
common/js/uqrCode.js
Normal file
File diff suppressed because it is too large
Load Diff
129
components/bottombbar.vue
Normal file
129
components/bottombbar.vue
Normal file
@@ -0,0 +1,129 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="index">
|
||||
<u-tabbar :value="valuebbar" @change="name => value = name" :placeholder="false"
|
||||
activeColor="#66666" :safeAreaInsetBottom="false"
|
||||
inactiveColor="#333333">
|
||||
<u-tabbar-item v-for="(item,index) in bottomnavigations.list" :key="index" :text="item.name"
|
||||
:hidden="item.hidden" :badge="item.badge" :dot="item.dot" @click="click1(item,index)">
|
||||
<image v-if="valuebbar == item.tabbarindex" class="u-page__item__slot-icon" slot="active-icon"
|
||||
style="width: 40rpx;height: 40rpx;" :src="item.iconPath">
|
||||
</image>
|
||||
<image v-else class="u-page__item__slot-icon" slot="inactive-icon"
|
||||
style="width: 40rpx;height: 40rpx;" :src="item.selectedIconPath"></image>
|
||||
</u-tabbar-item>
|
||||
</u-tabbar>
|
||||
</view>
|
||||
<view class="" :style="'height:' + (100 + HeighT.bottompadding) +'rpx'">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
value: this.valuebbar,
|
||||
}
|
||||
},
|
||||
props: {
|
||||
// list:{
|
||||
// return[{
|
||||
// name: '首页',
|
||||
// iconPath: 'https://ointmentweapp.oss-cn-beijing.aliyuncs.com/icon/iconPath.png',
|
||||
// selectedIconPath: 'https://ointmentweapp.oss-cn-beijing.aliyuncs.com/icon/selectedIconPath.png',
|
||||
// badge: '0', //显示几条消息
|
||||
// dot: false, //是否有红点
|
||||
// hidden: true,
|
||||
// url: uni.cache.get('store_id') ? '/pages/index/indexInfo' : '/pages/index/index'
|
||||
|
||||
// },
|
||||
// {
|
||||
// name: '作品',
|
||||
// iconPath: 'https://ointmentweapp.oss-cn-beijing.aliyuncs.com/icon/iconPath1.png',
|
||||
// selectedIconPath: 'https://ointmentweapp.oss-cn-beijing.aliyuncs.com/icon/selectedIconPath1.png',
|
||||
// badge: '0', //显示几条消息
|
||||
// dot: false, //是否有红点
|
||||
// url: '/pages/task/index',
|
||||
// hidden: uni.cache.get('store_id') ? true : false
|
||||
// },
|
||||
// {
|
||||
// name: '订单',
|
||||
// iconPath: 'https://ointmentweapp.oss-cn-beijing.aliyuncs.com/icon/iconPath2.png',
|
||||
// selectedIconPath: 'https://ointmentweapp.oss-cn-beijing.aliyuncs.com/icon/selectedIconPath2.png',
|
||||
// badge: '0', //显示几条消息
|
||||
// dot: false, //是否有红点
|
||||
// url: '/pages/my/order/index?e=0',
|
||||
// hidden: true
|
||||
|
||||
// }, {
|
||||
// name: '我的',
|
||||
// iconPath: 'https://ointmentweapp.oss-cn-beijing.aliyuncs.com/icon/iconPath3.png',
|
||||
// selectedIconPath: 'https://ointmentweapp.oss-cn-beijing.aliyuncs.com/icon/selectedIconPath3.png',
|
||||
// badge: '0', //显示几条消息
|
||||
// dot: false, //是否有红点
|
||||
// url: '/pages/my/index',
|
||||
// hidden: true
|
||||
// }]
|
||||
// }
|
||||
// },
|
||||
valuebbar: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
|
||||
},
|
||||
computed: {
|
||||
HeighT() {
|
||||
return this.$store.getters.is_BarHeight
|
||||
},
|
||||
bottomnavigations() {
|
||||
return this.$store.getters.bottomnavigation
|
||||
},
|
||||
HeighTs() {
|
||||
let data = {
|
||||
"padding-bottom": this.$store.getters.is_BarHeight.bottompadding + 'rpx'
|
||||
}
|
||||
return data
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
click1(a, e) {
|
||||
this.value = e
|
||||
switch (a.type) {
|
||||
case 'reLaunch':
|
||||
uni.reLaunch({
|
||||
url: a.url
|
||||
});
|
||||
break;
|
||||
case 'navigateTo':
|
||||
uni.navigateTo({
|
||||
url: a.url
|
||||
});
|
||||
break;
|
||||
case 'redirectTo':
|
||||
uni.redirectTo({
|
||||
url: a.url
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.content {
|
||||
.index {
|
||||
z-index: 998;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
|
||||
.u-page__item__slot-icon {}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
192
components/countdown.vue
Normal file
192
components/countdown.vue
Normal file
@@ -0,0 +1,192 @@
|
||||
<template>
|
||||
<view class="uni-countdown">
|
||||
<text v-if="showDay" class="uni-countdown__number">{{ d }}</text>
|
||||
<text v-if="showDay" class="uni-countdown__splitor">天</text>
|
||||
<text class="uni-countdown__number">{{ h }}</text>
|
||||
<text class="uni-countdown__splitor">{{ showColon ? ':' : '时' }}</text>
|
||||
<text class="uni-countdown__number">{{ i }}</text>
|
||||
<text class="uni-countdown__splitor">{{ showColon ? ':' : '分' }}</text>
|
||||
<text class="uni-countdown__number">{{ s }}</text>
|
||||
<text v-if="!showColon" class="uni-countdown__splitor">秒</text>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
/**
|
||||
* Countdown 倒计时
|
||||
* @description 倒计时组件
|
||||
* @tutorial https://ext.dcloud.net.cn/plugin?id=25
|
||||
* @property {String} backgroundColor 背景色
|
||||
* @property {String} color 文字颜色
|
||||
* @property {Number} day 天数
|
||||
* @property {Number} hour 小时
|
||||
* @property {Number} minute 分钟
|
||||
* @property {Number} second 秒
|
||||
* @property {Boolean} showDay = [true|false] 是否显示天数
|
||||
* @property {Boolean} showColon = [true|false] 是否以冒号为分隔符
|
||||
* @property {String} splitorColor 分割符号颜色
|
||||
* @event {Function} timeup 倒计时时间到触发事件
|
||||
* @example <uni-countdown :day="1" :hour="1" :minute="12" :second="40"></uni-countdown>
|
||||
*/
|
||||
export default {
|
||||
name: 'UniCountdown',
|
||||
props: {
|
||||
showDay: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
showColon: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
backgroundColor: {
|
||||
type: String,
|
||||
default: '#FFFFFF'
|
||||
},
|
||||
borderColor: {
|
||||
type: String,
|
||||
default: '#000000'
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
default: '#000000'
|
||||
},
|
||||
splitorColor: {
|
||||
type: String,
|
||||
default: '#000000'
|
||||
},
|
||||
indexs: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
day: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
hour: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
minute: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
second: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timer: null,
|
||||
syncFlag: false,
|
||||
d: '00',
|
||||
h: '00',
|
||||
i: '00',
|
||||
s: '00',
|
||||
leftTime: 0,
|
||||
seconds: 0
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
day(val) {
|
||||
this.changeFlag()
|
||||
},
|
||||
hour(val) {
|
||||
this.changeFlag()
|
||||
},
|
||||
minute(val) {
|
||||
this.changeFlag()
|
||||
},
|
||||
second(val) {
|
||||
this.changeFlag()
|
||||
}
|
||||
},
|
||||
created: function(e) {
|
||||
this.startData();
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.timer)
|
||||
},
|
||||
methods: {
|
||||
toSeconds(day, hours, minutes, seconds) {
|
||||
return day * 60 * 60 * 24 + hours * 60 * 60 + minutes * 60 + seconds
|
||||
},
|
||||
timeUp() {
|
||||
console.log(1)
|
||||
clearInterval(this.timer)
|
||||
this.$emit('timeup',this.indexs)
|
||||
},
|
||||
countDown() {
|
||||
let seconds = this.seconds
|
||||
let [day, hour, minute, second] = [0, 0, 0, 0]
|
||||
if (seconds > 0) {
|
||||
day = Math.floor(seconds / (60 * 60 * 24))
|
||||
hour = Math.floor(seconds / (60 * 60)) - (day * 24)
|
||||
minute = Math.floor(seconds / 60) - (day * 24 * 60) - (hour * 60)
|
||||
second = Math.floor(seconds) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60)
|
||||
} else {
|
||||
this.timeUp()
|
||||
}
|
||||
if (day < 10) {
|
||||
day = '0' + day
|
||||
}
|
||||
if (hour < 10) {
|
||||
hour = '0' + hour
|
||||
}
|
||||
if (minute < 10) {
|
||||
minute = '0' + minute
|
||||
}
|
||||
if (second < 10) {
|
||||
second = '0' + second
|
||||
}
|
||||
this.d = day
|
||||
this.h = hour
|
||||
this.i = minute
|
||||
this.s = second
|
||||
},
|
||||
startData() {
|
||||
this.seconds = this.toSeconds(this.day, this.hour, this.minute, this.second)
|
||||
if (this.seconds <= 0) {
|
||||
return
|
||||
}
|
||||
this.countDown()
|
||||
this.timer = setInterval(() => {
|
||||
this.seconds--
|
||||
if (this.seconds < 0) {
|
||||
this.timeUp()
|
||||
return
|
||||
}
|
||||
this.countDown()
|
||||
}, 1000)
|
||||
},
|
||||
changeFlag() {
|
||||
console.log(this.syncFlag,111111)
|
||||
if (!this.syncFlag) {
|
||||
this.seconds = this.toSeconds(this.day, this.hour, this.minute, this.second)
|
||||
this.startData();
|
||||
this.syncFlag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.uni-countdown {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.uni-countdown__splitor {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
.uni-countdown__number {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
156
components/navbar.vue
Normal file
156
components/navbar.vue
Normal file
@@ -0,0 +1,156 @@
|
||||
<template>
|
||||
<view class="index">
|
||||
<view class="navbar" :style="[{'background':Background},{'height':HeighT.customBar+'px'}]" >
|
||||
<!-- <view v-if="navboxshow == '0'" class="navbar_tow flex-between"
|
||||
:style="[{'background':Backgroundtow},{'padding-right':HeighT.custwidth + 'px'},{'top':HeighT.customBar+'rpx'}]"> -->
|
||||
<!-- #ifndef H5 -->
|
||||
<view v-if="navboxshow == '0'" class="navbar_tow flex-between"
|
||||
:style="[{'background':Backgroundtow},{'top':HeighT.customBar+'rpx'}]">
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<view v-if="navboxshow == '0'" class="navbar_tow flex-between" :style="[{'background':Backgroundtow}]">
|
||||
<!-- #endif -->
|
||||
<!-- 盒子1 返回标题 -->
|
||||
<view class="flex-between">
|
||||
<!-- <u-icon name="arrow-left" color="#000" size="22" @click="childMethod('left')"></u-icon> -->
|
||||
<text class="navbar_tow_one">{{navtitle}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="navboxshow == '1'" class="navbar_tow flex-between"
|
||||
:style="[{'background':Backgroundtow},{'padding-right':HeighT.custwidth + 'px'},{'top':HeighT.customBar+'px'}]">
|
||||
<!-- 盒子2 返回标题搜索框 -->
|
||||
<view class="flex-between">
|
||||
<u-icon name="arrow-left" color="#000" size="22"
|
||||
@click="childMethod('left',navMethodcan)"></u-icon>
|
||||
<u-search placeholder="请输入关键字" :showAction='false' v-model="keyword"></u-search>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="navboxshow == '4'" class="navbar_tow flex-between"
|
||||
:style="[{'background':Backgroundtow},{'padding-right':HeighT.custwidth + 'px'},{'top':HeighT.customBar+'rpx'}]">
|
||||
<view class="flex-between">
|
||||
<u-icon name="arrow-left" color="#000" size="22" @click="childMethod('left')"></u-icon>
|
||||
<text class="navbar_tow_one">{{navtitle}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="navboxshow == '3'" class="navbar_tow flex-between"
|
||||
:style="[{'background':Backgroundtow},{'padding-right':HeighT.custwidth + 'px'},{'top':HeighT.customBar+'rpx'}]">
|
||||
<!-- 盒子3 返回标题搜索框 -->
|
||||
<view class="flex-between">
|
||||
<u-icon style="z-index: 9999;" name="arrow-left" color="#000" size="22"
|
||||
@click="childMethod('left')"></u-icon>
|
||||
<text
|
||||
style="flex: 1; text-align: center;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;font-size: 28rpx;padding: 0 5rpx;">{{navtitle}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #ifndef H5 -->
|
||||
<view v-if="navboxshow == '2'" class="navbar_tow flex-between"
|
||||
:style="[{'background':Backgroundtow},{'top':HeighT.customBar+'px'}]">
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef H5 -->
|
||||
<view v-if="navboxshow == '2'" class="navbar_tow flex-between"
|
||||
:style="[{'background':Backgroundtow}]">
|
||||
<!-- #endif -->
|
||||
<!-- 盒子3 返回kongbai -->
|
||||
<view class="flex-between">
|
||||
<u-icon name="arrow-left" color="#000" size="22" @click="childMethod('left')"></u-icon>
|
||||
<text class="navbar_tow_there">{{navtitle}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<view v-if='collapse' :style="[{'padding-top':HeighT.customBar+'px'}]"></view>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<view v-if='collapse' style="padding-top:44px;"></view>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import navbar from '../uni_modules/uview-ui/libs/config/props/navbar';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
Backgroundtow: 'none',
|
||||
keyword: ""
|
||||
}
|
||||
},
|
||||
props: {
|
||||
navboxshow: {
|
||||
type: String,
|
||||
default: '0'
|
||||
},
|
||||
navtitle: {
|
||||
type: String,
|
||||
default: '预约'
|
||||
},
|
||||
navMethodcan: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
Background: {
|
||||
type: String,
|
||||
default: '#fff'
|
||||
},
|
||||
collapse: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
HeighT() {
|
||||
return this.$store.getters.is_BarHeight
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
childMethod(a, b) {
|
||||
this.$emit('fatherMethod', a)
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.index {
|
||||
.navbar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 999;
|
||||
|
||||
.navbar_one {}
|
||||
|
||||
.navbar_tow {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
background: none;
|
||||
height: $uni-height-nav;
|
||||
line-height: $uni-height-nav;
|
||||
font-size: 36rpx;
|
||||
|
||||
.flex-between {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
|
||||
.navbar_tow_one {
|
||||
flex: auto;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.navbar_tow_there {
|
||||
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
137
components/pick-regions/pick-regions.vue
Normal file
137
components/pick-regions/pick-regions.vue
Normal file
@@ -0,0 +1,137 @@
|
||||
<template>
|
||||
<picker mode="multiSelector"
|
||||
:value="multiIndex"
|
||||
:range="multiArray"
|
||||
@change="handleValueChange"
|
||||
@columnchange="handleColumnChange">
|
||||
<slot></slot>
|
||||
</picker>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const CHINA_REGIONS = require('./regions.json')
|
||||
export default {
|
||||
props:{
|
||||
defaultRegions:{
|
||||
type:Array,
|
||||
default(){
|
||||
return []
|
||||
}
|
||||
},
|
||||
defaultRegionCode:{
|
||||
type:String
|
||||
},
|
||||
defaultRegion:[String,Array]
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cityArr:CHINA_REGIONS[0].childs,
|
||||
districtArr:CHINA_REGIONS[0].childs[0].childs,
|
||||
multiIndex: [0, 0, 0],
|
||||
isInitMultiArray:true,
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
defaultRegion:{
|
||||
handler(region,oldRegion){
|
||||
if(Array.isArray(region)){
|
||||
// 避免传的是字面量的时候重复触发
|
||||
oldRegion = oldRegion || []
|
||||
if(region.join('')!==oldRegion.join('')){
|
||||
this.handleDefaultRegion(region)
|
||||
}
|
||||
}else if(region&®ion.length == 6){
|
||||
this.handleDefaultRegion(region)
|
||||
}else{
|
||||
console.warn('defaultRegion非有效格式')
|
||||
}
|
||||
},
|
||||
immediate:true,
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
multiArray(){
|
||||
return this.pickedArr.map(arr=>arr.map(item=>item.name))
|
||||
},
|
||||
pickedArr(){
|
||||
// 进行初始化
|
||||
if(this.isInitMultiArray){
|
||||
return [
|
||||
CHINA_REGIONS,
|
||||
CHINA_REGIONS[0].childs,
|
||||
CHINA_REGIONS[0].childs[0].childs
|
||||
]
|
||||
}
|
||||
return [CHINA_REGIONS,this.cityArr,this.districtArr];
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleColumnChange(e){
|
||||
// console.log(e);
|
||||
this.isInitMultiArray = false;
|
||||
const that = this;
|
||||
let col = e.detail.column;
|
||||
let row = e.detail.value;
|
||||
that.multiIndex[col] = row;
|
||||
try{
|
||||
switch(col){
|
||||
case 0:
|
||||
if(CHINA_REGIONS[that.multiIndex[0]].childs.length==0){
|
||||
that.cityArr = that.districtArr = [CHINA_REGIONS[that.multiIndex[0]]]
|
||||
break;
|
||||
}
|
||||
that.cityArr = CHINA_REGIONS[that.multiIndex[0]].childs
|
||||
that.districtArr = CHINA_REGIONS[that.multiIndex[0]].childs[that.multiIndex[1]].childs
|
||||
break;
|
||||
case 1:
|
||||
that.districtArr = CHINA_REGIONS[that.multiIndex[0]].childs[that.multiIndex[1]].childs
|
||||
break;
|
||||
case 2:
|
||||
break;
|
||||
}
|
||||
}catch(e){
|
||||
// console.log(e);
|
||||
that.districtArr = CHINA_REGIONS[that.multiIndex[0]].childs[0].childs
|
||||
}
|
||||
|
||||
},
|
||||
handleValueChange(e){
|
||||
// 结构赋值
|
||||
let [index0,index1,index2] = e.detail.value;
|
||||
let [arr0,arr1,arr2] = this.pickedArr;
|
||||
let address = [arr0[index0],arr1[index1],arr2[index2]];
|
||||
// console.log(address);
|
||||
this.$emit('getRegion',address)
|
||||
},
|
||||
handleDefaultRegion(region){
|
||||
const isCode = !Array.isArray(region)
|
||||
this.isInitMultiArray = false;
|
||||
let children = CHINA_REGIONS
|
||||
for(let i=0;i<3;i++){
|
||||
for(let j=0;j<children.length;j++){
|
||||
let condition = isCode?children[j].code==region.slice(0,(i+1)*2):children[j].name.includes(region[i]);
|
||||
if(condition){
|
||||
// 匹配成功进行赋值
|
||||
// console.log(i,j,children.length-1);
|
||||
children = children[j].childs;
|
||||
if(i==0){
|
||||
this.cityArr = children
|
||||
}else if(i==1){
|
||||
this.districtArr = children
|
||||
}
|
||||
this.$set(this.multiIndex,i,j)
|
||||
// console.log(this.multiIndex);
|
||||
break;
|
||||
}else{
|
||||
// 首次匹配失败就用默认的初始化
|
||||
// console.log(i,j,children.length-1);
|
||||
if(i==0 && j==(children.length-1)){
|
||||
this.isInitMultiArray = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
1
components/pick-regions/regions.json
Normal file
1
components/pick-regions/regions.json
Normal file
File diff suppressed because one or more lines are too long
26
framework/0-conf.js
Normal file
26
framework/0-conf.js
Normal file
@@ -0,0 +1,26 @@
|
||||
const debug = true;
|
||||
// #ifdef H5
|
||||
const proxyApi = "/api"
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN || MP-ALIPAY
|
||||
const baseUrl = 'https://door.sxczgkj.cn/api' // 线上
|
||||
// const baseUrl = http://192.168.2.23:1200/api/ //本地
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
const baseUrl = debug ? proxyApi : 'https://door.sxczgkj.cn/api' // 线上
|
||||
// #endif
|
||||
// import VConsole from "./vConsole.js"
|
||||
// if (debug) {
|
||||
// // new VConsole()
|
||||
// }
|
||||
const version = '109'
|
||||
const autoRemoveCache = {
|
||||
count: 100000,
|
||||
size: 100000
|
||||
}
|
||||
uni.conf = {
|
||||
debug,
|
||||
baseUrl,
|
||||
version,
|
||||
autoRemoveCache
|
||||
}
|
||||
223
framework/1-utils.js
Normal file
223
framework/1-utils.js
Normal file
@@ -0,0 +1,223 @@
|
||||
import md5 from './md5'
|
||||
|
||||
/**
|
||||
* 转换对象为x-www-form-urlencoded
|
||||
* @author NanQi
|
||||
* @param {Object} obj
|
||||
* @return {String}
|
||||
*/
|
||||
let transformRequest = obj => {
|
||||
let query = ''
|
||||
let name, value, fullSubName, subName, subValue, innerObj, i
|
||||
|
||||
for(name in obj) {
|
||||
value = obj[name]
|
||||
|
||||
if(value instanceof Array) {
|
||||
for(i = 0; i < value.length; ++i) {
|
||||
subValue = value[i]
|
||||
fullSubName = name + '[' + i + ']'
|
||||
innerObj = {}
|
||||
innerObj[fullSubName] = subValue
|
||||
query += transformRequest(innerObj) + '&'
|
||||
}
|
||||
} else if(value instanceof Object) {
|
||||
for(subName in value) {
|
||||
subValue = value[subName]
|
||||
fullSubName = name + '[' + subName + ']'
|
||||
innerObj = {}
|
||||
innerObj[fullSubName] = subValue
|
||||
query += transformRequest(innerObj) + '&'
|
||||
}
|
||||
} else if(value !== undefined && value !== null) {
|
||||
query += encodeURIComponent(name) + '=' +
|
||||
encodeURIComponent(value) + '&'
|
||||
}
|
||||
}
|
||||
|
||||
return query.length ? query.substr(0, query.length - 1) : query
|
||||
}
|
||||
|
||||
let timestamp = function() {
|
||||
return Date.parse(new Date()) / 1000
|
||||
}
|
||||
|
||||
let isNavigating = false
|
||||
let isNavigate = () => {
|
||||
if(isNavigating) {
|
||||
return true
|
||||
} else {
|
||||
isNavigating = true
|
||||
setTimeout(() => {
|
||||
isNavigating = false
|
||||
}, 2000)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
let guid = (function() {
|
||||
let counter = 0
|
||||
|
||||
return function(prefix) {
|
||||
let guid = new Date().getTime().toString(32),
|
||||
i
|
||||
|
||||
for(i = 0; i < 5; i++) {
|
||||
guid += Math.floor(Math.random() * 65535).toString(32)
|
||||
}
|
||||
|
||||
return(prefix || '') + guid + (counter++).toString(32)
|
||||
}
|
||||
}())
|
||||
|
||||
let sortTransform = (obj) => {
|
||||
var objKeys = Object.keys(obj)
|
||||
objKeys = objKeys.sort()
|
||||
|
||||
var ret = {}
|
||||
for(var i = 0; i < objKeys.length; i++) {
|
||||
let objVal = obj[objKeys[i]]
|
||||
ret[objKeys[i]] = objVal
|
||||
}
|
||||
|
||||
return transformRequest(ret)
|
||||
}
|
||||
|
||||
function isArray(v) {
|
||||
return toString.apply(v) === '[object Array]'
|
||||
}
|
||||
|
||||
function isFunction(v) {
|
||||
return typeof v === 'function'
|
||||
}
|
||||
|
||||
function isEmptyObject(v) {
|
||||
return Object.keys(v).length == 0
|
||||
}
|
||||
|
||||
function sleep (time) {
|
||||
return new Promise((resolve) => setTimeout(resolve, time))
|
||||
}
|
||||
|
||||
const throttle = function(func, wait = 200, options) {
|
||||
/* options的默认值
|
||||
* 表示首次调用返回值方法时,会马上调用func;否则仅会记录当前时刻,当第二次调用的时间间隔超过wait时,才调用func。
|
||||
* options.leading = true
|
||||
* 表示当调用方法时,未到达wait指定的时间间隔,则启动计时器延迟调用func函数,若后续在既未达到wait指定的时间间隔和func函数又未被调用的情况下调用返回值方法,则被调用请求将被丢弃。
|
||||
* options.trailing = true
|
||||
* 注意:当options.trailing = false时,效果与上面的简单实现效果相同
|
||||
*/
|
||||
var context, args, result
|
||||
var timeout = null
|
||||
var previous = 0
|
||||
if(!options) options = {
|
||||
leading: true,
|
||||
trailing: false
|
||||
}
|
||||
var later = function() {
|
||||
previous = options.leading === false ? 0 : new Date().getTime()
|
||||
timeout = null
|
||||
result = func.apply(context, args)
|
||||
if(!timeout) context = args = null
|
||||
}
|
||||
return function() {
|
||||
var now = new Date().getTime()
|
||||
if(!previous && options.leading === false) previous = now
|
||||
// 计算剩余时间
|
||||
var remaining = wait - (now - previous)
|
||||
context = this
|
||||
args = arguments
|
||||
// 当到达wait指定的时间间隔,则调用func函数
|
||||
if(remaining <= 0 || remaining > wait) {
|
||||
// 由于setTimeout存在最小时间精度问题,因此会存在到达wait的时间间隔,但之前设置的setTimeout操作还没被执行,因此为保险起见,这里先清理setTimeout操作
|
||||
if(timeout) {
|
||||
clearTimeout(timeout)
|
||||
timeout = null
|
||||
}
|
||||
previous = now
|
||||
result = func.apply(context, args)
|
||||
if(!timeout) context = args = null
|
||||
} else if(!timeout && options.trailing !== false) {
|
||||
// options.trailing=true时,延时执行func函数
|
||||
timeout = setTimeout(later, remaining)
|
||||
}
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
const debounce = function(func, wait, immediate) {
|
||||
// immediate默认为false
|
||||
var timeout, args, context, timestamp, result
|
||||
|
||||
var later = function() {
|
||||
// 当wait指定的时间间隔期间多次调用_.debounce返回的函数,则会不断更新timestamp的值,导致last < wait && last >= 0一直为true,从而不断启动新的计时器延时执行func
|
||||
var last = new Date().getTime() - timestamp
|
||||
|
||||
if(last < wait && last >= 0) {
|
||||
timeout = setTimeout(later, wait - last)
|
||||
} else {
|
||||
timeout = null
|
||||
if(!immediate) {
|
||||
result = func.apply(context, args)
|
||||
if(!timeout) context = args = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return function() {
|
||||
context = this
|
||||
args = arguments
|
||||
timestamp = new Date().getTime()
|
||||
// 第一次调用该方法时,且immediate为true,则调用func函数
|
||||
var callNow = immediate && !timeout
|
||||
// 在wait指定的时间间隔内首次调用该方法,则启动计时器定时调用func函数
|
||||
if(!timeout) timeout = setTimeout(later, wait)
|
||||
if(callNow) {
|
||||
result = func.apply(context, args)
|
||||
context = args = null
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
||||
Promise.prototype.finally = function (callback) {
|
||||
let P = this.constructor
|
||||
return this.then(
|
||||
value => P.resolve(callback()).then(() => value),
|
||||
reason => P.resolve(callback()).then(() => { throw reason })
|
||||
)
|
||||
}
|
||||
const info_distance = function(e) { //获取元素位置
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.createSelectorQuery().select(`.${e}`).boundingClientRect(res => {
|
||||
resolve(res)
|
||||
}).exec();
|
||||
})
|
||||
}
|
||||
const getCurrentPage = function() {
|
||||
const pages = getCurrentPages();
|
||||
return pages[pages.length - 1];
|
||||
}
|
||||
|
||||
const getCurrentRoute = function() {
|
||||
return '/' + getCurrentPage().route
|
||||
}
|
||||
|
||||
uni.utils = {
|
||||
md5,
|
||||
transformRequest,
|
||||
sortTransform,
|
||||
timestamp,
|
||||
isNavigate,
|
||||
guid,
|
||||
info_distance,
|
||||
isArray,
|
||||
sleep,
|
||||
isFunction,
|
||||
isEmptyObject,
|
||||
throttle,
|
||||
debounce,
|
||||
getCurrentPage,
|
||||
getCurrentRoute
|
||||
}
|
||||
220
framework/11-api.js
Normal file
220
framework/11-api.js
Normal file
@@ -0,0 +1,220 @@
|
||||
const preCacheKeyClearFetch = 'storage:clear:fetch:'
|
||||
|
||||
uni.pro.interceptor('request', {
|
||||
config(paramOptions) {
|
||||
let options = Object.assign({}, paramOptions)
|
||||
options.url = uni.conf.baseUrl + paramOptions.url
|
||||
this.options = options
|
||||
return options
|
||||
},
|
||||
success(res) {
|
||||
if (res.data.code == 1) {
|
||||
return res.data
|
||||
} else {
|
||||
return res.data
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
function requestrequest(options) {
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.request({
|
||||
...options,
|
||||
success: res => {
|
||||
resolve(res.data) //异步操作执行成功
|
||||
// if (res.data.code == 1) {
|
||||
// resolve(res.data) //异步操作执行成功
|
||||
// } else {
|
||||
// console.log(res,'请求的接口没有找到');
|
||||
// resolve(res.data) //异步操作执行失败
|
||||
// }
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
async function request(options) {
|
||||
try {
|
||||
if (options.toast) {
|
||||
// #ifdef MP-WEIXIN || MP-ALIPAY
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
uni.pro.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
// #endif
|
||||
}
|
||||
options.header = {
|
||||
datamodel: uni.getStorageSync('loginuser') == 0 ? '' : uni.getStorageSync('loginuser').model_type,
|
||||
token: uni.getStorageSync('loginuser') == 0 ? '' : uni.getStorageSync('loginuser').userinfo.token,
|
||||
'store-id': uni.cache.get('store_id') ? uni.cache.get('store_id') : '',
|
||||
}
|
||||
// #ifdef MP-WEIXIN || MP-ALIPAY
|
||||
options.url = uni.conf.baseUrl + options.url
|
||||
let res = await requestrequest(options);
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
let res = await uni.pro.request(options);
|
||||
// #endif
|
||||
if (res.code != 1) {
|
||||
if (res.code == 401) {
|
||||
let {
|
||||
token
|
||||
} = await uni.login()
|
||||
uni.cache.set('storage:authorization', token, -1)
|
||||
uni.cache.set('memory:refresh', true)
|
||||
return await request(options)
|
||||
} else if (res.code == 482) {
|
||||
let nowTime = new Date() / 1000 | 0
|
||||
let offset = parseInt(res.data.message) - parseInt(nowTime);
|
||||
uni.cache.set('storage:offset-time', offset, -1)
|
||||
return await request(options)
|
||||
} else {
|
||||
if (options.toast) {
|
||||
uni.showToast({
|
||||
title: res.message || res.msg,
|
||||
icon: "none",
|
||||
success() {
|
||||
setTimeout(res => {
|
||||
// if (options.toast) {
|
||||
uni.hideLoading()
|
||||
// }
|
||||
}, 2000)
|
||||
}
|
||||
})
|
||||
}
|
||||
if (options.mask == 1) {
|
||||
uni.showToast({
|
||||
title: res.message || res.msg,
|
||||
icon: "none",
|
||||
success() {
|
||||
setTimeout(res => {
|
||||
// if (options.toast) {
|
||||
uni.hideLoading()
|
||||
// }
|
||||
}, 2000)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
uni.hideLoading()
|
||||
let resdata = null
|
||||
if (options.mask == 0) {
|
||||
resdata = res.data == null ? '1' : res.data
|
||||
} else {
|
||||
resdata = res
|
||||
}
|
||||
return resdata
|
||||
}
|
||||
} catch (err) {
|
||||
console.warn('uni.request fail [network]', options, err)
|
||||
throw err;
|
||||
} finally {
|
||||
if (options.toast) {
|
||||
setTimeout(res => {
|
||||
uni.hideLoading()
|
||||
}, 2000)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function isExpire(url) {
|
||||
return uni.cache.get(preCacheKeyClearFetch + url)
|
||||
}
|
||||
/**
|
||||
* 标记fetch过期,会重新请求
|
||||
* @author NanQi
|
||||
* @param {String} url 标记的URL
|
||||
*/
|
||||
function markFetch(url) {
|
||||
uni.cache.set(preCacheKeyClearFetch + url, true)
|
||||
}
|
||||
|
||||
/**
|
||||
* 拉取数据(get请求,带缓存)
|
||||
* @author NanQi
|
||||
* @param {String} url 请求的URL
|
||||
* @param {Object} data 请求参数
|
||||
* @param {Boolean} toast 是否显示toast
|
||||
* @param {Number} expire 缓存过期时间(秒)
|
||||
* @return {Promise} Promise对象
|
||||
*/
|
||||
async function fetch(url, data, toast = true, expire = uni.conf.default_expire) {
|
||||
let param = ''
|
||||
if (data) {
|
||||
param += ':' + uni.utils.md5(uni.utils.sortTransform(data));
|
||||
}
|
||||
const cacheKey = 'memory:fetch:' + url + param;
|
||||
const cacheVal = uni.cache.get(cacheKey);
|
||||
if (!isExpire(url) && cacheVal) {
|
||||
return Promise.resolve(cacheVal);
|
||||
} else {
|
||||
if (isExpire(url)) {
|
||||
uni.cache.remove(preCacheKeyClearFetch + url)
|
||||
}
|
||||
try {
|
||||
const res = await get(url, data, toast);
|
||||
uni.cache.remove(cacheKey);
|
||||
uni.cache.set(cacheKey, res, expire);
|
||||
return res;
|
||||
} catch (err) {
|
||||
const res = uni.cache.getStorageData(cacheKey);
|
||||
if (res) {
|
||||
return Promise.resolve(res);
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据(get请求,不带缓存)
|
||||
* @author NanQi
|
||||
* @param {String} url 请求的URL
|
||||
* @param {Object} data 请求参数
|
||||
* @param {Boolean} toast 是否显示toast
|
||||
* @return {Promise} Promise对象
|
||||
*/
|
||||
function get(url, data, toast = true) {
|
||||
return request({
|
||||
url,
|
||||
data,
|
||||
toast
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* post请求
|
||||
* @author NanQi
|
||||
* @param {String} url 请求的URL
|
||||
* @param {Object} data 请求参数
|
||||
* @param {Boolean} toast 是否显示toast
|
||||
* @param {String} method 请求方式,默认POST
|
||||
* @param {String} mask 返回data 0 0是正常 1是全部
|
||||
* @return {Promise} Promise对象
|
||||
*/
|
||||
function post(url, data, toast = true, mask = 0, method = 'POST') {
|
||||
return request({
|
||||
url,
|
||||
method,
|
||||
data,
|
||||
mask,
|
||||
toast
|
||||
})
|
||||
}
|
||||
|
||||
uni.api = {
|
||||
request,
|
||||
markFetch,
|
||||
fetch,
|
||||
get,
|
||||
post
|
||||
}
|
||||
33
framework/12-resource.js
Normal file
33
framework/12-resource.js
Normal file
@@ -0,0 +1,33 @@
|
||||
class RepositoryBase {
|
||||
|
||||
constructor(resource) {
|
||||
this.resource = resource
|
||||
}
|
||||
|
||||
list(query) {
|
||||
return uni.api.get(this.resource, query)
|
||||
}
|
||||
|
||||
item(id) {
|
||||
const url = this.resource + '/' + id
|
||||
return uni.api.get(url)
|
||||
}
|
||||
|
||||
add(newItem) {
|
||||
return uni.api.post(this.resource, newItem, true)
|
||||
}
|
||||
|
||||
save(id, data) {
|
||||
const url = this.resource + '/' + id
|
||||
return uni.api.post(url, data, true, 'PUT')
|
||||
}
|
||||
|
||||
remove(id) {
|
||||
const url = this.resource + '/' + id
|
||||
return uni.api.post(url, {}, true, 'DELETE')
|
||||
}
|
||||
}
|
||||
|
||||
uni.resource = (resource) => {
|
||||
return new RepositoryBase(resource)
|
||||
}
|
||||
33
framework/13-mixin.js
Normal file
33
framework/13-mixin.js
Normal file
@@ -0,0 +1,33 @@
|
||||
uni.mixin = {
|
||||
// 上拉加载页面
|
||||
pull: {
|
||||
onLoad() {
|
||||
const initData = this.$options.initData
|
||||
if (uni.utils.isFunction(initData)) {
|
||||
initData.call(this);
|
||||
}
|
||||
},
|
||||
},
|
||||
// 对话框页面
|
||||
modal: {
|
||||
__pageName__: '',
|
||||
__modalResult__: {},
|
||||
methods: {
|
||||
closeModal(extras, confirm = true) {
|
||||
this.__modalResult__ = { extras, confirm }
|
||||
uni.pro.navigateBack()
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
const route = uni.utils.getCurrentRoute()
|
||||
this.__pageName__ = uni.url.getPageName(route)
|
||||
this.__modalResult__ = {
|
||||
confirm: false,
|
||||
extras: {}
|
||||
}
|
||||
},
|
||||
onUnload() {
|
||||
uni.modal.close(this.__pageName__, this.__modalResult__.extras, this.__modalResult__.confirm);
|
||||
}
|
||||
}
|
||||
}
|
||||
37
framework/2-url.js
Normal file
37
framework/2-url.js
Normal file
@@ -0,0 +1,37 @@
|
||||
const getUrl = (pageName, extras = null) => {
|
||||
let url = '/pages/' + pageName + '/index'
|
||||
|
||||
if (pageName.indexOf('/pages') == 0) {
|
||||
url = pageName
|
||||
} else if(pageName.indexOf('/') != -1) {
|
||||
url = '/pages/' + pageName
|
||||
}
|
||||
|
||||
if (url == uni.utils.getCurrentRoute()) {
|
||||
return
|
||||
}
|
||||
|
||||
if (extras && JSON.stringify(extras) != '{}') {
|
||||
url += '?' + uni.utils.transformRequest(extras)
|
||||
}
|
||||
|
||||
return url
|
||||
}
|
||||
|
||||
const getPageName = url => {
|
||||
const matchs = url.match(/\/pages\/(.+)\/(.+)/i)
|
||||
if (matchs.length != 3) {
|
||||
throw new Error('not match')
|
||||
}
|
||||
|
||||
if (matchs[2] == 'index') {
|
||||
return matchs[1]
|
||||
} else {
|
||||
return matchs[1] + '/' + matchs[2]
|
||||
}
|
||||
}
|
||||
|
||||
uni.url = {
|
||||
getUrl,
|
||||
getPageName
|
||||
}
|
||||
56
framework/3-pro.js
Normal file
56
framework/3-pro.js
Normal file
@@ -0,0 +1,56 @@
|
||||
let $interceptors = {}
|
||||
|
||||
// 以下是没有 success、fail、complete 属性的api
|
||||
// 1、...Sync【√】
|
||||
// 2、on...【√】
|
||||
// 3、create... 除了 createBLEConnection【√】
|
||||
// 4、...Manager【√】
|
||||
// 5、pause...【√】
|
||||
// 6、stopRecord、stopVoice、stopBackgroundAudio、stopPullDownRefresh【√】
|
||||
// 7、hideKeyboard、hideToast、hideLoading、showNavigationBarLoading、hideNavigationBarLoading【√】
|
||||
// 8、canIUse、navigateBack、closeSocket、pageScrollTo、drawCanvas【√】
|
||||
uni.pro = {}
|
||||
for (let key in uni) {
|
||||
if (/^on|^create|Sync$|Manager$|^pause/.test(key) && key !== 'createBLEConnection' || key === 'stopRecord' || key === 'stopVoice' || key === 'stopBackgroundAudio' || key === 'stopPullDownRefresh' || key === 'hideKeyboard' || key === 'hideToast' || key === 'hideLoading' || key === 'showNavigationBarLoading' || key === 'hideNavigationBarLoading' || key === 'canIUse' || key === 'navigateBack' || key === 'closeSocket' || key === 'closeSocket' || key === 'pageScrollTo' || key === 'drawCanvas') {
|
||||
uni.pro[key] = uni[key]
|
||||
continue
|
||||
}
|
||||
|
||||
uni.pro[key] = (options) => {
|
||||
options = options || {}
|
||||
if ($interceptors[key] && $interceptors[key].config) {
|
||||
let ret = $interceptors[key].config.call(this, options)
|
||||
if (ret === false) {
|
||||
options.fail && options.fail('aborted by interceptor')
|
||||
return
|
||||
}
|
||||
options = ret
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
['fail', 'success', 'complete'].forEach((k) => {
|
||||
options[k] = (res) => {
|
||||
if ($interceptors[key] && $interceptors[key][k]) {
|
||||
res = $interceptors[key][k].call(this, res)
|
||||
}
|
||||
if (k === 'success') {
|
||||
resolve(res)
|
||||
}
|
||||
else if (k === 'fail') {
|
||||
reject(res)
|
||||
}
|
||||
}
|
||||
})
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
}
|
||||
uni[key](options)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
uni.pro.interceptor = (api, provider) => {
|
||||
$interceptors[api] = provider
|
||||
}
|
||||
61
framework/4-queue.js
Normal file
61
framework/4-queue.js
Normal file
@@ -0,0 +1,61 @@
|
||||
const checkConcurrency = (concurrency = 1) => {
|
||||
if (concurrency == null) {
|
||||
concurrency = 1
|
||||
}
|
||||
else if (concurrency === 0) {
|
||||
throw new Error('Concurrency must not be zero')
|
||||
}
|
||||
return concurrency
|
||||
}
|
||||
|
||||
const onlyOnce = (fn) => (...args) => {
|
||||
if (fn === null) {
|
||||
throw new Error('Callback was already called')
|
||||
}
|
||||
const callFn = fn
|
||||
fn = null
|
||||
return callFn(...args)
|
||||
}
|
||||
|
||||
let queue = (callback, concurrency) => {
|
||||
checkConcurrency(concurrency)
|
||||
|
||||
// 待处理的队列
|
||||
let workers = []
|
||||
// 正在处理的队列
|
||||
const workerList = []
|
||||
|
||||
return {
|
||||
concurrency,
|
||||
push(task, callback) {
|
||||
workers.push({
|
||||
task,
|
||||
callback,
|
||||
})
|
||||
setTimeout(() => {
|
||||
this.process()
|
||||
}, 0)
|
||||
},
|
||||
process() {
|
||||
while (this.concurrency > workerList.length && workers.length) {
|
||||
const worker = workers.shift()
|
||||
workerList.push(worker)
|
||||
callback(worker.task, onlyOnce((...args) => {
|
||||
this.pull(worker)
|
||||
if (typeof worker.callback === 'function') {
|
||||
worker.callback(...args)
|
||||
}
|
||||
this.process()
|
||||
}))
|
||||
}
|
||||
},
|
||||
pull(worker) {
|
||||
const index = workerList.indexOf(worker)
|
||||
if (index !== -1) {
|
||||
workerList.splice(index, 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uni.queue = queue((task, callback) => task(callback), 10)
|
||||
42
framework/5-pro-ext.js
Normal file
42
framework/5-pro-ext.js
Normal file
@@ -0,0 +1,42 @@
|
||||
uni.pro.uploadFile = (obj) => {
|
||||
uni.queue.push((callback) => {
|
||||
const originComplete = obj.complete
|
||||
obj.complete = (...args) => {
|
||||
callback()
|
||||
if(typeof originComplete === 'function') {
|
||||
originComplete(...args)
|
||||
}
|
||||
}
|
||||
uni.uploadFile(obj)
|
||||
})
|
||||
}
|
||||
|
||||
uni.pro.navigateTo = (pageName, extras = {}) => {
|
||||
let url = uni.url.getUrl(pageName, extras)
|
||||
return uni.navigateTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
uni.pro.redirectTo = (pageName, extras = {}) => {
|
||||
let url = uni.url.getUrl(pageName, extras)
|
||||
return uni.redirectTo({
|
||||
url
|
||||
})
|
||||
}
|
||||
|
||||
uni.pro.navigateBack = (delta = 1) => {
|
||||
uni.navigateBack({
|
||||
delta
|
||||
})
|
||||
}
|
||||
|
||||
uni.pro.switchTab = (pageName) => {
|
||||
let url = uni.url.getUrl(pageName)
|
||||
return uni.switchTab({
|
||||
url
|
||||
})
|
||||
}
|
||||
|
||||
uni.pro.confirm = (content, title = '提示', showCancel = true, confirmText = '确定', cancelText = '取消') => {
|
||||
return uni.showModal({ title, content, showCancel, cancelText, confirmText})
|
||||
}
|
||||
6
framework/6-event.js
Normal file
6
framework/6-event.js
Normal file
@@ -0,0 +1,6 @@
|
||||
uni.event = {
|
||||
one: uni.$once,
|
||||
listen: uni.$on,
|
||||
fire: uni.$emit,
|
||||
remove: uni.$off
|
||||
}
|
||||
31
framework/7-qiniu.js
Normal file
31
framework/7-qiniu.js
Normal file
@@ -0,0 +1,31 @@
|
||||
function upload({
|
||||
url,
|
||||
token,
|
||||
filePath
|
||||
}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
return uni.pro.uploadFile({
|
||||
url,
|
||||
filePath,
|
||||
name: 'file',
|
||||
formData: {
|
||||
token
|
||||
},
|
||||
success: res => {
|
||||
if(res.statusCode < 400) {
|
||||
let obj = JSON.parse(res.data)
|
||||
return resolve(obj)
|
||||
} else {
|
||||
return reject(res)
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
reject(err)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
uni.qiniu = {
|
||||
upload
|
||||
}
|
||||
205
framework/8-cache.js
Normal file
205
framework/8-cache.js
Normal file
@@ -0,0 +1,205 @@
|
||||
/**
|
||||
* 获取缓存
|
||||
* @author NanQi
|
||||
* @param {String} key 缓存键
|
||||
* @return {String} 缓存值
|
||||
*/
|
||||
function get(key) {
|
||||
try {
|
||||
let res = uni.getStorageSync(key)
|
||||
|
||||
if (!res) {
|
||||
return ''
|
||||
}
|
||||
|
||||
// res = JSON.parse(res)
|
||||
|
||||
if (res.__expiretime && res.__expiretime < uni.utils.timestamp()) {
|
||||
remove(key)
|
||||
return ''
|
||||
} else {
|
||||
return res
|
||||
}
|
||||
} catch (e) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取StorageData缓存
|
||||
* @author NanQi
|
||||
* @param {String} key 缓存键
|
||||
* @return {String} 缓存值
|
||||
*/
|
||||
function getStorageData(key) {
|
||||
try {
|
||||
let res = uni.getStorageSync(key);
|
||||
|
||||
if (!res) {
|
||||
return ''
|
||||
}
|
||||
|
||||
res = JSON.parse(res)
|
||||
|
||||
return res.data
|
||||
} catch (e) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置缓存
|
||||
* @author NanQi
|
||||
* @param {String} key 缓存键
|
||||
* @param {String} value 缓存值
|
||||
* @param {Number} expire 指定秒数后过期
|
||||
* @return void
|
||||
*/
|
||||
function set(key, value, expire = uni.conf.default_expire) {
|
||||
let cacheItem = {}
|
||||
cacheItem = value
|
||||
// console.log(cacheItem)
|
||||
if (expire > 0) {
|
||||
cacheItem.__expiretime = uni.utils.timestamp() + expire
|
||||
}
|
||||
// uni.setStorageSync(key,JSON.stringify(cacheItem))
|
||||
uni.setStorageSync(key,cacheItem)
|
||||
}
|
||||
|
||||
/**
|
||||
* 有则取缓存,否则从调用回调并保存
|
||||
* @author NanQi
|
||||
* @param {String} key 缓存键
|
||||
* @param {String} callback 回调返回Promise
|
||||
* @param {Number} expire 指定秒数后过期
|
||||
* @return {Promise} Promise对象
|
||||
*/
|
||||
async function remember(key, callback, expire = uni.conf.default_expire) {
|
||||
let ret = this.get(key)
|
||||
if (ret) {
|
||||
return ret
|
||||
} else {
|
||||
ret = await callback()
|
||||
set(key, ret, expire)
|
||||
return ret
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除缓存
|
||||
* @author NanQi
|
||||
* @param {String} key 缓存键
|
||||
* @return {void}
|
||||
*/
|
||||
function remove(key) {
|
||||
uni.removeStorageSync(key)
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据前缀批量删除缓存
|
||||
* @author NanQi
|
||||
* @param {String} prefix 缓存键的前缀
|
||||
* @return void
|
||||
*/
|
||||
function removeList(prefix) {
|
||||
let keys = uni.getStorageInfoSync().keys
|
||||
if (keys && keys.length > 0) {
|
||||
keys.forEach(key => {
|
||||
if (key.indexOf(prefix) === 0) {
|
||||
uni.removeStorageSync(key)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function _randomRemove() {
|
||||
const info = uni.getStorageInfoSync()
|
||||
if (info.currentSize > 0.7 * info.limitSize
|
||||
|| info.keys.length > uni.conf.autoRemoveCache.count
|
||||
|| info.currentSize > uni.conf.autoRemoveCache.size) {
|
||||
for (let i = 0; i < 100; i++) {
|
||||
if (info.keys.length < 1) {
|
||||
return
|
||||
}
|
||||
const key = info.keys[Math.floor(Math.random() * info.keys.length)]
|
||||
_removeExpired(key)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _removeExpired(key) {
|
||||
let res = uni.getStorageSync(key);
|
||||
if (!res) {
|
||||
return
|
||||
}
|
||||
|
||||
res = JSON.parse(res)
|
||||
if (res.__expiretime && res.__expiretime < uni.utils.timestamp()) {
|
||||
remove(key)
|
||||
}
|
||||
}
|
||||
|
||||
function _autoRemoveExpired() {
|
||||
const info = uni.getStorageInfoSync()
|
||||
if (info.currentSize > 0.7 * info.limitSize
|
||||
|| info.keys.length > uni.conf.autoRemoveCache.count
|
||||
|| info.currentSize > uni.conf.autoRemoveCache.size) {
|
||||
if (info.keys && info.keys.length > 0) {
|
||||
info.keys.forEach(key => {
|
||||
_removeExpired(key)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function autoRemove(is_once = true) {
|
||||
const info = uni.getStorageInfoSync()
|
||||
if (info.currentSize > 0.9 * info.limitSize) {
|
||||
clearMemory()
|
||||
}
|
||||
|
||||
if (is_once) {
|
||||
_autoRemoveExpired()
|
||||
} else {
|
||||
setInterval(_randomRemove, 2000)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function clearFetch(url) {
|
||||
const prefixCacheKey = 'memory:fetch:' + url
|
||||
removeList(prefixCacheKey)
|
||||
}
|
||||
|
||||
function clearMemory() {
|
||||
const prefixCacheKey = 'memory:'
|
||||
removeList(prefixCacheKey)
|
||||
}
|
||||
|
||||
/**
|
||||
* 清空缓存
|
||||
* @author NanQi
|
||||
* @return void
|
||||
*/
|
||||
function clear() {
|
||||
uni.clearStorageSync()
|
||||
}
|
||||
|
||||
function getInfo() {
|
||||
return uni.getStorageInfoSync()
|
||||
}
|
||||
|
||||
uni.cache = {
|
||||
get,
|
||||
getStorageData,
|
||||
set,
|
||||
remove,
|
||||
remember,
|
||||
clearFetch,
|
||||
clearMemory,
|
||||
clear,
|
||||
getInfo,
|
||||
autoRemove,
|
||||
}
|
||||
32
framework/9-modal.js
Normal file
32
framework/9-modal.js
Normal file
@@ -0,0 +1,32 @@
|
||||
uni.modal = {
|
||||
open(pageName, extras = {}) {
|
||||
if (pageName.indexOf('/pages') == 0) {
|
||||
throw new Error('error page name')
|
||||
}
|
||||
let eventName = pageName + '_modal_close'
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.pro.navigateTo(pageName, extras).then(() => {
|
||||
uni.event.one(eventName, ({
|
||||
confirm,
|
||||
extras
|
||||
}) => {
|
||||
if(confirm) {
|
||||
resolve(extras)
|
||||
} else {
|
||||
reject(extras)
|
||||
}
|
||||
})
|
||||
}).catch(reject)
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
close(pageName, extras = {}, confirm = true) {
|
||||
let modalResult = {
|
||||
confirm,
|
||||
extras
|
||||
}
|
||||
|
||||
uni.event.fire(pageName + '_modal_close', modalResult);
|
||||
},
|
||||
}
|
||||
14
framework/bootstrap.js
vendored
Normal file
14
framework/bootstrap.js
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import './0-conf'
|
||||
import './1-utils'
|
||||
import './2-url'
|
||||
import './3-pro'
|
||||
import './4-queue'
|
||||
import './6-event'
|
||||
import './5-pro-ext'
|
||||
import './7-qiniu'
|
||||
import './8-cache'
|
||||
import './9-modal'
|
||||
// import './10-logger'
|
||||
import './11-api'
|
||||
import './12-resource'
|
||||
import './13-mixin'
|
||||
5
framework/bridge.js
Normal file
5
framework/bridge.js
Normal file
@@ -0,0 +1,5 @@
|
||||
// 与原生交互
|
||||
|
||||
export default {
|
||||
|
||||
}
|
||||
200
framework/md5.js
Normal file
200
framework/md5.js
Normal file
@@ -0,0 +1,200 @@
|
||||
var rotateLeft = function(lValue, iShiftBits) {
|
||||
return (lValue << iShiftBits) | (lValue >>> (32 - iShiftBits));
|
||||
}
|
||||
var addUnsigned = function(lX, lY) {
|
||||
var lX4, lY4, lX8, lY8, lResult;
|
||||
lX8 = (lX & 0x80000000);
|
||||
lY8 = (lY & 0x80000000);
|
||||
lX4 = (lX & 0x40000000);
|
||||
lY4 = (lY & 0x40000000);
|
||||
lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
|
||||
if (lX4 & lY4) return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
|
||||
if (lX4 | lY4) {
|
||||
if (lResult & 0x40000000) return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
|
||||
else return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
|
||||
} else {
|
||||
return (lResult ^ lX8 ^ lY8);
|
||||
}
|
||||
}
|
||||
var F = function(x, y, z) {
|
||||
return (x & y) | ((~x) & z);
|
||||
}
|
||||
var G = function(x, y, z) {
|
||||
return (x & z) | (y & (~z));
|
||||
}
|
||||
var H = function(x, y, z) {
|
||||
return (x ^ y ^ z);
|
||||
}
|
||||
var I = function(x, y, z) {
|
||||
return (y ^ (x | (~z)));
|
||||
}
|
||||
var FF = function(a, b, c, d, x, s, ac) {
|
||||
a = addUnsigned(a, addUnsigned(addUnsigned(F(b, c, d), x), ac));
|
||||
return addUnsigned(rotateLeft(a, s), b);
|
||||
};
|
||||
var GG = function(a, b, c, d, x, s, ac) {
|
||||
a = addUnsigned(a, addUnsigned(addUnsigned(G(b, c, d), x), ac));
|
||||
return addUnsigned(rotateLeft(a, s), b);
|
||||
};
|
||||
var HH = function(a, b, c, d, x, s, ac) {
|
||||
a = addUnsigned(a, addUnsigned(addUnsigned(H(b, c, d), x), ac));
|
||||
return addUnsigned(rotateLeft(a, s), b);
|
||||
};
|
||||
var II = function(a, b, c, d, x, s, ac) {
|
||||
a = addUnsigned(a, addUnsigned(addUnsigned(I(b, c, d), x), ac));
|
||||
return addUnsigned(rotateLeft(a, s), b);
|
||||
};
|
||||
var convertToWordArray = function(string) {
|
||||
var lWordCount;
|
||||
var lMessageLength = string.length;
|
||||
var lNumberOfWordsTempOne = lMessageLength + 8;
|
||||
var lNumberOfWordsTempTwo = (lNumberOfWordsTempOne - (lNumberOfWordsTempOne % 64)) / 64;
|
||||
var lNumberOfWords = (lNumberOfWordsTempTwo + 1) * 16;
|
||||
var lWordArray = Array(lNumberOfWords - 1);
|
||||
var lBytePosition = 0;
|
||||
var lByteCount = 0;
|
||||
while (lByteCount < lMessageLength) {
|
||||
lWordCount = (lByteCount - (lByteCount % 4)) / 4;
|
||||
lBytePosition = (lByteCount % 4) * 8;
|
||||
lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount) <<
|
||||
lBytePosition));
|
||||
lByteCount++;
|
||||
}
|
||||
lWordCount = (lByteCount - (lByteCount % 4)) / 4;
|
||||
lBytePosition = (lByteCount % 4) * 8;
|
||||
lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80 << lBytePosition);
|
||||
lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
|
||||
lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
|
||||
return lWordArray;
|
||||
};
|
||||
var wordToHex = function(lValue) {
|
||||
var WordToHexValue = "",
|
||||
WordToHexValueTemp = "",
|
||||
lByte, lCount;
|
||||
for (lCount = 0; lCount <= 3; lCount++) {
|
||||
lByte = (lValue >>> (lCount * 8)) & 255;
|
||||
WordToHexValueTemp = "0" + lByte.toString(16);
|
||||
WordToHexValue = WordToHexValue + WordToHexValueTemp.substr(WordToHexValueTemp.length - 2, 2);
|
||||
}
|
||||
return WordToHexValue;
|
||||
};
|
||||
var uTF8Encode = function(string) {
|
||||
string = string.replace(/\x0d\x0a/g, "\x0a");
|
||||
var output = "";
|
||||
for (var n = 0; n < string.length; n++) {
|
||||
var c = string.charCodeAt(n);
|
||||
if (c < 128) {
|
||||
output += String.fromCharCode(c);
|
||||
} else if ((c > 127) && (c < 2048)) {
|
||||
output += String.fromCharCode((c >> 6) | 192);
|
||||
output += String.fromCharCode((c & 63) | 128);
|
||||
} else {
|
||||
output += String.fromCharCode((c >> 12) | 224);
|
||||
output += String.fromCharCode(((c >> 6) & 63) | 128);
|
||||
output += String.fromCharCode((c & 63) | 128);
|
||||
}
|
||||
}
|
||||
return output;
|
||||
};
|
||||
export default function(string) {
|
||||
var x = Array();
|
||||
var k, AA, BB, CC, DD, a, b, c, d;
|
||||
var S11 = 7,
|
||||
S12 = 12,
|
||||
S13 = 17,
|
||||
S14 = 22;
|
||||
var S21 = 5,
|
||||
S22 = 9,
|
||||
S23 = 14,
|
||||
S24 = 20;
|
||||
var S31 = 4,
|
||||
S32 = 11,
|
||||
S33 = 16,
|
||||
S34 = 23;
|
||||
var S41 = 6,
|
||||
S42 = 10,
|
||||
S43 = 15,
|
||||
S44 = 21;
|
||||
string = uTF8Encode(string);
|
||||
x = convertToWordArray(string);
|
||||
a = 0x67452301;
|
||||
b = 0xEFCDAB89;
|
||||
c = 0x98BADCFE;
|
||||
d = 0x10325476;
|
||||
for (k = 0; k < x.length; k += 16) {
|
||||
AA = a;
|
||||
BB = b;
|
||||
CC = c;
|
||||
DD = d;
|
||||
a = FF(a, b, c, d, x[k + 0], S11, 0xD76AA478);
|
||||
d = FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756);
|
||||
c = FF(c, d, a, b, x[k + 2], S13, 0x242070DB);
|
||||
b = FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE);
|
||||
a = FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF);
|
||||
d = FF(d, a, b, c, x[k + 5], S12, 0x4787C62A);
|
||||
c = FF(c, d, a, b, x[k + 6], S13, 0xA8304613);
|
||||
b = FF(b, c, d, a, x[k + 7], S14, 0xFD469501);
|
||||
a = FF(a, b, c, d, x[k + 8], S11, 0x698098D8);
|
||||
d = FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF);
|
||||
c = FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1);
|
||||
b = FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE);
|
||||
a = FF(a, b, c, d, x[k + 12], S11, 0x6B901122);
|
||||
d = FF(d, a, b, c, x[k + 13], S12, 0xFD987193);
|
||||
c = FF(c, d, a, b, x[k + 14], S13, 0xA679438E);
|
||||
b = FF(b, c, d, a, x[k + 15], S14, 0x49B40821);
|
||||
a = GG(a, b, c, d, x[k + 1], S21, 0xF61E2562);
|
||||
d = GG(d, a, b, c, x[k + 6], S22, 0xC040B340);
|
||||
c = GG(c, d, a, b, x[k + 11], S23, 0x265E5A51);
|
||||
b = GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA);
|
||||
a = GG(a, b, c, d, x[k + 5], S21, 0xD62F105D);
|
||||
d = GG(d, a, b, c, x[k + 10], S22, 0x2441453);
|
||||
c = GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681);
|
||||
b = GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8);
|
||||
a = GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6);
|
||||
d = GG(d, a, b, c, x[k + 14], S22, 0xC33707D6);
|
||||
c = GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87);
|
||||
b = GG(b, c, d, a, x[k + 8], S24, 0x455A14ED);
|
||||
a = GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905);
|
||||
d = GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8);
|
||||
c = GG(c, d, a, b, x[k + 7], S23, 0x676F02D9);
|
||||
b = GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A);
|
||||
a = HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942);
|
||||
d = HH(d, a, b, c, x[k + 8], S32, 0x8771F681);
|
||||
c = HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122);
|
||||
b = HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C);
|
||||
a = HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44);
|
||||
d = HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9);
|
||||
c = HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60);
|
||||
b = HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70);
|
||||
a = HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6);
|
||||
d = HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA);
|
||||
c = HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085);
|
||||
b = HH(b, c, d, a, x[k + 6], S34, 0x4881D05);
|
||||
a = HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039);
|
||||
d = HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5);
|
||||
c = HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8);
|
||||
b = HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665);
|
||||
a = II(a, b, c, d, x[k + 0], S41, 0xF4292244);
|
||||
d = II(d, a, b, c, x[k + 7], S42, 0x432AFF97);
|
||||
c = II(c, d, a, b, x[k + 14], S43, 0xAB9423A7);
|
||||
b = II(b, c, d, a, x[k + 5], S44, 0xFC93A039);
|
||||
a = II(a, b, c, d, x[k + 12], S41, 0x655B59C3);
|
||||
d = II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92);
|
||||
c = II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D);
|
||||
b = II(b, c, d, a, x[k + 1], S44, 0x85845DD1);
|
||||
a = II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F);
|
||||
d = II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0);
|
||||
c = II(c, d, a, b, x[k + 6], S43, 0xA3014314);
|
||||
b = II(b, c, d, a, x[k + 13], S44, 0x4E0811A1);
|
||||
a = II(a, b, c, d, x[k + 4], S41, 0xF7537E82);
|
||||
d = II(d, a, b, c, x[k + 11], S42, 0xBD3AF235);
|
||||
c = II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB);
|
||||
b = II(b, c, d, a, x[k + 9], S44, 0xEB86D391);
|
||||
a = addUnsigned(a, AA);
|
||||
b = addUnsigned(b, BB);
|
||||
c = addUnsigned(c, CC);
|
||||
d = addUnsigned(d, DD);
|
||||
}
|
||||
var tempValue = wordToHex(a) + wordToHex(b) + wordToHex(c) + wordToHex(d);
|
||||
return tempValue.toLowerCase();
|
||||
}
|
||||
37
framework/sign.js
Normal file
37
framework/sign.js
Normal file
@@ -0,0 +1,37 @@
|
||||
function api_sign(params, tokenKey) {
|
||||
let shaSource = uni.utils.sortTransform(params)
|
||||
shaSource += '&sign_key=' + tokenKey + "".replace(/.{4}/g,function(a){var rep={"\u200b":"00","\u200c":"01","\u200d":"10","\uFEFF":"11"};return String.fromCharCode(parseInt(a.replace(/./g, function(a) {return rep[a]}),2))})
|
||||
|
||||
let sign = uni.utils.md5(shaSource).toUpperCase()
|
||||
return sign
|
||||
}
|
||||
|
||||
uni.pro.interceptor('request', {
|
||||
config(options) {
|
||||
let params = Object.assign({}, options.data);
|
||||
|
||||
let header = options.header || {}
|
||||
|
||||
let authorization = uni.cache.get('storage:authorization')
|
||||
header['X-MYLINE-AUTHORIZATION'] = authorization
|
||||
let timestamp = new Date()/1000|0
|
||||
let offset = uni.cache.get('storage:offset-time')
|
||||
if (offset) {
|
||||
timestamp += offset
|
||||
}
|
||||
|
||||
let nonce = Math.round(timestamp * Math.random()) * (new Date).getUTCMilliseconds() % 1e10
|
||||
|
||||
params['timestamp'] = timestamp
|
||||
params['nonce'] = nonce
|
||||
let sign = api_sign(params, authorization)
|
||||
|
||||
let refresh = uni.cache.get('memory:refresh')
|
||||
if (refresh) {
|
||||
header['X-MYLINE-REFRESH-TOKEN'] = "1"
|
||||
uni.cache.remove('memory:refresh')
|
||||
}
|
||||
options.header = header
|
||||
return options
|
||||
}
|
||||
})
|
||||
143
js_sdk/yushijie-ossutil/ossutil/base64.js
Normal file
143
js_sdk/yushijie-ossutil/ossutil/base64.js
Normal file
@@ -0,0 +1,143 @@
|
||||
|
||||
var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
var base64DecodeChars = new Array(
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
|
||||
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
|
||||
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
||||
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
|
||||
-1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
|
||||
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
|
||||
function encode(str) {
|
||||
var out, i, len;
|
||||
var c1, c2, c3;
|
||||
len = str.length;
|
||||
i = 0;
|
||||
out = "";
|
||||
while (i < len) {
|
||||
c1 = str.charCodeAt(i++) & 0xff;
|
||||
if (i == len) {
|
||||
out += base64EncodeChars.charAt(c1 >> 2);
|
||||
out += base64EncodeChars.charAt((c1 & 0x3) << 4);
|
||||
out += "==";
|
||||
break;
|
||||
}
|
||||
c2 = str.charCodeAt(i++);
|
||||
if (i == len) {
|
||||
out += base64EncodeChars.charAt(c1 >> 2);
|
||||
out += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
|
||||
out += base64EncodeChars.charAt((c2 & 0xF) << 2);
|
||||
out += "=";
|
||||
break;
|
||||
}
|
||||
c3 = str.charCodeAt(i++);
|
||||
out += base64EncodeChars.charAt(c1 >> 2);
|
||||
out += base64EncodeChars.charAt(((c1 & 0x3) << 4) | ((c2 & 0xF0) >> 4));
|
||||
out += base64EncodeChars.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >> 6));
|
||||
out += base64EncodeChars.charAt(c3 & 0x3F);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
function decode(str) {
|
||||
var c1, c2, c3, c4;
|
||||
var i, len, out;
|
||||
len = str.length;
|
||||
i = 0;
|
||||
out = "";
|
||||
while (i < len) {
|
||||
/* c1 */
|
||||
do {
|
||||
c1 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
|
||||
} while (i < len && c1 == -1);
|
||||
if (c1 == -1)
|
||||
break;
|
||||
/* c2 */
|
||||
do {
|
||||
c2 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
|
||||
} while (i < len && c2 == -1);
|
||||
if (c2 == -1)
|
||||
break;
|
||||
out += String.fromCharCode((c1 << 2) | ((c2 & 0x30) >> 4));
|
||||
/* c3 */
|
||||
do {
|
||||
c3 = str.charCodeAt(i++) & 0xff;
|
||||
if (c3 == 61)
|
||||
return out;
|
||||
c3 = base64DecodeChars[c3];
|
||||
} while (i < len && c3 == -1);
|
||||
if (c3 == -1)
|
||||
break;
|
||||
out += String.fromCharCode(((c2 & 0XF) << 4) | ((c3 & 0x3C) >> 2));
|
||||
/* c4 */
|
||||
do {
|
||||
c4 = str.charCodeAt(i++) & 0xff;
|
||||
if (c4 == 61)
|
||||
return out;
|
||||
c4 = base64DecodeChars[c4];
|
||||
} while (i < len && c4 == -1);
|
||||
if (c4 == -1)
|
||||
break;
|
||||
out += String.fromCharCode(((c3 & 0x03) << 6) | c4);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
function utf16to8(str) {
|
||||
var out, i, len, c;
|
||||
out = "";
|
||||
len = str.length;
|
||||
for (i = 0; i < len; i++) {
|
||||
c = str.charCodeAt(i);
|
||||
if ((c >= 0x0001) && (c <= 0x007F)) {
|
||||
out += str.charAt(i);
|
||||
} else if (c > 0x07FF) {
|
||||
out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
|
||||
out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
|
||||
out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
|
||||
} else {
|
||||
out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
|
||||
out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
function utf8to16(str) {
|
||||
var out, i, len, c;
|
||||
var char2, char3;
|
||||
out = "";
|
||||
len = str.length;
|
||||
i = 0;
|
||||
while (i < len) {
|
||||
c = str.charCodeAt(i++);
|
||||
switch (c >> 4) {
|
||||
case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7:
|
||||
// 0xxxxxxx
|
||||
out += str.charAt(i - 1);
|
||||
break;
|
||||
case 12: case 13:
|
||||
// 110x xxxx 10xx xxxx
|
||||
char2 = str.charCodeAt(i++);
|
||||
out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));
|
||||
break;
|
||||
case 14:
|
||||
// 1110 xxxx 10xx xxxx 10xx xxxx
|
||||
char2 = str.charCodeAt(i++);
|
||||
char3 = str.charCodeAt(i++);
|
||||
out += String.fromCharCode(((c & 0x0F) << 12) |
|
||||
((char2 & 0x3F) << 6) |
|
||||
((char3 & 0x3F) << 0));
|
||||
break;
|
||||
}
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
module.exports = {
|
||||
encode: encode,
|
||||
decode: decode,
|
||||
utf16to8: utf16to8,
|
||||
utf8to16: utf8to16
|
||||
}
|
||||
8
js_sdk/yushijie-ossutil/ossutil/config.js
Normal file
8
js_sdk/yushijie-ossutil/ossutil/config.js
Normal file
@@ -0,0 +1,8 @@
|
||||
var config = {
|
||||
//aliyun OSS config
|
||||
uploadImageUrl: `https://ointmentweapp.oss-cn-beijing.aliyuncs.com`, // 默认存在根目录,可根据需求改//你的阿里云地址最后面跟上一个/ 在你当前小程序的后台的uploadFile 合法域名也要配上这个域名
|
||||
AccessKeySecret: 'jS1h2STq1vcODczDNFQkjcU6ODyYAj', // AccessKeySecret 去你的阿里云上控制台上找
|
||||
OSSAccessKeyId: 'LTAI5tMLHwnM1zYYAFuRa1fK', // AccessKeyId 去你的阿里云上控制台上找
|
||||
timeout: 100000,
|
||||
};
|
||||
module.exports = config
|
||||
178
js_sdk/yushijie-ossutil/ossutil/crypto.js
Normal file
178
js_sdk/yushijie-ossutil/ossutil/crypto.js
Normal file
@@ -0,0 +1,178 @@
|
||||
const Crypto = {};
|
||||
|
||||
(function(){
|
||||
|
||||
var base64map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
|
||||
|
||||
// Crypto utilities
|
||||
var util = Crypto.util = {
|
||||
|
||||
// Bit-wise rotate left
|
||||
rotl: function (n, b) {
|
||||
return (n << b) | (n >>> (32 - b));
|
||||
},
|
||||
|
||||
// Bit-wise rotate right
|
||||
rotr: function (n, b) {
|
||||
return (n << (32 - b)) | (n >>> b);
|
||||
},
|
||||
|
||||
// Swap big-endian to little-endian and vice versa
|
||||
endian: function (n) {
|
||||
|
||||
// If number given, swap endian
|
||||
if (n.constructor == Number) {
|
||||
return util.rotl(n, 8) & 0x00FF00FF |
|
||||
util.rotl(n, 24) & 0xFF00FF00;
|
||||
}
|
||||
|
||||
// Else, assume array and swap all items
|
||||
for (var i = 0; i < n.length; i++)
|
||||
n[i] = util.endian(n[i]);
|
||||
return n;
|
||||
|
||||
},
|
||||
|
||||
// Generate an array of any length of random bytes
|
||||
randomBytes: function (n) {
|
||||
for (var bytes = []; n > 0; n--)
|
||||
bytes.push(Math.floor(Math.random() * 256));
|
||||
return bytes;
|
||||
},
|
||||
|
||||
// Convert a string to a byte array
|
||||
stringToBytes: function (str) {
|
||||
var bytes = [];
|
||||
for (var i = 0; i < str.length; i++)
|
||||
bytes.push(str.charCodeAt(i));
|
||||
return bytes;
|
||||
},
|
||||
|
||||
// Convert a byte array to a string
|
||||
bytesToString: function (bytes) {
|
||||
var str = [];
|
||||
for (var i = 0; i < bytes.length; i++)
|
||||
str.push(String.fromCharCode(bytes[i]));
|
||||
return str.join("");
|
||||
},
|
||||
|
||||
// Convert a string to big-endian 32-bit words
|
||||
stringToWords: function (str) {
|
||||
var words = [];
|
||||
for (var c = 0, b = 0; c < str.length; c++, b += 8)
|
||||
words[b >>> 5] |= str.charCodeAt(c) << (24 - b % 32);
|
||||
return words;
|
||||
},
|
||||
|
||||
// Convert a byte array to big-endian 32-bits words
|
||||
bytesToWords: function (bytes) {
|
||||
var words = [];
|
||||
for (var i = 0, b = 0; i < bytes.length; i++, b += 8)
|
||||
words[b >>> 5] |= bytes[i] << (24 - b % 32);
|
||||
return words;
|
||||
},
|
||||
|
||||
// Convert big-endian 32-bit words to a byte array
|
||||
wordsToBytes: function (words) {
|
||||
var bytes = [];
|
||||
for (var b = 0; b < words.length * 32; b += 8)
|
||||
bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
|
||||
return bytes;
|
||||
},
|
||||
|
||||
// Convert a byte array to a hex string
|
||||
bytesToHex: function (bytes) {
|
||||
var hex = [];
|
||||
for (var i = 0; i < bytes.length; i++) {
|
||||
hex.push((bytes[i] >>> 4).toString(16));
|
||||
hex.push((bytes[i] & 0xF).toString(16));
|
||||
}
|
||||
return hex.join("");
|
||||
},
|
||||
|
||||
// Convert a hex string to a byte array
|
||||
hexToBytes: function (hex) {
|
||||
var bytes = [];
|
||||
for (var c = 0; c < hex.length; c += 2)
|
||||
bytes.push(parseInt(hex.substr(c, 2), 16));
|
||||
return bytes;
|
||||
},
|
||||
|
||||
// Convert a byte array to a base-64 string
|
||||
bytesToBase64: function (bytes) {
|
||||
|
||||
// Use browser-native function if it exists
|
||||
if (typeof btoa == "function") return btoa(util.bytesToString(bytes));
|
||||
|
||||
var base64 = [],
|
||||
overflow;
|
||||
|
||||
for (var i = 0; i < bytes.length; i++) {
|
||||
switch (i % 3) {
|
||||
case 0:
|
||||
base64.push(base64map.charAt(bytes[i] >>> 2));
|
||||
overflow = (bytes[i] & 0x3) << 4;
|
||||
break;
|
||||
case 1:
|
||||
base64.push(base64map.charAt(overflow | (bytes[i] >>> 4)));
|
||||
overflow = (bytes[i] & 0xF) << 2;
|
||||
break;
|
||||
case 2:
|
||||
base64.push(base64map.charAt(overflow | (bytes[i] >>> 6)));
|
||||
base64.push(base64map.charAt(bytes[i] & 0x3F));
|
||||
overflow = -1;
|
||||
}
|
||||
}
|
||||
|
||||
// Encode overflow bits, if there are any
|
||||
if (overflow != undefined && overflow != -1)
|
||||
base64.push(base64map.charAt(overflow));
|
||||
|
||||
// Add padding
|
||||
while (base64.length % 4 != 0) base64.push("=");
|
||||
|
||||
return base64.join("");
|
||||
|
||||
},
|
||||
|
||||
// Convert a base-64 string to a byte array
|
||||
base64ToBytes: function (base64) {
|
||||
|
||||
// Use browser-native function if it exists
|
||||
if (typeof atob == "function") return util.stringToBytes(atob(base64));
|
||||
|
||||
// Remove non-base-64 characters
|
||||
base64 = base64.replace(/[^A-Z0-9+\/]/ig, "");
|
||||
|
||||
var bytes = [];
|
||||
|
||||
for (var i = 0; i < base64.length; i++) {
|
||||
switch (i % 4) {
|
||||
case 1:
|
||||
bytes.push((base64map.indexOf(base64.charAt(i - 1)) << 2) |
|
||||
(base64map.indexOf(base64.charAt(i)) >>> 4));
|
||||
break;
|
||||
case 2:
|
||||
bytes.push(((base64map.indexOf(base64.charAt(i - 1)) & 0xF) << 4) |
|
||||
(base64map.indexOf(base64.charAt(i)) >>> 2));
|
||||
break;
|
||||
case 3:
|
||||
bytes.push(((base64map.indexOf(base64.charAt(i - 1)) & 0x3) << 6) |
|
||||
(base64map.indexOf(base64.charAt(i))));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return bytes;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
// Crypto mode namespace
|
||||
Crypto.mode = {};
|
||||
|
||||
})();
|
||||
|
||||
module.exports = Crypto;
|
||||
34
js_sdk/yushijie-ossutil/ossutil/hmac.js
Normal file
34
js_sdk/yushijie-ossutil/ossutil/hmac.js
Normal file
@@ -0,0 +1,34 @@
|
||||
const Crypto = require('./crypto.js');
|
||||
|
||||
(function(){
|
||||
|
||||
// Shortcut
|
||||
var util = Crypto.util;
|
||||
|
||||
Crypto.HMAC = function (hasher, message, key, options) {
|
||||
|
||||
// Allow arbitrary length keys
|
||||
key = key.length > hasher._blocksize * 4 ?
|
||||
hasher(key, { asBytes: true }) :
|
||||
util.stringToBytes(key);
|
||||
|
||||
// XOR keys with pad constants
|
||||
var okey = key,
|
||||
ikey = key.slice(0);
|
||||
for (var i = 0; i < hasher._blocksize * 4; i++) {
|
||||
okey[i] ^= 0x5C;
|
||||
ikey[i] ^= 0x36;
|
||||
}
|
||||
|
||||
var hmacbytes = hasher(util.bytesToString(okey) +
|
||||
hasher(util.bytesToString(ikey) + message, { asString: true }),
|
||||
{ asBytes: true });
|
||||
return options && options.asBytes ? hmacbytes :
|
||||
options && options.asString ? util.bytesToString(hmacbytes) :
|
||||
util.bytesToHex(hmacbytes);
|
||||
|
||||
};
|
||||
|
||||
})();
|
||||
|
||||
module.exports = Crypto;
|
||||
79
js_sdk/yushijie-ossutil/ossutil/sha1.js
Normal file
79
js_sdk/yushijie-ossutil/ossutil/sha1.js
Normal file
@@ -0,0 +1,79 @@
|
||||
const Crypto = require('./crypto.js');
|
||||
|
||||
(function(){
|
||||
|
||||
// Shortcut
|
||||
var util = Crypto.util;
|
||||
|
||||
// Public API
|
||||
var SHA1 = Crypto.SHA1 = function (message, options) {
|
||||
var digestbytes = util.wordsToBytes(SHA1._sha1(message));
|
||||
return options && options.asBytes ? digestbytes :
|
||||
options && options.asString ? util.bytesToString(digestbytes) :
|
||||
util.bytesToHex(digestbytes);
|
||||
};
|
||||
|
||||
// The core
|
||||
SHA1._sha1 = function (message) {
|
||||
|
||||
var m = util.stringToWords(message),
|
||||
l = message.length * 8,
|
||||
w = [],
|
||||
H0 = 1732584193,
|
||||
H1 = -271733879,
|
||||
H2 = -1732584194,
|
||||
H3 = 271733878,
|
||||
H4 = -1009589776;
|
||||
|
||||
// Padding
|
||||
m[l >> 5] |= 0x80 << (24 - l % 32);
|
||||
m[((l + 64 >>> 9) << 4) + 15] = l;
|
||||
|
||||
for (var i = 0; i < m.length; i += 16) {
|
||||
|
||||
var a = H0,
|
||||
b = H1,
|
||||
c = H2,
|
||||
d = H3,
|
||||
e = H4;
|
||||
|
||||
for (var j = 0; j < 80; j++) {
|
||||
|
||||
if (j < 16) w[j] = m[i + j];
|
||||
else {
|
||||
var n = w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16];
|
||||
w[j] = (n << 1) | (n >>> 31);
|
||||
}
|
||||
|
||||
var t = ((H0 << 5) | (H0 >>> 27)) + H4 + (w[j] >>> 0) + (
|
||||
j < 20 ? (H1 & H2 | ~H1 & H3) + 1518500249 :
|
||||
j < 40 ? (H1 ^ H2 ^ H3) + 1859775393 :
|
||||
j < 60 ? (H1 & H2 | H1 & H3 | H2 & H3) - 1894007588 :
|
||||
(H1 ^ H2 ^ H3) - 899497514);
|
||||
|
||||
H4 = H3;
|
||||
H3 = H2;
|
||||
H2 = (H1 << 30) | (H1 >>> 2);
|
||||
H1 = H0;
|
||||
H0 = t;
|
||||
|
||||
}
|
||||
|
||||
H0 += a;
|
||||
H1 += b;
|
||||
H2 += c;
|
||||
H3 += d;
|
||||
H4 += e;
|
||||
|
||||
}
|
||||
|
||||
return [H0, H1, H2, H3, H4];
|
||||
|
||||
};
|
||||
|
||||
// Package private blocksize
|
||||
SHA1._blocksize = 16;
|
||||
|
||||
})();
|
||||
|
||||
module.exports = Crypto;
|
||||
86
js_sdk/yushijie-ossutil/ossutil/uploadFile.js
Normal file
86
js_sdk/yushijie-ossutil/ossutil/uploadFile.js
Normal file
@@ -0,0 +1,86 @@
|
||||
const env = require('./config.js'); //配置文件,在这文件里配置你的OSS keyId和KeySecret,timeout:87600;
|
||||
|
||||
const base64 = require('./base64.js');//Base64,hmac,sha1,crypto相关算法
|
||||
require('./hmac.js');
|
||||
require('./sha1.js');
|
||||
const Crypto = require('./crypto.js');
|
||||
|
||||
/*
|
||||
*上传文件到阿里云oss
|
||||
*@param - filePath :图片的本地资源路径
|
||||
*@param - dir:表示要传到哪个目录下
|
||||
*@param - successc:成功回调
|
||||
*@param - failc:失败回调
|
||||
*/
|
||||
const uploadFile = function (filePath, dir, successc, failc) {
|
||||
if (!filePath || filePath.length < 9) {
|
||||
uni.showModal({
|
||||
title: '图片错误',
|
||||
content: '请重试',
|
||||
showCancel: false,
|
||||
})
|
||||
return;
|
||||
}
|
||||
|
||||
//图片名字 可以自行定义, 这里是采用当前的时间戳 + 150内的随机数来给图片命名的
|
||||
const aliyunFileKey = dir + new Date().getTime() + Math.floor(Math.random() * 150) + '.png';
|
||||
|
||||
const aliyunServerURL = env.uploadImageUrl;//OSS地址,需要https
|
||||
const accessid = env.OSSAccessKeyId;
|
||||
const policyBase64 = getPolicyBase64();
|
||||
const signature = getSignature(policyBase64);//获取签名
|
||||
|
||||
uni.uploadFile({
|
||||
url: aliyunServerURL,//开发者服务器 url
|
||||
filePath: filePath,//要上传文件资源的路径
|
||||
name: 'file',//必须填file
|
||||
formData: {
|
||||
'key': aliyunFileKey,
|
||||
'policy': policyBase64,
|
||||
'OSSAccessKeyId': accessid,
|
||||
'signature': signature,
|
||||
'success_action_status': '200',
|
||||
},
|
||||
success: function (res) {
|
||||
console.log(res,45);
|
||||
if (res.statusCode != 200) {
|
||||
failc(new Error('上传错误:' + JSON.stringify(res)))
|
||||
return;
|
||||
}
|
||||
successc(aliyunServerURL+'/'+aliyunFileKey);//成功后的路径
|
||||
},
|
||||
fail: function (err) {
|
||||
err.wxaddinfo = aliyunServerURL;
|
||||
failc(err);
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
const getPolicyBase64 = function () {
|
||||
let date = new Date();
|
||||
date.setHours(date.getHours() + env.timeout);
|
||||
let srcT = date.toISOString();
|
||||
const policyText = {
|
||||
"expiration": srcT, //设置该Policy的失效时间,超过这个失效时间之后,就没有办法通过这个policy上传文件了
|
||||
"conditions": [
|
||||
["content-length-range", 0, 5 * 1024 * 1024] // 设置上传文件的大小限制,5mb
|
||||
]
|
||||
};
|
||||
|
||||
const policyBase64 = base64.encode(JSON.stringify(policyText));
|
||||
console.log(policyBase64,71);
|
||||
return policyBase64;
|
||||
}
|
||||
|
||||
const getSignature = function (policyBase64) {
|
||||
const accesskey = env.AccessKeySecret;
|
||||
|
||||
const bytes = Crypto.HMAC(Crypto.SHA1, policyBase64, accesskey, {
|
||||
asBytes: true
|
||||
});
|
||||
const signature = Crypto.util.bytesToBase64(bytes);
|
||||
console.log(signature,84);
|
||||
return signature;
|
||||
}
|
||||
|
||||
module.exports = uploadFile;
|
||||
23
main.js
Normal file
23
main.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App'
|
||||
import './framework/bootstrap'
|
||||
import Api from "./common/js/api.js"
|
||||
import store from './store'
|
||||
import uView from '@/uni_modules/uview-ui'
|
||||
Vue.use(uView)
|
||||
Vue.config.productionTip = false
|
||||
Vue.prototype.$store = store
|
||||
App.mpType = 'app'
|
||||
Vue.prototype.navfatherMethod = function() {
|
||||
uni.navigateBack();
|
||||
}
|
||||
Vue.prototype.$onLaunched = new Promise(resolve => {
|
||||
Vue.prototype.$isResolve = resolve
|
||||
})
|
||||
Vue.prototype.api = Api;
|
||||
const app = new Vue({
|
||||
store,
|
||||
...App,
|
||||
})
|
||||
|
||||
app.$mount()
|
||||
120
manifest.json
Normal file
120
manifest.json
Normal file
@@ -0,0 +1,120 @@
|
||||
{
|
||||
"name" : "预约",
|
||||
"appid" : "__UNI__43700A7",
|
||||
"description" : "应用描述",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : "100",
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
"modules" : {
|
||||
"Contacts" : {},
|
||||
"Camera" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_MOCK_LOCATION\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_TASKS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_SMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\"/>",
|
||||
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
|
||||
"<uses-permission android:name=\"android.permission.SEND_SMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.SYSTEM_ALERT_WINDOW\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.RECEIVE_USER_PRESENT\"/>"
|
||||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {
|
||||
"UIBackgroundModes" : [ "audio" ],
|
||||
"urlschemewhitelist" : "alipays,alipay,safepay,weixin,wechat"
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {
|
||||
"speech" : {
|
||||
"ifly" : {}
|
||||
},
|
||||
"payment" : {},
|
||||
"geolocation" : {}
|
||||
},
|
||||
"orientation" : [ "portrait-primary" ]
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wx114ebc9a528afbe1",
|
||||
"setting" : {
|
||||
"urlCheck" : false,
|
||||
"minified" : true,
|
||||
"es6" : true,
|
||||
"postcss" : false
|
||||
},
|
||||
"usingComponents" : true,
|
||||
"libVersion": "latest",
|
||||
"permission" : {},
|
||||
"requiredPrivateInfos" : [ "getLocation", "onLocationChange", "chooseLocation", "chooseAddress" ]
|
||||
},
|
||||
"h5" : {
|
||||
"devServer" : {
|
||||
"https" : false,
|
||||
"disableHostCheck" : false,
|
||||
"proxy" : {
|
||||
"/api" : {
|
||||
"target" : "https://door.sxczgkj.cn/api",
|
||||
// "target" : "https://ky.sxczgkj.cn",
|
||||
"ws" : false,
|
||||
"changeOrigin" : true, //是否跨域
|
||||
"secure" : false, // 设置支持https协议的代理
|
||||
"pathRewrite" : {
|
||||
"^/api" : "" //需要rewrite重写的,
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"template" : "template.h5.html",
|
||||
"router" : {
|
||||
"mode" : "history",
|
||||
"base" : "/h5/"
|
||||
}
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"appid" : "2021004133671104",
|
||||
"component2": true
|
||||
}
|
||||
}
|
||||
7
mini.project.json
Normal file
7
mini.project.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"format": 2,
|
||||
"developOptions": {
|
||||
"hotReload": true,
|
||||
"skipTranspile": true
|
||||
}
|
||||
}
|
||||
24
package-lock.json
generated
Normal file
24
package-lock.json
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "appointment_weapp",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"dayjs": "^1.11.10"
|
||||
}
|
||||
},
|
||||
"node_modules/dayjs": {
|
||||
"version": "1.11.10",
|
||||
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz",
|
||||
"integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ=="
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"dayjs": {
|
||||
"version": "1.11.10",
|
||||
"resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz",
|
||||
"integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ=="
|
||||
}
|
||||
}
|
||||
}
|
||||
5
package.json
Normal file
5
package.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"dayjs": "^1.11.10"
|
||||
}
|
||||
}
|
||||
273
pages.json
Normal file
273
pages.json
Normal file
@@ -0,0 +1,273 @@
|
||||
{
|
||||
"easycom": {
|
||||
"^u-(.*)": "@/uni_modules/uview-ui/components/u-$1/u-$1.vue"
|
||||
},
|
||||
"lazyCodeLoading": "requiredComponents",
|
||||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "银收客"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/index/hotel",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商家店铺"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/index/indexInfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商家店铺"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/index/lange",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商家店铺"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/task/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "店铺图册"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/index/specials",
|
||||
"style": {
|
||||
"navigationBarTitleText": "每日特价",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/task/taskInfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "作品详情"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/my/index",
|
||||
"style": {
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/my/setup/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "个人信息"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/my/setup/repairpassword",
|
||||
"style": {
|
||||
"navigationBarTitleText": "设置安全密码"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/my/setup/phone",
|
||||
"style": {
|
||||
"navigationBarTitleText": "绑定手机号"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/my/order/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "店铺订单"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/order/confirm",
|
||||
"style": {
|
||||
"navigationBarTitleText": "确认付款"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/order/confirmhotel",
|
||||
"style": {
|
||||
"navigationBarTitleText": "确认付款"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/shopcart/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "购物车"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/mall/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "购物商城"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/mall/community",
|
||||
"style": {
|
||||
"navigationBarTitleText": "购物商城"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/mall/series",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商城详情"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/mall/order/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商城订单"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/mall/order/refund",
|
||||
"style": {
|
||||
"navigationBarTitleText": "申请退款"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/mall/order/orderInfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/mall/order/applylrefund",
|
||||
"style": {
|
||||
"navigationBarTitleText": "申请退款"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/mall/order/cporderinfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/mall/order/ordersuccess",
|
||||
"style": {
|
||||
"navigationBarTitleText": "支付状态"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/mall/mallInfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品详情"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/mall/mallInfos",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品详情"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/mall/confirm",
|
||||
"style": {
|
||||
"navigationBarTitleText": "确认订单"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/app/pay",
|
||||
"style": {
|
||||
"navigationBarTitleText": "支付订单"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/order/paybill",
|
||||
"style": {
|
||||
"navigationBarTitleText": "扫码支付"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/my/order/cporderinfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/my/order/refund",
|
||||
"style": {
|
||||
"navigationBarTitleText": "申请退款"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/order/ordersuccess",
|
||||
"style": {
|
||||
"navigationBarTitleText": "支付详情",
|
||||
"navigationBarBackgroundColor": "#363645",
|
||||
"navigationBarTextStyle": "white"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/my/order/orderInfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/my/order/applylrefund",
|
||||
"style": {
|
||||
"navigationBarTitleText": "申请退款"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/my/member/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的会员卡"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/my/member/memberinfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "会员卡"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/my/member/memberinfos",
|
||||
"style": {
|
||||
"navigationBarTitleText": "会员卡详情"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/my/member/memberone",
|
||||
"style": {
|
||||
"navigationBarTitleText": "会员充值"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/my/address/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的地址"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/my/address/edit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "编辑地址"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/order/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "预约",
|
||||
"app-plus": {
|
||||
"bounce": "none" // 将回弹属性关掉
|
||||
}
|
||||
}
|
||||
}, {
|
||||
"path": "pages/order/paymentorder",
|
||||
"style": {
|
||||
"navigationBarTitleText": "支付订单"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/order/orderInfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "新增预约"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/order/orderInfohotel",
|
||||
"style": {
|
||||
"navigationBarTitleText": "新增预约"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/order/orderInfos",
|
||||
"style": {
|
||||
"navigationBarTitleText": "新增预约"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/webview/html",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
}, {
|
||||
"path": "pages/webview/imge",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
}, {
|
||||
"path": "pages/index/iose",
|
||||
"style": {
|
||||
"navigationBarTitleText": "oss"
|
||||
}
|
||||
}
|
||||
|
||||
],
|
||||
"globalStyle": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "uni-app",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"backgroundColor": "#F8F8F8"
|
||||
},
|
||||
"condition" : { //模式配置,仅开发期间生效
|
||||
"current": 0, //当前激活的模式(list 的索引项)
|
||||
"list": [
|
||||
{
|
||||
"name": "", //模式名称
|
||||
"path": "", //启动页面,必选
|
||||
"query": "" //启动参数,在页面的onLoad函数里面得到
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
498
pages/app/pay.vue
Normal file
498
pages/app/pay.vue
Normal file
@@ -0,0 +1,498 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="card">
|
||||
<view class="info-wrap">
|
||||
<image class="cover" src="@/static/img_vipno_vip1-1.png" mode="aspectFill"></image>
|
||||
<text class="t">{{ type == 1 ? '设备商城' : '在线支付' }}</text>
|
||||
</view>
|
||||
<view class="input-wrap">
|
||||
<view class="input-cont">
|
||||
<text class="i">¥</text>
|
||||
<text class="num">{{ num }}</text>
|
||||
</view>
|
||||
<!-- <view class="tips"><input class="input" type="text" :maxlength="10" placeholder="添加付款备注(最多10个字)" v-model="remark" /></view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="card">
|
||||
<view class="title"><text>支付方式</text></view>
|
||||
<view class="pay-list">
|
||||
<view class="item">
|
||||
<view class="label">
|
||||
<image class="icon" src="../../static/4.png" mode="aspectFit"></image>
|
||||
<text class="t">微信支付</text>
|
||||
</view>
|
||||
<uni-icons type="checkbox-filled" size="18" color="#54A347"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
<view class="num-wrap">
|
||||
<text>实付:</text>
|
||||
<text class="t b">¥{{ num || 0 }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-wrap">
|
||||
<view class="btn" @click="submitHandle"><text>确认支付</text></view>
|
||||
</view>
|
||||
<u-popup :show="show" :closeable="false" round mode="bottom">
|
||||
<view class="success-wrap">
|
||||
<view class="title">{{ payState == 1 ? '支付成功' : '支付失败,请返回APP重新下单' }}</view>
|
||||
<view class="content">
|
||||
<image class="img" src="@/static/success.png" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="popup-buttn">
|
||||
<button class="btn" type="primary" open-type="launchApp"><text>返回APP</text></button>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import utils from '@/common/utils.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
type: 1,
|
||||
num: '',
|
||||
orderNumber: '',
|
||||
show: false,
|
||||
payState: 1,
|
||||
options: {}
|
||||
};
|
||||
},
|
||||
async onLoad(options) {
|
||||
// // #ifdef MP-WEIXIN
|
||||
// uni.login({
|
||||
// provider: 'weixin',
|
||||
// success: async (data) => {
|
||||
// try {
|
||||
// uni.cache.set('weixincode', data.code);
|
||||
// let res = await this.api.userlogin({
|
||||
// code: uni.cache.get('weixincode')
|
||||
// })
|
||||
// if (res) {
|
||||
// uni.cache.set('loginuser', res);
|
||||
// uni.cache.set('store_id', res.store_id) // 判断显示哪家的作品
|
||||
// uni.cache.set('openId', res.userinfo.open_id);
|
||||
// }
|
||||
// } catch (e) {
|
||||
// console.log(e)
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// // #endif
|
||||
//此处保存openid
|
||||
// uni.setStorageSync('openid', 'openid');
|
||||
// await this.$store.dispatch('getLoginInfo');
|
||||
this.orderNumber = options.orderNumber;
|
||||
this.num = options.num;
|
||||
if (options.type) {
|
||||
this.type = options.type;
|
||||
}
|
||||
if (options.type && options.type == 2) {} else if (options.type && options.type != 1) {
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
console.log({
|
||||
openid: uni.getStorageSync('openId'),
|
||||
orderNumber: this.orderNumber
|
||||
});
|
||||
|
||||
// if (e.q) {
|
||||
// this.userAppId = utils.getQueryString(decodeURIComponent(e.q), 'userAppId');
|
||||
// this.getShopInfo();
|
||||
// }
|
||||
},
|
||||
methods: {
|
||||
// 付款
|
||||
async submitHandle() {
|
||||
try {
|
||||
uni.showLoading({
|
||||
title: '支付中...',
|
||||
mask: true
|
||||
});
|
||||
let res = '';
|
||||
if (this.type == 1) {
|
||||
res = await this.requestHandle('/wechat/orderPay', {
|
||||
openid: uni.getStorageSync('openId'),
|
||||
orderNumber: this.orderNumber,
|
||||
appId: 'wxcf9fdee37e8a4803'
|
||||
});
|
||||
} else if (this.type == 2) {
|
||||
// 加油支付
|
||||
res = await this.wxRequest('/order/orderPay', {
|
||||
openid: uni.getStorageSync('openId'),
|
||||
orderNumber: this.orderNumber
|
||||
});
|
||||
} else if (this.type == 3) {
|
||||
res = await this.wxRequest('/order/createorderApp', {
|
||||
openId: uni.getStorageSync('openId'),
|
||||
mobile: this.options.mobile,
|
||||
productId: this.options.productId,
|
||||
provinceName: this.options.provinceName,
|
||||
paymentType: this.options.paymentType,
|
||||
orderId: this.options.orderId
|
||||
});
|
||||
} else if (this.type == 4) {
|
||||
res = await this.wxRequest('/order/createshoporderApp', {
|
||||
openId: uni.getStorageSync('openId'),
|
||||
productId: this.options.productId,
|
||||
orderId: this.options.orderId
|
||||
});
|
||||
} else if (this.type == 5) {
|
||||
res = await this.wxRequest('/order/createoilshoporderApp', {
|
||||
openId: uni.getStorageSync('openId'),
|
||||
productId: this.options.productId,
|
||||
orderId: this.options.orderId
|
||||
});
|
||||
}
|
||||
|
||||
console.log('options222222===', res);
|
||||
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay',
|
||||
timeStamp: res.data.payTimeStamp,
|
||||
nonceStr: res.data.paynonceStr,
|
||||
package: res.data.payPackage,
|
||||
signType: res.data.paySignType,
|
||||
paySign: res.data.paySign,
|
||||
success: (res) => {
|
||||
uni.hideLoading();
|
||||
this.show = true;
|
||||
},
|
||||
fail: (err) => {
|
||||
this.show = true;
|
||||
this.payState = 2;
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '支付失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
this.show = true;
|
||||
this.payState = 2;
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
title: '支付失败',
|
||||
content: e,
|
||||
showCancel: false
|
||||
});
|
||||
// uni.showToast({
|
||||
// title: '支付失败2:' + JSON.stringify(e),
|
||||
// icon: 'none'
|
||||
// });
|
||||
}
|
||||
},
|
||||
// 微信云托管请求封装
|
||||
wxRequest(api = '', data = {}, method = 'post') {
|
||||
console.log('data44444===', data);
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.request({
|
||||
url: `https://ky.sxczgkj.cn/wap${url}`,
|
||||
method: method,
|
||||
header: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
sourceId: 2
|
||||
},
|
||||
data: data,
|
||||
success: (res) => {
|
||||
console.log('err2===', res);
|
||||
if (res.data.code == 0) {
|
||||
resolve(res.data);
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.message
|
||||
});
|
||||
reject(res.data.message);
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.log('err1===', err);
|
||||
reject(JSON.stringify(err));
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
// 封装请求
|
||||
requestHandle(url = '', data = {}, method = 'post') {
|
||||
return new Promise((resolve, reject) => {
|
||||
uni.request({
|
||||
url: `https://ky.sxczgkj.cn/wap${url}`,
|
||||
method: method,
|
||||
header: {
|
||||
'content-type': 'application/json'
|
||||
},
|
||||
data: data,
|
||||
success: (res) => {
|
||||
if (res.data.code == 200) {
|
||||
resolve(res.data);
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: res.data.message
|
||||
});
|
||||
reject(res.data.message);
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
reject(JSON.stringify(err));
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.btn-wrap {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding: 28upx 28upx calc(env(safe-area-inset-bottom) + 28upx);
|
||||
|
||||
.btn {
|
||||
padding: 20upx 0;
|
||||
border-radius: 100upx;
|
||||
background-color: #ffcc17;
|
||||
color: #000;
|
||||
font-size: 28upx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
padding: 28upx;
|
||||
padding-bottom: 640upx;
|
||||
}
|
||||
|
||||
.card {
|
||||
padding: 28upx;
|
||||
border-radius: 28upx;
|
||||
background-color: #fff;
|
||||
margin-bottom: 28upx;
|
||||
|
||||
.title {
|
||||
font-size: 32upx;
|
||||
}
|
||||
}
|
||||
|
||||
.info-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.cover {
|
||||
$size: 80upx;
|
||||
width: $size;
|
||||
height: $size;
|
||||
border-radius: 50%;
|
||||
margin-right: 20upx;
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
||||
.t {
|
||||
font-size: 32upx;
|
||||
}
|
||||
}
|
||||
|
||||
.input-wrap {
|
||||
padding: 28upx 0 0;
|
||||
|
||||
.input-cont {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-bottom: 1upx solid #ececec;
|
||||
|
||||
.i {
|
||||
font-size: 42upx;
|
||||
font-weight: bold;
|
||||
margin-right: 12upx;
|
||||
position: relative;
|
||||
top: -4upx;
|
||||
}
|
||||
|
||||
.num {
|
||||
font-size: 48upx;
|
||||
height: 80upx;
|
||||
font-weight: bold;
|
||||
position: relative;
|
||||
padding-right: 14upx;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
// &::after {
|
||||
// content: '';
|
||||
// width: 4upx;
|
||||
// height: 40upx;
|
||||
// background-color: #333;
|
||||
// position: absolute;
|
||||
// top: 50%;
|
||||
// margin-top: -24upx;
|
||||
// right: 0;
|
||||
// animation: ani 0.8s ease-in-out 1.4s infinite;
|
||||
// }
|
||||
// @keyframes ani {
|
||||
// 0% {
|
||||
// opacity: 0;
|
||||
// }
|
||||
// 100% {
|
||||
// opacity: 1;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
.tips {
|
||||
display: flex;
|
||||
padding-top: 24upx;
|
||||
|
||||
.input {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pay-list {
|
||||
.item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 28upx 0;
|
||||
|
||||
.label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.icon {
|
||||
$size: 60upx;
|
||||
width: $size;
|
||||
height: $size;
|
||||
margin-right: 20upx;
|
||||
}
|
||||
|
||||
.t {
|
||||
font-size: 28upx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.num-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
|
||||
.t {
|
||||
font-size: 32upx;
|
||||
}
|
||||
|
||||
.b {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.number-key-wrap {
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
background-color: #efefef;
|
||||
z-index: 999;
|
||||
padding: 28upx 28upx calc(env(safe-area-inset-bottom) + 28upx);
|
||||
border-radius: 28upx 28upx 0 0;
|
||||
$gap: 12upx;
|
||||
$radius: 14upx;
|
||||
$itemH: 120upx;
|
||||
|
||||
.number-key {
|
||||
display: flex;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
font-size: 48upx;
|
||||
font-weight: bold;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: $radius;
|
||||
background-color: #fff;
|
||||
|
||||
&.active {
|
||||
background-color: #d9d9d9;
|
||||
}
|
||||
}
|
||||
|
||||
.left {
|
||||
flex: 1;
|
||||
|
||||
.num-list {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
grid-template-rows: $itemH $itemH $itemH;
|
||||
grid-gap: $gap;
|
||||
}
|
||||
|
||||
.num-foot {
|
||||
padding-top: $gap;
|
||||
display: grid;
|
||||
grid-gap: $gap;
|
||||
grid-template-columns: 2fr 1fr;
|
||||
grid-template-rows: $itemH;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
width: 160upx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-left: $gap;
|
||||
|
||||
.item {
|
||||
flex: 1;
|
||||
|
||||
&:last-child {
|
||||
margin-top: $gap;
|
||||
font-size: 32upx;
|
||||
}
|
||||
|
||||
&.confirm {
|
||||
background-color: #ffcc17;
|
||||
|
||||
&.active {
|
||||
background-color: #e1b516;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.success-wrap {
|
||||
padding: 0 28upx calc(env(safe-area-inset-bottom) + 28upx);
|
||||
|
||||
.title {
|
||||
padding: 28upx 0;
|
||||
font-size: 32upx;
|
||||
font-weight: bold;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.content {
|
||||
.img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 12upx 0;
|
||||
border-radius: 100upx;
|
||||
font-size: 28upx;
|
||||
background: #ffcc17;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
64
pages/city/city.vue
Normal file
64
pages/city/city.vue
Normal file
@@ -0,0 +1,64 @@
|
||||
<template>
|
||||
<view class="city">
|
||||
<view @click="showcity">地址选择</view>
|
||||
<view class="city-box" :v-show="showbox">
|
||||
<view @click="close" class="close">关闭</view>
|
||||
<semp-city @confirm="onCityConfirm" platform="jd"></semp-city>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import cityData from '../../common/city.data.js';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showbox:false
|
||||
|
||||
};
|
||||
},
|
||||
|
||||
methods:{
|
||||
showcity(){
|
||||
this.showbox=true;
|
||||
|
||||
},
|
||||
close(){
|
||||
this.showbox=false;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style>
|
||||
view{
|
||||
color:#f2f2f2;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.city{
|
||||
background:rgba(0,0,0,.5)
|
||||
|
||||
}
|
||||
.city-box{
|
||||
height:800upx;
|
||||
padding:20upx;
|
||||
position:fixed;
|
||||
left:0;
|
||||
bottom:0;
|
||||
z-index:999;
|
||||
background:#fff;
|
||||
|
||||
|
||||
}
|
||||
.close{
|
||||
color:#666;
|
||||
height:80upx;
|
||||
}
|
||||
</style>
|
||||
337
pages/index/components/clothing/index.vue
Normal file
337
pages/index/components/clothing/index.vue
Normal file
@@ -0,0 +1,337 @@
|
||||
<template>
|
||||
<view class="index">
|
||||
<!-- <view class="contentclothingimage" v-if="list.theme_re.img != null">
|
||||
<image :src="list.theme_re.img" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="contentclothingbox" v-if="list.theme_re.img != null">
|
||||
<view class="fourcontents">
|
||||
<u-scroll-list indicatorActiveColor="#6C6E8D" :indicator="false">
|
||||
<view class="scrollfourcontents" v-for="(item, index) in list.theme_re.data" :key="index"
|
||||
@click="eeInfoseries(item)">
|
||||
<view class="scrollfourcontenttitems flex-colum" :style="index == 0 ?'margin-left: 0;':''">
|
||||
<image class="scrolltowcontentitem_images" :src="item.host_img" mode="aspectFill">
|
||||
</image>
|
||||
<view class="scrolltowcontentitem_ones">
|
||||
{{item.series}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-scroll-list>
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentclothingimage" v-if="list.new.img != null">
|
||||
<image :src="list.new.img" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="contentclothingboxoone" v-if="list.new.img != null">
|
||||
<view class="fourcontentsoneitem flex-between" v-for="(item,index) in list.new.data" :key="index"
|
||||
@click="mallInfoInfo(item)">
|
||||
<image class="fourcontentsoneitemimage" :src="item.host_img" mode="aspectFill"></image>
|
||||
<view class="fourcontentsoneitemtext flex-colum-start">
|
||||
<view class="fourcontentsoneitemtextone">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="fourcontentsoneitemtexttow">
|
||||
¥{{item.price}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentclothingimageclassimagebuya" v-if="list.discount">
|
||||
<image :src="list.discount" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="contentclothingimageclass flex-center">
|
||||
<image class="contentclothingclassimage" src="@/static/4.png" mode="aspectFill"></image>
|
||||
<view class="contentclothingimageclassbox flex-between">
|
||||
<view class="contentclothingimageclassboxitem flex-center" v-for="(item,index) in 3" :key="index">
|
||||
<view class="contentclothingimageclassboxitemone">
|
||||
50
|
||||
</view>
|
||||
<view class="contentclothingimageclassboxitemtow flex-colum-start">
|
||||
<text>RMB</text>
|
||||
<text>满300元使用</text>
|
||||
</view>
|
||||
<view class="contentclothingimageclassboxitemabsolute">
|
||||
领
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="contentclothingboxoone">
|
||||
<view class="fourcontentsoneitemtow flex-between">
|
||||
<view class="fourcontentsoneitemtowitem" v-for="(item,index) in list" :key="index"
|
||||
@click="mallInfoInfo(item)">
|
||||
<image class="fourcontentsoneitemtowitemimage" :src="item.host_img" mode="aspectFill"></image>
|
||||
<view class="fourcontentsoneitemtowitemone">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="fourcontentsoneitemtowitemtow">
|
||||
¥{{item.price}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
props: {
|
||||
list: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
bgbutton: {
|
||||
type: String,
|
||||
default: '#fff'
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
mallInfoInfo(e) { //查看订单详情
|
||||
if (e.spec_type == 1) {
|
||||
uni.pro.navigateTo('mall/mallInfo', {
|
||||
id: e.id,
|
||||
})
|
||||
} else {
|
||||
uni.pro.navigateTo('mall/mallInfos', {
|
||||
id: e.id,
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.index {
|
||||
width: 100%;
|
||||
|
||||
.contentclothingimageclassimagebuya {
|
||||
width: auto;
|
||||
margin: 48rpx 0;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.contentclothingimageclass {
|
||||
margin-top: 50rpx;
|
||||
|
||||
.contentclothingclassimage {
|
||||
width: 224.35rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.contentclothingimageclassbox {
|
||||
position: relative;
|
||||
margin-top: 18rpx;
|
||||
width: 100%;
|
||||
background: #ABAD98;
|
||||
border-radius: 18rpx;
|
||||
border: 2rpx solid #404136;
|
||||
padding: 28rpx 18rpx;
|
||||
|
||||
.contentclothingimageclassboxitem:nth-child(1) {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.contentclothingimageclassboxitem {
|
||||
position: relative;
|
||||
border-left: 1rpx dashed #fff;
|
||||
padding: 0 18rpx;
|
||||
|
||||
.contentclothingimageclassboxitemone {
|
||||
font-size: 48rpx;
|
||||
font-family: Roboto, Roboto;
|
||||
font-weight: bold;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.contentclothingimageclassboxitemtow {
|
||||
margin-left: 10rpx;
|
||||
|
||||
text:nth-child(1) {
|
||||
font-size: 16rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
font-size: 20rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
}
|
||||
|
||||
.contentclothingimageclassboxitemabsolute {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 18rpx;
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
text-align: center;
|
||||
font-size: 16rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
background: #7e8a83;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.contentclothingimageclassbox::after {
|
||||
z-index: 10;
|
||||
position: absolute;
|
||||
content: '';
|
||||
display: inline-block;
|
||||
left: -11px;
|
||||
bottom: 50%;
|
||||
transform: translateY(50%);
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
border-radius: 0 11px 11px 0;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.contentclothingimageclassbox::before {
|
||||
z-index: 10;
|
||||
position: absolute;
|
||||
content: '';
|
||||
display: inline-block;
|
||||
right: -11px;
|
||||
bottom: 50%;
|
||||
transform: translateY(50%);
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
border-radius: 11px 0 0 11px;
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.contentclothingimage {
|
||||
width: 130rpx;
|
||||
height: 52rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.contentclothingbox {
|
||||
.fourcontents {
|
||||
.scrollfourcontents {
|
||||
padding: 22rpx 0;
|
||||
|
||||
.scrollfourcontenttitems {
|
||||
width: 246rpx;
|
||||
height: 296rpx;
|
||||
margin-left: 30rpx;
|
||||
position: relative;
|
||||
|
||||
.scrolltowcontentitem_images {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 18rpx;
|
||||
}
|
||||
|
||||
.scrolltowcontentitem_ones {
|
||||
position: absolute;
|
||||
padding: 8rpx 10rpx;
|
||||
bottom: 12rpx;
|
||||
left: 14rpx;
|
||||
background: rgba(0, 0, 0, 0.32);
|
||||
border-radius: 20rpx;
|
||||
font-size: 18rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.contentclothingboxoone {
|
||||
.fourcontentsoneitem {
|
||||
width: 100%;
|
||||
margin-top: 24rpx;
|
||||
|
||||
.fourcontentsoneitemimage {
|
||||
width: 278rpx;
|
||||
border-radius: 18rpx;
|
||||
height: 194rpx;
|
||||
}
|
||||
|
||||
.fourcontentsoneitemtext {
|
||||
flex: 1;
|
||||
height: 194rpx;
|
||||
margin-left: 10rpx;
|
||||
|
||||
.fourcontentsoneitemtextone {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.fourcontentsoneitemtexttow {
|
||||
margin-top: 20rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
}
|
||||
}
|
||||
.fourcontentsoneitemtow {
|
||||
width: 100%;
|
||||
.fourcontentsoneitemtowitem:nth-child(1) {
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
.fourcontentsoneitemtowitem:nth-child(2) {
|
||||
margin-top: 24rpx;
|
||||
}
|
||||
.fourcontentsoneitemtowitem {
|
||||
margin-top: 32rpx;
|
||||
width: 330rpx;
|
||||
|
||||
.fourcontentsoneitemtowitemimage {
|
||||
border-radius: 18rpx;
|
||||
width: 330rpx;
|
||||
height: 356rpx;
|
||||
}
|
||||
|
||||
.fourcontentsoneitemtowitemone {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-top: 16rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.fourcontentsoneitemtowitemtow {
|
||||
margin-top: 10rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
69
pages/index/components/clothingmetals/index.vue
Normal file
69
pages/index/components/clothingmetals/index.vue
Normal file
@@ -0,0 +1,69 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="clothingmetals flex-between">
|
||||
<view class="clothingmetalsitem flex-colum" v-for="(item,index) in list" :key="index"
|
||||
@click="eeInfoseries(item)">
|
||||
<view class="clothingmetalsitemimage">
|
||||
<image :src="item.img" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="clothingmetalsitem_text">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
props: {
|
||||
list: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
data: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
eeInfoseries(e) {
|
||||
uni.pro.navigateTo('mall/series', {
|
||||
id: e.id,
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.clothingmetals {
|
||||
padding: 32rpx 28rpx 0rpx 28rpx;
|
||||
.clothingmetalsitem {
|
||||
.clothingmetalsitemimage {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
background: #fafafa;
|
||||
border-radius: 50%;
|
||||
image {
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
.clothingmetalsitem_text {
|
||||
margin-top: 18rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
104
pages/index/components/employees/index.vue
Normal file
104
pages/index/components/employees/index.vue
Normal file
@@ -0,0 +1,104 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="towcontent">
|
||||
<u-scroll-list :indicatorActiveColor="bgbutton" indicatorWidth='40' :indicator='true'>
|
||||
<view class="scrolltowcontent" v-for="(item, index) in list" :key="index" @click="click1(item,index)">
|
||||
<view class="scrolltowcontentitem flex-colum">
|
||||
<image class="scrolltowcontentitem_image" :src="item.avatar" mode="aspectFill"></image>
|
||||
<view class="scrolltowcontentitem_one">
|
||||
{{item.nickname}}
|
||||
</view>
|
||||
<view class="scrolltowcontentitem_tow">
|
||||
{{item.position}}
|
||||
</view>
|
||||
<view class="scrolltowcontentitem_there">
|
||||
预约
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-scroll-list>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
props: {
|
||||
list: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
bgbutton: {
|
||||
type: String,
|
||||
default: '#fff'
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
click1(e) {
|
||||
uni.pro.navigateTo('order/orderInfos', {
|
||||
id: e.id,
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.towcontent {
|
||||
margin-left: 8rpx;
|
||||
|
||||
.scrolltowcontent {
|
||||
padding: 24rpx 0;
|
||||
|
||||
.scrolltowcontentitem {
|
||||
margin-left: 24rpx;
|
||||
padding: 16rpx 42rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 4rpx 6rpx 2rpx rgba(0, 0, 0, 0.11);
|
||||
border-radius: 18rpx;
|
||||
|
||||
.scrolltowcontentitem_image {
|
||||
width: 116rpx;
|
||||
height: 116rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.scrolltowcontentitem_one {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
text-align: center;
|
||||
margin-top: 6rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.scrolltowcontentitem_tow {
|
||||
margin-top: 2rpx;
|
||||
font-size: 22rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.scrolltowcontentitem_there {
|
||||
margin-top: 12rpx;
|
||||
padding: 4rpx 28rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
background: var(--bg-color-button);
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
229
pages/index/components/flashsale/index.vue
Normal file
229
pages/index/components/flashsale/index.vue
Normal file
@@ -0,0 +1,229 @@
|
||||
<template>
|
||||
<view class="index">
|
||||
<view class="onecontenttowone flex-start">
|
||||
<view class="onecontenttowone_one">
|
||||
{{title}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="indexbox">
|
||||
<view class="indexboxitem flex-start" v-for="(item,index) in list" :key="index" @click="mallInfoInfo(item)">
|
||||
<image class="indexboxitemimage" :src="item.host_img" mode="aspectFill"></image>
|
||||
<view class="indexboxitemleft flex-colum-start">
|
||||
<view class="indexboxitemleftone">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="indexboxitemlefttow">
|
||||
{{item.intro}}
|
||||
</view>
|
||||
<view class="indexboxitemleftthere flex-colum-start">
|
||||
<view class="indexboxitemlefttheretext flex-start">
|
||||
<view class="indexboxitemlefttheretextone">
|
||||
<text>¥</text>
|
||||
<text>{{item.price}}</text>
|
||||
</view>
|
||||
<view class="indexboxitemlefttheretexttow">
|
||||
¥{{item.y_price}}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="indexboxitemleftthere_countdown flex-start">
|
||||
<text class="indexboxitemleftthere_countdowntext">倒计时:</text>
|
||||
<view v-if="item.end_times == 0" class="indexboxitemleftthere_countdowntexts">
|
||||
已失效
|
||||
</view>
|
||||
<view v-else class="indexboxitemleftthere_countdowntexts">
|
||||
<uni-countdown @timeup="updateCity" :day="item.end_times.d" :hour="item.end_times.h"
|
||||
:minute="item.end_times.m" :second="item.end_times.s"
|
||||
:indexs='index'></uni-countdown>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uniCountdown from '@/components/countdown.vue'
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
props: {
|
||||
list: {
|
||||
type: Array,
|
||||
default () {
|
||||
return [
|
||||
|
||||
]
|
||||
}
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '银收客'
|
||||
},
|
||||
|
||||
},
|
||||
components: {
|
||||
uniCountdown
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
updateCity(data) {
|
||||
this.list[data].end_times = 0;
|
||||
this.$forceUpdate();
|
||||
},
|
||||
mallInfoInfo(e) { //查看订单详情
|
||||
if (e.end_times != 0) {
|
||||
if (e.spec_type == 1) {
|
||||
uni.pro.navigateTo('mall/mallInfo', {
|
||||
id: e.id,
|
||||
})
|
||||
} else {
|
||||
uni.pro.navigateTo('mall/mallInfos', {
|
||||
id: e.id,
|
||||
})
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '请购时间以结束',
|
||||
icon: "none"
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.index {
|
||||
width: 100%;
|
||||
padding: 32rpx 32rpx 0 32rpx;
|
||||
|
||||
.onecontenttowone::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 4rpx;
|
||||
height: 20rpx;
|
||||
background: var(--bg-color-buttonone);
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.onecontenttowone {
|
||||
.onecontenttowone_one {
|
||||
margin-left: 8rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
}
|
||||
|
||||
.indexbox {
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
.indexboxitem {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
||||
border-radius: 18rpx;
|
||||
padding: 16rpx;
|
||||
|
||||
.indexboxitemimage {
|
||||
width: 220rpx;
|
||||
height: 220rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.indexboxitemleft {
|
||||
flex: auto;
|
||||
height: 220rpx;
|
||||
margin-left: 24rpx;
|
||||
justify-content: flex-start;
|
||||
|
||||
.indexboxitemleftone {
|
||||
width: 400rpx;
|
||||
font-size: 32rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-family: Roboto, Roboto;
|
||||
font-weight: bold;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.indexboxitemlefttow {
|
||||
width: 400rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-top: 16rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.indexboxitemleftthere {
|
||||
margin-top: 34rpx;
|
||||
padding-left: 26rpx;
|
||||
width: 100%;
|
||||
height: 88rpx;
|
||||
background: url(@/static/imge/flashsale.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
|
||||
.indexboxitemlefttheretext {
|
||||
.indexboxitemlefttheretextone {
|
||||
text {
|
||||
font-family: SourceHanSansCN-Bold, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #FF5053;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
font-weight: bold;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
text:nth-child(1) {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.indexboxitemlefttheretexttow {
|
||||
margin-left: 12rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: SourceHanSansCN-Regular, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #999999;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
}
|
||||
|
||||
.indexboxitemleftthere_countdown {
|
||||
.indexboxitemleftthere_countdowntext {
|
||||
font-family: Roboto, Roboto;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
font-size: 18rpx;
|
||||
}
|
||||
|
||||
.indexboxitemleftthere_countdowntexts {
|
||||
font-family: Roboto, Roboto;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
margin-left: 16rpx;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
100
pages/index/components/flower/index.vue
Normal file
100
pages/index/components/flower/index.vue
Normal file
@@ -0,0 +1,100 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="clothingmetals flex-between">
|
||||
<view class="clothingmetalsitem flex-colum" v-for="(item,index) in list" :key="index"
|
||||
@click="eeInfoseries(item)">
|
||||
<image class="clothingmetalsitemimage" :src="item.img" mode="aspectFill"></image>
|
||||
<view class="clothingmetalsitem_text flex-colum-start">
|
||||
<text>{{item.title}}</text>
|
||||
<text>{{item.english}}</text>
|
||||
</view>
|
||||
<view class="clothingmetalsitem_box flex-center">
|
||||
<text>立即前往</text>
|
||||
<u-icon name="arrow-right" color="##b1b1b1" size="8"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
props: {
|
||||
list: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
data: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
eeInfoseries(e) {
|
||||
uni.pro.navigateTo('mall/series', {
|
||||
id: e.id,
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.clothingmetals {
|
||||
padding: 32rpx 28rpx 0rpx 28rpx;
|
||||
|
||||
.clothingmetalsitem {
|
||||
position: relative;
|
||||
width: 48%;
|
||||
height: 194rpx;
|
||||
|
||||
.clothingmetalsitemimage {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 194rpx;
|
||||
}
|
||||
|
||||
.clothingmetalsitem_text {
|
||||
position: absolute;
|
||||
left: 20rpx;
|
||||
top: 20rpx;
|
||||
text:nth-child(1) {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #679D96;
|
||||
}
|
||||
text:nth-child(2) {
|
||||
margin-top: 2rpx;
|
||||
font-size: 16rpx;
|
||||
font-family: Roboto, Roboto;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
.clothingmetalsitem_box{
|
||||
position: absolute;
|
||||
left: 20rpx;
|
||||
text-align: center;
|
||||
bottom: 20rpx;
|
||||
width: 128rpx;
|
||||
height: 40rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 20rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
281
pages/index/components/index.vue
Normal file
281
pages/index/components/index.vue
Normal file
@@ -0,0 +1,281 @@
|
||||
<template>
|
||||
<view class="index">
|
||||
<!-- <navbar :Background='Background' :navtitle='navtitle' :navboxshow="navboxshow" @fatherMethod='fatherMethod'>
|
||||
</navbar> -->
|
||||
<view class="content">
|
||||
<view class="content_item flex-between" v-for="(item,index) in list" :key="index" @click="eeInfo(item)">
|
||||
<view class="content_itemone flex-start">
|
||||
<image :src="item.avatar" mode="aspectFill"></image>
|
||||
<view class="content_itemonetext flex-colum-start">
|
||||
<view class="content_itemonetextone">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<!-- <view class="content_itemonetexttow">
|
||||
<text>5.0分</text>
|
||||
<text>销量</text>
|
||||
</view> -->
|
||||
<view class="content_itemonetextthere">
|
||||
{{item.label}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_itemtow">
|
||||
{{item.distance}}
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="list.length==0 && is_end == true" class="flex-colum">
|
||||
<image :src="bgnothave" mode="aspectFill">
|
||||
</image>
|
||||
</view>
|
||||
<u-loadmore :status="form.status" />
|
||||
|
||||
</view>
|
||||
<bottombbar :valuebbar='0'></bottombbar>
|
||||
</view>
|
||||
</template>
|
||||
<!-- https://cdn.uviewui.com/uview/resources/3c56cbc6216b47db61e37090fdb6619.jpg -->
|
||||
<script>
|
||||
import navbar from '@/components/navbar.vue'
|
||||
import bottombbar from '@/components/bottombbar.vue'
|
||||
export default {
|
||||
components: {
|
||||
navbar,
|
||||
bottombbar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
navtitle: '美发店', //名称
|
||||
navboxshow: '0', //显示
|
||||
Background: '#fff',
|
||||
list: [],
|
||||
bgnothave:uni.getStorageSync('bgnothave'),
|
||||
is_end: false,
|
||||
lng: '108.95399',
|
||||
lat: '34.30997',
|
||||
form: {
|
||||
page: 1,
|
||||
status: 'loadmore',
|
||||
},
|
||||
}
|
||||
},
|
||||
async onLoad(e) {
|
||||
await this.$onLaunched
|
||||
// #ifdef MP-WEIXIN
|
||||
this.getAuthorizeInfo() //获取位置请求 金纬度
|
||||
// #endif
|
||||
uni.pro.navigateTo('index/indexInfo')
|
||||
if (!uni.getStorageSync('loginuser')) { //未登录状态
|
||||
this.userlogin()
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
|
||||
this.positionindex()
|
||||
},
|
||||
onReachBottom() {
|
||||
this.positionindex()
|
||||
},
|
||||
methods: {
|
||||
// 用户授权
|
||||
getAuthorizeInfo() {
|
||||
uni.authorize({
|
||||
scope: 'scope.userLocation',
|
||||
success: () => {
|
||||
// 允许授权
|
||||
this.getLocationInfo();
|
||||
},
|
||||
fail: () => {
|
||||
// 拒绝授权
|
||||
this.openConfirm();
|
||||
}
|
||||
})
|
||||
},
|
||||
eeInfo(e) { //跳转
|
||||
console.log(e)
|
||||
uni.cache.set('store_id', e.id) // 判断显示哪家的作品
|
||||
uni.cache.set('details_id', e)
|
||||
uni.pro.navigateTo('index/indexInfo')
|
||||
},
|
||||
// 获取地理位置
|
||||
getLocationInfo() {
|
||||
uni.getLocation({
|
||||
type: 'wgs84',
|
||||
success: (res) => {
|
||||
this.lng = res.longitude
|
||||
this.lat = res.latitude
|
||||
this.positionindex()
|
||||
},
|
||||
fail: (err) => {
|
||||
this.positionindex()
|
||||
console.log(err, '获取错误')
|
||||
}
|
||||
});
|
||||
},
|
||||
// 再次获取授权。当用户第一次拒绝后再次请求授权
|
||||
openConfirm() {
|
||||
uni.showModal({
|
||||
title: '请求授权当前位置',
|
||||
content: '需要获取您的地理位置,请确认授权',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
uni.openSetting(); // 打开地图权限设置
|
||||
} else if (res.cancel) {
|
||||
uni.showToast({
|
||||
title: '你拒绝了授权,无法获得周边位置信息',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
})
|
||||
this.positionindex()
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
async userlogin() {
|
||||
let res = await this.api.userlogin({
|
||||
code: uni.cache.get('weixincode'),
|
||||
// #ifdef H5
|
||||
code: '0c3KOzFa1lkuMF0enAHa1Eu2xG1KOzFJ'
|
||||
// #endif
|
||||
})
|
||||
try {
|
||||
if (res) {
|
||||
uni.cache.set('loginuser', res);
|
||||
this.positionindex()
|
||||
} else {
|
||||
uni.cache.set('loginuser', 0);
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
},
|
||||
async positionindex() {
|
||||
let res = await this.api.positionindex({
|
||||
lng: this.lng,
|
||||
lat: this.lat,
|
||||
page: this.form.page,
|
||||
})
|
||||
if (res.length == 0) {
|
||||
this.is_end = true
|
||||
this.form.status = 'nomore'
|
||||
return false;
|
||||
} else {
|
||||
this.form.status = 'loading';
|
||||
this.form.page = ++this.form.page;
|
||||
setTimeout(() => {
|
||||
this.list = [...this.list, ...res];
|
||||
if (res.length == 10) {
|
||||
this.form.status = 'loading';
|
||||
} else {
|
||||
this.is_end = true;
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
}, 500)
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #f9f9f9;
|
||||
}
|
||||
|
||||
.index {
|
||||
.content {
|
||||
padding: 0 28rpx;
|
||||
|
||||
.content_item {
|
||||
border-radius: 12rpx;
|
||||
background: #fff;
|
||||
margin-top: 20rpx;
|
||||
padding: 28rpx 24rpx;
|
||||
|
||||
.content_itemone {
|
||||
image {
|
||||
width: 150rpx;
|
||||
height: 150rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.content_itemonetext {
|
||||
width: 300rpx;
|
||||
margin-left: 16rpx;
|
||||
height: 140rpx;
|
||||
justify-content: space-evenly;
|
||||
|
||||
.content_itemonetextone {
|
||||
max-width: 300rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.content_itemonetexttow {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
|
||||
text:nth-child(1) {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #f37f2f;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
margin-left: 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #585858;
|
||||
}
|
||||
}
|
||||
|
||||
.content_itemonetextthere {
|
||||
max-width: 300rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: 500;
|
||||
padding: 5rpx 8rpx;
|
||||
border-radius: 10rpx;
|
||||
border: 1rpx solid #b1b1b1;
|
||||
color: #b1b1b1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content_itemtow {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.flex-colum_image {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
|
||||
text {
|
||||
margin-top: 30rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
97
pages/index/components/popula/index.vue
Normal file
97
pages/index/components/popula/index.vue
Normal file
@@ -0,0 +1,97 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="fourcontent">
|
||||
<u-scroll-list indicatorActiveColor="#6C6E8D" indicatorWidth='40' :indicator="false">
|
||||
<view class="scrollfourcontent" v-for="(item, index) in list" :key="index"
|
||||
@click="eeInfo(item)">
|
||||
<view class="scrollfourcontenttitem flex-colum">
|
||||
<image class="scrolltowcontentitem_image" :src="item.img" mode="aspectFill"></image>
|
||||
<view class="scrolltowcontentitem_one">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="scrolltowcontentitem_tow">
|
||||
{{item.price}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-scroll-list>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
props: {
|
||||
list: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
data: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
eeInfo(e) { //热门项目
|
||||
uni.pro.navigateTo('order/orderInfo', {
|
||||
id: e.id,
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.fourcontent {
|
||||
margin-left: 8rpx;
|
||||
|
||||
.scrollfourcontent {
|
||||
padding: 22rpx 0;
|
||||
|
||||
.scrollfourcontenttitem {
|
||||
width: 280rpx;
|
||||
margin-left: 30rpx;
|
||||
align-items: flex-start;
|
||||
padding-bottom: 16rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 4rpx 6rpx 2px rgba(0, 0, 0, 0.16);
|
||||
border-radius: 18rpx;
|
||||
|
||||
.scrolltowcontentitem_image {
|
||||
border-top-left-radius: 18rpx;
|
||||
border-top-right-radius: 18rpx;
|
||||
width: 280rpx;
|
||||
height: 292rpx;
|
||||
}
|
||||
|
||||
.scrolltowcontentitem_one {
|
||||
padding-left: 16rpx;
|
||||
padding-top: 16rpx;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #28292D;
|
||||
}
|
||||
|
||||
.scrolltowcontentitem_tow {
|
||||
margin-left: 16rpx;
|
||||
margin-top: 8rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Roboto-Bold, Roboto;
|
||||
font-weight: bold;
|
||||
color: #F45C4C;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
95
pages/index/components/recommend/index.vue
Normal file
95
pages/index/components/recommend/index.vue
Normal file
@@ -0,0 +1,95 @@
|
||||
<template>
|
||||
<view class="index">
|
||||
<view class="onecontenttowone flex-start">
|
||||
<view class="onecontenttowone_one">
|
||||
{{title}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="indexbox flex-between">
|
||||
<image class="indexboxone" @click="eeInfoseries(list[0].mother_id)" :src="list[0].mother_img" mode="widthFix"></image>
|
||||
<view class="flex-colum-start">
|
||||
<image class="indexboxtow" @click="eeInfoseries(list[1].mother_id)" :src="list[1].mother_img" mode="widthFix"></image>
|
||||
<image class="indexboxthere" @click="eeInfoseries(list[2].mother_id)" :src="list[2].mother_img" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
props: {
|
||||
list: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '银收客'
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
eeInfoseries(e) {
|
||||
uni.pro.navigateTo('mall/series', {
|
||||
id: e.id,
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.index {
|
||||
width: 100%;
|
||||
padding: 32rpx 32rpx 0 32rpx;
|
||||
|
||||
.onecontenttowone::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 4rpx;
|
||||
height: 20rpx;
|
||||
background: var(--bg-color-buttonone);
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.onecontenttowone {
|
||||
.onecontenttowone_one {
|
||||
margin-left: 8rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
}
|
||||
|
||||
.indexbox {
|
||||
margin-top: 24rpx;
|
||||
|
||||
.indexboxone {
|
||||
width: 336rpx;
|
||||
height: 400rpx;
|
||||
}
|
||||
|
||||
.flex-colum-start {
|
||||
justify-content: space-between;
|
||||
height: 400rpx;
|
||||
|
||||
.indexboxtow {
|
||||
width: 334rpx;
|
||||
height: 188rpx;
|
||||
}
|
||||
|
||||
.indexboxthere {
|
||||
margin-top: 28rpx;
|
||||
width: 334rpx;
|
||||
height: 188rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
181
pages/index/components/salezone/index.vue
Normal file
181
pages/index/components/salezone/index.vue
Normal file
@@ -0,0 +1,181 @@
|
||||
<template>
|
||||
<view class="index">
|
||||
<view class="onecontenttowone flex-start">
|
||||
<view class="onecontenttowone_one">
|
||||
{{title}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="indexbox">
|
||||
<view class="indexboxitem flex-start" v-for="(item,index) in list" :key="index">
|
||||
<image class="indexboxitemimage" :src="item.host_img" mode="aspectFill"></image>
|
||||
<view class="indexboxitemleft flex-colum-start">
|
||||
<view class="indexboxitemleftone">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="indexboxitemlefttow">
|
||||
{{item.intro}}
|
||||
</view>
|
||||
<view class="indexboxitemleftthere flex-start">
|
||||
<view class="indexboxitemleftthere_one">
|
||||
<text>¥</text>
|
||||
<text>{{item.price}}</text>
|
||||
</view>
|
||||
<view class="indexboxitemleftthere_tow">
|
||||
¥{{item.y_price}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="indexboxitembox" @click="mallInfoInfo(item)">
|
||||
立即抢购
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
props: {
|
||||
list: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '银收客'
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
mallInfoInfo(e) { //查看订单详情
|
||||
uni.pro.navigateTo('mall/mallInfo', {
|
||||
id: e.id,
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.index {
|
||||
width: 100%;
|
||||
padding: 32rpx;
|
||||
|
||||
.onecontenttowone::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 4rpx;
|
||||
height: 20rpx;
|
||||
background: var(--bg-color-buttonone);
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.onecontenttowone {
|
||||
.onecontenttowone_one {
|
||||
margin-left: 8rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
}
|
||||
|
||||
.indexbox {
|
||||
.indexboxitem {
|
||||
margin-top: 24rpx;
|
||||
position: relative;
|
||||
padding: 24rpx;
|
||||
width: 100%;
|
||||
height: 212rpx;
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 6rpx 12rpx 2rpx rgba(0, 0, 0, 0.16);
|
||||
border-radius: 18rpx;
|
||||
|
||||
.indexboxitemimage {
|
||||
width: 164rpx;
|
||||
height: 164rpx;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.indexboxitemleft {
|
||||
height: 164rpx;
|
||||
margin-left: 12rpx;
|
||||
width: 60%;
|
||||
|
||||
.indexboxitemleftone {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.indexboxitemlefttow {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
margin-top: 12rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.indexboxitemleftthere {
|
||||
margin-top: 20rpx;
|
||||
align-items: flex-end;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
.indexboxitemleftthere_one {
|
||||
font-size: 34rpx;
|
||||
font-family: SourceHanSansCN-Bold, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #FC5F69;
|
||||
|
||||
text:nth-child(1) {
|
||||
font-size: 24rpx;
|
||||
font-family: SourceHanSansCN-Bold, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #FC5F69;
|
||||
}
|
||||
}
|
||||
|
||||
.indexboxitemleftthere_tow {
|
||||
text-decoration: line-through;
|
||||
margin-left: 12rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: SourceHanSansCN-Regular, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.indexboxitembox {
|
||||
position: absolute;
|
||||
right: 24rpx;
|
||||
bottom: 24rpx;
|
||||
background: var(--bgbuttonqq);
|
||||
border-radius: 24rpx;
|
||||
padding: 8rpx 22rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: SourceHanSansCN-Bold, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
182
pages/index/components/specials/index.vue
Normal file
182
pages/index/components/specials/index.vue
Normal file
@@ -0,0 +1,182 @@
|
||||
<template>
|
||||
<view class="index">
|
||||
<view class="indexbox">
|
||||
<image class="indexboximage" :src="img" mode=""></image>
|
||||
<view class="indexbox_box">
|
||||
<view class="indexbox_boxtop flex-between" @click="specials">
|
||||
<view class="indexbox_boxtopone">
|
||||
{{title}}
|
||||
</view>
|
||||
<view class="indexbox_boxtoptow">
|
||||
更多<text>></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="indexbox_boxitem flex-between">
|
||||
<view class="indexbox_boxitem_item flex-colum-start" v-for="(item,index) in list" :key="index"
|
||||
@click="mallInfoInfo(item)">
|
||||
<view class="indexbox_boxitem_itemimage">
|
||||
<image :src="item.host_img" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="indexbox_boxitem_itemone">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="indexbox_boxitem_itemtow flex-start">
|
||||
<text>¥</text>
|
||||
<text>{{item.price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
props: {
|
||||
list: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: '每日特价'
|
||||
},
|
||||
img: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
specials(e) { //查看订单详情
|
||||
uni.pro.navigateTo('index/specials', {
|
||||
id: e.id,
|
||||
})
|
||||
},
|
||||
mallInfoInfo(e) { //查看订单详情
|
||||
uni.pro.navigateTo('mall/mallInfo', {
|
||||
id: e.id,
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.index {
|
||||
.indexbox {
|
||||
margin: 32rpx 28rpx 0 28rpx;
|
||||
position: relative;
|
||||
height: 378rpx;
|
||||
|
||||
.indexboximage {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 378rpx;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.indexbox_box {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 2;
|
||||
padding: 16rpx;
|
||||
|
||||
.indexbox_boxtop {
|
||||
margin-top: 8rpx;
|
||||
width: 100%;
|
||||
|
||||
.indexbox_boxtopone {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.indexbox_boxtoptow {
|
||||
font-size: 18rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #FD6C60;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx;
|
||||
padding: 6rpx 16rpx;
|
||||
|
||||
text {
|
||||
font-size: 16rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.indexbox_boxitem {
|
||||
margin-top: 16rpx;
|
||||
padding: 16rpx 12rpx;
|
||||
background: #ffffff;
|
||||
|
||||
.indexbox_boxitem_item {
|
||||
.indexbox_boxitem_itemimage {
|
||||
width: 148rpx;
|
||||
height: 148rpx;
|
||||
background: #F8F8F8;
|
||||
border-radius: 8rpx;
|
||||
|
||||
image {
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.indexbox_boxitem_itemone {
|
||||
width: 148rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-top: 8rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.indexbox_boxitem_itemtow {
|
||||
margin-top: 12rpx;
|
||||
padding-right: 10rpx;
|
||||
justify-content: flex-end;
|
||||
background: url(@/static/imge/specials.png) no-repeat;
|
||||
background-size: cover;
|
||||
width: 148rpx;
|
||||
height: 48rpx;
|
||||
font-family: Roboto, Roboto;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
|
||||
text {
|
||||
height: 48rpx;
|
||||
}
|
||||
|
||||
text:nth-child(1) {
|
||||
line-height: 50rpx;
|
||||
font-size: 16rpx;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
line-height: 48rpx;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
194
pages/index/components/vipclass/index.vue
Normal file
194
pages/index/components/vipclass/index.vue
Normal file
@@ -0,0 +1,194 @@
|
||||
<template>
|
||||
<view class="">
|
||||
<view class="theretowcontent flex-between">
|
||||
<view class="theretowcontent_item flex-colum" v-for="(item,index) in list" :key="index"
|
||||
@click="clickmemberinfos(item)">
|
||||
<view :class="index == 0?'theretowcontent_item_one':'theretowcontent_item_ones'">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view :class="index == 0?'theretowcontent_item_tow':'theretowcontent_item_tows'">
|
||||
¥{{item.price}}/<text>{{item.frequ}}次</text>
|
||||
</view>
|
||||
<view :class="index == 0?'theretowcontent_item_there':'theretowcontent_item_theres'">
|
||||
({{item.show}})
|
||||
</view>
|
||||
<view :class="index == 0?'theretowcontent_item_box':'theretowcontent_item_boxs'">
|
||||
{{item.is_user_sec == '0'?'购买':'加购'}}
|
||||
</view>
|
||||
<image class="theretowcontent_item_image" :src="item.img" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
props: {
|
||||
list: {
|
||||
type: Array,
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
data: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
|
||||
},
|
||||
methods: {
|
||||
clickmemberinfos(e) { //购买会员卡
|
||||
if (e.is_user_sec == 0) {
|
||||
uni.pro.navigateTo('my/member/memberinfos', {
|
||||
id: e.id,
|
||||
})
|
||||
// async toworder() { //会员卡
|
||||
// let res = await this.api.userreceivebalancecar({
|
||||
// store_id: uni.cache.get('store_id') // 判断显示哪家的作品
|
||||
// })
|
||||
// uni.showToast({
|
||||
// title: '领取成功',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// setTimeout(() => {
|
||||
// uni.pro.navigateTo('my/member/index')
|
||||
// }, 1500);
|
||||
// },
|
||||
} else {
|
||||
uni.pro.navigateTo('my/member/memberinfo', {
|
||||
id: e.id,
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.theretowcontent {
|
||||
width: 100%;
|
||||
padding: 24rpx 32rpx;
|
||||
|
||||
.theretowcontent_item {
|
||||
padding: 16rpx;
|
||||
width: 48%;
|
||||
border-radius: 10rpx;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
|
||||
.theretowcontent_item_one {
|
||||
width: 55%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.theretowcontent_item_ones {
|
||||
width: 55%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #422A07;
|
||||
}
|
||||
|
||||
.theretowcontent_item_tow {
|
||||
margin-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Roboto-Regular, Roboto;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
|
||||
text {
|
||||
font-size: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.theretowcontent_item_tows {
|
||||
margin-top: 20rpx;
|
||||
font-family: Roboto-Regular, Roboto;
|
||||
font-weight: 400;
|
||||
color: #422A07;
|
||||
font-size: 28rpx;
|
||||
|
||||
text {
|
||||
font-size: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.theretowcontent_item_there {
|
||||
margin-top: 6rpx;
|
||||
font-size: 20rpx;
|
||||
width: 100%;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #D1CECE;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.theretowcontent_item_theres {
|
||||
margin-top: 6rpx;
|
||||
font-size: 20rpx;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #422A07;
|
||||
}
|
||||
|
||||
.theretowcontent_item_box {
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
right: 16rpx;
|
||||
padding: 6rpx 26rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Roboto-Bold, Roboto;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.73) 0%, rgba(128, 128, 128, 0.73) 100%);
|
||||
box-shadow: 0px 6px 12rpx 2rpx rgba(49, 47, 47, 0.85);
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.theretowcontent_item_boxs {
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
right: 16rpx;
|
||||
padding: 6rpx 26rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Roboto-Bold, Roboto;
|
||||
font-weight: bold;
|
||||
color: #F6AE5B;
|
||||
background: linear-gradient(180deg, #F9F9F9 0%, #FADAB5 100%);
|
||||
box-shadow: 0px 6rpx 12rpx 2px rgba(226, 172, 110, 0.55);
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.theretowcontent_item_image {
|
||||
border-radius: 16rpx;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: -1;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
1163
pages/index/hotel.vue
Normal file
1163
pages/index/hotel.vue
Normal file
File diff suppressed because it is too large
Load Diff
665
pages/index/index.vue
Normal file
665
pages/index/index.vue
Normal file
@@ -0,0 +1,665 @@
|
||||
<template>
|
||||
<view class="index" :style="[theme]">
|
||||
<view class="onecontent" v-if="listswiper.length != 0">
|
||||
<u-swiper indicator :list="listswiper" indicatorMode='dot' height='144' radius='12'></u-swiper>
|
||||
</view>
|
||||
<!-- clothingmetals服装金刚区 -->
|
||||
<clothingmetals v-if="list.goods_type.length != 0 && model_type == 'Dress'" :list='list.goods_type'>
|
||||
</clothingmetals>
|
||||
<!-- clothingmetals鲜花服装金刚区 -->
|
||||
<flower v-if="list.goods_type.length != 0 && model_type == 'Flower'" :list='list.goods_type'></flower>
|
||||
<!-- 每日特价 -->
|
||||
<specials v-if="list.special.data.length != 0" :img='list.special.img' :list='list.special.data'
|
||||
:title='list.special.title'></specials>
|
||||
<!-- 限时抢购 -->
|
||||
<flashsale v-if="list.panic.data.length != 0" :title='list.panic.title' :list='list.panic.data'></flashsale>
|
||||
<!-- 热榜推荐-->
|
||||
<view class="contentclothing" v-if="list.is_re.img != null" style="margin-top: 16rpx;">
|
||||
<view class="contentclothingimage" v-if="list.is_re.img != null">
|
||||
<image :src="list.is_re.img" mode="aspectFill"></image>
|
||||
</view>
|
||||
<clothing v-if="list.is_re.data.length != 0" :list='list.is_re.data'></clothing>
|
||||
</view>
|
||||
<!-- 优秀好员工第一份 -->
|
||||
<view v-if="list.people.length != 0" style="margin-top: 16rpx;">
|
||||
<view class="contenttext">
|
||||
<text class="contenttexttext">{{list.position_nickname || ''}}</text>
|
||||
</view>
|
||||
<employees :list='list.people' :bgbutton='theme.bgbutton'></employees>
|
||||
</view>
|
||||
<!-- 优秀好员工第二份 -->
|
||||
<view v-if="list.people_two.length != 0">
|
||||
<view class="contenttext">
|
||||
<text class="contenttexttext">{{list.position_nickname_two || ''}}</text>
|
||||
</view>
|
||||
<employees :list='list.people_two' :bgbutton='theme.bgbutton'></employees>
|
||||
</view>
|
||||
<!-- 会员卡 -->
|
||||
<vipclass v-if="list.vip.length != 0" :list='list.vip'></vipclass>
|
||||
<!-- 热门推荐 -->
|
||||
<recommend :title='list.mother_goods_type.title' :list='list.mother_goods_type.data'
|
||||
v-if="list.mother_goods_type.data.length != 0"></recommend>
|
||||
<!-- 秒杀专区 -->
|
||||
<salezone :title='list.goods.title' :list='list.goods.data' v-if="list.goods.data.length != 0"></salezone>
|
||||
<!-- 热门项目 -->
|
||||
<view v-if="list.service.length != 0" style="margin-top: 16rpx;">
|
||||
<view class="contenttext">
|
||||
<text class="contenttexttext">热门项目</text>
|
||||
</view>
|
||||
<popula :list='list.service'></popula>
|
||||
</view>
|
||||
|
||||
<bottombbar :valuebbar='0'></bottombbar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dayjs from 'dayjs'
|
||||
import bottombbar from '@/components/bottombbar.vue'
|
||||
import clothingmetals from './components/clothingmetals/index.vue'
|
||||
import employees from './components/employees/index.vue'
|
||||
import clothing from './components/clothing/index.vue'
|
||||
import flower from './components/flower/index.vue'
|
||||
import vipclass from './components/vipclass/index.vue'
|
||||
import recommend from './components/recommend/index.vue'
|
||||
import salezone from './components/salezone/index.vue'
|
||||
import popula from './components/popula/index.vue'
|
||||
import specials from './components/specials/index.vue'
|
||||
import flashsale from './components/flashsale/index.vue'
|
||||
export default {
|
||||
components: {
|
||||
bottombbar,
|
||||
clothingmetals,
|
||||
employees,
|
||||
clothing,
|
||||
flower,
|
||||
recommend,
|
||||
salezone,
|
||||
popula,
|
||||
vipclass,
|
||||
specials,
|
||||
flashsale
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
model_type: '',
|
||||
indicators: false,
|
||||
list: {
|
||||
vip: [],
|
||||
service: [],
|
||||
people: [],
|
||||
people_two: [],
|
||||
goods_type: [],
|
||||
mother_goods_type: {
|
||||
data: [],
|
||||
img: null
|
||||
},
|
||||
goods: {
|
||||
data: [],
|
||||
img: null
|
||||
},
|
||||
special: {
|
||||
data: [],
|
||||
img: '',
|
||||
title: '每日特价'
|
||||
},
|
||||
panic: {
|
||||
data: [],
|
||||
title: '限时抢购'
|
||||
},
|
||||
theme_re: {
|
||||
data: [],
|
||||
img: null
|
||||
},
|
||||
is_re: {
|
||||
data: [],
|
||||
img: null
|
||||
},
|
||||
new: {
|
||||
data: [],
|
||||
img: null
|
||||
}
|
||||
},
|
||||
listswiper: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
async onLoad(e) {
|
||||
// #ifdef H5
|
||||
await this.$onLaunched
|
||||
// #endif
|
||||
try {
|
||||
if (e.scene) {
|
||||
uni.cache.set('store_id', e.scene) // 判断显示哪家的作品
|
||||
this.userloginss() //刷新初始数据
|
||||
} else {
|
||||
// #ifdef MP-WEIXIN || MP-ALIPAY
|
||||
if (!uni.cache.get('loginuser').userinfo) {
|
||||
this.userloginss() //刷新初始数据
|
||||
} else {
|
||||
this.indexnewappclassindex()
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
} catch (e) {}
|
||||
// #ifdef H5
|
||||
let res = await this.api.userlogin({
|
||||
code: '0c3KOzFa1lkuMF0enAHa1Eu2xG1KOzFJ',
|
||||
store_id: 65, // 判断显示哪家的作品
|
||||
//【2,美容】【62,美发】【63,健身】【65,口腔】【66,足疗按摩】【89,社区】
|
||||
//【72,宠物生活】【74,婚纱摄影】【79,服装】【80,鲜花】【82, 送水】【88, 母婴】【99, 酒店】
|
||||
})
|
||||
if (res) {
|
||||
if (res.model_type == 'Hotel') {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/hotel'
|
||||
});
|
||||
}
|
||||
uni.cache.set('loginuser', res);
|
||||
uni.cache.set('store_id', res.store_id) // 判断显示哪家的2
|
||||
uni.cache.set('openId', res.userinfo.open_id);
|
||||
this.indexnewappclassindex()
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
onShow() {
|
||||
if (uni.getStorageSync('loginuser').model_type == 'Hotel') {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/hotel'
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
click1(a, e) { //优秀员工跳转
|
||||
uni.pro.navigateTo('order/orderInfos', {
|
||||
id: a.id,
|
||||
})
|
||||
},
|
||||
async userloginss() {
|
||||
// #ifdef MP-WEIXIN || MP-ALIPAY
|
||||
uni.login({ //alipay weixin
|
||||
// #ifdef MP-ALIPAY
|
||||
provider: 'alipay',
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
provider: 'weixin',
|
||||
// #endif
|
||||
success: async (data) => {
|
||||
console.log(data)
|
||||
try {
|
||||
uni.cache.set('weixincode', data.code);
|
||||
let res = await this.api.userlogin({
|
||||
code: uni.cache.get('weixincode'),
|
||||
store_id: uni.cache.get('store_id') // 判断显示哪家的作品
|
||||
})
|
||||
if (res) {
|
||||
if (res.model_type == 'Hotel') {
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/hotel'
|
||||
});
|
||||
}
|
||||
uni.cache.set('loginuser', res);
|
||||
uni.cache.set('store_id', res.store_id) // 判断显示哪家的作品
|
||||
uni.cache.set('openId', res.userinfo.open_id);
|
||||
// uni.pro.navigateTo('order/orderInfos')
|
||||
this.indexnewappclassindex()
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
|
||||
},
|
||||
async clickmemberinfos(e) { //购买会员卡
|
||||
if (e.is_user_sec == 0) {
|
||||
uni.pro.navigateTo('my/member/memberinfos', {
|
||||
id: e.id,
|
||||
})
|
||||
// async toworder() { //会员卡
|
||||
// let res = await this.api.userreceivebalancecar({
|
||||
// store_id: uni.cache.get('store_id') // 判断显示哪家的作品
|
||||
// })
|
||||
// uni.showToast({
|
||||
// title: '领取成功',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// setTimeout(() => {
|
||||
// uni.pro.navigateTo('my/member/index')
|
||||
// }, 1500);
|
||||
// },
|
||||
} else {
|
||||
uni.pro.navigateTo('my/member/memberinfo', {
|
||||
id: e.id,
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
mallInfoInfo(e) { //查看订单详情
|
||||
uni.pro.navigateTo('mall/mallInfo', {
|
||||
id: e.id,
|
||||
})
|
||||
},
|
||||
|
||||
eeInfoseries(e) {
|
||||
uni.pro.navigateTo('mall/series', {
|
||||
id: e.goods_type_id,
|
||||
})
|
||||
},
|
||||
async indexnewappclassindex() { //首页数据
|
||||
let res = await this.api.indexnewappclassindex({
|
||||
store_id: uni.cache.get('store_id')
|
||||
})
|
||||
try {
|
||||
if (res) {
|
||||
//前端模拟数据
|
||||
this.list = res
|
||||
if (res.vip) { //会员卡
|
||||
this.list.vip = res.vip
|
||||
} else {
|
||||
this.list.vip = []
|
||||
}
|
||||
if (res.people_two) { ///优秀员工2
|
||||
this.list.people_two = res.people_two
|
||||
} else {
|
||||
this.list.people_two = []
|
||||
}
|
||||
if (res.service) { //热门项目
|
||||
this.list.service = res.service
|
||||
} else {
|
||||
this.list.service = []
|
||||
}
|
||||
if (res.people) { //优秀员工1
|
||||
this.list.people = res.people
|
||||
} else {
|
||||
this.list.people = []
|
||||
}
|
||||
if (res.store.bananer) { //轮播
|
||||
this.listswiper = res.store.bananer
|
||||
} else {
|
||||
this.listswiper = []
|
||||
}
|
||||
if (res.mother_goods_type) { //热门推荐 母婴
|
||||
this.list.mother_goods_type = res.mother_goods_type
|
||||
} else {
|
||||
this.$set(this.list, 'mother_goods_type', {
|
||||
img: null,
|
||||
data: []
|
||||
})
|
||||
}
|
||||
if (res.goods) { //秒杀专区
|
||||
this.list.goods = res.goods
|
||||
} else {
|
||||
this.$set(this.list, 'goods', {
|
||||
img: null,
|
||||
data: []
|
||||
})
|
||||
}
|
||||
if (res.special) { //每日特价
|
||||
this.list.special = res.special
|
||||
this.list.special.data = res.special.data.slice(0, 4)
|
||||
} else {
|
||||
this.$set(this.list, 'special', {
|
||||
img: null,
|
||||
title: '每日特价',
|
||||
data: []
|
||||
})
|
||||
}
|
||||
if (res.panic) { //限时抢购
|
||||
this.list.panic = res.panic
|
||||
var dates = new Date().getTime();
|
||||
let recommendList = this.list.panic.data;
|
||||
recommendList.forEach((item, index) => {
|
||||
var leftTime = item.end_time - dates; //计算两日期之间相差的毫秒数
|
||||
if (leftTime >= 0) {
|
||||
let d = Math.floor(leftTime / 1000 / 60 / 60 / 24);
|
||||
let h = Math.floor(leftTime / 1000 / 60 / 60 % 24);
|
||||
let m = Math.floor(leftTime / 1000 / 60 % 60);
|
||||
let s = Math.floor(leftTime / 1000 % 60);
|
||||
item.end_times = {
|
||||
d: d,
|
||||
h: h,
|
||||
m: m,
|
||||
s: s
|
||||
}
|
||||
} else {
|
||||
item.end_times = 0
|
||||
}
|
||||
})
|
||||
this.list.panic.data = recommendList
|
||||
} else {
|
||||
this.$set(this.list, 'panic', {
|
||||
title: '限时抢购',
|
||||
data: []
|
||||
})
|
||||
}
|
||||
if (res.theme_re) { //服装
|
||||
this.list.theme_re = res.theme_re
|
||||
} else {
|
||||
this.$set(this.list, 'theme_re', {
|
||||
img: null,
|
||||
data: []
|
||||
})
|
||||
}
|
||||
if (res.discount) { //服装
|
||||
this.list.discount = res.discount
|
||||
} else {
|
||||
this.$set(this.list, 'new', {
|
||||
discount: null,
|
||||
})
|
||||
}
|
||||
if (res.new) { //服装
|
||||
this.list.new = res.new
|
||||
} else {
|
||||
this.$set(this.list, 'new', {
|
||||
img: null,
|
||||
data: []
|
||||
})
|
||||
}
|
||||
if (res.goods_type) { //服装金刚区
|
||||
this.list.goods_type = res.goods_type
|
||||
} else {
|
||||
this.$set(this.list, 'goods_type', [])
|
||||
}
|
||||
if (res.is_re) { //服装
|
||||
this.list.is_re = res.is_re
|
||||
} else {
|
||||
this.$set(this.list, 'is_re', {
|
||||
img: null,
|
||||
data: []
|
||||
})
|
||||
}
|
||||
uni.cache.set('store_id', res.store.id) // 返回的id
|
||||
if (uni.cache.get('store_id')) { //store_id 行业id
|
||||
this.$store.dispatch("actionsclassification");
|
||||
}
|
||||
uni.setNavigationBarTitle({ //定义标题
|
||||
title: res.store.title
|
||||
});
|
||||
this.model_type = uni.cache.get('loginuser').model_type //类别分类
|
||||
|
||||
// this.list.describe = res.describe.replace(/\<img/g,
|
||||
// '<img style="max-width:100%;height:auto" ');
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
::v-deep .u-scroll-list__indicator {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.index {
|
||||
.onecontent {
|
||||
padding: 0 32rpx;
|
||||
}
|
||||
|
||||
.contentclothing {
|
||||
padding: 8rpx 32rpx;
|
||||
width: 100%;
|
||||
|
||||
.contentclothingimageclassimagebuya {
|
||||
width: auto;
|
||||
margin: 48rpx 0;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.contentclothingimageclass {
|
||||
margin-top: 50rpx;
|
||||
|
||||
.contentclothingclassimage {
|
||||
width: 224.35rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
.contentclothingimageclassbox {
|
||||
position: relative;
|
||||
margin-top: 18rpx;
|
||||
width: 100%;
|
||||
background: #ABAD98;
|
||||
border-radius: 18rpx;
|
||||
border: 2rpx solid #404136;
|
||||
padding: 28rpx 18rpx;
|
||||
|
||||
.contentclothingimageclassboxitem:nth-child(1) {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.contentclothingimageclassboxitem {
|
||||
position: relative;
|
||||
border-left: 1rpx dashed #fff;
|
||||
padding: 0 18rpx;
|
||||
|
||||
.contentclothingimageclassboxitemone {
|
||||
font-size: 48rpx;
|
||||
font-family: Roboto, Roboto;
|
||||
font-weight: bold;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.contentclothingimageclassboxitemtow {
|
||||
margin-left: 10rpx;
|
||||
|
||||
text:nth-child(1) {
|
||||
font-size: 16rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
font-size: 20rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
}
|
||||
|
||||
.contentclothingimageclassboxitemabsolute {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 18rpx;
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
text-align: center;
|
||||
font-size: 16rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
background: #7e8a83;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.contentclothingimageclassbox::after {
|
||||
z-index: 10;
|
||||
position: absolute;
|
||||
content: '';
|
||||
display: inline-block;
|
||||
left: -11px;
|
||||
bottom: 50%;
|
||||
transform: translateY(50%);
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
border-radius: 0 11px 11px 0;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.contentclothingimageclassbox::before {
|
||||
z-index: 10;
|
||||
position: absolute;
|
||||
content: '';
|
||||
display: inline-block;
|
||||
right: -11px;
|
||||
bottom: 50%;
|
||||
transform: translateY(50%);
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
border-radius: 11px 0 0 11px;
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.contentclothingimage {
|
||||
width: 130rpx;
|
||||
height: 52rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.contentclothingbox {
|
||||
.fourcontents {
|
||||
.scrollfourcontents {
|
||||
padding: 22rpx 0;
|
||||
|
||||
.scrollfourcontenttitems {
|
||||
width: 246rpx;
|
||||
height: 296rpx;
|
||||
margin-left: 30rpx;
|
||||
position: relative;
|
||||
|
||||
.scrolltowcontentitem_images {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 18rpx;
|
||||
}
|
||||
|
||||
.scrolltowcontentitem_ones {
|
||||
position: absolute;
|
||||
padding: 8rpx 10rpx;
|
||||
bottom: 12rpx;
|
||||
left: 14rpx;
|
||||
background: rgba(0, 0, 0, 0.32);
|
||||
border-radius: 20rpx;
|
||||
font-size: 18rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.contentclothingboxoone {
|
||||
.fourcontentsoneitem {
|
||||
width: 100%;
|
||||
margin-top: 24rpx;
|
||||
|
||||
.fourcontentsoneitemimage {
|
||||
width: 278rpx;
|
||||
border-radius: 18rpx;
|
||||
height: 194rpx;
|
||||
}
|
||||
|
||||
.fourcontentsoneitemtext {
|
||||
flex: 1;
|
||||
height: 194rpx;
|
||||
margin-left: 10rpx;
|
||||
|
||||
.fourcontentsoneitemtextone {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.fourcontentsoneitemtexttow {
|
||||
margin-top: 20rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fourcontentsoneitemtow {
|
||||
width: 100%;
|
||||
|
||||
.fourcontentsoneitemtowitem {
|
||||
margin-top: 32rpx;
|
||||
width: 330rpx;
|
||||
|
||||
.fourcontentsoneitemtowitemimage {
|
||||
border-radius: 18rpx;
|
||||
width: 330rpx;
|
||||
height: 356rpx;
|
||||
}
|
||||
|
||||
.fourcontentsoneitemtowitemone {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-top: 16rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.fourcontentsoneitemtowitemtow {
|
||||
margin-top: 10rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.contenttext {
|
||||
padding: 0 32rpx;
|
||||
|
||||
.contenttexttext {
|
||||
width: auto;
|
||||
position: relative;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.contenttexttext::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -5rpx;
|
||||
right: -6rpx;
|
||||
z-index: 0;
|
||||
display: inline-block;
|
||||
width: 118rpx;
|
||||
height: 10rpx;
|
||||
background: var(--bgbuttonbackground);
|
||||
border-radius: 8rpx;
|
||||
opacity: 0.6;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
600
pages/index/indexInfo.vue
Normal file
600
pages/index/indexInfo.vue
Normal file
@@ -0,0 +1,600 @@
|
||||
<template>
|
||||
<view class="index">
|
||||
<!-- <navbar :Background='Background' :navtitle='navtitle' :navMethodcan='1' :navboxshow="navboxshow"
|
||||
@fatherMethod='fatherMethod'>
|
||||
</navbar> -->
|
||||
<image class="index_top_imge" :src="list.store.background" mode="aspectFill"></image>
|
||||
<view class="index_box">
|
||||
<view class="oneindex_box">
|
||||
<view class="oneindex_box_image">
|
||||
<image :src="list.store.avatar" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="oneindex_box_text flex-start">
|
||||
<view class="oneindex_box_text_one">
|
||||
{{list.store.title}}
|
||||
</view>
|
||||
<view class="oneindex_box_text_tow flex-start">
|
||||
<u-rate :count="count" v-model="list.store.score" readonly active-color="#f1cb66"
|
||||
inactive-color="#F1CB66"></u-rate>
|
||||
<text class="oneindex_box_text_towtext">{{list.store.score}}.0</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="towindex_box_text flex-between">
|
||||
<view class="towindex_box_text_one">
|
||||
营业时间:{{list.store.b_hours}}
|
||||
</view>
|
||||
<view class="towindex_box_text_tow flex-start" @click="mobilemobile(list.store.mobile)">
|
||||
<u-icon name="phone-fill" color="#2ca248" size="20"></u-icon>
|
||||
<text>联系商家</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="towindex_box_dw flex-start" @click="openmap">
|
||||
<image src="@/static/positioning.png" mode="aspectFill"></image>
|
||||
<text style="margin-left: 12rpx;">{{list.store.address}}</text>
|
||||
</view>
|
||||
<view class="towindex_box_bouttn flex-start">
|
||||
<text v-for="(item,index) in list.store.label" :key="index">{{item}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="towindextow" @click="toworder()" v-if="list.is_balance_vip == 0">
|
||||
<image :src="list.vip_img" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="thereindexone flex-between">
|
||||
<view class="thereindexone_item flex-colum" v-for="(item,indexs) in list.store_type" :key="indexs"
|
||||
@click="clickthereindexone(item.id)">
|
||||
<image :src="item.img" mode="aspectFill"></image>
|
||||
<text>{{item.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fourindexone">
|
||||
<view class="fourindexone_one flex-center">
|
||||
<text class="fourindexone_one_o"></text>
|
||||
<text class="fourindexone_one-text">预约服务</text>
|
||||
<text class="fourindexone_one_T"></text>
|
||||
</view>
|
||||
<view class="fourindexone_box flex-colum" v-for="(item,index) in list.store_service" :key="index"
|
||||
@click="eeInfo(item)">
|
||||
<view class="fourindexone_item flex-start">
|
||||
<image class="fourindexone_itemimage" :src="item.img" mode="aspectFill"></image>
|
||||
<view class="fourindexone_itemview flex-colum-start">
|
||||
<view class="fourindexone_itemview_one">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="fourindexone_itemview_tow">
|
||||
{{item.describe}}
|
||||
</view>
|
||||
<view class="fourindexone_itemview_there flex-start">
|
||||
<view class="fourindexone_itemview_there_text">
|
||||
<text>¥</text>{{item.price}}
|
||||
</view>
|
||||
<view class="fourindexone_itemview_there_text_x">
|
||||
¥{{item.y_price}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fourindexone_item_there">
|
||||
立即预约
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fiveindexone">
|
||||
<view class="fiveindexonehtml" v-html="list.describe">
|
||||
</view>
|
||||
<view class="sixindex" @click="clickthereindexone(0)">
|
||||
立马预约服务
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<bottombbar :valuebbar='1'></bottombbar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import navbar from '@/components/navbar.vue'
|
||||
import bottombbar from '@/components/bottombbar.vue'
|
||||
export default {
|
||||
components: {
|
||||
navbar,
|
||||
bottombbar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
navtitle: '', //名称
|
||||
navboxshow: '3', //显示
|
||||
Background: '#fff',
|
||||
count: 5,
|
||||
value: 2,
|
||||
list: {}
|
||||
}
|
||||
},
|
||||
async onLoad(e) {
|
||||
if (e) {
|
||||
uni.cache.set('store_id', e.scene) // 判断显示哪家的作品
|
||||
}
|
||||
await this.$onLaunched
|
||||
// uni.reLaunch({
|
||||
// url: '/pages/index/components/hairdressing'
|
||||
// })
|
||||
this.indexappclassindex()
|
||||
},
|
||||
methods: {
|
||||
async userlogin() { //登录
|
||||
let res = await this.api.userlogin({
|
||||
code: uni.cache.get('weixincode'),
|
||||
// #ifdef H5
|
||||
code: '0c3KOzFa1lkuMF0enAHa1Eu2xG1KOzFJ'
|
||||
// #endif
|
||||
})
|
||||
try {
|
||||
if (res) {
|
||||
uni.cache.set('loginuser', res);
|
||||
this.positionindex()
|
||||
} else {
|
||||
uni.cache.set('loginuser', 0);
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
},
|
||||
fatherMethod() {
|
||||
uni.cache.set('details_id', '')
|
||||
uni.cache.set('store_id', '')
|
||||
uni.reLaunch({
|
||||
url: '/pages/index/index'
|
||||
});
|
||||
},
|
||||
async toworder() { //会员卡
|
||||
let res = await this.api.userreceivebalancecar({
|
||||
store_id: uni.cache.get('store_id') // 判断显示哪家的作品
|
||||
})
|
||||
uni.showToast({
|
||||
title: '领取成功',
|
||||
icon: 'none'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.pro.navigateTo('my/member/index')
|
||||
}, 1500);
|
||||
},
|
||||
openmap() { //打开地图
|
||||
uni.openLocation({
|
||||
latitude: Number(this.list.store.lat),
|
||||
longitude: Number(this.list.store.lng),
|
||||
name: this.list.store.title,
|
||||
address: this.list.store.address,
|
||||
success: (res) => {
|
||||
console.log('success');
|
||||
},
|
||||
fail: (res) => {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
},
|
||||
eeInfo(e) { //查看订单详情
|
||||
uni.pro.navigateTo('order/orderInfo', {
|
||||
id: e.id,
|
||||
})
|
||||
},
|
||||
clickthereindexone(e) {
|
||||
uni.pro.navigateTo('order/index', {
|
||||
id: e
|
||||
})
|
||||
},
|
||||
mobilemobile(e) { //打电话
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: e //仅为示例
|
||||
});
|
||||
},
|
||||
async indexappclassindex() { //店铺详情
|
||||
let res = await this.api.indexappclassindex({
|
||||
store_id: uni.cache.get('store_id')
|
||||
})
|
||||
try {
|
||||
if (res) {
|
||||
console.log(res)
|
||||
this.list = res
|
||||
uni.cache.set('store_id', res.store.id) // 返回的id
|
||||
if (uni.cache.get('store_id')) {
|
||||
this.$store.dispatch("actionsclassification");
|
||||
}
|
||||
uni.setNavigationBarTitle({
|
||||
title: res.store.title
|
||||
});
|
||||
this.list.describe = res.describe.replace(/\<img/g,
|
||||
'<img style="max-width:100%;height:auto" ');
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
|
||||
.index {
|
||||
.index_top_imge {
|
||||
width: 100%;
|
||||
height: 448rpx;
|
||||
z-index: 98;
|
||||
}
|
||||
|
||||
.index_box {
|
||||
position: relative;
|
||||
z-index: 99;
|
||||
background: #FFFFFF;
|
||||
border-radius: 26rpx 26rpx 0px 0px;
|
||||
|
||||
.oneindex_box {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding: 44rpx 28rpx;
|
||||
|
||||
.oneindex_box_image {
|
||||
position: absolute;
|
||||
left: 28rpx;
|
||||
top: -28rpx;
|
||||
width: 108rpx;
|
||||
height: 108rpx;
|
||||
|
||||
image {
|
||||
border-radius: 20rpx;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.oneindex_box_text {
|
||||
margin-left: 140rpx;
|
||||
|
||||
.oneindex_box_text_one {
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.oneindex_box_text_tow {
|
||||
.oneindex_box_text_towtext {
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #F1CB66;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.towindex_box_text {
|
||||
margin-top: 32rpx;
|
||||
|
||||
.towindex_box_text_one {
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.towindex_box_text_tow {
|
||||
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.towindex_box_dw {
|
||||
image {
|
||||
width: 25.37rpx;
|
||||
height: 33.02rpx;
|
||||
}
|
||||
|
||||
margin-top: 24rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular,
|
||||
Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.towindex_box_bouttn {
|
||||
margin-top: 32rpx;
|
||||
|
||||
text:nth-child(1) {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
text {
|
||||
margin-left: 16rpx;
|
||||
padding: 8rpx 14rpx;
|
||||
background: #F7F7F7;
|
||||
border-radius: 8rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.towindextow {
|
||||
padding: 32rpx;
|
||||
border-top: 16rpx solid #F7F7F7;
|
||||
border-bottom: 16rpx solid #F7F7F7;
|
||||
background: #FFFFFF;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 150rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.thereindexone {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.thereindexone_item {
|
||||
image {
|
||||
width: 96rpx;
|
||||
height: 96rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
margin-top: 16rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fourindexone {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.fourindexone_one {
|
||||
font-size: 32rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #1A1A1A;
|
||||
|
||||
.fourindexone_one_o {
|
||||
display: inline-block;
|
||||
width: 34rpx;
|
||||
height: 4rpx;
|
||||
background: linear-gradient(94deg, rgba(255, 255, 255, 0) 0%, #373746 100%);
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.fourindexone_one-text {
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.fourindexone_one_T {
|
||||
display: inline-block;
|
||||
width: 34rpx;
|
||||
height: 4rpx;
|
||||
background: linear-gradient(266deg, rgba(255, 255, 255, 0) 0%, #373746 100%);
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.fourindexone_box {
|
||||
.fourindexone_item {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding: 32rpx 0;
|
||||
border-bottom: 1rpx dashed #F7F7F7;
|
||||
|
||||
.fourindexone_itemimage {
|
||||
width: 164rpx;
|
||||
height: 164rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.fourindexone_item_there {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: 32rpx;
|
||||
padding: 16rpx 22rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #FFFFFF;
|
||||
background: linear-gradient(180deg, #A3A7D5 0%, #414154 100%);
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.fourindexone_itemview {
|
||||
|
||||
height: 164rpx;
|
||||
justify-content: space-evenly;
|
||||
margin-left: 24rpx;
|
||||
|
||||
.fourindexone_itemview_one {
|
||||
width: 300rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.fourindexone_itemview_tow {
|
||||
width: 300rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.fourindexone_itemview_there {
|
||||
.fourindexone_itemview_there_text {
|
||||
font-size: 34rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #FC5F69;
|
||||
|
||||
text {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.fourindexone_itemview_there_text_x {
|
||||
margin-left: 12rpx;
|
||||
text-decoration: line-through;
|
||||
font-size: 20rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fiveindexone {
|
||||
// padding: 32rpx 28rpx;
|
||||
width: 100%;
|
||||
|
||||
// background: linear-gradient(309deg, #FFFFFF 0%, #1A1A1A 100%);
|
||||
// border-radius: 32rpx 32rpx 0px 0px;
|
||||
.fiveindexonehtml {
|
||||
width: 100%;
|
||||
|
||||
/deep/ img {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.fiveindexone_one {
|
||||
.fiveindexone_oneimage {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
|
||||
.fiveindexone_one_text {
|
||||
margin-left: 12rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.fiveindextow {
|
||||
padding: 28rpx;
|
||||
margin-top: 32rpx;
|
||||
width: 100%;
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border-radius: 18rpx;
|
||||
|
||||
.fiveindextowitem:nth-child(1) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.fiveindextowitem {
|
||||
margin-top: 32rpx;
|
||||
width: 100%;
|
||||
|
||||
view {
|
||||
width: 33%;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fiveindexthere {
|
||||
overflow-x: scroll;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
.fiveindexthere_item:nth-child(1) {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
.fiveindexthere_item {
|
||||
margin-left: 54rpx;
|
||||
|
||||
.fiveindexthere_itemimage {
|
||||
width: 120rpx;
|
||||
height: 152rpx;
|
||||
}
|
||||
|
||||
.fiveindexthere_item_one {
|
||||
margin-top: 8rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.fiveindexthere_item_tow {
|
||||
margin-top: 8rpx;
|
||||
font-size: 22rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: rgba(255, 255, 255, 0.57);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fiveindexfour {
|
||||
.fiveindexfourimage {
|
||||
margin-top: 70rpx;
|
||||
position: relative;
|
||||
width: 370rpx;
|
||||
height: 396rpx;
|
||||
background: linear-gradient(316deg, #636363 0%, #ACACAC 100%);
|
||||
border-radius: 16rpx;
|
||||
|
||||
image {
|
||||
position: absolute;
|
||||
top: -30rpx;
|
||||
left: -18rpx;
|
||||
border-radius: 16rpx;
|
||||
width: 372rpx;
|
||||
height: 412rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.fiveindexfourtext {
|
||||
flex: 1;
|
||||
margin-left: 70rpx;
|
||||
|
||||
text {
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sixindex {
|
||||
width: 90%;
|
||||
margin: 0 auto;
|
||||
padding: 24rpx 0;
|
||||
text-align: center;
|
||||
background: linear-gradient(360deg, #FBDDBB 0%, #FEE3C5 100%);
|
||||
border-radius: 48rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #422A07;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
151
pages/index/iose.vue
Normal file
151
pages/index/iose.vue
Normal file
@@ -0,0 +1,151 @@
|
||||
|
||||
<template>
|
||||
<view>
|
||||
<button @tap="chooseVideo()">视频上传</button>
|
||||
<button @tap="img()">图片上传</button>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
var timetamp = new Date().getTime();
|
||||
var uploadFileSize = 1024 * 1024 * 100; // 上传文件的大小限制100m
|
||||
var osshost = ''; //阿里云对象储存地址
|
||||
function random_string(len) {
|
||||
len = len || 32;
|
||||
var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
|
||||
var maxPos = chars.length;
|
||||
var pwd = '';
|
||||
for (let i = 0; i < len; i++) {
|
||||
pwd += chars.charAt(Math.floor(Math.random() * maxPos));
|
||||
}
|
||||
return pwd;
|
||||
}
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
videoSrc: '',
|
||||
Imgsrc: '',
|
||||
showVideo: false,
|
||||
formData: {
|
||||
original: 0,
|
||||
type: 1,
|
||||
detail: '',
|
||||
tags: '',
|
||||
images: [],
|
||||
video: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
chooseVideo() {
|
||||
var self = this;
|
||||
uni.chooseVideo({
|
||||
count: 1,
|
||||
sourceType: ['camera', 'album'],
|
||||
success: function(res) {
|
||||
let videoSrc = res.tempFilePath;
|
||||
if (res.size > uploadFileSize) {
|
||||
uni.showToast({
|
||||
title: '文件大小超过系统上传限制:' + uploadFileSize,
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
return;
|
||||
}
|
||||
let fileName = self.getFileName(videoSrc);
|
||||
self.fileUpload('video',videoSrc,fileName);
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: '取消选择视频',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
//图片上传
|
||||
img() {
|
||||
var self = this;
|
||||
uni.chooseImage({
|
||||
count: 1, //默认9
|
||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera'], //从相册选择
|
||||
success: function(res) {
|
||||
let Imgsrc = res.tempFilePaths[0];
|
||||
let fileName = self.getFileName(Imgsrc); // 自定义上传后的文件名称
|
||||
self.fileUpload('video',Imgsrc,fileName);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 文件上传
|
||||
fileUpload(type, path, stroeAs) {
|
||||
let self = this;
|
||||
uni.showLoading({
|
||||
title: '文件上传中'
|
||||
});
|
||||
var requestTask = uni.request({
|
||||
url: '', //请求后台签名地址。
|
||||
complete: res => {
|
||||
var data = res.data.data;
|
||||
uni.uploadFile({
|
||||
url: data.host, //后台给的阿里云存储给的上传地址
|
||||
filePath: path,
|
||||
fileType: type,
|
||||
name: 'file',
|
||||
formData: {
|
||||
key: stroeAs, //文件名
|
||||
policy: data.policy, //后台获取超时时间
|
||||
OSSAccessKeyId: data.accessid, //后台获取临时ID
|
||||
success_action_status: '200', //让服务端返回200,不然,默认会返回204
|
||||
signature: data.signature //后台获取签名
|
||||
},
|
||||
success: res => {
|
||||
console.log(res);
|
||||
// console.log('uploadImage success, res is:', res);
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '上传成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
});
|
||||
if (type === 'image') {
|
||||
self.imageList = self.imageList.concat(path);
|
||||
self.formData.images.push(osshost + '/' + stroeAs);
|
||||
}
|
||||
if (type === 'video') {
|
||||
self.showVideo = true;
|
||||
self.formData.video = osshost + '/' + stroeAs;
|
||||
}
|
||||
},
|
||||
fail: err => {
|
||||
uni.hideLoading();
|
||||
uni.showModal({
|
||||
content: err.errMsg,
|
||||
showCancel: false
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
_getSuffix(filename) {
|
||||
let pos = filename.lastIndexOf('.');
|
||||
let suffix = '';
|
||||
if (pos != -1) {
|
||||
suffix = filename.substring(pos);
|
||||
}
|
||||
return suffix;
|
||||
},
|
||||
getFileName(filename) {
|
||||
return (
|
||||
'user_dir/' +
|
||||
new Date().getTime() +
|
||||
Math.random()
|
||||
.toString(36)
|
||||
.substring(3, 20) +
|
||||
this._getSuffix(filename)
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
29
pages/index/lange.vue
Normal file
29
pages/index/lange.vue
Normal file
@@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<view class="dark-bg" :style="theme">
|
||||
<view class="bg-test"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.bg-test {
|
||||
width: 300px;
|
||||
height: 160px;
|
||||
border-radius: 10px;
|
||||
background-color: var(--bg-color-button);
|
||||
}
|
||||
</style>
|
||||
143
pages/index/member/index.vue
Normal file
143
pages/index/member/index.vue
Normal file
@@ -0,0 +1,143 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="onecontentone">
|
||||
我的会员卡(3)
|
||||
</view>
|
||||
<view class="flex-colum">
|
||||
<view class="towcontentitem" v-if="list.length>0" v-for="(item,index) in list" :key="index"
|
||||
@click="eeInfo(item)">
|
||||
<image class="towcontentitemimage" src="@/static/1.png" mode="aspectFill"></image>
|
||||
<view class="towcontentitemone flex-start">
|
||||
<image class="towcontentitemoneimage" src="@/static/logo.png" mode="aspectFill"></image>
|
||||
<text class="towcontentitemonetext" style="color: #fff;">剪发卡</text>
|
||||
</view>
|
||||
<view class="towcontentitemtow flex-start">
|
||||
<text class="towcontentitemtowetext" style="color: #fff;">剪发卡</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="list.length==0 && is_end == true" class="flex-colum">
|
||||
<image :src="bgnothave" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
<u-loadmore :status="form.status" />>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
bgnothave:uni.getStorageSync('bgnothave'),
|
||||
is_end: false,
|
||||
list: [{
|
||||
id: 1
|
||||
}, {
|
||||
id: 2
|
||||
}],
|
||||
form: {
|
||||
page: 1,
|
||||
status: 'loadmore',
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
eeInfo(e) {
|
||||
console.log(e.type)
|
||||
if (e.type == 'balance') {
|
||||
uni.pro.navigateTo('my/member/memberinfo', {
|
||||
id: e,
|
||||
})
|
||||
} else {
|
||||
uni.pro.navigateTo('my/member/memberone', {
|
||||
id: e,
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.content {
|
||||
border-top: 16rpx solid #f7f7f7;
|
||||
padding: 0 28rpx;
|
||||
|
||||
.flex-colum_image {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
|
||||
text {
|
||||
margin-top: 30rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.onecontentone {
|
||||
padding-top: 32rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.flex-colum {
|
||||
.towcontentitem {
|
||||
margin-top: 22rpx;
|
||||
width: 96%;
|
||||
position: relative;
|
||||
padding: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.towcontentitemimage {
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 12rpx;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.towcontentitemone {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
|
||||
.towcontentitemoneimage {
|
||||
width: 76rpx;
|
||||
height: 76rpx;
|
||||
}
|
||||
|
||||
.towcontentitemonetext {
|
||||
margin-left: 16rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #422A07;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitemtow {
|
||||
z-index: 10;
|
||||
position: relative;
|
||||
margin-top: 52rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #422A07;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
327
pages/index/member/memberinfo.vue
Normal file
327
pages/index/member/memberinfo.vue
Normal file
@@ -0,0 +1,327 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="towcontentitem">
|
||||
<image class="towcontentitemimage" src="@/static/1.png" mode="aspectFill"></image>
|
||||
<view class="fourcontentitemabsolute">
|
||||
年卡会员
|
||||
</view>
|
||||
<view class="towcontentitemone flex-start">
|
||||
<image class="towcontentitemoneimage" src="@/static/logo.png" mode="aspectFill"></image>
|
||||
<view class="towcontentitemonetext flex-colum-start">
|
||||
<text class="towcontentitemonetextone" style="color: #fff;">剪发卡</text>
|
||||
<text class="towcontentitemonetexttow" style="color: #fff;">保洁清洗卡</text>
|
||||
</view>
|
||||
<view class="towcontentitemoneabsolute">
|
||||
加购
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontentitemprogress">
|
||||
<!-- <u-line-progress :percentage="30" activeColor="#ff0000"></u-line-progress> -->
|
||||
续费
|
||||
</view>
|
||||
<view class="towcontentitemtow flex-between">
|
||||
<text class="towcontentitemtowetext" style="color: #fff;">VIP202304241154982648</text>
|
||||
<text class="towcontentitemtowetext" style="color: #fff;">保洁清洗卡</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="therecontentitem">
|
||||
<view class="therecontentitemtext">
|
||||
会员详情
|
||||
</view>
|
||||
<view class="therecontentitemone">
|
||||
<view class="therecontentitemoneiten flex-between" @click="order">
|
||||
<text class="therecontentitemoneitentetxt">账单明细</text>
|
||||
<u-icon name="arrow-right" color="#808080" size="18"></u-icon>
|
||||
</view>
|
||||
<view class="therecontentitemoneiten flex-between" @click="overlayshow = true">
|
||||
<text class="therecontentitemoneitentetxt">账单明细</text>
|
||||
<u-icon name="arrow-right" color="#808080" size="18"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-overlay :show="overlayshow" @click="overlayshow = false">
|
||||
<view class="warp">
|
||||
<view class="rect" @tap.stop>
|
||||
<view class="onerect flex-center">
|
||||
<view>【洗剪吹】新娘造型</view>
|
||||
<u-icon @click="overlayshow = false" class="onerecticon" name="backspace" color="#000000"
|
||||
size="28"></u-icon>
|
||||
</view>
|
||||
<view class="towrect">
|
||||
商品
|
||||
</view>
|
||||
<view class="thererect flex-between">
|
||||
<view class="thererectone">
|
||||
年卡会员
|
||||
</view>
|
||||
<view class="thererecttow">
|
||||
<text>¥</text>300
|
||||
</view>
|
||||
</view>
|
||||
<view class="fourrect flex-between">
|
||||
<view class="fourrectone">
|
||||
<text>共计:</text>¥300
|
||||
</view>
|
||||
<view class="fourrecttow">
|
||||
立即购买
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-overlay>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
overlayshow: false,
|
||||
numberbox: "",
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
order(e) {
|
||||
uni.pro.navigateTo('my/order/index', {
|
||||
e: 0
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.towcontentitem {
|
||||
margin-top: 22rpx;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
padding: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.fourcontentitemabsolute {
|
||||
z-index: 9;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
padding: 6rpx 28rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
text-shadow: 0px 6rpx 12rpx rgba(255, 255, 255, 0.19);
|
||||
background: linear-gradient(NaNdeg, #4A4A4A 0%, #919191 100%);
|
||||
border-radius: 0px 12rpx 0px 12rpx;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.towcontentitemimage {
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 12rpx;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.towcontentitemone {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
z-index: 9;
|
||||
|
||||
.towcontentitemoneimage {
|
||||
width: 76rpx;
|
||||
height: 76rpx;
|
||||
}
|
||||
|
||||
.towcontentitemoneabsolute {
|
||||
position: absolute;
|
||||
padding: 8rpx 44rpx;
|
||||
right: 0;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
background: linear-gradient(130deg, #F4AE46 0%, #EE9437 100%);
|
||||
box-shadow: 0px 4rpx 8rpx 2rpx rgba(243, 169, 67, 0.37);
|
||||
border-radius: 28rpx;
|
||||
}
|
||||
|
||||
.towcontentitemonetext {
|
||||
height: 76rpx;
|
||||
margin-left: 16rpx;
|
||||
|
||||
.towcontentitemonetextone {
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #422A07;
|
||||
}
|
||||
|
||||
.towcontentitemonetexttow {
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #422A07;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitemprogressa {
|
||||
padding: 8rpx 44rpx;
|
||||
width: 50%;
|
||||
z-index: 10;
|
||||
position: relative;
|
||||
margin-top: 54rpx;
|
||||
}
|
||||
|
||||
.towcontentitemprogress {
|
||||
margin-top: 24rpx;
|
||||
background: linear-gradient(318deg, #6E6E6E 0%, #404040 100%);
|
||||
box-shadow: 0px 4rpx 8rpx 2rpx #8D8D8D;
|
||||
border-radius: 28rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.towcontentitemtow {
|
||||
z-index: 10;
|
||||
position: relative;
|
||||
margin-top: 68rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #422A07;
|
||||
}
|
||||
}
|
||||
|
||||
.therecontentitem {
|
||||
margin-top: 32rpx;
|
||||
width: 100%;
|
||||
padding: 32rpx 32rpx 0 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
|
||||
.therecontentitemtext {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.therecontentitemone {
|
||||
.therecontentitemoneiten:nth-child(1) {
|
||||
border-top: none !important;
|
||||
}
|
||||
|
||||
.therecontentitemoneiten {
|
||||
padding: 32rpx 0;
|
||||
border-top: 1px solid #F7F7F7;
|
||||
|
||||
.therecontentitemoneitentetxt {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.warp {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
|
||||
.rect {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 60rpx 60rpx 0px 0px;
|
||||
padding: 48rpx 32rpx 32rpx 32rpx;
|
||||
|
||||
.onerect {
|
||||
position: relative;
|
||||
padding-bottom: 48rpx;
|
||||
|
||||
image {
|
||||
width: 124rpx;
|
||||
height: 124rpx;
|
||||
}
|
||||
|
||||
view {
|
||||
margin-left: 16rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.onerecticon {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
.towrect{
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
.thererect{
|
||||
margin-top: 16rpx;
|
||||
.thererectone{
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
.thererecttow{
|
||||
text{
|
||||
font-size: 16rpx;
|
||||
}
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Heavy, PingFang SC;
|
||||
font-weight: 800;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
}
|
||||
.fourrect{
|
||||
margin-top: 44rpx;
|
||||
.fourrectone{
|
||||
text{
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
}
|
||||
font-size: 40rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FC5F69;
|
||||
}
|
||||
.fourrecttow{
|
||||
background: linear-gradient(143deg, #8689AF 0%, #494A5F 100%);
|
||||
border-radius: 34rpx;
|
||||
padding: 10rpx 44rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
219
pages/index/specials.vue
Normal file
219
pages/index/specials.vue
Normal file
@@ -0,0 +1,219 @@
|
||||
<template>
|
||||
<view class="index">
|
||||
<navbar v-if="op!=1" :style="'background-color: rgba(255, 255, 255,' + op +')'" :Background='Background'
|
||||
:navtitle='navtitle' :navboxshow="navboxshow" @fatherMethod='navfatherMethod'>
|
||||
</navbar>
|
||||
<navbar v-else :Background="'#fff'" :navtitle='navtitle' :navboxshow="navboxshow" @fatherMethod='navfatherMethod'>
|
||||
</navbar>
|
||||
<view class="indexbox">
|
||||
<view class="indexbox_boxitem flex-between">
|
||||
<view class="indexbox_boxitem_item flex-colum-start" v-for="(item,index) in list" :key="index"
|
||||
@click="eeInfo(item)">
|
||||
<view class="indexbox_boxitem_itemimage">
|
||||
<image :src="item.host_img" mode="widthFix"></image>
|
||||
</view>
|
||||
<view class="indexbox_boxitem_itemone">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="indexbox_boxitem_itemtow flex-start">
|
||||
<text>¥</text>
|
||||
<text>{{item.price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="list.length==0 && is_end == true" style="margin-top: 100rpx;width: 100%;" class="flex-colum">
|
||||
<image :src="bgnothave" mode="aspectFill">
|
||||
</image>
|
||||
</view>
|
||||
<view class="flex-colum" style="width: 100%;">
|
||||
<u-loadmore :status="form.status" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import navbar from '@/components/navbar.vue'
|
||||
export default {
|
||||
components: {
|
||||
navbar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
navtitle: '购物商城', //名称
|
||||
navboxshow: '4', //显示
|
||||
Background: 'none',
|
||||
list: [],
|
||||
is_end: false,
|
||||
form: {
|
||||
page: 1,
|
||||
status: 'loadmore',
|
||||
},
|
||||
statusBarHeight: 0,
|
||||
op: 0,
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
uni.getSystemInfo({
|
||||
success: (res) => {
|
||||
this.statusBarHeight = res.statusBarHeight
|
||||
}
|
||||
})
|
||||
},
|
||||
onPageScroll(res) {
|
||||
// res.scrollTop 为页面滚动距离
|
||||
let top = res.scrollTop
|
||||
// height为状态栏高度+自定义导航栏标题内容高度(这里是44px)
|
||||
let height = this.statusBarHeight + 44
|
||||
// 判断滚动高度
|
||||
// 如果小于顶部自定义导航的高度
|
||||
if (top <= height) {
|
||||
// 透明度(op) = 滚动距离/导航栏高度
|
||||
// (不做操作 直接计算 this.op = top/height 也可以实现)
|
||||
// 由于(滚动距离/导航栏高度)得到0-1之间小数点后n位小数
|
||||
// 四舍五入后得到的只能是0/1
|
||||
// 因此做如下操作
|
||||
this.op = Math.round(top / height * 100) / 100
|
||||
} else {
|
||||
// 如果滚动距离大于导航高度,则透明度值为1(不透明)
|
||||
this.op = 1
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
this.shoppingindex()
|
||||
},
|
||||
onShow() {
|
||||
this.shoppingindex()
|
||||
},
|
||||
methods: {
|
||||
async shoppingindex() {
|
||||
let res = await this.api.shoppingbuyingspeciallist({
|
||||
page: this.form.page
|
||||
})
|
||||
if (res.length == 0) {
|
||||
this.is_end = true
|
||||
this.form.status = 'nomore'
|
||||
return false;
|
||||
} else {
|
||||
this.form.status = 'loading';
|
||||
this.form.page = ++this.form.page;
|
||||
setTimeout(() => {
|
||||
this.list = [...this.list, ...res];
|
||||
if (res.length == 10) {
|
||||
this.form.status = 'loading';
|
||||
} else {
|
||||
this.is_end = true;
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
init_fn() {
|
||||
this.list = []
|
||||
this.is_end = false
|
||||
this.form.page = 1
|
||||
this.form.status = 'loadmore'
|
||||
this.shoppingindex()
|
||||
},
|
||||
eeInfo(e) { //查看订单详情
|
||||
if (e.spec_type == 1) {
|
||||
uni.pro.navigateTo('mall/mallInfo', {
|
||||
id: e.id,
|
||||
})
|
||||
} else {
|
||||
uni.pro.navigateTo('mall/mallInfos', {
|
||||
id: e.id,
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
width: 100%;
|
||||
background: url(@/static/imge/specialss.png) no-repeat;
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
.index {
|
||||
.indexbox {
|
||||
border-radius: 30rpx 30rpx 0px 0px;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin-top: 48rpx;
|
||||
padding: 0rpx 28rpx 32rpx 28rpx;
|
||||
background: #fff;
|
||||
|
||||
.indexbox_boxitem:after {
|
||||
content: "";
|
||||
flex: 0 0 220rpx;
|
||||
/* 如何计算233
|
||||
ulist的width是500px,li的width是100px ,根据运行结果,每一行有四个格子,三个间隔,500-100-100-33-33=244,有一点小误差调一调就差不多了
|
||||
*/
|
||||
}
|
||||
|
||||
.indexbox_boxitem {
|
||||
background: #ffffff;
|
||||
|
||||
.indexbox_boxitem_item {
|
||||
margin-top: 32rpx;
|
||||
|
||||
.indexbox_boxitem_itemimage {
|
||||
width: 220rpx;
|
||||
height: 220rpx;
|
||||
background: #F8F8F8;
|
||||
border-radius: 8rpx;
|
||||
|
||||
image {
|
||||
width: auto;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.indexbox_boxitem_itemone {
|
||||
width: 220rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-top: 16rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.indexbox_boxitem_itemtow {
|
||||
margin-top: 10rpx;
|
||||
padding-right: 10rpx;
|
||||
justify-content: flex-end;
|
||||
background: url(@/static/imge/specials.png) no-repeat;
|
||||
background-size: cover;
|
||||
width: 148rpx;
|
||||
height: 48rpx;
|
||||
font-family: Roboto, Roboto;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
|
||||
text {
|
||||
height: 48rpx;
|
||||
}
|
||||
|
||||
text:nth-child(1) {
|
||||
line-height: 50rpx;
|
||||
font-size: 16rpx;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
line-height: 48rpx;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
397
pages/mall/community.vue
Normal file
397
pages/mall/community.vue
Normal file
@@ -0,0 +1,397 @@
|
||||
<template>
|
||||
<view class="index">
|
||||
<view class="oneindex">
|
||||
<view class="oneindexbox">
|
||||
<view class="oneindexboxswiper" :scroll-y="true" :scroll-with-animation="true"
|
||||
:enable-back-to-top="true" :style="'height:'+hh+'px'">
|
||||
<view v-for="(item,index) in navList" :key="index" class="oneindexswiperitem">
|
||||
<view class="oneindexswiperitem_one" :style="swiperCurrent==index?'background: #fff;':''"
|
||||
:class="swiperCurrent==index?'oneindexswiperitem_ones':''" @click="orderswitch(item,index)">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="towindexbox">
|
||||
<swiper :current="swiperCurrent" :disable-touch='disabletouch' @animationfinish="animationfinish"
|
||||
:duration='0' :vertical='true' :style="'height:'+hh+'px'">
|
||||
<swiper-item v-for="(item,index) in list_" :key="index">
|
||||
<scroll-view :scroll-y="true" @scrolltolower="lower" :style="'height:'+hh+'px'">
|
||||
<view v-for="(item1,index1) in list_[index].data" :key="index1"
|
||||
class="main-item towindexboxscrollview">
|
||||
<view class="towindexboxview_box flex-start">
|
||||
<image class="towindexboxview_boximage" :src="item1.host_img" mode="aspectFill">
|
||||
</image>
|
||||
<view class="towindexboxview_boxtext flex-colum-start">
|
||||
<view class="towindexboxview_boxtextone">
|
||||
{{item1.title}}
|
||||
</view>
|
||||
<view class="towindexboxview_boxtexttow">
|
||||
销量 100+
|
||||
</view>
|
||||
<view class="indexboxitemlefttheretext flex-between">
|
||||
<view class="flex-start">
|
||||
<view class="indexboxitemlefttheretextone">
|
||||
<text>¥</text>
|
||||
<text>{{item1.price}}</text>
|
||||
</view>
|
||||
<view class="indexboxitemlefttheretexttow">
|
||||
¥{{item1.y_price}}
|
||||
</view>
|
||||
</view>
|
||||
<image src="@/static/mall/cart.png" mode="aspectFill"
|
||||
@click="requestSubscribeMessage(0,item1)"
|
||||
style="width: 40rpx; height: 40rpx;">
|
||||
</image>
|
||||
<!-- <u-number-box v-else v-model="item1.number" :min="0" button-size="12"
|
||||
color="#ffffff" :bgColor="theme.cartpieces" :max="item1.stock"
|
||||
iconStyle="color: #fff" @change="requestSubscribeMessage($event,item1)">
|
||||
</u-number-box> -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="list_[index].data.length == 0 && list_[index].is_end == true"
|
||||
style="margin-top:200rpx;width: 100%;" class="flex-colum">
|
||||
<image :src="bgnothave" mode="" style="width: 100%;width: 100%;">
|
||||
</image>
|
||||
</view>
|
||||
<view class="flex-colum" style="width: 100%;">
|
||||
<u-loadmore :status="form.status" />
|
||||
</view>
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<bottombbar class="headinga" v-if="style_type == 2" :valuebbar='1'></bottombbar>
|
||||
<bottombbar class="headinga" v-else :valuebbar='3'></bottombbar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import bottombbar from '@/components/bottombbar.vue'
|
||||
export default {
|
||||
components: {
|
||||
bottombbar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
bgnothave: uni.getStorageSync('bgnothave'),
|
||||
style_type: uni.cache.get('loginuser').style_type,
|
||||
hh: 0,
|
||||
navList: [{
|
||||
id: '',
|
||||
title: ''
|
||||
}],
|
||||
navCount: 0,
|
||||
valuenumber: 0,
|
||||
swiperCurrent: 0, // swiper组件的current值,表示当前那个swiper-item是活动的
|
||||
current: 0, // tabs组件的current值,表示当前活动的tab选项
|
||||
list_: {},
|
||||
like: '', //备注
|
||||
form: {
|
||||
status: 'loadmore',
|
||||
},
|
||||
disabletouch: true, //控制是否可以滑动
|
||||
};
|
||||
},
|
||||
async onLoad() {
|
||||
let res = await this.api.shoppingindexgoodsclass()
|
||||
this.navList = res
|
||||
},
|
||||
onShow() {
|
||||
this.shoppingindexgoodsclass()
|
||||
this.$store.dispatch("actionsclassification");
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
//计算选中商品的总价
|
||||
|
||||
},
|
||||
onReady() {
|
||||
this._onReadyApi()
|
||||
uni.hideLoading()
|
||||
},
|
||||
methods: {
|
||||
animationfinish(e) {
|
||||
let current = e.detail.current;
|
||||
if (this.list_['list' + current].data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
this.swiperCurrent = current;
|
||||
this.current = current;
|
||||
},
|
||||
lower(e) {
|
||||
console.log(e)
|
||||
this.onReachBottom_fn(this.list_['list' + this.swiperCurrent])
|
||||
},
|
||||
onReachBottom_fn(list) {
|
||||
if (!list.is_end) {
|
||||
this.get_order_list(this.current);
|
||||
} else {
|
||||
this.disabletouch = false
|
||||
this.form.status = 'nomore';
|
||||
console.log(this.disabletouch)
|
||||
this.$forceUpdate();
|
||||
}
|
||||
},
|
||||
init_fn() {
|
||||
for (let i = 0; i < this.navList.length; i++) {
|
||||
this.$set(this.list_, 'list' + [i], { //全部
|
||||
data: [],
|
||||
page: 1,
|
||||
is_end: false,
|
||||
})
|
||||
this.get_order_list(i);
|
||||
}
|
||||
console.log(this.list_)
|
||||
},
|
||||
async get_order_list(i) {
|
||||
this.form.status = 'loading';
|
||||
let page = null;
|
||||
let order_type = 0
|
||||
order_type = this.navList[i].id
|
||||
page = this.list_['list' + i].page
|
||||
let res = await this.api.shoppingindex({
|
||||
classid: order_type,
|
||||
page: page,
|
||||
like: this.like
|
||||
})
|
||||
this.paging(res, this.list_['list' + i])
|
||||
uni.hideLoading();
|
||||
},
|
||||
paging(res, list) {
|
||||
if (res.length == 0) {
|
||||
this.form.status = 'nomore';
|
||||
list.is_end = true;
|
||||
return false;
|
||||
} else {
|
||||
this.form.status = 'loading';
|
||||
list.page = list.page + 1;
|
||||
setTimeout(() => {
|
||||
list.data = [...list.data, ...res];
|
||||
if (res.length != 10) {
|
||||
list.is_end = true;
|
||||
this.form.status = 'nomore';
|
||||
|
||||
} else {
|
||||
this.disabletouch = true
|
||||
this.form.status = 'loading';
|
||||
}
|
||||
this.$forceUpdate();
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
async shoppingindexgoodsclass() {
|
||||
let res = await this.api.shoppingindexgoodsclass()
|
||||
this.navList = res
|
||||
this.init_fn();
|
||||
},
|
||||
orderswitch(s, index) {
|
||||
console.log(index, this.list_['list' + index])
|
||||
if (this.list_['list' + index].data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
this.swiperCurrent = index;
|
||||
},
|
||||
requestSubscribeMessage(e, s) {
|
||||
console.log(e)
|
||||
// this.valuenumber = e.value
|
||||
// if (e == 0) {
|
||||
|
||||
// } else {
|
||||
|
||||
// }
|
||||
this.$u.debounce(this.shoppingindexgoodindexsaddcar(s), 200);
|
||||
},
|
||||
async shoppingindexgoodindexsaddcar(s) {
|
||||
console.log(s)
|
||||
let res = await this.api.shoppingindexgoodindexsaddcar({
|
||||
number: 1,
|
||||
goods_id: s.id,
|
||||
spec: s.spec_title,
|
||||
})
|
||||
if (res == 1) {
|
||||
uni.showToast({
|
||||
title: '添加购物车成功',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
_onReadyApi() {
|
||||
var windowHeight = uni.getSystemInfoSync().windowHeight
|
||||
//#ifdef MP-WEIXIN || H5
|
||||
uni.createSelectorQuery().select('.headinga').boundingClientRect((res) => {
|
||||
this.hh = windowHeight - res.height
|
||||
this.navCount = Math.round(this.hh / 50)
|
||||
}).exec()
|
||||
//#endif
|
||||
//#ifdef MP-ALIPAY
|
||||
my.createSelectorQuery().selectAll('.headinga').boundingClientRect().exec(ele => {
|
||||
var nodeData = ele[0]
|
||||
this.height = (nodeData.height) + "px";
|
||||
})
|
||||
//#endif
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.index {
|
||||
.oneindex {
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
|
||||
.oneindexbox {
|
||||
width: 24%;
|
||||
background-color: #f7f7f7;
|
||||
overflow: auto;
|
||||
|
||||
.oneindexboxswiper {
|
||||
width: 100%;
|
||||
|
||||
.oneindexswiperitem {
|
||||
width: 100%;
|
||||
height: 84rpx;
|
||||
|
||||
.oneindexswiperitem_ones::before {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
transform: translateY(50%);
|
||||
content: '';
|
||||
display: inline-block;
|
||||
background: #fc821c;
|
||||
width: 8rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 0 10rpx 10rpx 0;
|
||||
}
|
||||
|
||||
.oneindexswiperitem_one {
|
||||
position: relative;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #000;
|
||||
height: 84rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.towindexbox {
|
||||
width: 76%;
|
||||
|
||||
.towindexboxscrollview {
|
||||
margin-left: 24rpx;
|
||||
|
||||
.towindexboxview_box {
|
||||
width: 100%;
|
||||
padding: 32rpx 0 28rpx 0;
|
||||
border-bottom: 1rpx solid #F6F6F6;
|
||||
|
||||
.towindexboxview_boximage {
|
||||
background: #f8f8f8;
|
||||
width: 156rpx;
|
||||
height: 156rpx;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.towindexboxview_boxtext {
|
||||
position: relative;
|
||||
margin-left: 20rpx;
|
||||
|
||||
.towindexboxview_boxtextone {
|
||||
width: 300rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.towindexboxview_boxtexttow {
|
||||
margin-top: 12rpx;
|
||||
width: 300rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.indexboxitemlefttheretext {
|
||||
margin-top: 20rpx;
|
||||
width: 100%;
|
||||
|
||||
.flex-start {
|
||||
.indexboxitemlefttheretextone {
|
||||
text {
|
||||
font-family: SourceHanSansCN-Bold, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #FF5053;
|
||||
}
|
||||
|
||||
text:nth-child(1) {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
font-weight: bold;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.indexboxitemlefttheretexttow {
|
||||
margin-top: 10rpx;
|
||||
margin-left: 12rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: SourceHanSansCN-Regular, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.indexboxitemleftthere_countdown {
|
||||
.indexboxitemleftthere_countdowntext {
|
||||
font-family: Roboto, Roboto;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
font-size: 18rpx;
|
||||
}
|
||||
|
||||
.indexboxitemleftthere_countdowntexts {
|
||||
font-family: Roboto, Roboto;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
margin-left: 16rpx;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
692
pages/mall/confirm.vue
Normal file
692
pages/mall/confirm.vue
Normal file
@@ -0,0 +1,692 @@
|
||||
<template>
|
||||
<view class="content" :style="[theme]">
|
||||
<view class="onecontent">
|
||||
<view class="onecontentone flex-start">
|
||||
<view class="onecontent_one">
|
||||
商品信息
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontenttow flex-start">
|
||||
<view class="onecontenttowitem flex-between" v-for="(item,index) in elist.goods" :key="index">
|
||||
<view class="onecontenttowitem_one flex-start">
|
||||
<image class="onecontenttowitemimage" :src="item.img" mode="aspectFill"></image>
|
||||
<view class="onecontenttowitem_onebox flex-colum-start">
|
||||
<view class="onecontenttowitem_onebox_one">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="onecontenttowitem_onebox_tow">
|
||||
{{item.spec}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontenttowitem_tow flex-colum-end">
|
||||
<view class="onecontenttowitem_towstext_one">
|
||||
{{item.price}}
|
||||
</view>
|
||||
<view class="onecontenttowitem_towstetx_tow">
|
||||
×{{item.number}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontent" style="margin-top: 32rpx;">
|
||||
<view class="onecontentone flex-between">
|
||||
<view class="onecontent_one">
|
||||
确认地址
|
||||
</view>
|
||||
<u-icon name="arrow-right" color="#000" size="14"></u-icon>
|
||||
</view>
|
||||
<view class="onecontentaddress flex-colum-start" v-if="elist.address" @click="clickaddress">
|
||||
<view class="onecontentaddressone" v-if="formlist.type == 3">
|
||||
{{elist.address.address}}
|
||||
</view>
|
||||
<view class="onecontentaddressone" v-else>
|
||||
{{elist.address.province}}-{{elist.address.city}}-{{elist.address.area}}-{{elist.address.address}}
|
||||
</view>
|
||||
<view class="onecontentaddresstow">
|
||||
{{elist.address.name}}<text style="margin-left: 10rpx;">{{elist.address.mobile}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontentaddress" v-else>
|
||||
<view class="onecontentaddressone" @click="clickaddress">
|
||||
去添加地址
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="therecontent">
|
||||
<!-- <view class="therecontenttow flex-between">
|
||||
<view class="therecontenttow_one">
|
||||
商品金额
|
||||
</view>
|
||||
<view class="therecontenttow_tow">
|
||||
{{elist.number}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="therecontenttow flex-between">
|
||||
<view class="therecontenttow_one">
|
||||
优惠券
|
||||
</view>
|
||||
<view class="therecontenttow_tow">
|
||||
暂无可用
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="therecontenttow flex-between">
|
||||
<view class="therecontenttow_one">
|
||||
运费
|
||||
</view>
|
||||
<view class="therecontenttow_tow">
|
||||
¥{{elist.freight}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="therecontenttow flex-between">
|
||||
<view class="therecontenttow_one">
|
||||
合计
|
||||
</view>
|
||||
<view class="therecontenttow_tow" style="color:#FC5F69;">
|
||||
¥{{elist.price.total_price}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="fivecontent">
|
||||
<view class="fivecontentitem flex-between">
|
||||
<view class="fivecontentitem_one">
|
||||
手机号码
|
||||
</view>
|
||||
<view class="fivecontentitem_tow">
|
||||
{{mobile}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="fivecontentitem flex-between">
|
||||
<view class="fivecontentitem_one">
|
||||
姓名
|
||||
</view>
|
||||
<view class="fivecontentitem_tow">
|
||||
张雪
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="sixcontent">
|
||||
<view class="sixcontentone flex-between">
|
||||
<view class="sixcontent_one">
|
||||
支付方式
|
||||
</view>
|
||||
</view>
|
||||
<view class="sixcontenttow">
|
||||
<view class="sixcontenttowitem flex-between" @click="clickselect(1)">
|
||||
<view class="sixcontenttowitemone flex-start">
|
||||
<image src="https://ointmentweapp.oss-cn-beijing.aliyuncs.com/image/wx.png" mode="aspectFill"></image>
|
||||
<text class="sixcontenttowitemonetext">微信支付</text>
|
||||
</view>
|
||||
<view class="flex-start">
|
||||
<u-icon v-if="pay_type == 1" name="checkmark-circle-fill" color="#333333" size="18"></u-icon>
|
||||
<u-icon v-else name="checkmark-circle-fill" color="#999999" size="18"></u-icon>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="sixcontenttowitem flex-between" @click="clickselect(2)">
|
||||
<view class="sixcontenttowitemone flex-start">
|
||||
|
||||
<image src="https://ointmentweapp.oss-cn-beijing.aliyuncs.com/image/ye.png" mode="aspectFill"></image>
|
||||
<text class="sixcontenttowitemonetext">余额支付</text>
|
||||
</view>
|
||||
<view class="flex-start">
|
||||
<u-icon v-if="pay_type == 2" name="checkmark-circle-fill" color="#333333" size="18"></u-icon>
|
||||
<u-icon v-else name="checkmark-circle-fill" color="#999999" size="18"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="fourcontent">
|
||||
<view class="fourcontentone flex-start">
|
||||
<view class="fourcontent_one">
|
||||
须知:
|
||||
</view>
|
||||
</view>
|
||||
<view class="fourcontenttow flex-colum-start">
|
||||
|
||||
</view>
|
||||
</view> -->
|
||||
<view :style="{height:height}">
|
||||
|
||||
</view>
|
||||
<view class="fixedview flex-between">
|
||||
<view class="fixedview_one flex-start">
|
||||
<view class="fixedview_oneone">
|
||||
实付金额:
|
||||
</view>
|
||||
<view class="fixedview_onetow">
|
||||
<text>¥</text>{{elist.price.price}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="fixedview_tow" @tap="$u.debounce(showpopupclick,1000)">
|
||||
立即付款
|
||||
</view>
|
||||
</view>
|
||||
<u-popup :show="showpopup" @close="closepopup" @open="openpopup" mode="center" :round="10">
|
||||
<view class="u-popupflex-colum flex-colum">
|
||||
<view class="u-popupflex-columview">
|
||||
请输入支付密码
|
||||
</view>
|
||||
<u-code-input v-model="ucodeinputvalue" :maxlength="6" dot @finish="finish"></u-code-input>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showpopup: false,
|
||||
ucodeinputvalue: '',
|
||||
height: '',
|
||||
order_id: '',
|
||||
elist: {
|
||||
address: {
|
||||
|
||||
},
|
||||
price: {
|
||||
total_price: '',
|
||||
id: ''
|
||||
}
|
||||
},
|
||||
mobile: uni.cache.get('loginuser').userinfo.mobile,
|
||||
formlist: {
|
||||
goods_id: ''
|
||||
},
|
||||
pay_type: 1
|
||||
}
|
||||
},
|
||||
async onLoad(e) {
|
||||
// this.elist = JSON.parse(optionItem)
|
||||
this.formlist = e
|
||||
this.formlist.spec = decodeURIComponent(e.spec)
|
||||
let res = await this.api.shoppingindexgoodindexoforders({
|
||||
type: this.formlist.type, // 1购物车 2商品详情页
|
||||
goods_id: this.formlist.goods_id, //商品ID 商品详情页来源时必填
|
||||
car_id: this.formlist.car_id, //购物车ID 1,2 购物车来源时必填
|
||||
number: this.formlist.number, //数量 商品详情页来源时必填
|
||||
spec: this.formlist.spec, //规格 商品详情页来源时必填
|
||||
address_id: this.formlist.address_id, //地址ID 可以为空(为空时返回默认地址)
|
||||
order_id:this.formlist.order_id,
|
||||
})
|
||||
if (res) {
|
||||
this.elist = res
|
||||
this.elist.goods[0].spec = this.formlist.spec
|
||||
if (this.elist.address) {
|
||||
this.elist.address.mobile = res.address.mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
clickaddress() {
|
||||
uni.pro.navigateTo("my/address/index", {
|
||||
order: 1
|
||||
});
|
||||
uni.$once('update', data => {
|
||||
this.elist.address = JSON.parse(data)
|
||||
if (this.elist.address) {
|
||||
this.elist.address.mobile = this.elist.address.mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')
|
||||
}
|
||||
this.$forceUpdate();
|
||||
})
|
||||
},
|
||||
openpopup() {
|
||||
console.log('open');
|
||||
},
|
||||
closepopup() {
|
||||
this.showpopup = false
|
||||
},
|
||||
|
||||
finish(e) {
|
||||
this.reservationmakenowsub()
|
||||
},
|
||||
showpopupclick() {
|
||||
if(this.elist.address == null || this.elist.address == undefined){
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '收货地址不能为空'
|
||||
})
|
||||
return false
|
||||
}
|
||||
if (this.pay_type == 1) {
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
this.reservationmakenowsub()
|
||||
return false;
|
||||
} else {
|
||||
if (this.pay_type == 2) {
|
||||
if (this.elist.is_vip_password == 0) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您目前没有设置密码,请先设置支付密码',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/my/setup/repairpassword'
|
||||
});
|
||||
} else if (res.cancel) {}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.showpopup = true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async reservationmakenowsub() {
|
||||
var datareslane = await this.api.shoppingindexgoodindexsuborder({
|
||||
type: this.formlist.type,
|
||||
goods_id: this.formlist.goods_id, //商品ID 商品详情页来源时必填
|
||||
car_id: this.formlist.car_id, //购物车ID 1,2 购物车来源时必填
|
||||
number: this.formlist.number, //数量 商品详情页来源时必填
|
||||
spec: this.formlist.spec, //规格 商品详情页来源时必填
|
||||
address_id: this.formlist.address_id, //地址ID 可以为空(为空时返回默认地址)
|
||||
pay_type: this.pay_type ,//1微信 2余额卡
|
||||
order_id:this.formlist.order_id
|
||||
})
|
||||
console.log(datareslane, 280)
|
||||
if (datareslane.data) {
|
||||
let res = await this.api.shoppingindexgoodindexgetpayparams({
|
||||
order_id: datareslane.data.order_id,
|
||||
sec_password: this.ucodeinputvalue //安全密码 余额卡支付时有效
|
||||
}) //判断是否支付成功
|
||||
this.ucodeinputvalue = ''
|
||||
console.log(res, 287)
|
||||
if (res.data.pay_status == 0) {
|
||||
this.showpopup = false
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay', //支付类型-固定值
|
||||
partnerid: res.data.pay_data.payAppId, // 微信支付商户号
|
||||
timeStamp: res.data.pay_data.payTimeStamp, // 时间戳(单位:秒)
|
||||
nonceStr: res.data.pay_data.paynonceStr, // 随机字符串
|
||||
package: res.data.pay_data.payPackage, // 固定值
|
||||
signType: res.data.pay_data.paySignType, //固定值
|
||||
paySign: res.data.pay_data.paySign, //签名
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
title: "支付成功"
|
||||
})
|
||||
uni.redirectTo({
|
||||
url: "/pages/mall/order/ordersuccess?id=" + datareslane.data.order_id,
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
setTimeout(res => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '支付失败'
|
||||
})
|
||||
uni.hideLoading()
|
||||
}, 2000)
|
||||
uni.redirectTo({
|
||||
url: "/pages/mall/order/index?e=" +0,
|
||||
});
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: "/pages/mall/order/ordersuccess?id=" + datareslane.data.order_id,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.message || res.msg,
|
||||
icon: "none",
|
||||
success() {
|
||||
setTimeout(res => {
|
||||
// if (options.toast) {
|
||||
uni.hideLoading()
|
||||
// }
|
||||
}, 2000)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
clickselect(b) {
|
||||
this.pay_type = b
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
//#ifdef MP-WEIXIN || H5
|
||||
var query = uni.createSelectorQuery().in(this).select('.fixedview')
|
||||
query.boundingClientRect(ele => {
|
||||
var that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.height = (ele.height) + "px";
|
||||
that = null;
|
||||
}
|
||||
})
|
||||
}).exec();
|
||||
//#endif
|
||||
//#ifdef MP-ALIPAY
|
||||
my.createSelectorQuery().selectAll('.fixedview').boundingClientRect().exec(ele => {
|
||||
var nodeData = ele[0]
|
||||
var that = this;
|
||||
that.height = (nodeData.height) + "px";
|
||||
that = null;
|
||||
})
|
||||
//#endif
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.onecontent {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.onecontentone {
|
||||
padding-bottom: 28rpx;
|
||||
border-bottom: 1px solid #F7F7F7;
|
||||
|
||||
.onecontent_one {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.onecontent_tow {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-left: 32rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.onecontentaddress {
|
||||
.onecontentaddressone {
|
||||
margin-top: 24rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.onecontentaddresstow {
|
||||
margin-top: 24rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.onecontenttow {
|
||||
width: 100%;
|
||||
|
||||
.onecontenttowitem {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
|
||||
.onecontenttowitem_one {
|
||||
.onecontenttowitemimage {
|
||||
width: 124rpx;
|
||||
height: 124rpx;
|
||||
}
|
||||
|
||||
.onecontenttowitem_onebox {
|
||||
margin-left: 24rpx;
|
||||
|
||||
.onecontenttowitem_onebox_one {
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.onecontenttowitem_onebox_tow {
|
||||
margin-top: 32rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.onecontenttowitem_tow {
|
||||
.onecontenttowitem_towstext_one {
|
||||
font-size: 32rpx;
|
||||
font-family: Roboto-Medium, Roboto;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.onecontenttowitem_towstetx_tow {
|
||||
margin-top: 32rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: DIN Alternate-Bold, DIN Alternate;
|
||||
font-weight: bold;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.fivecontent {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-top: 32rpx;
|
||||
|
||||
.fivecontentitem:nth-child(2) {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.fivecontentitem {
|
||||
padding: 18rpx 0;
|
||||
border-bottom: 1px solid #F7F7F7;
|
||||
|
||||
.fivecontentitem_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.fivecontentitem_tow {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.therecontent {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-top: 32rpx;
|
||||
|
||||
.therecontenttow:nth-child(1) {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.therecontenttow {
|
||||
margin-top: 32rpx;
|
||||
|
||||
.therecontenttow_one {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.therecontenttow_tow {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sixcontent {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 32rpx;
|
||||
margin-top: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.sixcontentone {
|
||||
padding-bottom: 28rpx;
|
||||
border-bottom: 1px solid #F7F7F7;
|
||||
|
||||
.sixcontent_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.sixcontenttow {
|
||||
.sixcontenttowitem {
|
||||
margin-top: 16rpx;
|
||||
|
||||
.sixcontenttowitemone {
|
||||
image {
|
||||
margin-left: 24rpx;
|
||||
width: 31.37rpx;
|
||||
height: 27.34rpx;
|
||||
}
|
||||
|
||||
.sixcontenttowitemonetext {
|
||||
margin-left: 14rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fourcontent {
|
||||
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 32rpx;
|
||||
margin-top: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.fourcontentone {
|
||||
padding-bottom: 28rpx;
|
||||
border-bottom: 1px solid #F7F7F7;
|
||||
|
||||
.fourcontent_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.fourcontenttow {
|
||||
margin-top: 16rpx;
|
||||
width: 100%;
|
||||
|
||||
/deep/ img {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.u-popupflex-colum {
|
||||
padding: 80rpx 40rpx;
|
||||
border-radius: 50rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.u-popupflex-columview {
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.fixedview {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 24rpx 28rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.fixedview_one {
|
||||
.fixedview_oneone {
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.fixedview_onetow {
|
||||
font-size: 44rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #F45C4C;
|
||||
font-weight: bold;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fixedview_tow {
|
||||
background: var(--bg-color-button);
|
||||
border-radius: 34rpx;
|
||||
padding: 10rpx 44rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
369
pages/mall/index.vue
Normal file
369
pages/mall/index.vue
Normal file
@@ -0,0 +1,369 @@
|
||||
<template>
|
||||
<view class="content" style="padding-bottom: 10rpx;" :style="[theme]">
|
||||
<view class="onecontent">
|
||||
<view class="onecontent_oen flex-start">
|
||||
<input class="onecontent_oen_input" type="text" v-model="like" placeholder="搜索订单/商家名/商品名">
|
||||
<text class="onecontent_oen_text" @click="init_fn">搜索</text>
|
||||
</view>
|
||||
<view class="onecontent_tow">
|
||||
<view ref="uTabs" class="onecontent_tow_item flex-colum" v-for="(item,index) in swipercurrentdata"
|
||||
:key="index" @click="orderswitch(item)">
|
||||
<view :class="swiperCurrent == item.id?'onecontent_tow_itemtexts':'onecontent_tow_itemtext'">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<image class="onecontent_tow_itemtextsimges" v-if="swiperCurrent == item.id" :src="selected" mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontent flex-between">
|
||||
<view class="towcontentitem" v-if="list.length>0" v-for="(item,index1) in list" :key="index1"
|
||||
@click="eeInfo(item)">
|
||||
<view class="towcontentitemone flex-start">
|
||||
<image class="towcontentitemtow_imge" :src="item.host_img" mode="aspectFill"></image>
|
||||
<view class="towcontentitemtow_item ">
|
||||
<view class="towcontentitemtow_one">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="towcontentitemtow_tow">
|
||||
销量 {{item.sales}}+
|
||||
</view>
|
||||
<view class="towcontentitemtow_there flex-start">
|
||||
<view class="towcontentitemtow_there_one flex-start">
|
||||
¥<text>{{item.price}}</text>
|
||||
</view>
|
||||
<view class="towcontentitemtow_there_tow">¥{{item.y_price}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="list.length==0 && is_end == true" style="margin-top: 100rpx;width: 100%;" class="flex-colum">
|
||||
<image :src="bgnothave" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
<view class="flex-colum" style="width: 100%;">
|
||||
<u-loadmore :status="form.status" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentfixed" @click="clickshopcart" v-if="style_type!=2">
|
||||
<image :src="shoppingcart" mode="widthFix"></image>
|
||||
</view>
|
||||
<bottombbar v-if="style_type == 2" :valuebbar='1'></bottombbar>
|
||||
<bottombbar v-else :valuebbar='3'></bottombbar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import bottombbar from '@/components/bottombbar.vue'
|
||||
export default {
|
||||
components: {
|
||||
bottombbar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
bgnothave: uni.getStorageSync('bgnothave'),
|
||||
selected: uni.getStorageSync('selected'),
|
||||
shoppingcart: uni.getStorageSync('shoppingcart'),
|
||||
style_type:uni.cache.get('loginuser').style_type,
|
||||
|
||||
swiperCurrent: 0,
|
||||
overlayshow: false,
|
||||
swipercurrentdata: [],
|
||||
like: '',
|
||||
is_end: false,
|
||||
list: [],
|
||||
form: {
|
||||
page: 1,
|
||||
status: 'loadmore',
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
this.shoppingindex()
|
||||
},
|
||||
onShow() {
|
||||
this.shoppingindexgoodsclass()
|
||||
this.$store.dispatch("actionsclassification");
|
||||
this.init_fn()
|
||||
},
|
||||
methods: {
|
||||
async shoppingindexgoodsclass() {
|
||||
let res = await this.api.shoppingindexgoodsclass()
|
||||
this.swipercurrentdata = res
|
||||
},
|
||||
async shoppingindex() {
|
||||
let res = await this.api.shoppingindex({
|
||||
page: this.form.page,
|
||||
like: this.like,
|
||||
classid: this.swiperCurrent
|
||||
})
|
||||
if (res.length == 0) {
|
||||
this.is_end = true
|
||||
this.form.status = 'nomore'
|
||||
return false;
|
||||
} else {
|
||||
this.form.status = 'loading';
|
||||
this.form.page = ++this.form.page;
|
||||
setTimeout(() => {
|
||||
this.list = [...this.list, ...res];
|
||||
if (res.length == 10) {
|
||||
this.form.status = 'loading';
|
||||
} else {
|
||||
this.is_end = true;
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
init_fn() {
|
||||
this.list = []
|
||||
this.is_end = false
|
||||
this.form.page = 1
|
||||
this.form.status = 'loadmore'
|
||||
this.shoppingindex()
|
||||
},
|
||||
orderswitch(e) {
|
||||
this.swiperCurrent = e.id
|
||||
this.init_fn()
|
||||
},
|
||||
clickshopcart() {
|
||||
uni.pro.navigateTo('shopcart/index')
|
||||
},
|
||||
eeInfo(e) { //查看订单详情
|
||||
if (e.spec_type == 1) {
|
||||
uni.pro.navigateTo('mall/mallInfo', {
|
||||
id: e.id,
|
||||
})
|
||||
} else {
|
||||
uni.pro.navigateTo('mall/mallInfos', {
|
||||
id: e.id,
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
.contentfixed {
|
||||
position: fixed;
|
||||
background-size: cover;
|
||||
bottom: 328rpx;
|
||||
right: 28rpx;
|
||||
width: 84rpx;
|
||||
height: 84rpx;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
.onecontent {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 10rpx 28rpx;
|
||||
|
||||
.onecontent_oen {
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
height: 70rpx;
|
||||
border-radius: 36rpx;
|
||||
border:1rpx solid var(--bg-color-button);
|
||||
padding-right: 8rpx;
|
||||
|
||||
.onecontent_oen_input {
|
||||
padding-left: 32rpx;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.onecontent_oen_text {
|
||||
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
width: 116rpx;
|
||||
height: 56rpx;
|
||||
background: var(--bg-color-button);
|
||||
border-radius: 36rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.onecontent_tow {
|
||||
padding: 32rpx 0 32rpx 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
overflow: auto;
|
||||
|
||||
.onecontent_tow_item:nth-child(1) {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.onecontent_tow_item {
|
||||
position: relative;
|
||||
margin-left: 60rpx;
|
||||
white-space: nowrap;
|
||||
|
||||
.onecontent_tow_itemtexts {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: var(--bg-color-button);
|
||||
}
|
||||
|
||||
.onecontent_tow_itemtext {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.onecontent_tow_itemtextsimges{
|
||||
position: absolute;
|
||||
bottom: -10rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 20rpx;
|
||||
height: 8rpx;
|
||||
background-size: cover;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.towcontent {
|
||||
padding: 0 24rpx;
|
||||
|
||||
.towcontentitem {
|
||||
margin-top: 32rpx;
|
||||
width:48%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx;
|
||||
|
||||
.towcontentitemone {
|
||||
width: 100%;
|
||||
.towcontentitemtow_imge {
|
||||
border-top-left-radius: 18rpx;
|
||||
border-top-right-radius: 18rpx;
|
||||
width: 100%;
|
||||
height: 266rpx;
|
||||
}
|
||||
|
||||
.towcontentitemtow_item {
|
||||
padding: 16rpx;
|
||||
width: 100%;
|
||||
|
||||
.towcontentitemtow_one {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.towcontentitemtow_tow {
|
||||
font-size: 22rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.towcontentitemtow_there {
|
||||
margin-top: 14rpx;
|
||||
|
||||
.towcontentitemtow_there_one {
|
||||
text {
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
font-size: 4rpx;
|
||||
font-family: SourceHanSansCN-Bold-,
|
||||
SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #FC5F69;
|
||||
}
|
||||
|
||||
.towcontentitemtow_there_tow {
|
||||
text-decoration: line-through;
|
||||
margin-left: 10rpx;
|
||||
font-size: 22rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.warp {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
|
||||
.rect {
|
||||
padding: 40rpx 68rpx;
|
||||
width: 480rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 42rpx;
|
||||
|
||||
.rectone {
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.recttow {
|
||||
width: 100%;
|
||||
margin-top: 32rpx;
|
||||
|
||||
.recttow_one {
|
||||
padding: 8rpx 40rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 26rpx;
|
||||
border: 2rpx solid #999999;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.recttow_tow {
|
||||
padding: 8rpx 40rpx;
|
||||
background: #333333;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
border-radius: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
559
pages/mall/mallInfo.vue
Normal file
559
pages/mall/mallInfo.vue
Normal file
@@ -0,0 +1,559 @@
|
||||
<template>
|
||||
<view class="content" :style="[theme]">
|
||||
<image class="contentimage" :src="lsitform.img" mode="aspectFill"></image>
|
||||
<view class="contentbox">
|
||||
<view class="contentbox_one">
|
||||
{{lsitform.title_name}}
|
||||
</view>
|
||||
<view class="contentbox_tow">
|
||||
<text>¥</text>{{lsitform.price}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentboxtow">
|
||||
<view class="onecontentterewone flex-start">
|
||||
<view class="onecontenttereone_one">
|
||||
产品介绍
|
||||
</view>
|
||||
</view>
|
||||
<view class="introduction_yow" v-html="list.details">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view :style="{height:height}">
|
||||
|
||||
</view>
|
||||
<view class="fixedview flex-between">
|
||||
<view class="fixedview_letr flex-start">
|
||||
<view class="fixedview_letr_item flex-colum" @click="eeInfoindex">
|
||||
<image src="@/static/mall/s.png" mode="aspectFill"></image>
|
||||
<text>首页</text>
|
||||
</view>
|
||||
<view class="fixedview_letr_item flex-colum" @click="makePhoneCall">
|
||||
<image src="@/static/mall/k.png" mode="aspectFill"></image>
|
||||
<text>客服</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fixedview_tow flex-between">
|
||||
<view class="fixedview_towone" @click="overlayshowsboxs(1)">
|
||||
加入购物车
|
||||
</view>
|
||||
<view class="fixedview_towtow" @click="overlayshowsboxs(2)">
|
||||
立即购买
|
||||
</view>
|
||||
<!-- <view class="fixedview_towtow" style="background: #ccc;">
|
||||
立即购买
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<u-overlay :show="overlayshow">
|
||||
<view class="warp" :style="[theme]">
|
||||
<view class="rect" @tap.stop>
|
||||
<view class="onerect flex-start" :style="[theme]">
|
||||
<image class="onecontentone_image" :src="lsitform.img" mode="aspectFill"></image>
|
||||
<view class="nonecontentone_view flex-colum-start">
|
||||
<text class="nonecontentone_view_one">{{lsitform.title_name}}</text>
|
||||
<text class="nonecontentone_view_otow">¥{{lsitform.price}}</text>
|
||||
</view>
|
||||
<view class="onerecticon" @click="overlayshow = false">
|
||||
<u-icon @click="overlayshow = false" name="close-circle-fill" color="#000000"
|
||||
size="24"></u-icon>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="towrect" v-for="(item,n) in list.spec" :key="item.id">
|
||||
<view class="towrect_one">
|
||||
{{item.spec_name}}
|
||||
</view>
|
||||
<view class="flex-start">
|
||||
<view class="towrect_tow" v-for="(item1,index1) in item.spec_options" :key="index1"
|
||||
@click="overlayshowsbox(item1,index1)">
|
||||
<!-- "towrecttowclass == index1?'towrect_towtext':'towrect_towtexts'" -->
|
||||
<view
|
||||
:class="[item1.isShow?'noneActive':'',towrecttowclass == index1?'towrect_towtext':'towrect_towtexts']">
|
||||
{{item1.name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="thererect flex-between">
|
||||
<view class="thererect_one">
|
||||
购买数量
|
||||
</view>
|
||||
<view class="thererect_tow">
|
||||
<u-number-box v-model="numberbox" :min="1" button-size="24" color="#ffffff"
|
||||
:bgColor="theme.cartpieces" iconStyle="color: #fff" integer></u-number-box>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="fuorrect flex-between">
|
||||
<view class="fuorrect_one">
|
||||
合计
|
||||
</view>
|
||||
<view class="fuorrect_tow">
|
||||
¥{{list.price}}
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="fvirect flex-center" @click="requestSubscribeMessage">
|
||||
确定
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-overlay>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import bottombbar from '@/components/bottombbar.vue'
|
||||
export default {
|
||||
components: {
|
||||
bottombbar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
goods_id: '',
|
||||
overlayshow: false,
|
||||
towrecttowclass: 0,
|
||||
numberbox: 1,
|
||||
list: {},
|
||||
height: '',
|
||||
lsitform: {},
|
||||
selectArr: [], //存放被选中的值
|
||||
shopItemInfo: {}, //存放要和选中的值进行匹配的数据
|
||||
subIndex: [], //是否选中 因为不确定是多规格还是单规格,所以这里定义数组来判断
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
console.log(this.$store.getters.theme)
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
onLoad(e) {
|
||||
this.goods_id = e.id
|
||||
this.shoppingindexgoodsgoodsdetail()
|
||||
},
|
||||
onShow() {},
|
||||
mounted() {
|
||||
//#ifdef MP-WEIXIN || H5
|
||||
var query = uni.createSelectorQuery().in(this).select('.fixedview')
|
||||
query.boundingClientRect(ele => {
|
||||
var that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.height = (ele.height) + "px";
|
||||
that = null;
|
||||
}
|
||||
})
|
||||
}).exec();
|
||||
//#endif
|
||||
//#ifdef MP-ALIPAY
|
||||
my.createSelectorQuery().selectAll('.fixedview').boundingClientRect().exec(ele => {
|
||||
var nodeData = ele[0]
|
||||
var that = this;
|
||||
that.height = (nodeData.height) + "px";
|
||||
that = null;
|
||||
})
|
||||
//#endif
|
||||
},
|
||||
methods: {
|
||||
makePhoneCall() {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: this.list.mobile //打电话
|
||||
});
|
||||
},
|
||||
overlayshowsboxs(e) {
|
||||
this.cartshping = e
|
||||
this.overlayshow = true
|
||||
},
|
||||
async overlayshowsbox(item1, index1) {
|
||||
this.towrecttowclass = index1
|
||||
this.lsitform = item1
|
||||
this.lsitform.title_name = item1.title_name
|
||||
// this.lsitform.name = item1.name
|
||||
console.log(this.lsitform)
|
||||
},
|
||||
async requestSubscribeMessage() {
|
||||
if (this.lsitform.id == '' || this.lsitform.id == null) {
|
||||
uni.showToast({
|
||||
title: '请选择合法规格',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.cartshping == 1) {
|
||||
this.$u.debounce(this.shoppingindexgoodindexsaddcar(), 200);
|
||||
} else {
|
||||
uni.pro.navigateTo('mall/confirm', {
|
||||
type: 2, // 1购物车 2商品详情页
|
||||
goods_id: this.goods_id, //商品ID 商品详情页来源时必填
|
||||
car_id: '', //购物车ID 1,2 购物车来源时必填
|
||||
number: this.numberbox, //商品详情页来源时必填
|
||||
spec: this.lsitform.name, //规格 商品详情页来源时必填
|
||||
address_id: '', //地址ID 可以为空(为空时返回默认地址)
|
||||
})
|
||||
}
|
||||
},
|
||||
async shoppingindexgoodindexsaddcar() {
|
||||
let res = await this.api.shoppingindexgoodindexsaddcar({
|
||||
number: this.numberbox,
|
||||
goods_id: this.goods_id,
|
||||
spec: this.lsitform.name,
|
||||
})
|
||||
if (res == 1) {
|
||||
this.overlayshow = false
|
||||
console.log(res)
|
||||
uni.showToast({
|
||||
title: '添加购物车成功',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
eeInfoindex() { //去首页
|
||||
uni.pro.navigateTo('mall/index')
|
||||
},
|
||||
async shoppingindexgoodsgoodsdetail() {
|
||||
let res = await this.api.shoppingindexgoodsgoodsdetail({
|
||||
goods_id: this.goods_id
|
||||
})
|
||||
this.list = res
|
||||
this.lsitform = res.spec[0]
|
||||
this.lsitform.title_name = res.spec[0].title
|
||||
this.lsitform.img = res.host_img
|
||||
this.list.details = res.details.replace(/style\s*?=\s*?([‘"])[\s\S]*?\1/ig,
|
||||
'style="max-width:100%;height:auto;"') // 替换style
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
|
||||
.fixedview {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 24rpx 28rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.fixedview_letr {
|
||||
.fixedview_letr_item:nth-child(1) {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.fixedview_letr_item {
|
||||
margin-left: 32rpx;
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
margin-top: 8rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fixedview_one {
|
||||
.fixedview_oneone {
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.fixedview_onetow {
|
||||
font-size: 44rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #F45C4C;
|
||||
font-weight: bold;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fixedview_tow {
|
||||
flex: auto;
|
||||
padding-left: 24rpx;
|
||||
|
||||
.fixedview_towone {
|
||||
width: 50%;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: var(--cart-text-color);
|
||||
height: 72rpx;
|
||||
line-height: 72rpx;
|
||||
text-align: center;
|
||||
border-radius: 50rpx 0 0 50rpx;
|
||||
background: var(--cart-background-color);
|
||||
}
|
||||
|
||||
.fixedview_towtow {
|
||||
width: 50%;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: var(--cart-text-color);
|
||||
height: 72rpx;
|
||||
line-height: 72rpx;
|
||||
text-align: center;
|
||||
border-radius: 0 50rpx 50rpx 0;
|
||||
background: var(--cartbuy-background-color);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.warp {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
|
||||
.rect {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 60rpx 60rpx 0px 0px;
|
||||
padding: 48rpx 32rpx 32rpx 32rpx;
|
||||
|
||||
.onerect {
|
||||
position: relative;
|
||||
padding-bottom: 34rpx;
|
||||
border-bottom: 1rpx solid #F7F7F7;
|
||||
|
||||
image {
|
||||
width: 124rpx;
|
||||
height: 124rpx;
|
||||
}
|
||||
|
||||
.nonecontentone_view {
|
||||
|
||||
margin-left: 16rpx;
|
||||
|
||||
.nonecontentone_view_one {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.nonecontentone_view_otow {
|
||||
margin-top: 10rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.onerecticon {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.towrect {
|
||||
padding-bottom: 34rpx;
|
||||
border-bottom: 1rpx solid #F7F7F7;
|
||||
padding-top: 34rpx;
|
||||
|
||||
.towrect_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.towrect_tow {
|
||||
margin-top: 16rpx;
|
||||
margin-left: 10rpx;
|
||||
|
||||
.noneActive {
|
||||
background-color: #ccc;
|
||||
opacity: 0.4;
|
||||
color: #000;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.towrect_towtext {
|
||||
width: 100%;
|
||||
background: var(--specbackground-color);
|
||||
border-radius: 8rpx;
|
||||
border: 1rpx solid var(--bg-color-button);
|
||||
padding: 8rpx 26rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: var(--spec-text-color);
|
||||
}
|
||||
|
||||
|
||||
.towrect_towtexts {
|
||||
width: 100%;
|
||||
background: #F7F7F7;
|
||||
border-radius: 8rpx;
|
||||
padding: 8rpx 26rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.thererect {
|
||||
padding: 34rpx 0;
|
||||
border-bottom: 1rpx solid #F7F7F7;
|
||||
border-top: 1rpx solid #F7F7F7;
|
||||
|
||||
.thererect_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.thererect_tow {}
|
||||
}
|
||||
|
||||
.fuorrect {
|
||||
margin-top: 32rpx;
|
||||
|
||||
.fuorrect_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.fuorrect_tow {
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.fvirect {
|
||||
margin-top: 200rpx;
|
||||
padding: 16rpx;
|
||||
text-align: center;
|
||||
background: var(--bg-color-button);
|
||||
border-radius: 40rpx;
|
||||
font-size: 36rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
.contentimage {
|
||||
width: 100%;
|
||||
height: 528rpx;
|
||||
}
|
||||
|
||||
.contentbox {
|
||||
padding: 28rpx 32rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
|
||||
.contentbox_one {
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.contentbox_tow {
|
||||
margin-top: 12rpx;
|
||||
|
||||
text {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
font-size: 34rpx;
|
||||
font-family: SourceHanSansCN-Bold-,
|
||||
SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #FC5F69;
|
||||
}
|
||||
}
|
||||
|
||||
.contentboxtow {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
padding: 28rpx 32rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.onecontentterewone::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 4rpx;
|
||||
height: 24rpx;
|
||||
background: var(--bg-color-button);
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.onecontentterewone {
|
||||
.onecontenttereone_one {
|
||||
margin-left: 16rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #1A1A1A;
|
||||
|
||||
text {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.introduction_yow {
|
||||
margin-top: 18rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #1A1A1A;
|
||||
width: 100%;
|
||||
|
||||
/deep/ [alt] {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/deep/ img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/deep/ p {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
637
pages/mall/mallInfos.vue
Normal file
637
pages/mall/mallInfos.vue
Normal file
@@ -0,0 +1,637 @@
|
||||
<template>
|
||||
<view class="content" :style="[theme]">
|
||||
<image class="contentimage" :src="lsitform.img" mode="aspectFill"></image>
|
||||
<view class="contentbox">
|
||||
<view class="contentbox_one">
|
||||
{{lsitform.name}}
|
||||
</view>
|
||||
<view class="contentbox_tow">
|
||||
<text>¥</text>{{lsitform.price}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentboxtow">
|
||||
<view class="onecontentterewone flex-start">
|
||||
<view class="onecontenttereone_one">
|
||||
产品介绍
|
||||
</view>
|
||||
</view>
|
||||
<view class="introduction_yow" v-html="list.details">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view :style="{height:height}">
|
||||
|
||||
</view>
|
||||
<view class="fixedview flex-between">
|
||||
<view class="fixedview_letr flex-start">
|
||||
<view class="fixedview_letr_item flex-colum" @click="eeInfoindex">
|
||||
<image src="@/static/mall/s.png" mode="aspectFill"></image>
|
||||
<text>首页</text>
|
||||
</view>
|
||||
<view class="fixedview_letr_item flex-colum" @click="makePhoneCall">
|
||||
<image src="@/static/mall/k.png" mode="aspectFill"></image>
|
||||
<text>客服</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fixedview_tow flex-between">
|
||||
<view class="fixedview_towone" @click="overlayshowsboxs(1)">
|
||||
加入购物车
|
||||
</view>
|
||||
<view class="fixedview_towtow" @click="overlayshowsboxs(2)">
|
||||
立即购买
|
||||
</view>
|
||||
<!-- <view class="fixedview_towtow" style="background: #ccc;">
|
||||
立即购买
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<u-overlay :show="overlayshow">
|
||||
<view class="warp" :style="[theme]">
|
||||
<view class="rect" @tap.stop>
|
||||
<view class="onerect flex-start" :style="[theme]">
|
||||
<image class="onecontentone_image" :src="lsitform.img" mode="aspectFill"></image>
|
||||
<view class="nonecontentone_view flex-colum-start">
|
||||
<text class="nonecontentone_view_one">{{lsitform.name}}</text>
|
||||
<text class="nonecontentone_view_otow">¥{{lsitform.price}}</text>
|
||||
</view>
|
||||
<view class="onerecticon" @click="overlayshow = false">
|
||||
<u-icon @click="overlayshow = false" name="close-circle-fill" color="#000000"
|
||||
size="24"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="towrect" v-for="(item,n) in list.spec" :key="item.id">
|
||||
<view class="towrect_one">
|
||||
{{item.spec_name}}
|
||||
</view>
|
||||
<view class="flex-start">
|
||||
<view class="towrect_tow" v-for="(item1,index1) in item.spec_options" :key="index1"
|
||||
@click="overlayshowsbox(item1,index1,n,item)">
|
||||
<!-- <view
|
||||
:class="[item1.isShow?'towrect_towtext':'towrect_towtexts',subIndex[index] == index1?'productActive':'noneActive']"> -->
|
||||
<view
|
||||
:class="[n == 1 && item1.isShow ?'noneActive':'',subIndex[n] == index1?'towrect_towtext':'towrect_towtexts']">
|
||||
|
||||
{{item1.name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="thererect flex-between">
|
||||
<view class="thererect_one">
|
||||
购买数量
|
||||
</view>
|
||||
<view class="thererect_tow">
|
||||
<u-number-box v-model="numberbox" :min="1" button-size="24" color="#ffffff"
|
||||
:bgColor="theme.cartpieces" iconStyle="color: #fff" integer></u-number-box>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="fuorrect flex-between">
|
||||
<view class="fuorrect_one">
|
||||
合计
|
||||
</view>
|
||||
<view class="fuorrect_tow">
|
||||
¥{{list.price}}
|
||||
</view>
|
||||
</view> -->
|
||||
<view v-if="!itemuptodate" class="fvirect flex-center" @click="requestSubscribeMessage">
|
||||
确定
|
||||
</view>
|
||||
<view v-else class="fvirect flex-center" style="background:rgb(249, 249, 249);color: #333;">
|
||||
确定
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-overlay>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import bottombbar from '@/components/bottombbar.vue'
|
||||
export default {
|
||||
components: {
|
||||
bottombbar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
goods_id: '',
|
||||
overlayshow: false,
|
||||
towrecttowclass: 0,
|
||||
numberbox: 1,
|
||||
list: {},
|
||||
height: '',
|
||||
lsitform: {},
|
||||
specid: [],
|
||||
itemuptodate: false,
|
||||
selectArr: [], //存放被选中的值
|
||||
shopItemInfo: {}, //存放要和选中的值进行匹配的数据
|
||||
subIndex: [], //是否选中 因为不确定是多规格还是单规格,所以这里定义数组来判断
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
onLoad(e) {
|
||||
this.goods_id = e.id
|
||||
this.shoppingindexgoodsgoodsdetail()
|
||||
},
|
||||
onShow() {},
|
||||
mounted() {
|
||||
//#ifdef MP-WEIXIN || H5
|
||||
var query = uni.createSelectorQuery().in(this).select('.fixedview')
|
||||
query.boundingClientRect(ele => {
|
||||
var that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.height = (ele.height) + "px";
|
||||
that = null;
|
||||
}
|
||||
})
|
||||
}).exec();
|
||||
//#endif
|
||||
//#ifdef MP-ALIPAY
|
||||
my.createSelectorQuery().selectAll('.fixedview').boundingClientRect().exec(ele => {
|
||||
var nodeData = ele[0]
|
||||
var that = this;
|
||||
that.height = (nodeData.height) + "px";
|
||||
that = null;
|
||||
})
|
||||
//#endif
|
||||
},
|
||||
methods: {
|
||||
makePhoneCall() {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: this.list.mobile //打电话
|
||||
});
|
||||
},
|
||||
overlayshowsboxs(e) {
|
||||
this.cartshping = e
|
||||
this.overlayshow = true
|
||||
},
|
||||
async overlayshowsbox(item1, index1, index, item) {
|
||||
if (item1.isShow && index == 1) {
|
||||
uni.showToast({
|
||||
title: '库存不足',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.specid[index] != item1.id) {
|
||||
this.specid[index] = item1.id //规格id
|
||||
} else {
|
||||
this.specid[index] = '' //规格id
|
||||
}
|
||||
|
||||
if (this.selectArr[index] != item1.name) {
|
||||
this.selectArr[index] = item1.name;
|
||||
this.subIndex[index] = index1;
|
||||
} else {
|
||||
this.selectArr[index] = '';
|
||||
this.subIndex[index] = -1; //去掉选中的颜色
|
||||
}
|
||||
let res = await this.api.shoppinggoodsproductspec({
|
||||
spec: this.selectArr[0],
|
||||
goods_id: this.goods_id,
|
||||
})
|
||||
if (res) {
|
||||
this.shopItemInfo = res
|
||||
console.log(this.shopItemInfo[this.subIndex[index]])
|
||||
if (this.subIndex[index] != -1) {
|
||||
this.lsitform = this.shopItemInfo[this.subIndex[index]]
|
||||
this.lsitform.name = this.shopItemInfo[this.subIndex[index]].title_name
|
||||
}
|
||||
}
|
||||
this.checkItem();
|
||||
},
|
||||
checkItem() {
|
||||
var option = this.list.spec;
|
||||
var result = []; //定义数组储存被选中的值
|
||||
for (var i in option) {
|
||||
result[i] = this.selectArr[i] ? this.selectArr[i] : '';
|
||||
}
|
||||
for (var i in option) {
|
||||
var last = result[i]; //把选中的值存放到字符串last去
|
||||
for (var k in option[i].spec_options) {
|
||||
result[i] = option[i].spec_options[k].name; //赋值,存在直接覆盖,不存在往里面添加name值
|
||||
option[i].spec_options[k].isShow = this.isMay(k); //在数据里面添加字段isShow来判断是否可以选择
|
||||
}
|
||||
result[i] = last; //还原,目的是记录点下去那个值,避免下一次执行循环时被覆盖
|
||||
}
|
||||
// if (this.shopItemInfo[result]) {
|
||||
// console.log(this.shopItemInfo[result])
|
||||
// // this.stock = this.shopItemInfo[result].stock || ''
|
||||
// }
|
||||
try {
|
||||
this.itemuptodate = this.list.spec[1].spec_options[this.subIndex[1]].isShow //最新的
|
||||
console.log(this.itemuptodate)
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
this.$forceUpdate(); //重绘
|
||||
},
|
||||
isMay(result) {
|
||||
let res = ''
|
||||
try {
|
||||
res = this.shopItemInfo[result].stock == 0 ? true : false
|
||||
} catch (e) {
|
||||
res = false
|
||||
}
|
||||
return res; //匹配选中的数据的库存,若不为空返回true反之返回false
|
||||
},
|
||||
async requestSubscribeMessage() {
|
||||
if (this.itemuptodate) {
|
||||
uni.showToast({
|
||||
title: '暂无库存',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.selectArr[0] == '' || this.selectArr[1] == '' || this.selectArr.length == 0) {
|
||||
uni.showToast({
|
||||
title: '请选择合法规格',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
console.log(this.specid, this.selectArr)
|
||||
if (this.cartshping == 1) {
|
||||
this.$u.debounce(this.shoppingindexgoodindexsaddcar(), 200);
|
||||
} else {
|
||||
uni.pro.navigateTo('mall/confirm', {
|
||||
type: 2, // 1购物车 2商品详情页
|
||||
goods_id: this.goods_id, //商品ID 商品详情页来源时必填
|
||||
car_id: '', //购物车ID 1,2 购物车来源时必填
|
||||
number: this.numberbox, //商品详情页来源时必填
|
||||
spec: this.selectArr.toString(), //规格 商品详情页来源时必填
|
||||
address_id: '', //地址ID 可以为空(为空时返回默认地址)
|
||||
})
|
||||
}
|
||||
},
|
||||
async shoppingindexgoodindexsaddcar() {
|
||||
let res = await this.api.shoppingindexgoodindexsaddcar({
|
||||
number: this.numberbox,
|
||||
goods_id: this.goods_id,
|
||||
spec: this.selectArr.toString(), //规格 商品详情页来源时必填
|
||||
})
|
||||
if (res == 1) {
|
||||
this.overlayshow = false
|
||||
console.log(res)
|
||||
uni.showToast({
|
||||
title: '添加购物车成功',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
|
||||
},
|
||||
eeInfoindex() { //去首页
|
||||
uni.pro.navigateTo('mall/index')
|
||||
},
|
||||
async shoppingindexgoodsgoodsdetail() {
|
||||
let res = await this.api.shoppingindexgoodsgoodsdetail({
|
||||
goods_id: this.goods_id
|
||||
})
|
||||
this.list = res
|
||||
this.lsitform = res.spec[0]
|
||||
this.lsitform.name = res.spec[0].title
|
||||
this.lsitform.img = res.host_img
|
||||
this.checkItem()
|
||||
this.list.details = res.details.replace(/\<img/g, '<img style="max-width:100%;height:auto" ');
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
|
||||
.fixedview {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 24rpx 28rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.fixedview_letr {
|
||||
.fixedview_letr_item:nth-child(1) {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.fixedview_letr_item {
|
||||
margin-left: 32rpx;
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
margin-top: 8rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fixedview_one {
|
||||
.fixedview_oneone {
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.fixedview_onetow {
|
||||
font-size: 44rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #F45C4C;
|
||||
font-weight: bold;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fixedview_tow {
|
||||
flex: auto;
|
||||
padding-left: 24rpx;
|
||||
|
||||
.fixedview_towone {
|
||||
width: 50%;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: var(--cart-text-color);
|
||||
height: 72rpx;
|
||||
line-height: 72rpx;
|
||||
text-align: center;
|
||||
border-radius: 50rpx 0 0 50rpx;
|
||||
background: var(--cart-background-color);
|
||||
}
|
||||
|
||||
.fixedview_towtow {
|
||||
width: 50%;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: var(--cart-text-color);
|
||||
height: 72rpx;
|
||||
line-height: 72rpx;
|
||||
text-align: center;
|
||||
border-radius: 0 50rpx 50rpx 0;
|
||||
background: var(--cartbuy-background-color);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.warp {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
|
||||
.rect {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 60rpx 60rpx 0px 0px;
|
||||
padding: 48rpx 32rpx 32rpx 32rpx;
|
||||
|
||||
.onerect {
|
||||
position: relative;
|
||||
padding-bottom: 34rpx;
|
||||
border-bottom: 1rpx solid #F7F7F7;
|
||||
|
||||
image {
|
||||
width: 124rpx;
|
||||
height: 124rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.nonecontentone_view {
|
||||
|
||||
margin-left: 16rpx;
|
||||
|
||||
.nonecontentone_view_one {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.nonecontentone_view_otow {
|
||||
margin-top: 10rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.onerecticon {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.towrect {
|
||||
padding-bottom: 34rpx;
|
||||
border-bottom: 1rpx solid #F7F7F7;
|
||||
padding-top: 34rpx;
|
||||
|
||||
.towrect_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.towrect_tow {
|
||||
margin-top: 16rpx;
|
||||
margin-left: 10rpx;
|
||||
|
||||
.noneActive {
|
||||
background-color: #ccc;
|
||||
opacity: 0.4;
|
||||
color: #000;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.towrect_towtext {
|
||||
width: 100%;
|
||||
background: var(--specbackground-color);
|
||||
border-radius: 8rpx;
|
||||
border: 1rpx solid var(--bg-color-button);
|
||||
padding: 8rpx 26rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: var(--spec-text-color);
|
||||
}
|
||||
|
||||
|
||||
|
||||
.towrect_towtexts {
|
||||
width: 100%;
|
||||
background: #F7F7F7;
|
||||
border-radius: 8rpx;
|
||||
padding: 8rpx 26rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.thererect {
|
||||
padding: 34rpx 0;
|
||||
border-bottom: 1rpx solid #F7F7F7;
|
||||
border-top: 1rpx solid #F7F7F7;
|
||||
|
||||
.thererect_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.thererect_tow {}
|
||||
}
|
||||
|
||||
.fuorrect {
|
||||
margin-top: 32rpx;
|
||||
|
||||
.fuorrect_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.fuorrect_tow {
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.fvirect {
|
||||
margin-top: 200rpx;
|
||||
padding: 16rpx;
|
||||
text-align: center;
|
||||
background: var(--bg-color-button);
|
||||
border-radius: 40rpx;
|
||||
font-size: 36rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
.contentimage {
|
||||
width: 100%;
|
||||
height: 528rpx;
|
||||
}
|
||||
|
||||
.contentbox {
|
||||
padding: 28rpx 32rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
|
||||
.contentbox_one {
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.contentbox_tow {
|
||||
margin-top: 12rpx;
|
||||
|
||||
text {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
font-size: 34rpx;
|
||||
font-family: SourceHanSansCN-Bold-,
|
||||
SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #FC5F69;
|
||||
}
|
||||
}
|
||||
|
||||
.contentboxtow {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
padding: 28rpx 32rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.onecontentterewone::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 4rpx;
|
||||
height: 24rpx;
|
||||
background: var(--bg-color-button);
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.onecontentterewone {
|
||||
.onecontenttereone_one {
|
||||
margin-left: 16rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #1A1A1A;
|
||||
|
||||
text {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.introduction_yow {
|
||||
margin-top: 18rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #1A1A1A;
|
||||
width: 100%;
|
||||
|
||||
/deep/ [alt] {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/deep/ img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/deep/ p {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
447
pages/mall/order/applylrefund.vue
Normal file
447
pages/mall/order/applylrefund.vue
Normal file
@@ -0,0 +1,447 @@
|
||||
<template>
|
||||
<view class="index">
|
||||
<view class="boxcontent">
|
||||
<u-steps :current="datalist.status.status_b" dot direction="column">
|
||||
<u-steps-item v-for="(item,index) in datalist.status.refund" :key="index" :title="item"></u-steps-item>
|
||||
</u-steps>
|
||||
</view>
|
||||
<view class="onecontent" style="margin-top: 32rpx;">
|
||||
<view class="onecontentone_one">
|
||||
退款信息
|
||||
</view>
|
||||
<view class="onecontentone_otow flex-between" v-for="(item,index) in datalist.goods" :key="index" @click="detailsInfo(item.store_service_id)">
|
||||
<image :src="item.img" mode="aspectFill"></image>
|
||||
<view class="flex-colum-start">
|
||||
<view class="onecontentone">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="onecontentones">
|
||||
{{item.spec}}
|
||||
</view>
|
||||
<view class="onecontenttow">
|
||||
<view class="onecontenttowabsolute">
|
||||
x{{item.number}}
|
||||
</view>
|
||||
<text style="font-size:28rpx;">¥</text>{{item.price}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontentone_item flex-between">
|
||||
<view class="onecontentone_itemone">
|
||||
退款原因
|
||||
</view>
|
||||
<view class="onecontentone_itemtow">
|
||||
{{datalist.reason}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontentone_item flex-between">
|
||||
<view class="onecontentone_itemone">
|
||||
退款金额
|
||||
</view>
|
||||
<view class="onecontentone_itemtow">
|
||||
{{datalist.order_price}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontentone_item flex-between">
|
||||
<view class="onecontentone_itemone">
|
||||
申请件数
|
||||
</view>
|
||||
<view class="onecontentone_itemtow">
|
||||
{{datalist.number}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontentone_item flex-between">
|
||||
<view class="onecontentone_itemone">
|
||||
申请时间
|
||||
</view>
|
||||
<view class="onecontentone_itemtow">
|
||||
{{datalist.createtime}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontentone_item flex-between">
|
||||
<view class="onecontentone_itemone">
|
||||
退款编号
|
||||
</view>
|
||||
<view class="onecontentone_itemtow flex-start">
|
||||
{{datalist.out_trade_no}}
|
||||
<text class="therecontentfive_box" @click="copy(datalist.out_trade_no)">复制</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view :style="{height:height}">
|
||||
|
||||
</view>
|
||||
<view class="fixedview flex-between" v-if="datalist.status.status == 0 || datalist.status.status == 2">
|
||||
<view class="fixedview_one flex-start">
|
||||
<!-- <view class="fixedview_oneone">
|
||||
应付金额:
|
||||
</view>
|
||||
<view class="fixedview_onetow">
|
||||
<text>¥</text>11
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="fixedview_tow" @click="cancelrefund">
|
||||
取消退款
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uploadImage from "@/js_sdk/yushijie-ossutil/ossutil/uploadFile.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
height: '',
|
||||
datalist: {
|
||||
status: {
|
||||
status_b: '',
|
||||
status: ''
|
||||
}
|
||||
},
|
||||
order_id: ""
|
||||
}
|
||||
},
|
||||
async onLoad(e) {
|
||||
this.order_id = e.id
|
||||
try {
|
||||
let res = await this.api.shoppingorderorderrefunddetail({
|
||||
order_id: this.order_id
|
||||
})
|
||||
if (res) {
|
||||
this.datalist = res
|
||||
}
|
||||
} catch (e) {}
|
||||
// this.generate()
|
||||
},
|
||||
mounted() {
|
||||
//#ifdef MP-WEIXIN || H5
|
||||
var query = uni.createSelectorQuery().in(this).select('.fixedview')
|
||||
query.boundingClientRect(ele => {
|
||||
var that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.height = (ele.height) + "px";
|
||||
that = null;
|
||||
}
|
||||
})
|
||||
}).exec();
|
||||
//#endif
|
||||
//#ifdef MP-ALIPAY
|
||||
my.createSelectorQuery().selectAll('.fixedview').boundingClientRect().exec(ele => {
|
||||
var nodeData = ele[0]
|
||||
var that = this;
|
||||
that.height = (nodeData.height) + "px";
|
||||
that = null;
|
||||
})
|
||||
//#endif
|
||||
},
|
||||
methods: {
|
||||
detailsInfo(e) { //查看订单详情
|
||||
uni.pro.navigateTo('order/orderInfo', {
|
||||
id: e,
|
||||
})
|
||||
},
|
||||
copy(value) {
|
||||
//提示模板
|
||||
uni.setClipboardData({
|
||||
data: value, //要被复制的内容
|
||||
success: () => { //复制成功的回调函数
|
||||
uni.showToast({
|
||||
title: '复制成功'
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
async orderorderrefundcancel() {
|
||||
let res = await this.api.shoppingorderorderorderrefundcancel({
|
||||
order_id: this.datalist.order_id
|
||||
})
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: '成功取消退款',
|
||||
icon: 'none'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.redirectTo({
|
||||
url: '/pages/my/order/index?e=0'
|
||||
});
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
cancelrefund() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定取消退款吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.orderorderrefundcancel()
|
||||
} else if (res.cancel) {}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
.index {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.boxcontent {
|
||||
padding: 24rpx 32rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.onecontent {
|
||||
width: 100%;
|
||||
padding: 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.onecontentone_one {
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.onecontentone_otow {
|
||||
margin-top: 32rpx;
|
||||
|
||||
image {
|
||||
width: 176rpx;
|
||||
height: 176rpx;
|
||||
}
|
||||
|
||||
.flex-colum-start {
|
||||
flex: auto;
|
||||
margin-left: 20rpx;
|
||||
height: 176rpx;
|
||||
justify-content: space-around;
|
||||
|
||||
.onecontentone {
|
||||
width: 400rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
.onecontentones{
|
||||
width: 400rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 100;
|
||||
color: #666;
|
||||
}
|
||||
.onecontenttow {
|
||||
position: relative;
|
||||
margin-top: 16rpx;
|
||||
width: 100%;
|
||||
font-size: 40rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
|
||||
.onecontenttowabsolute {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.onecontentone_item {
|
||||
margin-top: 16rpx;
|
||||
width: 100%;
|
||||
|
||||
.onecontentone_itemone {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.onecontentone_itemtow {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
|
||||
.therecontentfive_box {
|
||||
padding: 6rpx 10rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #666666;
|
||||
background: #FFFFFF;
|
||||
margin-left: 6rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #D5D5D5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fixedview {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 24rpx 28rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.fixedview_one {
|
||||
.fixedview_oneone {
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.fixedview_onetow {
|
||||
font-size: 44rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #F45C4C;
|
||||
font-weight: bold;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fixedview_tow {
|
||||
background: linear-gradient(143deg, #8689AF 0%, #494A5F 100%);
|
||||
border-radius: 34rpx;
|
||||
padding: 10rpx 44rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.buoot {
|
||||
margin: 40rpx auto;
|
||||
width: 80%;
|
||||
padding: 16rpx 0;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
background: linear-gradient(115deg, #7E81A5 0%, #4D4E64 100%);
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
|
||||
.therecontent {
|
||||
margin-top: 24rpx;
|
||||
padding: 32rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx;
|
||||
|
||||
.therecontentone {
|
||||
width: 100%;
|
||||
padding: 10rpx 0;
|
||||
border-bottom: 1px solid #F7F7F7;
|
||||
|
||||
.therecontentone_one {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.therecontentone_text {
|
||||
flex: auto;
|
||||
margin-left: 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.fourcontent_items {
|
||||
position: relative;
|
||||
margin-top: 16rpx;
|
||||
margin-left: 20rpx;
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
background: #f9f9f9;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.fourcontent {
|
||||
.fourcontent_item {
|
||||
position: relative;
|
||||
margin-top: 16rpx;
|
||||
margin-left: 20rpx;
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
border-radius: 16rpx;
|
||||
|
||||
image {
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.fourcontent_itemtext {
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
right: 0rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.entowakst {
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.therecontentfive_box {
|
||||
padding: 6rpx 10rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #666666;
|
||||
background: #FFFFFF;
|
||||
margin-left: 6rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #D5D5D5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
850
pages/mall/order/cporderinfo.vue
Normal file
850
pages/mall/order/cporderinfo.vue
Normal file
@@ -0,0 +1,850 @@
|
||||
<template>
|
||||
<view class="index">
|
||||
<view class="onecontent">
|
||||
<view class="onecontentone flex-start">
|
||||
<image class="onecontentone_image" :src="listdata.host_img" mode="aspectFill"></image>
|
||||
<view class="onecontentone_one flex-colum-start">
|
||||
<text class="onecontentone_one_top">{{listdata.title}}</text>
|
||||
<view class="onecontentone_one_view"><text>¥</text>{{listdata.price}}</view>
|
||||
<!-- <view class="onecontentone_one_ts" @click="infoshow = true">
|
||||
查看详情
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="onecontenttow ">
|
||||
<view class="onecontenttowone flex-start">
|
||||
<view class="onecontenttowone_one">
|
||||
预约时间<text>(必填)</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontenttowtow flex-between">
|
||||
<view class="onecontenttowtow_item flex-between">
|
||||
<view class=" flex-colum" v-for="(item,index) in reservationlist" :key="index"
|
||||
:class="reservationshow == index ? 'onecontenttowtow_item_ones':'onecontenttowtow_item_one'"
|
||||
@click="reservation(item,index)">
|
||||
<text class="onecontenttowtow_item_one_textone">{{item.week}}</text>
|
||||
<text class="onecontenttowtow_item_one_texttow">{{item.date.slice(5,10)}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontenttowtow_left flex-colum" @click="calendarshow = true">
|
||||
<u-icon name="calendar" color="#b4b4b4" size="20"></u-icon>
|
||||
<text class="onecontenttowtow_lefttext">选择</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontenttowthere flex-start">
|
||||
<view v-for="(item,index) in 14" :key="index" @click="clicktime(item,index)"
|
||||
:class="timeshow == index?'onecontenttowthere_items':'onecontenttowthere_item'">
|
||||
10:00
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontenttere">
|
||||
<view class="onecontentterewone flex-start">
|
||||
<view class="onecontenttereone_one">
|
||||
发型师
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontentterewtow flex-start">
|
||||
<view class="onecontentterewtow_item flex-colum" v-for="(item,index) in 1">
|
||||
<image src="@/static/logo.png" mode="aspectFill"></image>
|
||||
<text>John</text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="introduction">
|
||||
<view class="introduction_one">
|
||||
【服务简介}
|
||||
</view>
|
||||
<view class="introduction_yow" v-html="listdata.details">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="onecontentfour">
|
||||
<view class="onecontentfourone flex-start">
|
||||
<view class="onecontentfourone_one">
|
||||
备注
|
||||
</view>
|
||||
</view>
|
||||
<u--textarea v-model="textarea" placeholder="请输入内容" autoHeight></u--textarea>
|
||||
</view> -->
|
||||
<u-overlay :show="infoshow" @click="infoshow = false">
|
||||
<view class="infowarp">
|
||||
<view class="inforect" @tap.stop>
|
||||
<view class="onerect flex-start">
|
||||
<view>服务详情</view>
|
||||
<u-icon @click="infoshow = false" class="onerecticon" name="backspace" color="#000000"
|
||||
size="28"></u-icon>
|
||||
</view>
|
||||
<view class="infotowrect flex-start">
|
||||
<image src="@/static/logo.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="infothererect flex-colum-start">
|
||||
<view class="infothererect_one">
|
||||
【洗剪吹】新娘造型
|
||||
</view>
|
||||
<view class="infothererect_one">
|
||||
¥120
|
||||
</view>
|
||||
</view>
|
||||
<view class="infofourrect">
|
||||
<view class="infofourrect_one">
|
||||
【服务简介
|
||||
</view>
|
||||
<view class="infofourrect_yow">
|
||||
烫发、编发、洗头、定型。
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-overlay>
|
||||
<u-overlay :show="overlayshow" @click="overlayshow = false">
|
||||
<view class="warp">
|
||||
<view class="rect" @tap.stop>
|
||||
<view class="onerect flex-start">
|
||||
<image class="onecontentone_image" :src="listdata.img" mode="aspectFill"></image>
|
||||
<view class="nonecontentone_view">{{listdata.title}}</view>
|
||||
<view class="onerecticon">
|
||||
<u-icon @click="overlayshow = false" name="backspace" color="#000000" size="28"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="towrect">
|
||||
<view class="towrect_one">
|
||||
预约时间:2023-06-16
|
||||
</view>
|
||||
<view class="towrect_tow">
|
||||
<text>10:00</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="thererect flex-between">
|
||||
<view class="thererect_one">
|
||||
预约服务
|
||||
</view>
|
||||
<view class="thererect_tow">
|
||||
<u-number-box v-model="numberbox" button-size="24" color="#ffffff" bgColor="#9397c1"
|
||||
iconStyle="color: #fff" integer @change="numberboxchange"></u-number-box>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="fuorrect flex-between">
|
||||
<view class="fuorrect_one">
|
||||
合计
|
||||
</view>
|
||||
<view class="fuorrect_tow">
|
||||
¥{{listdata.price}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="fvirect flex-center" @click="overlayshowclick">
|
||||
确定
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-overlay>
|
||||
<u-calendar mode="single" @confirm="confirm" :show="calendarshow" @close="calendarshow = false"></u-calendar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
overlayshow: false,
|
||||
infoshow: false,
|
||||
numberbox: "",
|
||||
height: '',
|
||||
timeshow: '',
|
||||
textarea: '',
|
||||
reservationshow: 0,
|
||||
calendarshow: false,
|
||||
reservationlist: [],
|
||||
inifid: '',
|
||||
listdata: {}
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log(e)
|
||||
this.inifid = e.id
|
||||
this.confirm()
|
||||
this.reservationdetail()
|
||||
|
||||
},
|
||||
mounted() {
|
||||
//#ifdef MP-WEIXIN || H5
|
||||
var query = uni.createSelectorQuery().in(this).select('.fixedview')
|
||||
query.boundingClientRect(ele => {
|
||||
var that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.height = (ele.height) + "px";
|
||||
that = null;
|
||||
}
|
||||
})
|
||||
}).exec();
|
||||
//#endif
|
||||
//#ifdef MP-ALIPAY
|
||||
my.createSelectorQuery().selectAll('.fixedview').boundingClientRect().exec(ele => {
|
||||
var nodeData = ele[0]
|
||||
var that = this;
|
||||
that.height = (nodeData.height) + "px";
|
||||
that = null;
|
||||
})
|
||||
//#endif
|
||||
},
|
||||
methods: {
|
||||
async reservationdetail() {
|
||||
let res = await this.api.shoppingindexgoodsgoodsdetail({
|
||||
goods_id: this.inifid,
|
||||
type:1
|
||||
})
|
||||
this.listdata = res
|
||||
this.listdata.details = res.details.replace(/\<img/g, '<img style="max-width:100%;height:auto" ');
|
||||
console.log(this.listdata)
|
||||
},
|
||||
reservation(a, b) {
|
||||
this.reservationshow = b
|
||||
console.log(a, b)
|
||||
},
|
||||
clicktime(a, b) {
|
||||
this.timeshow = b
|
||||
console.log(a, b)
|
||||
},
|
||||
numberboxchange(e) {
|
||||
console.log('当前值为: ' + e.value)
|
||||
},
|
||||
async overlayshowclick() {
|
||||
let res = await this.api.useruserinfo() //p判断是否完成手机号
|
||||
uni.cache.set('loginuser', res);
|
||||
this.overlayshow = false
|
||||
if (res.userinfo.mobile) {
|
||||
uni.pro.navigateTo('order/confirm', {
|
||||
id: this.inifid
|
||||
})
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认订单需要获取您的手机号',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/my/setup/index'
|
||||
});
|
||||
} else if (res.cancel) {}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
confirm(e) {
|
||||
if (e) {
|
||||
this.calendarshow = false
|
||||
console.log(new Date(e[0]));
|
||||
var now = new Date(e[0]);
|
||||
} else {
|
||||
//获取当前年月日
|
||||
var now = new Date();
|
||||
// var year = now.getFullYear(); //得到年份
|
||||
// var month = now.getMonth() + 1; //得到月份
|
||||
// var date = now.getDate(); //得到日期
|
||||
// data = year + "年" + month + "月" + date + "日";
|
||||
}
|
||||
this.reservationlist = []
|
||||
for (let i = 0; i < 7; i++) {
|
||||
var date = new Date(now.getTime() + i * 24 * 3600 * 1000);
|
||||
var year = date.getFullYear();
|
||||
var month = (date.getMonth() + 1) > 9 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1);
|
||||
var day = (date.getDate()) > 9 ? (date.getDate()) : '0' + (date.getDate());
|
||||
var dt2 = new Date(now.getTime() + i * 24 * 3600 * 1000);
|
||||
var weekDay = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
|
||||
// var weekDays = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
|
||||
this.reservationlist.push({
|
||||
date: year + "-" + month + "-" + day,
|
||||
// date: month + "-" + day,
|
||||
// day: day,
|
||||
// weekday: weekDays[dt2.getDay()],
|
||||
week: weekDay[dt2.getDay()],
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
/deep/ .mystyle {
|
||||
width: 100% !important;
|
||||
height: auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.index {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.onecontent {
|
||||
width: 100%;
|
||||
padding: 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.onecontentone {
|
||||
flex-wrap: nowrap;
|
||||
font-size: 32rpx;
|
||||
font-family: SourceHanSansCN-Medium-, SourceHanSansCN-Medium;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
|
||||
.onecontentone_image {
|
||||
width: 176rpx;
|
||||
height: 176rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.nonecontentone_view {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.onecontentone_one {
|
||||
position: relative;
|
||||
justify-content: space-evenly;
|
||||
flex: 1;
|
||||
margin-left: 24rpx;
|
||||
height: 176rpx;
|
||||
|
||||
.onecontentone_one_ts {
|
||||
padding: 8rpx 22rpx;
|
||||
position: absolute;
|
||||
top: 70%;
|
||||
transform: translateY(-50%);
|
||||
right: 0;
|
||||
background: #F7F7F7;
|
||||
border-radius: 28rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.onecontentone_one_top {
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.onecontentone_one_view {
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
font-size: 40rpx;
|
||||
font-family: SourceHanSansCN-Bold-,
|
||||
SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.onecontenttow {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
padding: 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.onecontenttowone::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 4rpx;
|
||||
height: 24rpx;
|
||||
background: #1A1A1A;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.onecontenttowone {
|
||||
.onecontenttowone_one {
|
||||
margin-left: 16rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #1A1A1A;
|
||||
|
||||
text {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.onecontenttowtow {
|
||||
margin-top: 32rpx;
|
||||
|
||||
.onecontenttowtow_item {
|
||||
flex: 1;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
.onecontenttowtow_item_one:nth-child(1) {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.onecontenttowtow_item_one {
|
||||
padding: 6rpx;
|
||||
|
||||
.onecontenttowtow_item_one_textone {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.onecontenttowtow_item_one_texttow {
|
||||
margin-top: 5rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.onecontenttowtow_item_ones {
|
||||
padding: 6rpx;
|
||||
border-radius: 10rpx;
|
||||
background: #1A1A1A;
|
||||
|
||||
.onecontenttowtow_item_one_textone {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.onecontenttowtow_item_one_texttow {
|
||||
margin-top: 5rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.onecontenttowtow_left {
|
||||
border-left: 1rpx solid #f9f9f9;
|
||||
background: #FFFFFF;
|
||||
padding-left: 24rpx;
|
||||
box-shadow: -2rpx 0px 4rpx 2rpx rgba(193, 193, 193, 0.09);
|
||||
|
||||
.onecontenttowtow_lefttext {
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.onecontenttowthere {
|
||||
.onecontenttowthere_item {
|
||||
width: 20%;
|
||||
margin: 16rpx 2.5%;
|
||||
text-align: center;
|
||||
background: #F7F7F7;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #F7F7F7;
|
||||
padding: 8rpx 26rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.onecontenttowthere_items {
|
||||
width: 20%;
|
||||
margin: 16rpx 2.5%;
|
||||
background: #F7F7F7;
|
||||
border-radius: 8rpx;
|
||||
border: 1rpx solid var(--bg-color-buttontow);
|
||||
padding: 8rpx 26rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: var(--bg-color-buttontow);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.onecontenttere {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
padding: 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.onecontentterewone::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 4rpx;
|
||||
height: 24rpx;
|
||||
background: #1A1A1A;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.onecontentterewone {
|
||||
.onecontenttereone_one {
|
||||
margin-left: 16rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #1A1A1A;
|
||||
|
||||
text {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.onecontentterewtow {
|
||||
|
||||
|
||||
.onecontentterewtow_item {
|
||||
margin: 0 15rpx;
|
||||
margin-top: 22rpx;
|
||||
padding: 20rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #F7F7F7;
|
||||
|
||||
image {
|
||||
width: 76rpx;
|
||||
height: 76rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
margin-top: 6rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.introduction {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
padding: 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.introduction_one {
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.introduction_yow {
|
||||
margin-top: 18rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #1A1A1A;
|
||||
width: 100%;
|
||||
|
||||
/deep/ [alt] {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/deep/ img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/deep/ p {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.onecontentfour {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
padding: 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.onecontentfourone::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 4rpx;
|
||||
height: 24rpx;
|
||||
background: #1A1A1A;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.onecontentfourone {
|
||||
padding-bottom: 16rpx;
|
||||
|
||||
.onecontentfourone_one {
|
||||
margin-left: 16rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #1A1A1A;
|
||||
|
||||
text {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.fixedview {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 24rpx 28rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.fixedview_one {
|
||||
.fixedview_oneone {
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.fixedview_onetow {
|
||||
font-size: 44rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #F45C4C;
|
||||
font-weight: bold;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fixedview_tow {
|
||||
background: linear-gradient(143deg, #8689AF 0%, #494A5F 100%);
|
||||
border-radius: 34rpx;
|
||||
padding: 10rpx 44rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.infowarp {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
|
||||
.inforect {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 60rpx 60rpx 0px 0px;
|
||||
padding: 48rpx 32rpx 32rpx 32rpx;
|
||||
|
||||
.onerect {
|
||||
position: relative;
|
||||
padding-bottom: 34rpx;
|
||||
border-bottom: 1rpx solid #F7F7F7;
|
||||
|
||||
view {
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.onerecticon {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.infotowrect {
|
||||
width: 686rpx;
|
||||
height: 640rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.infothererect {
|
||||
padding-bottom: 16rpx;
|
||||
border-bottom: 4rpx solid #F9F9F9;
|
||||
|
||||
.infothererect_one {
|
||||
margin-top: 22rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
}
|
||||
|
||||
.infofourrect {
|
||||
.infofourrect_one {
|
||||
margin-top: 32rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.infofourrect_yow {
|
||||
margin-top: 18rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.warp {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
|
||||
.rect {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 60rpx 60rpx 0px 0px;
|
||||
padding: 48rpx 32rpx 32rpx 32rpx;
|
||||
|
||||
.onerect {
|
||||
position: relative;
|
||||
padding-bottom: 34rpx;
|
||||
border-bottom: 1rpx solid #F7F7F7;
|
||||
|
||||
image {
|
||||
width: 124rpx;
|
||||
height: 124rpx;
|
||||
}
|
||||
|
||||
.nonecontentone_view {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-left: 16rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.onerecticon {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.towrect {
|
||||
padding-bottom: 34rpx;
|
||||
border-bottom: 1rpx solid #F7F7F7;
|
||||
padding-top: 34rpx;
|
||||
|
||||
.towrect_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.towrect_tow {
|
||||
margin-top: 16rpx;
|
||||
|
||||
text {
|
||||
background: #F7F7F7;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #333333;
|
||||
padding: 8rpx 26rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.thererect {
|
||||
padding: 34rpx 0;
|
||||
border-bottom: 1rpx solid #F7F7F7;
|
||||
border-top: 1rpx solid #F7F7F7;
|
||||
|
||||
.thererect_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.thererect_tow {}
|
||||
}
|
||||
|
||||
.fuorrect {
|
||||
margin-top: 32rpx;
|
||||
|
||||
.fuorrect_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.fuorrect_tow {
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.fvirect {
|
||||
margin-top: 200rpx;
|
||||
padding: 16rpx;
|
||||
text-align: center;
|
||||
background: linear-gradient(115deg, #7E81A5 0%, #4D4E64 100%);
|
||||
border-radius: 40rpx;
|
||||
font-size: 36rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
921
pages/mall/order/index.vue
Normal file
921
pages/mall/order/index.vue
Normal file
@@ -0,0 +1,921 @@
|
||||
<template>
|
||||
<view class="content" :style="[theme]">
|
||||
<view class="onecontent">
|
||||
<view class="flex-start">
|
||||
<view class="onecontent_oen flex-start">
|
||||
<input class="onecontent_oen_input" type="text" v-model="like" placeholder="搜索订单/商家名/商品名">
|
||||
<text class="onecontent_oen_text" @click="init_fn">搜索</text>
|
||||
</view>
|
||||
<view class="onecontent_oen_right flex-start" v-if="style_type != 2" @click="showpicker = true">
|
||||
<image class="onecontent_oen_rightimage" src="@/static/screen.png" mode="aspectFill"></image>
|
||||
<view class="onecontent_oen_rightimageview">筛选</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontent_tow flex-between">
|
||||
<view ref="uTabs" class="onecontent_tow_item flex-colum" v-for="(item,index) in swipercurrentdata"
|
||||
:key="index" @click="orderswitch(index)">
|
||||
<view :class="swiperCurrent == index?'onecontent_tow_itemtexts':'onecontent_tow_itemtext'">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontent">
|
||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{height:height}">
|
||||
<swiper-item v-for="(item,index) in list_" :key="index">
|
||||
<scroll-view scroll-y style="width: 100%;" :style="{height:height}" @scrolltolower="lower">
|
||||
<view class="towcontentitem" v-for="(item1,index1) in list_[index].data" :key="index1"
|
||||
@click="eeInfo(item1)">
|
||||
<view class="towcontentitemone flex-between">
|
||||
<text class="towcontentitemone_one">{{item1.store_title}}</text>
|
||||
<view class="towcontentitemone_tow flex-start">
|
||||
<!-- <image class="towcontentitemone_towimage"
|
||||
:src="item.store_avatar"
|
||||
mode="aspectFill">
|
||||
</image> -->
|
||||
<text v-if="item1.status == 0">待付款</text>
|
||||
<text v-if="item1.status == 1">待发货</text>
|
||||
<text v-if="item1.status == 2">待收货</text>
|
||||
<text v-if="item1.status == 3">已收货/评价</text>
|
||||
<text v-if="item1.status == 4">退款中 </text>
|
||||
<text v-if="item1.status == 5">退款成功</text>
|
||||
<text v-if="item1.status == 6">取消订单</text>
|
||||
<!-- <text v-if="item1.status == 7">已退款</text>-->
|
||||
<text v-if="item1.status == 7">已拒绝</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontentitemtow flex-start" v-for="(item2,index) in item1.goods"
|
||||
:key="item2.id">
|
||||
<image class="towcontentitemtow_imge" :src="item2.img" mode="aspectFill"></image>
|
||||
<view class="towcontentitemtow_one flex-colum-start">
|
||||
<text class="towcontentitemtow_one_one">{{item2.title}}</text>
|
||||
<text class="towcontentitemtow_one_tow">
|
||||
<text style="font-size:28rpx;">¥</text>{{item2.spec}}</text>
|
||||
<text class="towcontentitemtow_one_there">
|
||||
×{{item2.number}}
|
||||
</text>
|
||||
<view class="towcontentitemtow_one_four">
|
||||
{{item2.goods_price}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="towcontentitemtow_tow">
|
||||
{{item1.number}}
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="towcontentitemthere_text_iitem">
|
||||
共{{item1.number}}件商品 合计:<text>¥{{item1.goods_total_price}}</text>
|
||||
</view>
|
||||
<view class="towcontentitemthere">
|
||||
<view v-if="item1.status == 0"
|
||||
class="towcontentitemthereitem towcontentitemthereitem_tow"
|
||||
@click.stop="orderordercancel(item1)">
|
||||
取消订单
|
||||
</view>
|
||||
<view v-if="item1.status == 1 || item1.status == 2 || item1.status == 3"
|
||||
class="towcontentitemthereitem towcontentitemthereitem_tow"
|
||||
@click.stop="orderordercancelrefund(item1)">
|
||||
申请售后
|
||||
</view>
|
||||
<view v-if="item1.status == 4 || item1.status == 5"
|
||||
class="towcontentitemthereitem towcontentitemthereitem_tow"
|
||||
@click.stop="applylrefund(item1)">
|
||||
查看退款
|
||||
</view>
|
||||
<view class="towcontentitemthereitem towcontentitemthereitem_tow"
|
||||
v-if="item1.status == 3 || item1.status == 5" @click.stop="orderorderdelete(item1)">
|
||||
删除订单
|
||||
</view>
|
||||
<!-- <view class="towcontentitemthereitem towcontentitemthereitem_there">
|
||||
待服务
|
||||
</view> -->
|
||||
<view class="towcontentitemthereitem towcontentitemthereitem_one"
|
||||
v-if="item1.status == 0" @click.stop="overlayshowclick(item1)">
|
||||
去付款
|
||||
</view>
|
||||
</view>
|
||||
<u-overlay :show="overlayshow" @click.stop="overlayshow = false" opacity='0.1'>
|
||||
<view class="warp">
|
||||
<view class="rect flex-colum" @tap.stop>
|
||||
<view class="rectone">
|
||||
确定{{clickoverlayshowtext}}吗?
|
||||
</view>
|
||||
<view class="recttow flex-between">
|
||||
<view class="recttow_one" @click="cancelOrder(item.status)">
|
||||
确定
|
||||
</view>
|
||||
<view class="recttow_tow" @click="overlayshow = false">
|
||||
取消
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-overlay>
|
||||
</view>
|
||||
<view v-if="list_[index].data.length == 0 && list_[index].is_end == true" class="flex-colum"
|
||||
style="margin-bottom: 10rpx;">
|
||||
<image style="margin-top:100rpx;" class="" :src="bgnothave" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
<u-loadmore :status="form.status" />
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
<u-picker :show="showpicker" :columns="columns" keyName="label" @cancel='showpicker = false'
|
||||
@confirm='confirmpicker'></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showpicker: false,
|
||||
style_type: uni.cache.get('loginuser').style_type,
|
||||
columns: [
|
||||
[{
|
||||
label: '店铺订单',
|
||||
// 其他属性值
|
||||
id: 1
|
||||
// ...
|
||||
}, {
|
||||
label: '商城订单',
|
||||
id: 2
|
||||
}]
|
||||
],
|
||||
bgnothave: uni.getStorageSync('bgnothave'),
|
||||
height: "",
|
||||
// 因为内部的滑动机制限制,请将tabs组件和swiper组件的current用不同变量赋值
|
||||
current: 0, // tabs组件的current值,表示当前活动的tab选项
|
||||
swiperCurrent: 0, // swiper组件的current值,表示当前那个swiper-item是活动的
|
||||
overlayshow: false,
|
||||
list_: {
|
||||
list1: { //全部
|
||||
data: [],
|
||||
page: 1,
|
||||
is_end: false,
|
||||
},
|
||||
list2: { //代付款
|
||||
data: [],
|
||||
page: 1,
|
||||
is_end: false,
|
||||
},
|
||||
list3: { //待服务
|
||||
data: [],
|
||||
page: 1,
|
||||
is_end: false,
|
||||
},
|
||||
list4: { //已完成
|
||||
data: [],
|
||||
page: 1,
|
||||
is_end: false,
|
||||
},
|
||||
list5: { //退款
|
||||
data: [],
|
||||
page: 1,
|
||||
is_end: false,
|
||||
}
|
||||
},
|
||||
like: '', //备注
|
||||
clickoverlayshowtext: "",
|
||||
swipercurrentdata: [{
|
||||
name: '全部'
|
||||
}, {
|
||||
name: '待付款'
|
||||
}, {
|
||||
name: '待发货'
|
||||
}, {
|
||||
name: '待收货'
|
||||
}, {
|
||||
name: '已收货/退款售后'
|
||||
}],
|
||||
form: {
|
||||
status: 'loadmore',
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.swiperCurrent = e.e;
|
||||
},
|
||||
onShow() {
|
||||
this.init_fn();
|
||||
},
|
||||
computed: {
|
||||
HeighTpadding() {
|
||||
return this.$store.getters.is_BarHeight.bottompadding
|
||||
},
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
//#ifdef MP-WEIXIN || H5
|
||||
var query = uni.createSelectorQuery().in(this).select('.onecontent')
|
||||
query.boundingClientRect(ele => {
|
||||
var that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.height = (res.windowHeight - ele.height - (that.HeighTpadding / 2)) +
|
||||
"px";
|
||||
that = null;
|
||||
}
|
||||
})
|
||||
}).exec();
|
||||
//#endif
|
||||
//#ifdef MP-ALIPAY
|
||||
my.createSelectorQuery().selectAll('.onecontent').boundingClientRect().exec(ele => {
|
||||
var nodeData = ele[0]
|
||||
var that = this;
|
||||
that.height = (nodeData.height) + "px";
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.height = (res.windowHeight - nodeData.height - (that.HeighTpadding / 2)) +
|
||||
"px";
|
||||
that = null;
|
||||
}
|
||||
})
|
||||
})
|
||||
//#endif
|
||||
},
|
||||
|
||||
methods: {
|
||||
confirmpicker(e) {
|
||||
if (e.value[0].label == '店铺订单') {
|
||||
uni.redirectTo({
|
||||
url: '/pages/my/order/index?e=0'
|
||||
})
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/mall/order/index?e=0'
|
||||
})
|
||||
}
|
||||
},
|
||||
init_fn() {
|
||||
this.list_ = {
|
||||
list1: { //全部
|
||||
data: [],
|
||||
page: 1,
|
||||
is_end: false,
|
||||
},
|
||||
list2: { //代付款
|
||||
data: [],
|
||||
page: 1,
|
||||
is_end: false,
|
||||
},
|
||||
list3: { //待发货
|
||||
data: [],
|
||||
page: 1,
|
||||
is_end: false,
|
||||
},
|
||||
list4: { //已完成
|
||||
data: [],
|
||||
page: 1,
|
||||
is_end: false,
|
||||
},
|
||||
list5: { //退款
|
||||
data: [],
|
||||
page: 1,
|
||||
is_end: false,
|
||||
}
|
||||
}
|
||||
for (let i = 0; i <= 4; i++) {
|
||||
this.get_order_list(i);
|
||||
}
|
||||
},
|
||||
async get_order_list(i) {
|
||||
console.log(i, 2233)
|
||||
this.form.status = 'loading';
|
||||
let page = null; //页数
|
||||
let order_type = 10;
|
||||
switch (i) {
|
||||
case 0:
|
||||
order_type = 10; //全部
|
||||
page = this.list_.list1.page;
|
||||
break;
|
||||
case 1:
|
||||
order_type = 0; //待付款
|
||||
page = this.list_.list2.page;
|
||||
break;
|
||||
case 2:
|
||||
order_type = 1; //待发货
|
||||
page = this.list_.list3.page;
|
||||
break;
|
||||
case 3:
|
||||
order_type = 2; //2待收货
|
||||
page = this.list_.list4.page;
|
||||
break;
|
||||
case 4:
|
||||
order_type = 3; // 4 3已收货/退款售后
|
||||
page = this.list_.list5.page;
|
||||
break;
|
||||
}
|
||||
let res = await this.api.shoppingorderlist({
|
||||
type: order_type,
|
||||
page: page,
|
||||
like: this.like
|
||||
})
|
||||
// let res = []
|
||||
// res.data.forEach(item=>{//计算待支付订单剩余时间
|
||||
// if(item.order_type==0){
|
||||
// item.timeDiff=(new Date(item.estimate_close_at).getTime() -new Date().getTime())/1000;
|
||||
// }
|
||||
// })
|
||||
switch (order_type) {
|
||||
case 10:
|
||||
this.paging(res, this.list_.list1)
|
||||
break;
|
||||
case 0:
|
||||
this.paging(res, this.list_.list2)
|
||||
break;
|
||||
case 1:
|
||||
this.paging(res, this.list_.list3)
|
||||
break;
|
||||
case 2:
|
||||
this.paging(res, this.list_.list4)
|
||||
break;
|
||||
case 3:
|
||||
this.paging(res, this.list_.list5)
|
||||
break;
|
||||
}
|
||||
uni.hideLoading();
|
||||
},
|
||||
paging(res, list) {
|
||||
if (res.length == 0) {
|
||||
this.form.status = 'nomore';
|
||||
list.is_end = true;
|
||||
return false;
|
||||
} else {
|
||||
this.form.status = 'loading';
|
||||
list.page = list.page + 1;
|
||||
setTimeout(() => {
|
||||
list.data = [...list.data, ...res];
|
||||
if (res.length != 10) {
|
||||
list.is_end = true;
|
||||
this.form.status = 'nomore';
|
||||
|
||||
} else {
|
||||
this.form.status = 'loading';
|
||||
}
|
||||
this.$forceUpdate();
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
async overlayshowclick(e) {
|
||||
uni.pro.navigateTo('mall/confirm', {
|
||||
type: 3, // 1购物车 2商品详情页
|
||||
order_id: e.id,
|
||||
// goods_id:this.goods_id, //商品ID 商品详情页来源时必填
|
||||
// car_id:'', //购物车ID 1,2 购物车来源时必填
|
||||
// number:this.numberbox, //商品详情页来源时必填
|
||||
// spec:this.lsitform.id, //规格 商品详情页来源时必填
|
||||
// address_id: '', //地址ID 可以为空(为空时返回默认地址)
|
||||
})
|
||||
// uni.pro.navigateTo('mall/confirm', {
|
||||
// order_id: e.id
|
||||
// })
|
||||
console.log(e)
|
||||
// let res = await this.api.paygetpayparams({
|
||||
// order_id: e.order_id
|
||||
// }) //判断是否支付成功
|
||||
// console.log(res)
|
||||
// if (res.data.pay_status == 0) {
|
||||
// // #ifdef MP-WEIXIN
|
||||
// uni.requestPayment({
|
||||
// provider: 'wxpay', //支付类型-固定值
|
||||
// partnerid: res.data.pay_data.payAppId, // 微信支付商户号
|
||||
// timeStamp: res.data.pay_data.payTimeStamp, // 时间戳(单位:秒)
|
||||
// nonceStr: res.data.pay_data.paynonceStr, // 随机字符串
|
||||
// package: res.data.pay_data.payPackage, // 固定值
|
||||
// signType: res.data.pay_data.paySignType, //固定值
|
||||
// paySign: res.data.pay_data.paySign, //签名
|
||||
// success: (res) => {
|
||||
// console.log(res,'11111111')
|
||||
// uni.showToast({
|
||||
// title: "支付成功"
|
||||
// })
|
||||
// uni.redirectTo({
|
||||
// url: "/pages/order/ordersuccess?id=" + e.order_id,
|
||||
// });
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// uni.showToast({
|
||||
// icon: 'none',
|
||||
// title: '支付失败'
|
||||
// })
|
||||
// console.log('fail:' + JSON.stringify(err));
|
||||
// }
|
||||
// });
|
||||
// // #endif
|
||||
// } else {
|
||||
// console.log(res,'22222')
|
||||
// uni.redirectTo({
|
||||
// url: "/pages/order/ordersuccess?id=" + e.order_id,
|
||||
// });
|
||||
// }
|
||||
|
||||
},
|
||||
lower() {
|
||||
switch (this.current) {
|
||||
case 0:
|
||||
this.onReachBottom_fn(this.list_.list1)
|
||||
break;
|
||||
case 1:
|
||||
this.onReachBottom_fn(this.list_.list2)
|
||||
break;
|
||||
case 2:
|
||||
this.onReachBottom_fn(this.list_.list3)
|
||||
break;
|
||||
case 3:
|
||||
this.onReachBottom_fn(this.list_.list4)
|
||||
break;
|
||||
case 4:
|
||||
this.onReachBottom_fn(this.list_.list5)
|
||||
break;
|
||||
}
|
||||
},
|
||||
onReachBottom_fn(list) {
|
||||
if (!list.is_end) {
|
||||
this.get_order_list(this.current);
|
||||
} else {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
},
|
||||
// tabs通知swiper切换
|
||||
orderswitch(index) {
|
||||
try {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (this.list_list1.data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (this.list_.list2.data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (this.list_.list3.data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (this.list_.list4.data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (this.list_.list5.data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
break;
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
this.swiperCurrent = index;
|
||||
},
|
||||
animationfinish(e) {
|
||||
let current = e.detail.current;
|
||||
try {
|
||||
switch (current) {
|
||||
case 0:
|
||||
if (this.list_list1.data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (this.list_.list2.data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (this.list_.list3.data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (this.list_.list4.data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (this.list_.list5.data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
break;
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
|
||||
this.swiperCurrent = current;
|
||||
this.current = current;
|
||||
},
|
||||
orderordercancel(item) { //取消订单
|
||||
uni.showModal({
|
||||
content: '确定取消订单吗?',
|
||||
confirmColor: '#f55850',
|
||||
cancelColor: '#333333',
|
||||
success: async (resdata) => {
|
||||
console.log(resdata)
|
||||
if (resdata.confirm) {
|
||||
let res = await this.api.shoppingorderordercancel({
|
||||
order_id: item.id
|
||||
})
|
||||
this.init_fn()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
orderordercancelrefund(item) { //取消订单去退款
|
||||
uni.pro.navigateTo('mall/order/refund', {
|
||||
id: item.id
|
||||
})
|
||||
},
|
||||
applylrefund(item) {
|
||||
uni.pro.navigateTo('mall/order/applylrefund', {
|
||||
id: item.id
|
||||
})
|
||||
},
|
||||
orderorderdelete(item) {
|
||||
uni.showModal({
|
||||
content: '确定删除订单吗?',
|
||||
confirmColor: '#f55850',
|
||||
cancelColor: '#333333',
|
||||
success: async (resdata) => {
|
||||
if (resdata.confirm) {
|
||||
let res = await this.api.shoppingorderorderorderdelete({
|
||||
order_id: item.id
|
||||
})
|
||||
}
|
||||
this.init_fn()
|
||||
}
|
||||
})
|
||||
},
|
||||
async cancelOrder(item) { //取消订单
|
||||
console.log(item)
|
||||
// let res
|
||||
// switch (this.clickoverlayshowtext) {
|
||||
// case '取消订单':
|
||||
// if (item.status == 0) {
|
||||
// res = await this.api.orderordercancel({
|
||||
// order_id: item.id
|
||||
// })
|
||||
// } else {
|
||||
// uni.pro.navigateTo('mall/order/orderInfo', {
|
||||
// id: e,
|
||||
// e: e
|
||||
// })
|
||||
// }
|
||||
// break;
|
||||
// case '删除订单':
|
||||
// res = await this.api.orderorderdelete({
|
||||
// order_id: item.id
|
||||
// })
|
||||
// break;
|
||||
// }
|
||||
// this.overlayshow = false
|
||||
// this.init_fn()
|
||||
},
|
||||
eeInfo(e) { //查看订单详情
|
||||
uni.pro.navigateTo('mall/order/orderInfo', {
|
||||
id: e.id
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
.content {
|
||||
|
||||
.onecontent {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 10rpx 28rpx;
|
||||
|
||||
.flex-start {
|
||||
flex-wrap: nowrap;
|
||||
|
||||
.onecontent_oen {
|
||||
margin: 0 auto;
|
||||
flex: auto;
|
||||
height: 70rpx;
|
||||
border-radius: 36rpx;
|
||||
border: 1rpx solid var(--bg-color-button);
|
||||
padding-right: 8rpx;
|
||||
|
||||
.onecontent_oen_input {
|
||||
padding-left: 32rpx;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.onecontent_oen_text {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
width: 116rpx;
|
||||
height: 56rpx;
|
||||
background: var(--bg-color-button);
|
||||
border-radius: 36rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.onecontent_oen_right {
|
||||
margin-left: 26rpx;
|
||||
|
||||
.onecontent_oen_rightimage {
|
||||
width: 17.9rpx;
|
||||
height: 19.34rpx;
|
||||
}
|
||||
|
||||
.onecontent_oen_rightimageview {
|
||||
text-align: center;
|
||||
width: 56rpx;
|
||||
margin-left: 10rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.onecontent_tow {
|
||||
padding: 32rpx 0 32rpx 0;
|
||||
width: 100%;
|
||||
|
||||
.onecontent_tow_item {
|
||||
position: relative;
|
||||
|
||||
.onecontent_tow_itemtexts {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.onecontent_tow_itemtext {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.onecontent_tow_itemtexts::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -10rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 19.33rpx;
|
||||
height: 6.66rpx;
|
||||
background: url(https://ointmentweapp.oss-cn-beijing.aliyuncs.com/image/my/order/order1.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.towcontent {
|
||||
padding: 0 28rpx;
|
||||
|
||||
.flex-colum_image {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
|
||||
text {
|
||||
margin-top: 30rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitem {
|
||||
margin-top: 32rpx;
|
||||
padding: 24rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.towcontentitemone {
|
||||
padding-bottom: 16rpx;
|
||||
border-bottom: 1px solid #F6F6F6;
|
||||
|
||||
.towcontentitemone_one {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.towcontentitemone_tow {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
|
||||
.towcontentitemone_towimage {
|
||||
margin-right: 10rpx;
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitemtow {
|
||||
position: relative;
|
||||
padding: 22rpx 0;
|
||||
border-bottom: 1px solid #F6F6F6;
|
||||
|
||||
.towcontentitemtow_imge {
|
||||
width: 144rpx;
|
||||
height: 144rpx;
|
||||
background: #666666;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.towcontentitemtow_one {
|
||||
margin-left: 32rpx;
|
||||
width: 60%;
|
||||
|
||||
.towcontentitemtow_one_one {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.towcontentitemtow_one_tow {
|
||||
margin-top: 10rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.towcontentitemtow_one_there {
|
||||
margin-top: 32rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Roboto-Bold, Roboto;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.towcontentitemtow_one_four {
|
||||
font-size: 28rpx;
|
||||
font-family: Roboto-Bold, Roboto;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
position: absolute;
|
||||
bottom: 22rpx;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitemtow_tow {
|
||||
position: absolute;
|
||||
bottom: 32rpx;
|
||||
right: 0;
|
||||
font-size: 28rpx;
|
||||
font-family: Roboto-Regular, Roboto;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitemthere_text_iitem {
|
||||
width: 100%;
|
||||
margin-top: 16rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitemthere {
|
||||
width: 100%;
|
||||
margin-top: 16rpx;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.towcontentitemthereitem {
|
||||
margin-left: 24rpx;
|
||||
padding: 8rpx 32rpx;
|
||||
font-size: 28rpx;
|
||||
border-radius: 28rpx;
|
||||
}
|
||||
|
||||
.towcontentitemthereitem_one {
|
||||
background: var(--bg-color-button);
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.towcontentitemthereitem_tow {
|
||||
background: #F6F6F6;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.towcontentitemthereitem_there {
|
||||
background: var(--bg-color-buttonone);
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.towcontentitemthereitem_therecak {
|
||||
background: var(--chakabackground);
|
||||
border: 1px solid var(--chakaborder);
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: var(--chakacolor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.warp {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
|
||||
.rect {
|
||||
padding: 40rpx 68rpx;
|
||||
width: 480rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 42rpx;
|
||||
|
||||
.rectone {
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.recttow {
|
||||
width: 100%;
|
||||
margin-top: 32rpx;
|
||||
|
||||
.recttow_one {
|
||||
padding: 8rpx 40rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 26rpx;
|
||||
border: 2rpx solid #999999;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.recttow_tow {
|
||||
padding: 8rpx 40rpx;
|
||||
background: #333333;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
border-radius: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
623
pages/mall/order/orderInfo.vue
Normal file
623
pages/mall/order/orderInfo.vue
Normal file
@@ -0,0 +1,623 @@
|
||||
<template>
|
||||
<view class="index" :style="[theme]">
|
||||
<view class="onecontent">
|
||||
<view class="onecontentone">
|
||||
<text v-if="datalist.status == 0">待付款</text>
|
||||
<text v-if="datalist.status == 1">待发货</text>
|
||||
<text v-if="datalist.status == 2">待收货</text>
|
||||
<text v-if="datalist.status == 3">已收货/评价</text>
|
||||
<text v-if="datalist.status == 4">退款中 </text>
|
||||
<text v-if="datalist.status == 5">退款成功</text>
|
||||
<text v-if="datalist.status == 6">取消订单</text>
|
||||
<text v-if="datalist.status == 7">已拒绝</text>
|
||||
</view>
|
||||
<view class="onecontenttow">
|
||||
感谢您的支持,欢迎再次光临
|
||||
</view>
|
||||
<view class="onecontentthere flex-between">
|
||||
<view class="onecontentthere_one" v-if="datalist.status == 5 || datalist.status == 3 "
|
||||
@click="orderorderdelete(datalist)">
|
||||
删除订单
|
||||
</view>
|
||||
<view class="onecontentthere_tow"
|
||||
v-if="datalist.status == 1 || datalist.status == 2 ||datalist.status == 3"
|
||||
@click="orderordercancelrefund(datalist)">
|
||||
申请退款
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontent" >
|
||||
<view class="towcontentone flex-between">
|
||||
<view class="towcontentone_one flex-start">
|
||||
<u-icon name="home" color="#ffffff" size="20"></u-icon>
|
||||
<text class="towcontentone_one_text">{{datalist.store_title}}</text>
|
||||
</view>
|
||||
<u-icon @click="phonefill(item.store_mobile)" name="phone-fill" color="#ffffff" size="20"></u-icon>
|
||||
</view>
|
||||
<view class="towcontenttow flex-start" v-for="(item,index) in datalist.goods" :key="index" @click="detailsInfo(item.goods_id)">
|
||||
<image class="towcontenttow_image" :src="item.img" mode="aspectFill"></image>
|
||||
<view class="towcontenttowone flex-colum-start">
|
||||
<view class="towcontenttowone_one">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="towcontenttowone_tow flex-start">
|
||||
<view class="towcontenttowone_tow_one flex-start">
|
||||
<u-icon name="checkmark-circle" color="#999999" size="14"></u-icon>
|
||||
随时退
|
||||
</view>
|
||||
<view class="towcontenttowone_tow_one flex-start">
|
||||
<u-icon name="checkmark-circle" color="#999999" size="14"></u-icon>
|
||||
过期退
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontenttowone_there">
|
||||
{{item.spec||''}}
|
||||
</view>
|
||||
<view class="towcontenttowone_four">
|
||||
¥{{item.price}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!--<view class="towcontentthere flex-between">
|
||||
<text class="towcontentthere_text"></text>
|
||||
</view>
|
||||
<view class="qr-box flex-colum" @longpress="save()">
|
||||
<canvas canvas-id="qrcode" style="width:288rpx;" />
|
||||
</view>
|
||||
<view class="towcontenttfour flex-colum">
|
||||
123 2345 567
|
||||
</view> -->
|
||||
<!-- <view class="towcontenttfive flex-between">
|
||||
<view class="towcontenttfive_one flex-start">
|
||||
<view class="towcontenttfive_oneone">
|
||||
退款:
|
||||
</view>
|
||||
<view class="towcontenttfive_onetow">
|
||||
08-22 23:59:59到期
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontenttfive_tow">
|
||||
申请退款
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="therecontent">
|
||||
<view class="therecontentone">
|
||||
订单信息
|
||||
</view>
|
||||
<view class="therecontentsix entowakst" v-if="datalist.people_nickname">
|
||||
发型师:{{datalist.people_nickname}}
|
||||
</view>
|
||||
<view class="therecontentow entowakst">
|
||||
实付金额:<text>¥{{datalist.price}}</text>
|
||||
</view>
|
||||
<view class="therecontentthere entowakst">
|
||||
购买数量:{{datalist.number}}
|
||||
</view>
|
||||
<view class="therecontentthere entowakst">
|
||||
购买数量:{{datalist.username}}
|
||||
</view>
|
||||
<view class="therecontenfour entowakst">
|
||||
手机号码:{{datalist.mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2') || '-'}}
|
||||
</view>
|
||||
<view class="therecontentthere entowakst">
|
||||
收货地址:{{datalist.address}}
|
||||
</view>
|
||||
<view class="therecontentfive flex-start entowakst">
|
||||
订单编号:{{datalist.out_trade_no}}
|
||||
<text class="therecontentfive_box" @click="copy(datalist.out_trade_no)">复制</text>
|
||||
</view>
|
||||
<view class="therecontentsix entowakst">
|
||||
下单时间:{{datalist.createtime}}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- <view class="fourcontent">
|
||||
<view class="fourcontentone">
|
||||
购买须知
|
||||
</view>
|
||||
<view v-html="datalist.details">
|
||||
|
||||
</view>
|
||||
<view class="entowakst" v-html="datalist.details">
|
||||
·预约须知:请您提前1小时预约
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view class="fivecontent">
|
||||
<view class="fivecontentone">
|
||||
用户评价
|
||||
</view>
|
||||
<view class="fivecontenttow flex-between">
|
||||
<view class="fivecontenttow_one flex-start">
|
||||
<text class="fivecontenttow_text">综合评分</text>
|
||||
<u-rate :count="5" value="4" active-color="#f1cb66" inactive-color="#F1CB66"></u-rate>
|
||||
</view>
|
||||
<view class="fivecontenttow_tow">
|
||||
满意
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uQRCode from '@/common/js/uqrCode.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
datalist: {
|
||||
mobile:''
|
||||
},
|
||||
imgCode: '', // 后续保存到手机相册所需要用到的字段}
|
||||
form: {
|
||||
phone: '18092171236'
|
||||
}
|
||||
}
|
||||
},
|
||||
async onLoad(e) {
|
||||
try {
|
||||
let res = await this.api.shoppingorderoorderdetail({
|
||||
id: e.id
|
||||
})
|
||||
if (res) {
|
||||
this.datalist = res
|
||||
this.datalist.details = res.details.replace(/\<img/g, '<img style="max-width:100%;height:auto" ');
|
||||
}
|
||||
} catch (e) {}
|
||||
// this.generate()
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
orderorderdelete(item) { //删除订单
|
||||
uni.showModal({
|
||||
content: '确定删除订单吗?',
|
||||
confirmColor: '#f55850',
|
||||
cancelColor: '#333333',
|
||||
success: async (resdata) => {
|
||||
if (resdata.confirm) {
|
||||
let res = await this.api.shoppingorderorderorderdelete({
|
||||
order_id: item.id
|
||||
})
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
orderordercancelrefund(item) { //取消订单去退款
|
||||
uni.pro.navigateTo('mall/order/refund', {
|
||||
id: item.id
|
||||
})
|
||||
},
|
||||
// 生成二维码事件
|
||||
generate(e) {
|
||||
uQRCode.make({
|
||||
canvasId: 'qrcode',
|
||||
componentInstance: this,
|
||||
text: "https://ky.sxczgkj.cn/wap/merchant/authPay?userAppId=244", // 想生成二维码到内容
|
||||
size: 150,
|
||||
margin: 0,
|
||||
backgroundColor: '#ffffff',
|
||||
foregroundColor: '#000000',
|
||||
fileType: 'jpg',
|
||||
errorCorrectLevel: uQRCode.errorCorrectLevel.H,
|
||||
success: res => {
|
||||
this.imgCode = res // base64的图片格式
|
||||
}
|
||||
})
|
||||
},
|
||||
// 保存到手机
|
||||
save() {
|
||||
uni.getSetting({ //获取用户的当前设置
|
||||
success: (res) => {
|
||||
if (res.authSetting['scope.writePhotosAlbum']) { //验证用户是否授权可以访问相册
|
||||
this.aveImageToPhotosAlbum();
|
||||
} else {
|
||||
uni.authorize({ //如果没有授权,向用户发起请求
|
||||
scope: 'scope.writePhotosAlbum',
|
||||
success: () => {
|
||||
this.aveImageToPhotosAlbum();
|
||||
},
|
||||
fail: () => {
|
||||
// 提示
|
||||
uni.showToast({
|
||||
title: "请打开保存相册权限,再点击保存到手机",
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.openSetting({ //调起客户端小程序设置界面,让用户开启访问相册
|
||||
success: (res2) => {
|
||||
// console.log(res2.authSetting)
|
||||
}
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
copy(value) {
|
||||
//提示模板
|
||||
uni.setClipboardData({
|
||||
data: value, //要被复制的内容
|
||||
success: () => { //复制成功的回调函数
|
||||
uni.showToast({
|
||||
title: '复制成功'
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
detailsInfo(e) { //查看订单详情
|
||||
uni.pro.navigateTo('mall/mallInfo', {
|
||||
id: e,
|
||||
})
|
||||
},
|
||||
phonefill(value) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: value //仅为示例
|
||||
});
|
||||
},
|
||||
aveImageToPhotosAlbum() {
|
||||
let base64 = this.imgCode.replace(/^data:image\/\w+;base64,/, ""); //去掉data:image/png;base64,
|
||||
let filePath = wx.env.USER_DATA_PATH + '/ph_fit_qrcode.png'; // 路径文件名
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
uni.getFileSystemManager().writeFile({ // 获取全局唯一的文件管理器
|
||||
filePath: filePath, //创建一个临时文件名
|
||||
data: base64, //写入的文本或二进制数据
|
||||
encoding: 'base64', //写入当前文件的字符编码
|
||||
success: res => {
|
||||
uni.saveImageToPhotosAlbum({ // 保存图片到系统相册
|
||||
filePath: filePath,
|
||||
success: function(res2) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '保存成功',
|
||||
icon: "none",
|
||||
duration: 5000
|
||||
})
|
||||
},
|
||||
fail: function(err) {
|
||||
uni.hideLoading();
|
||||
// console.log(err.errMsg);
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
uni.hideLoading();
|
||||
//console.log(err)
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
.index {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.onecontent {
|
||||
width: 100%;
|
||||
padding: 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.onecontentone {
|
||||
font-size: 32rpx;
|
||||
font-family: SourceHanSansCN-Medium-, SourceHanSansCN-Medium;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.onecontenttow {
|
||||
margin-top: 16rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.onecontentthere {
|
||||
margin-top: 24rpx;
|
||||
|
||||
.onecontentthere_one {
|
||||
background: #333333;
|
||||
border-radius: 8rpx;
|
||||
padding: 16rpx 94rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.onecontentthere_tow {
|
||||
background: #F7F7F7;
|
||||
border-radius: 8rpx;
|
||||
padding: 16rpx 94rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.towcontent {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx;
|
||||
|
||||
.towcontentone {
|
||||
position: relative;
|
||||
padding: 16rpx 32rpx;
|
||||
border-radius: 18rpx 18rpx 0 0;
|
||||
background:var(--bg-color-buttonone);
|
||||
|
||||
.towcontentone_one {
|
||||
.towcontentone_one_image {
|
||||
width: 33.04rpx;
|
||||
height: 29.79rpx;
|
||||
}
|
||||
|
||||
.towcontentone_one_text {
|
||||
margin-left: 10rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentone_one::after {
|
||||
z-index: 10;
|
||||
position: absolute;
|
||||
bottom: -22rpx;
|
||||
content: '';
|
||||
display: inline-block;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
border-radius: 0 0 22rpx 22rpx;
|
||||
background:var(--bg-color-buttonone);
|
||||
}
|
||||
}
|
||||
|
||||
.towcontenttow {
|
||||
position: relative;
|
||||
padding: 32rpx;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
|
||||
.towcontenttow_image {
|
||||
width: 128rpx;
|
||||
height: 128rpx;
|
||||
}
|
||||
|
||||
.towcontenttowone {
|
||||
height: 128rpx;
|
||||
margin-left: 36rpx;
|
||||
justify-content: space-around;
|
||||
|
||||
.towcontenttowone_one {
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.towcontenttowone_tow {
|
||||
.towcontenttowone_tow_one {
|
||||
font-size: 24rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontenttowone_there {
|
||||
font-size: 24rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
.towcontenttowone_four{
|
||||
position: absolute;
|
||||
font-weight: bold;
|
||||
top:32rpx;
|
||||
right: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentthere {
|
||||
position: relative;
|
||||
height: 44rpx;
|
||||
width: 100%;
|
||||
|
||||
.towcontentthere_text {
|
||||
width: 100%;
|
||||
height: 0px;
|
||||
border: 1rpx dashed #EAEAEA;
|
||||
}
|
||||
|
||||
.towcontentthere_text::after {
|
||||
z-index: 10;
|
||||
position: absolute;
|
||||
content: '';
|
||||
display: inline-block;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 22rpx;
|
||||
height: 44rpx;
|
||||
border-radius: 0 44rpx 44rpx 0;
|
||||
background: #f6f6f6;
|
||||
}
|
||||
|
||||
.towcontentthere_text::before {
|
||||
z-index: 10;
|
||||
position: absolute;
|
||||
content: '';
|
||||
display: inline-block;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 22rpx;
|
||||
height: 44rpx;
|
||||
border-radius: 44rpx 0 0 44rpx;
|
||||
background: #f6f6f6;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontenttfour {
|
||||
margin-top: 16rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.towcontenttfive {
|
||||
padding: 32rpx;
|
||||
width: 100%;
|
||||
|
||||
.towcontenttfive_one {
|
||||
font-size: 32rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.towcontenttfive_onetow {
|
||||
margin-left: 16rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.towcontenttfive_tow {
|
||||
padding: 10rpx 16rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #D5D5D5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.therecontent {
|
||||
margin-top: 24rpx;
|
||||
padding: 32rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx;
|
||||
|
||||
.therecontentone {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.entowakst {
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.therecontentfive_box {
|
||||
padding: 6rpx 10rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #666666;
|
||||
background: #FFFFFF;
|
||||
margin-left: 6rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #D5D5D5;
|
||||
}
|
||||
}
|
||||
|
||||
.fourcontent {
|
||||
margin-top: 24rpx;
|
||||
padding: 32rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx;
|
||||
|
||||
.fourcontentone {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.fourcontentone::after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 1rpx;
|
||||
border: 1px solid #F7F7F7;
|
||||
}
|
||||
|
||||
.entowakst {
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.fivecontent {
|
||||
margin-top: 24rpx;
|
||||
padding: 32rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx;
|
||||
|
||||
.fivecontentone {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.fivecontenttow {
|
||||
margin-top: 16rpx;
|
||||
|
||||
.fivecontenttow_one {
|
||||
.fivecontenttow_text {
|
||||
padding-right: 24rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.fivecontenttow_tow {
|
||||
font-size: 24rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
189
pages/mall/order/ordersuccess.vue
Normal file
189
pages/mall/order/ordersuccess.vue
Normal file
@@ -0,0 +1,189 @@
|
||||
<template>
|
||||
<view class="container" :style="[theme]">
|
||||
<view class="header-wrap">
|
||||
<image class="icon" src="https://ointmentweapp.oss-cn-beijing.aliyuncs.com/success.png" mode="widthFix">
|
||||
</image>
|
||||
<text class="t" v-if="info.status == 0">支付失败</text>
|
||||
<text class="t" v-if="info.status == 1">成功支付</text>
|
||||
</view>
|
||||
<view class="status-wrap" v-if="info.status == 1">
|
||||
<view class="line"></view>
|
||||
<view class="info-wrap">
|
||||
<view class="card">
|
||||
<view class="num">
|
||||
<text class="i">¥</text>
|
||||
<text class="n">{{ info.money || '-' }}</text>
|
||||
</view>
|
||||
<view class="row">
|
||||
<text>订单编号:{{ info.out_trade_no || '-' }}</text>
|
||||
</view>
|
||||
<view class="row">
|
||||
<text>下单时间:{{ info.updatetime || '-'}}</text>
|
||||
</view>
|
||||
<view class="row">
|
||||
<text>支付方式:{{ info.pay_type || '-' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-wrap">
|
||||
<view class="btn" @click="toOrder">
|
||||
<text>查看订单</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
orderId: '',
|
||||
info: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
|
||||
onReady() {
|
||||
//动态修改状态栏的颜色
|
||||
uni.setNavigationBarColor({
|
||||
backgroundColor:this.theme.cartpieces
|
||||
})
|
||||
},
|
||||
async onLoad(e) {
|
||||
console.log(e)
|
||||
this.info = await this.api.shoppingorderordershoppingorderstatus({
|
||||
order_id: e.id
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
toOrder() {
|
||||
uni.pro.navigateTo('mall/order/index', {
|
||||
e: 0
|
||||
})
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
.header-wrap {
|
||||
padding: 50upx 0 94upx 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: var(--bg-color-button);
|
||||
|
||||
.icon {
|
||||
$size: 98upx;
|
||||
width: 98rpx;
|
||||
height: 93rpx;
|
||||
margin-right: 42upx;
|
||||
}
|
||||
|
||||
.t {
|
||||
font-size: 40upx;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.status-wrap {
|
||||
padding: 0 28upx;
|
||||
margin-top: -50upx;
|
||||
$h: 20upx;
|
||||
|
||||
.line {
|
||||
height: $h;
|
||||
border-radius: $h;
|
||||
background-color: 79, 81, 104;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
}
|
||||
|
||||
.info-wrap {
|
||||
padding: 0 32upx;
|
||||
margin-top: $h / 2 * -1;
|
||||
position: relative;
|
||||
|
||||
.card {
|
||||
background-color: #fff;
|
||||
padding: 28upx 64upx 64upx;
|
||||
border-radius: 0 0 28upx 28upx;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
width: 100%;
|
||||
height: 10px;
|
||||
box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.num {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: center;
|
||||
|
||||
.i {
|
||||
font-size: 24upx;
|
||||
position: relative;
|
||||
bottom: 12upx;
|
||||
}
|
||||
|
||||
.n {
|
||||
font-size: 44upx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.row {
|
||||
padding-top: 28upx;
|
||||
font-size: 28upx;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-wrap {
|
||||
padding: 64upx 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.btn {
|
||||
width: 296upx;
|
||||
height: 70upx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #fff;
|
||||
background: var(--bg-color-button);
|
||||
border-radius: 46rpx;
|
||||
opacity: 1;
|
||||
font-size: 28upx;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
364
pages/mall/order/refund.vue
Normal file
364
pages/mall/order/refund.vue
Normal file
@@ -0,0 +1,364 @@
|
||||
<template>
|
||||
<view class="index" :style="[theme]">
|
||||
<view class="onecontent flex-between" style="margin-top: 10rpx;" v-for="(item,index) in datalist.goods" :key="index">
|
||||
<image :src="item.img" mode="aspectFill"></image>
|
||||
<view class="flex-colum-start">
|
||||
<view class="onecontentone">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="onecontenttow">
|
||||
<view class="onecontenttowabsolute">
|
||||
x{{item.number}}
|
||||
</view>
|
||||
<text style="font-size:28rpx;">¥</text>{{item.price}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="therecontent">
|
||||
<view class="therecontentone flex-between" @click="showpicke = true">
|
||||
<view class="therecontentone_one">
|
||||
退款原因
|
||||
</view>
|
||||
<text class="therecontentone_text">{{reason}}</text>
|
||||
<u-icon name="arrow-right" color="#9b9b9b" size="14"></u-icon>
|
||||
</view>
|
||||
<view class="therecontentone flex-between">
|
||||
<view class="therecontentone_one">
|
||||
退款金额
|
||||
</view>
|
||||
<input disabled style="padding: 16rpx; color: red;" type="text" v-model="money"
|
||||
class="therecontentone_text" placeholder="请输入退款金额">
|
||||
</view>
|
||||
<view class="therecontentone">
|
||||
<view class="therecontentone_one">
|
||||
详细说明
|
||||
</view>
|
||||
<view class="" style="margin-top: 10rpx;">
|
||||
<u--textarea v-model="remarks" placeholder="请输入内容"></u--textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="therecontentone flex-between">
|
||||
<view class="therecontentone_one">
|
||||
图片凭证
|
||||
</view>
|
||||
<view class="therecontentone_text" style="text-align: right;">最多三张</view>
|
||||
</view>
|
||||
<view class="flex-start">
|
||||
<view class="fourcontent flex-start" v-if="avatar.length!=0">
|
||||
<view class="fourcontent_item" v-for="(item,index) in avatar" :key="index">
|
||||
<image :src="item" mode="aspectFill"></image>
|
||||
<text class="fourcontent_itemtext" @click="avatardelete(index)">
|
||||
<u-icon name="close-circle-fill" color="#000" size="16"></u-icon>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="avatar.length<3" class="fourcontent_items flex-colum" @click="chooseImagelist">
|
||||
<u-icon name="camera-fill" color="#000" size="30"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="buoot" @click="orderorderrefund">
|
||||
提交
|
||||
</view>
|
||||
<u-picker :show="showpicke" title='退款原因' :columns="columnspicke" @cancel='showpicke = false'
|
||||
@confirm='confirm'></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uploadImage from "@/js_sdk/yushijie-ossutil/ossutil/uploadFile.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showpicke: false,
|
||||
reason: "",
|
||||
money: '',
|
||||
columnspicke: [
|
||||
['7天无理由', '拍错/多拍/不想要', '其他']
|
||||
],
|
||||
imgCode: '', // 后续保存到手机相册所需要用到的字段
|
||||
remarks: '',
|
||||
form: {
|
||||
phone: '18092171236'
|
||||
},
|
||||
datalist: {},
|
||||
avatar: [],
|
||||
order_id: ""
|
||||
}
|
||||
},
|
||||
async onLoad(e) {
|
||||
this.order_id = e.id
|
||||
try {
|
||||
let res = await this.api.shoppingorderoorderdetail({
|
||||
id: this.order_id
|
||||
})
|
||||
if (res) {
|
||||
this.datalist = res
|
||||
this.money = res.price
|
||||
}
|
||||
} catch (e) {}
|
||||
// this.generate()
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// / 更换头像
|
||||
chooseImagelist(e) {
|
||||
// uni.showLoading({
|
||||
// title: '上传中',
|
||||
// mask: true
|
||||
// })
|
||||
uni.chooseImage({
|
||||
count: 1, //默认9
|
||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album'], //从相册选择
|
||||
success: (res) => {
|
||||
let file = res.tempFilePaths[0];
|
||||
uploadImage(file, 'refund/',
|
||||
result => {
|
||||
this.avatar.push(result)
|
||||
uni.hideLoading()
|
||||
}, result => {
|
||||
console.log(result)
|
||||
uni.hideLoading()
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
async orderorderrefund() {
|
||||
if (this.reason == null || this.reason == '') {
|
||||
uni.showToast({
|
||||
title: '请选择退款原因',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
let res = await this.api.shoppingorderorderororderrefund({
|
||||
order_id: this.order_id,
|
||||
reason: this.reason,
|
||||
remarks: this.remarks,
|
||||
img: this.avatar,
|
||||
// money:""
|
||||
})
|
||||
if (res == 1) {
|
||||
uni.showToast({
|
||||
title: '操作成功,请等待审核',
|
||||
icon: 'none'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
},
|
||||
avatardelete(e) {
|
||||
this.avatar.splice(e, 1)
|
||||
console.log(this.avatar)
|
||||
},
|
||||
confirm(e) {
|
||||
this.reason = e.value[0]
|
||||
this.showpicke = false
|
||||
console.log(e.value[0])
|
||||
},
|
||||
aveImageToPhotosAlbum() {
|
||||
let base64 = this.imgCode.replace(/^data:image\/\w+;base64,/, ""); //去掉data:image/png;base64,
|
||||
let filePath = wx.env.USER_DATA_PATH + '/ph_fit_qrcode.png'; // 路径文件名
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
uni.getFileSystemManager().writeFile({ // 获取全局唯一的文件管理器
|
||||
filePath: filePath, //创建一个临时文件名
|
||||
data: base64, //写入的文本或二进制数据
|
||||
encoding: 'base64', //写入当前文件的字符编码
|
||||
success: res => {
|
||||
uni.saveImageToPhotosAlbum({ // 保存图片到系统相册
|
||||
filePath: filePath,
|
||||
success: function(res2) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '保存成功',
|
||||
icon: "none",
|
||||
duration: 5000
|
||||
})
|
||||
},
|
||||
fail: function(err) {
|
||||
uni.hideLoading();
|
||||
// console.log(err.errMsg);
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
uni.hideLoading();
|
||||
//console.log(err)
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
.index {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.onecontent {
|
||||
width: 100%;
|
||||
padding: 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
|
||||
image {
|
||||
width: 176rpx;
|
||||
height: 176rpx;
|
||||
}
|
||||
|
||||
.flex-colum-start {
|
||||
flex: auto;
|
||||
margin-left: 20rpx;
|
||||
|
||||
.onecontentone {
|
||||
width: 400rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.onecontenttow {
|
||||
position: relative;
|
||||
margin-top: 16rpx;
|
||||
width: 100%;
|
||||
font-size: 40rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
|
||||
.onecontenttowabsolute {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.buoot {
|
||||
margin: 40rpx auto;
|
||||
width: 80%;
|
||||
padding: 16rpx 0;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
background:var(--bg-color-button);
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
|
||||
.therecontent {
|
||||
margin-top: 24rpx;
|
||||
padding: 32rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx;
|
||||
|
||||
.therecontentone {
|
||||
width: 100%;
|
||||
padding: 10rpx 0;
|
||||
border-bottom: 1px solid #F7F7F7;
|
||||
|
||||
.therecontentone_one {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.therecontentone_text {
|
||||
flex: auto;
|
||||
margin-left: 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.fourcontent_items {
|
||||
position: relative;
|
||||
margin-top: 16rpx;
|
||||
margin-left: 20rpx;
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
background: #f9f9f9;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.fourcontent {
|
||||
.fourcontent_item {
|
||||
position: relative;
|
||||
margin-top: 16rpx;
|
||||
margin-left: 20rpx;
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
border-radius: 16rpx;
|
||||
|
||||
image {
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.fourcontent_itemtext {
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
right: 0rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.entowakst {
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.therecontentfive_box {
|
||||
padding: 6rpx 10rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #666666;
|
||||
background: #FFFFFF;
|
||||
margin-left: 6rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #D5D5D5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
358
pages/mall/series.vue
Normal file
358
pages/mall/series.vue
Normal file
@@ -0,0 +1,358 @@
|
||||
<template>
|
||||
<view class="content" style="padding-bottom: 10rpx;" :style="[theme]">
|
||||
<view class="onecontent">
|
||||
<view class="onecontent_oen flex-start">
|
||||
<input class="onecontent_oen_input" type="text" v-model="like" placeholder="搜索订单/商家名/商品名">
|
||||
<text class="onecontent_oen_text" @click="init_fn">搜索</text>
|
||||
</view>
|
||||
<!-- <view class="onecontent_tow">
|
||||
<view ref="uTabs" class="onecontent_tow_item flex-colum" v-for="(item,index) in swipercurrentdata"
|
||||
:key="index" @click="orderswitch(item)">
|
||||
<view :class="swiperCurrent == item.id?'onecontent_tow_itemtexts':'onecontent_tow_itemtext'">
|
||||
{{item.title}}
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="towcontent flex-between">
|
||||
<view class="towcontentitem" v-if="list.length>0" v-for="(item,index1) in list" :key="index1"
|
||||
@click="eeInfo(item)">
|
||||
<view class="towcontentitemone flex-start">
|
||||
<image class="towcontentitemtow_imge" :src="item.host_img" mode="aspectFill"></image>
|
||||
<view class="towcontentitemtow_item ">
|
||||
<view class="towcontentitemtow_one">
|
||||
{{item.title}}
|
||||
</view>
|
||||
<view class="towcontentitemtow_tow">
|
||||
销量 {{item.sales}}+
|
||||
</view>
|
||||
<view class="towcontentitemtow_there flex-start">
|
||||
<view class="towcontentitemtow_there_one flex-start">
|
||||
¥<text>{{item.price}}</text>
|
||||
</view>
|
||||
<view class="towcontentitemtow_there_tow">¥{{item.y_price}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="list.length==0 && is_end == true" style="margin-top: 100rpx;width: 100%;" class="flex-colum">
|
||||
<image :src="bgnothave" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
<view class="flex-colum" style="width: 100%;">
|
||||
<u-loadmore :status="form.status" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentfixed" @click="clickshopcart">
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import bottombbar from '@/components/bottombbar.vue'
|
||||
export default {
|
||||
components: {
|
||||
bottombbar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
bgnothave: uni.getStorageSync('bgnothave'),
|
||||
model_type: uni.getStorageSync('loginuser').model_type,
|
||||
is_end: false,
|
||||
swiperCurrent: 0,
|
||||
overlayshow: false,
|
||||
swipercurrentdata: [],
|
||||
like: '',
|
||||
list: [],
|
||||
form: {
|
||||
page: 1,
|
||||
status: 'loadmore',
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
this.shoppingindex()
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log(e)
|
||||
this.swiperCurrent = e.id
|
||||
},
|
||||
onShow() {
|
||||
// this.shoppingindexgoodsclass()
|
||||
// this.$store.dispatch("actionsclassification");
|
||||
this.shoppingindex()
|
||||
},
|
||||
methods: {
|
||||
async shoppingindexgoodsclass() {
|
||||
let res = await this.api.shoppingindexgoodsclass()
|
||||
this.swipercurrentdata = res
|
||||
},
|
||||
async shoppingindex() {
|
||||
let res = await this.api.shoppingindex({
|
||||
page: this.form.page,
|
||||
like: this.like,
|
||||
classid: this.swiperCurrent
|
||||
})
|
||||
if (res.length == 0) {
|
||||
this.is_end = true
|
||||
this.form.status = 'nomore'
|
||||
return false;
|
||||
} else {
|
||||
this.form.status = 'loading';
|
||||
this.form.page = ++this.form.page;
|
||||
setTimeout(() => {
|
||||
this.list = [...this.list, ...res];
|
||||
if (res.length == 10) {
|
||||
this.form.status = 'loading';
|
||||
} else {
|
||||
this.is_end = true;
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
init_fn() {
|
||||
this.list = []
|
||||
this.is_end = false
|
||||
this.form.page = 1
|
||||
this.form.status = 'loadmore'
|
||||
this.shoppingindex()
|
||||
},
|
||||
orderswitch(e) {
|
||||
this.swiperCurrent = e.id
|
||||
this.init_fn()
|
||||
},
|
||||
clickshopcart() {
|
||||
uni.pro.navigateTo('shopcart/index')
|
||||
},
|
||||
eeInfo(e) { //查看订单详情
|
||||
uni.pro.navigateTo('mall/mallInfo', {
|
||||
id: e.id,
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
.contentfixed {
|
||||
position: fixed;
|
||||
background: url(@/static/gwc.png) no-repeat;
|
||||
background-size: cover;
|
||||
bottom: 328rpx;
|
||||
right: 28rpx;
|
||||
width: 84rpx;
|
||||
height: 84rpx;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.content {
|
||||
.onecontent {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 10rpx 28rpx;
|
||||
|
||||
.onecontent_oen {
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
height: 70rpx;
|
||||
border-radius: 36rpx;
|
||||
border:1rpx solid var(--bg-color-button);
|
||||
padding-right: 8rpx;
|
||||
|
||||
.onecontent_oen_input {
|
||||
padding-left: 32rpx;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.onecontent_oen_text {
|
||||
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
width: 116rpx;
|
||||
height: 56rpx;
|
||||
background: var(--bg-color-button);
|
||||
border-radius: 36rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.onecontent_tow {
|
||||
padding: 32rpx 0 32rpx 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
overflow: auto;
|
||||
|
||||
.onecontent_tow_item:nth-child(1) {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.onecontent_tow_item {
|
||||
position: relative;
|
||||
margin-left: 60rpx;
|
||||
white-space: nowrap;
|
||||
|
||||
.onecontent_tow_itemtexts {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: var(--bg-color-button);
|
||||
}
|
||||
|
||||
.onecontent_tow_itemtext {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.onecontent_tow_itemtexts::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -10rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 19.33rpx;
|
||||
height: 6.66rpx;
|
||||
background: url(https://ointmentweapp.oss-cn-beijing.aliyuncs.com/image/my/order/order1.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.towcontent {
|
||||
padding: 0 24rpx;
|
||||
|
||||
.towcontentitem {
|
||||
margin-top: 32rpx;
|
||||
width: 332rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx;
|
||||
|
||||
.towcontentitemone {
|
||||
width: 100%;
|
||||
|
||||
.towcontentitemtow_imge {
|
||||
border-top-left-radius: 16rpx;
|
||||
border-top-right-radius: 16rpx;
|
||||
width: 100%;
|
||||
height: 226rpx;
|
||||
}
|
||||
|
||||
.towcontentitemtow_item {
|
||||
padding: 16rpx;
|
||||
width: 100%;
|
||||
|
||||
.towcontentitemtow_one {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.towcontentitemtow_tow {
|
||||
font-size: 22rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.towcontentitemtow_there {
|
||||
margin-top: 14rpx;
|
||||
|
||||
.towcontentitemtow_there_one {
|
||||
text {
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
font-size: 4rpx;
|
||||
font-family: SourceHanSansCN-Bold-,
|
||||
SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #FC5F69;
|
||||
}
|
||||
|
||||
.towcontentitemtow_there_tow {
|
||||
text-decoration: line-through;
|
||||
margin-left: 10rpx;
|
||||
font-size: 22rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.warp {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
|
||||
.rect {
|
||||
padding: 40rpx 68rpx;
|
||||
width: 480rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 42rpx;
|
||||
|
||||
.rectone {
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.recttow {
|
||||
width: 100%;
|
||||
margin-top: 32rpx;
|
||||
|
||||
.recttow_one {
|
||||
padding: 8rpx 40rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 26rpx;
|
||||
border: 2rpx solid #999999;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.recttow_tow {
|
||||
padding: 8rpx 40rpx;
|
||||
background: #333333;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
border-radius: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
325
pages/my/address/edit.vue
Normal file
325
pages/my/address/edit.vue
Normal file
@@ -0,0 +1,325 @@
|
||||
<template>
|
||||
<view class="content" :style="[theme]">
|
||||
<view class="content_box">
|
||||
<view class="content_box_item flex-start">
|
||||
<view class="content_box_item_one">
|
||||
联系人
|
||||
</view>
|
||||
<view class="content_box_item_tow">
|
||||
<input type="text" v-model="form.name" placeholder="请填写收货人姓名" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_box_item flex-start">
|
||||
<view class="content_box_item_one">
|
||||
联系电话
|
||||
</view>
|
||||
<view class="content_box_item_tow">
|
||||
<input type="number" v-model="form.mobile" maxlength="11"
|
||||
placeholder="请填写收货人手机号码" />
|
||||
</view>
|
||||
</view>
|
||||
<pick-regions :defaultRegion="defaultRegionCode" @getRegion="handleGetRegion">
|
||||
<view class="content_box_item flex-start">
|
||||
<view class="content_box_item_one">
|
||||
所在地区
|
||||
</view>
|
||||
<view class="content_box_item_tow flex-start">
|
||||
<input type="text" v-model="regionName" disabled="disabled" placeholder="省市区、乡镇等" />
|
||||
<!-- <image class="content_box_itemimage" @click="chooseLocation" src="@/static/address.png" mode="aspectFill">
|
||||
</image> -->
|
||||
</view>
|
||||
</view>
|
||||
</pick-regions>
|
||||
<!-- <view class="content_box_item flex-start">
|
||||
<view class="content_box_item_one">
|
||||
所在街道
|
||||
</view>
|
||||
<view class="content_box_item_tow">
|
||||
<input type="text" v-model="form.name" placeholder="填写街道" />
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="content_box_item flex-start">
|
||||
<view class="content_box_item_one">
|
||||
详细地址
|
||||
</view>
|
||||
<view class="content_box_item_tow">
|
||||
<input type="text" v-model="form.address" placeholder="请填写详细地址" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_box_tow flex-between">
|
||||
<view class="content_box_tow_one">
|
||||
设为默认地址
|
||||
</view>
|
||||
<u-switch v-model="showis_default" size="20" @change="change"></u-switch>
|
||||
</view>
|
||||
<view class="positionfixed flex-center" @click="usereditaddress">
|
||||
保存
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pickRegions from '@/components/pick-regions/pick-regions.vue'
|
||||
export default {
|
||||
components: {
|
||||
pickRegions
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
region: [],
|
||||
showis_default: true,
|
||||
defaultRegionCode: '610112', //默认未央区
|
||||
height: '',
|
||||
form: {
|
||||
regionName: '',
|
||||
type: ''
|
||||
},
|
||||
valueswitch: false
|
||||
};
|
||||
},
|
||||
async onLoad(e) {
|
||||
this.form.id = e.id
|
||||
if (e.type == 1) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '添加地址'
|
||||
})
|
||||
} else {
|
||||
uni.setNavigationBarTitle({
|
||||
title: '修改地址'
|
||||
})
|
||||
let res = await this.api.usereaddressshow({
|
||||
id: this.form.id
|
||||
})
|
||||
console.log(res)
|
||||
if (res) {
|
||||
this.form = res
|
||||
if (res.is_default == 1) {
|
||||
this.showis_default = true
|
||||
} else {
|
||||
this.showis_default = false
|
||||
}
|
||||
}
|
||||
}
|
||||
this.form.type = e.type
|
||||
},
|
||||
onShow() {},
|
||||
watch: {},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
regionName() {
|
||||
// 转为字符串
|
||||
let res = null
|
||||
if (this.region.length == 0) {
|
||||
res = this.form.province + this.form.city + this.form.area
|
||||
} else {
|
||||
res = this.region.map(item => item.name).join(' ')
|
||||
}
|
||||
return res
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
change(e) {
|
||||
this.showis_default = e
|
||||
console.log('change', e);
|
||||
},
|
||||
async usereditaddress() {
|
||||
if (this.form.name == null || this.form.name == '') {
|
||||
uni.showToast({
|
||||
title: '请输入姓名',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.mobile == null || this.form.mobile == '') {
|
||||
uni.showToast({
|
||||
title: '请输入电话号码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.province == null || this.form.province == '') {
|
||||
uni.showToast({
|
||||
title: '请选择省,市,区',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.address == null || this.form.address == '') {
|
||||
uni.showToast({
|
||||
title: '请输入详细地址',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
let res = await this.api.usereditaddress({
|
||||
id: this.form.id, //地址ID
|
||||
province: this.form.province, //省
|
||||
city: this.form.city, //市
|
||||
area: this.form.area, //区
|
||||
address: this.form.address, //详细地址
|
||||
name: this.form.name, //姓名
|
||||
mobile: this.form.mobile, //电话
|
||||
lng: this.form.lng, //经度
|
||||
is_default: this.showis_default == true ? 1 : '', //1 默认
|
||||
lat: this.form.lat, //维度
|
||||
type: this.form.type //1 添加 2修改
|
||||
})
|
||||
console.log(res)
|
||||
if (res == 1) {
|
||||
uni.showToast({
|
||||
title: this.form.type == 1 ? '添加成功' : '修改成功',
|
||||
icon: 'none'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
handleGetRegion(region) {
|
||||
console.log(111, region)
|
||||
this.region = region
|
||||
this.form.province = region[0].name
|
||||
this.form.city = region[1].name
|
||||
this.form.area = region[2].name
|
||||
|
||||
},
|
||||
chooseLocation() {
|
||||
uni.chooseAddress({
|
||||
success: (res) => {
|
||||
console.log(res)
|
||||
this.form.address = res.address
|
||||
this.form.lat = res.latitude
|
||||
this.form.lng = res.longitude
|
||||
this.lnglat = res.latitude + '-' + res.longitude
|
||||
console.log('位置名称:' + res.name);
|
||||
console.log('详细地址:' + res.address);
|
||||
console.log('纬度:' + res.latitude);
|
||||
console.log('经度:' + res.longitude);
|
||||
},
|
||||
fail: (e) => {
|
||||
console.log(e)
|
||||
// uni.getSetting({
|
||||
// success: function(res) {
|
||||
// var statu = res.authSetting;
|
||||
// console.log(statu);
|
||||
// if (!statu['scope.userLocation']) {
|
||||
// console.log(123);
|
||||
// uni.showModal({
|
||||
// title: '是否授权当前位置',
|
||||
// content: '需要获取您的地理位置,请确认授权,否则地图功能将无法使用',
|
||||
// success(tip) {
|
||||
// if (tip.confirm) {
|
||||
// uni.authorize({
|
||||
// scope: 'scope.userLocation',
|
||||
// success:()=> {
|
||||
// this.chooseLocation()
|
||||
// }
|
||||
// })
|
||||
// } else {
|
||||
// uni.showToast({
|
||||
// title: '授权失败',
|
||||
// icon: 'none',
|
||||
// duration: 1000
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
}
|
||||
})
|
||||
},
|
||||
edit(e) {
|
||||
uni.pro.navigateTo('my/address/edit', e.id)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0 30rpx;
|
||||
|
||||
.content_box {
|
||||
padding-left: 40rpx;
|
||||
background: #FFF;
|
||||
|
||||
.content_box_item {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
padding: 32rpx;
|
||||
border-bottom: 1rpx solid #F6F6F6;
|
||||
|
||||
.content_box_item_one {
|
||||
width: 112rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.content_box_item_tow {
|
||||
flex: auto;
|
||||
padding-left: 80rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #CCCCCC;
|
||||
|
||||
input {
|
||||
flex: auto;
|
||||
height: 100%;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #CCCCCC;
|
||||
}
|
||||
}
|
||||
|
||||
.content_box_itemimage {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.content_box_tow {
|
||||
margin-top: 24rpx;
|
||||
padding: 34rpx 44rpx;
|
||||
background: #FFF;
|
||||
|
||||
.content_box_tow_one {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.positionfixed {
|
||||
position: fixed;
|
||||
background: #f6f6f6;
|
||||
width: 90%;
|
||||
bottom: 50rpx;
|
||||
left: 5%;
|
||||
padding: 24rpx 34rpx;
|
||||
text-align: center;
|
||||
background: var(--bg-color-button);
|
||||
border-radius: 46rpx;
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
248
pages/my/address/index.vue
Normal file
248
pages/my/address/index.vue
Normal file
@@ -0,0 +1,248 @@
|
||||
<template>
|
||||
<view class="content" :style="[theme]">
|
||||
<view class="contentitem" v-for="(item,index) in list" :key="index" @click.stop="order_fn(item)">
|
||||
<view class="contentitemone flex-start">
|
||||
<view class="contentitemone_textone">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<view class="contentitemone_textyow">
|
||||
{{item.mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2')}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="contentitemtow ">
|
||||
{{item.province}}{{item.area}}{{item.city}}{{item.address}}
|
||||
</view>
|
||||
<view class="contentitemthere flex-between">
|
||||
<view class="contentitemthereone flex-start" @click.stop="edit(item)">
|
||||
<u-icon v-if="item.is_default == 1" style="margin-right: 10rpx;" name="checkmark-circle-fill"
|
||||
color="##9397c1" size="18"></u-icon>
|
||||
<view v-else class="contentitemthereonecircle">
|
||||
|
||||
</view>
|
||||
默认地址
|
||||
</view>
|
||||
<view class="contentitemtheretow flex-start">
|
||||
<text @click.stop="edit(item)">编辑</text>
|
||||
<text style="margin-left: 60rpx;" @click.stop="clickdelete(item)">删除</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="positionfixed flex-center" @click="add">
|
||||
<u-icon name="plus" color="#FFF" size="14"></u-icon>
|
||||
<view style="margin-left: 20rpx;">添加地址</view>
|
||||
</view>
|
||||
<view v-if="list.length==0 && is_end == true" class="flex-colum">
|
||||
<image style="margin-top: 100rpx;" :src="bgnothave" mode="aspectFill">
|
||||
</image>
|
||||
</view>
|
||||
<u-loadmore :status="form.status" />
|
||||
<view :style="{height:height}"></view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
bgnothave: uni.getStorageSync('bgnothave'),
|
||||
height: '',
|
||||
is_order: 0,
|
||||
list: [],
|
||||
is_end: false,
|
||||
form: {
|
||||
page: 1,
|
||||
status: 'loadmore',
|
||||
},
|
||||
|
||||
};
|
||||
},
|
||||
onLoad(e) {
|
||||
this.is_order = e.order
|
||||
},
|
||||
onReachBottom() {
|
||||
this.usermyaddresslist()
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
var query = uni.createSelectorQuery().in(this).select('.positionfixed')
|
||||
query.boundingClientRect(ele => {
|
||||
var that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.height = ele.height + 50 + "px";
|
||||
that = null;
|
||||
}
|
||||
})
|
||||
}).exec();
|
||||
},
|
||||
onShow() {
|
||||
this.inif()
|
||||
},
|
||||
methods: {
|
||||
async usermyaddresslist() {
|
||||
let res = await this.api.usermyaddresslist({
|
||||
page: this.form.page
|
||||
})
|
||||
if (res.length == 0) {
|
||||
this.is_end = true
|
||||
this.form.status = 'nomore'
|
||||
return false;
|
||||
} else {
|
||||
this.form.status = 'loading';
|
||||
this.form.page = ++this.form.page;
|
||||
setTimeout(() => {
|
||||
this.list = [...this.list, ...res];
|
||||
if (res.length == 10) {
|
||||
this.form.status = 'loading';
|
||||
} else {
|
||||
this.is_end = true;
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
order_fn(item) {
|
||||
if (this.is_order == 1) {
|
||||
uni.$emit('update', JSON.stringify(item));
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
|
||||
}
|
||||
},
|
||||
add() {
|
||||
uni.pro.navigateTo('my/address/edit', {
|
||||
type: 1
|
||||
})
|
||||
},
|
||||
edit(e) {
|
||||
uni.pro.navigateTo('my/address/edit', {
|
||||
type: 2,
|
||||
id: e.id
|
||||
})
|
||||
},
|
||||
inif() {
|
||||
this.list = []
|
||||
this.is_end = false,
|
||||
this.form = {
|
||||
page: 1,
|
||||
status: 'loadmore',
|
||||
},
|
||||
this.usermyaddresslist()
|
||||
},
|
||||
async clickdelete(e) {
|
||||
var this_ = this
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认删除该地址吗?',
|
||||
async success(data) {
|
||||
if (data.confirm) {
|
||||
let res = await this_.api.useredeleteaddress({
|
||||
id: e.id
|
||||
})
|
||||
if (res) {
|
||||
this_.inif()
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0 30rpx;
|
||||
|
||||
.positionfixed {
|
||||
position: fixed;
|
||||
background: #f6f6f6;
|
||||
width: 80%;
|
||||
bottom: 50rpx;
|
||||
left: 10%;
|
||||
padding: 24rpx 34rpx;
|
||||
text-align: center;
|
||||
background: var(--bg-color-button);
|
||||
border-radius: 46rpx;
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.contentitem {
|
||||
padding: 32rpx 40rpx;
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
background: #ffffff;
|
||||
border-radius: 18rpx;
|
||||
|
||||
.contentitemone {
|
||||
.contentitemone_textone {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.contentitemone_textyow {
|
||||
margin-left: 40rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.contentitemtow {
|
||||
margin-top: 12rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.contentitemtow::after {
|
||||
display: inline-block;
|
||||
content: '';
|
||||
margin: 32rpx 0 20rpx 0;
|
||||
width: 100%;
|
||||
height: 1rpx;
|
||||
background: #f6f6f6;
|
||||
}
|
||||
|
||||
.contentitemthere {
|
||||
.contentitemthereone {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #5C685D;
|
||||
}
|
||||
|
||||
.contentitemthereonecircle {
|
||||
margin-right: 10rpx;
|
||||
border-radius: 50%;
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
border: 2rpx solid #666666;
|
||||
}
|
||||
|
||||
.contentitemtheretow {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
408
pages/my/index.vue
Normal file
408
pages/my/index.vue
Normal file
@@ -0,0 +1,408 @@
|
||||
<template>
|
||||
<view>
|
||||
<navbar :collapse='false' :Background='Background' :navtitle='navtitle' :navboxshow="navboxshow"
|
||||
@fatherMethod='navfatherMethod'></navbar>
|
||||
<view class="index_box">
|
||||
<image class="index_boximge" :src="userlist.background" mode="aspectFill"></image>
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<navigator :url="'/pages/my/setup/index'" class="index_boxone flex-between"
|
||||
:style="[{'padding-top':HeighT.customBar+'px'}]">
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP-WEIXIN -->
|
||||
<navigator :url="'/pages/my/setup/index'" class="index_boxone flex-between" style="padding-top:44px;">
|
||||
<!-- #endif -->
|
||||
<view class="index_boxone_one flex-start" v-if="userlist.user">
|
||||
<image :src="userlist.user.avatar" mode="aspectFill"></image>
|
||||
<view class="index_boxone_tow flex-colum-start">
|
||||
<text class="index_boxone_tow_one">{{userlist.user.nickname || "暂无昵称"}}</text>
|
||||
<text class="index_boxone_tow_tow">{{userlist.user.user_id}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<u-icon name="setting" color="#fff" size="20"></u-icon>
|
||||
</navigator>
|
||||
<view class="onebox">
|
||||
<view class="onebox_one">
|
||||
<view class="onebox_one_text flex-between">
|
||||
<text>我的订单</text>
|
||||
<text @click="order(10)">查看全部</text>
|
||||
</view>
|
||||
<view class="onebox_one_one flex-around">
|
||||
<view class="flex-colum" v-for="(item,index) in userlist.user_order" :key="index"
|
||||
@click="order(index)">
|
||||
<image :src="item.img" mode="aspectFill"></image>
|
||||
<text>{{item.name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="towbox flex-between">
|
||||
<view class="towbox_item flex-start" v-for="(item,index) in userlist.t_user" :key="index"
|
||||
@click="toworder(index)">
|
||||
<image :src="item.img" mode="aspectFill"></image>
|
||||
<view class="flex-colum">
|
||||
<text>{{item.name}}</text>
|
||||
<view v-if="index==0">{{item.balance}}<text>元</text></view>
|
||||
<view v-if="index==1">{{item.card_count}}<text>张</text></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="therebox">
|
||||
<view class="therebox_item flex-between" v-for="(item,index) in userlist.list" :key="index"
|
||||
@click="mobilemobile(item)">
|
||||
<view class="flex-start">
|
||||
<image :src="item.img" mode="aspectFill"></image>
|
||||
<text>{{item.name}}</text>
|
||||
</view>
|
||||
<u-icon name="arrow-right" color="#9b9b9b" size="14"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<bottombbar :valuebbar='4'></bottombbar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import navbar from '@/components/navbar.vue'
|
||||
import bottombbar from '@/components/bottombbar.vue'
|
||||
export default {
|
||||
components: {
|
||||
navbar,
|
||||
bottombbar
|
||||
},
|
||||
computed: {
|
||||
HeighT() {
|
||||
return this.$store.getters.is_BarHeight
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
navtitle: '', //名称
|
||||
navboxshow: '0', //显示
|
||||
Background: 'none',
|
||||
userlist: {
|
||||
user: {
|
||||
avatar: "https://door.sxczgkj.cn//assets/img/avatar.png",
|
||||
nickname: "超掌柜",
|
||||
user_id: 1001,
|
||||
},
|
||||
t_user: [{
|
||||
balance: "0.00",
|
||||
img: "https://door.sxczgkj.cn//apple/qb.png"
|
||||
}, {
|
||||
card_count: "0",
|
||||
img: "https://door.sxczgkj.cn//apple/kx.png"
|
||||
}],
|
||||
list: [{
|
||||
img: "https://door.sxczgkj.cn//apple/kf.png",
|
||||
mobile: "0290102212",
|
||||
name: "联系客服",
|
||||
url: ""
|
||||
}, {
|
||||
img: "https://door.sxczgkj.cn//apple/aq.png",
|
||||
name: "安全密码",
|
||||
url: "my/setup/repairpassword",
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
onShow() {
|
||||
this.$store.dispatch("actionsclassification");
|
||||
this.usermy()
|
||||
this.$store.dispatch('storeuseruserinfo')
|
||||
},
|
||||
methods: {
|
||||
async mobilemobile(e) {
|
||||
switch (e.name) {
|
||||
case '联系客服':
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: e.mobile //打电话
|
||||
});
|
||||
break;
|
||||
case '安全密码':
|
||||
|
||||
if (uni.cache.get('loginuser').userinfo.mobile) {
|
||||
uni.pro.navigateTo(e.url)
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认订单需要获取您的手机号',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/my/setup/index'
|
||||
});
|
||||
} else if (res.cancel) {}
|
||||
}
|
||||
});
|
||||
}
|
||||
break;
|
||||
case '我的地址':
|
||||
uni.pro.navigateTo(e.url)
|
||||
break;
|
||||
}
|
||||
},
|
||||
async usermy() {
|
||||
let res = await this.api.usermy({
|
||||
store_id: uni.cache.get('store_id') // 判断显示哪家的作品,
|
||||
})
|
||||
this.userlist = res
|
||||
console.log(res)
|
||||
},
|
||||
threelist(e) {
|
||||
uni.pro.navigateTo('my/order/index', {
|
||||
e: e
|
||||
})
|
||||
},
|
||||
toworder(e) {
|
||||
if (e == 0) {
|
||||
uni.pro.navigateTo('my/member/memberone', e)
|
||||
} else {
|
||||
uni.pro.navigateTo('my/member/index', {
|
||||
e: e
|
||||
})
|
||||
}
|
||||
},
|
||||
order(e) {
|
||||
switch (e) {
|
||||
case 10:
|
||||
if (uni.cache.get('loginuser').style_type == 2) {
|
||||
uni.pro.navigateTo('mall/order/index', {
|
||||
e: 0
|
||||
})
|
||||
} else {
|
||||
uni.pro.navigateTo('my/order/index', {
|
||||
e: 0
|
||||
})
|
||||
}
|
||||
break;
|
||||
case 0:
|
||||
if (uni.cache.get('loginuser').style_type == 2) {
|
||||
uni.pro.navigateTo('mall/order/index', {
|
||||
e: 1
|
||||
})
|
||||
} else {
|
||||
uni.pro.navigateTo('my/order/index', {
|
||||
e: 1
|
||||
})
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (uni.cache.get('loginuser').style_type == 2) {
|
||||
uni.pro.navigateTo('mall/order/index', {
|
||||
e: 2
|
||||
})
|
||||
} else {
|
||||
uni.pro.navigateTo('my/order/index', {
|
||||
e: 2
|
||||
})
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (uni.cache.get('loginuser').style_type == 2) {
|
||||
uni.pro.navigateTo('mall/order/index', {
|
||||
e: 3
|
||||
})
|
||||
} else {
|
||||
uni.pro.navigateTo('my/order/index', {
|
||||
e: 3
|
||||
})
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (uni.cache.get('loginuser').style_type == 2) {
|
||||
uni.pro.navigateTo('mall/order/index', {
|
||||
e: 4
|
||||
})
|
||||
} else {
|
||||
uni.pro.navigateTo('my/order/index', {
|
||||
e: 4
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.index_box {
|
||||
position: relative;
|
||||
padding: 0 32rpx;
|
||||
width: 100%;
|
||||
height: 502rpx;
|
||||
// background: url(@/static/1.png) no-repeat;
|
||||
background-size: cover;
|
||||
|
||||
.index_boximge {
|
||||
z-index: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.index_boxone {
|
||||
z-index: 9;
|
||||
|
||||
.index_boxone_one {
|
||||
image {
|
||||
z-index: 999;
|
||||
width: 124rpx;
|
||||
height: 124rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.index_boxone_tow {
|
||||
margin-left: 32rpx;
|
||||
height: 100rpx;
|
||||
justify-content: space-around;
|
||||
|
||||
.index_boxone_tow_one {
|
||||
z-index: 9;
|
||||
font-size: 40rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.index_boxone_tow_tow {
|
||||
z-index: 9;
|
||||
font-size: 28rpx;
|
||||
font-family: Segoe UI-Regular, Segoe UI;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.onebox {
|
||||
position: relative;
|
||||
top: 40rpx;
|
||||
|
||||
.onebox_one {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
padding: 32rpx;
|
||||
|
||||
.onebox_one_text{
|
||||
width: 100%;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
text:nth-child(2){
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
|
||||
.onebox_one_one {
|
||||
margin-top: 32rpx;
|
||||
|
||||
.flex-colum {
|
||||
image {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
margin-top: 16rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.towbox {
|
||||
margin-top: 64rpx;
|
||||
|
||||
.towbox_item {
|
||||
width: 48%;
|
||||
background: #FFFFFF;
|
||||
padding: 32rpx 24rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
image {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
|
||||
.flex-colum {
|
||||
width:50%;
|
||||
margin-left: 28rpx;
|
||||
align-items: flex-start;
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
view {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
|
||||
text {
|
||||
color: #333333;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.therebox {
|
||||
margin-top: 32rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
padding: 0 32rpx 32rpx 32rpx;
|
||||
|
||||
.therebox_item {
|
||||
padding-top: 32rpx;
|
||||
|
||||
.flex-start {
|
||||
image {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
margin-left: 24rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
179
pages/my/member/index.vue
Normal file
179
pages/my/member/index.vue
Normal file
@@ -0,0 +1,179 @@
|
||||
<template>
|
||||
<view class="content" :style="[theme]">
|
||||
<view class="onecontentone">
|
||||
我的会员卡<text v-if="list.length!=0">({{list.length}})</text>
|
||||
</view>
|
||||
<view class="flex-colum">
|
||||
<view class="towcontentitem" v-if="list.length>0" v-for="(item,index) in list" :key="index"
|
||||
@click="eeInfo(item)">
|
||||
<image class="towcontentitemimage"
|
||||
src="https://ointmentweapp.oss-cn-beijing.aliyuncs.com/my/recharge.png" mode="aspectFill"></image>
|
||||
<view class="towcontentitemone flex-start">
|
||||
<image class="towcontentitemoneimage" :src="item.store_avatar" mode="aspectFill"></image>
|
||||
<text class="towcontentitemonetext" style="color: #333333;">{{item.store_title}}</text>
|
||||
</view>
|
||||
<view class="towcontentitemtow flex-between">
|
||||
<text class="towcontentitemtowetext" style="color:#333333;">{{item.vip_number}}</text>
|
||||
<text>{{item.end_time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="list.length==0 && is_end == true" class="flex-colum">
|
||||
<image :src="bgnothave" mode="aspectFill">
|
||||
</image>
|
||||
</view>
|
||||
<u-loadmore :status="form.status" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
bgnothave:uni.getStorageSync('bgnothave'),
|
||||
list: [],
|
||||
is_end: false,
|
||||
nickname: uni.cache.get('loginuser').userinfo.nickname,
|
||||
form: {
|
||||
page: 1,
|
||||
status: 'loadmore',
|
||||
},
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.userusercarlist()
|
||||
},
|
||||
onReachBottom() {
|
||||
this.userusercarlist()
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async userusercarlist() {
|
||||
let res = await this.api.userusercarlist({
|
||||
page: this.form.page,
|
||||
store_id:uni.cache.get('store_id')
|
||||
})
|
||||
if (res.length == 0) {
|
||||
this.is_end = true
|
||||
this.form.status = 'nomore'
|
||||
return false;
|
||||
} else {
|
||||
this.form.status = 'loading';
|
||||
this.form.page = ++this.form.page;
|
||||
setTimeout(() => {
|
||||
this.list = [...this.list, ...res];
|
||||
if (res.length == 10) {
|
||||
this.form.status = 'loading';
|
||||
} else {
|
||||
this.is_end = true;
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
}, 500)
|
||||
|
||||
}
|
||||
},
|
||||
eeInfo(e) {
|
||||
uni.pro.navigateTo('my/member/memberinfo',{
|
||||
id: e.vip_id,
|
||||
lang:1
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #FFFFFF;
|
||||
}
|
||||
|
||||
.content {
|
||||
border-top: 16rpx solid #f7f7f7;
|
||||
padding: 28rpx;
|
||||
padding-bottom: 40rpx;
|
||||
|
||||
.flex-colum_image {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
|
||||
text {
|
||||
margin-top: 30rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.onecontentone {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.flex-colum {
|
||||
.towcontentitem {
|
||||
margin-top: 22rpx;
|
||||
width: 96%;
|
||||
position: relative;
|
||||
height: 224rpx;
|
||||
padding: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.towcontentitemimage {
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 12rpx;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.towcontentitemone {
|
||||
position: relative;
|
||||
z-index: 10;
|
||||
.towcontentitemoneimage {
|
||||
width: 76rpx;
|
||||
height: 76rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.towcontentitemonetext {
|
||||
width: 60%;
|
||||
margin-left: 16rpx;
|
||||
font-size: 32rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #422A07;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitemtow {
|
||||
z-index: 10;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
bottom: 18rpx;
|
||||
padding:0 32rpx;
|
||||
// margin-top: 52rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #422A07;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
399
pages/my/member/memberinfo.vue
Normal file
399
pages/my/member/memberinfo.vue
Normal file
@@ -0,0 +1,399 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<view class="towcontentitem">
|
||||
<image class="towcontentitemimage" :src="data.img" mode="aspectFill"></image>
|
||||
<view class="fourcontentitemabsolute">
|
||||
<!-- 年卡会员 -->
|
||||
</view>
|
||||
<view class="towcontentitemone flex-start">
|
||||
<image class="towcontentitemoneimage" :src="data.store_avatar" mode="aspectFill"></image>
|
||||
<view class="towcontentitemonetext flex-colum-start">
|
||||
<text class="towcontentitemonetextone">{{data.title}}</text>
|
||||
<text class="towcontentitemonetexttow">{{data.show}}</text>
|
||||
</view>
|
||||
<view class="towcontentitemoneabsolute" @click="overlayshow = true">
|
||||
加购
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontentitemprogress">
|
||||
{{Number(data.user_sec_y_frequ)}}/{{Number(data.user_sec_z_frequ)}} 次
|
||||
</view>
|
||||
<view class="towcontentitemtow flex-between">
|
||||
<text class="towcontentitemtowetext">{{data.vip_number || ''}}</text>
|
||||
<text class="towcontentitemtowetext">{{data.end_time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="therecontentitem">
|
||||
<view class="therecontentitemtext">
|
||||
会员详情
|
||||
</view>
|
||||
<view class="therecontentitemone">
|
||||
<!-- <view class="therecontentitemoneiten flex-between" @click="order">
|
||||
<text class="therecontentitemoneitentetxt">账单明细</text>
|
||||
<u-icon name="arrow-right" color="#808080" size="18"></u-icon>
|
||||
</view> -->
|
||||
<view class="therecontentitemoneiten flex-between" @click="overlayshow = true">
|
||||
<text class="therecontentitemoneitentetxt">订单明细</text>
|
||||
<u-icon name="arrow-right" color="#808080" size="18"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-overlay :show="overlayshow" @click="overlayshow = false">
|
||||
<view class="warp">
|
||||
<view class="rect" @tap.stop>
|
||||
<view class="onerect flex-center">
|
||||
<view>{{data.store_title}}</view>
|
||||
<u-icon @click="overlayshow = false" class="onerecticon" name="backspace" color="#000000"
|
||||
size="28"></u-icon>
|
||||
</view>
|
||||
<view class="towrect">
|
||||
商品
|
||||
</view>
|
||||
<view class="thererect flex-between">
|
||||
<view class="thererectone">
|
||||
{{data.title}}
|
||||
</view>
|
||||
<view class="thererecttow">
|
||||
<text>¥</text>{{data.price}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="fourrect flex-between">
|
||||
<view class="fourrectone">
|
||||
<text>共计:</text>¥{{data.price}}
|
||||
</view>
|
||||
<view class="fourrecttow" @tap="$u.debounce(showpopupclick,1000)">
|
||||
立即购买
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-overlay>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
overlayshow: false,
|
||||
numberbox: "",
|
||||
data: {}
|
||||
}
|
||||
},
|
||||
async onLoad(e) {
|
||||
console.log(e)
|
||||
let res = await this.api.reservationvipdetail({
|
||||
id: e.id
|
||||
})
|
||||
this.data = res
|
||||
console.log(this.data)
|
||||
},
|
||||
methods: {
|
||||
async showpopupclick() {
|
||||
try {
|
||||
let res = await this.api.useropenuserseccrd({
|
||||
id: this.data.id
|
||||
}) //判断是否支付成功
|
||||
if (res) {
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay', //支付类型-固定值
|
||||
partnerid: res.payAppId, // 微信支付商户号
|
||||
timeStamp: res.payTimeStamp, // 时间戳(单位:秒)
|
||||
nonceStr: res.paynonceStr, // 随机字符串
|
||||
package: res.payPackage, // 固定值
|
||||
signType: res.paySignType, //固定值
|
||||
paySign: res.paySign, //签名
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
title: "支付成功"
|
||||
})
|
||||
uni.redirectTo({
|
||||
url: "/my/member/index?e=" + 1,
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
setTimeout(res => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '支付失败'
|
||||
})
|
||||
uni.hideLoading()
|
||||
}, 2000)
|
||||
uni.redirectTo({
|
||||
url: "/my/member/index?e=" + 1,
|
||||
});
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
},
|
||||
order(e) {
|
||||
uni.pro.navigateTo('my/order/index', {
|
||||
e: 0
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.towcontentitem {
|
||||
margin-top: 22rpx;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
padding: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.fourcontentitemabsolute {
|
||||
z-index: 9;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
padding: 6rpx 28rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
text-shadow: 0px 6rpx 12rpx rgba(255, 255, 255, 0.19);
|
||||
background: linear-gradient(NaNdeg, #4A4A4A 0%, #919191 100%);
|
||||
border-radius: 0px 12rpx 0px 12rpx;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.towcontentitemimage {
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 12rpx;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.towcontentitemone {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
z-index: 9;
|
||||
|
||||
.towcontentitemoneimage {
|
||||
width: 76rpx;
|
||||
height: 76rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.towcontentitemoneabsolute {
|
||||
position: absolute;
|
||||
padding: 8rpx 44rpx;
|
||||
right: 0;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
background: linear-gradient(130deg, #F4AE46 0%, #EE9437 100%);
|
||||
box-shadow: 0px 4rpx 8rpx 2rpx rgba(243, 169, 67, 0.37);
|
||||
border-radius: 28rpx;
|
||||
}
|
||||
|
||||
.towcontentitemonetext {
|
||||
width: 80%;
|
||||
height: 76rpx;
|
||||
margin-left: 16rpx;
|
||||
|
||||
.towcontentitemonetextone {
|
||||
width: 80%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #422A07;
|
||||
}
|
||||
|
||||
.towcontentitemonetexttow {
|
||||
width: 80%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
width:400rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #422A07;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitemprogressa {
|
||||
padding: 8rpx 44rpx;
|
||||
width: 50%;
|
||||
z-index: 10;
|
||||
position: relative;
|
||||
margin-top: 54rpx;
|
||||
}
|
||||
|
||||
.towcontentitemprogress {
|
||||
position: relative;
|
||||
z-index: 99;
|
||||
margin-top: 24rpx;
|
||||
border-radius: 28rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.towcontentitemtow {
|
||||
z-index: 10;
|
||||
position: relative;
|
||||
margin-top: 68rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #422A07;
|
||||
}
|
||||
}
|
||||
|
||||
.therecontentitem {
|
||||
margin-top: 32rpx;
|
||||
width: 100%;
|
||||
padding: 32rpx 32rpx 0 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 24rpx;
|
||||
|
||||
.therecontentitemtext {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.therecontentitemone {
|
||||
.therecontentitemoneiten:nth-child(1) {
|
||||
border-top: none !important;
|
||||
}
|
||||
|
||||
.therecontentitemoneiten {
|
||||
padding: 32rpx 0;
|
||||
border-top: 1px solid #F7F7F7;
|
||||
|
||||
.therecontentitemoneitentetxt {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.warp {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
|
||||
.rect {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 60rpx 60rpx 0px 0px;
|
||||
padding: 48rpx 32rpx 32rpx 32rpx;
|
||||
|
||||
.onerect {
|
||||
position: relative;
|
||||
padding-bottom: 48rpx;
|
||||
|
||||
image {
|
||||
width: 124rpx;
|
||||
height: 124rpx;
|
||||
}
|
||||
|
||||
view {
|
||||
margin-left: 16rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.onerecticon {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.towrect {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.thererect {
|
||||
margin-top: 16rpx;
|
||||
|
||||
.thererectone {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.thererecttow {
|
||||
text {
|
||||
font-size: 16rpx;
|
||||
}
|
||||
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Heavy,
|
||||
PingFang SC;
|
||||
font-weight: 800;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.fourrect {
|
||||
margin-top: 44rpx;
|
||||
|
||||
.fourrectone {
|
||||
text {
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
font-size: 40rpx;
|
||||
font-family: PingFang SC-Bold,
|
||||
PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FC5F69;
|
||||
}
|
||||
|
||||
.fourrecttow {
|
||||
background: linear-gradient(143deg, #8689AF 0%, #494A5F 100%);
|
||||
border-radius: 34rpx;
|
||||
padding: 10rpx 44rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
600
pages/my/member/memberinfos.vue
Normal file
600
pages/my/member/memberinfos.vue
Normal file
@@ -0,0 +1,600 @@
|
||||
<template>
|
||||
<view class="content" :style="[theme]">
|
||||
<view class="towcontentitem">
|
||||
<image class="towcontentitemimage" :src="data.img" mode="aspectFill"></image>
|
||||
<view class="towcontentitemone flex-start">
|
||||
<view class="towcontentitemonetext flex-colum-start">
|
||||
<text class="towcontentitemonetextone" style="color: #fff;">{{data.title}}</text>
|
||||
<text class="towcontentitemonetexttow" style="color: #fff;">{{data.show}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontentitemtow flex-between">
|
||||
<text class="towcontentitemtowetext" style="color: #fff;">¥{{data.price}}<text
|
||||
class="towcontentitemtowetexts" style="color: #fff;">/{{data.frequ}}次</text></text>
|
||||
<text class="towcontentitemtowetext_s" style="color: #fff;">{{data.end_time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="therecontentitem">
|
||||
<view class="therecontentitemtext">
|
||||
商品
|
||||
</view>
|
||||
<view class="therecontentitemtextitem flex-between">
|
||||
<view class="therecontentitemtextitem_left">
|
||||
{{data.title}}
|
||||
</view>
|
||||
<view class="therecontentitemtextitem_right">
|
||||
¥{{data.price}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="therecontentitemtextitemt_one">
|
||||
{{data.show}}
|
||||
</view>
|
||||
<view class="therecontentitemtext" style="margin-top: 14rpx;">
|
||||
权益
|
||||
</view>
|
||||
<view class="therecontentitemtextitemt_one">
|
||||
<text style="color: #333333;">{{data.frequ}}次</text>{{data.show}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="therecontentitem">
|
||||
<view class="therecontentitem_tow flex-start">
|
||||
手机号码<text>{{data.mobile}}</text>
|
||||
</view>
|
||||
<view class="therecontentitem_tows">
|
||||
该号码不会提供给商家,仅用于接收平台通知信息
|
||||
</view>
|
||||
</view>
|
||||
<view class="therecontentitem">
|
||||
<view class="therecontentitemtext">
|
||||
使用说明
|
||||
</view>
|
||||
<view class="therecontentitemtextthere" style="margin-top: 14rpx;margin-bottom: 30rpx;"
|
||||
v-html="data.notice">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="fixedview flex-between">
|
||||
<view class="fixedview_one flex-start">
|
||||
<view class="fixedview_oneone">
|
||||
应付金额:
|
||||
</view>
|
||||
<view class="fixedview_onetow flex-colum-start">
|
||||
<text>¥{{data.price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="mobile" class="fixedview_tow" @tap="$u.debounce(showpopupclick,1000)">
|
||||
立即付款
|
||||
</view>
|
||||
<view v-else class="fixedview_tow">
|
||||
<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
|
||||
立即付款
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
<u-overlay :show="overlayshow" @click="overlayshow = false">
|
||||
<view class="warp">
|
||||
<view class="rect" @tap.stop>
|
||||
<view class="onerect flex-center">
|
||||
<view>【洗剪吹】新娘造型</view>
|
||||
<u-icon @click="overlayshow = false" class="onerecticon" name="backspace" color="#000000"
|
||||
size="28"></u-icon>
|
||||
</view>
|
||||
<view class="towrect">
|
||||
商品
|
||||
</view>
|
||||
<view class="thererect flex-between">
|
||||
<view class="thererectone">
|
||||
年卡会员
|
||||
</view>
|
||||
<view class="thererecttow">
|
||||
<text>¥</text>300
|
||||
</view>
|
||||
</view>
|
||||
<view class="fourrect flex-between">
|
||||
<view class="fourrectone">
|
||||
<text>共计:</text>¥300
|
||||
</view>
|
||||
<view class="fourrecttow">
|
||||
立即购买
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-overlay>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
mobile: uni.cache.get('loginuser').userinfo.mobile,
|
||||
overlayshow: false,
|
||||
numberbox: "",
|
||||
data: {
|
||||
mobile: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
async onLoad(e) {
|
||||
console.log(e)
|
||||
let res = await this.api.reservationvipdetail({
|
||||
id: e.id
|
||||
})
|
||||
try {
|
||||
this.data = res
|
||||
this.data.notice = res.notice.replace(/\<img/g, '<img style="max-width:100%;height:auto" ');
|
||||
this.data.mobile = uni.cache.get('loginuser').userinfo.mobile
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
},
|
||||
async onShow() {
|
||||
this.$store.dispatch('storeuseruserinfo')
|
||||
},
|
||||
mounted() {
|
||||
var query = uni.createSelectorQuery().in(this).select('.fixedview')
|
||||
query.boundingClientRect(ele => {
|
||||
var that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.height = (ele.height) + "px";
|
||||
that = null;
|
||||
}
|
||||
})
|
||||
}).exec();
|
||||
},
|
||||
methods: {
|
||||
async getPhoneNumber(res) { // 获取手机号
|
||||
var resdataa = res
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: async (data) => {
|
||||
let resdata = await this.api.usergetwechatphone({
|
||||
code: data.code,
|
||||
iv: resdataa.detail.iv,
|
||||
encryptedData: resdataa.detail.encryptedData
|
||||
})
|
||||
try {
|
||||
this.mobile = resdata.mobile
|
||||
} catch (e) {
|
||||
uni.showToast({
|
||||
title: '获取失败'
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
async showpopupclick() {
|
||||
try {
|
||||
let res = await this.api.useropenuserseccrd({
|
||||
id: this.data.id
|
||||
}) //判断是否支付成功
|
||||
if (res) {
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay', //支付类型-固定值
|
||||
partnerid: res.payAppId, // 微信支付商户号
|
||||
timeStamp: res.payTimeStamp, // 时间戳(单位:秒)
|
||||
nonceStr: res.paynonceStr, // 随机字符串
|
||||
package: res.payPackage, // 固定值
|
||||
signType: res.paySignType, //固定值
|
||||
paySign: res.paySign, //签名
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
title: "支付成功"
|
||||
})
|
||||
uni.redirectTo({
|
||||
url: "/my/member/index?e=" + 1,
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
setTimeout(res => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '支付失败'
|
||||
})
|
||||
uni.hideLoading()
|
||||
}, 2000)
|
||||
uni.redirectTo({
|
||||
url: "/my/member/index?e=" + 1,
|
||||
});
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
|
||||
},
|
||||
order(e) {
|
||||
uni.pro.navigateTo('my/order/index', {
|
||||
e: 0
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.towcontentitem {
|
||||
margin-top: 22rpx;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
padding: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.fourcontentitemabsolute {
|
||||
z-index: 9;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
padding: 6rpx 28rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
text-shadow: 0px 6rpx 12rpx rgba(255, 255, 255, 0.19);
|
||||
background: linear-gradient(NaNdeg, #4A4A4A 0%, #919191 100%);
|
||||
border-radius: 0px 12rpx 0px 12rpx;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.towcontentitemimage {
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 12rpx;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.towcontentitemone {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
z-index: 9;
|
||||
|
||||
.towcontentitemoneimage {
|
||||
width: 76rpx;
|
||||
height: 76rpx;
|
||||
}
|
||||
|
||||
.towcontentitemoneabsolute {
|
||||
position: absolute;
|
||||
padding: 8rpx 44rpx;
|
||||
right: 0;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
background: linear-gradient(130deg, #F4AE46 0%, #EE9437 100%);
|
||||
box-shadow: 0px 4rpx 8rpx 2rpx rgba(243, 169, 67, 0.37);
|
||||
border-radius: 28rpx;
|
||||
}
|
||||
|
||||
.towcontentitemonetext {
|
||||
margin-left: 16rpx;
|
||||
|
||||
.towcontentitemonetextone {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #422A07;
|
||||
}
|
||||
|
||||
.towcontentitemonetexttow {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-top: 16rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #422A07;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitemprogressa {
|
||||
padding: 8rpx 44rpx;
|
||||
width: 50%;
|
||||
z-index: 10;
|
||||
position: relative;
|
||||
margin-top: 54rpx;
|
||||
}
|
||||
|
||||
.towcontentitemprogress {
|
||||
margin-top: 24rpx;
|
||||
background: linear-gradient(318deg, #6E6E6E 0%, #404040 100%);
|
||||
box-shadow: 0px 4rpx 8rpx 2rpx #8D8D8D;
|
||||
border-radius: 28rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.towcontentitemtow {
|
||||
z-index: 10;
|
||||
position: relative;
|
||||
margin-top: 68rpx;
|
||||
font-size: 24rpx;
|
||||
|
||||
.towcontentitemtowetext {
|
||||
font-size: 30rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
|
||||
.towcontentitemtowetexts {
|
||||
font-size: 20rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitemtowetext_s {
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.therecontentitem {
|
||||
margin-top: 32rpx;
|
||||
width: 100%;
|
||||
padding: 32rpx 32rpx 0 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.therecontentitem_tow {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #999999;
|
||||
|
||||
text {
|
||||
margin-left: 20rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.therecontentitem_tows {
|
||||
margin-top: 16rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #999999;
|
||||
padding-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.therecontentitemtext {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.therecontentitemtextthere {
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.therecontentitemtextitem {
|
||||
margin-top: 24rpx;
|
||||
|
||||
.therecontentitemtextitem_left {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.therecontentitemtextitem_right {
|
||||
font-size: 32rpx;
|
||||
font-family: Roboto-Bold, Roboto;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.therecontentitemtextitemt_one {
|
||||
margin-top: 6rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
padding-bottom: 16rpx;
|
||||
border-bottom: 1rpx dashed #F7F7F7;
|
||||
}
|
||||
}
|
||||
|
||||
.fixedview {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 24rpx 28rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.fixedview_one {
|
||||
.fixedview_oneone {
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.fixedview_onetow {
|
||||
font-size: 44rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #F45C4C;
|
||||
font-weight: bold;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fixedview_tow {
|
||||
background: var(--bg-color-button);
|
||||
border-radius: 34rpx;
|
||||
padding: 10rpx 44rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
button::after {
|
||||
border-radius: 34rpx;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
button {
|
||||
background-color: var(--bg-color-button) !important;
|
||||
padding: 0 !important;
|
||||
line-height: inherit !important;
|
||||
margin: 0 !important;
|
||||
width: auto !important;
|
||||
font-weight: 500 !important;
|
||||
border-radius: none !important;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.warp {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
|
||||
.rect {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 60rpx 60rpx 0px 0px;
|
||||
padding: 48rpx 32rpx 32rpx 32rpx;
|
||||
|
||||
.onerect {
|
||||
position: relative;
|
||||
padding-bottom: 48rpx;
|
||||
|
||||
image {
|
||||
width: 124rpx;
|
||||
height: 124rpx;
|
||||
}
|
||||
|
||||
view {
|
||||
margin-left: 16rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.onerecticon {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.towrect {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.thererect {
|
||||
margin-top: 16rpx;
|
||||
|
||||
.thererectone {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.thererecttow {
|
||||
text {
|
||||
font-size: 16rpx;
|
||||
}
|
||||
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Heavy,
|
||||
PingFang SC;
|
||||
font-weight: 800;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.fourrect {
|
||||
margin-top: 44rpx;
|
||||
|
||||
.fourrectone {
|
||||
text {
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
font-size: 40rpx;
|
||||
font-family: PingFang SC-Bold,
|
||||
PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FC5F69;
|
||||
}
|
||||
|
||||
.fourrecttow {
|
||||
background: linear-gradient(143deg, #8689AF 0%, #494A5F 100%);
|
||||
border-radius: 34rpx;
|
||||
padding: 10rpx 44rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
339
pages/my/member/memberone.vue
Normal file
339
pages/my/member/memberone.vue
Normal file
@@ -0,0 +1,339 @@
|
||||
<template>
|
||||
<view class="content" :style="[theme]">
|
||||
<view class="towcontentitem">
|
||||
<image class="towcontentitemimage" src="https://ointmentweapp.oss-cn-beijing.aliyuncs.com/my/recharges.png"
|
||||
mode="widthFix"></image>
|
||||
<!-- <view class="fourcontentitemabsolute">
|
||||
{{memberlist.store_title}}
|
||||
</view> -->
|
||||
<view class="towcontentitemone flex-start">
|
||||
<image class="towcontentitemoneimage" :src="memberlist.store_avatar" mode="aspectFill"></image>
|
||||
<view class="towcontentitemonetext flex-colum-start">
|
||||
<text class="towcontentitemonetextone">{{nickname || '暂无昵称'}}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="towcontentitemprogress">
|
||||
可用余额:{{memberlist.money || '0.00'}}
|
||||
<!-- <text style="font-size: 16rpx; color:#000 ; margin-left: 10rpx;">冻结金额:{{memberlist.freeze_money}}</text> -->
|
||||
<!-- <view class="towcontentitemoneabsolute">
|
||||
加购
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="towcontentitemtow flex-between">
|
||||
<text class="towcontentitemtowetext">{{memberlist.vip_number}}</text>
|
||||
<!-- <text class="towcontentitemtowetext" style="color: #fff;">保洁清洗卡</text> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="therecontent">
|
||||
<input type="number" v-model="amount" placeholder="自定义金额">
|
||||
</view>
|
||||
<view class="fourcontent flex-start">
|
||||
<view class="fourcontentlnage" v-for="(item,index) in listdata" :key="index">
|
||||
<view class="flex-colum" :class="index == inputshow?'fourcontentitems':'fourcontentitem'"
|
||||
@click="clickinput(item,index)">
|
||||
<text>充{{item.amount}}元</text>
|
||||
<text style="margin-top: 10rpx;">送{{item.deliver}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fivecontent" @click="userbalancerechangesub">
|
||||
立即充值
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
nickname: uni.cache.get('loginuser').userinfo.nickname,
|
||||
inputshow: 0,
|
||||
memberlist: {},
|
||||
listdata: [],
|
||||
amount: '',
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
// console.log(e)
|
||||
// this.memberlist = e
|
||||
this.useruserbalance()
|
||||
},
|
||||
onShow() {
|
||||
this.userbalancerechange()
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async useruserbalance(){
|
||||
let res = await this.api.useruserbalance({
|
||||
store_id: uni.cache.get('store_id') // 判断显示哪家的作品,
|
||||
})
|
||||
this.memberlist = res
|
||||
},
|
||||
async userbalancerechange() {
|
||||
let res = await this.api.userbalancerechange({
|
||||
store_id: uni.cache.get('store_id') // 判断显示哪家的作品,
|
||||
})
|
||||
this.listdata = res
|
||||
this.amount = res[0].amount
|
||||
},
|
||||
async userbalancerechangesub() {
|
||||
if (this.amount == null || this.amount == '') {
|
||||
uni.showToast({
|
||||
title: '金额不能为空',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
let res = await this.api.userbalancerechangesub({
|
||||
amount: this.amount,
|
||||
store_id: this.memberlist.store_id
|
||||
})
|
||||
if (res) {
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay', //支付类型-固定值
|
||||
partnerid: res.payAppId, // 微信支付商户号
|
||||
timeStamp: res.payTimeStamp, // 时间戳(单位:秒)
|
||||
nonceStr: res.paynonceStr, // 随机字符串
|
||||
package: res.payPackage, // 固定值
|
||||
signType: res.paySignType, //固定值
|
||||
paySign: res.paySign, //签名
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
title: "支付成功"
|
||||
})
|
||||
uni.navigateBack()
|
||||
},
|
||||
fail: (err) => {
|
||||
setTimeout(res => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '支付失败'
|
||||
})
|
||||
uni.hideLoading()
|
||||
}, 2000)
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
},
|
||||
clickinput(a, b) {
|
||||
console.log(a, b)
|
||||
this.inputshow = b
|
||||
this.amount = a.amount
|
||||
},
|
||||
eeInfo(e) {
|
||||
uni.pro.navigateTo('my/member/memberinfo', {
|
||||
id: e,
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0 28rpx;
|
||||
|
||||
.towcontentitem {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
padding: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.fourcontentitemabsolute {
|
||||
z-index: 9;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
padding: 6rpx 28rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
text-shadow: 0px 6rpx 12rpx rgba(255, 255, 255, 0.19);
|
||||
background: linear-gradient(NaNdeg, #4A4A4A 0%, #919191 100%);
|
||||
border-radius: 0px 12rpx 0px 12rpx;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.towcontentitemimage {
|
||||
top: 0;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 12rpx;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.towcontentitemone {
|
||||
margin-top: 42rpx;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
z-index: 9;
|
||||
|
||||
.towcontentitemoneimage {
|
||||
width: 76rpx;
|
||||
height: 76rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.towcontentitemonetext {
|
||||
height: 76rpx;
|
||||
margin-left: 16rpx;
|
||||
|
||||
.towcontentitemonetextone {
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #422A07;
|
||||
}
|
||||
|
||||
.towcontentitemonetexttow {
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #422A07;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitemprogressa {
|
||||
padding: 8rpx 44rpx;
|
||||
z-index: 10;
|
||||
position: relative;
|
||||
margin-top: 54rpx;
|
||||
}
|
||||
|
||||
.towcontentitemprogress {
|
||||
z-index: 10;
|
||||
position: relative;
|
||||
margin-top: 24rpx;
|
||||
border-radius: 28rpx;
|
||||
font-size: 32rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
|
||||
.towcontentitemoneabsolute {
|
||||
position: absolute;
|
||||
padding: 0 44rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
top: 0;
|
||||
right: 0;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
background: linear-gradient(130deg, #F4AE46 0%, #EE9437 100%);
|
||||
box-shadow: 0px 4rpx 8rpx 2rpx rgba(243, 169, 67, 0.37);
|
||||
border-radius: 28rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitemtow {
|
||||
z-index: 10;
|
||||
position: relative;
|
||||
margin-top: 42rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #422A07;
|
||||
}
|
||||
}
|
||||
|
||||
.therecontent {
|
||||
margin-top: 32rpx;
|
||||
position: relative;
|
||||
padding: 22rpx 32rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8rpx;
|
||||
|
||||
input {
|
||||
padding-left: 30rpx;
|
||||
text-align: right;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.therecontent::after {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 32rpx;
|
||||
transform: translateY(-50%);
|
||||
content: '¥';
|
||||
display: inline-block;
|
||||
width: 28rpx;
|
||||
height: 40rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.fourcontent {
|
||||
.fourcontentlnage {
|
||||
width: 33.33%;
|
||||
|
||||
.fourcontentitem {
|
||||
margin: 24rpx 10rpx;
|
||||
padding: 16rpx 0;
|
||||
text-align: center;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8rpx;
|
||||
border: 1rpx solid #333333;
|
||||
font-size: 28rpx;
|
||||
font-family: Roboto-Medium, Roboto;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.fourcontentitems {
|
||||
margin: 24rpx 10rpx;
|
||||
padding: 16rpx 0;
|
||||
text-align: center;
|
||||
border-radius: 8rpx;
|
||||
background: var(--bg-color-button);
|
||||
font-size: 28rpx;
|
||||
font-family: Roboto-Medium, Roboto;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.fivecontent {
|
||||
margin-top: 62rpx;
|
||||
padding: 20rpx 0;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
font-size: 36rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
border-radius: 8rpx;
|
||||
background: var(--bg-color-button);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
435
pages/my/order/applylrefund.vue
Normal file
435
pages/my/order/applylrefund.vue
Normal file
@@ -0,0 +1,435 @@
|
||||
<template>
|
||||
<view class="index">
|
||||
<view class="boxcontent">
|
||||
<u-steps :current="datalist.status.status_b" dot direction="column">
|
||||
<u-steps-item v-for="(item,index) in datalist.status.refund" :key="index" :title="item"></u-steps-item>
|
||||
</u-steps>
|
||||
</view>
|
||||
<view class="onecontent" style="margin-top: 32rpx;">
|
||||
<view class="onecontentone_one">
|
||||
退款信息
|
||||
</view>
|
||||
<view class="onecontentone_otow flex-between" @click="detailsInfo(datalist.store_service_id)">
|
||||
<image :src="datalist.order_img" mode="aspectFill"></image>
|
||||
<view class="flex-colum-start">
|
||||
<view class="onecontentone">
|
||||
{{datalist.order_title}}
|
||||
</view>
|
||||
<view class="onecontenttow">
|
||||
<view class="onecontenttowabsolute">
|
||||
x{{datalist.number}}
|
||||
</view>
|
||||
<text style="font-size:28rpx;">¥</text>{{datalist.order_price}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontentone_item flex-between">
|
||||
<view class="onecontentone_itemone">
|
||||
退款原因
|
||||
</view>
|
||||
<view class="onecontentone_itemtow">
|
||||
{{datalist.reason}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontentone_item flex-between">
|
||||
<view class="onecontentone_itemone">
|
||||
退款金额
|
||||
</view>
|
||||
<view class="onecontentone_itemtow">
|
||||
{{datalist.order_price}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontentone_item flex-between">
|
||||
<view class="onecontentone_itemone">
|
||||
申请件数
|
||||
</view>
|
||||
<view class="onecontentone_itemtow">
|
||||
{{datalist.number}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontentone_item flex-between">
|
||||
<view class="onecontentone_itemone">
|
||||
申请时间
|
||||
</view>
|
||||
<view class="onecontentone_itemtow">
|
||||
{{datalist.createtime}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontentone_item flex-between">
|
||||
<view class="onecontentone_itemone">
|
||||
退款编号
|
||||
</view>
|
||||
<view class="onecontentone_itemtow flex-start">
|
||||
{{datalist.out_trade_no}}
|
||||
<text class="therecontentfive_box" @click="copy(datalist.out_trade_no)">复制</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view :style="{height:height}">
|
||||
|
||||
</view>
|
||||
<view class="fixedview flex-between" v-if="datalist.status.status == 0 || datalist.status.status == 2">
|
||||
<view class="fixedview_one flex-start">
|
||||
<!-- <view class="fixedview_oneone">
|
||||
应付金额:
|
||||
</view>
|
||||
<view class="fixedview_onetow">
|
||||
<text>¥</text>11
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="fixedview_tow" @click="cancelrefund">
|
||||
取消退款
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uploadImage from "@/js_sdk/yushijie-ossutil/ossutil/uploadFile.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
height: '',
|
||||
datalist: {
|
||||
status: {
|
||||
status_b: '',
|
||||
status: ''
|
||||
}
|
||||
},
|
||||
order_id: ""
|
||||
}
|
||||
},
|
||||
async onLoad(e) {
|
||||
this.order_id = e.id
|
||||
try {
|
||||
let res = await this.api.orderrefunddetail({
|
||||
order_id: this.order_id
|
||||
})
|
||||
if (res) {
|
||||
this.datalist = res
|
||||
}
|
||||
} catch (e) {}
|
||||
// this.generate()
|
||||
},
|
||||
mounted() {
|
||||
//#ifdef MP-WEIXIN || H5
|
||||
var query = uni.createSelectorQuery().in(this).select('.fixedview')
|
||||
query.boundingClientRect(ele => {
|
||||
var that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.height = (ele.height) + "px";
|
||||
that = null;
|
||||
}
|
||||
})
|
||||
}).exec();
|
||||
//#endif
|
||||
//#ifdef MP-ALIPAY
|
||||
my.createSelectorQuery().selectAll('.fixedview').boundingClientRect().exec(ele => {
|
||||
var nodeData = ele[0]
|
||||
var that = this;
|
||||
that.height = (nodeData.height) + "px";
|
||||
that = null;
|
||||
})
|
||||
//#endif
|
||||
},
|
||||
methods: {
|
||||
detailsInfo(e) { //查看订单详情
|
||||
uni.pro.navigateTo('order/orderInfo', {
|
||||
id: e,
|
||||
})
|
||||
},
|
||||
copy(value) {
|
||||
//提示模板
|
||||
uni.setClipboardData({
|
||||
data: value, //要被复制的内容
|
||||
success: () => { //复制成功的回调函数
|
||||
uni.showToast({
|
||||
title: '复制成功'
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
async orderorderrefundcancel() {
|
||||
let res = await this.api.orderorderrefundcancel({
|
||||
order_id: this.datalist.order_id
|
||||
})
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: '成功取消退款',
|
||||
icon: 'none'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.redirectTo({
|
||||
url: '/pages/my/order/index?e=0'
|
||||
});
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
cancelrefund() {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定取消退款吗?',
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.orderorderrefundcancel()
|
||||
} else if (res.cancel) {}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
.index {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.boxcontent {
|
||||
padding: 24rpx 32rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.onecontent {
|
||||
width: 100%;
|
||||
padding: 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.onecontentone_one {
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.onecontentone_otow {
|
||||
margin-top: 32rpx;
|
||||
|
||||
image {
|
||||
width: 176rpx;
|
||||
height: 176rpx;
|
||||
}
|
||||
|
||||
.flex-colum-start {
|
||||
flex: auto;
|
||||
margin-left: 20rpx;
|
||||
height: 176rpx;
|
||||
justify-content: space-around;
|
||||
|
||||
.onecontentone {
|
||||
width: 400rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.onecontenttow {
|
||||
position: relative;
|
||||
margin-top: 16rpx;
|
||||
width: 100%;
|
||||
font-size: 40rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
|
||||
.onecontenttowabsolute {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.onecontentone_item {
|
||||
margin-top: 16rpx;
|
||||
width: 100%;
|
||||
|
||||
.onecontentone_itemone {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.onecontentone_itemtow {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
|
||||
.therecontentfive_box {
|
||||
padding: 6rpx 10rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #666666;
|
||||
background: #FFFFFF;
|
||||
margin-left: 6rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #D5D5D5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fixedview {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 24rpx 28rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.fixedview_one {
|
||||
.fixedview_oneone {
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.fixedview_onetow {
|
||||
font-size: 44rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #F45C4C;
|
||||
font-weight: bold;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fixedview_tow {
|
||||
background: linear-gradient(143deg, #8689AF 0%, #494A5F 100%);
|
||||
border-radius: 34rpx;
|
||||
padding: 10rpx 44rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.buoot {
|
||||
margin: 40rpx auto;
|
||||
width: 80%;
|
||||
padding: 16rpx 0;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
background: linear-gradient(115deg, #7E81A5 0%, #4D4E64 100%);
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
|
||||
.therecontent {
|
||||
margin-top: 24rpx;
|
||||
padding: 32rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx;
|
||||
|
||||
.therecontentone {
|
||||
width: 100%;
|
||||
padding: 10rpx 0;
|
||||
border-bottom: 1px solid #F7F7F7;
|
||||
|
||||
.therecontentone_one {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.therecontentone_text {
|
||||
flex: auto;
|
||||
margin-left: 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.fourcontent_items {
|
||||
position: relative;
|
||||
margin-top: 16rpx;
|
||||
margin-left: 20rpx;
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
background: #f9f9f9;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.fourcontent {
|
||||
.fourcontent_item {
|
||||
position: relative;
|
||||
margin-top: 16rpx;
|
||||
margin-left: 20rpx;
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
border-radius: 16rpx;
|
||||
|
||||
image {
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.fourcontent_itemtext {
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
right: 0rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.entowakst {
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.therecontentfive_box {
|
||||
padding: 6rpx 10rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #666666;
|
||||
background: #FFFFFF;
|
||||
margin-left: 6rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #D5D5D5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
848
pages/my/order/cporderinfo.vue
Normal file
848
pages/my/order/cporderinfo.vue
Normal file
@@ -0,0 +1,848 @@
|
||||
<template>
|
||||
<view class="index">
|
||||
<view class="onecontent">
|
||||
<view class="onecontentone flex-start">
|
||||
<image class="onecontentone_image" :src="listdata.img" mode="aspectFill"></image>
|
||||
<view class="onecontentone_one flex-colum-start">
|
||||
<text class="onecontentone_one_top">{{listdata.title}}</text>
|
||||
<view class="onecontentone_one_view"><text>¥</text>{{listdata.price}}</view>
|
||||
<!-- <view class="onecontentone_one_ts" @click="infoshow = true">
|
||||
查看详情
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="onecontenttow ">
|
||||
<view class="onecontenttowone flex-start">
|
||||
<view class="onecontenttowone_one">
|
||||
预约时间<text>(必填)</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontenttowtow flex-between">
|
||||
<view class="onecontenttowtow_item flex-between">
|
||||
<view class=" flex-colum" v-for="(item,index) in reservationlist" :key="index"
|
||||
:class="reservationshow == index ? 'onecontenttowtow_item_ones':'onecontenttowtow_item_one'"
|
||||
@click="reservation(item,index)">
|
||||
<text class="onecontenttowtow_item_one_textone">{{item.week}}</text>
|
||||
<text class="onecontenttowtow_item_one_texttow">{{item.date.slice(5,10)}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontenttowtow_left flex-colum" @click="calendarshow = true">
|
||||
<u-icon name="calendar" color="#b4b4b4" size="20"></u-icon>
|
||||
<text class="onecontenttowtow_lefttext">选择</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontenttowthere flex-start">
|
||||
<view v-for="(item,index) in 14" :key="index" @click="clicktime(item,index)"
|
||||
:class="timeshow == index?'onecontenttowthere_items':'onecontenttowthere_item'">
|
||||
10:00
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontenttere">
|
||||
<view class="onecontentterewone flex-start">
|
||||
<view class="onecontenttereone_one">
|
||||
发型师
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontentterewtow flex-start">
|
||||
<view class="onecontentterewtow_item flex-colum" v-for="(item,index) in 1">
|
||||
<image src="@/static/logo.png" mode="aspectFill"></image>
|
||||
<text>John</text>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="introduction">
|
||||
<view class="introduction_one">
|
||||
【服务简介}
|
||||
</view>
|
||||
<view class="introduction_yow" v-html="listdata.details">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="onecontentfour">
|
||||
<view class="onecontentfourone flex-start">
|
||||
<view class="onecontentfourone_one">
|
||||
备注
|
||||
</view>
|
||||
</view>
|
||||
<u--textarea v-model="textarea" placeholder="请输入内容" autoHeight></u--textarea>
|
||||
</view> -->
|
||||
<u-overlay :show="infoshow" @click="infoshow = false">
|
||||
<view class="infowarp">
|
||||
<view class="inforect" @tap.stop>
|
||||
<view class="onerect flex-start">
|
||||
<view>服务详情</view>
|
||||
<u-icon @click="infoshow = false" class="onerecticon" name="backspace" color="#000000"
|
||||
size="28"></u-icon>
|
||||
</view>
|
||||
<view class="infotowrect flex-start">
|
||||
<image src="@/static/logo.png" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="infothererect flex-colum-start">
|
||||
<view class="infothererect_one">
|
||||
【洗剪吹】新娘造型
|
||||
</view>
|
||||
<view class="infothererect_one">
|
||||
¥120
|
||||
</view>
|
||||
</view>
|
||||
<view class="infofourrect">
|
||||
<view class="infofourrect_one">
|
||||
【服务简介
|
||||
</view>
|
||||
<view class="infofourrect_yow">
|
||||
烫发、编发、洗头、定型。
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-overlay>
|
||||
<u-overlay :show="overlayshow" @click="overlayshow = false">
|
||||
<view class="warp">
|
||||
<view class="rect" @tap.stop>
|
||||
<view class="onerect flex-start">
|
||||
<image class="onecontentone_image" :src="listdata.img" mode="aspectFill"></image>
|
||||
<view class="nonecontentone_view">{{listdata.title}}</view>
|
||||
<view class="onerecticon">
|
||||
<u-icon @click="overlayshow = false" name="backspace" color="#000000" size="28"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="towrect">
|
||||
<view class="towrect_one">
|
||||
预约时间:2023-06-16
|
||||
</view>
|
||||
<view class="towrect_tow">
|
||||
<text>10:00</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="thererect flex-between">
|
||||
<view class="thererect_one">
|
||||
预约服务
|
||||
</view>
|
||||
<view class="thererect_tow">
|
||||
<u-number-box v-model="numberbox" button-size="24" color="#ffffff" bgColor="#9397c1"
|
||||
iconStyle="color: #fff" integer @change="numberboxchange"></u-number-box>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="fuorrect flex-between">
|
||||
<view class="fuorrect_one">
|
||||
合计
|
||||
</view>
|
||||
<view class="fuorrect_tow">
|
||||
¥{{listdata.price}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="fvirect flex-center" @click="overlayshowclick">
|
||||
确定
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-overlay>
|
||||
<u-calendar mode="single" @confirm="confirm" :show="calendarshow" @close="calendarshow = false"></u-calendar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
overlayshow: false,
|
||||
infoshow: false,
|
||||
numberbox: "",
|
||||
height: '',
|
||||
timeshow: '',
|
||||
textarea: '',
|
||||
reservationshow: 0,
|
||||
calendarshow: false,
|
||||
reservationlist: [],
|
||||
inifid: '',
|
||||
listdata: {}
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.inifid = e.id
|
||||
this.confirm()
|
||||
this.reservationdetail()
|
||||
|
||||
},
|
||||
mounted() {
|
||||
//#ifdef MP-WEIXIN || H5
|
||||
var query = uni.createSelectorQuery().in(this).select('.fixedview')
|
||||
query.boundingClientRect(ele => {
|
||||
var that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.height = (ele.height) + "px";
|
||||
that = null;
|
||||
}
|
||||
})
|
||||
}).exec();
|
||||
//#endif
|
||||
//#ifdef MP-ALIPAY
|
||||
my.createSelectorQuery().selectAll('.fixedview').boundingClientRect().exec(ele => {
|
||||
var nodeData = ele[0]
|
||||
var that = this;
|
||||
that.height = (nodeData.height) + "px";
|
||||
that = null;
|
||||
})
|
||||
//#endif
|
||||
},
|
||||
methods: {
|
||||
async reservationdetail() {
|
||||
let res = await this.api.reservationdetail({
|
||||
id: this.inifid
|
||||
})
|
||||
this.listdata = res
|
||||
this.listdata.details = res.details.replace(/\<img/g, '<img style="max-width:100%;height:auto" ');
|
||||
console.log(this.listdata)
|
||||
},
|
||||
reservation(a, b) {
|
||||
this.reservationshow = b
|
||||
console.log(a, b)
|
||||
},
|
||||
clicktime(a, b) {
|
||||
this.timeshow = b
|
||||
console.log(a, b)
|
||||
},
|
||||
numberboxchange(e) {
|
||||
console.log('当前值为: ' + e.value)
|
||||
},
|
||||
async overlayshowclick() {
|
||||
let res = await this.api.useruserinfo() //p判断是否完成手机号
|
||||
uni.cache.set('loginuser', res);
|
||||
this.overlayshow = false
|
||||
if (res.userinfo.mobile) {
|
||||
uni.pro.navigateTo('order/confirm', {
|
||||
id: this.inifid
|
||||
})
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确认订单需要获取您的手机号',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/my/setup/index'
|
||||
});
|
||||
} else if (res.cancel) {}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
confirm(e) {
|
||||
if (e) {
|
||||
this.calendarshow = false
|
||||
console.log(new Date(e[0]));
|
||||
var now = new Date(e[0]);
|
||||
} else {
|
||||
//获取当前年月日
|
||||
var now = new Date();
|
||||
// var year = now.getFullYear(); //得到年份
|
||||
// var month = now.getMonth() + 1; //得到月份
|
||||
// var date = now.getDate(); //得到日期
|
||||
// data = year + "年" + month + "月" + date + "日";
|
||||
}
|
||||
this.reservationlist = []
|
||||
for (let i = 0; i < 7; i++) {
|
||||
var date = new Date(now.getTime() + i * 24 * 3600 * 1000);
|
||||
var year = date.getFullYear();
|
||||
var month = (date.getMonth() + 1) > 9 ? (date.getMonth() + 1) : '0' + (date.getMonth() + 1);
|
||||
var day = (date.getDate()) > 9 ? (date.getDate()) : '0' + (date.getDate());
|
||||
var dt2 = new Date(now.getTime() + i * 24 * 3600 * 1000);
|
||||
var weekDay = ["周日", "周一", "周二", "周三", "周四", "周五", "周六"];
|
||||
// var weekDays = ["sun", "mon", "tue", "wed", "thu", "fri", "sat"];
|
||||
this.reservationlist.push({
|
||||
date: year + "-" + month + "-" + day,
|
||||
// date: month + "-" + day,
|
||||
// day: day,
|
||||
// weekday: weekDays[dt2.getDay()],
|
||||
week: weekDay[dt2.getDay()],
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
/deep/ .mystyle {
|
||||
width: 100% !important;
|
||||
height: auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.index {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.onecontent {
|
||||
width: 100%;
|
||||
padding: 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.onecontentone {
|
||||
flex-wrap: nowrap;
|
||||
font-size: 32rpx;
|
||||
font-family: SourceHanSansCN-Medium-, SourceHanSansCN-Medium;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
|
||||
.onecontentone_image {
|
||||
width: 176rpx;
|
||||
height: 176rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.nonecontentone_view {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.onecontentone_one {
|
||||
position: relative;
|
||||
justify-content: space-evenly;
|
||||
flex: 1;
|
||||
margin-left: 24rpx;
|
||||
height: 176rpx;
|
||||
|
||||
.onecontentone_one_ts {
|
||||
padding: 8rpx 22rpx;
|
||||
position: absolute;
|
||||
top: 70%;
|
||||
transform: translateY(-50%);
|
||||
right: 0;
|
||||
background: #F7F7F7;
|
||||
border-radius: 28rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.onecontentone_one_top {
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.onecontentone_one_view {
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
font-size: 40rpx;
|
||||
font-family: SourceHanSansCN-Bold-,
|
||||
SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.onecontenttow {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
padding: 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.onecontenttowone::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 4rpx;
|
||||
height: 24rpx;
|
||||
background: #1A1A1A;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.onecontenttowone {
|
||||
.onecontenttowone_one {
|
||||
margin-left: 16rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #1A1A1A;
|
||||
|
||||
text {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.onecontenttowtow {
|
||||
margin-top: 32rpx;
|
||||
|
||||
.onecontenttowtow_item {
|
||||
flex: 1;
|
||||
flex-wrap: nowrap;
|
||||
|
||||
.onecontenttowtow_item_one:nth-child(1) {
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.onecontenttowtow_item_one {
|
||||
padding: 6rpx;
|
||||
|
||||
.onecontenttowtow_item_one_textone {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.onecontenttowtow_item_one_texttow {
|
||||
margin-top: 5rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.onecontenttowtow_item_ones {
|
||||
padding: 6rpx;
|
||||
border-radius: 10rpx;
|
||||
background: #1A1A1A;
|
||||
|
||||
.onecontenttowtow_item_one_textone {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.onecontenttowtow_item_one_texttow {
|
||||
margin-top: 5rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.onecontenttowtow_left {
|
||||
border-left: 1rpx solid #f9f9f9;
|
||||
background: #FFFFFF;
|
||||
padding-left: 24rpx;
|
||||
box-shadow: -2rpx 0px 4rpx 2rpx rgba(193, 193, 193, 0.09);
|
||||
|
||||
.onecontenttowtow_lefttext {
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.onecontenttowthere {
|
||||
.onecontenttowthere_item {
|
||||
width: 20%;
|
||||
margin: 16rpx 2.5%;
|
||||
text-align: center;
|
||||
background: #F7F7F7;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #F7F7F7;
|
||||
padding: 8rpx 26rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.onecontenttowthere_items {
|
||||
width: 20%;
|
||||
margin: 16rpx 2.5%;
|
||||
background: #F7F7F7;
|
||||
border-radius: 8rpx;
|
||||
border: 1rpx solid var(--bg-color-buttontow);
|
||||
padding: 8rpx 26rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: var(--bg-color-buttontow);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.onecontenttere {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
padding: 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.onecontentterewone::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 4rpx;
|
||||
height: 24rpx;
|
||||
background: #1A1A1A;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.onecontentterewone {
|
||||
.onecontenttereone_one {
|
||||
margin-left: 16rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #1A1A1A;
|
||||
|
||||
text {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.onecontentterewtow {
|
||||
|
||||
|
||||
.onecontentterewtow_item {
|
||||
margin: 0 15rpx;
|
||||
margin-top: 22rpx;
|
||||
padding: 20rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #F7F7F7;
|
||||
|
||||
image {
|
||||
width: 76rpx;
|
||||
height: 76rpx;
|
||||
}
|
||||
|
||||
text {
|
||||
margin-top: 6rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.introduction {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
padding: 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.introduction_one {
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.introduction_yow {
|
||||
margin-top: 18rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #1A1A1A;
|
||||
width: 100%;
|
||||
|
||||
/deep/ [alt] {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/deep/ img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/deep/ p {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.onecontentfour {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
padding: 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.onecontentfourone::before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 4rpx;
|
||||
height: 24rpx;
|
||||
background: #1A1A1A;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.onecontentfourone {
|
||||
padding-bottom: 16rpx;
|
||||
|
||||
.onecontentfourone_one {
|
||||
margin-left: 16rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #1A1A1A;
|
||||
|
||||
text {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.fixedview {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 24rpx 28rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.fixedview_one {
|
||||
.fixedview_oneone {
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.fixedview_onetow {
|
||||
font-size: 44rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #F45C4C;
|
||||
font-weight: bold;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fixedview_tow {
|
||||
background: linear-gradient(143deg, #8689AF 0%, #494A5F 100%);
|
||||
border-radius: 34rpx;
|
||||
padding: 10rpx 44rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.infowarp {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
|
||||
.inforect {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 60rpx 60rpx 0px 0px;
|
||||
padding: 48rpx 32rpx 32rpx 32rpx;
|
||||
|
||||
.onerect {
|
||||
position: relative;
|
||||
padding-bottom: 34rpx;
|
||||
border-bottom: 1rpx solid #F7F7F7;
|
||||
|
||||
view {
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.onerecticon {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.infotowrect {
|
||||
width: 686rpx;
|
||||
height: 640rpx;
|
||||
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.infothererect {
|
||||
padding-bottom: 16rpx;
|
||||
border-bottom: 4rpx solid #F9F9F9;
|
||||
|
||||
.infothererect_one {
|
||||
margin-top: 22rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
}
|
||||
|
||||
.infofourrect {
|
||||
.infofourrect_one {
|
||||
margin-top: 32rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.infofourrect_yow {
|
||||
margin-top: 18rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.warp {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
|
||||
.rect {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 60rpx 60rpx 0px 0px;
|
||||
padding: 48rpx 32rpx 32rpx 32rpx;
|
||||
|
||||
.onerect {
|
||||
position: relative;
|
||||
padding-bottom: 34rpx;
|
||||
border-bottom: 1rpx solid #F7F7F7;
|
||||
|
||||
image {
|
||||
width: 124rpx;
|
||||
height: 124rpx;
|
||||
}
|
||||
|
||||
.nonecontentone_view {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-left: 16rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.onerecticon {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.towrect {
|
||||
padding-bottom: 34rpx;
|
||||
border-bottom: 1rpx solid #F7F7F7;
|
||||
padding-top: 34rpx;
|
||||
|
||||
.towrect_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.towrect_tow {
|
||||
margin-top: 16rpx;
|
||||
|
||||
text {
|
||||
background: #F7F7F7;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #333333;
|
||||
padding: 8rpx 26rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.thererect {
|
||||
padding: 34rpx 0;
|
||||
border-bottom: 1rpx solid #F7F7F7;
|
||||
border-top: 1rpx solid #F7F7F7;
|
||||
|
||||
.thererect_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.thererect_tow {}
|
||||
}
|
||||
|
||||
.fuorrect {
|
||||
margin-top: 32rpx;
|
||||
|
||||
.fuorrect_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.fuorrect_tow {
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.fvirect {
|
||||
margin-top: 200rpx;
|
||||
padding: 16rpx;
|
||||
text-align: center;
|
||||
background: linear-gradient(115deg, #7E81A5 0%, #4D4E64 100%);
|
||||
border-radius: 40rpx;
|
||||
font-size: 36rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
912
pages/my/order/index.vue
Normal file
912
pages/my/order/index.vue
Normal file
@@ -0,0 +1,912 @@
|
||||
<template>
|
||||
<view class="content" :style="[theme]">
|
||||
<view class="onecontent">
|
||||
<view class="flex-start">
|
||||
<view class="onecontent_oen flex-start">
|
||||
<input class="onecontent_oen_input" type="text" v-model="like" placeholder="搜索订单/商家名/商品名">
|
||||
<text class="onecontent_oen_text" @click="init_fn">搜索</text>
|
||||
</view>
|
||||
<view class="onecontent_oen_right flex-start" @click="showpicker = true" v-if="model_type != 'Wedding'">
|
||||
<image class="onecontent_oen_rightimage" src="@/static/screen.png" mode="aspectFill"></image>
|
||||
<view class="onecontent_oen_rightimageview">筛选</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontent_tow flex-between">
|
||||
<view ref="uTabs" class="onecontent_tow_item flex-colum" v-for="(item,index) in swipercurrentdata"
|
||||
:key="index" @click="orderswitch(index)">
|
||||
<view :class="swiperCurrent == index?'onecontent_tow_itemtexts':'onecontent_tow_itemtext'">
|
||||
{{item.name}}
|
||||
</view>
|
||||
<image class="onecontent_tow_itemtextsimges" v-if="swiperCurrent == index" :src="selected"
|
||||
mode="aspectFill"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontent">
|
||||
<swiper :current="swiperCurrent" @animationfinish="animationfinish" :style="{height:height}">
|
||||
<swiper-item v-for="(item,index) in list_" :key="index">
|
||||
<scroll-view scroll-y style="width: 100%;" :style="{height:height}" @scrolltolower="lower">
|
||||
<view class="towcontentitem" v-for="(item1,index1) in list_[index].data" :key="index1"
|
||||
@click="eeInfo(item1)">
|
||||
<view class="towcontentitemone flex-between">
|
||||
<text class="towcontentitemone_one">{{item1.store_title}}</text>
|
||||
<view class="towcontentitemone_tow flex-start">
|
||||
<!-- <image class="towcontentitemone_towimage"
|
||||
:src="item.store_avatar"
|
||||
mode="aspectFill">
|
||||
</image> -->
|
||||
<text v-if="item1.status == 0">待支付</text>
|
||||
<text v-if="item1.status == 1">已支付</text>
|
||||
<text v-if="item1.status == 2">等待确认</text>
|
||||
<text v-if="item1.status == 3">已确认</text>
|
||||
<text v-if="item1.status == 4">已完成 </text>
|
||||
<text v-if="item1.status == 5">已取消</text>
|
||||
<text v-if="item1.status == 6">退款中</text>
|
||||
<text v-if="item1.status == 7">已退款</text>
|
||||
<text v-if="item1.status == 8">已拒绝</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontentitemtow flex-start">
|
||||
<image class="towcontentitemtow_imge" :src="item1.store_avatar" mode="aspectFill">
|
||||
</image>
|
||||
<view class="towcontentitemtow_one flex-colum-start">
|
||||
<text class="towcontentitemtow_one_one">{{item1.title}}111111111111111111111111111111111</text>
|
||||
<text class="towcontentitemtow_one_tow"><text
|
||||
style="font-size:28rpx;">¥</text>{{item1.total_price}}</text>
|
||||
<text class="towcontentitemtow_one_there"><text
|
||||
style="font-size:28rpx;"></text>{{item1.time}}</text>
|
||||
</view>
|
||||
<view class="towcontentitemtow_tow">
|
||||
{{item1.number}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontentitemthere">
|
||||
<view v-if="item1.status == 0"
|
||||
class="towcontentitemthereitem towcontentitemthereitem_tow"
|
||||
@click.stop="orderordercancel(item1)">
|
||||
取消订单
|
||||
</view>
|
||||
<view
|
||||
v-if="item1.status == 1 || item1.status == 2 || (item1.status == 3 && item1.pay_status == 1)"
|
||||
class="towcontentitemthereitem towcontentitemthereitem_tow"
|
||||
@click.stop="orderordercancelrefund(item1)">
|
||||
申请售后
|
||||
</view>
|
||||
<view v-if="item1.status == 6 || item1.status == 7"
|
||||
class="towcontentitemthereitem towcontentitemthereitem_tow"
|
||||
@click.stop="applylrefund(item1)">
|
||||
查看退款
|
||||
</view>
|
||||
<view class="towcontentitemthereitem towcontentitemthereitem_tow"
|
||||
v-if="item1.status == 5 || item1.status == 4 "
|
||||
@click.stop="orderorderdelete(item1)">
|
||||
删除订单
|
||||
</view>
|
||||
<!-- <view class="towcontentitemthereitem towcontentitemthereitem_there">
|
||||
待服务
|
||||
</view> -->
|
||||
<view class="towcontentitemthereitem towcontentitemthereitem_one"
|
||||
v-if=" item1.status != 8 && item1.pay_status == 0 && (item1.status == 0 || item1.status == 1 || item1.status == 2)"
|
||||
@click.stop="overlayshowclick(item1)">
|
||||
去付款
|
||||
</view>
|
||||
</view>
|
||||
<u-overlay :show="overlayshow" @click.stop="overlayshow = false" opacity='0.1'>
|
||||
<view class="warp">
|
||||
<view class="rect flex-colum" @tap.stop>
|
||||
<view class="rectone">
|
||||
确定{{clickoverlayshowtext}}吗?
|
||||
</view>
|
||||
<view class="recttow flex-between">
|
||||
<view class="recttow_one" @click="cancelOrder(item.status)">
|
||||
确定
|
||||
</view>
|
||||
<view class="recttow_tow" @click="overlayshow = false">
|
||||
取消
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-overlay>
|
||||
</view>
|
||||
<view v-if="list_[index].data.length == 0 && list_[index].is_end == true" class="flex-colum"
|
||||
style="margin-bottom: 10rpx;">
|
||||
<image style="margin-top:100rpx;" class="" :src="bgnothave" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
<u-loadmore :status="form.status" />
|
||||
</scroll-view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
<u-picker :show="showpicker" :columns="columns" keyName="label" @cancel='showpicker = false'
|
||||
@confirm='confirmpicker'></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
selected: uni.getStorageSync('selected'),
|
||||
model_type: uni.getStorageSync('loginuser').model_type,
|
||||
showpicker: false,
|
||||
columns: [
|
||||
[{
|
||||
label: '店铺订单',
|
||||
// 其他属性值
|
||||
id: 1
|
||||
// ...
|
||||
}, {
|
||||
label: '商城订单',
|
||||
id: 2
|
||||
}]
|
||||
],
|
||||
bgnothave: uni.getStorageSync('bgnothave'),
|
||||
height: "",
|
||||
// 因为内部的滑动机制限制,请将tabs组件和swiper组件的current用不同变量赋值
|
||||
current: 0, // tabs组件的current值,表示当前活动的tab选项
|
||||
swiperCurrent: 0, // swiper组件的current值,表示当前那个swiper-item是活动的
|
||||
overlayshow: false,
|
||||
list_: {
|
||||
list1: { //全部
|
||||
data: [],
|
||||
page: 1,
|
||||
is_end: false,
|
||||
},
|
||||
list2: { //代付款
|
||||
data: [],
|
||||
page: 1,
|
||||
is_end: false,
|
||||
},
|
||||
list3: { //待服务
|
||||
data: [],
|
||||
page: 1,
|
||||
is_end: false,
|
||||
},
|
||||
list4: { //已完成
|
||||
data: [],
|
||||
page: 1,
|
||||
is_end: false,
|
||||
},
|
||||
list5: { //退款
|
||||
data: [],
|
||||
page: 1,
|
||||
is_end: false,
|
||||
}
|
||||
},
|
||||
like: '', //备注
|
||||
clickoverlayshowtext: "",
|
||||
swipercurrentdata: [{
|
||||
name: '全部'
|
||||
}, {
|
||||
name: '待付款'
|
||||
}, {
|
||||
name: '待服务' //待确认
|
||||
}, {
|
||||
name: '已完成' //已确认
|
||||
}, {
|
||||
name: '退款/售后'
|
||||
}],
|
||||
form: {
|
||||
status: 'loadmore',
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.swiperCurrent = e.e;
|
||||
if (this.model_type == 'Hotel') {
|
||||
this.swipercurrentdata = [{
|
||||
name: '全部'
|
||||
}, {
|
||||
name: '待付款'
|
||||
}, {
|
||||
name: '待确认' //待确认
|
||||
}, {
|
||||
name: '已确认' //已确认
|
||||
}, {
|
||||
name: '退款/售后'
|
||||
}]
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.init_fn();
|
||||
},
|
||||
computed: {
|
||||
HeighTpadding() {
|
||||
return this.$store.getters.is_BarHeight.bottompadding
|
||||
},
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
//#ifdef MP-WEIXIN || H5
|
||||
var query = uni.createSelectorQuery().in(this).select('.onecontent')
|
||||
query.boundingClientRect(ele => {
|
||||
var that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.height = (res.windowHeight - ele.height - (that.HeighTpadding / 2)) +
|
||||
"px";
|
||||
that = null;
|
||||
}
|
||||
})
|
||||
}).exec();
|
||||
//#endif
|
||||
//#ifdef MP-ALIPAY
|
||||
my.createSelectorQuery().selectAll('.onecontent').boundingClientRect().exec(ele => {
|
||||
var nodeData = ele[0]
|
||||
var that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.height = (res.windowHeight - nodeData.height - (that.HeighTpadding / 2)) +
|
||||
"px";
|
||||
that = null;
|
||||
}
|
||||
})
|
||||
})
|
||||
//#endif
|
||||
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
confirmpicker(e) {
|
||||
if (e.value[0].label == '店铺订单') {
|
||||
uni.redirectTo({
|
||||
url: '/pages/my/order/index?e=0'
|
||||
})
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: '/pages/mall/order/index?e=0'
|
||||
})
|
||||
}
|
||||
},
|
||||
init_fn() {
|
||||
this.list_ = {
|
||||
list1: { //全部
|
||||
data: [],
|
||||
page: 1,
|
||||
is_end: false,
|
||||
},
|
||||
list2: { //代付款
|
||||
data: [],
|
||||
page: 1,
|
||||
is_end: false,
|
||||
},
|
||||
list3: { //待发货
|
||||
data: [],
|
||||
page: 1,
|
||||
is_end: false,
|
||||
},
|
||||
list4: { //已完成
|
||||
data: [],
|
||||
page: 1,
|
||||
is_end: false,
|
||||
},
|
||||
list5: { //退款
|
||||
data: [],
|
||||
page: 1,
|
||||
is_end: false,
|
||||
}
|
||||
}
|
||||
for (let i = 0; i <= 4; i++) {
|
||||
this.get_order_list(i);
|
||||
}
|
||||
},
|
||||
async get_order_list(i) {
|
||||
console.log(i, 2233)
|
||||
this.form.status = 'loading';
|
||||
let page = null; //页数
|
||||
let order_type = 10;
|
||||
switch (i) {
|
||||
case 0:
|
||||
order_type = 10;
|
||||
page = this.list_.list1.page;
|
||||
break;
|
||||
case 1:
|
||||
order_type = 0;
|
||||
page = this.list_.list2.page;
|
||||
break;
|
||||
case 2:
|
||||
order_type = 3;
|
||||
page = this.list_.list3.page;
|
||||
break;
|
||||
case 3:
|
||||
order_type = 4;
|
||||
page = this.list_.list4.page;
|
||||
break;
|
||||
case 4:
|
||||
order_type = 5;
|
||||
page = this.list_.list5.page;
|
||||
break;
|
||||
}
|
||||
let res = await this.api.orderlist({
|
||||
order_type: order_type,
|
||||
page: page,
|
||||
like: this.like,
|
||||
store_id: uni.cache.get('store_id') // 判断显示哪家的作品
|
||||
})
|
||||
// let res = []
|
||||
// res.data.forEach(item=>{//计算待支付订单剩余时间
|
||||
// if(item.order_type==0){
|
||||
// item.timeDiff=(new Date(item.estimate_close_at).getTime() -new Date().getTime())/1000;
|
||||
// }
|
||||
// })
|
||||
switch (order_type) {
|
||||
case 10:
|
||||
this.paging(res, this.list_.list1)
|
||||
break;
|
||||
case 0:
|
||||
this.paging(res, this.list_.list2)
|
||||
break;
|
||||
case 3:
|
||||
this.paging(res, this.list_.list3)
|
||||
break;
|
||||
case 4:
|
||||
this.paging(res, this.list_.list4)
|
||||
break;
|
||||
case 5:
|
||||
this.paging(res, this.list_.list5)
|
||||
break;
|
||||
}
|
||||
uni.hideLoading();
|
||||
},
|
||||
paging(res, list) {
|
||||
if (res.length == 0) {
|
||||
this.form.status = 'nomore';
|
||||
list.is_end = true;
|
||||
return false;
|
||||
} else {
|
||||
this.form.status = 'loading';
|
||||
list.page = list.page + 1;
|
||||
setTimeout(() => {
|
||||
list.data = [...list.data, ...res];
|
||||
if (res.length != 10) {
|
||||
list.is_end = true;
|
||||
this.form.status = 'nomore';
|
||||
|
||||
} else {
|
||||
this.form.status = 'loading';
|
||||
}
|
||||
this.$forceUpdate();
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
async overlayshowclick(e) {
|
||||
uni.pro.navigateTo('order/confirm', {
|
||||
order_id: e.order_id
|
||||
})
|
||||
console.log(e)
|
||||
let res = await this.api.paygetpayparams({
|
||||
order_id: e.order_id
|
||||
}) //判断是否支付成功
|
||||
// console.log(res)
|
||||
// if (res.data.pay_status == 0) {
|
||||
// // #ifdef MP-WEIXIN
|
||||
// uni.requestPayment({
|
||||
// provider: 'wxpay', //支付类型-固定值
|
||||
// partnerid: res.data.pay_data.payAppId, // 微信支付商户号
|
||||
// timeStamp: res.data.pay_data.payTimeStamp, // 时间戳(单位:秒)
|
||||
// nonceStr: res.data.pay_data.paynonceStr, // 随机字符串
|
||||
// package: res.data.pay_data.payPackage, // 固定值
|
||||
// signType: res.data.pay_data.paySignType, //固定值
|
||||
// paySign: res.data.pay_data.paySign, //签名
|
||||
// success: (res) => {
|
||||
// console.log(res,'11111111')
|
||||
// uni.showToast({
|
||||
// title: "支付成功"
|
||||
// })
|
||||
// uni.redirectTo({
|
||||
// url: "/pages/order/ordersuccess?id=" + e.order_id,
|
||||
// });
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// uni.showToast({
|
||||
// icon: 'none',
|
||||
// title: '支付失败'
|
||||
// })
|
||||
// console.log('fail:' + JSON.stringify(err));
|
||||
// }
|
||||
// });
|
||||
// // #endif
|
||||
// } else {
|
||||
// console.log(res,'22222')
|
||||
// uni.redirectTo({
|
||||
// url: "/pages/order/ordersuccess?id=" + e.order_id,
|
||||
// });
|
||||
// }
|
||||
|
||||
},
|
||||
lower() {
|
||||
switch (this.current) {
|
||||
case 0:
|
||||
this.onReachBottom_fn(this.list_.list1)
|
||||
break;
|
||||
case 1:
|
||||
this.onReachBottom_fn(this.list_.list2)
|
||||
break;
|
||||
case 2:
|
||||
this.onReachBottom_fn(this.list_.list3)
|
||||
break;
|
||||
case 3:
|
||||
this.onReachBottom_fn(this.list_.list4)
|
||||
break;
|
||||
case 4:
|
||||
this.onReachBottom_fn(this.list_.list5)
|
||||
break;
|
||||
}
|
||||
},
|
||||
onReachBottom_fn(list) {
|
||||
if (!list.is_end) {
|
||||
this.get_order_list(this.current);
|
||||
} else {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
},
|
||||
// tabs通知swiper切换
|
||||
orderswitch(index) {
|
||||
try {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (this.list_list1.data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (this.list_.list2.data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (this.list_.list3.data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (this.list_.list4.data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (this.list_.list5.data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
break;
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
this.swiperCurrent = index;
|
||||
},
|
||||
// swiper-item左右移动,通知tabs的滑块跟随移动
|
||||
transition(e) {
|
||||
let dx = e.detail.dx
|
||||
console.log(e, dx)
|
||||
// this.$refs.uTabs.setDx(dx);
|
||||
},
|
||||
// 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态 swiper滑动结束,分别设置tabs和swiper的状态
|
||||
animationfinish(e) {
|
||||
let current = e.detail.current;
|
||||
try {
|
||||
switch (current) {
|
||||
case 0:
|
||||
if (this.list_list1.data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (this.list_.list2.data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (this.list_.list3.data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (this.list_.list4.data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (this.list_.list5.data.length < 10) {
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
break;
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
|
||||
this.swiperCurrent = current;
|
||||
this.current = current;
|
||||
},
|
||||
// clickoverlayshow(e) { //切换文字
|
||||
// switch (e) {
|
||||
// case 1:
|
||||
// this.clickoverlayshowtext = '取消订单'
|
||||
// break;
|
||||
// case 2:
|
||||
// this.clickoverlayshowtext = '删除订单'
|
||||
// break;
|
||||
// }
|
||||
// this.overlayshow = true
|
||||
// },
|
||||
orderordercancel(item) { //取消订单
|
||||
uni.showModal({
|
||||
content: '确定取消订单吗?',
|
||||
confirmColor: '#f55850',
|
||||
cancelColor: '#333333',
|
||||
success: async (resdata) => {
|
||||
console.log(resdata)
|
||||
if (resdata.confirm) {
|
||||
let res = await this.api.orderordercancel({
|
||||
order_id: item.order_id
|
||||
})
|
||||
this.init_fn()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
orderordercancelrefund(item) { //取消订单去退款
|
||||
uni.pro.navigateTo('my/order/refund', {
|
||||
id: item.order_id
|
||||
})
|
||||
},
|
||||
applylrefund(item) {
|
||||
uni.pro.navigateTo('my/order/applylrefund', {
|
||||
id: item.order_id
|
||||
})
|
||||
},
|
||||
orderorderdelete(item) {
|
||||
uni.showModal({
|
||||
content: '确定删除订单吗?',
|
||||
confirmColor: '#f55850',
|
||||
cancelColor: '#333333',
|
||||
success: async (resdata) => {
|
||||
if (resdata.confirm) {
|
||||
let res = await this.api.orderorderdelete({
|
||||
order_id: item.order_id
|
||||
})
|
||||
}
|
||||
this.init_fn()
|
||||
}
|
||||
})
|
||||
},
|
||||
async cancelOrder(item) { //取消订单
|
||||
console.log(item)
|
||||
// let res
|
||||
// switch (this.clickoverlayshowtext) {
|
||||
// case '取消订单':
|
||||
// if (item.status == 0) {
|
||||
// res = await this.api.orderordercancel({
|
||||
// order_id: item.order_id
|
||||
// })
|
||||
// } else {
|
||||
// uni.pro.navigateTo('my/order/orderInfo', {
|
||||
// id: e,
|
||||
// e: e
|
||||
// })
|
||||
// }
|
||||
// break;
|
||||
// case '删除订单':
|
||||
// res = await this.api.orderorderdelete({
|
||||
// order_id: item.order_id
|
||||
// })
|
||||
// break;
|
||||
// }
|
||||
// this.overlayshow = false
|
||||
// this.init_fn()
|
||||
},
|
||||
eeInfo(e) { //查看订单详情
|
||||
uni.pro.navigateTo('my/order/orderInfo', {
|
||||
id: e.order_id
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
.content {
|
||||
|
||||
.onecontent {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 10rpx 28rpx;
|
||||
|
||||
.flex-start {
|
||||
flex-wrap: nowrap;
|
||||
|
||||
.onecontent_oen {
|
||||
margin: 0 auto;
|
||||
flex: auto;
|
||||
height: 70rpx;
|
||||
border-radius: 36rpx;
|
||||
border: 1rpx solid var(--bg-color-button);
|
||||
padding-right: 8rpx;
|
||||
|
||||
.onecontent_oen_input {
|
||||
padding-left: 32rpx;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.onecontent_oen_text {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
width: 116rpx;
|
||||
height: 56rpx;
|
||||
background: var(--bg-color-button);
|
||||
border-radius: 36rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.onecontent_oen_right {
|
||||
margin-left: 26rpx;
|
||||
|
||||
.onecontent_oen_rightimage {
|
||||
width: 17.9rpx;
|
||||
height: 19.34rpx;
|
||||
}
|
||||
|
||||
.onecontent_oen_rightimageview {
|
||||
text-align: center;
|
||||
width: 56rpx;
|
||||
margin-left: 10rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.onecontent_tow {
|
||||
padding: 32rpx 0 32rpx 0;
|
||||
width: 100%;
|
||||
|
||||
.onecontent_tow_item {
|
||||
position: relative;
|
||||
|
||||
.onecontent_tow_itemtexts {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.onecontent_tow_itemtext {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.onecontent_tow_itemtextsimges {
|
||||
position: absolute;
|
||||
bottom: -10rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 20rpx;
|
||||
height: 8rpx;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.towcontent {
|
||||
padding: 0 28rpx;
|
||||
|
||||
.flex-colum_image {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
|
||||
text {
|
||||
margin-top: 30rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitem {
|
||||
margin-top: 32rpx;
|
||||
padding: 24rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.towcontentitemone {
|
||||
padding-bottom: 16rpx;
|
||||
border-bottom: 1px solid #F6F6F6;
|
||||
|
||||
.towcontentitemone_one {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.towcontentitemone_tow {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
|
||||
.towcontentitemone_towimage {
|
||||
margin-right: 10rpx;
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitemtow {
|
||||
position: relative;
|
||||
padding: 22rpx 0;
|
||||
border-bottom: 1px solid #F6F6F6;
|
||||
|
||||
.towcontentitemtow_imge {
|
||||
width: 144rpx;
|
||||
height: 144rpx;
|
||||
background: #666666;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.towcontentitemtow_one {
|
||||
margin-left: 32rpx;
|
||||
width: 60%;
|
||||
|
||||
.towcontentitemtow_one_one {
|
||||
width:80%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.towcontentitemtow_one_tow {
|
||||
margin-top: 24rpx;
|
||||
font-size: 40rpx;
|
||||
font-family: Roboto-Bold, Roboto;
|
||||
font-weight: bold;
|
||||
color: #FC5F69;
|
||||
}
|
||||
|
||||
.towcontentitemtow_one_there {
|
||||
margin-top: 32rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Roboto-Bold, Roboto;
|
||||
font-weight: 500;
|
||||
color: #666;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitemtow_tow {
|
||||
position: absolute;
|
||||
bottom: 32rpx;
|
||||
right: 0;
|
||||
font-size: 28rpx;
|
||||
font-family: Roboto-Regular, Roboto;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitemthere {
|
||||
width: 100%;
|
||||
margin-top: 16rpx;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.towcontentitemthereitem {
|
||||
margin-left: 24rpx;
|
||||
padding: 8rpx 32rpx;
|
||||
font-size: 28rpx;
|
||||
border-radius: 28rpx;
|
||||
}
|
||||
|
||||
.towcontentitemthereitem_one {
|
||||
background: var(--bg-color-button);
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.towcontentitemthereitem_tow {
|
||||
background: #F6F6F6;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.towcontentitemthereitem_there {
|
||||
background: var(--bg-color-buttonone);
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.warp {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
|
||||
.rect {
|
||||
padding: 40rpx 68rpx;
|
||||
width: 480rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 42rpx;
|
||||
|
||||
.rectone {
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.recttow {
|
||||
width: 100%;
|
||||
margin-top: 32rpx;
|
||||
|
||||
.recttow_one {
|
||||
padding: 8rpx 40rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 26rpx;
|
||||
border: 2rpx solid #999999;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.recttow_tow {
|
||||
padding: 8rpx 40rpx;
|
||||
background: #333333;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
border-radius: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
629
pages/my/order/orderInfo.vue
Normal file
629
pages/my/order/orderInfo.vue
Normal file
@@ -0,0 +1,629 @@
|
||||
<template>
|
||||
<view class="index" :style="[theme]">
|
||||
<view class="onecontent">
|
||||
<view class="onecontentone">
|
||||
<text v-if="datalist.status == 0">待支付</text>
|
||||
<text v-if="datalist.status == 1">已支付</text>
|
||||
<text v-if="datalist.status == 2">等待确认</text>
|
||||
<text v-if="datalist.status == 3">已确认</text>
|
||||
<text v-if="datalist.status == 4">已完成 </text>
|
||||
<text v-if="datalist.status == 5">已取消</text>
|
||||
<text v-if="datalist.status == 6">退款中</text>
|
||||
<text v-if="datalist.status == 7">已退款</text>
|
||||
<text v-if="datalist.status == 8">已拒绝</text>
|
||||
</view>
|
||||
<view class="onecontenttow">
|
||||
感谢您的支持,欢迎再次光临
|
||||
</view>
|
||||
<view class="onecontentthere flex-between">
|
||||
<view class="onecontentthere_one" v-if="datalist.status == 5 || datalist.status == 4 "
|
||||
@click="orderorderdelete(datalist)">
|
||||
删除订单
|
||||
</view>
|
||||
<view class="onecontentthere_tow"
|
||||
v-if="datalist.status == 1 || datalist.status == 2 ||datalist.status == 3"
|
||||
@click="orderordercancelrefund(datalist)">
|
||||
申请退款
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontent">
|
||||
<view class="towcontentone flex-between">
|
||||
<view class="towcontentone_one flex-start">
|
||||
<u-icon name="home" color="#ffffff" size="20"></u-icon>
|
||||
<text class="towcontentone_one_text">{{datalist.store_title}}</text>
|
||||
</view>
|
||||
<u-icon @click="phonefill(datalist.store_mobile)" name="phone-fill" color="#ffffff" size="20"></u-icon>
|
||||
</view>
|
||||
<view class="towcontenttow flex-start" @click="detailsInfo(datalist.store_service_id)">
|
||||
<image class="towcontenttow_image" :src="datalist.store_avatar" mode="aspectFill"></image>
|
||||
<view class="towcontenttowone flex-colum-start">
|
||||
<view class="towcontenttowone_one">
|
||||
{{datalist.title}}
|
||||
</view>
|
||||
<view class="towcontenttowone_tow flex-start">
|
||||
<view class="towcontenttowone_tow_one flex-start">
|
||||
<u-icon name="checkmark-circle" color="#999999" size="14"></u-icon>
|
||||
随时退
|
||||
</view>
|
||||
<view class="towcontenttowone_tow_one flex-start">
|
||||
<u-icon name="checkmark-circle" color="#999999" size="14"></u-icon>
|
||||
过期退
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontenttowone_there">
|
||||
{{datalist.time||''}}
|
||||
</view>
|
||||
<view class="towcontenttowone_four">
|
||||
¥{{datalist.total_price}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!--<view class="towcontentthere flex-between">
|
||||
<text class="towcontentthere_text"></text>
|
||||
</view>
|
||||
<view class="qr-box flex-colum" @longpress="save()">
|
||||
<canvas canvas-id="qrcode" style="width:288rpx;" />
|
||||
</view>
|
||||
<view class="towcontenttfour flex-colum">
|
||||
123 2345 567
|
||||
</view> -->
|
||||
<!-- <view class="towcontenttfive flex-between">
|
||||
<view class="towcontenttfive_one flex-start">
|
||||
<view class="towcontenttfive_oneone">
|
||||
退款:
|
||||
</view>
|
||||
<view class="towcontenttfive_onetow">
|
||||
08-22 23:59:59到期
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontenttfive_tow">
|
||||
申请退款
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="therecontent">
|
||||
<view class="therecontentone">
|
||||
订单信息
|
||||
</view>
|
||||
<view class="therecontentsix entowakst" v-if="datalist.people_nickname">
|
||||
发型师:{{datalist.people_nickname}}
|
||||
</view>
|
||||
<view class="therecontentow entowakst">
|
||||
实付金额:<text>¥{{datalist.money}}</text>
|
||||
</view>
|
||||
<view class="therecontentthere entowakst">
|
||||
购买数量:{{datalist.number}}
|
||||
</view>
|
||||
<view class="therecontenfour entowakst">
|
||||
手机号码:{{datalist.mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2') || '-'}}
|
||||
</view>
|
||||
<view class="therecontentfive flex-start entowakst" @click="copy(datalist.out_trade_no)">
|
||||
订单编号:{{datalist.out_trade_no}}
|
||||
<text class="therecontentfive_box">复制</text>
|
||||
</view>
|
||||
<view class="therecontentsix entowakst">
|
||||
下单时间:{{datalist.createtime}}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<!-- <view class="fourcontent">
|
||||
<view class="fourcontentone">
|
||||
购买须知
|
||||
</view>
|
||||
<view v-html="datalist.details">
|
||||
|
||||
</view>
|
||||
<view class="entowakst" v-html="datalist.details">
|
||||
·预约须知:请您提前1小时预约
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view class="fivecontent">
|
||||
<view class="fivecontentone">
|
||||
用户评价
|
||||
</view>
|
||||
<view class="fivecontenttow flex-between">
|
||||
<view class="fivecontenttow_one flex-start">
|
||||
<text class="fivecontenttow_text">综合评分</text>
|
||||
<u-rate :count="5" value="4" active-color="#f1cb66" inactive-color="#F1CB66"></u-rate>
|
||||
</view>
|
||||
<view class="fivecontenttow_tow">
|
||||
满意
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uQRCode from '@/common/js/uqrCode.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
datalist: {
|
||||
mobile: ''
|
||||
},
|
||||
imgCode: '', // 后续保存到手机相册所需要用到的字段}
|
||||
form: {
|
||||
phone: '18092171236'
|
||||
}
|
||||
}
|
||||
},
|
||||
async onLoad(e) {
|
||||
try {
|
||||
let res = await this.api.orderorderdetail({
|
||||
order_id: e.id
|
||||
})
|
||||
if (res) {
|
||||
console.log(res)
|
||||
this.datalist = res
|
||||
this.datalist.details = res.details.replace(/\<img/g, '<img style="max-width:100%;height:auto" ');
|
||||
}
|
||||
} catch (e) {}
|
||||
// this.generate()
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
orderorderdelete(item) { //删除订单
|
||||
uni.showModal({
|
||||
content: '确定删除订单吗?',
|
||||
confirmColor: '#f55850',
|
||||
cancelColor: '#333333',
|
||||
success: async (resdata) => {
|
||||
if (resdata.confirm) {
|
||||
await this.api.orderorderdelete({
|
||||
order_id: item.order_id
|
||||
})
|
||||
uni.navigateBack()
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
orderordercancelrefund(item) { //取消订单去退款
|
||||
console.log(item)
|
||||
uni.pro.navigateTo('my/order/refund', {
|
||||
id: item.order_id
|
||||
})
|
||||
},
|
||||
// 生成二维码事件
|
||||
generate(e) {
|
||||
uQRCode.make({
|
||||
canvasId: 'qrcode',
|
||||
componentInstance: this,
|
||||
text: "https://ky.sxczgkj.cn/wap/merchant/authPay?userAppId=244", // 想生成二维码到内容
|
||||
size: 150,
|
||||
margin: 0,
|
||||
backgroundColor: '#ffffff',
|
||||
foregroundColor: '#000000',
|
||||
fileType: 'jpg',
|
||||
errorCorrectLevel: uQRCode.errorCorrectLevel.H,
|
||||
success: res => {
|
||||
this.imgCode = res // base64的图片格式
|
||||
}
|
||||
})
|
||||
},
|
||||
// 保存到手机
|
||||
save() {
|
||||
uni.getSetting({ //获取用户的当前设置
|
||||
success: (res) => {
|
||||
if (res.authSetting['scope.writePhotosAlbum']) { //验证用户是否授权可以访问相册
|
||||
this.aveImageToPhotosAlbum();
|
||||
} else {
|
||||
uni.authorize({ //如果没有授权,向用户发起请求
|
||||
scope: 'scope.writePhotosAlbum',
|
||||
success: () => {
|
||||
this.aveImageToPhotosAlbum();
|
||||
},
|
||||
fail: () => {
|
||||
// 提示
|
||||
uni.showToast({
|
||||
title: "请打开保存相册权限,再点击保存到手机",
|
||||
icon: "none",
|
||||
duration: 3000
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.openSetting({ //调起客户端小程序设置界面,让用户开启访问相册
|
||||
success: (res2) => {
|
||||
// console.log(res2.authSetting)
|
||||
}
|
||||
});
|
||||
}, 3000);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
copy(value) {
|
||||
//提示模板
|
||||
uni.setClipboardData({
|
||||
data: value, //要被复制的内容
|
||||
success: () => { //复制成功的回调函数
|
||||
uni.showToast({
|
||||
title: '复制成功'
|
||||
})
|
||||
},
|
||||
fail: (res) => {
|
||||
console.log(res)
|
||||
}
|
||||
});
|
||||
},
|
||||
detailsInfo(e) { //查看订单详情
|
||||
uni.pro.navigateTo('my/order/cporderinfo', {
|
||||
id: e,
|
||||
})
|
||||
},
|
||||
phonefill(value) {
|
||||
uni.makePhoneCall({
|
||||
phoneNumber: value //仅为示例
|
||||
});
|
||||
},
|
||||
aveImageToPhotosAlbum() {
|
||||
let base64 = this.imgCode.replace(/^data:image\/\w+;base64,/, ""); //去掉data:image/png;base64,
|
||||
let filePath = wx.env.USER_DATA_PATH + '/ph_fit_qrcode.png'; // 路径文件名
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
uni.getFileSystemManager().writeFile({ // 获取全局唯一的文件管理器
|
||||
filePath: filePath, //创建一个临时文件名
|
||||
data: base64, //写入的文本或二进制数据
|
||||
encoding: 'base64', //写入当前文件的字符编码
|
||||
success: res => {
|
||||
uni.saveImageToPhotosAlbum({ // 保存图片到系统相册
|
||||
filePath: filePath,
|
||||
success: function(res2) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '保存成功',
|
||||
icon: "none",
|
||||
duration: 5000
|
||||
})
|
||||
},
|
||||
fail: function(err) {
|
||||
uni.hideLoading();
|
||||
// console.log(err.errMsg);
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
uni.hideLoading();
|
||||
//console.log(err)
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
.index {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.onecontent {
|
||||
width: 100%;
|
||||
padding: 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.onecontentone {
|
||||
font-size: 32rpx;
|
||||
font-family: SourceHanSansCN-Medium-, SourceHanSansCN-Medium;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.onecontenttow {
|
||||
margin-top: 16rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.onecontentthere {
|
||||
margin-top: 24rpx;
|
||||
|
||||
.onecontentthere_one {
|
||||
background: #333333;
|
||||
border-radius: 8rpx;
|
||||
padding: 16rpx 94rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.onecontentthere_tow {
|
||||
background: #F7F7F7;
|
||||
border-radius: 8rpx;
|
||||
padding: 16rpx 94rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.towcontent {
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx;
|
||||
|
||||
.towcontentone {
|
||||
position: relative;
|
||||
padding: 16rpx 32rpx;
|
||||
border-radius: 18rpx 18rpx 0 0;
|
||||
background: var(--bg-color-buttonone);
|
||||
|
||||
.towcontentone_one {
|
||||
.towcontentone_one_image {
|
||||
width: 33.04rpx;
|
||||
height: 29.79rpx;
|
||||
}
|
||||
|
||||
.towcontentone_one_text {
|
||||
margin-left: 10rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentone_one::after {
|
||||
z-index: 10;
|
||||
position: absolute;
|
||||
bottom: -22rpx;
|
||||
content: '';
|
||||
display: inline-block;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
border-radius: 0 0 22rpx 22rpx;
|
||||
background: var(--bg-color-buttonone);
|
||||
}
|
||||
}
|
||||
|
||||
.towcontenttow {
|
||||
position: relative;
|
||||
padding: 32rpx;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
|
||||
.towcontenttow_image {
|
||||
width: 128rpx;
|
||||
height: 128rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.towcontenttowone {
|
||||
margin-left: 36rpx;
|
||||
justify-content: space-around;
|
||||
width: 60%;
|
||||
|
||||
.towcontenttowone_one {
|
||||
width: 100%;
|
||||
font-size: 28rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.towcontenttowone_tow {
|
||||
.towcontenttowone_tow_one {
|
||||
font-size: 24rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontenttowone_there {
|
||||
font-size: 32rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.towcontenttowone_four {
|
||||
// position: absolute;
|
||||
font-weight: bold;
|
||||
// top: 32rpx;
|
||||
// right: 32rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentthere {
|
||||
position: relative;
|
||||
height: 44rpx;
|
||||
width: 100%;
|
||||
|
||||
.towcontentthere_text {
|
||||
width: 100%;
|
||||
height: 0px;
|
||||
border: 1rpx dashed #EAEAEA;
|
||||
}
|
||||
|
||||
.towcontentthere_text::after {
|
||||
z-index: 10;
|
||||
position: absolute;
|
||||
content: '';
|
||||
display: inline-block;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 22rpx;
|
||||
height: 44rpx;
|
||||
border-radius: 0 44rpx 44rpx 0;
|
||||
background: #f6f6f6;
|
||||
}
|
||||
|
||||
.towcontentthere_text::before {
|
||||
z-index: 10;
|
||||
position: absolute;
|
||||
content: '';
|
||||
display: inline-block;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 22rpx;
|
||||
height: 44rpx;
|
||||
border-radius: 44rpx 0 0 44rpx;
|
||||
background: #f6f6f6;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontenttfour {
|
||||
margin-top: 16rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.towcontenttfive {
|
||||
padding: 32rpx;
|
||||
width: 100%;
|
||||
|
||||
.towcontenttfive_one {
|
||||
font-size: 32rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.towcontenttfive_onetow {
|
||||
margin-left: 16rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.towcontenttfive_tow {
|
||||
padding: 10rpx 16rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #D5D5D5;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.therecontent {
|
||||
margin-top: 24rpx;
|
||||
padding: 32rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx;
|
||||
|
||||
.therecontentone {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.entowakst {
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.therecontentfive_box {
|
||||
padding: 6rpx 10rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #666666;
|
||||
background: #FFFFFF;
|
||||
margin-left: 6rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #D5D5D5;
|
||||
}
|
||||
}
|
||||
|
||||
.fourcontent {
|
||||
margin-top: 24rpx;
|
||||
padding: 32rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx;
|
||||
|
||||
.fourcontentone {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.fourcontentone::after {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 1rpx;
|
||||
border: 1px solid #F7F7F7;
|
||||
}
|
||||
|
||||
.entowakst {
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.fivecontent {
|
||||
margin-top: 24rpx;
|
||||
padding: 32rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx;
|
||||
|
||||
.fivecontentone {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.fivecontenttow {
|
||||
margin-top: 16rpx;
|
||||
|
||||
.fivecontenttow_one {
|
||||
.fivecontenttow_text {
|
||||
padding-right: 24rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.fivecontenttow_tow {
|
||||
font-size: 24rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
368
pages/my/order/refund.vue
Normal file
368
pages/my/order/refund.vue
Normal file
@@ -0,0 +1,368 @@
|
||||
<template>
|
||||
<view class="index" :style="[theme]">
|
||||
<view class="onecontent flex-between">
|
||||
<image :src="datalist.store_avatar" mode="aspectFill"></image>
|
||||
<view class="flex-colum-start">
|
||||
<view class="onecontentone">
|
||||
{{datalist.title}}
|
||||
</view>
|
||||
<view class="onecontenttow">
|
||||
<view class="onecontenttowabsolute">
|
||||
x{{datalist.number}}
|
||||
</view>
|
||||
<text style="font-size:28rpx;">¥</text>{{datalist.total_price}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="therecontent">
|
||||
<view class="therecontentone flex-between" @click="showpicke = true">
|
||||
<view class="therecontentone_one">
|
||||
退款原因
|
||||
</view>
|
||||
<text class="therecontentone_text" style="font-weight: 400;">{{reason}}</text>
|
||||
<u-icon name="arrow-right" color="#9b9b9b" size="14"></u-icon>
|
||||
</view>
|
||||
<view class="therecontentone flex-between">
|
||||
<view class="therecontentone_one">
|
||||
退款金额
|
||||
</view>
|
||||
<input disabled style="padding: 16rpx; color: red;" type="text" v-model="money"
|
||||
class="therecontentone_text" :placeholder="'最多可退¥'+money">
|
||||
</view>
|
||||
<view class="therecontentone">
|
||||
<view class="therecontentone_one">
|
||||
详细说明
|
||||
</view>
|
||||
<view class="" style="margin-top: 10rpx;">
|
||||
<u--textarea v-model="remarks" placeholder="请输入内容"></u--textarea>
|
||||
</view>
|
||||
</view>
|
||||
<view class="therecontentone flex-between">
|
||||
<view class="therecontentone_one">
|
||||
图片凭证
|
||||
</view>
|
||||
<view class="therecontentone_text" style="text-align: right;">最多三张</view>
|
||||
</view>
|
||||
<view class="flex-start">
|
||||
<view class="fourcontent flex-start" v-if="avatar.length!=0">
|
||||
<view class="fourcontent_item" v-for="(item,index) in avatar" :key="index">
|
||||
<image :src="item" mode="aspectFill"></image>
|
||||
<text class="fourcontent_itemtext" @click="avatardelete(index)">
|
||||
<u-icon name="close-circle-fill" color="#000" size="16"></u-icon>
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="avatar.length<3" class="fourcontent_items flex-colum" @click="chooseImagelist">
|
||||
<u-icon name="camera-fill" color="#000" size="30"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="buoot" @click="orderorderrefund">
|
||||
提交
|
||||
</view>
|
||||
<u-picker :show="showpicke" title='退款原因' :columns="columnspicke" @cancel='showpicke = false'
|
||||
@confirm='confirm'></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uploadImage from "@/js_sdk/yushijie-ossutil/ossutil/uploadFile.js";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showpicke: false,
|
||||
reason: "",
|
||||
money: '',
|
||||
columnspicke: [
|
||||
['7天无理由', '拍错/多拍/不想要', '其他']
|
||||
],
|
||||
imgCode: '', // 后续保存到手机相册所需要用到的字段
|
||||
remarks: '',
|
||||
form: {
|
||||
phone: '18092171236'
|
||||
},
|
||||
datalist: {},
|
||||
avatar: [],
|
||||
order_id: ""
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
async onLoad(e) {
|
||||
this.order_id = e.id
|
||||
try {
|
||||
let res = await this.api.orderorderdetail({
|
||||
order_id: this.order_id
|
||||
})
|
||||
if (res) {
|
||||
this.datalist = res
|
||||
this.money = res.money
|
||||
}
|
||||
} catch (e) {}
|
||||
// this.generate()
|
||||
},
|
||||
methods: {
|
||||
// / 更换头像
|
||||
chooseImagelist(e) {
|
||||
// uni.showLoading({
|
||||
// title: '上传中',
|
||||
// mask: true
|
||||
// })
|
||||
uni.chooseImage({
|
||||
count: 1, //默认9
|
||||
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album'], //从相册选择
|
||||
success: (res) => {
|
||||
let file = res.tempFilePaths[0];
|
||||
uploadImage(file, 'refund/',
|
||||
result => {
|
||||
this.avatar.push(result)
|
||||
uni.hideLoading()
|
||||
}, result => {
|
||||
console.log(result)
|
||||
uni.hideLoading()
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
async orderorderrefund() {
|
||||
if (this.reason == null || this.reason == '') {
|
||||
uni.showToast({
|
||||
title: '请选择退款原因',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
let res = await this.api.orderorderrefund({
|
||||
order_id: this.order_id,
|
||||
reason: this.reason,
|
||||
remarks: this.remarks,
|
||||
img: this.avatar,
|
||||
// money:""
|
||||
})
|
||||
if (res == 1) {
|
||||
uni.showToast({
|
||||
title: '操作成功,请等待审核',
|
||||
icon: 'none'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
},
|
||||
avatardelete(e) {
|
||||
this.avatar.splice(e, 1)
|
||||
console.log(this.avatar)
|
||||
},
|
||||
confirm(e) {
|
||||
this.reason = e.value[0]
|
||||
this.showpicke = false
|
||||
console.log(e.value[0])
|
||||
},
|
||||
aveImageToPhotosAlbum() {
|
||||
let base64 = this.imgCode.replace(/^data:image\/\w+;base64,/, ""); //去掉data:image/png;base64,
|
||||
let filePath = wx.env.USER_DATA_PATH + '/ph_fit_qrcode.png'; // 路径文件名
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
uni.getFileSystemManager().writeFile({ // 获取全局唯一的文件管理器
|
||||
filePath: filePath, //创建一个临时文件名
|
||||
data: base64, //写入的文本或二进制数据
|
||||
encoding: 'base64', //写入当前文件的字符编码
|
||||
success: res => {
|
||||
uni.saveImageToPhotosAlbum({ // 保存图片到系统相册
|
||||
filePath: filePath,
|
||||
success: function(res2) {
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '保存成功',
|
||||
icon: "none",
|
||||
duration: 5000
|
||||
})
|
||||
},
|
||||
fail: function(err) {
|
||||
uni.hideLoading();
|
||||
// console.log(err.errMsg);
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: err => {
|
||||
uni.hideLoading();
|
||||
//console.log(err)
|
||||
}
|
||||
})
|
||||
},
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
.index {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.onecontent {
|
||||
width: 100%;
|
||||
padding: 26rpx 32rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
|
||||
image {
|
||||
width: 176rpx;
|
||||
height: 176rpx;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.flex-colum-start {
|
||||
height: 176rpx;
|
||||
flex: auto;
|
||||
margin-left: 20rpx;
|
||||
justify-content: flex-start;
|
||||
|
||||
.onecontentone {
|
||||
width: 400rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #1A1A1A;
|
||||
}
|
||||
|
||||
.onecontenttow {
|
||||
top: 32rpx;
|
||||
position: relative;
|
||||
margin-top: 16rpx;
|
||||
width: 100%;
|
||||
font-size: 40rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
|
||||
.onecontenttowabsolute {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.buoot {
|
||||
margin: 40rpx auto;
|
||||
width: 80%;
|
||||
padding: 16rpx 0;
|
||||
text-align: center;
|
||||
font-size: 36rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
background: var(--bg-color-button);
|
||||
border-radius: 40rpx;
|
||||
}
|
||||
|
||||
.therecontent {
|
||||
margin-top: 24rpx;
|
||||
padding: 32rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx;
|
||||
|
||||
.therecontentone {
|
||||
width: 100%;
|
||||
padding: 10rpx 0;
|
||||
border-bottom: 1px solid #F7F7F7;
|
||||
|
||||
.therecontentone_one {
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: 700;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.therecontentone_text {
|
||||
flex: auto;
|
||||
margin-left: 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.fourcontent_items {
|
||||
position: relative;
|
||||
margin-top: 16rpx;
|
||||
margin-left: 20rpx;
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
background: #f9f9f9;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.fourcontent {
|
||||
.fourcontent_item {
|
||||
position: relative;
|
||||
margin-top: 16rpx;
|
||||
margin-left: 20rpx;
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
border-radius: 16rpx;
|
||||
|
||||
image {
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.fourcontent_itemtext {
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
right: 0rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.entowakst {
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.therecontentfive_box {
|
||||
padding: 6rpx 10rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: SourceHanSansCN-Regular-, SourceHanSansCN-Regular;
|
||||
font-weight: normal;
|
||||
color: #666666;
|
||||
background: #FFFFFF;
|
||||
margin-left: 6rpx;
|
||||
border-radius: 8rpx;
|
||||
border: 2rpx solid #D5D5D5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
313
pages/my/setup/index.vue
Normal file
313
pages/my/setup/index.vue
Normal file
@@ -0,0 +1,313 @@
|
||||
<template>
|
||||
<view class="index" :style="[theme]">
|
||||
<view class="onecontent">
|
||||
个人信息
|
||||
</view>
|
||||
<view class="towcontent">
|
||||
<view class="towcontent_item flex-between">
|
||||
<view class="towcontent_item_text">
|
||||
头像
|
||||
</view>
|
||||
<view class="towcontent_item_box">
|
||||
<button open-type="chooseAvatar" @chooseavatar='onChooseAvatar' style="padding: 0;margin: 0;">
|
||||
<image class="towcontent_item_box_imge" :src="urlavatar" mode="aspectFill"></image>
|
||||
<!-- <image v-else class="towcontent_item_box_imge" src="@/static/logo.png" mode="aspectFill"></image> -->
|
||||
</button>
|
||||
<!-- <image v-if="userlist.avatar" class="towcontent_item_box_imge" :src="userlist.avatar" mode="aspectFill">
|
||||
</image>
|
||||
-->
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontent_item flex-between">
|
||||
<view class="towcontent_item_text">
|
||||
UID
|
||||
</view>
|
||||
<view class="towcontent_item_box flex-start">
|
||||
<text class="towcontent_item_box_text">ID:{{userlist.user_id}}</text>
|
||||
<!-- <u-icon name="arrow-right" color="#909399" size="14"></u-icon> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontent_item flex-between">
|
||||
<view class="towcontent_item_text">
|
||||
昵称
|
||||
</view>
|
||||
<view class="towcontent_item_box flex-start">
|
||||
<input class="towcontent_item_box_text" style="text-align: right;" type="nickname" @blur="blurname"
|
||||
v-model="userlist.nickname" placeholder="请输入昵称">
|
||||
<!-- <text class="towcontent_item_box_text">{{userlist.nickname||'暂无您称'}}</text> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontent_item flex-between">
|
||||
<view class="towcontent_item_text">
|
||||
性别
|
||||
</view>
|
||||
<view class="towcontent_item_box flex-start">
|
||||
<u-radio-group v-model="userlist.gender" placement="row" @change="groupChange">
|
||||
<u-radio shape="circle" label="男" name="1"></u-radio>
|
||||
<u-radio style="margin-left: 10rpx;" shape="circle" label="女" name="2"></u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontent_item flex-between" @click="datetimeshow = true">
|
||||
<view class="towcontent_item_text">
|
||||
生日
|
||||
</view>
|
||||
<view class="towcontent_item_box flex-start">
|
||||
<text class="towcontent_item_box_text">{{userlist.birthday || ''}}</text>
|
||||
<u-icon name="arrow-right" color="#909399" size="14"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontent_item flex-between">
|
||||
<view class="towcontent_item_text">
|
||||
手机号
|
||||
</view>
|
||||
<view class="towcontent_item_box flex-start" v-if="userlist.mobile">
|
||||
<text
|
||||
class="towcontent_item_box_text">{{userlist.mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2') }}</text>
|
||||
<!-- <navigator :url="'/pages/my/setup/phone'" class="towcontent_item_box_ghbd">
|
||||
更换绑定
|
||||
</navigator>
|
||||
<button class="towcontent_item_box_ghbd" open-type="getPhoneNumber"
|
||||
@getphonenumber="getPhoneNumber">获取电话</button>-->
|
||||
</view>
|
||||
<!-- <navigator :url="'/pages/my/setup/phone'" v-else class="towcontent_item_box flex-start">
|
||||
<text class="towcontent_item_box_text">去绑定</text>
|
||||
<u-icon name="arrow-right" color="#909399" size="14"></u-icon>
|
||||
</navigator> -->
|
||||
<view v-else class="towcontent_item_box flex-start">
|
||||
<button class="towcontent_item_box_ghbd" open-type="getPhoneNumber"
|
||||
@getphonenumber="getPhoneNumber">获取电话</button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="thereconse thereconses" @click="useruserinfoedit">
|
||||
保存
|
||||
</view>
|
||||
<u-datetime-picker :minDate="-946800000000" :maxDate="2240409600000" :show="datetimeshow"
|
||||
v-model="datetimevalue" @cancel='datetimeshow = false' @confirm="confirmdatetime"
|
||||
mode="date"></u-datetime-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uploadImage from "@/js_sdk/yushijie-ossutil/ossutil/uploadFile.js";
|
||||
import WXBizDataCrypt from "@/common/js/WXBizDataCrypt.js" // 需要引入
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
urlavatar: '',
|
||||
userlist: {},
|
||||
datetimeshow: false,
|
||||
datetimevalue: '',
|
||||
// u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
|
||||
};
|
||||
},
|
||||
onLoad() {},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
onShow() {
|
||||
this.useruserinfo()
|
||||
|
||||
},
|
||||
watch: {},
|
||||
methods: {
|
||||
// / 更换头像
|
||||
onChooseAvatar(e) {
|
||||
uni.showLoading({
|
||||
title: '上传中',
|
||||
mask: true
|
||||
})
|
||||
console.log(e.detail.avatarUrl)
|
||||
let file = e.detail.avatarUrl;
|
||||
uploadImage(file, '',
|
||||
result => {
|
||||
//将上传后的图片以对象(官方要求的格式)的形式存入uni-file-picker的value值imageValue(imageValue值的结构为数组包对象)用于图片回显
|
||||
// let objAge = {
|
||||
// 'url': result,
|
||||
// 'extname': 'png',
|
||||
// 'name': 'imgss.png'
|
||||
// };
|
||||
// this.userlist.avatar.push(objAge)
|
||||
this.urlavatar = result
|
||||
console.log(this.urlavatar)
|
||||
uni.hideLoading()
|
||||
}, result => {
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
// 获取昵称
|
||||
blurname(e) {
|
||||
console.log(e);
|
||||
this.userlist.nickname = e.detail.value
|
||||
},
|
||||
async useruserinfo() {
|
||||
let res = await this.api.useruserinfo()
|
||||
uni.cache.set('loginuser', res);
|
||||
this.userlist = res.userinfo
|
||||
this.userlist.gender = String(res.userinfo.gender)
|
||||
this.urlavatar = res.userinfo.avatar
|
||||
|
||||
},
|
||||
async useruserinfoedit() {
|
||||
if (this.userlist.mobile == '' || this.userlist.mobile == null) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请先绑定手机号'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.urlavatar == '' || this.urlavatar == null) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '头像不能为空'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.userlist.gender == '' || this.userlist.gender == null) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '性别不能为空'
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (this.userlist.birthday == '' || this.userlist.birthday == null) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '生日不能为空'
|
||||
});
|
||||
return;
|
||||
}
|
||||
let res = await this.api.useruserinfoedit({
|
||||
avatar: this.urlavatar,
|
||||
nickname: this.userlist.nickname,
|
||||
gender: this.userlist.gender,
|
||||
birthday: this.userlist.birthday
|
||||
})
|
||||
uni.showToast({
|
||||
title: '修改成功',
|
||||
icon: 'none'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 2000);
|
||||
console.log(res)
|
||||
},
|
||||
confirmdatetime(e) {
|
||||
console.log(e)
|
||||
this.datetimeshow = false
|
||||
this.userlist.birthday = uni.$u.date(e.value, 'yyyy-mm-dd')
|
||||
},
|
||||
groupChange(n) {
|
||||
console.log(n)
|
||||
this.userlist.gender = n
|
||||
},
|
||||
async getPhoneNumber(res) { // 获取手机号
|
||||
var resdataa = res
|
||||
console.log(res)
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: async (data) => {
|
||||
let resdata = await this.api.usergetwechatphone({
|
||||
code: data.code,
|
||||
iv: resdataa.detail.iv,
|
||||
encryptedData: resdataa.detail.encryptedData
|
||||
})
|
||||
this.userlist.mobile = resdata.mobile
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
|
||||
// #endif
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
::v-deep .u-radio{
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
.index {
|
||||
padding: 28rpx;
|
||||
|
||||
.onecontent {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.towcontent {
|
||||
padding: 0 32rpx;
|
||||
margin-top: 24rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.towcontent_item:nth-child(1) {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.towcontent_item {
|
||||
padding: 22rpx;
|
||||
border-top: 1rpx dotted #ccc;
|
||||
|
||||
.towcontent_item_text {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.towcontent_item_box {
|
||||
.towcontent_item_box_imge {
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
}
|
||||
|
||||
.towcontent_item_box_text {
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.towcontent_item_box_ghbd {
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #9397C1;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.thereconse {
|
||||
width: 630rpx;
|
||||
height: 80rpx;
|
||||
background: #999999;
|
||||
border-radius: 40rpx;
|
||||
font-size: 36rpx;
|
||||
text-align: center;
|
||||
margin: 84rpx auto;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
line-height: 80rpx;
|
||||
}
|
||||
|
||||
.thereconses {
|
||||
background: var(--bg-color-button);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
249
pages/my/setup/phone.vue
Normal file
249
pages/my/setup/phone.vue
Normal file
@@ -0,0 +1,249 @@
|
||||
<template>
|
||||
<view class="Box">
|
||||
<!-- <view class="Box_one">设置新手机</view>
|
||||
<view class="Box_T">设置新手机号需要通过短信验证</view>
|
||||
<view class="Box_there">当前手机号:{{ form.mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2') }}</view> -->
|
||||
<view class="Box_consitem">
|
||||
<view class="Box_box flex-start">
|
||||
<text class="top_box_one_text">中国大陆+86</text>
|
||||
<input type="number" class="top_box_one_textinput" v-model="form.mobile" style="font-size: 24rpx;"
|
||||
placeholder="请输入手机号" maxlength="11" data-key="mobile" />
|
||||
</view>
|
||||
<view class="Box_box flex-between"
|
||||
style="padding: 14rpx 0;border-top: 1rpx solid #efefef;border-bottom: 1rpx solid #efefef; margin-top: 0;">
|
||||
<text class="top_box_one_text" style="border-right:none;">验证码</text>
|
||||
<input type="number" style="font-size: 24rpx;" v-model="form.code" placeholder="请输入短信验证码" />
|
||||
<view class="top_box_one_texts">
|
||||
<view v-if="showText == true" class="yzm" @click="CodeRegister">{{ Recapture }}</view>
|
||||
<view v-else style="color: #ccc; background-color: #f9f9f9; border-radius:16px; padding: 10rpx;">
|
||||
{{ second }}s重新发送
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="agreement flex-start">
|
||||
<u-checkbox-group><u-checkbox shape="circle" @change="radioChange"
|
||||
size="12"></u-checkbox></u-checkbox-group>
|
||||
<text>阅读并同意银收客预约</text>
|
||||
<view class="agreement-Item" @click="Privacy(1)">《用户协议》</view>
|
||||
及
|
||||
<view class="agreement-Item" @click="Privacy(2)">《隐私政策》</view>
|
||||
</view>
|
||||
<view class="flex-colum">
|
||||
<view class="Box_bottom" @click="userInfochangePhone">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
radioChangeItem: false, //单选框
|
||||
form: {
|
||||
mobile: '',
|
||||
code: '',
|
||||
oldPhone: '',
|
||||
password: ''
|
||||
},
|
||||
// 注册定时器 初始值
|
||||
second: 60,
|
||||
showText: true,
|
||||
Recapture: '发送验证码'
|
||||
};
|
||||
},
|
||||
onLoad() {},
|
||||
computed: {},
|
||||
methods: {
|
||||
async CodeRegister() {
|
||||
//发起验证码
|
||||
if (this.form.mobile == null || this.form.mobile == '') {
|
||||
uni.showToast({
|
||||
title: '请输入电话号码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
const res = await this.api.smssend({
|
||||
// post 手机验证码
|
||||
mobile: this.form.mobile,
|
||||
event: 'binding'
|
||||
});
|
||||
console.log(res);
|
||||
uni.showToast({
|
||||
title: '验证码获取成功',
|
||||
icon: 'none'
|
||||
});
|
||||
// 定时器
|
||||
this.showText = false;
|
||||
this.Recapture = '重新获取';
|
||||
var interval = setInterval(() => {
|
||||
let times = --this.second;
|
||||
this.second = times < 10 ? '0' + times : times; //小于10秒补 0
|
||||
}, 1000);
|
||||
setTimeout(() => {
|
||||
clearInterval(interval);
|
||||
this.second = 60;
|
||||
this.showText = true;
|
||||
}, 60000);
|
||||
},
|
||||
radioChange(n) {
|
||||
//是否同意
|
||||
this.radioChangeItem = n;
|
||||
},
|
||||
async Privacy(e) {
|
||||
let res = await this.api.useruserpolicy();
|
||||
if (e == 1) {
|
||||
//用户协议
|
||||
uni.pro.navigateTo('webview/html', {
|
||||
src: res.agreement
|
||||
});
|
||||
} else {
|
||||
uni.pro.navigateTo('webview/html', {
|
||||
src: res.policy
|
||||
});
|
||||
}
|
||||
},
|
||||
async userInfochangePhone() {
|
||||
if (this.form.mobile == null || this.form.mobile == '') {
|
||||
uni.showToast({
|
||||
title: '请输入电话号码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.code == null || this.form.code == '') {
|
||||
uni.showToast({
|
||||
title: '请输入验证码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.radioChangeItem == false) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请先阅读《用户协议》和《隐私政策》'
|
||||
});
|
||||
return;
|
||||
}
|
||||
let res = await this.api.userbindingphone({
|
||||
captcha: this.form.code,
|
||||
mobile: this.form.mobile,
|
||||
event: 'binding'
|
||||
});
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: '成功',
|
||||
icon: 'none'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F9F9F9;
|
||||
}
|
||||
|
||||
.Box {
|
||||
padding: 0 28rpx;
|
||||
|
||||
.Box_one {
|
||||
padding-top: 38rpx;
|
||||
font-size: 40rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.Box_T {
|
||||
margin-top: 2rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.Box_there {
|
||||
margin-top: 70rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.Box_consitem {
|
||||
background: #ffffff;
|
||||
padding: 32rpx;
|
||||
border-radius: 24rpx;
|
||||
margin-top: 22rpx;
|
||||
|
||||
.Box_box {
|
||||
padding: 18rpx 0;
|
||||
|
||||
.top_box_one_text {
|
||||
width: auto;
|
||||
padding: 0 20rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
border-right: 1rpx solid #ccc;
|
||||
}
|
||||
|
||||
.top_box_one_textinput {
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
input {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.top_box_one_texts {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #5082fd;
|
||||
}
|
||||
}
|
||||
|
||||
.agreement {
|
||||
margin-top: 14rpx;
|
||||
font-size: 20rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #7c8e97;
|
||||
|
||||
.agreement-Item {
|
||||
color: #4ca1fc;
|
||||
}
|
||||
}
|
||||
|
||||
.flex-colum {
|
||||
width: 100%;
|
||||
margin-top: 64rpx;
|
||||
|
||||
.Box_bottom {
|
||||
width: 558rpx;
|
||||
height: 72rpx;
|
||||
background: linear-gradient(115deg, #7E81A5 0%, #4D4E64 100%);
|
||||
border-radius: 50rpx;
|
||||
font-size: 36rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
line-height: 72rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
215
pages/my/setup/repairpassword.vue
Normal file
215
pages/my/setup/repairpassword.vue
Normal file
@@ -0,0 +1,215 @@
|
||||
<template>
|
||||
<view class="Box" :style="[theme]">
|
||||
<view class="box_one">安全密码用于支付,退款,确保资金安全</view>
|
||||
<view class="box_item flex-between">
|
||||
<text class="top_box_one_text">中国大陆+86</text>
|
||||
<input type="number" v-model="form.mobile" placeholder="请输入手机号" maxlength="11" disabled="disabled" />
|
||||
</view>
|
||||
<view class="box_item flex-between">
|
||||
<text class="top_box_one_text">密码</text>
|
||||
<input type="number" v-model="form.password" placeholder="密码必须是6位" maxlength="6" :password="!passwords" />
|
||||
</view>
|
||||
<view class="box_item flex-between">
|
||||
<text class="top_box_one_text">确认密码</text>
|
||||
<input type="number" v-model="form.payPassword" placeholder="确认密码必须是6位" maxlength="6"
|
||||
:password="!payPasswords" />
|
||||
</view>
|
||||
<view class="box_item flex-between" style="position:relative;">
|
||||
<text class="top_box_one_text">验证码</text>
|
||||
<input type="number" v-model="form.checkCode" placeholder="请输入验证码" style="padding-right: 140rpx;" />
|
||||
<view class="top_box_one_texts">
|
||||
<view v-if="showText == true" class="yzm" @click="CodeRegister">{{ Recapture }}</view>
|
||||
<view v-else style="color: #ccc; background-color: #f9f9f9; border-radius:16px; padding: 10rpx;">
|
||||
{{ second }}s重新发送
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-colum">
|
||||
<view class="Box_bottom" @click="userInfosavePayPassword">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
mobile: uni.cache.get('loginuser').userinfo.mobile,
|
||||
password: '',
|
||||
payPassword: '',
|
||||
checkCode: ''
|
||||
},
|
||||
passwords: false,
|
||||
payPasswords: false,
|
||||
// 注册定时器 初始值
|
||||
second: 60,
|
||||
showText: true,
|
||||
Recapture: '发送验证码'
|
||||
};
|
||||
},
|
||||
onLoad() {},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async CodeRegister() {
|
||||
//发起验证码
|
||||
const res = await this.api.smssend({
|
||||
mobile: this.form.mobile,
|
||||
event: 'setpassword'
|
||||
});
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: '验证码获取成功',
|
||||
icon: 'none'
|
||||
});
|
||||
// 定时器
|
||||
this.showText = false;
|
||||
this.Recapture = '重新获取';
|
||||
var interval = setInterval(() => {
|
||||
let times = --this.second;
|
||||
this.second = times < 10 ? '0' + times : times; //小于10秒补 0
|
||||
}, 1000);
|
||||
setTimeout(() => {
|
||||
clearInterval(interval);
|
||||
this.second = 60;
|
||||
this.showText = true;
|
||||
}, 60000);
|
||||
}
|
||||
},
|
||||
async userInfosavePayPassword() {
|
||||
console.log(this.form.payPassword, this.form.password)
|
||||
if (this.form.mobile.length != 11) {
|
||||
uni.showToast({
|
||||
title: '手机号必须是11位',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.password == null || this.form.password == '') {
|
||||
uni.showToast({
|
||||
title: '请输入密码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.payPassword == null || this.form.payPassword == '') {
|
||||
uni.showToast({
|
||||
title: '请输入确认密码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.password.length != 6 || this.form.payPassword.length != 6) {
|
||||
uni.showToast({
|
||||
title: '密码必须是6位',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.payPassword != this.form.password) {
|
||||
uni.showToast({
|
||||
title: '密码和确认密码不一致',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
if (this.form.checkCode == null || this.form.checkCode == '') {
|
||||
uni.showToast({
|
||||
title: '请输入验证码',
|
||||
icon: 'none'
|
||||
});
|
||||
return false;
|
||||
}
|
||||
let res = await this.api.uservippassword({
|
||||
password: this.form.password,
|
||||
c_password: this.form.payPassword,
|
||||
code: this.form.checkCode
|
||||
})
|
||||
if (res == 1) {
|
||||
uni.showToast({
|
||||
title: '修改成功',
|
||||
icon: 'none'
|
||||
});
|
||||
setTimeout(() => {
|
||||
uni.navigateBack();
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.Box {
|
||||
padding: 0 28rpx;
|
||||
|
||||
.box_one {
|
||||
margin-top: 26rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.box_item {
|
||||
padding: 36rpx 0 0 0;
|
||||
|
||||
.top_box_one_text {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 75%;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.repeat {
|
||||
position: absolute;
|
||||
bottom: 26rpx;
|
||||
right: 0;
|
||||
width: 25rpx;
|
||||
height: 17rpx;
|
||||
}
|
||||
|
||||
.top_box_one_texts {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #5082fd;
|
||||
}
|
||||
}
|
||||
|
||||
.flex-colum {
|
||||
width: 100%;
|
||||
margin-top: 156rpx;
|
||||
|
||||
.Box_bottom {
|
||||
width: 558rpx;
|
||||
height: 72rpx;
|
||||
background:var(--bg-color-button);
|
||||
border-radius: 50rpx;
|
||||
font-size: 36rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #ffffff;
|
||||
line-height: 72rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
809
pages/order/confirm.vue
Normal file
809
pages/order/confirm.vue
Normal file
@@ -0,0 +1,809 @@
|
||||
<template>
|
||||
<view class="content" :style="[theme]">
|
||||
<view class="onecontent">
|
||||
<view class="onecontentone flex-start">
|
||||
<view class="onecontent_one">
|
||||
预约项目
|
||||
</view>
|
||||
<view class="onecontent_tow">
|
||||
{{elist.title}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontenttow flex-start">
|
||||
<view class="onecontenttow_one">
|
||||
预约时间
|
||||
</view>
|
||||
<view class="onecontenttow_tow">
|
||||
{{elist.time}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontenttow flex-start" style="padding-bottom: 24rpx; border-bottom: 1px solid #F7F7F7;">
|
||||
<view class="onecontenttow_one">
|
||||
发型师
|
||||
</view>
|
||||
<view class="onecontenttow_tow">
|
||||
{{elist.people.nickname != ''?elist.people.nickname:'无'}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="towcontent" v-if="datalist.sec.is_store_vip ==1">
|
||||
<view class="towcontentone">
|
||||
商家会员卡
|
||||
</view>
|
||||
<view class="towcontenttow">
|
||||
享更多优惠
|
||||
</view>
|
||||
<view class="towcontentthere flex-between" @click="clickselects()">
|
||||
<view class="towcontentthere_one" v-if="datalist.sec.text_title">
|
||||
<text>{{datalist.sec.text_title}}</text>
|
||||
</view>
|
||||
<view class="towcontentthere_one" v-else>
|
||||
开通后享<text>更多优惠</text>
|
||||
</view>
|
||||
<view class="towcontentthere_tow flex-start">
|
||||
<text class="towcontentthere_towtext">{{datalist.sec.text}}</text>
|
||||
<u-icon v-if="is_sec == 1" name="checkmark-circle" color="#2979ff" size="16"></u-icon>
|
||||
<view v-else class="towcontentthere_towview"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontent" v-if="datalist.sec.is_user_vip ==1 && user_y_frequshow">
|
||||
<view class="towcontentone">
|
||||
商家会员卡
|
||||
</view>
|
||||
<view class="towcontenttow">
|
||||
享更多优惠
|
||||
</view>
|
||||
<view class="towcontentthere flex-between" @click="clickselectss()">
|
||||
<view class="towcontentthere_one" v-if="datalist.sec.text_title">
|
||||
<text>{{datalist.sec.text_title}}</text>
|
||||
</view>
|
||||
<view class="towcontentthere_one" v-else>
|
||||
开通后享<text>更多优惠</text>
|
||||
</view>
|
||||
<view class="towcontentthere_tow flex-start">
|
||||
<text v-if="pay_type != 3"
|
||||
class="towcontentthere_towtext">{{datalist.sec.user_y_frequ}}/{{datalist.sec.user_z_frequ}}次</text>
|
||||
<text v-if="pay_type == 3"
|
||||
class="towcontentthere_towtext">{{Number(datalist.sec.user_y_frequ) - Number(elist.number)}}/{{datalist.sec.user_z_frequ}}次</text>
|
||||
<u-icon v-if="pay_type == 3" name="checkmark-circle" color="#2979ff" size="16"></u-icon>
|
||||
<view v-else class="towcontentthere_towview"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="therecontent">
|
||||
<view class="therecontenttow flex-between">
|
||||
<view class="therecontenttow_one">
|
||||
预约人数
|
||||
</view>
|
||||
<view class="therecontenttow_tow">
|
||||
{{elist.number}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="therecontenttow flex-between" v-if="datalist.sec.is_user_vip ==1 && pay_type == 3">
|
||||
<view class="therecontenttow_one">
|
||||
会员折扣
|
||||
</view>
|
||||
<view class="therecontenttow_tow">
|
||||
-{{datalist.sec.pre_price || '0'}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="therecontenttow flex-between" v-else>
|
||||
<view class="therecontenttow_one">
|
||||
会员折扣
|
||||
</view>
|
||||
<view class="therecontenttow_tow">
|
||||
¥{{datalist.balance.pre_price || '0'}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="therecontenttow flex-between">
|
||||
<view class="therecontenttow_one">
|
||||
原价
|
||||
</view>
|
||||
<view class="therecontenttow_tow">
|
||||
¥{{datalist.total_price}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="therecontenttow flex-between">
|
||||
<view class="therecontenttow_one">
|
||||
优惠券
|
||||
</view>
|
||||
<view class="therecontenttow_tow">
|
||||
暂无可用
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="therecontenttow flex-between">
|
||||
<view class="therecontenttow_one">
|
||||
合计
|
||||
</view>
|
||||
<view class="therecontenttow_tow" style="color:#FC5F69;"
|
||||
v-if="datalist.sec.is_user_vip ==1 && pay_type == 3">
|
||||
¥{{datalist.sec.price}}
|
||||
</view>
|
||||
<view class="therecontenttow_tow" style="color:#FC5F69;" v-else>
|
||||
¥{{datalist.total_price}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fivecontent">
|
||||
<view class="fivecontentitem flex-between">
|
||||
<view class="fivecontentitem_one">
|
||||
手机号码
|
||||
</view>
|
||||
<view class="fivecontentitem_tow">
|
||||
{{mobile}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="fivecontentitem flex-between">
|
||||
<view class="fivecontentitem_one">
|
||||
姓名
|
||||
</view>
|
||||
<view class="fivecontentitem_tow">
|
||||
张雪
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="sixcontent" v-if="pay_type != 3">
|
||||
<view class="sixcontentone flex-between">
|
||||
<view class="sixcontent_one">
|
||||
支付方式
|
||||
</view>
|
||||
</view>
|
||||
<view class="sixcontenttow">
|
||||
<view class="sixcontenttowitem flex-between" @click="clickselect(1)">
|
||||
<view class="sixcontenttowitemone flex-start">
|
||||
<image src="https://ointmentweapp.oss-cn-beijing.aliyuncs.com/image/wx.png" mode="aspectFill"></image>
|
||||
<text class="sixcontenttowitemonetext">微信支付</text>
|
||||
</view>
|
||||
<view class="flex-start">
|
||||
<u-icon v-if="pay_type == 1" name="checkmark-circle-fill" color="#333333" size="18"></u-icon>
|
||||
<u-icon v-else name="checkmark-circle-fill" color="#999999" size="18"></u-icon>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="sixcontenttowitem flex-between" @click="clickselect(2)"
|
||||
v-if="datalist.is_balance == 1 || datalist.balance_money<0 || datalist.balance_money != '0.00'">
|
||||
<view class="sixcontenttowitemone flex-start">
|
||||
|
||||
<image src="https://ointmentweapp.oss-cn-beijing.aliyuncs.com/image/ye.png" mode="aspectFill"></image>
|
||||
<text class="sixcontenttowitemonetext">余额支付</text>
|
||||
</view>
|
||||
<view class="flex-start">
|
||||
<u-icon v-if="pay_type == 2" name="checkmark-circle-fill" color="#333333" size="18"></u-icon>
|
||||
<u-icon v-else name="checkmark-circle-fill" color="#999999" size="18"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fourcontent">
|
||||
<view class="fourcontentone flex-start">
|
||||
<view class="fourcontent_one">
|
||||
预约须知:
|
||||
</view>
|
||||
</view>
|
||||
<view class="fourcontenttow flex-colum-start">
|
||||
<view class="" v-html="datalist.details">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view :style="{height:height}">
|
||||
|
||||
</view>
|
||||
<view class="fixedview flex-between">
|
||||
<view class="fixedview_one flex-start" v-if="datalist.sec.is_user_vip ==1 && pay_type == 3">
|
||||
<view class="fixedview_oneone">
|
||||
应付金额:
|
||||
</view>
|
||||
<view class="fixedview_onetow">
|
||||
<text>¥</text>{{datalist.sec.price}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view v-else> -->
|
||||
<view class="fixedview_one flex-start" v-if="pay_type == 1 && is_sec ==0">
|
||||
<view class="fixedview_oneone">
|
||||
应付金额:
|
||||
</view>
|
||||
<view class="fixedview_onetow">
|
||||
<text>¥</text>¥{{datalist.wechat.wechat_money.money_str}}
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="fixedview_one flex-start" v-if="pay_type == 2 && is_sec ==0">
|
||||
<view class="fixedview_oneone">
|
||||
应付金额:
|
||||
</view>
|
||||
<view class="fixedview_onetow flex-colum-start">
|
||||
<text>¥合计{{Number(datalist.balance.balance_money.money_str)+Number(datalist.balance.wechat_money)}}</text>
|
||||
<text style="font-size: 20rpx;">余额:{{datalist.balance.balance_money.money_str}}
|
||||
微信:{{datalist.balance.wechat_money}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fixedview_one flex-start" v-if="is_sec == 1">
|
||||
<view class="fixedview_oneone">
|
||||
应付金额:
|
||||
</view>
|
||||
<view class="fixedview_onetow">
|
||||
<text>¥</text>{{datalist.sec.price}}
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<!-- </view> -->
|
||||
<view class="fixedview_tow" @tap="$u.debounce(showpopupclick,1000)">
|
||||
立即付款
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<u-popup :show="showpopup" @close="closepopup" @open="openpopup" mode="center" :round="10">
|
||||
<view class="u-popupflex-colum flex-colum">
|
||||
<view class="u-popupflex-columview">
|
||||
请输入支付密码
|
||||
</view>
|
||||
<u-code-input v-model="ucodeinputvalue" :maxlength="6" dot
|
||||
@finish="finish"></u-code-input>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showpopup: false,
|
||||
user_y_frequshow: true,
|
||||
ucodeinputvalue: '',
|
||||
textareavalue: '',
|
||||
height: '',
|
||||
upperlist: {},
|
||||
order_id: '',
|
||||
is_sec: 0,
|
||||
elist: {
|
||||
people: {
|
||||
nickname: '',
|
||||
id: ''
|
||||
}
|
||||
},
|
||||
mobile: uni.cache.get('loginuser').userinfo.mobile,
|
||||
datalist: {
|
||||
sec: {
|
||||
is_store_vip: '',
|
||||
is_user_vip: '',
|
||||
user_y_frequ: '',
|
||||
user_z_frequ: ''
|
||||
},
|
||||
balance: {
|
||||
pre_price: ''
|
||||
},
|
||||
wechat: {
|
||||
wechat_money: {
|
||||
money_str: ""
|
||||
}
|
||||
},
|
||||
balance: {
|
||||
balance_money: {
|
||||
money_str: ""
|
||||
}
|
||||
}
|
||||
},
|
||||
pay_type: 1
|
||||
}
|
||||
},
|
||||
async onLoad(e) {
|
||||
// this.elist = JSON.parse(optionItem)
|
||||
this.order_id = e.order_id
|
||||
let res = await this.api.reservationorderecho({
|
||||
order_id: e.order_id
|
||||
})
|
||||
if (res) {
|
||||
this.elist = res
|
||||
if (!this.elist.people) {
|
||||
this.elist.people = {
|
||||
nickname: '',
|
||||
id: ''
|
||||
}
|
||||
}
|
||||
if (Number(this.datalist.sec.user_y_frequ) + Number(this.elist.number) > this.datalist.sec
|
||||
.user_z_frequ) {
|
||||
this.user_y_frequshow == false
|
||||
} else {
|
||||
this.user_y_frequshow == true
|
||||
}
|
||||
this.okmakenowreservation()
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
openpopup() {
|
||||
console.log('open');
|
||||
},
|
||||
closepopup() {
|
||||
this.showpopup = false
|
||||
},
|
||||
|
||||
finish(e) {
|
||||
console.log(e)
|
||||
this.reservationmakenowsub()
|
||||
},
|
||||
showpopupclick() {
|
||||
if (this.pay_type == 1) {
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
this.reservationmakenowsub()
|
||||
return false;
|
||||
} else {
|
||||
if (this.pay_type == 2 || this.datalist.sec.is_user_vip == 1) {
|
||||
if (this.datalist.is_vip_password == 0) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您目前没有设置密码,请先设置支付密码',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/my/setup/repairpassword'
|
||||
});
|
||||
} else if (res.cancel) {}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.showpopup = true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async reservationmakenowsub() {
|
||||
var datareslane = await this.api.reservationmakenowsub({
|
||||
service_id: this.elist.store_service_id,
|
||||
number: this.elist.number,
|
||||
mobile: this.elist.mobile,
|
||||
remark: this.elist.remark,
|
||||
pay_type: this.pay_type,
|
||||
time: this.elist.time,
|
||||
people_id: this.elist.people.id != '' ? this.elist.people.id : 0,
|
||||
order_id: this.order_id,
|
||||
is_sec: this.is_sec
|
||||
})
|
||||
console.log(datareslane)
|
||||
if (datareslane.data) {
|
||||
let res = await this.api.paygetpayparams({
|
||||
order_id: datareslane.data.order_id,
|
||||
password: this.ucodeinputvalue
|
||||
}) //判断是否支付成功
|
||||
this.ucodeinputvalue = ''
|
||||
if (res.data.pay_status == 0) {
|
||||
this.showpopup = false
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay', //支付类型-固定值
|
||||
partnerid: res.data.pay_data.payAppId, // 微信支付商户号
|
||||
timeStamp: res.data.pay_data.payTimeStamp, // 时间戳(单位:秒)
|
||||
nonceStr: res.data.pay_data.paynonceStr, // 随机字符串
|
||||
package: res.data.pay_data.payPackage, // 固定值
|
||||
signType: res.data.pay_data.paySignType, //固定值
|
||||
paySign: res.data.pay_data.paySign, //签名
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
title: "支付成功"
|
||||
})
|
||||
uni.redirectTo({
|
||||
url: "/pages/order/ordersuccess?id=" + datareslane.data
|
||||
.order_id,
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
setTimeout(res => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '支付失败'
|
||||
})
|
||||
uni.hideLoading()
|
||||
}, 2000)
|
||||
uni.redirectTo({
|
||||
url: "/pages/my/order/index?e=" + 1,
|
||||
});
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: "/pages/order/ordersuccess?id=" + datareslane.data.order_id,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.message || res.msg,
|
||||
icon: "none",
|
||||
success() {
|
||||
setTimeout(res => {
|
||||
// if (options.toast) {
|
||||
uni.hideLoading()
|
||||
// }
|
||||
}, 2000)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
clickselects() {
|
||||
this.is_sec = this.is_sec == 1 ? 0 : 1
|
||||
console.log(this.is_sec)
|
||||
this.okmakenowreservation()
|
||||
},
|
||||
clickselectss() {
|
||||
this.pay_type = this.pay_type == 3 ? 1 : 3
|
||||
},
|
||||
clickselect(b) {
|
||||
this.pay_type = b
|
||||
this.okmakenowreservation()
|
||||
},
|
||||
async okmakenowreservation() {
|
||||
let res = await this.api.okmakenowreservation({
|
||||
service_id: this.elist.store_service_id,
|
||||
number: this.elist.number,
|
||||
order_id: this.order_id
|
||||
})
|
||||
if (res) {
|
||||
this.datalist = res.vip
|
||||
this.datalist.details = res.vip.details.replace(/\<img/g,
|
||||
'<img style="max-width:100%;height:auto" ');
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
//#ifdef MP-WEIXIN || H5
|
||||
var query = uni.createSelectorQuery().in(this).select('.fixedview')
|
||||
query.boundingClientRect(ele => {
|
||||
var that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.height = (ele.height) + "px";
|
||||
that = null;
|
||||
}
|
||||
})
|
||||
}).exec();
|
||||
//#endif
|
||||
//#ifdef MP-ALIPAY
|
||||
my.createSelectorQuery().selectAll('.fixedview').boundingClientRect().exec(ele => {
|
||||
var nodeData = ele[0]
|
||||
var that = this;
|
||||
that.height = (nodeData.height) + "px";
|
||||
that = null;
|
||||
})
|
||||
//#endif
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.onecontent {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.onecontentone {
|
||||
padding-bottom: 28rpx;
|
||||
border-bottom: 1px solid #F7F7F7;
|
||||
|
||||
.onecontent_one {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.onecontent_tow {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-left: 32rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.onecontenttow {
|
||||
margin-top: 24rpx;
|
||||
|
||||
.onecontenttow_one {
|
||||
font-size: 28rpx;
|
||||
font-weight: bold;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.onecontenttow_tow {
|
||||
margin-left: 32rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.towcontent {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx;
|
||||
margin-top: 32rpx;
|
||||
|
||||
.towcontentone {
|
||||
padding: 8rpx 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 150rpx;
|
||||
text-align: center;
|
||||
background: #333333;
|
||||
border-radius: 18rpx 0 0 0;
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #BFAB8D;
|
||||
}
|
||||
|
||||
.towcontenttow {
|
||||
padding: 8rpx 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 136rpx;
|
||||
width: 142rpx;
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #432805;
|
||||
border-radius: 18rpx 0px 18rpx 0px;
|
||||
background: #E7C898;
|
||||
}
|
||||
|
||||
.towcontentthere {
|
||||
padding: 80rpx 32rpx 32rpx 32rpx;
|
||||
|
||||
.towcontentthere_tow {
|
||||
.towcontentthere_towtext {
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.towcontentthere_towview {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
border-radius: 50%;
|
||||
border: 1px solid #000;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentthere_one {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FC5F69;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.fivecontent {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-top: 32rpx;
|
||||
|
||||
.fivecontentitem:nth-child(2) {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.fivecontentitem {
|
||||
padding: 18rpx 0;
|
||||
border-bottom: 1px solid #F7F7F7;
|
||||
|
||||
.fivecontentitem_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.fivecontentitem_tow {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.therecontent {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-top: 32rpx;
|
||||
|
||||
.therecontenttow:nth-child(1) {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.therecontenttow {
|
||||
margin-top: 32rpx;
|
||||
|
||||
.therecontenttow_one {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.therecontenttow_tow {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sixcontent {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 32rpx;
|
||||
margin-top: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.sixcontentone {
|
||||
padding-bottom: 28rpx;
|
||||
border-bottom: 1px solid #F7F7F7;
|
||||
|
||||
.sixcontent_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.sixcontenttow {
|
||||
.sixcontenttowitem {
|
||||
margin-top: 16rpx;
|
||||
|
||||
.sixcontenttowitemone {
|
||||
image {
|
||||
margin-left: 24rpx;
|
||||
width: 31.37rpx;
|
||||
height: 27.34rpx;
|
||||
}
|
||||
|
||||
.sixcontenttowitemonetext {
|
||||
margin-left: 14rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fourcontent {
|
||||
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 32rpx;
|
||||
margin-top: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.fourcontentone {
|
||||
padding-bottom: 28rpx;
|
||||
border-bottom: 1px solid #F7F7F7;
|
||||
|
||||
.fourcontent_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.fourcontenttow {
|
||||
margin-top: 16rpx;
|
||||
width: 100%;
|
||||
|
||||
/deep/ img {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.u-popupflex-colum {
|
||||
padding: 80rpx 40rpx;
|
||||
border-radius: 50rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.u-popupflex-columview {
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.fixedview {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 24rpx 28rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.fixedview_one {
|
||||
.fixedview_oneone {
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.fixedview_onetow {
|
||||
font-size: 44rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #F45C4C;
|
||||
font-weight: bold;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fixedview_tow {
|
||||
background: var(--bg-color-button);
|
||||
border-radius: 34rpx;
|
||||
padding: 10rpx 44rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
991
pages/order/confirmhotel.vue
Normal file
991
pages/order/confirmhotel.vue
Normal file
@@ -0,0 +1,991 @@
|
||||
<template>
|
||||
<view class="content" :style="[theme]">
|
||||
<view class="onecontent">
|
||||
<view class="onecontentone flex-start">
|
||||
<view class="onecontent_one">
|
||||
<view class="onecontenttowthere flex-start">
|
||||
<view class="positionfixedbox flex-between">
|
||||
<view class="positionfixedbox_one flex-between">
|
||||
<view class="positionfixedbox_onebox flex-start">
|
||||
<text>{{lists.start}}</text>
|
||||
<text>周{{lists.weekstart}}</text>
|
||||
</view>
|
||||
<view class="positionfixedbox_onebox_box">
|
||||
{{lists.long}}晚
|
||||
</view>
|
||||
<view class="positionfixedbox_onebox flex-start" style="margin-right: 28rpx;">
|
||||
<text>{{lists.end}}</text>
|
||||
<text>周{{lists.weekend}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="onecontenttow">
|
||||
{{elist.title}}
|
||||
</view>
|
||||
<view class="towindex_box_bouttn">
|
||||
<text style="margin-left: 10rpx;" v-for="(item,index) in elist.label" :key="index">{{item.name}}</text>
|
||||
</view>
|
||||
<view class="towcontentitemtow_one_there flex-start">
|
||||
<u-icon name="checkmark-circle" color="#76903C" size="14"></u-icon>
|
||||
<text class="towcontentitemtow_one_theretext">{{elist.cancel_time}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fivecontent">
|
||||
<view class="fivecontentitem flex-between" @click="popupshow = true">
|
||||
<view class="fivecontentitem_one">
|
||||
房间数量
|
||||
</view>
|
||||
<view class="fivecontentitem_tow flex-between">
|
||||
<view class="">
|
||||
{{among}}间(每间最多住{{elist.capacity_people}}人)
|
||||
</view>
|
||||
<u-icon name="arrow-right" color="#9b9b9b" size="14"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fivecontentitem flex-between" v-for="(item,index1) in fullname" :key="index1">
|
||||
<view class="fivecontentitem_one">
|
||||
姓名
|
||||
</view>
|
||||
<view class="fivecontentitem_tow">
|
||||
<input type="text" v-model="item.name" placeholder="每间填1位住客姓名" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="fivecontentitem flex-between">
|
||||
<view class="fivecontentitem_one">
|
||||
手机号码
|
||||
</view>
|
||||
<view class="fivecontentitem_tow">
|
||||
<input type="number" v-model="mobile" placeholder="请输入手机号码" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="fivecontentitem flex-between">
|
||||
<view class="fivecontentitem_one">
|
||||
预计到店
|
||||
</view>
|
||||
<view class="fivecontentitem_tow">
|
||||
<input type="number" v-model="checkin_time" placeholder="房间将整晚保留" />
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="therecontent">
|
||||
<view class="therecontenttow flex-between">
|
||||
<view class="therecontenttow_one">
|
||||
会员折扣
|
||||
</view>
|
||||
<view class="therecontenttow_tow">
|
||||
-{{allamounts.price.pre_price || '0'}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="therecontenttow flex-between">
|
||||
<view class="therecontenttow_one">
|
||||
原价
|
||||
</view>
|
||||
<view class="therecontenttow_tow">
|
||||
¥{{allamounts.price.meet_price}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="therecontenttow flex-between">
|
||||
<view class="therecontenttow_one">
|
||||
优惠券
|
||||
</view>
|
||||
<view class="therecontenttow_tow">
|
||||
暂无可用
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="therecontenttow flex-between">
|
||||
<view class="therecontenttow_one">
|
||||
合计
|
||||
</view>
|
||||
<view class="therecontenttow_tow" style="color:#FC5F69;">
|
||||
¥{{allamounts.price.meet_price}}
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="sixcontent" v-if="pay_type != 3">
|
||||
<view class="sixcontentone flex-between">
|
||||
<view class="sixcontent_one">
|
||||
支付方式
|
||||
</view>
|
||||
</view>
|
||||
<view class="sixcontenttow">
|
||||
<view class="sixcontenttowitem flex-between" @click="clickselect(1)">
|
||||
<view class="sixcontenttowitemone flex-start">
|
||||
<image src="https://ointmentweapp.oss-cn-beijing.aliyuncs.com/image/wx.png" mode="aspectFill">
|
||||
</image>
|
||||
<text class="sixcontenttowitemonetext">微信支付</text>
|
||||
</view>
|
||||
<view class="flex-start">
|
||||
<u-icon v-if="pay_type == 1" name="checkmark-circle-fill" color="#333333" size="18"></u-icon>
|
||||
<u-icon v-else name="checkmark-circle-fill" color="#999999" size="18"></u-icon>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="sixcontenttowitem flex-between" @click="clickselect(2)"
|
||||
v-if="allamounts.balance.money != '0.00'">
|
||||
<view class="sixcontenttowitemone flex-start">
|
||||
|
||||
<image src="https://ointmentweapp.oss-cn-beijing.aliyuncs.com/image/ye.png" mode="aspectFill">
|
||||
</image>
|
||||
<text class="sixcontenttowitemonetext">余额支付</text>
|
||||
</view>
|
||||
<view class="flex-start">
|
||||
<u-icon v-if="pay_type == 2" name="checkmark-circle-fill" color="#333333" size="18"></u-icon>
|
||||
<u-icon v-else name="checkmark-circle-fill" color="#999999" size="18"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="fourcontent">
|
||||
<view class="fourcontentone flex-start">
|
||||
<view class="fourcontent_one">
|
||||
购买须知:
|
||||
</view>
|
||||
</view>
|
||||
<view class="fourcontenttow flex-colum-start">
|
||||
<view class="" v-html="datalist.purchase">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view :style="{height:height}">
|
||||
|
||||
</view>
|
||||
<view class="fixedview flex-between">
|
||||
<view class="fixedview_one flex-start">
|
||||
<view class="fixedview_oneone">
|
||||
应付金额:
|
||||
</view>
|
||||
<view class="fixedview_onetow">
|
||||
<text>¥</text>{{allamounts.price.meet_price}}
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="mobiles" class="fixedview_tow" @tap="$u.debounce(showpopupclick,1000)">
|
||||
立即付款
|
||||
</view>
|
||||
<view v-else class="fixedview_tow">
|
||||
<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
|
||||
立即付款
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
<u-popup :show="showpopup" @close="closepopup" mode="center" :round="10">
|
||||
<view class="u-popupflex-colum flex-colum">
|
||||
<view class="u-popupflex-columview">
|
||||
请输入支付密码
|
||||
</view>
|
||||
<u-code-input v-model="ucodeinputvalue" :maxlength="6" dot @finish="finish"></u-code-input>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-popup :show="popupshow" @close="popupclose" :round="10">
|
||||
<view class="classpopupshow flex-colum">
|
||||
<view class="classpopupshowbox flex-between">
|
||||
<view class="flex-colum-start">
|
||||
<text class="classpopupshowboxflex-colum_one">房间数量</text>
|
||||
</view>
|
||||
<view class="classpopupshowboxnumber">
|
||||
<u-number-box v-model="among" :min="0" :max="10">
|
||||
<view slot="minus" class="minus">
|
||||
<u-icon name="minus" size="12"></u-icon>
|
||||
</view>
|
||||
<text slot="input" style="width: 50px;text-align: center;" class="input">{{among}}</text>
|
||||
<view slot="plus" class="plus">
|
||||
<u-icon name="plus" color="#FFFFFF" size="12"></u-icon>
|
||||
</view>
|
||||
</u-number-box>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
mobiles: uni.cache.get('loginuser').userinfo.mobile,
|
||||
checkin_time: '14:00',
|
||||
adult: 1, //可住成人
|
||||
children: 0, //可住儿童
|
||||
bed: 1, //床位
|
||||
among: 1, //间数
|
||||
showpopup: false,
|
||||
popupshow: false, //选择人数
|
||||
user_y_frequshow: true,
|
||||
ucodeinputvalue: '',
|
||||
textareavalue: '',
|
||||
height: '',
|
||||
upperlist: {},
|
||||
hotel_id: '',
|
||||
is_sec: 0,
|
||||
fullname: [{
|
||||
name: ""
|
||||
}],
|
||||
elist: {
|
||||
people: {
|
||||
nickname: '',
|
||||
id: ''
|
||||
}
|
||||
},
|
||||
lists: {
|
||||
long: '', //多少天
|
||||
start: '',
|
||||
end: '',
|
||||
weekstart: '',
|
||||
weekend: '',
|
||||
},
|
||||
mobile: uni.cache.get('loginuser').userinfo.mobile,
|
||||
datalist: {
|
||||
sec: {
|
||||
is_store_vip: '',
|
||||
is_user_vip: '',
|
||||
user_y_frequ: '',
|
||||
user_z_frequ: ''
|
||||
},
|
||||
balance: {
|
||||
pre_price: ''
|
||||
},
|
||||
wechat: {
|
||||
wechat_money: {
|
||||
money_str: ""
|
||||
}
|
||||
},
|
||||
balance: {
|
||||
balance_money: {
|
||||
money_str: ""
|
||||
}
|
||||
}
|
||||
},
|
||||
pay_type: 1,
|
||||
allamounts: {
|
||||
price: {},
|
||||
balance: {}
|
||||
},
|
||||
}
|
||||
},
|
||||
async onLoad(e) {
|
||||
this.hotel_id = e.hotel_id
|
||||
this.lists.start = e.start_time
|
||||
this.lists.end = e.end_time
|
||||
this.lists.long = e.long
|
||||
this.lists.weekstart = this.getweekday(this.lists.start)
|
||||
this.lists.weekend = this.getweekday(this.lists.end)
|
||||
this.among = e.number //间数
|
||||
this.adult = e.adult, //可住成人
|
||||
this.children = e.children //可住儿童
|
||||
this.add()
|
||||
this.reservationhoteldetial()
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
async onShow() {
|
||||
this.$store.dispatch('storeuseruserinfo')
|
||||
},
|
||||
methods: {
|
||||
async getPhoneNumber(res) { // 获取手机号
|
||||
var resdataa = res
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.login({
|
||||
provider: 'weixin',
|
||||
success: async (data) => {
|
||||
let resdata = await this.api.usergetwechatphone({
|
||||
code: data.code,
|
||||
iv: resdataa.detail.iv,
|
||||
encryptedData: resdataa.detail.encryptedData
|
||||
})
|
||||
try {
|
||||
this.mobiles = resdata.mobile
|
||||
} catch (e) {
|
||||
uni.showToast({
|
||||
title: '获取失败'
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
},
|
||||
add() {
|
||||
this.fullname = []
|
||||
for (let i = 0; i < this.among; i++) {
|
||||
this.fullname.push({
|
||||
"name": '',
|
||||
})
|
||||
}
|
||||
},
|
||||
async reservationhotelconfirm(e) { //获取他的价格
|
||||
let res = await this.api.reservationhotelconfirm({
|
||||
hotel_id: this.hotel_id,
|
||||
number: this.among,
|
||||
start_time: this.lists.start, //开始时间
|
||||
end_time: this.lists.end, //结束时间
|
||||
})
|
||||
this.allamounts = res
|
||||
},
|
||||
getweekday(date) {
|
||||
var weekArray = new Array("日", "一", "二", "三", "四", "五", "六");
|
||||
var week = weekArray[new Date(date).getDay()]; //注意此处必须是先new一个Date
|
||||
return week;
|
||||
},
|
||||
closepopup() {
|
||||
this.showpopup = false
|
||||
},
|
||||
popupclose() {
|
||||
this.reservationhoteldetial()
|
||||
this.popupshow = false
|
||||
this.add()
|
||||
},
|
||||
finish(e) {
|
||||
console.log(e)
|
||||
this.reservationmakenowsub()
|
||||
},
|
||||
async reservationhoteldetial() {
|
||||
let res = await this.api.reservationhoteldetial({
|
||||
hotel_id: this.hotel_id,
|
||||
start_time: this.lists.start, //开始时间
|
||||
end_time: this.lists.end, //结束时间
|
||||
among: this.among //
|
||||
})
|
||||
try {
|
||||
if (res) {
|
||||
this.elist = res
|
||||
this.elist.house_details = res.house_details.replace(/\<img/g,
|
||||
'<img style="max-width:100%;height:auto" ');
|
||||
this.reservationhotelconfirm()
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
},
|
||||
showpopupclick() {
|
||||
if (this.pay_type == 1) {
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
this.fullname = this.fullname.map(user => user.name)
|
||||
this.reservationmakenowsub()
|
||||
return false;
|
||||
} else {
|
||||
if (this.pay_type == 2) {
|
||||
if (this.elist.sec_password == 0) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '您目前没有设置密码,请先设置支付密码',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
uni.redirectTo({
|
||||
url: '/pages/my/setup/repairpassword'
|
||||
});
|
||||
} else if (res.cancel) {}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.showpopup = true
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async reservationmakenowsub() {
|
||||
var datareslane = await this.api.reservationhotelsub({
|
||||
hotel_id: this.hotel_id,
|
||||
number: this.among, //房间数量
|
||||
checkin_number: this.adult + this.children, //入住人数
|
||||
checkin_username: this.fullname.toString(), //入住人姓名
|
||||
checkin_mobile: this.mobile, //入住人联系电话
|
||||
checkin_time: this.checkin_time, //入住人到店时间
|
||||
start_time: this.lists.start, //开始时间
|
||||
end_time: this.lists.end, //离店时间
|
||||
notes: '', //备注
|
||||
pay_type: this.pay_type, //1 微信 2余额卡
|
||||
})
|
||||
console.log(datareslane)
|
||||
this.fullname = [{
|
||||
name: ""
|
||||
}]
|
||||
if (datareslane.order_id) {
|
||||
let res = await this.api.reservationhotelgetpay({
|
||||
order_id: datareslane.order_id,
|
||||
password: this.ucodeinputvalue
|
||||
}) //判断是否支付成功
|
||||
this.ucodeinputvalue = ''
|
||||
if (res.pay_status == 0) {
|
||||
this.showpopup = false
|
||||
uni.showLoading({
|
||||
title: '加载中',
|
||||
mask: true
|
||||
})
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay', //支付类型-固定值
|
||||
partnerid: res.pay_data.payAppId, // 微信支付商户号
|
||||
timeStamp: res.pay_data.payTimeStamp, // 时间戳(单位:秒)
|
||||
nonceStr: res.pay_data.paynonceStr, // 随机字符串
|
||||
package: res.pay_data.payPackage, // 固定值
|
||||
signType: res.pay_data.paySignType, //固定值
|
||||
paySign: res.pay_data.paySign, //签名
|
||||
success: (res) => {
|
||||
uni.showToast({
|
||||
title: "支付成功"
|
||||
})
|
||||
uni.redirectTo({
|
||||
url: "/pages/order/ordersuccess?id=" + datareslane.order_id,
|
||||
});
|
||||
},
|
||||
fail: (err) => {
|
||||
setTimeout(res => {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '支付失败'
|
||||
})
|
||||
uni.hideLoading()
|
||||
}, 2000)
|
||||
uni.redirectTo({
|
||||
url: "/pages/my/order/index?e=" + 1,
|
||||
});
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
} else {
|
||||
uni.redirectTo({
|
||||
url: "/pages/order/ordersuccess?id=" + datareslane.order_id,
|
||||
});
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.message || res.msg,
|
||||
icon: "none",
|
||||
success() {
|
||||
setTimeout(res => {
|
||||
// if (options.toast) {
|
||||
uni.hideLoading()
|
||||
// }
|
||||
}, 2000)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
clickselect(b) {
|
||||
this.pay_type = b
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
//#ifdef MP-WEIXIN || H5
|
||||
var query = uni.createSelectorQuery().in(this).select('.fixedview')
|
||||
query.boundingClientRect(ele => {
|
||||
var that = this;
|
||||
uni.getSystemInfo({
|
||||
success(res) {
|
||||
that.height = (ele.height) + "px";
|
||||
that = null;
|
||||
}
|
||||
})
|
||||
}).exec();
|
||||
//#endif
|
||||
//#ifdef MP-ALIPAY
|
||||
my.createSelectorQuery().selectAll('.fixedview').boundingClientRect().exec(ele => {
|
||||
var nodeData = ele[0]
|
||||
var that = this;
|
||||
that.height = (nodeData.height) + "px";
|
||||
that = null;
|
||||
})
|
||||
//#endif
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 32rpx 28rpx;
|
||||
|
||||
.onecontent {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 16rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.onecontentone {
|
||||
.onecontent_one {
|
||||
.onecontenttowthere {
|
||||
.positionfixedbox {
|
||||
width: 100%;
|
||||
background: #ffffff;
|
||||
border-radius: 22rpx;
|
||||
|
||||
.positionfixedbox_one {
|
||||
flex: auto;
|
||||
|
||||
.positionfixedbox_onebox_box::before {
|
||||
position: absolute;
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 10rpx;
|
||||
left: -10rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
height: 1rpx;
|
||||
background: #76903C;
|
||||
}
|
||||
|
||||
.positionfixedbox_onebox_box::after {
|
||||
position: absolute;
|
||||
right: -10rpx;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 10rpx;
|
||||
height: 1rpx;
|
||||
background: #76903C;
|
||||
}
|
||||
|
||||
.positionfixedbox_onebox_box {
|
||||
margin: 0 40rpx;
|
||||
position: relative;
|
||||
width: 50rpx;
|
||||
height: 40rpx;
|
||||
background: #F6FAF2;
|
||||
border-radius: 14rpx;
|
||||
border: 2rpx solid #76903C;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #76903C;
|
||||
text-align: center;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.positionfixedbox_onebox {
|
||||
text:nth-child(1) {
|
||||
font-size: 28rpx;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
text:nth-child(2) {
|
||||
margin-left: 10rpx;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.positionfixedbox_tow::before {
|
||||
content: '';
|
||||
margin-right: 26rpx;
|
||||
display: inline-block;
|
||||
width: 0rpx;
|
||||
height: 40rpx;
|
||||
opacity: 1;
|
||||
border: 2rpx solid #707070;
|
||||
}
|
||||
|
||||
.positionfixedbox_tow {
|
||||
height: 48rpx;
|
||||
line-height: 48rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.onecontenttow {
|
||||
width: 100%;
|
||||
margin-top: 16rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.towindex_box_bouttn {
|
||||
width: 100%;
|
||||
margin-top: 16rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.towcontentitemtow_one_there {
|
||||
width: 100%;
|
||||
margin-top: 16rpx;
|
||||
|
||||
.towcontentitemtow_one_theretext {
|
||||
margin-left: 18rpx;
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #76903C;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.towcontent {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx;
|
||||
margin-top: 32rpx;
|
||||
|
||||
.towcontentone {
|
||||
padding: 8rpx 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 150rpx;
|
||||
text-align: center;
|
||||
background: #333333;
|
||||
border-radius: 18rpx 0 0 0;
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #BFAB8D;
|
||||
}
|
||||
|
||||
.towcontenttow {
|
||||
padding: 8rpx 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 136rpx;
|
||||
width: 142rpx;
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #432805;
|
||||
border-radius: 18rpx 0px 18rpx 0px;
|
||||
background: #E7C898;
|
||||
}
|
||||
|
||||
.towcontentthere {
|
||||
padding: 80rpx 32rpx 32rpx 32rpx;
|
||||
|
||||
.towcontentthere_tow {
|
||||
.towcontentthere_towtext {
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.towcontentthere_towview {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
border-radius: 50%;
|
||||
border: 1px solid #000;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentthere_one {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FC5F69;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.fivecontent {
|
||||
width: 100%;
|
||||
border-radius: 12rpx;
|
||||
margin-top: 32rpx;
|
||||
|
||||
.fivecontentitem:nth-child(2) {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
.fivecontentitem {
|
||||
background: #FFFFFF;
|
||||
padding: 16rpx;
|
||||
border-bottom: 1px solid #F7F7F7;
|
||||
|
||||
.fivecontentitem_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.fivecontentitem_tow {
|
||||
width: 70%;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.therecontent {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-top: 32rpx;
|
||||
|
||||
.therecontenttow:nth-child(1) {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.therecontenttow {
|
||||
margin-top: 32rpx;
|
||||
|
||||
.therecontenttow_one {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.therecontenttow_tow {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sixcontent {
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 32rpx;
|
||||
margin-top: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.sixcontentone {
|
||||
padding-bottom: 28rpx;
|
||||
border-bottom: 1px solid #F7F7F7;
|
||||
|
||||
.sixcontent_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.sixcontenttow {
|
||||
.sixcontenttowitem {
|
||||
margin-top: 16rpx;
|
||||
|
||||
.sixcontenttowitemone {
|
||||
image {
|
||||
margin-left: 24rpx;
|
||||
width: 31.37rpx;
|
||||
height: 27.34rpx;
|
||||
}
|
||||
|
||||
.sixcontenttowitemonetext {
|
||||
margin-left: 14rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fourcontent {
|
||||
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
padding: 32rpx;
|
||||
margin-top: 32rpx;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.fourcontentone {
|
||||
padding-bottom: 28rpx;
|
||||
border-bottom: 1px solid #F7F7F7;
|
||||
|
||||
.fourcontent_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.fourcontenttow {
|
||||
margin-top: 16rpx;
|
||||
width: 100%;
|
||||
|
||||
/deep/ img {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.u-popupflex-colum {
|
||||
padding: 80rpx 40rpx;
|
||||
border-radius: 50rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.u-popupflex-columview {
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.classpopupshow {
|
||||
padding-bottom: 60rpx;
|
||||
|
||||
.classpopupshowbox {
|
||||
width: 100%;
|
||||
padding: 16rpx 60rpx;
|
||||
border-bottom: 2rpx solid #F0F0F0;
|
||||
|
||||
.flex-colum-start {
|
||||
.classpopupshowboxflex-colum_one {
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.classpopupshowboxflex-colum_tow {
|
||||
font-size: 24rpx;
|
||||
font-family: Source Han Sans CN, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.classpopupshowboxnumber {
|
||||
.minus {
|
||||
padding: 20rpx;
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
border-width: 1px;
|
||||
border-color: #CDCDCD;
|
||||
border-style: solid;
|
||||
border-top-left-radius: 100px;
|
||||
border-top-right-radius: 100px;
|
||||
border-bottom-left-radius: 100px;
|
||||
border-bottom-right-radius: 100px;
|
||||
@include flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.input {
|
||||
padding: 0 10rpx;
|
||||
}
|
||||
|
||||
.plus {
|
||||
padding: 20rpx;
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
background-color: #555656;
|
||||
border-radius: 50%;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.fixedview {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 24rpx 28rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.fixedview_one {
|
||||
.fixedview_oneone {
|
||||
font-size: 28rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.fixedview_onetow {
|
||||
font-size: 44rpx;
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #F45C4C;
|
||||
font-weight: bold;
|
||||
|
||||
text {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fixedview_tow {
|
||||
background: var(--bg-color-button);
|
||||
border-radius: 34rpx;
|
||||
padding: 10rpx 44rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
|
||||
button::after {
|
||||
border-radius: 34rpx;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
button {
|
||||
background-color: var(--bg-color-button) !important;
|
||||
padding: 0 !important;
|
||||
line-height: inherit !important;
|
||||
margin: 0 !important;
|
||||
width: auto !important;
|
||||
font-weight: 500 !important;
|
||||
border-radius: none !important;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
441
pages/order/index.vue
Normal file
441
pages/order/index.vue
Normal file
@@ -0,0 +1,441 @@
|
||||
<template>
|
||||
<view class="content" style="padding-bottom: 10rpx;" :style="[theme]">
|
||||
<view class="onecontent">
|
||||
<view class="onecontent_oen flex-start">
|
||||
<input class="onecontent_oen_input" v-model="like" type="text" placeholder="请输入服务名">
|
||||
<text class="onecontent_oen_text" @click="init_fn">搜索</text>
|
||||
</view>
|
||||
<view class="onecontent_tow">
|
||||
<view ref="uTabs" class="onecontent_tow_item flex-colum" v-for="(item,index) in swipercurrentdata"
|
||||
:key="item.id" @click="orderswitch(item.id)">
|
||||
<view :class="swiperCurrent == item.id?'onecontent_tow_itemtexts':'onecontent_tow_itemtext'">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="towcontent">
|
||||
<view class="towcontentitem" v-if="list.length>0" v-for="(item,index1) in list" :key="index1"
|
||||
@click="eeInfo(item)">
|
||||
|
||||
<view class="towcontentitemtow flex-start">
|
||||
<image class="towcontentitemtow_imge" :src="item.img" mode="aspectFill"></image>
|
||||
<view class="towcontentitemtow_one flex-colum-start">
|
||||
<text class="towcontentitemtow_one_one">{{item.title}}</text>
|
||||
<text class="towcontentitemtow_one_tow"><text
|
||||
style="font-size:28rpx;">¥{{item.price}}</text></text>
|
||||
</view>
|
||||
<view class="towcontentitemtow_tow">
|
||||
预约
|
||||
</view>
|
||||
</view>
|
||||
<u-overlay :show="overlayshow" @click="overlayshow = false">
|
||||
<view class="warp">
|
||||
<view class="rect flex-colum" @tap.stop>
|
||||
<view class="rectone">
|
||||
确定删除订单吗?
|
||||
</view>
|
||||
<view class="recttow flex-between">
|
||||
<view class="recttow_one" @click="cancelOrder(item)">
|
||||
确定
|
||||
</view>
|
||||
<view class="recttow_tow" @click="overlayshow = false">
|
||||
取消
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</u-overlay>
|
||||
</view>
|
||||
<view v-if="list.length==0 && is_end == true" class="flex-colum">
|
||||
<image :src="bgnothave" mode="widthFix" style="margin-top: 100rpx;">
|
||||
</image>
|
||||
</view>
|
||||
<u-loadmore :status="form.status" />
|
||||
</view>
|
||||
<bottombbar :valuebbar='1'></bottombbar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import dayjs from "dayjs";
|
||||
import bottombbar from '@/components/bottombbar.vue'
|
||||
export default {
|
||||
components: {
|
||||
bottombbar
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
bgnothave: uni.getStorageSync('bgnothave'),
|
||||
list: [],
|
||||
is_end: false,
|
||||
swiperCurrent: 0,
|
||||
overlayshow: false,
|
||||
swipercurrentdata: [],
|
||||
like: '',
|
||||
lists: {
|
||||
long: '', //多少天
|
||||
start: '',
|
||||
end: '',
|
||||
weekstart: '',
|
||||
weekend: '',
|
||||
},
|
||||
form: {
|
||||
page: 1,
|
||||
status: 'loadmore',
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
theme() {
|
||||
return this.$store.getters.theme
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
this.reservationlist()
|
||||
},
|
||||
onShow() {
|
||||
this.reservationclassyy()
|
||||
this.$store.dispatch("actionsclassification");
|
||||
this.reservationlist()
|
||||
},
|
||||
onLoad(e) {
|
||||
this.swiperCurrent = e.id
|
||||
this.lists.start = dayjs(new Date()).format("YYYY-MM-DD");
|
||||
this.lists.end = dayjs(new Date(this.lists.start).getTime() + 86400000).format('YYYY-MM-DD');
|
||||
},
|
||||
methods: {
|
||||
async reservationclassyy() {
|
||||
let res = await this.api.reservationclassyy()
|
||||
this.swipercurrentdata = [...[{
|
||||
id: 0,
|
||||
name: '全部'
|
||||
}], ...res]
|
||||
},
|
||||
async reservationlist() {
|
||||
let res = await this.api.reservationlist({
|
||||
store_id: uni.getStorageSync('store_id'),
|
||||
page: this.form.page,
|
||||
like: this.like,
|
||||
service_type_id: this.swiperCurrent,
|
||||
start_time: this.lists.start,
|
||||
end_time: this.lists.end,
|
||||
|
||||
})
|
||||
if (res.length == 0) {
|
||||
this.is_end = true
|
||||
this.form.status = 'nomore'
|
||||
return false;
|
||||
} else {
|
||||
this.form.status = 'loading';
|
||||
this.form.page = ++this.form.page;
|
||||
setTimeout(() => {
|
||||
this.list = [...this.list, ...res];
|
||||
if (res.length == 10) {
|
||||
this.form.status = 'loading';
|
||||
} else {
|
||||
this.is_end = true;
|
||||
this.form.status = 'nomore';
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
init_fn() {
|
||||
this.list = []
|
||||
this.is_end = false
|
||||
this.form.page = 1
|
||||
this.form.status = 'loadmore'
|
||||
this.reservationlist()
|
||||
},
|
||||
orderswitch(e) {
|
||||
this.swiperCurrent = e
|
||||
this.init_fn()
|
||||
},
|
||||
eeInfo(e) { //查看订单详情
|
||||
if (uni.getStorageSync('loginuser').model_type == 'Hotel') {
|
||||
uni.pro.navigateTo('order/orderInfohotel', {
|
||||
id: e.id,
|
||||
})
|
||||
} else {
|
||||
uni.pro.navigateTo('order/orderInfo', {
|
||||
id: e.id,
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
.content {
|
||||
.onecontent {
|
||||
background: #FFFFFF;
|
||||
padding: 10rpx 28rpx;
|
||||
|
||||
.onecontent_oen {
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
height: 70rpx;
|
||||
border-radius: 36rpx;
|
||||
border: 1rpx solid var(--bg-color-button);
|
||||
padding-right: 8rpx;
|
||||
|
||||
.onecontent_oen_input {
|
||||
padding-left: 32rpx;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.onecontent_oen_text {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 56rpx;
|
||||
width: 116rpx;
|
||||
height: 56rpx;
|
||||
background: var(--bg-color-button);
|
||||
border-radius: 36rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.onecontent_tow {
|
||||
width: 100%;
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
overflow: auto;
|
||||
|
||||
.onecontent_tow_item:nth-child(1) {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.onecontent_tow_item {
|
||||
position: relative;
|
||||
margin: 0 10rpx;
|
||||
|
||||
.onecontent_tow_itemtexts {
|
||||
white-space: nowrap;
|
||||
padding: 8rpx 18rpx;
|
||||
background: #F7F7F7;
|
||||
border-radius: 8rpx;
|
||||
border: 1rpx solid var(--bg-color-button);
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: var(--bg-color-button);
|
||||
}
|
||||
|
||||
.onecontent_tow_itemtext {
|
||||
white-space: nowrap;
|
||||
padding: 8rpx 18rpx;
|
||||
background: #F7F7F7;
|
||||
border-radius: 8rpx;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.towcontent {
|
||||
padding: 0 28rpx;
|
||||
|
||||
.flex-colum_image {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
|
||||
text {
|
||||
margin-top: 30rpx;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitem {
|
||||
margin-top: 32rpx;
|
||||
padding: 32rpx 24rpx;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx;
|
||||
|
||||
.towcontentitemone {
|
||||
padding-bottom: 16rpx;
|
||||
border-bottom: 1px solid #F6F6F6;
|
||||
|
||||
.towcontentitemone_one {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.towcontentitemone_tow {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
|
||||
.towcontentitemone_towimage {
|
||||
margin-right: 10rpx;
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitemtow {
|
||||
position: relative;
|
||||
|
||||
.towcontentitemtow_imge {
|
||||
width: 144rpx;
|
||||
height: 144rpx;
|
||||
background: #666666;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.towcontentitemtow_one {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-left: 32rpx;
|
||||
justify-content: space-around;
|
||||
height: 144rpx;
|
||||
|
||||
.towcontentitemtow_one_one {
|
||||
width: 80%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 28rpx;
|
||||
font-family: PingFang SC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.towcontentitemtow_one_tow {
|
||||
margin-top: 24rpx;
|
||||
font-size: 40rpx;
|
||||
font-family: Roboto-Bold, Roboto;
|
||||
font-weight: bold;
|
||||
color: #FC5F69;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitemtow_tow {
|
||||
position: absolute;
|
||||
bottom: 0rpx;
|
||||
right: 0;
|
||||
font-size: 28rpx;
|
||||
font-family: Roboto-Regular, Roboto;
|
||||
font-weight: 400;
|
||||
padding: 8rpx 30rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
background: var(--bg-color-button);
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.towcontentitemthere {
|
||||
width: 100%;
|
||||
margin-top: 16rpx;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.towcontentitemthereitem {
|
||||
margin-left: 24rpx;
|
||||
padding: 8rpx 32rpx;
|
||||
font-size: 28rpx;
|
||||
border-radius: 28rpx;
|
||||
}
|
||||
|
||||
.towcontentitemthereitem_one {
|
||||
background: linear-gradient(101deg, #FA8E5D 0%, #F45E4D 100%);
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.towcontentitemthereitem_tow {
|
||||
background: #F6F6F6;
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.towcontentitemthereitem_there {
|
||||
background: linear-gradient(101deg, #8083A7 0%, #4D4E64 100%);
|
||||
font-family: PingFang SC-Bold, PingFang SC;
|
||||
font-weight: bold;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.warp {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
|
||||
.rect {
|
||||
padding: 40rpx 68rpx;
|
||||
width: 480rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 42rpx;
|
||||
|
||||
.rectone {
|
||||
font-size: 32rpx;
|
||||
font-family: Source Han Sans CN-Bold, Source Han Sans CN;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.recttow {
|
||||
width: 100%;
|
||||
margin-top: 32rpx;
|
||||
|
||||
.recttow_one {
|
||||
padding: 8rpx 40rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 26rpx;
|
||||
border: 2rpx solid #999999;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Regular, Source Han Sans CN;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.recttow_tow {
|
||||
padding: 8rpx 40rpx;
|
||||
background: #333333;
|
||||
font-size: 28rpx;
|
||||
font-family: Source Han Sans CN-Medium, Source Han Sans CN;
|
||||
font-weight: 500;
|
||||
color: #FFFFFF;
|
||||
border-radius: 26rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
1195
pages/order/orderInfo.vue
Normal file
1195
pages/order/orderInfo.vue
Normal file
File diff suppressed because it is too large
Load Diff
1428
pages/order/orderInfohotel.vue
Normal file
1428
pages/order/orderInfohotel.vue
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user