Browse Source

init

master
zheng_hb 1 year ago
parent
commit
a10c64882a
662 changed files with 65130 additions and 0 deletions
  1. +14
    -0
      .gitignore
  2. +30
    -0
      App.vue
  3. +36
    -0
      README.en.md
  4. +101
    -0
      api/api.js
  5. +136
    -0
      api/http.js
  6. +119
    -0
      api/model/index.js
  7. +124
    -0
      api/model/info.js
  8. +29
    -0
      api/model/login.js
  9. +20
    -0
      api/model/vip.js
  10. +40
    -0
      common.scss
  11. +142
    -0
      components/base/navbar.vue
  12. +125
    -0
      components/base/tabbar.vue
  13. +169
    -0
      components/config/PrivacyAgreementPoup.vue
  14. +48
    -0
      components/config/configPopup.vue
  15. +116
    -0
      components/config/customerServicePopup.vue
  16. +114
    -0
      components/product/productItem.vue
  17. +112
    -0
      components/user/productList.vue
  18. +130
    -0
      components/userShop/userShopCommission.vue
  19. +56
    -0
      config.js
  20. BIN
      doc/address.png
  21. BIN
      doc/c.png
  22. BIN
      doc/cart.png
  23. BIN
      doc/category.png
  24. BIN
      doc/center.png
  25. BIN
      doc/editAddress.png
  26. BIN
      doc/home-s.png
  27. BIN
      doc/home.png
  28. BIN
      doc/order.png
  29. BIN
      doc/productDetail.png
  30. BIN
      doc/productUnit.png
  31. BIN
      doc/purse.png
  32. +20
    -0
      index.html
  33. +45
    -0
      main.js
  34. +105
    -0
      manifest.json
  35. +43
    -0
      mixins/configList.js
  36. +70
    -0
      mixins/list.js
  37. +55
    -0
      mixins/order.js
  38. +20
    -0
      package.json
  39. +131
    -0
      pages.json
  40. +49
    -0
      pages/index/cart.vue
  41. +109
    -0
      pages/index/category.vue
  42. +436
    -0
      pages/index/center.vue
  43. +41
    -0
      pages/index/index.vue
  44. +43
    -0
      pages/index/member.vue
  45. +131
    -0
      pages/index/order.vue
  46. +347
    -0
      pages_order/auth/loginAndRegisterAndForgetPassword.vue
  47. +151
    -0
      pages_order/auth/wxLogin.vue
  48. +136
    -0
      pages_order/auth/wxUserInfo.vue
  49. +244
    -0
      pages_order/components/address/addressList.vue
  50. +224
    -0
      pages_order/components/address/redactAddress.vue
  51. +122
    -0
      pages_order/components/product/submit.vue
  52. +367
    -0
      pages_order/components/product/submitUnitSelect.vue
  53. +351
    -0
      pages_order/home/addEnterprise.vue
  54. +88
    -0
      pages_order/home/contact.vue
  55. +75
    -0
      pages_order/home/introduce.vue
  56. +73
    -0
      pages_order/home/journalism.vue
  57. +40
    -0
      pages_order/home/newsDetail.vue
  58. +58
    -0
      pages_order/home/notice.vue
  59. +213
    -0
      pages_order/mine/address.vue
  60. +143
    -0
      pages_order/mine/balance.vue
  61. +132
    -0
      pages_order/mine/commission.vue
  62. +172
    -0
      pages_order/mine/help.vue
  63. +247
    -0
      pages_order/mine/promotion.vue
  64. +170
    -0
      pages_order/mine/purse.vue
  65. +201
    -0
      pages_order/mine/recharge.vue
  66. +89
    -0
      pages_order/mine/recommend.vue
  67. +88
    -0
      pages_order/mine/runningWater.vue
  68. +219
    -0
      pages_order/mine/withdraw.vue
  69. +407
    -0
      pages_order/order/createOrder.vue
  70. +552
    -0
      pages_order/order/orderDetail.vue
  71. +179
    -0
      pages_order/product/productDetail.vue
  72. BIN
      pages_order/static/address/icon.png
  73. BIN
      pages_order/static/address/icon1.png
  74. BIN
      pages_order/static/address/selectIcon.png
  75. BIN
      pages_order/static/auth/headImage.png
  76. BIN
      pages_order/static/auth/wx.png
  77. BIN
      pages_order/static/help/uploading.png
  78. BIN
      pages_order/static/home/1.png
  79. BIN
      pages_order/static/home/2.png
  80. BIN
      pages_order/static/order/icon.png
  81. BIN
      pages_order/static/product/like.png
  82. BIN
      static/image/PrivacyAgreementPoup/icon.png
  83. BIN
      static/image/cart/1.png
  84. BIN
      static/image/cart/2.png
  85. +1
    -0
      static/image/center/11.svg
  86. BIN
      static/image/center/13.png
  87. BIN
      static/image/center/14.png
  88. BIN
      static/image/center/15.png
  89. BIN
      static/image/center/16.png
  90. BIN
      static/image/center/17.png
  91. BIN
      static/image/center/3.png
  92. BIN
      static/image/center/c1.png
  93. BIN
      static/image/center/c2.png
  94. BIN
      static/image/center/c3.png
  95. BIN
      static/image/center/icon1.png
  96. BIN
      static/image/home/0.png
  97. BIN
      static/image/home/1.png
  98. BIN
      static/image/home/10.png
  99. BIN
      static/image/home/2.png
  100. BIN
      static/image/home/3.png

+ 14
- 0
.gitignore View File

@ -0,0 +1,14 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
.idea
package-lock.json
node_modules/
unpackage/
.hbuilderx
.vite

+ 30
- 0
App.vue View File

@ -0,0 +1,30 @@
<script>
export default {
onLaunch: function() {
this.$store.commit('initConfig')
this.$store.commit('getCategoryList')
},
onShow: function() {
},
onHide: function() {
}
}
</script>
<style lang="scss">
@import url("common.scss");
/*每个页面公共css */
body{
background-color: #f7f7f7;
font-size: 30rpx;
}
.page{
padding-top: var(--window-top);
}
.redact-address {
.uv-input__content__field-wrapper__field{
padding: 10rpx !important;
}
}
</style>

+ 36
- 0
README.en.md View File

@ -0,0 +1,36 @@
# uniapp项目开发模板
#### Description
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
#### Software Architecture
Software architecture description
#### Installation
1. xxxx
2. xxxx
3. xxxx
#### Instructions
1. xxxx
2. xxxx
3. xxxx
#### Contribution
1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request
#### Gitee Feature
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
4. The most valuable open source project [GVP](https://gitee.com/gvp)
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

+ 101
- 0
api/api.js View File

@ -0,0 +1,101 @@
import http from './http.js'
import utils from '../utils/utils.js'
let limit = {}
let debounce = {}
const models = ['login', 'index', 'vip', 'info']
const config = {
// 示例
// wxLogin : {url : '/api/wxLogin', method : 'POST',
// auth : false, showLoading : true, loadingTitle : '加载中...',
// limit : 1000
// },
getConfig : {url : '/config_common/getConfig', method : 'GET', limit : 500},
}
export function api(key, data, callback, loadingTitle) {
let req = config[key]
if (!req) {
console.error('无效key--------' + key);
return
}
if (typeof callback == 'string') {
loadingTitle = callback
}
if (typeof data == 'function') {
callback = data
data = {}
}
// 接口限流
if (req.limit) {
let storageKey = req.url
let storage = limit[storageKey]
if (storage && new Date().getTime() - storage < req.limit) {
return
}
limit[storageKey] = new Date().getTime()
}
//必须登录
if (req.auth) {
if (!uni.getStorageSync('token')) {
utils.toLogin()
console.error('需要登录')
return
}
}
// 接口防抖
if(req.debounce){
let storageKey = req.url
let storage = debounce[storageKey]
if (storage) {
clearTimeout(storage)
}
debounce[storageKey] = setTimeout(() => {
clearTimeout(storage)
delete debounce[storageKey]
http.http(req.url, data, callback, req.method,
loadingTitle || req.showLoading, loadingTitle || req.loadingTitle)
}, req.debounce)
return
}
http.http(req.url, data, callback, req.method,
loadingTitle || req.showLoading, loadingTitle || req.loadingTitle)
}
function addApiModel(model, key){
for(let k in model){
if(config[`${k}`]){
console.error(`重名api------model=${key},key=${k}`);
continue
}
config[`${k}`] = model[k]
// config[`${key}_${k}`] = model[k]
}
}
models.forEach(key => {
addApiModel(require(`./model/${key}.js`).default, key)
})
export default api

+ 136
- 0
api/http.js View File

@ -0,0 +1,136 @@
import Vue from 'vue'
import utils from '../utils/utils.js'
function http(uri, data, callback, method = 'GET', showLoading, title) {
if(showLoading){
uni.showLoading({
title: title || '加载中...'
});
}
uni.request({
url: Vue.prototype.$config.baseUrl + uri,
data: enhanceData(data),
method: method,
header: {
'X-Access-Token': uni.getStorageSync('token'),
'Content-Type' : 'application/x-www-form-urlencoded'
},
success: (res) => {
if(showLoading){
uni.hideLoading();
}
if(res.statusCode == 401 ||
res.data.message == '操作失败,token非法无效!' ||
res.data.message == '操作失败,用户不存在!'){
uni.removeStorageSync('token')
console.error('登录过期');
utils.toLogin()
}
if(res.statusCode == 200 && res.data.code != 200
&& res.data.code != 902){
uni.showToast({
mask: true,
duration: 1000,
title: res.data.message,
icon:'none'
});
}
callback(res.data)
},
fail: () => {
uni.showLoading({})
setTimeout(()=>{
uni.hideLoading()
uni.showToast({icon:"none", title:"网络异常"})
}, 3000)
if(showLoading){
uni.hideLoading();
}
}
});
}
function deleted(uri, data, callback) {
http(uri, data, callback, 'DELETE')
}
function post(uri, data, callback) {
http(uri, data, callback, 'POST')
}
function get(uri, data, callback) {
http(uri, data, callback, 'GET')
}
function enhanceData(data) {
const userid = uni.getStorageSync("userid")
if (!data) {
data = {}
}
if (userid) {
data.userid = userid
}
return data
}
function sync(method, uri, data) {
return new Promise((resolve, reject) => {
uni.request({
url: uri,
data: data,
method: method,
header: {
'auth': '1AS9F1HPC4FBC9EN00J7KX2L5RJ99XHZ'
},
success: (res) => {
resolve(res.data)
},
fail: (err) => {
reject(err);
}
})
})
}
let cache = null
function async (method, uri, data) {
const promise = sync(method, uri, data).then(res => {
cache = res
}).catch(err => {
})
}
function syncHttp(uri, data, method = 'GET') {
async (method, uri, data)
}
export default {
http: http,
delete: deleted,
post: post,
get: get,
syncHttp: syncHttp
}

+ 119
- 0
api/model/index.js View File

@ -0,0 +1,119 @@
// 首页相关接口
const api = {
// 获取首页轮播图
getRiceBanner: {
url: '/rice_index/getRiceBanner',
method: 'GET',
},
// 获取首页常规产品
getRiceCommonProductList: {
url: '/rice_index/getRiceCommonProductList',
method: 'GET',
},
// 获取首页跳转图标
getRiceIconList: {
url: '/rice_index/getRiceIconList',
method: 'GET',
},
// 获取首页新闻详情
getRiceNewsDetail: {
url: '/rice_index/getCommonNewsDetail',
method: 'GET',
},
// 获取首页新闻列表
getRiceNewsList: {
url: '/rice_index/getRiceNewsList',
method: 'GET',
},
// 获取首页公告列表
getRiceNoticeList: {
url: '/rice_index/getRiceNoticeList',
method: 'GET',
},
// 获取首页商品详情
getRiceProductDetail: {
url: '/rice_index/getRiceProductDetail',
method: 'GET',
},
// 获取首页体验产品
getRiceProductList: {
url: '/rice_index/getRiceProductList',
method: 'GET',
},
// 查询分类接口
getCategoryList: {
url: '/rice_index/getCategoryList',
method: 'GET',
},
// 获取分类分页商品列表接口
getClassShopPageList: {
url: '/rice_index/getClassShopPageList',
method: 'GET',
},
// 加入购物车
addCart: {
url: '/rice_index/addCart',
method: 'GET',
auth : true,
showLoading : true,
},
// 删除购物车信息
deleteCart: {
url: '/rice_index/deleteCart',
method: 'DELETE',
auth : true,
showLoading : true,
},
// 修改购物车信息数量
updateCartNum: {
url: '/rice_index/updateCartNum',
method: 'POST',
auth : true,
debounce : 300,
},
// 创建订单
createOrder: {
url: '/rice_index/createOrder',
method: 'GET',
auth : true,
limit : 1000,
showLoading : true,
},
// 创建订单-再次支付
createOrderTwo: {
url: '/rice_index/createOrderTwo',
method: 'GET',
auth : true,
limit : 1000,
showLoading : true,
},
// 多商品创建订单
createSumOrder: {
url: '/rice_index/createSumOrder',
method: 'POST',
auth : true,
limit : 1000,
showLoading : true,
},
// 多商品订单再次支付
createSumOrderAgain: {
url: '/rice_index/createSumOrderAgain',
method: 'POST',
auth : true,
limit : 1000,
showLoading : true,
},
// 确认收货
confirmOrder: {
url: '/rice_index/confirmOrder',
method: 'GET',
auth : true,
limit : 1000,
showLoading : true,
},
}
export default api

+ 124
- 0
api/model/info.js View File

@ -0,0 +1,124 @@
// 个人相关接口
const api = {
// 充值
recharge: {
url: '/rice_info/recharge',
method: 'GET',
auth : true,
limit : 1000,
showLoading : true,
},
// 提现
withdraw: {
url: '/rice_info/withdraw',
method: 'GET',
auth : true,
limit : 1000,
showLoading : true,
},
// 获取地址列表带分页
getAddressPageList: {
url: '/rice_info/getAddressPageList',
method: 'GET',
auth : true,
},
// 增加或修改地址信息
addOrUpdateAddress: {
url: '/rice_info/addOrUpdateAddress',
method: 'POST',
limit : 500,
auth : true,
showLoading : true,
},
// 删除地址
deleteAddress: {
url: '/rice_info/deleteAddress',
method: 'GET',
limit : 500,
auth : true,
showLoading : true,
},
// 修改默认地址
updateDefaultAddress: {
url: '/rice_info/updateDefaultAddress',
method: 'GET',
auth : true,
limit : 1000,
},
// 获取粉丝列表带分页
getFansPageList: {
url: '/rice_info/getFansPageList',
method: 'GET',
auth : true,
},
// 获取相关介绍
getInfoIntroduce: {
url: '/rice_info/getInfoIntroduce',
method: 'GET',
auth : true,
},
// 获取个人邀请码
getInviteCode: {
url: '/rice_info/getInviteCode',
method: 'GET',
auth : true,
},
// 获取订单列表带分页
getOrderPageList: {
url: '/rice_info/getOrderPageList',
method: 'GET',
auth : true,
},
// 获取订单详情
getOrderDetail: {
url: '/rice_info/getOrderDetail',
method: 'GET',
auth : true,
},
// 获取流水记录带分页
getWaterPageList: {
url: '/rice_info/getWaterPageList',
method: 'GET',
auth : true,
},
// 获取相关介绍
getInfoIntroduce: {
url: '/rice_info/getInfoIntroduce',
method: 'GET',
},
// 获取相关介绍详情
getInfoIntroduceDetail: {
url: '/rice_info/getRiceNewsDetail',
method: 'GET',
},
// 查询个人信息相关
getRiceInfo: {
url: '/rice_info/getRiceInfo',
method: 'GET',
},
// 获取购物车信息列表带分页
getCartPageList: {
url: '/rice_info/getCartPageList',
method: 'GET',
},
// 增加或者修改渠道申请信息
addOrUpdateCommonUser: {
url: '/rice_info/addOrUpdateCommonUser',
method: 'POST',
limit : 500,
auth : true,
showLoading : true,
},
// 查询渠道申请信息
getCommonUser: {
url: '/rice_info/getCommonUser',
method: 'GET',
limit : 500,
auth : true,
showLoading : true,
},
}
export default api

+ 29
- 0
api/model/login.js View File

@ -0,0 +1,29 @@
// 登录相关接口
const api = {
// 微信登录接口
wxLogin: {
url: '/login_common/appletLogin',
method: 'GET',
limit : 500,
showLoading : true,
},
// 修改个人信息接口
updateInfo: {
url: '/info_common/updateInfo',
method: 'POST',
auth: true,
limit : 500,
showLoading : true,
},
// 获取个人信息
getInfo: {
url: '/info_common/getInfo',
method: 'GET',
auth: true,
},
}
export default api

+ 20
- 0
api/model/vip.js View File

@ -0,0 +1,20 @@
// vip相关接口
const api = {
// 获取会员权益列表
getRiceVipList: {
url: '/rice_vip/getRiceVipList',
method: 'GET',
},
// 申请成为会员
applyRiceVip: {
url: '/rice_vip/applyRiceVip',
method: 'POST',
limit : 500,
auth : true,
showLoading : true,
},
}
export default api

+ 40
- 0
common.scss View File

@ -0,0 +1,40 @@
// 文字益处处理
.text-ellipsis{
overflow:hidden; //超出的文本隐藏
text-overflow:ellipsis; //溢出用省略号显示
white-space:nowrap; //溢出不换行
}
.text-ellipsis-2{
overflow: hidden;
text-overflow: ellipsis;
display:-webkit-box; //作为弹性伸缩盒子模型显示
-webkit-box-orient:vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
-webkit-line-clamp:2; //显示的行
}
.text-ellipsis-3{
overflow: hidden;
text-overflow: ellipsis;
display:-webkit-box; //作为弹性伸缩盒子模型显示
-webkit-box-orient:vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
-webkit-line-clamp:3; //显示的行
}
.share{
padding: 0;
margin: 0;
background-color: #fff;
display: flex !important;
flex-direction: column !important;
justify-content: center !important;
align-items: center !important;
font-size: 26rpx;
}
.share::after{
border: none;
padding: 0;
margin: 0;
width: 0;
height: 0;
}

+ 142
- 0
components/base/navbar.vue View File

@ -0,0 +1,142 @@
<template>
<!-- <view class="navbar"
:style="{backgroundColor : bgColor}"> -->
<view class="title"
:style="{backgroundColor : bgColor,color}">
<view class="left">
<uv-icon name="home"
v-if="leftClick && length == 1"
@click="toHome"
:color="color" size="46rpx"></uv-icon>
<uv-icon name="arrow-left"
v-else-if="leftClick"
@click="$emit('leftClick')"
:color="color" size="46rpx"></uv-icon>
</view>
<view>{{ title }}</view>
<view class="icon">
<uv-icon name="search"
v-if="isSearch"
:color="color" size="58rpx"></uv-icon>
<uv-icon name="plus-circle" :color="color"
v-if="isPlus"
@click="plusCircleShow = true"
size="46rpx" style="margin-left: 30rpx;"></uv-icon>
<view v-if="moreClick" style="margin-left: 30rpx;">
<uv-icon name="more-dot-fill" :color="color"
v-if="!moreText"
@click="moreClick()"
size="46rpx"></uv-icon>
<view v-else @click="moreClick"
style="font-weight: 400;font-size: 30rpx;">
{{ moreText }}
</view>
</view>
</view>
</view>
<!-- </view> -->
</template>
<script>
export default {
name:"navbar",
props : {
title : {
type : String,
default : ''
},
leftClick : {
type : Boolean,
},
moreClick : {
type : Function,
},
isSearch : {
type : Boolean,
default : false,
},
isPlus : {
type : Boolean,
default : false,
},
moreText : {
},
bgColor : {
default : '#fff'
},
color : {
default : '#333'
}
},
created() {
},
beforeDestroy() {
},
data() {
return {
length : getCurrentPages().length
};
},
methods : {
toHome(){
if(this.length != 1){
return
}
uni.reLaunch({
url: '/pages/index/index'
})
}
}
}
</script>
<style lang="scss" scoped>
// .navbar{
// width: 100%;
// height: 120rpx;
// padding-top: var(--status-bar-height);
// }
.title{
position: sticky;
top: 0;
left: 0;
padding-top: calc(var(--status-bar-height) + 20rpx);
width: 100%;
height: 100rpx;
background-color: #fff;
display: flex;
justify-content: center;
font-size: 32rpx;
align-items: center;
z-index: 99999;
.left{
position: absolute;
left: 40rpx;
display: flex;
justify-content: flex-start;
}
.icon{
position: absolute;
right: 40rpx;
display: flex;
justify-content: flex-end;
}
}
@keyframes fade-in {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
</style>

+ 125
- 0
components/base/tabbar.vue View File

@ -0,0 +1,125 @@
<template>
<view class="">
<view class="tabbar-box"></view>
<view class="tabbar">
<view
:class="{item : true, active : select == item.key}"
v-for="(item, index) in list"
:key="index"
v-if="!item.isNotShop || !userShop"
@click="toPath(item, index)">
<view class="icon">
<image :src="select == item.key ?
item.selectedIconPath :
item.iconPath" class="icon-image" mode=""></image>
</view>
<view class="title">
{{ item.title }}
</view>
</view>
</view>
</view>
</template>
<script>
import { mapGetters } from 'vuex'
export default {
name:"tabbar",
props : ['select'],
computed : {
...mapGetters(['userShop']),
},
data() {
return {
list : [
{
"selectedIconPath": "/static/image/tabbar/home-a.png",
"iconPath": "/static/image/tabbar/home.png",
"pagePath": "/pages/index/index",
"title": "首页",
key : 'home',
},
{
"selectedIconPath": "/static/image/tabbar/member-a.png",
"iconPath": "/static/image/tabbar/member.png",
"pagePath": "/pages/index/member",
"title": "招募",
key : 'member',
},
{
"selectedIconPath": "/static/image/tabbar/cart-a.png",
"iconPath": "/static/image/tabbar/cart.png",
"pagePath": "/pages/index/cart",
"title": "订单",
key : 'cart',
},
{
"selectedIconPath": "/static/image/tabbar/center-a.png",
"iconPath": "/static/image/tabbar/center.png",
"pagePath": "/pages/index/center",
"title": "我的",
key : 'center',
}
]
};
},
methods : {
toPath(item, index){
if(item.key == this.select){
return
}
uni.reLaunch({
url: item.pagePath
})
},
}
}
</script>
<style scoped lang="scss">
.tabbar-box{
height: 120rpx;
padding-bottom: env(safe-area-inset-bottom);
}
.tabbar{
position: fixed;
width: 750rpx;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
flex-direction: row;
height: 120rpx;
padding-bottom: env(safe-area-inset-bottom);
z-index: 999999;
bottom: 0;
left: 0;
color: #BCBCBC;
.item{
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.icon{
width: 54rpx;
height: 54rpx;
.icon-image{
width: 54rpx;
height: 54rpx;
}
}
.title{
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
font-size: 23rpx;
line-height: 35rpx;
}
}
}
.active{
color: $uni-color !important;
}
</style>

+ 169
- 0
components/config/PrivacyAgreementPoup.vue View File

@ -0,0 +1,169 @@
<template>
<uv-popup ref="popup" z-index="99999" :closeOnClickOverlay="false" :customStyle="{ backgroundColor: 'transparent' }">
<view class="privacyPopup">
<view class="icon">
<image src="/static/image/PrivacyAgreementPoup/icon.png"
mode=""></image>
</view>
<view class="title">
<view>协议与隐私政策</view>
</view>
<view class="content_pri">
<view class="text">
欢迎来到{{ configList.logo_name }}!我们根据最新的法律法规监管政策要求更新了用户协议隐私政策,请您认真阅读
</view>
</view>
<view class="config">
<uv-checkbox-group v-model="checkboxValue" shape="circle">
<view class="content">
<view style="display: flex;">
<!-- <uv-checkbox size="30rpx" :name="1"></uv-checkbox> -->
同意<text @click="goToPrivacy">{{ configList.logo_name }}隐私政策</text>
</view>
<view class="">
以及<text @click="goToPrivacy">用户协议</text>
</view>
</view>
</uv-checkbox-group>
</view>
<view class="pri_btn">
<button class="confuse_btn" @click="confusePrivacy">拒绝</button>
<button
class="confirm_btn" id="agree-btn"
open-type="agreePrivacyAuthorization"
@agreeprivacyauthorization="handleAgreePrivacyAuthorization">同意</button>
</view>
</view>
</uv-popup>
</template>
<script>
export default {
name: 'PrivacyAgreementPoup',
data() {
return {
resolvePrivacyAuthorization: {},
checkboxValue : false
}
},
mounted() {
if(wx.getPrivacySetting){
wx.getPrivacySetting({
success: res => {
console.log(res)
if (res.needAuthorization) {
//
this.init()
}
},
fail: () => {}
})
}
},
methods: {
//
init(resolve) {
this.$refs.popup.open('center')
this.resolvePrivacyAuthorization = resolve
},
//
goToPrivacy() {
wx.openPrivacyContract({
success: () => {
console.log('打开成功');
}, //
fail: () => {
uni.showToast({
title: '打开失败,稍后重试',
icon: 'none'
})
} //
})
},
//
confusePrivacy() {
this.$refs.popup.close()
// this.resolvePrivacyAuthorization({
// event: 'disagree'
// })
},
//
handleAgreePrivacyAuthorization() {
// id
// this.resolvePrivacyAuthorization({
// buttonId: 'agree-btn',
// event: 'agree'
// })
this.$refs.popup.close()
}
}
}
</script>
<style lang="scss" scoped>
.privacyPopup {
width: 90%;
margin: 0rpx auto;
background: white;
border-radius: 20rpx;
box-sizing: border-box;
padding: 40rpx 30rpx;
.icon{
display: flex;
justify-content: center;
align-items: center;
padding-bottom: 30rpx;
image{
width: 90rpx;
height: 90rpx;
}
}
.title {
text-align: center;
font-size: 36rpx;
}
.content_pri {
padding: 30rpx 0rpx;
font-size: 28rpx;
}
.config {
font-size: 28rpx;
text-align: center;
line-height: 40rpx;
margin-bottom: 30rpx;
text {
color: $uni-color;
}
.content{
display: flex;
}
}
.pri_btn {
display: flex;
.confuse_btn{
background-color: #F2F2F2;
color: #BDBDBD;
}
button {
margin: 10rpx;
flex: 1;
background: $uni-color;
outline: none;
color: white;
font-size: 30rpx;
}
}
}
</style>

+ 48
- 0
components/config/configPopup.vue View File

@ -0,0 +1,48 @@
<template>
<view class="configPopup">
<uv-popup ref="popup" :round="30" :customStyle="{height: '50vh'}">
<view class="content">
<uv-parse :content="content"></uv-parse>
</view>
</uv-popup>
</view>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'configPoup',
data() {
return {
content : ''
}
},
onShow(){
},
methods: {
//
open(key){
this.content = this.configList[key]
this.$refs.popup.open('bottom');
}
},
computed : {
...mapState(['configList'])
}
}
</script>
<style lang="scss" scoped>
.configPopup {
.content{
padding: 30rpx 20rpx;
overflow: scroll;
height: 100%;
box-sizing: border-box;
}
}
</style>

+ 116
- 0
components/config/customerServicePopup.vue View File

@ -0,0 +1,116 @@
<template>
<!-- 联系客服弹框 -->
<uv-popup ref="popup"
:safeAreaInsetBottom="false"
:round="30">
<view class="warp">
<view class="rect" @tap.stop>
<view class="title">联系{{ bTitle || title }}</view>
<view class="center">确定拨打{{ bTitle || title }}电话?</view>
<view class="bottom">
<view class="btn1"
@click="close">
取消
</view>
<view class="btn2"
@click="confirm">
确定
</view>
</view>
</view>
</view>
</uv-popup>
</template>
<script>
export default {
data() {
return {
phone:'',
title : '客服',
bPhone : '',
bTitle : '',
}
},
mounted() {
},
methods: {
open(phone, title) {
this.bPhone = phone || this.phone || this.configList.phone
this.bTitle = title || this.title
this.$refs.popup.open()
},
close() {
this.$refs.popup.close()
},
//
confirm() {
this.$refs.popup.close()
uni.makePhoneCall({
phoneNumber: this.bPhone || this.phone,
success() {
console.log('安卓拨打成功');
},
fail() {
console.log('安卓拨打失败');
}
})
},
}
}
</script>
<style scoped lang="scss">
.warp {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.rect {
width: 600rpx;
height: 300rpx;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
.title {
padding: 10rpx 0 0 15rpx;
background-color: $uni-color;
color: #FFF;
text-align: left;
width: 100%;
height: 18%;
font-size: 36rpx;
}
.center {
height: 40%;
display: flex;
justify-content: center;
align-items: center;
font-size: 36rpx;
}
.bottom {
display: flex;
justify-content: center;
gap: 50rpx;
view{
height: 60rpx;
line-height: 60rpx;
padding: 0 50rpx;
border-radius: 30rpx;
}
.btn1{
background-color: #fff;
}
.btn2{
background-color: $uni-color;
color: #fff;
}
}
}
</style>

+ 114
- 0
components/product/productItem.vue View File

@ -0,0 +1,114 @@
<template>
<view class="item" @click="$emit('click')">
<view class="item-image">
<image :src="item.image &&
item.image.split(',')[0]" mode="aspectFill">
</image>
</view>
<view class="info">
<view class="title">
{{ item.title }}
</view>
<view class="desc">
{{ item.sku }}
</view>
<view class="price"
v-if="[2].includes(item.type)">
<view class="">
会员价<text>{{ item.vipPrice }}</text>
</view>
<view class="">
零售价<text>{{ item.price }}</text>
</view>
</view>
<view class="price"
v-else>
<view class="">
价格<text>{{ item.price }}</text>
</view>
<view class="">
原价<text>{{ item.oldPrice }}</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
props: {
item: {
default: {}
}
},
data() {
return {
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
.item {
padding: 10rpx 20rpx;
align-items: center;
margin-bottom: 20rpx;
display: flex;
width: 100%;
box-sizing: border-box;
border-bottom: 1rpx solid #00000012;
.item-image {
width: 140rpx;
height: 140rpx;
flex-shrink: 0;
image {
height: 100%;
width: 100%;
border-radius: 20rpx;
}
}
.info {
padding: 20rpx;
color: #555;
flex: 1;
.title {
font-size: 28rpx;
font-weight: 900;
}
.desc {
font-size: 22rpx;
color: #777;
margin-top: 10rpx;
}
.price {
text-align: right;
color: #f40;
font-size: 26rpx;
text{
font-size: 30rpx;
font-weight: 900;
}
&>view:nth-child(2){
font-size: 22rpx;
color: #777;
text{
font-size: 26rpx;
font-weight: 900;
}
}
}
}
}
</style>

+ 112
- 0
components/user/productList.vue View File

@ -0,0 +1,112 @@
<template>
<view class="list">
<view class="item"
v-for="(item, index) in 10"
@click="$utils.navigateTo('/pages_order/product/productDetail?id=123')"
:key="index">
<image
class="image"
src="https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg" mode=""></image>
<view class="info">
<view class="title">
桌布租赁
</view>
<view class="price">
<text>58</text>/
</view>
<view class="favorable">
<view class="t">
限时优惠
</view>
<view class="p">
48
</view>
</view>
<view class="num">
已售卖5000+
</view>
</view>
<view class="btn">
<uv-icon name="shopping-cart"
color="#fff"></uv-icon>
</view>
</view>
</view>
</template>
<script>
export default {
name:"productList",
data() {
return {
};
},
methods : {
},
}
</script>
<style scoped lang="scss">
.list{
display: flex;
flex-wrap: wrap;
.item{
position: relative;
width: 300rpx;
padding: 20rpx;
background-color: #fff;
border-radius: 20rpx;
margin-top: 20rpx;
&:nth-child(odd){
margin-right: 20rpx;
}
.image{
width: 300rpx;
height: 250rpx;
border-radius: 20rpx;
}
.info{
font-size: 26rpx;
.title{
font-size: 30rpx;
}
.price{
color: #D03F25;
margin-top: 6rpx;
text{
font-size: 34rpx;
font-weight: 900;
}
}
.favorable{
display: flex;
background-image: url(/static/image/product/favorable.png);
background-size: 100% 100%;
width: fit-content;
padding: 5rpx 10rpx;
font-size: 18rpx;
margin-top: 6rpx;
.p{
color: #fff;
margin-left: 10rpx;
}
}
.num{
margin-top: 6rpx;
font-size: 22rpx;
color: #888;
}
}
.btn{
position: absolute;
right: 20rpx;
bottom: 20rpx;
padding: 10rpx;
border-radius: 50%;
background-color: $uni-color;
}
}
}
</style>

+ 130
- 0
components/userShop/userShopCommission.vue View File

@ -0,0 +1,130 @@
<template>
<view class="commission">
<image src="/static/image/center/10.png" mode=""></image>
<view class="price">
<view class="title">
总佣金
</view>
<view class="num">
7890.34
</view>
</view>
<view class="font-menu"
v-if="purse">
<view @click="toRunningWater(index)"
v-for="(item, index) in list"
:key="index">{{ item.name }}</view>
</view>
<view class="btn"
v-if="!purse"
@click="toPurse">
提现
</view>
</view>
</template>
<script>
export default {
name: "userShopCommission",
props : {
purse : {
default : false,
},
},
data() {
return {
list : [
{
name : '余额记录',
},
{
name : '提现记录',
},
{
name : '佣金记录',
},
],
};
},
methods : {
//
toPurse(){
uni.navigateTo({
url:'/pages_order/mine/purse'
})
},
//
toRunningWater(index){
uni.navigateTo({
url:'/pages_order/mine/runningWater?status=' + index
})
},
}
}
</script>
<style scoped lang="scss">
.commission {
width: 700rpx;
height: 300rpx;
position: relative;
margin: 20rpx auto;
color: #fff;
image {
width: 700rpx;
height: 300rpx;
position: absolute;
border-radius: 20rpx;
}
.price {
position: absolute;
left: 50rpx;
top: 80rpx;
font-weight: 900;
.title {
font-size: 32rpx;
}
.num {
font-size: 44rpx;
margin-top: 20rpx;
}
}
.font-menu {
font-size: 24rpx;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: 500;
text-align: center;
color: #ffffff;
line-height: 24rpx;
width: 710rpx;
position: absolute;
left: 0;
bottom: 25rpx;
display: flex;
view{
width: 160rpx;
}
}
.btn {
position: absolute;
right: 50rpx;
bottom: 50rpx;
background-color: #FDC440;
width: 160rpx;
height: 60rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius: 30rpx;
}
}
</style>

+ 56
- 0
config.js View File

@ -0,0 +1,56 @@
import Vue from 'vue'
import api from '@/api/api.js'
import utils from './utils/utils.js'
import uvUI from '@/uni_modules/uv-ui-tools'
Vue.use(uvUI);
// 当前环境
const type = 'prod'
// 环境配置
const config = {
dev : {
baseUrl : 'http://h5.xzaiyp.top/rice-admin',
},
prod : {
baseUrl : 'https://admin.szqwdgidm.com/rice-admin',
}
}
// 默认配置
const defaultConfig = {
mapKey : 'XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU',
aliOss : {
url : 'https://tennis-oss.xzaiyp.top/',
config : {
//桶的地址
region: 'oss-cn-guangzhou',
//id
accessKeyId:'LTAI5tNycA46YTwm383dRvMV',
//密钥
accessKeySecret:'tAdbYQCmdur6jbZ8hjvgB7T1Z52mIG',
//桶的名字
bucket: 'zhuoqiu-image',
endpoint:'oss-cn-guangzhou.aliyuncs.com',
}
},
}
uni.$uv.setConfig({
// 修改$uv.config对象的属性
config: {
// 修改默认单位为rpx,相当于执行 uni.$uv.config.unit = 'rpx'
unit: 'rpx'
},
})
Vue.prototype.$config = utils.deepMergeObject(defaultConfig, config[type])
Vue.prototype.$api = api
export default Vue.prototype.$config

BIN
doc/address.png View File

Before After
Width: 597  |  Height: 1255  |  Size: 149 KiB

BIN
doc/c.png View File

Before After
Width: 586  |  Height: 1275  |  Size: 120 KiB

BIN
doc/cart.png View File

Before After
Width: 604  |  Height: 1279  |  Size: 137 KiB

BIN
doc/category.png View File

Before After
Width: 606  |  Height: 1263  |  Size: 136 KiB

BIN
doc/center.png View File

Before After
Width: 580  |  Height: 1266  |  Size: 140 KiB

BIN
doc/editAddress.png View File

Before After
Width: 601  |  Height: 1276  |  Size: 157 KiB

BIN
doc/home-s.png View File

Before After
Width: 595  |  Height: 1270  |  Size: 176 KiB

BIN
doc/home.png View File

Before After
Width: 586  |  Height: 1276  |  Size: 271 KiB

BIN
doc/order.png View File

Before After
Width: 588  |  Height: 1270  |  Size: 107 KiB

BIN
doc/productDetail.png View File

Before After
Width: 604  |  Height: 1264  |  Size: 177 KiB

BIN
doc/productUnit.png View File

Before After
Width: 619  |  Height: 1254  |  Size: 161 KiB

BIN
doc/purse.png View File

Before After
Width: 615  |  Height: 1267  |  Size: 138 KiB

+ 20
- 0
index.html View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<script>
var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
CSS.supports('top: constant(a)'))
document.write(
'<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
(coverSupport ? ', viewport-fit=cover' : '') + '" />')
</script>
<title></title>
<!--preload-links-->
<!--app-context-->
</head>
<body>
<div id="app"><!--app-html--></div>
<script type="module" src="/main.js"></script>
</body>
</html>

+ 45
- 0
main.js View File

@ -0,0 +1,45 @@
import App from './App'
// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
import store from '@/store/store'
import './config'
import './utils/index.js'
import mixinConfigList from '@/mixins/configList.js'
Vue.mixin(mixinConfigList)
//组件注册
import configPopup from '@/components/config/configPopup.vue'
import navbar from '@/components/base/navbar.vue'
Vue.component('configPopup',configPopup)
Vue.component('navbar',navbar)
const app = new Vue({
...App,
store,
})
app.$mount()
// #endif
// #ifdef VUE3
import {
createSSRApp
} from 'vue'
export function createApp() {
const app = createSSRApp(App)
return {
app
}
}
// #endif

+ 105
- 0
manifest.json View File

@ -0,0 +1,105 @@
{
"name" : "unapp模板",
"appid" : "__UNI__197A38F",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App */
"app-plus" : {
"usingComponents" : true,
"nvueStyleCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* */
"modules" : {},
/* */
"distribute" : {
/* android */
"android" : {
"permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios */
"ios" : {},
/* SDK */
"sdkConfigs" : {
"maps" : {}
}
}
},
/* */
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "wx4695b2c6e4e23140",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true,
"permission" : {
"scope.userLocation" : {
"desc" : "你的位置信息将用于小程序位置接口的效果展示"
},
"scope.userFuzzyLocation" : {
"desc" : "你的位置信息将用于小程序位置接口的效果展示"
}
},
"requiredPrivateInfos" : [ "chooseLocation", "getLocation" ]
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
},
"vueVersion" : "2",
"h5" : {
"sdkConfigs" : {
"maps" : {
"qqmap" : {
"key" : "XMBBZ-BCPCV-SXPPQ-5Y7MY-PHZXK-YFFVU"
}
}
},
"devServer" : {
"https" : false,
"proxy" : {
"/ws/geocoder/v1/" : {
"target" : "https://apis.map.qq.com",
"changeOrigin" : true
},
"/ws/location/v1/" : {
"target" : "https://apis.map.qq.com",
"changeOrigin" : true
}
}
}
}
}

+ 43
- 0
mixins/configList.js View File

@ -0,0 +1,43 @@
import { mapState } from 'vuex'
export default {
data() {
return {
// 默认的全局分享内容
Gshare: {
// title: '三只青蛙',
path: '/pages/index/index', // 全局分享的路径,比如 首页
// imageUrl: '/static/image/login/logo.png', // 全局分享的图片(可本地可网络)
}
}
},
computed: {
...mapState(['configList', 'userInfo']),
},
// 定义全局分享
// 1.发送给朋友
onShareAppMessage(res) {
let o = {
...this.Gshare,
title : this.configList.logo_name,
}
if(this.userInfo.id){
o.path = this.Gshare.path + '?shareId=' + this.userInfo.id
}
return o
},
//2.分享到朋友圈
onShareTimeline(res) {
let o = {
...this.Gshare,
title : this.configList.logo_name,
}
if(this.userInfo.id){
o.path = this.Gshare.path + '?shareId=' + this.userInfo.id
}
return o
},
methods: {
}
}

+ 70
- 0
mixins/list.js View File

@ -0,0 +1,70 @@
function query(self, queryParams){
// return (self.beforeGetData && self.beforeGetData()) ||
// queryParams || self.queryParams
// 深度合并对象
return self.$utils.deepMergeObject(
self.$utils.deepMergeObject(self.queryParams,
(self.beforeGetData && self.beforeGetData()) || {}),
queryParams)
}
export default {
data() {
return {
queryParams: {
pageNo: 1,
pageSize: 10,
},
total : 0,
list : [],
}
},
onPullDownRefresh() {
this.getData()
},
onReachBottom() {
this.loadMoreData()
},
onShow() {
this.getData()
},
methods: {
getData(queryParams){
return new Promise((success, error) => {
if(!this.mixinsListApi){
return console.error('mixinsListApi 缺失');
}
this.$api(this.mixinsListApi,
query(this, queryParams), res => {
uni.stopPullDownRefresh()
if(res.code == 200){
this.getDataThen && this.getDataThen(res.result.records, res.result.total, res.result)
success(res.result)
this[this.mixinsListKey || 'list'] = res.result.records || res.result
this.total = res.result.total || res.result.length
}
})
})
},
loadMoreData(){
console.log('loadMoreData----', this.queryParams.pageSize < this.total);
if(this.queryParams.pageSize < this.total){
this.queryParams.pageSize += 10
this.getData()
}
},
}
}

+ 55
- 0
mixins/order.js View File

@ -0,0 +1,55 @@
export default {
data() {
return {
}
},
computed: {
},
methods: {
// 立即支付
toPayOrder(item){
let api = ''
if([0, 1].includes(item.shopState)){
api = 'createOrderTwo'
}else{
api = 'createSumOrderAgain'
}
this.$api(api, {
orderId : item.id,
addressId : item.addressId
}, res => {
if(res.code == 200){
uni.requestPaymentWxPay(res)
.then(res => {
uni.showToast({
title: '支付成功',
icon: 'none'
})
this.getData()
}).catch(n => {
this.getData()
})
}
})
},
// 确认收货
confirmOrder(item){
uni.showModal({
title: '您收到货了吗?',
success : e => {
if(e.confirm){
this.$api('confirmOrder', {
orderId : item.id,
}, res => {
this.getData()
})
}
}
})
},
}
}

+ 20
- 0
package.json View File

@ -0,0 +1,20 @@
{
"name": "uniapp-project-templates",
"version": "1.0.0",
"description": "{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}",
"main": "main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://gitee.com/huliyong/uniapp-project-templates.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"ali-oss": "^6.21.0",
"dayjs": "^1.11.12"
}
}

+ 131
- 0
pages.json View File

@ -0,0 +1,131 @@
{
"pages": [{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true
}
},
{
"path": "pages/index/order",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true
}
},
{
"path": "pages/index/category",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true
}
},
{
"path": "pages/index/center",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/index/cart",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true
}
},
{
"path": "pages/index/member",
"style": {
"navigationBarTitleText": ""
}
}
],
"preloadRule": {
"pages/index/index": {
"network": "all",
"packages": ["pages_order"]
}
},
"subPackages": [{
"root": "pages_order",
"pages": [
{
"path": "order/orderDetail",
"style": {
"enablePullDownRefresh": true
}
},
{
"path": "mine/purse"
},
{
"path": "mine/runningWater"
},
{
"path": "mine/address"
},
{
"path": "product/productDetail"
},
{
"path": "auth/wxLogin"
},
{
"path": "auth/wxUserInfo"
},
{
"path": "auth/loginAndRegisterAndForgetPassword"
},
{
"path": "mine/help"
},
{
"path": "home/journalism"
},
{
"path": "mine/recommend"
},
{
"path": "home/introduce"
},
{
"path" : "home/newsDetail"
},
{
"path" : "order/createOrder"
},
{
"path" : "mine/balance"
},
{
"path": "mine/commission"
},
{
"path": "mine/withdraw"
},
{
"path": "mine/recharge"
},
{
"path": "mine/promotion"
},
{
"path": "home/notice"
},
{
"path": "home/contact"
},
{
"path": "home/addEnterprise"
}
]
}],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "酒店桌布",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8",
"navigationStyle": "custom"
},
"uniIdRouter": {}
}

+ 49
- 0
pages/index/cart.vue View File

@ -0,0 +1,49 @@
<template>
<view class="page">
<navbar title="我的订单"/>
<tabber select="cart" />
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
export default {
components: {
tabber,
},
data() {
return {
value : 0,
checkboxValue : [],
options: [
{
text: '删除',
style: {
backgroundColor: '#f40'
}
},
],
mixinsListApi : 'getCartPageList',
}
},
computed: {
},
methods: {
}
}
</script>
<style scoped lang="scss">
.page {
padding-bottom: 200rpx;
/deep/ .uv-swipe-action{
width: 100%;
}
}
</style>

+ 109
- 0
pages/index/category.vue View File

@ -0,0 +1,109 @@
<template>
<view class="page">
<navbar title="商品列表" leftClick @leftClick="$utils.navigateBack" />
<view class="search">
<uv-search
placeholder="搜你喜欢的产品"
bgColor="#fff"
@search="getData"
@custom="getData"
v-model="queryParams.title"></uv-search>
</view>
<view class="category">
<uv-vtabs
:list="category"
keyName="title"
:barItemBadgeStyle="{right:'20px',top:'12px'}"
@change="change">
<uv-vtabs-item>
<view class="list">
<productItem
v-for="(item, index) in list"
:key="index"
:item="item"
@click="$utils.navigateTo('/pages_order/product/productDetail?id=' + item.id)"
/>
</view>
</uv-vtabs-item>
</uv-vtabs>
</view>
</view>
</template>
<script>
import productItem from '@/components/product/productItem.vue';
import mixinsList from '@/mixins/list.js'
import { mapState } from 'vuex'
export default {
mixins : [mixinsList],
components: {
productItem,
},
data() {
return {
mixinsListApi : 'getClassShopPageList',
}
},
computed: {
...mapState(['category'])
},
onLoad({search}) {
if(search){
this.queryParams.title = search
}
this.$store.commit('getCategoryList')
if(this.category.length > 0){
this.queryParams.classId = this.category[0].id
}
},
methods: {
change(e) {
this.queryParams.classId = this.category[e].id
this.getData()
},
}
}
</script>
<style scoped lang="scss">
.page{
/deep/ .uv-vtabs{
height: calc(100vh - 220rpx) !important;
}
/deep/ .uv-vtabs__bar{
height: calc(100vh - 220rpx) !important;
}
/deep/ .uv-vtabs__content{
height: calc(100vh - 220rpx) !important;
}
.search {
position: relative;
background: #FFFFFF;
margin: 20rpx;
border-radius: 41rpx;
padding: 10rpx 20rpx;
display: flex;
align-items: center;
/deep/ .uv-search__action {
background-color: $uni-color;
color: #FFFFFF;
padding: 10rpx 20rpx;
border-radius: 30rpx;
}
}
}
.category {
font-size: 30rpx;
color: #333;
.list{
margin: 0 auto;
width: 100%;
}
}
</style>

+ 436
- 0
pages/index/center.vue View File

@ -0,0 +1,436 @@
<template>
<view class="page">
<navbar title="个人中心" />
<view class="head">
<view class="headImage">
<image :src="userInfo.headImage" mode="aspectFill"></image>
</view>
<view class="info">
<view class="name">
<view class="one">{{ userInfo.nickName }}</view>
<!-- <view class="two">黄金会员</view> -->
<view class="two">
<image :src="configList[vipImage[userInfo.isPay]]" mode="widthFix"></image>
</view>
</view>
<view class="vip">
ID{{ userInfo.id }}
</view>
<view class="tips">
注册时间{{ userInfo.createTime }}
</view>
</view>
<!-- <view class="setting">
<uv-icon name="setting" size="40rpx"></uv-icon>
</view> -->
</view>
<view class="earnings">
<view class="member"
v-if="userInfo.isPay"
@click="$utils.navigateTo('/pages/index/member')">
<view>会员等级{{ vipType[userInfo.isPay] }}</view>
<view>查看权益></view>
</view>
<view class="deposit">
<view class="box"
@click="$utils.navigateTo('/pages_order/mine/balance')">
<view>
<view class="num">{{ riceInfo.income || 0 }}</view>
<view class="text">收益明细()</view>
</view>
<view class="boxs">收益明细</view>
</view>
<!-- <view class="box">
<view
@click="$utils.navigateTo('/pages_order/mine/balance')">
<view class="num">{{ riceInfo.balance || 0 }}</view>
<view class="text">余额()</view>
</view>
<view class="boxs"
@click="$utils.navigateTo('/pages_order/mine/recharge')">去充值</view>
</view> -->
<view class="box"
@click="clickNo">
<view>
<view class="num">{{ riceInfo.balance || 0 }}</view>
<view class="text">余额()</view>
</view>
<view class="boxs"
>去充值</view>
</view>
<view class="box">
<view
@click="$utils.navigateTo('/pages_order/mine/commission')">
<view class="num" style="border: none;">{{ riceInfo.canWithdraw || 0 }}</view>
<view class="text">可提现()</view>
</view>
<view class="boxs"
@click="$utils.navigateTo('/pages_order/mine/withdraw')">去提现</view>
</view>
</view>
</view>
<view class="myOrder">
<view>我的订单</view>
<view
@click="$utils.navigateTo('/pages/index/order')">
查看全部>
</view>
</view>
<view class="order">
<view class="box">
<view class="boxs"
@click="$utils.navigateTo('/pages/index/order?type=1')">
<image src="../../static/image/center/13.png" mode="aspectFill" />
<view>待付款</view>
</view>
<view class="boxs"
@click="$utils.navigateTo('/pages/index/order?type=2')">
<image src="../../static/image/center/14.png" mode="aspectFill" />
<view>已付款</view>
</view>
<view class="boxs"
@click="$utils.navigateTo('/pages/index/order?type=3')">
<image src="../../static/image/center/15.png" mode="aspectFill" />
<view>待发货</view>
</view>
<view class="boxs"
@click="$utils.navigateTo('/pages/index/order?type=4')">
<image src="../../static/image/center/16.png" mode="aspectFill" />
<view>待收货</view>
</view>
<view class="boxs"
@click="$utils.navigateTo('/pages/index/order?type=5')">
<image src="../../static/image/center/17.png" mode="aspectFill" />
<view>已完成</view>
</view>
</view>
</view>
<!-- 酒店 -->
<view class="user">
<view class="line grid">
<view class="title">
常用功能
</view>
</view>
<view class="cell-bottom">
<uv-cell-group>
<uv-cell icon="grid" title="我的邀请码"
@click="$utils.navigateTo('/pages_order/mine/promotion')"
:isLink="true" arrow-direction="right" />
<uv-cell icon="account" title="我的推荐" :isLink="true" arrow-direction="right"
@click="$utils.navigateTo('/pages_order/mine/recommend')" />
<uv-cell icon="kefu-ermai" title="联系客服"
@click="$refs.customerServicePopup.open()"
:isLink="true" arrow-direction="right" />
<uv-cell
title="我的地址"
icon="list-dot"
:isLink="true"
arrow-direction="right"
@click="$utils.navigateTo('/pages_order/mine/address')">
</uv-cell>
<uv-cell icon="reload" title="退出登录" :isLink="true" arrow-direction="right"
@click="$store.commit('logout')"/>
</uv-cell-group>
</view>
</view>
<!-- <customerServicePopup ref="customerServicePopup"/> -->
<tabber select="center" />
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
import { mapState } from 'vuex'
import customerServicePopup from '@/components/config/customerServicePopup.vue'
export default {
components: {
tabber,
customerServicePopup,
},
computed: {
},
data() {
return {
vipType : ['普通会员', '黄金会员', '渠道商'],
vipImage : ['vip_vip', 'vip_user', 'vip_shop']
}
},
onShow() {
},
methods: {
clickNo(){
uni.showModal({
title: '暂未开放',
})
},
}
}
</script>
<style scoped lang="scss">
.page {
.warp {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.rect {
width: 600rpx;
height: 300rpx;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
.title {
padding: 10rpx 0 0 15rpx;
background-color: #fd5100;
color: #FFF;
text-align: left;
width: 100%;
height: 18%;
font-size: 36rpx;
}
.center {
height: 40%;
display: flex;
justify-content: center;
align-items: center;
font-size: 36rpx;
}
.bottom {
display: flex;
justify-content: center;
gap: 50rpx;
}
}
}
image {
width: 100%;
height: 100%;
}
.head {
display: flex;
background-color: #fff;
padding: 40rpx 20rpx;
align-items: center;
position: relative;
.headImage {
width: 130rpx;
height: 130rpx;
background-image: url(/static/image/center/3.png);
background-size: 100% 100%;
overflow: hidden;
border-radius: 50%;
margin-right: 40rpx;
}
.info {
font-size: 28rpx;
display: flex;
flex-direction: column;
gap: 10rpx;
.vip {
color: #909294;
font-size: 24rpx;
}
.name {
display: flex;
align-items: center;
.one {
color: #343140;
font-size: 32rpx;
font-weight: 600;
margin-right: 20rpx;
}
.two {
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
// font-size: 24rpx;
// margin-left: 10rpx;
// padding: 3rpx 16rpx;
// border-radius: 18rpx;
// background-color: rgb(252, 213, 157);
image{
width: 120rpx;
}
}
}
.tips {
font-size: 26rpx;
color: #ABABAB;
}
}
}
.setting {
position: absolute;
right: 50rpx;
top: 50rpx;
}
.earnings {
width: 94%;
margin-left: 3%;
.member {
display: flex;
align-items: center;
justify-content: space-between;
width: 90%;
margin-left: 5%;
height: 80rpx;
font-size: 28rpx;
background-color: #000;
color: #F9CF93;
border-top-left-radius: 30rpx;
border-top-right-radius: 30rpx;
view {
margin: 0 20rpx;
}
}
.deposit {
display: flex;
justify-content: space-around;
align-items: center;
height: 300rpx;
// margin-top: -20rpx;
background-color: rgb(163, 201, 80);
border-radius: 40rpx;
.box {
display: flex;
height: 80%;
padding: 0rpx 30rpx;
text-align: center;
flex-direction: column;
justify-content: space-around;
color: #fff;
border-right: 2rpx dashed;
flex: 1;
.num {
font-size: 48rpx;
// border-right: 2rpx dashed;
width: 100%;
padding: 0 30rpx 0 0;
}
.text {
font-size: 20rpx;
}
.boxs {
font-size: 32rpx;
background-color: rgb(252, 213, 157);
padding: 14rpx 20rpx;
border-radius: 30rpx;
color: #aa5500;
font-weight: 600;
}
}
}
}
.myOrder {
display: flex;
width: 94%;
margin-left: 3%;
align-items: center;
justify-content: space-between;
padding: 20rpx 0;
view:nth-child(1) {
font-weight: 600;
font-size: 32rpx;
border-left: 7rpx solid #A3D250;
}
view:nth-child(2) {
font-size: 28rpx;
color: #A3D250;
}
view {
padding: 0 20rpx;
}
}
.order {
display: flex;
align-items: center;
justify-content: center;
width: 94%;
margin-left: 3%;
background-color: #fff;
border-radius: 16rpx;
.box {
display: flex;
width: 100%;
justify-content: space-around;
padding: 70rpx 0 90rpx;
}
}
.user {
.grid {
flex-direction: column;
font-size: 26rpx;
padding: 20rpx;
.title {
font-weight: 600;
padding: 10rpx;
border-left: 6rpx solid #A3D250;
}
}
.cell-bottom {
width: 96%;
margin-top: 20rpx;
margin-left: 2%;
background-color: #fff;
border-radius: 20rpx;
}
}
</style>

+ 41
- 0
pages/index/index.vue View File

@ -0,0 +1,41 @@
<template>
<view class="page">
<navbar bgColor="#88D259" />
<!-- <PrivacyAgreementPoup /> -->
<tabber select="home" />
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
export default {
components:{
tabber
},
data() {
return {
}
}
}
</script>
<style scoped lang="scss">
.page {
position: relative;
.bg-color {
width: 100%;
position: absolute;
top: 0;
left: 0;
height: 550rpx;
background: linear-gradient(to bottom, #88D259, #88D259, #fff);
}
}
</style>

+ 43
- 0
pages/index/member.vue View File

@ -0,0 +1,43 @@
<template>
<view class="page">
<navbar title="会员"
:leftClick="leftClick"
@leftClick="$utils.navigateBack"
/>
<tabber select="member" />
</view>
</template>
<script>
import tabber from '@/components/base/tabbar.vue'
import { mapState } from 'vuex'
export default {
components: {
tabber,
},
data() {
return {
};
},
computed : {
},
onLoad({leftClick}) {
},
onShow() {
},
}
</script>
<style lang="scss">
.page {
min-height: 100vh;
color: #F3F3F3;
z-index: 0;
}
</style>

+ 131
- 0
pages/index/order.vue View File

@ -0,0 +1,131 @@
<template>
<view class="page">
<navbar
title="订单中心"
leftClick
@leftClick="$utils.navigateBack"
/>
<uv-tabs :list="tabs"
:activeStyle="{color : '#A3D250', fontWeight : 600}"
lineColor="#A3D250"
lineHeight="8rpx"
lineWidth="50rpx"
:current="current"
:scrollable="false"
@click="clickTabs"></uv-tabs>
</view>
</template>
<script>
export default {
// mixins : [mixinsList, mixinsOrder],
components : {
},
computed : {
},
data() {
return {
}
},
onLoad(args) {
},
onShow() {
},
methods: {
}
}
</script>
<style scoped lang="scss">
.page{
}
.list {
.item {
width: calc(100% - 40rpx);
background-color: #fff;
margin: 20rpx;
box-sizing: border-box;
border-radius: 16rpx;
padding: 30rpx;
.top {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 30rpx;
.service {}
.status {
font-size: 26rpx;
font-weight: 600;
}
}
.content {
display: flex;
margin: 10rpx 0;
.left {
width: 150rpx;
height: 150rpx;
border-radius: 10rpx;
image {
width: 150rpx;
height: 150rpx;
border-radius: 10rpx;
}
}
.right {
width: calc(100% - 160rpx);
color: #777;
font-size: 24rpx;
padding-left: 20rpx;
line-height: 40rpx;
background-color: #F8F8F8;
}
}
.bottom {
display: flex;
justify-content: space-between;
font-size: 25rpx;
.price {
font-weight: 900;
text {
color: #ff780099;
font-size: 30rpx;
}
}
.b1 {
border: 1px solid #777;
color: #777;
box-sizing: border-box;
}
.b2 {
background: $uni-color;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
}
view {
margin: 12rpx;
border-radius: 28rpx;
padding: 16rpx 48rpx;
margin-bottom: 0;
}
}
}
}
</style>

+ 347
- 0
pages_order/auth/loginAndRegisterAndForgetPassword.vue View File

@ -0,0 +1,347 @@
<template>
<view class="refundsOrExchange">
<navbar :title="titleList[titleIndex]" leftClick @leftClick="$utils.navigateBack" />
<view class="frame">
<!-- 登录和注册 -->
<view class="loginRegister" v-if='titleIndex!=2'>
<!-- 标题 -->
<view class="title">{{titleList[titleIndex]}}</view>
<!-- 头像 -->
<view class="userIamge">
<view>
<img src="/static/image/center/11.svg" alt="" style="width: 100%;height: 100%;">
</view>
</view>
<!-- 用户名&密码&隐私条款 -->
<view class="form">
<view>
<uv-input v-model="form.account" placeholder="请输入账号" border="surround" shape='circle'
clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view>
<view>
<uv-input v-model="form.password" password placeholder="请输入密码" border="surround" shape='circle'
clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view>
<view>
<uv-checkbox-group v-model="checkboxValue" shape="circle">
<view class="content">
<view style="display: flex;flex-wrap: wrap;">
<uv-checkbox size="30rpx" :name="1"></uv-checkbox>
请你阅读并同意我们的<span style="color: #fd5100"
@click="$refs.popup.open('getPrivacyPolicy')">隐私条款</span><span
style="color: #fd5100"
@click="$refs.popup.open('getUserAgreement')">服务协议</span>
</view>
</view>
</uv-checkbox-group>
</view>
</view>
</view>
<!-- 忘记密码 -->
<view class='forgetPassword' v-if='titleIndex==2'>
<!-- 标题 -->
<view class="title">{{titleList[titleIndex]}}</view>
<!-- 表单 -->
<view class="form1">
<view class="userName">
<uv-input v-model="form1.userName" placeholder="请输入手机号/用户/邮箱" border="surround" shape='circle'
clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view>
<view class="code">
<view class="left">
<uv-input v-model="form1.code" placeholder="请输入验证码" border="surround" shape='circle'
clearable :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view>
<view class="right">
<view>
<uv-toast ref="toast"></uv-toast>
<uv-code :seconds="seconds" @end="end" @start="start" ref="code"
@change="codeChange"></uv-code>
<uv-button @tap="getCode" iconSize='10rpx' color='#fd5100'
shape='circle'>{{tips}}</uv-button>
</view>
</view>
</view>
<view class="password1">
<uv-input v-model="form1.password1" placeholder="设置您的新密码(6到50个字符)" password clearable
border="surround" shape='circle' :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view>
<view class="password2">
<uv-input v-model="form1.password2" placeholder="重新确认密码" password clearable border="surround"
shape='circle' :customStyle="{ backgroundColor: '#f6f6f6'}"></uv-input>
</view>
</view>
</view>
<!-- 按钮 -->
<view class="btn"
@click="submit">
<button class='a'>{{titleList[titleIndex]}}</button>
</view>
<!-- tab -->
<!-- <view class="bottomTab">
<span :class="titleIndex==0 ? 'tabbarItemActive' : 'tabbarItemNoActive'"
@click='changePage(0)'>注册账号</span>
<span style="color: #9c9fa4">|</span>
<span :class="titleIndex==1 ? 'tabbarItemActive' : 'tabbarItemNoActive'"
@click='changePage(1)'>账号登录</span>
<span style="color: #9c9fa4">|</span>
<span :class="titleIndex==2 ? 'tabbarItemActive' : 'tabbarItemNoActive'"
@click='changePage(2)'>忘记密码</span>
</view> -->
</view>
<configPopup ref="popup"></configPopup>
</view>
</template>
<script>
import configPopup from '@/components/config/configPopup.vue';
export default {
components: {
configPopup
},
onLoad(option) {
this.titleIndex = option.index || 1
},
data() {
return {
titleIndex: 0,
titleList: ['注册', '登录', '重置密码'],
checkboxValue: [],
form: {
account: '13135294009',
password: 'lzx123456',
},
form1: {
userName: '',
code: '',
password1: '',
password2: '',
},
tips: '获取验证码',
seconds: 60,
}
},
methods: {
submit(){
if(!this.checkboxValue.length){
return uni.showToast({
title: '请先同意隐私协议',
icon:'none'
})
}
if(this.$utils.verificationAll(this.form, {
account: '请输入账号',
password: '请输入密码',
})){
return
}
this.$store.commit('accountLogin', this.form)
},
//
changePage(index) {
this.titleIndex = index
},
confirm() {
},
codeChange(text) {
this.tips = text;
},
getCode() {
if (this.$refs.code.canGetCode) {
//
uni.showLoading({
title: '正在获取验证码'
})
setTimeout(() => {
uni.hideLoading();
// this.start()
uni.$uv.toast('验证码已发送');
//
this.$refs.code.start();
}, 2000);
} else {
uni.$uv.toast('请勿重复发送');
}
},
end() {
// uni.$uv.toast('');
},
start() {
// uni.$uv.toast('');
}
}
}
</script>
<style lang="scss" scoped>
* {
box-sizing: border-box;
}
.refundsOrExchange {
background-color: #FFF;
height: 100vh;
.frame {
background-color: #FFF;
.loginRegister {
display: flex;
flex-direction: column;
gap: 40rpx;
.title {
display: flex;
justify-content: center;
align-items: flex-end;
height: 10vh;
color: #000;
font-size: 40rpx;
font-weight: 700;
}
.userIamge {
display: flex;
justify-content: center;
height: 10vh;
>view:nth-of-type(1) {
width: 25%;
height: 100%;
border-radius: 50%;
overflow: hidden;
}
}
.form {
line-height: 50rpx;
>view:nth-of-type(1) {
padding: 20rpx 100rpx;
}
>view:nth-of-type(2) {
padding: 0 100rpx;
}
>view:nth-of-type(3) {
display: flex;
padding: 30rpx 100rpx 0 100rpx;
font-size: 22rpx
}
}
}
.btn {
// height: 5vh;
display: flex;
justify-content: center;
margin: 90rpx 0 0 0;
.a {
display: flex;
justify-content: center;
align-items: center;
width: 70%;
height: 80rpx;
color: #FFF;
background-color: $uni-color;
border: 1px solid red;
border-radius: 100rpx;
font-size: 30rpx;
}
}
.bottomTab {
display: flex;
justify-content: space-between;
height: 10vh;
padding: 0 80rpx;
margin-top: 30rpx;
.tabbarItemActive {
color: $uni-color;
}
.tabbarItemNoActive {
color: #9c9fa4;
}
}
.forgetPassword {
padding: 100rpx 40rpx 0 40rpx;
.title {
display: flex;
justify-content: center;
align-items: flex-end;
height: 10vh;
color: #000;
font-size: 40rpx;
font-weight: 700;
}
.form1 {
display: flex;
flex-direction: column;
gap: 30rpx;
margin-top: 20rpx;
padding: 20rpx 80rpx;
.userName {
// padding: 20rpx 100 rpx;
}
.code {
display: flex;
width: 100%;
.left {
width: 55%;
}
.right {
width: 45%;
height: 100%;
>view:nth-of-type(1) {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
}
}
}
.password1 {}
.password2 {}
}
}
}
}
</style>

+ 151
- 0
pages_order/auth/wxLogin.vue View File

@ -0,0 +1,151 @@
<template>
<view class="login">
<view class="logo">
<image :src="configList.logo_image" mode=""></image>
</view>
<view class="title">
欢迎使用{{ configList.logo_name }}
</view>
<view class="btn mt"
@click="wxLogin">
<view class="icon">
<image src="../static/auth/wx.png" mode=""></image>
</view>
<view class="">
微信授权登录
</view>
</view>
<!-- <view class="btn b2">
使用短信验证登录
</view> -->
<view class="config">
<uv-checkbox-group
v-model="checkboxValue"
shape="circle">
<view class="content">
<view
style="display: flex;">
<uv-checkbox
size="40rpx"
icon-size="30rpx"
activeColor="#A3D250"
:name="1"
></uv-checkbox>
阅读并同意我们的<text @click="$refs.popup.open('user_xy')">用户协议</text>
</view>
<view class="">
以及<text @click="$refs.popup.open('user_ys')">隐私政策</text>
</view>
</view>
</uv-checkbox-group>
</view>
<configPopup ref="popup"></configPopup>
</view>
</template>
<script>
export default {
name : 'Login',
data() {
return {
checkboxValue : []
}
},
methods: {
wxLogin(){
if(!this.checkboxValue.length){
return uni.showToast({
title: '请先同意隐私协议',
icon:'none'
})
}
this.$store.commit('login')
},
//
openConfigDetail(key){
this.$refs.popup.open(key)
}
}
}
</script>
<style scoped lang="scss">
.login{
display: flex;
justify-content: center;
align-items: center;
height: 80vh;
flex-direction: column;
position: relative;
.logo{
height: 140rpx;
width: 140rpx;
image{
height: 140rpx;
width: 140rpx;
border-radius: 30rpx;
}
margin-bottom: 20rpx;
}
.title{
position: relative;
font-weight: 900;
font-size: 45rpx;
&::after{
content: '';
position: absolute;
left: 0;
top: 100%;
display: block;
height: 8rpx;
width: 210rpx;
background: linear-gradient(to right,$uni-color, #fff);
}
}
.btn{
width: 80%;
height: 100rpx;
background-color: $uni-color;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
margin: 20rpx 0;
border-radius: 20rpx;
.icon{
margin-right: 10rpx;
image{
width: 40rpx;
height: 35rpx;
}
}
}
.b2{
background-color: rgba($uni-color, 0.2);
color: $uni-color;
}
.mt{
margin-top: 200rpx;
}
.config{
position: absolute;
bottom: 0;
font-size: 24rpx;
text-align: center;
line-height: 40rpx;
text{
color: $uni-color;
}
}
}
</style>

+ 136
- 0
pages_order/auth/wxUserInfo.vue View File

@ -0,0 +1,136 @@
<template>
<view class="login">
<view class="title">
{{ configList.logo_name }}
</view>
<view class="title">
申请获取你的头像昵称
</view>
<button class="chooseAvatar" open-type="chooseAvatar" @chooseavatar="onChooseAvatar">
<view class="line">
<view class="">
头像
</view>
<view class="">
<image :src="userInfo.headImage" v-if="userInfo.headImage" style="width: 60rpx;height: 60rpx;"
mode=""></image>
<image src="../static/auth/headImage.png" v-else style="width: 50rpx;height: 50rpx;" mode=""></image>
</view>
</view>
</button>
<view class="line">
<view class="">
昵称
</view>
<view class="">
<input type="nickname" placeholder="请输入昵称" style="text-align: right;" id="nickName"
v-model="userInfo.nickName" />
</view>
</view>
<view class="btn" @click="submit">
确认
</view>
</view>
</template>
<script>
export default {
data() {
return {
userInfo: {
headImage: '',
nickName: '',
}
};
},
onShow() {},
computed: {},
methods: {
onChooseAvatar(res) {
let self = this
self.$Oss.ossUpload(res.target.avatarUrl)
.then(url => {
self.userInfo.headImage = url
})
},
submit() {
let self = this
uni.createSelectorQuery().in(this)
.select("#nickName")
.fields({
properties: ["value"],
})
.exec((res) => {
const nickName = res?.[0]?.value
self.userInfo.nickName = nickName
if (self.$utils.verificationAll(self.userInfo, {
headImage: '请选择头像',
nickName: '请填写昵称',
})) {
return
}
self.$api('updateInfo', {
avatarUrl : self.userInfo.headImage,
nickName : self.userInfo.nickName
}, res => {
if (res.code == 200) {
uni.reLaunch({
url:'/pages/index/index'
})
}
})
})
},
}
}
</script>
<style lang="scss" scoped>
.login {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 80vh;
.title {
line-height: 45rpx;
font-weight: 900;
}
.line {
display: flex;
justify-content: space-between;
align-items: center;
width: 80%;
border-bottom: 1px solid #00000023;
padding: 30rpx 0;
margin: 0 auto;
}
.chooseAvatar {
width: 100%;
padding: 0;
margin: 0;
margin-top: 10vh;
border: none;
}
.btn {
// background: $uni-linear-gradient-btn-color;
background: $uni-color;
color: #fff;
width: 80%;
padding: 20rpx 0;
text-align: center;
border-radius: 15rpx;
margin-top: 10vh;
}
}
</style>

+ 244
- 0
pages_order/components/address/addressList.vue View File

@ -0,0 +1,244 @@
<template>
<scroll-view
scroll-y="true"
:style="{height: height}"
@scrolltolower="moreAddress">
<uv-radio-group v-model="selectAddress"
@change="editDefault"
v-if="addressList.length > 0">
<view v-for="item in addressList" :key="item.id" class="address-item">
<view class="address-item-top"
@click="select(item)">
<view class="img-box">
<image src="../../static/address/icon1.png" mode="aspectFill"></image>
</view>
<view class="address-info">
<view class="user-info">
<text class="user-name">{{ item.name }}</text>
<text class="user-phone">{{ item.phone }}</text>
<text v-if="item.defaultFlag == 1" class="is-default">默认</text>
</view>
<view class="address-detail">
{{ item.address + " " + item.addressDetails }}
</view>
</view>
</view>
<view class="controls"
v-if="controls">
<view class="default-checkbox">
<uv-radio
:name="item.id"
label-disabled
size="30rpx"
icon-size="30rpx">
默认地址
</uv-radio>
</view>
<view class="edit-btn">
<uv-icon name="edit-pen"></uv-icon>
<text @click="editAddress(item)" class="control-title">编辑</text>
</view>
<view class="del-btn">
<uv-icon name="trash"></uv-icon>
<text class="control-title" @click="deleteAddress(item.id)">删除</text>
</view>
</view>
</view>
</uv-radio-group>
<view
style="padding: 100rpx 0;"
v-else>
<uv-empty
mode="history"
textSize="28rpx"
iconSize="100rpx"/>
</view>
</scroll-view>
</template>
<script>
export default {
props : {
controls : {
default : false,
type : Boolean,
},
height : {
default : 'calc(90vh - 180rpx)'
}
},
data() {
return {
selectAddress : 0,
queryParams: {
pageNo: 1,
pageSize: 10,
},
addressList: [],
total : 0,
}
},
methods: {
//
getAddressList() {
return new Promise((success, fail) => {
this.$api('getAddressPageList', this.queryParams, res => {
if (res.code == 200) {
this.addressList = res.result.records || [];
this.total = res.result.total || 0;
res.result.records.forEach(n => { //
if (n.defaultFlag == 1) {
this.selectAddress = n.id
}
})
success(res.result)
}
})
})
},
//
moreAddress(){
if(this.queryParams.pageSize > this.total){
return
}
this.queryParams.pageSize += 10
this.getAddressList()
},
//
deleteAddress(e){
this.$emit('deleteAddress', e)
},
//
editAddress(e){
this.$emit('editAddress', e)
},
//
editDefault(e){
this.$emit('editDefault', e)
},
//
select(e){
this.$emit('select', e)
},
}
}
</script>
<style scoped lang="scss">
.address-item {
background: white;
border-radius: 20rpx;
overflow: hidden;
margin-bottom: 20rpx;
padding: 15rpx 15rpx 0rpx 15rpx;
width: 680rpx;
.address-item-top {
border-bottom: 1px dashed #D3D1D1;
display: flex;
align-items: center;
padding: 0rpx 0rpx 15rpx 0rpx;
.img-box {
width: 100rpx;
height: 120rpx;
image {
width: 75%;
height: 75%;
display: block;
margin: 12.5% auto;
}
}
.address-info {
width: calc(100% - 120rpx);
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
.user-info {
display: flex;
align-items: center;
text {
display: block;
line-height: 40rpx;
margin-right: 20rpx;
}
.user-name,
.user-phone {
font-size: 30rpx;
}
.is-default {
display: flex;
align-items: center;
justify-content: center;
background: #FEB773;
color: white;
width: 80rpx;
height: 35rpx;
border-radius: 20rpx;
font-size: 22rpx;
}
}
.address-detail {
color: #4a4a4a;
font-size: 26rpx;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
text-overflow: ellipsis;
}
}
}
.controls {
display: flex;
align-items: center;
justify-content: space-between;
align-items: center;
font-size: 26rpx;
padding: 15rpx 15rpx 25rpx 15rpx;
.default-checkbox {
display: flex;
text {
margin-left: 8rpx;
}
}
.control-title {
height: 30rpx;
line-height: 30rpx;
color: #666666;
}
view {
display: flex;
align-items: center;
}
image {
width: 23rpx;
height: 23rpx;
vertical-align: middle;
margin-right: 8rpx;
}
}
}
</style>

+ 224
- 0
pages_order/components/address/redactAddress.vue View File

@ -0,0 +1,224 @@
<template>
<uv-popup round="40rpx" ref="addressPopup" :customStyle="{ height: 'auto' , width : '100%' , padding : '20rpx'}">
<view class="redact-address">
<view class="redact-address-title">{{title}}</view>
<uv-form label-width="210rpx" :model="addressDetail" ref="form">
<uv-form-item label="联系人" prop="name">
<uv-input v-model="addressDetail.name" placeholder="请输入联系人姓名" border="none">
</uv-input>
</uv-form-item>
<uv-form-item label="手机号" prop="phone">
<uv-input v-model="addressDetail.phone" placeholder="请输入手机号" border="none">
</uv-input>
</uv-form-item>
<uv-form-item label="所在地区" prop="address">
<uv-input v-model="addressDetail.address" placeholder="请选择所在地区" border="none">
</uv-input>
<template #right>
<view style="padding-right: 40rpx;color: #FBAB32;" @click.stop="selectAddr">
<image src="../../static/address/selectIcon.png" mode="aspectFit"></image>定位
</view>
</template>
</uv-form-item>
<uv-form-item label="详细地址" prop="addressDetail">
<uv-input v-model="addressDetail.addressDetails" placeholder="请输入详细地址" border="none">
</uv-input>
</uv-form-item>
</uv-form>
<view @click="onSubmit" class="save">{{ addressDetail.id ? '修改地址' : '新增地址'}}</view>
</view>
</uv-popup>
</template>
<script>
import Position from '@/utils/position.js'
export default {
data() {
return {
addressDetail: {}
}
},
props: {
title: {
type: String,
default: '新增地址'
}
},
methods: {
open(addressDetail) {
this.addressDetail = addressDetail
this.$refs.addressPopup.open('bottom')
},
close(){
this.$refs.addressPopup.close()
},
//
onSubmit() {
let isOk = this.parameterVerification(this.addressDetail)
if (isOk && !isOk.auth) {
return uni.showToast({
icon: 'none',
title: isOk.title,
'zIndex': 10000
})
}
this.$emit('saveOrUpdate', this.addressDetail)
},
//
parameterVerification(addressForm) {
let {
name,
phone,
address,
addressDetails
} = addressForm
if (name.trim() == '') {
return {
title: '请填写联系人',
auth: false
}
} else if (phone.trim() == '') {
return {
title: '请填写手机号',
auth: false
}
} else if (address.trim() == '') {
return {
title: '请填写所在地区',
auth: false
}
} else if (addressDetails.trim() == '') {
return {
title: '请填写详细地址',
auth: false
}
} else if (phone.trim() != '') {
if (!this.$utils.verificationPhone(phone)) {
return {
title: '手机号格式不合法',
auth: false
}
}
}
return {
title: '验证通过',
auth: true
}
},
//
selectAddr() {
// Position.getLocation(res => {
Position.selectAddress(0, 0, success => {
this.setAddress(success)
})
// })
},
//
setAddress(res) {
//
this.addressDetail.latitude = res.latitude
this.addressDetail.longitude = res.longitude
if (!res.address && res.name) { //
return this.addressDetail.address = res.name
}
if (res.address || res.name) {
return this.addressDetail.address = res.address + res.name
}
this.addressDetail.address = '' //
},
}
}
</script>
<style lang="scss" scoped>
.redact-address {
box-sizing: border-box;
.redact-address-title {
height: 80rpx;
line-height: 80rpx;
font-size: 30rpx;
color: #333333;
font-weight: 600;
}
.save {
display: flex;
align-items: center;
justify-content: center;
width: 90%;
height: 80rpx;
border-radius: 40rpx;
color: white;
font-size: 28rpx;
margin: 0rpx auto;
background: $uni-color;
margin-top: 150rpx;
}
image {
width: 25rpx;
height: 25rpx;
}
//
.uv-form {
padding: 30rpx 0rpx;
}
.uv-input__content__field-wrapper__field{
padding: 30rpx !important;
height: 180rpx !important;
}
&::v-deep .uv-cell {
padding: 0rpx 0rpx;
font-size: 26rpx;
&::after {
border: none !important;
}
.uv-field__label {
display: flex;
align-items: center;
height: 80rpx;
}
.uv-field__control,
.uv-field__right-icon {
height: 80rpx;
font-size: 26rpx;
border-bottom: 2rpx solid #cbc8c8;
}
.uv-field__right-icon {
display: flex;
align-items: center;
height: 78rpx;
color: #5FCC9F;
}
.uv-cell__value {
height: 120rpx;
}
}
&::v-deep .uv-field__error-message {
color: #5AC796;
font-size: 20rpx;
margin-top: 10rpx;
}
}
</style>

+ 122
- 0
pages_order/components/product/submit.vue View File

@ -0,0 +1,122 @@
<template>
<view class="submit">
<!-- <view class=""
@click="$emit('share')">
<uv-icon
size="40rpx"
name="share-square"></uv-icon>
<view class="">
分享
</view>
</view>
<view class=""
@click="$utils.navigateTo('/index/cart')">
<uv-icon
size="40rpx"
name="shopping-cart"></uv-icon>
<view class="">
购物车
</view>
</view> -->
<!-- <view class="btn"
@click="$emit('submit')">
{{ submiitTitle }}
</view> -->
<view class="submit-btn"
>
<view class="l"s
v-if="detail.type == 2"
@click="$emit('addCart')">
加入购物车
</view>
<view class="r"
@click="$emit('submit')">
{{ submiitTitle }}
</view>
</view>
</view>
</template>
<script>
export default {
name:"submit",
props : {
submiitTitle : {
default : '立即购买',
type : String,
},
detail : {
default : {}
},
},
data() {
return {
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.submit{
position: fixed;
bottom: 0;
left: 0;
width: 100vw;
background-color: #fff;
height: 100rpx;
display: flex;
justify-content: center;
align-items: center;
font-size: 24rpx;
// .btn{
// background: $uni-color;
// width: 600rpx;
// height: 80rpx;
// color: #fff;
// border-radius: 40rpx;
// font-size: 28rpx;
// }
// view{
// width: 100rpx;
// margin: 0 10rpx;
// display: flex;
// justify-content: center;
// align-items: center;
// flex-direction: column;
// }
.submit-btn{
width: 600rpx;
height: 80rpx;
color: #fff;
border-radius: 40rpx;
font-size: 28rpx;
margin: 20rpx auto;
display: flex;
justify-content: center;
align-items: center;
border: 1rpx solid $uni-color;
overflow: hidden;
.l{
flex: 1;
display: flex;
justify-content: center;
align-items: center;
color: $uni-color;
}
.r{
background: $uni-color;
flex: 1;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
}
}
</style>

+ 367
- 0
pages_order/components/product/submitUnitSelect.vue View File

@ -0,0 +1,367 @@
<template>
<uv-popup ref="popup"
:round="30"
bgColor="#f7f7f7">
<view class="content">
<!-- 地址 -->
<view class="address"
@click="openAddress">
<image src="../../static/address/selectIcon.png" mode=""></image>
<view class="">
{{ address.name }}
</view>
<view class="">
{{ address.addressDetail }}
</view>
<view class="icon">
<uv-icon
size="30rpx"
name="arrow-right"></uv-icon>
</view>
</view>
<!-- 商品信息和数量 -->
<view class="submit-info">
<view class="title">
桌布租赁
</view>
<view class="box">
<image
class="image"
:src="unit.pic"
mode=""></image>
<view class="info">
<view class="price">
<text>{{ unit.depositPrice }}</text>
</view>
<view class="unit">
请选择规格
</view>
<view class="">
<uv-number-box v-model="num"></uv-number-box>
</view>
</view>
</view>
</view>
<!-- 规格 -->
<!-- <view class="submit-unit">
<view class="title">
规格选择
</view>
<view class="list">
<view :class="{act : unitIndex == index}"
v-for="(item, index) in detail.hotelGoodsSkuList"
@click="selectUnit(item, index)"
:key="index">
{{ item.title }}
</view>
</view>
</view> -->
<!-- 费用明细 -->
<view class="expense-detail">
<view class="title">
费用明细
</view>
<view class="detail">
押金{{ unit.depositPrice }}
</view>
</view>
<!-- 提交按钮 -->
<view class="submit-btn">
<view class="l"
@click="addCart">
加入购物车
</view>
<view class="r"
@click="orderPay">
{{ submiitTitle }}
</view>
</view>
</view>
<uv-popup ref="addressPopup" :round="30">
<addressList
ref="addressList"
height="60vh"
@select="selectAddress"
/>
</uv-popup>
</uv-popup>
</template>
<script>
import addressList from '../address/addressList.vue'
export default {
components : {
addressList,
},
props : {
submiitTitle : {
default : '立即购买',
type : String,
},
detail : {
default : {}
}
},
data() {
return {
unitIndex : 0,
address : {
name : '请选择联系人',
addressDetail : '',
},
num : 1,
unit : {},
addressTotal : 0,
}
},
methods: {
//
open(){
this.$refs.popup.open('bottom')
if(!this.unit.id){
this.selectUnit(this.detail.hotelGoodsSkuList[0], 0)
}
//
this.$refs.addressList.getAddressList().then(res => {
this.addressTotal = res.total
if(this.addressTotal != 0){
this.address = res.records[0]
}
})
},
//
close(){
this.$refs.popup.close()
},
//
openAddress(){
if (this.addressTotal == 0) {
this.$refs.popup.close()
return uni.navigateTo({
url: '/pages_order/mine/address?type=back'
})
}
this.$refs.addressPopup.open('bottom')
},
//
selectAddress(e){
this.address = e
this.$refs.addressPopup.close()
},
//
selectUnit(item, index){
this.unit = item
this.unitIndex = index
},
addCart(){
this.$api('cartAdd', {
id : this.detail.id,
skuId : this.unit.id,
}, res => {
if(res.code == 200){
uni.showToast({
title: '添加成功',
});
this.$refs.popup.close()
}
})
},
orderPay(){
let data = {
id : this.detail.id,//id
skuId : this.unit.id,//id
addressId : this.address.id,//id
sku : this.unit.title,//
num : this.num,
}
if(this.$utils.verificationAll(data, {
skuId : '请选择规格',
addressId : '请选择地址',
})){
return
}
this.$api('orderPay', data, res => {
if(res.code == 200){
uni.redirectTo({
url: '/pages/index/order'
})
// uni.requestPayment({
// provider: 'wxpay', //
// timeStamp: res.result.timeStamp, //
// nonceStr: res.result.nonceStr, //
// package: res.result.packageValue,
// signType: res.result.signType, //
// paySign: res.result.paySign, //
// success: function (res) {
// console.log('',res);
// uni.redirectTo({
// url: '/pages/index/order'
// })
// },
// fail: function (err) {
// console.log('',err);
// uni.showToast({
// icon:'none',
// title:""
// })
// }
// });
}
})
},
}
}
</script>
<style scoped lang="scss">
.content{
max-height: 80vh;
overflow: hidden;
overflow-y: auto;
.address{
display: flex;
padding: 20rpx;
background-color: #fff;
image{
width: 30rpx;
height: 30rpx;
margin: 20rpx;
}
view{
margin: 20rpx;
overflow:hidden; //
text-overflow:ellipsis; //
white-space:nowrap; //
}
.icon{
margin-left: auto;
}
}
.submit-info{
background-color: #fff;
padding: 30rpx;
margin-top: 20rpx;
.title{
font-size: 30rpx;
padding: 10rpx;
font-weight: 600;
}
.box{
display: flex;
margin-top: 10rpx;
.image{
width: 200rpx;
height: 200rpx;
border-radius: 20rpx;
margin-right: 20rpx;
}
.info{
flex: 1;
.unit{
font-size: 24rpx;
padding: 10rpx 20rpx;
color: #717171;
display: flex;
align-items: center;
}
.price{
color: $uni-color;
font-size: 28rpx;
padding: 10rpx 20rpx;
text{
font-size: 36rpx;
font-weight: 900;
}
}
}
}
}
.submit-unit{
padding: 30rpx;
background-color: #fff;
.title{
font-size: 28rpx;
font-weight: 600;
}
.list{
display: flex;
flex-wrap: wrap;
font-size: 22rpx;
.act{
color: $uni-color;
border: 1px solid $uni-color;
background-color: #F9E7DE;
}
view{
border-radius: 15rpx;
width: 320rpx;
background-color: #F3F3F3;
border: 1px solid #F3F3F3;
margin: 10rpx;
display: flex;
justify-content: center;
padding: 15rpx 0;
}
}
}
.expense-detail{
padding: 30rpx;
background-color: #fff;
font-size: 28rpx;
.title{
font-weight: 600;
}
.detail{
background-color: #F6F6F6;
color: #717171;
margin: 10rpx 0;
padding: 10rpx 20rpx;
}
}
.submit-btn{
width: 600rpx;
height: 80rpx;
color: #fff;
border-radius: 40rpx;
font-size: 28rpx;
margin: 20rpx auto;
display: flex;
justify-content: center;
align-items: center;
border: 1rpx solid $uni-color;
overflow: hidden;
.l{
flex: 1;
display: flex;
justify-content: center;
align-items: center;
color: $uni-color;
}
.r{
background: $uni-color;
flex: 1;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
}
}
</style>

+ 351
- 0
pages_order/home/addEnterprise.vue View File

@ -0,0 +1,351 @@
<template>
<view class="applyLaundryStore">
<navbar title="渠道合作" leftClick @leftClick="$utils.navigateBack" />
<view class="frame">
<view class="title">
<span
style="width: 10rpx;height: 40rpx;background-color: #f78142;border-radius: 10rpx;overflow: hidden;"></span>
<span>申请信息</span>
</view>
<view class="shopName">
<view>类型</view>
<view>
<uv-radio-group v-model="form.type">
<uv-radio
v-for="(item, index) in typeList"
:key="index"
:customStyle="{margin: '16rpx'}"
size="40rpx"
iconSize="30rpx"
labelSize="30rpx"
:disabled="isUpdate"
:label="item.name"
:name="item.type">
</uv-radio>
</uv-radio-group>
</view>
</view>
<view class="shopName">
<view style="width: 300rpx;"
v-if="form.type">身份证</view>
<view style="width: 300rpx;"
v-else>营业执照</view>
<view>
<uv-upload
:fileList="fileList"
name="fileList"
:maxCount="2"
width="180rpx"
height="180rpx"
:disabled="isUpdate"
multiple
@afterRead="afterRead"
@delete="deleteImage">
</uv-upload>
</view>
</view>
<view class="shopName">
<view>姓名</view>
<view>
<input v-model="form.name"
:disabled="isUpdate" placeholder="请输入姓名" clearable></input>
</view>
</view>
<view class="shopName">
<view>性别</view>
<view>
<uv-radio-group v-model="form.sex">
<uv-radio
v-for="(item, index) in sexList"
:key="index"
:customStyle="{margin: '16rpx'}"
size="40rpx"
iconSize="30rpx"
:disabled="isUpdate"
labelSize="30rpx"
:label="item.name"
:name="item.name">
</uv-radio>
</uv-radio-group>
</view>
</view>
<view class="shopName">
<view>手机号</view>
<view>
<input v-model="form.phone"
:disabled="isUpdate" type="number" placeholder="请输入手机号" clearable></input>
</view>
</view>
<view class="shopName" v-if="form.type">
<view>身份证号</view>
<view>
<input v-model="form.no"
:disabled="isUpdate" placeholder="请输入身份证号" clearable></input>
</view>
</view>
<view class="shopName" v-else>
<view>社会信用代码</view>
<view>
<input v-model="form.no"
:disabled="isUpdate" placeholder="请输入社会信用统一代码" clearable></input>
</view>
</view>
<view class="shopName">
<view>邮寄地址</view>
<view>
<input v-model="form.address"
:disabled="isUpdate" placeholder="请输入邮寄地址" clearable></input>
</view>
</view>
</view>
<view class="config">
<uv-checkbox-group
v-model="checkboxValue"
shape="circle">
<view class="content">
<view
style="display: flex;">
<uv-checkbox
size="40rpx"
icon-size="30rpx"
activeColor="#A3D250"
:name="1"
></uv-checkbox>
阅读并同意我们的<text @click="$refs.popup.open('shop_user_xy')">合作协议</text>
</view>
</view>
</uv-checkbox-group>
</view>
<!-- 底部按钮 -->
<view class="uni-color-btn"
@click="submitApplication"
v-if="!isUpdate">
提交
</view>
<configPopup ref="popup"></configPopup>
</view>
</template>
<script>
import Position from '@/utils/position.js'
export default {
components: {
},
data() {
return {
checkboxValue : [],
form: {
userName: '',
name: '',
phone: '',
sex : '男',
type : 0,
state : 0,
},
fileList: [],
sexList : [
{
name: '男',
},
{
name: '女',
},
],
typeList : [
{
name: '企业',
type : 0,
},
{
name: '个人',
type : 1,
},
],
}
},
computed: {
isUpdate(){
return this.form.state == 1
},
},
onShow() {
},
onLoad() {
this.getData()
},
methods: {
deleteImage(e){
this[e.name].splice(e.index, 1)
},
afterRead(e){
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self[e.name].push({
url
})
})
})
},
//
submitApplication() {
if(!this.checkboxValue.length){
return uni.showToast({
title: '请先同意合作协议',
icon:'none'
})
}
this.form.image = this.fileList.map((item) => item.url).join(",")
let p = {
image: '请上传店铺照片',
name: '请输入您的姓名',
phone: '请输入联系电话',
no: '请输入社会信用代码',
address: '请输入邮寄地址',
}
if(this.form.type){
p.no = '请输入身份证号'
}
if (this.$utils.verificationAll(this.form, p)) {
return
}
if(!this.$utils.verificationPhone(this.form.phone)){
return uni.showToast({
title: '手机号格式不正确',
icon:'none'
})
}
this.$api('addOrUpdateCommonUser', this.form, res => {
if (res.code == 200) {
uni.showToast({
title: '申请成功待审核', //
icon: 'success', // 'success', 'loading', 'none'
duration: 1500 // 1500
});
setTimeout(uni.navigateBack, 1000, -1)
}
})
},
getData(){
this.$api('getCommonUser', res => {
if(res.code == 200){
this.form = res.result
delete this.form.userId
delete this.form.createTime
delete this.form.createBy
delete this.form.state
delete this.form.updateBy
delete this.form.updateTime
res.result.image && res.result.image.split(',')
.forEach(url => {
this.fileList.push({
url
})
})
}
})
},
}
}
</script>
<style lang="scss" scoped>
* {
box-sizing: border-box;
}
.applyLaundryStore {
padding: 0 20rpx 0 20rpx;
background-color: #f5f5f5;
.frame {
display: flex;
flex-direction: column;
gap: 20rpx;
background-color: #FFF;
margin-top: 20rpx;
padding: 20rpx;
.title {
display: flex;
// padding-top: 40rpx;
font-size: 34rpx;
font-weight: 700;
padding: 0 0 0 20rpx;
>span:nth-of-type(1) {
margin: 4rpx 0 0 8rpx;
background-color: #FFF;
}
>span:nth-of-type(2) {
margin: 0 0 0 8rpx;
background-color: #FFF;
}
}
.shopName {
display: flex;
align-items: center;
background-color: #FFF;
// margin: 10rpx 0 0 0;
padding: 10rpx 0 0 20rpx;
>view:nth-of-type(1) {
width: 30%;
// font-weight: 700;
}
>view:nth-of-type(2) {
width: 70%;
// padding: 0 20rpx 0 0;
border-radius: 10rpx;
overflow: hidden;
input {
background-color: #f5f5f5;
// color: #a4a4a4;
font-size: 28rpx;
padding: 8rpx 8rpx 8rpx 15rpx;
}
}
}
}
.config{
font-size: 26rpx;
padding: 20rpx;
/deep/ .uv-checkbox-group{
display: flex;
justify-content: center;
}
text{
color: $uni-color;
}
}
}
</style>

+ 88
- 0
pages_order/home/contact.vue View File

@ -0,0 +1,88 @@
<template>
<view class="page">
<navbar title="联系我们" leftClick @leftClick="$utils.navigateBack" />
<view class="box">
<view class=""
v-if="configList.wx_image">
<image :src="configList.wx_image" mode="aspectFill"></image>
<view class="uni-color-btn"
@click="saveImage(configList.wx_image)">
保存二维码
</view>
</view>
<view class=""
v-if="configList.phone">
全国联系电话{{ configList.phone }}
<view class="uni-color-btn"
@click="confirm">
拨打电话
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
//
confirm() {
uni.makePhoneCall({
phoneNumber: this.configList.phone,
success() {
console.log('安卓拨打成功');
},
fail() {
console.log('安卓拨打失败');
}
})
},
saveImage(image){
/* 获取图片的信息 */
uni.getImageInfo({
src: image,
success: function(image) {
/* 保存图片到手机相册 */
uni.saveImageToPhotosAlbum({
filePath: image.path,
success: function() {
uni.showModal({
title: '保存成功',
content: '图片已成功保存到相册',
showCancel: false
});
},
complete(res) {
console.log(res);
}
});
}
});
},
}
}
</script>
<style scoped lang="scss">
.page{
.box{
display: flex;
justify-content: center;
align-items: center;
height: 70vh;
flex-direction: column;
gap: 40rpx;
image{
width: 400rpx;
height: 400rpx;
}
}
}
</style>

+ 75
- 0
pages_order/home/introduce.vue View File

@ -0,0 +1,75 @@
<template>
<view class="page">
<navbar :title="title[type]" leftClick @leftClick="$utils.navigateBack" />
<view class="box">
<view class="box-imgs">
<view
:key="index"
@click="$utils.navigateTo(`/pages_order/home/notice?id=${item.id}&type=${type}`)"
class="box-img"
v-for="(item, index) in list">
<image :src="item.image" mode="aspectFill"></image>
<view>{{ item.title }}</view>
</view>
</view>
</view>
</view>
</template>
<script>
import mixinsList from '@/mixins/list.js'
export default {
mixins: [mixinsList],
data() {
return {
mixinsListApi: 'getInfoIntroduce',//
title : ['公司介绍', '产品介绍', '关于我们', '其他'],
type : 0,
}
},
onLoad({type}) {
this.type = type || 0
this.queryParams.type = this.type
},
computed: {},
methods: {}
}
</script>
<style scoped lang="scss">
.page {
height: 100Vh;
background-color: #F3F3F3;
.box {
margin: 20rpx;
image{
width: 220rpx;
height: 400rpx;
}
.box-imgs {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.box-img{
border-radius: 20rpx;
overflow: hidden;
position: relative;
view{
position: absolute;
left: 50%;
transform: translate(-50%);
bottom: 80rpx;
color: #fff;
background-color: #A3D250;
border-radius: 30rpx;
width: 80%;
height: 60rpx;
line-height: 60rpx;
text-align: center;
}
}
}
}
}
</style>

+ 73
- 0
pages_order/home/journalism.vue View File

@ -0,0 +1,73 @@
<template>
<view class="page">
<navbar title="新闻中心" leftClick @leftClick="$utils.navigateBack" />
<view class="card"
@click="$utils.navigateTo('/pages_order/home/newsDetail?id=' + item.id)"
v-for="(item, index) in list" :key="item.id">
<view class="card-img">
<image :src="item.image &&
item.image.split(',')[0]" mode="aspectFill"></image>
</view>
<view>
{{ item.title }}
</view>
<view class="text">
{{ item.descValue }}
</view>
</view>
</view>
</template>
<script>
import mixinsList from '@/mixins/list.js'
export default {
mixins: [mixinsList],
data() {
return {
mixinsListApi: 'getRiceNewsList',
}
},
computed: {},
methods: {}
}
</script>
<style scoped lang="scss">
.page {
height: 100Vh;
background-color: #F3F3F3;
.card {
margin: 30rpx;
background-color: #fff;
overflow: hidden;
border-radius: 20rpx;
.card-img {
height: 250rpx;
width: 100%;
image {
width: 100%;
height: 100%;
}
}
view:nth-child(2) {
font-size: 32rpx;
color: #474747;
padding: 20rpx;
font-weight: 500;
}
.text {
font-size: 24rpx;
color: #A2A2A2;
padding: 0rpx 20rpx 40rpx;
}
}
}
</style>

+ 40
- 0
pages_order/home/newsDetail.vue View File

@ -0,0 +1,40 @@
<template>
<view class="page">
<navbar title="详情" leftClick @leftClick="$utils.navigateBack" />
<view style="padding: 20rpx;">
<uv-parse :content="detail.details"></uv-parse>
</view>
</view>
</template>
<script>
export default {
data() {
return {
detail: {},
id: 0,
}
},
onLoad(args) {
this.id = args.id
this.queryNewsById()
},
methods: {
//-id
queryNewsById() {
this.$api('getRiceNewsDetail', {
id: this.id
}, res => {
if (res.code == 200) {
this.detail = res.result
}
})
},
}
}
</script>
<style scoped lang="scss">
.page {}
</style>

+ 58
- 0
pages_order/home/notice.vue View File

@ -0,0 +1,58 @@
<template>
<!-- 公告 -->
<view class="page">
<navbar :title="title" leftClick @leftClick="$utils.navigateBack" />
<view style="padding: 20rpx;">
<uv-parse :content="notice"></uv-parse>
</view>
</view>
</template>
<script>
export default {
data() {
return {
notice : {},
id : 0,
title : '公告',
titles : ['公司介绍', '产品介绍', '关于我们', '其他'],
}
},
onLoad({id, type}) {
if(type){
this.title = this.titles[type]
}
if(id){
this.id = id
this.getInfoIntroduce()
}else{
this.getRiceNoticeList()
}
},
methods: {
//
getRiceNoticeList(){
this.$api('getRiceNoticeList', res => {
if(res.code == 200){
this.notice = res.result.content
}
})
},
//
getInfoIntroduce(){
this.$api('getInfoIntroduceDetail', {
id : this.id
}, res => {
if(res.code == 200){
this.notice = res.result.details
}
})
},
}
}
</script>
<style scoped lang="scss">
.page {
}
</style>

+ 213
- 0
pages_order/mine/address.vue View File

@ -0,0 +1,213 @@
<template>
<view class="address">
<navbar title="地址管理" leftClick @leftClick="leftClick" />
<view class="address-list">
<addressList
controls
ref="addressList"
@deleteAddress="deleteAddress"
@editAddress="editAddress"
@editDefault="editDefault"/>
</view>
<redactAddress
ref="addressPopup"
:addressDetail="addressDetail"
@saveOrUpdate="saveOrUpdate"
:title="title"></redactAddress>
<view class="add-btn">
<view @click="addBtn" class="btn">
新增地址
</view>
</view>
</view>
</template>
<script>
import redactAddress from '../components/address/redactAddress.vue'
import addressList from '../components/address/addressList.vue'
export default {
components: {
redactAddress,
addressList
},
data() {
return {
title: '新增地址',
type : '',
}
},
onLoad(args) {
this.type = args.type
if(this.type == 'back'){
this.addBtn()
}
},
onShow() {
this.getAddressList()
},
methods: {
//
getAddressList() {
this.$refs.addressList.getAddressList()
},
//
editAddress(address) {
this.$refs.addressPopup.open({...address})
},
//
leftClick() {
uni.navigateBack(-1)
},
//
saveOrUpdate(addressDetail) {
let data = {
name: addressDetail.name,
phone: addressDetail.phone,
address: addressDetail.address,
addressDetails: addressDetail.addressDetails,
defaultFlag: addressDetail.defaultFlag || '0',
latitude: addressDetail.latitude,
longitude: addressDetail.longitude
}
if (addressDetail.id) {
data.id = addressDetail.id
}
this.$api('addOrUpdateAddress', data, res => {
if (res.code == 200) {
this.$refs.addressPopup.close()
this.getAddressList()
if(this.type == 'back'){
uni.navigateBack(-1)
}
uni.showToast({
title: '操作成功',
icon: 'none'
})
}
})
},
//
editDefault(id) {
this.$api('updateDefaultAddress', {
id: id,
}, res => {
if (res.code == 200) {
this.$refs.addressPopup.close()
uni.showToast({
title: '操作成功',
icon: 'none'
})
this.getAddressList()
}
})
},
//
deleteAddress(id) {
let self = this
uni.showModal({
title: '删除地址',
content: '确认删除此地址?删除后数据不可恢复',
success(e) {
if(e.confirm){
self.$api('deleteAddress', {
id
}, res => {
if (res.code == 200) {
uni.showToast({
title: '删除成功',
icon: 'none'
})
self.getAddressList()
}
})
}
}
})
},
//
addBtn() {
this.title = '新增地址'
this.$refs.addressPopup.open({ //
name: '',
phone: '',
address: '',
addressDetails: '',
defaultFlag: '',
latitude: '',
longitude: ''
})
},
}
}
</script>
<style lang="scss" scoped>
.address {
width: 750rpx;
margin: 0rpx auto;
background: #F5F5F5;
box-sizing: border-box;
min-height: 100vh;
.address-list {
padding: 40rpx 20rpx 120rpx 20rpx;
}
.add-btn {
position: fixed;
display: flex;
justify-content: center;
align-items: center;
left: 0;
bottom: 0;
width: 750rpx;
height: 100rpx;
background: white;
.btn {
display: flex;
align-items: center;
justify-content: center;
width: 85%;
height: 80rpx;
border-radius: 40rpx;
color: white;
text-align: center;
font-size: 28rpx;
background: $uni-color;
}
}
}
@media all and (min-width: 961px) {
.add-btn {
left: 50% !important;
transform: translateX(-50%);
}
}
//
:deep(.uni-system-choose-location) {
z-index: 99999 !important;
}
</style>

+ 143
- 0
pages_order/mine/balance.vue View File

@ -0,0 +1,143 @@
<template>
<view class="page">
<navbar title="收支明细"
bgColor="#A3D250"
color="#fff"
leftClick
@leftClick="$utils.navigateBack" />
<view class="bg"/>
<!-- <view class="price">
<view class="title">
我的余额
</view>
<view class="num">
{{ riceInfo.balance || 0 }}
</view>
</view> -->
<view class="cell">
<view class="cell-top">收支明细</view>
<view class="cell-box"
:key="index"
v-for="(item,index) in list">
<uv-cell-group>
<uv-cell
:title="item.title"
:label="item.createTime"
:center="true">
<template #value>
<view class="cell-text">
<view class="price-text"
v-if="item.type">{{ type[item.type] }}{{ item.money }}</view>
<view class="price-text add"
v-else>{{ type[item.type] }}{{ item.money }}</view>
<view class="tips">{{ state[item.state] }}</view>
</view>
</template>
</uv-cell>
</uv-cell-group>
</view>
</view>
</view>
</template>
<script>
import mixinsList from '@/mixins/list.js'
import { mapState } from 'vuex'
export default {
mixins : [mixinsList],
data() {
return {
mixinsListApi : 'getWaterPageList',
list : [],
type : ['+', '-'],
state : ['未到账', '已到账'],
}
},
computed: {
...mapState(['userInfo', 'riceInfo']),
},
onShow() {
this.$store.commit('getUserInfo')
this.$store.commit('getRiceInfo')
},
methods: {
}
}
</script>
<style scoped lang="scss">
.page{
.bg{
background-color: $uni-color;
height: 300rpx;
position: absolute;
left: 0;
width: 100%;
z-index: -1;
border-bottom-left-radius: 30rpx;
border-bottom-right-radius: 30rpx;
}
.price{
color: #FFFFFF;
padding: 40rpx;
.title{
color: #eee;
font-size: 28rpx;
}
.num{
font-size: 50rpx;
font-weight: 900;
margin-top: 10rpx;
}
}
.cell {
margin: 20rpx;
background-color: #FFFFFF;
border-radius: 16rpx;
.cell-top {
padding: 40rpx 34rpx;
color: #474747;
font-size: 34rpx;
font-weight: 600;
position: relative;
&::after{
content: '';
display: block;
position: absolute;
left: 55rpx;
bottom: 38rpx;
height: 10rpx;
width: 120rpx;
background: linear-gradient(to right, #fff, $uni-color);
}
}
.cell-text{
text-align: right;
.price-text{
font-size: 32rpx;
font-weight: 900;
}
.add{
color: #f40;
}
.tips{
font-size: 22rpx;
color: #aaa;
margin-top: 10rpx;
}
}
}
}
</style>

+ 132
- 0
pages_order/mine/commission.vue View File

@ -0,0 +1,132 @@
<template>
<view class="page">
<navbar title="佣金"
bgColor="#A3D250"
color="#fff"
leftClick
@leftClick="$utils.navigateBack" />
<view class="bg"/>
<view class="price">
<view class="title">
我的佣金
</view>
<view class="num">
16666
</view>
</view>
<view class="cell">
<view class="cell-top">收支明细</view>
<view class="cell-box"
:key="index"
v-for="(item,index) in list">
<uv-cell-group>
<uv-cell
:title="item.title"
:label="item.createTime"
:center="true">
<template #value>
<view class="cell-text">
<view class="price-text">{{ type[item.type] }}{{ item.money }}</view>
<view class="tips">已到账</view>
</view>
</template>
</uv-cell>
</uv-cell-group>
</view>
</view>
</view>
</template>
<script>
import mixinsList from '@/mixins/list.js'
export default {
mixins : [mixinsList],
data() {
return {
mixinsListApi : 'getWaterPageList',
type : ['+', '-'],
state : ['审核中', '成功', '失败'],
}
},
onShow() {
this.$store.commit('getUserInfo')
this.$store.commit('getRiceInfo')
},
methods: {
}
}
</script>
<style scoped lang="scss">
.page{
.bg{
background-color: $uni-color;
height: 160rpx;
position: absolute;
left: 0;
width: 100%;
z-index: -1;
border-bottom-left-radius: 30rpx;
border-bottom-right-radius: 30rpx;
}
.price{
background-color: #fff;
padding: 40rpx;
margin: 20rpx;
border-radius: 20rpx;
.title{
color: #777;
font-size: 28rpx;
}
.num{
font-size: 50rpx;
font-weight: 900;
margin-top: 10rpx;
}
}
.cell {
margin: 20rpx;
background-color: #FFFFFF;
border-radius: 16rpx;
.cell-top {
padding: 40rpx 34rpx;
color: #474747;
font-size: 34rpx;
font-weight: 600;
position: relative;
&::after{
content: '';
display: block;
position: absolute;
left: 55rpx;
bottom: 38rpx;
height: 10rpx;
width: 120rpx;
background: linear-gradient(to right, #fff, $uni-color);
}
}
.cell-text{
text-align: right;
.price-text{
color: #f40;
font-size: 32rpx;
font-weight: 900;
}
.tips{
font-size: 22rpx;
color: #aaa;
margin-top: 10rpx;
}
}
}
}
</style>

+ 172
- 0
pages_order/mine/help.vue View File

@ -0,0 +1,172 @@
<template>
<!-- 帮助与反馈 -->
<view class="help">
<navbar title="帮助与反馈" leftClick @leftClick="$utils.navigateBack" />
<view class="help-box">
<view>
<view class="help-issue">
<text>问题和意见</text>
<text style="color: #BD3624;">*</text>
</view>
<uv-textarea v-model="form.question" :count="true" border="none" height="400"
placeholder="请把发现的问题提交给我们,感谢您的参与(必填)"
:text-style="{color:'#BCB7B7',fontSize:'28rpx'}" />
</view>
<view>
<view class="help-issue">
<text>问题截图</text>
<!-- <text style="color: #BD3624;">*</text> -->
</view>
<view class="help-screenshot">
<uv-upload :fileList="fileList" multiple :maxCount="3" width="180rpx"
height="180rpx" multiple @afterRead="afterRead" @delete="deleteImage">
<image src="../static/help/uploading.png" mode="aspectFill"
style="width: 180rpx;height: 180rpx;" />
</uv-upload>
</view>
</view>
<view>
<view class="help-issue">
<text>联系方式</text>
<text style="color: #BD3624;">*</text>
</view>
<view class="form-sheet-cell">
<view>
联系姓名
</view>
<input placeholder="请输入联系姓名" v-model="form.name" />
</view>
<view class="form-sheet-cell">
<view>
联系电话
</view>
<input placeholder="请输入联系电话" v-model="form.phone" />
</view>
</view>
<view class="help-button">
<!-- <view>历史提交</view> -->
<view @click="submit">确认</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
form : {
question : '',
phone : '',
name : '',
image : '',
},
fileList: []
}
},
onLoad(args) {
},
methods: {
deleteImage(e){
this.fileList.splice(e.index, 1)
},
afterRead(e){
let self = this
e.file.forEach(file => {
self.$Oss.ossUpload(file.url).then(url => {
self.fileList.push({
url
})
})
})
},
submit(){
let data = JSON.parse(JSON.stringify(this.form))
if(this.$utils.verificationAll(this.form, {
question : '请输入你的问题和意见',//
// image : '',//
name : '请输入姓名',//
phone : '请输入手机号码',//
})){
return
}
data.image = this.fileList.map((item) => item.url).join(",")
this.$api('addAdvice', data, res => {
if(res.code == 200){
uni.showToast({
title: res.message,
icon:'none'
})
setTimeout(uni.navigateBack, 800, -1)
}
})
},
}
}
</script>
<style scoped lang="scss">
.help {
.help-box {
width: 92%;
margin-left: 4%;
.help-issue {
margin: 20rpx;
font-size: 28rpx;
font-weight: 600;
color: #333333;
}
.help-screenshot {
display: flex;
align-items: center;
background-color: #fff;
padding: 20rpx;
}
.form-sheet-cell{
display: flex;
background-color: #fff;
padding: 20rpx 30rpx;
font-size: 24rpx;
align-items: center;
view{
width: 150rpx;
}
}
.help-button {
display: flex;
justify-content: center;
font-size: 24rpx;
flex-shrink: 0;
margin-top: 60rpx;
view {
padding: 14rpx 120rpx;
border-radius: 38rpx;
}
view:nth-child(1) {
background: $uni-color;
color: #fff;
}
view:nth-child(2) {
color: #FFFDF6;
background-color: #C83741;
}
}
}
}
</style>

+ 247
- 0
pages_order/mine/promotion.vue View File

@ -0,0 +1,247 @@
<template>
<view class="promotion">
<navbar title="二维码"
bgColor="#A3D250"
color="#fff"
leftClick @leftClick="$utils.navigateBack" />
<view class="promotion-card">
<!-- <view class="user-info"> -->
<!-- <image class="image" :src="userInfo.headImage" mode="widthFix"></image> -->
<!-- <image class="image" src="../../static/logo.png" mode="widthFix"></image> -->
<!-- <view class="user-name">{{ userInfo.nickName }}</view> -->
<!-- <view class="user-name">湖南第一深情</view> -->
<!-- </view> -->
<!-- <view class="invitation-code-img">
<image
style="width: 400rpx;"
:src="imagePath" mode="widthFix"></image>
</view> -->
<image :src="userInfo.headImage" mode="aspectFill"
class="headImage"></image>
<image style="width: 100%;" :src="imagePath" mode="widthFix"></image>
<!-- <view class="invitation-code">加油站: {{ title }}</view> -->
<canvas id="myCanvas" type="2d" canvas-id="firstCanvas1"></canvas>
<view class="uni-color-btn"
@click="preservationImg(imagePath)">保存二维码</view>
</view>
</view>
</template>
<script>
import { mapState } from 'vuex'
export default {
name: 'Promotion',
computed: {
...mapState(['userInfo']),
},
data() {
return {
url: '',
title: '123123',
baseUrl: 'https://dianpin-img.xzaiyp.top/',
canvas: {},
imagePath: '',
}
},
onShow() {
this.getQrCode()
this.$store.commit('getUserInfo')
},
methods: {
getQrCode() {
this.$api('getInviteCode', res => {
if (res.code == 200) {
this.url = res.result.url
this.title = res.result.name
this.draw()
}
})
},
draw() {
uni.showLoading({
title: "拼命绘画中..."
})
wx.createSelectorQuery()
.select('#myCanvas') // canvasid
.fields({
node: true,
size: true
})
.exec((res) => {
const canvas = res[0].node
//
const ctx = canvas.getContext('2d')
// Canvas
const width = res[0].width
const height = res[0].height
//
const dpr = wx.getWindowInfo().pixelRatio
//dpr
// dpr 2 4
// 3 6
let Ratio = dpr * 2
console.log("bug", dpr)
canvas.width = width * dpr
canvas.height = height * dpr
this.canvas = canvas
ctx.scale(dpr, dpr)
ctx.clearRect(0, 0, width, height)
ctx.fillStyle = '#fff'
ctx.fillRect(0, 0, canvas.width, canvas.height)
//
// const image = canvas.createImage()
// image.onload = () => {
// ctx.drawImage(image, 30, 18, 40, 40)
// }
// image.src = '/public/img/wechar_1.png'
// image.src = this.userInfo.headImage
ctx.fillStyle = 'black'
ctx.font = '22px PingFangSC-regular';
//
// let nickName = this.userInfo.nickName || ''
// ctx.fillText(nickName, canvas.width / Ratio - nickName.length * 11, 40);
// ctx.font = '18px PingFangSC-regular';
//
let s = this.title || ''
ctx.fillText(s, canvas.width / Ratio - s.length * 11, 50);
//
const coderImage = canvas.createImage()
coderImage.src = this.baseUrl + this.url
coderImage.onload = () => {
ctx.drawImage(coderImage,
canvas.width / Ratio - 240 / 2, 100, 240, 240)
}
//
setTimeout(() => {
wx.canvasToTempFilePath({
x: 0,
y: 0,
width: this.canvas.width,
height: this.canvas.height,
canvas,
success: (res) => {
var tempFilePath = res.tempFilePath;
this.imagePath = tempFilePath
uni.hideLoading()
}
});
}, 600);
})
},
back() {
uni.navigateBack(-1)
},
preservationImg(img) {
let that = this
uni.authorize({
/* scope.writePhotosAlbum 类型是保存到相册 */
scope: 'scope.writePhotosAlbum',
success() {
/* 已授权进入 */
/* 保存图片到相册方法方法 */
that.imgApi(img);
},
complete(res) {
/* 判断如果没有授权就打开设置选项让用户重新授权 */
uni.getSetting({
success(res) {
if (!res.authSetting['scope.writePhotosAlbum']) {
/* 打开设置的方法 */
that.openInstall();
}
}
});
}
});
},
imgApi(image) {
/* 获取图片的信息 */
uni.getImageInfo({
src: image,
success: function(image) {
/* 保存图片到手机相册 */
uni.saveImageToPhotosAlbum({
filePath: image.path,
success: function() {
uni.showModal({
title: '保存成功',
content: '图片已成功保存到相册',
showCancel: false
});
},
complete(res) {
console.log(res);
}
});
}
});
},
}
}
</script>
<style lang="scss" scoped>
.promotion {
width: 100%;
height: 100vh;
background-color: $uni-color;
.promotion-card {
width: 90%;
margin: 140rpx auto 0rpx auto;
box-shadow: 0rpx 0rpx 15rpx rgba(0, 0, 0, .2);
border-radius: 40rpx;
padding: 40rpx 30rpx;
box-sizing: border-box;
background-color: #fff;
position: relative;
padding-top: 100rpx;
.headImage{
position: absolute;
height: 180rpx;
width: 180rpx;
border-radius: 50%;
top: -80rpx;
left: 50%;
transform: translate(-50%);
border: 10rpx solid #fff;
box-shadow: 0 0 10rpx 10rpx #00000013;
}
}
}
#myCanvas {
position: fixed;
left: 100%;
/* visibility: hidden */
/* visibility: hidden; */
/* margin-top: 100rpx; */
margin: 68rpx auto;
width: 750rpx;
height: 750rpx;
/* line-height: 20px; */
background-color: rgba(255, 255, 255, 1);
text-align: center;
}
</style>

+ 170
- 0
pages_order/mine/purse.vue View File

@ -0,0 +1,170 @@
<template>
<view class="purse">
<navbar title="提现" leftClick @leftClick="$utils.navigateBack" />
<view class="top-box">
<view class="top-one">
输入提现金额
</view>
<view class="top-two">
<view>168.88</view>
<view>全部提现</view>
</view>
<view class="top-three">
<view>可提现金额</view>
<view>168.88</view>
</view>
</view>
<view class="middle">
<view class="middle-one">提现说明</view>
<view style="padding-bottom: 20rpx;">
<view class="middle-two">
<view style="color: #A7D458;">1.</view>
<view>说明文本说明文本说明文本说明文本说明文本说明文本说明文本说明文本说明文本说明文本</view>
</view>
<view class="middle-two">
<view style="color: #A7D458;">2.</view>
<view>说明文本说明文本说明文本说明文本说明文本说明文本说明文本说明文本说明文本说明文本</view>
</view>
</view>
</view>
<view class="cell">
<view class="middle-one">提现记录</view>
<uv-cell-group>
<uv-cell :center="true" :border="false" v-for="(item,index) in 10" :key="index">
<template v-slot:title>
<text style="font-size: 28rpx;">提现</text>
</template>
<template v-slot:label>
<text style="font-size: 24rpx;color: #999; margin-top: 10rpx;">2024-11-12 12:56:48</text>
</template>
<template v-slot:value>
<view>
<view style="font-size: 28rpx;">+56.6</view>
<view style="font-size: 24rpx;color: #999; margin-top: 10rpx;">提现成功</view>
</view>
</template>
</uv-cell>
</uv-cell-group>
</view>
<view class="b-fiexd">
<view class="button-submit">确定提现</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
notice: ''
}
},
methods: {
}
}
</script>
<style scoped lang="scss">
.purse {
min-height: 100vh;
background-color: #F3F3F3;
.top-box {
height: 370rpx;
width: 100%;
background-image: url(../static/home/2.png);
background-size: 100% 100%;
.top-one {
font-size: 28rpx;
color: #FFF;
padding: 40rpx 20rpx 10rpx 20rpx;
}
.top-two {
display: flex;
justify-content: space-between;
align-items: center;
margin: 10rpx;
padding: 10rpx;
background-color: #FFF;
border-radius: 16rpx;
view:nth-child(1) {
font-size: 80rpx;
color: #474747;
}
view:nth-child(2) {
font-size: 28rpx;
color: #92D823;
}
}
.top-three {
display: flex;
padding: 10rpx 20rpx;
color: #474747;
font-size: 28rpx;
view:nth-child(2) {
color: #F53546;
}
}
}
.middle {
margin: 0 20rpx;
background-color: #fff;
border-radius: 16rpx;
margin-top: -70rpx;
.middle-one {
font-size: 34rpx;
color: #474747;
font-weight: 600;
padding: 40rpx 20rpx 10rpx;
}
.middle-two {
display: flex;
margin: 20rpx;
font-size: 26rpx;
color: #A2A2A2;
}
}
.cell {
margin: 20rpx;
background-color: #fff;
border-radius: 16rpx;
.middle-one {
font-size: 34rpx;
color: #474747;
font-weight: 600;
padding: 40rpx 20rpx 10rpx;
}
}
.button-submit {
width: 596rpx;
height: 90rpx;
line-height: 90rpx;
background: $uni-color;
border-radius: 46rpx;
margin: 20rpx auto;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC-Regular;
font-weight: 400;
text-align: center;
color: #ffffff;
}
}
</style>

+ 201
- 0
pages_order/mine/recharge.vue View File

@ -0,0 +1,201 @@
<template>
<view class="page">
<navbar title="充值"
bgColor="#A3D250"
color="#fff"
leftClick
@leftClick="$utils.navigateBack" />
<view class="bg"/>
<view class="price">
<view class="title">
请输入充值金额
</view>
<view class="input-box">
<view class="input">
<input type="text" v-model="form.money"/>
</view>
</view>
<view class="num">
余额{{ riceInfo.balance || 0 }}
</view>
</view>
<view class="cell">
<view class="cell-top">充值说明</view>
<view style="padding: 0 20rpx 20rpx 20rpx;">
<uv-parse :content="configList.recharge_instructions"></uv-parse>
</view>
</view>
<view class="uni-color-btn"
@click="submit">
充值
</view>
<!-- <view class="cell">
<view class="cell-top">提现记录</view>
<view class="cell-box"
:key="index"
v-for="(item,index) in list">
<uv-cell-group>
<uv-cell
:title="item.title"
:label="item.createTime"
:center="true">
<template #value>
<view class="cell-text">
<view class="price-text">-19.9</view>
<view class="tips">已到账</view>
</view>
</template>
</uv-cell>
</uv-cell-group>
</view>
</view> -->
</view>
</template>
<script>
import mixinsList from '@/mixins/list.js'
import { mapState } from 'vuex'
export default {
mixins : [mixinsList],
data() {
return {
// mixinsListApi : 'getWaterPageList',
list : [],
type : ['-', '+'],
form : {
money : 0,
},
}
},
computed: {
...mapState(['userInfo', 'riceInfo']),
},
onShow() {
this.$store.commit('getUserInfo')
this.$store.commit('getRiceInfo')
},
methods: {
submit(){
if(this.$utils.verificationAll(this.form, {
money : '请输入金额'
})){
return
}
if(this.form.money <= 0){
uni.showToast({
title: '输入金额必须大于0',
icon: 'none'
})
return
}
this.$api('recharge', res => {
if(res.code == 200){
uni.showToast({
title: '充值成功',
icon : 'none'
})
this.form.money = 0
setTimeout(uni.navigateBack, 800, -1)
}
})
},
}
}
</script>
<style scoped lang="scss">
.page{
.bg{
background-color: $uni-color;
height: 380rpx;
position: absolute;
left: 0;
width: 100%;
z-index: -1;
border-bottom-left-radius: 30rpx;
border-bottom-right-radius: 30rpx;
}
.price{
color: #FFFFFF;
padding: 40rpx;
.title{
color: #eee;
font-size: 28rpx;
}
.input-box{
background-color: #FFFFFF;
color: $uni-color;
display: flex;
justify-content: center;
border-radius: 30rpx;
align-items: center;
padding: 10rpx;
margin: 20rpx 0;
.input{
color: #000;
font-size: 40rpx;
font-weight: 900;
display: flex;
flex: 1;
input{
flex: 1;
padding: 14rpx 20rpx;
}
}
}
.num{
font-size: 30rpx;
font-weight: 900;
margin-top: 10rpx;
}
}
.cell {
margin: 20rpx;
background-color: #FFFFFF;
border-radius: 16rpx;
.cell-top {
padding: 40rpx 34rpx;
color: #474747;
font-size: 34rpx;
font-weight: 600;
position: relative;
&::after{
content: '';
display: block;
position: absolute;
left: 55rpx;
bottom: 38rpx;
height: 10rpx;
width: 120rpx;
background: linear-gradient(to right, #fff, $uni-color);
}
}
.cell-text{
text-align: right;
.price-text{
color: #f40;
font-size: 32rpx;
font-weight: 900;
}
.tips{
font-size: 22rpx;
color: #aaa;
margin-top: 10rpx;
}
}
}
}
</style>

+ 89
- 0
pages_order/mine/recommend.vue View File

@ -0,0 +1,89 @@
<template>
<view class="page">
<navbar title="推广明细" leftClick @leftClick="$utils.navigateBack" />
<view class="top">
<view class="top-text">
<view>{{ total }}</view>
<view>直推人数</view>
</view>
</view>
<view class="cell">
<view class="cell-top">推广明细</view>
<view class="cell-box"
:key="index"
v-for="(item,index) in list">
<uv-cell-group>
<uv-cell
:title="item.nickName"
:label="item.createTime"
:center="true">
<template #value>
<text style="font-weight: 600; font-size: 28rpx;">
{{ vipType[item.isPay] }}
</text>
</template>
</uv-cell>
</uv-cell-group>
</view>
</view>
</view>
</template>
<script>
import mixinsList from '@/mixins/list.js'
export default {
mixins : [mixinsList],
data() {
return {
mixinsListApi : 'getFansPageList',
vipType : ['普通会员', '黄金会员', '渠道商'],
}
},
onLoad(e) {},
methods: {
}
}
</script>
<style lang="scss" scoped>
.page {
background-color: #F3F3F3;
height: 100vh;
.top {
display: flex;
height: 400rpx;
justify-content: center;
align-items: center;
color: #474747;
.top-text {
text-align: center;
view:nth-child(1) {
font-size: 78rpx;
font-weight: 600;
}
view:nth-child(2) {
font-size: 28rpx;
}
}
}
.cell {
margin: 20rpx;
background-color: #FFFFFF;
border-radius: 16rpx;
.cell-top {
padding: 40rpx 34rpx;
color: #474747;
font-size: 34rpx;
font-weight: 600;
}
}
}
</style>

+ 88
- 0
pages_order/mine/runningWater.vue View File

@ -0,0 +1,88 @@
<template>
<view class="running-water">
<navbar :title="title[status]" leftClick @leftClick="leftClick" />
<view class="tab-box">
<view class="tab-box1" v-if="agentFlow && agentFlow.total">
<uv-cell center border :title="item.title"
v-for="(item, index) in agentFlow.records"
:value="x[item.type] + item.money" :label="item.createTime" />
</view>
<view
style="padding: 100rpx 0;"
v-else>
<uv-empty
mode="history"
textSize="28rpx"
iconSize="100rpx"/>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title : ['余额记录','提现记录','佣金记录'],
agentFlow : {
total : 0,
records : [
{
type : 0,
money : 100,
createTime : '2024-04-02 20:00',
title : "佣金提现",
},
{
type : 0,
money : 100,
createTime : '2024-04-02 20:00',
title : "佣金提现",
},
{
type : 0,
money : 100,
createTime : '2024-04-02 20:00',
title : "佣金提现",
},
]
},
x : ['+', '-' , '-' , '+'],
status : 0,
}
},
onLoad(e) {
this.status = e.status
},
methods: {
leftClick() { //
uni.navigateBack(-1)
},
getAgentFlow(){ //
let type = this.status;
this.$api('getAgentFlow', { type }, res => {
if(res.code == 200){
this.agentFlow = res.result
}
})
},
}
}
</script>
<style lang="scss" scoped>
.running-water{
width: 750rpx;
background: #F5F5F5;
margin: 0 auto;
min-height: 100vh;
.tab-box{
margin: 20rpx;
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
}
}
</style>

+ 219
- 0
pages_order/mine/withdraw.vue View File

@ -0,0 +1,219 @@
<template>
<view class="page">
<navbar title="提现"
bgColor="#A3D250"
color="#fff"
leftClick
@leftClick="$utils.navigateBack" />
<view class="bg"/>
<view class="price">
<view class="title">
请输入提现金额
</view>
<view class="input-box">
<view class="input">
<input type="text" v-model="form.money"/>
</view>
<view class=""
@click="selectAll">
全部提现
</view>
</view>
<view class="num">
可提现金额{{ riceInfo.canWithdraw || 0 }}
</view>
</view>
<view class="cell">
<view class="cell-top">提现说明</view>
<view style="padding: 0 20rpx;">
<uv-parse :content="configList.withdrawal_instructions"></uv-parse>
</view>
</view>
<view class="uni-color-btn"
@click="submit">
提现
</view>
<view class="cell">
<view class="cell-top">提现记录</view>
<view class="cell-box"
:key="index"
v-for="(item,index) in list">
<uv-cell-group>
<uv-cell
:title="item.title"
:label="item.createTime"
:center="true">
<template #value>
<view class="cell-text">
<view class="price-text"
v-if="item.type">{{ type[item.type] }}{{ item.money }}</view>
<view class="price-text add"
v-else>{{ type[item.type] }}{{ item.money }}</view>
<view class="tips">{{ state[item.state] }}</view>
</view>
</template>
</uv-cell>
</uv-cell-group>
</view>
</view>
</view>
</template>
<script>
import mixinsList from '@/mixins/list.js'
import { mapState } from 'vuex'
export default {
mixins : [mixinsList],
data() {
return {
mixinsListApi : 'getWaterPageList',
list : [],
type : ['+', '-'],
state : ['未到账', '已到账'],
form : {
money : 0,
},
}
},
computed: {
...mapState(['userInfo', 'riceInfo']),
},
onShow() {
this.$store.commit('getUserInfo')
this.$store.commit('getRiceInfo')
},
methods: {
selectAll(){
this.form.money = this.riceInfo.canWithdraw
},
submit(){
if(this.$utils.verificationAll(this.form, {
money : '请输入金额'
})){
return
}
if(this.form.money <= 0){
uni.showToast({
title: '输入金额必须大于0',
icon: 'none'
})
return
}
this.$api('withdraw', this.form, res => {
if(res.code == 200){
uni.showToast({
title: '提现成功',
icon : 'none'
})
this.form.money = 0
this.$store.commit('getUserInfo')
this.$store.commit('getRiceInfo')
this.getData()
}
})
},
},
}
</script>
<style scoped lang="scss">
.page{
.bg{
background-color: $uni-color;
height: 380rpx;
position: absolute;
left: 0;
width: 100%;
z-index: -1;
border-bottom-left-radius: 30rpx;
border-bottom-right-radius: 30rpx;
}
.price{
color: #FFFFFF;
padding: 40rpx;
.title{
color: #eee;
font-size: 28rpx;
}
.input-box{
background-color: #FFFFFF;
color: $uni-color;
display: flex;
justify-content: center;
border-radius: 30rpx;
align-items: center;
padding: 10rpx;
margin: 20rpx 0;
.input{
color: #000;
font-size: 40rpx;
font-weight: 900;
display: flex;
flex: 1;
input{
flex: 1;
padding: 14rpx 20rpx;
}
}
}
.num{
font-size: 30rpx;
font-weight: 900;
margin-top: 10rpx;
}
}
.cell {
margin: 20rpx;
background-color: #FFFFFF;
border-radius: 16rpx;
.cell-top {
padding: 40rpx 34rpx;
color: #474747;
font-size: 34rpx;
font-weight: 600;
position: relative;
&::after{
content: '';
display: block;
position: absolute;
left: 55rpx;
bottom: 38rpx;
height: 10rpx;
width: 120rpx;
background: linear-gradient(to right, #fff, $uni-color);
}
}
.cell-text{
text-align: right;
.price-text{
font-size: 32rpx;
font-weight: 900;
}
.add{
color: #f40;
}
.tips{
font-size: 22rpx;
color: #aaa;
margin-top: 10rpx;
}
}
}
}
</style>

+ 407
- 0
pages_order/order/createOrder.vue View File

@ -0,0 +1,407 @@
<template>
<view class="page">
<navbar title="下单支付" leftClick @leftClick="$utils.navigateBack" />
<view class="box">
<!-- 地址 -->
<view class="address" @click="openAddress">
<image src="../static/address/icon1.png" mode=""></image>
<view class="">
{{ address.name }}
</view>
<view class="">
{{ address.address }}
</view>
<view class="icon">
<uv-icon size="30rpx" name="arrow-right"></uv-icon>
</view>
</view>
<view class="productList">
<view class="item"
:key="index"
v-for="(item, index) in productList">
<view class="item-image">
<image :src="item.image &&
item.image.split(',')[0]"
mode="aspectFill"></image>
</view>
<view class="info">
<view class="title">
{{ item.title }}
</view>
<view class="desc">
{{ item.sku }}
</view>
<view class="price-box">
<view class="">
<uv-number-box
v-model="item.num"
v-if="[1, 2].includes(item.type)"
></uv-number-box>
</view>
<!-- 会员价普通商品并且是会员的时候显示 -->
<view class="price"
v-if="[2].includes(item.type) && [1].includes(userInfo.isPay)">
会员价{{ item.vipPrice }}
</view>
<!-- 零售价价格 -->
<view class="price"
v-else>
{{ item.price }}
</view>
</view>
</view>
</view>
</view>
<view class="submit-box">
<view class="peis">
<view class="">
配送方式
</view>
<view class="">
商家自行配送
</view>
</view>
<view class="priceInfo">
<view class="">
付款金额
</view>
<view class="totalPrice">
{{ totalPrice }}
</view>
</view>
<view class="remark">
<input type="text"
placeholder="请输入备注"
v-model="remark"/>
</view>
</view>
<view class="uni-color-btn"
@click="submit">
确认下单
</view>
</view>
<!-- 地址选择 -->
<uv-popup ref="addressPopup" :round="30">
<addressList ref="addressList" height="60vh" @select="selectAddress" />
</uv-popup>
</view>
</template>
<script>
import addressList from '../components/address/addressList.vue'
import { mapState } from 'vuex'
export default {
components: {
addressList,
},
data() {
return {
productList: [],
address: {
name: '请选择地址',
address: '',
},
addressTotal: 0,
remark : '',
num : 1,
}
},
computed : {
totalPrice(){
let price = 0
this.productList.forEach(n => {
if([2].includes(n.type) &&
[1].includes(this.userInfo.isPay)){
//
price += n.vipPrice * n.num
}else{
//
price += n.price * n.num
}
})
return Number(price).toFixed(2)
},
...mapState(['payOrderProduct', 'userInfo']),
},
onLoad() {
this.getRiceProductDetail()
this.$store.commit('getUserInfo')
},
onShow() {
this.getAddressList()
},
methods: {
//
getRiceProductDetail() {
this.productList = JSON.parse(JSON.stringify(this.payOrderProduct))
},
//
getAddressList() {
//
this.$refs.addressList.getAddressList().then(res => {
this.addressTotal = res.total
if (this.addressTotal != 0) {
this.address = res.records[0]
}
})
},
//
openAddress() {
if (this.addressTotal == 0) {
return uni.navigateTo({
url: '/pages_order/mine/address?type=back'
})
}
this.$refs.addressPopup.open('bottom')
},
//
selectAddress(e) {
this.address = e
this.$refs.addressPopup.close()
},
//
// submit(){
// this.$api('createOrder', {
// productId : this.productList[0].id,
// num : 1,
// }, res => {
// if(res.code == 200){
// uni.showToast({
// title: '',
// icon: 'none'
// })
// setInterval(uni.navigateTo, 1000, {
// url : '/pages/index/order'
// })
// }
// })
// },
submit(){
let addressId = this.address.id
if(!addressId){
uni.showToast({
title: '请选择地址',
icon: 'none'
})
return
}
let data = {}
let api = ''
if(this.productList[0].shopId || this.productList[0].type == 2){//
let list = []
this.productList.forEach(n => {
list.push({
num : n.num,
shopId : n.shopId || n.id,
})
})
data = {
addressId,
list : JSON.stringify(list),
}
api = 'createSumOrder'
this.deleteCart(this.productList.map(n => n.id).join(','))
}else{//
data = {
addressId,
num : this.productList[0].num,
shopId : this.productList[0].id,
}
api = 'createOrder'
}
this.$api(api, data, res => {
if(res.code == 200){
uni.requestPaymentWxPay(res)
.then(res => {
uni.showToast({
title: '下单成功',
icon: 'none'
})
setTimeout(uni.redirectTo, 700, {
url: '/pages/index/order'
})
}).catch(n => {
setTimeout(uni.redirectTo, 700, {
url: '/pages/index/order'
})
})
}else if(res.code == 902){
uni.showModal({
title: res.message,
success(e) {
if(e.confirm){
uni.redirectTo({
url: '/pages/index/order'
})
}
}
})
}
})
},
//
deleteCart(ids){
this.$api('deleteCart', {
ids
})
},
}
}
</script>
<style scoped lang="scss">
.page {
.box {
padding: 20rpx;
.address {
display: flex;
padding: 20rpx;
background-color: #fff;
align-items: center;
border-radius: 20rpx;
image {
width: 60rpx;
height: 40rpx;
margin: 20rpx;
}
view {
margin: 20rpx;
overflow: hidden; //
text-overflow: ellipsis; //
white-space: nowrap; //
}
.icon {
margin-left: auto;
}
}
.productList {
margin-top: 20rpx;
background-color: #fff;
border-radius: 20rpx;
.item {
padding: 10rpx 20rpx;
align-items: center;
margin-bottom: 20rpx;
display: flex;
width: 100%;
box-sizing: border-box;
.item-image {
width: 140rpx;
height: 140rpx;
flex-shrink: 0;
image {
height: 100%;
width: 100%;
border-radius: 20rpx;
}
}
.info {
padding: 20rpx;
color: #555;
flex: 1;
.title {
font-size: 28rpx;
font-weight: 900;
}
.desc {
font-size: 22rpx;
color: #777;
margin-top: 10rpx;
}
.price-box {
display: flex;
justify-content: space-between;
color: #f40;
font-size: 30rpx;
font-weight: 900;
.price{
&>view:nth-child(2){
font-size: 22rpx;
color: #777;
text{
font-size: 26rpx;
font-weight: 900;
}
}
}
}
}
}
}
.submit-box{
background-color: #fff;
padding: 20rpx;
border-radius: 20rpx;
&>view:nth-child(2){
margin-top: 20rpx;
}
&>view{
display: flex;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
&>view:nth-child(1){
font-weight: 900;
}
&>view:nth-child(2){
color: #999;
font-size: 24rpx;
}
.totalPrice{
color: #f40 !important;
font-size: 34rpx !important;
font-weight: 900;
}
}
.remark{
margin-top: 30rpx;
input{
background-color: #f3f3f3;
padding: 14rpx 20rpx;
border-radius: 20rpx;
flex: 1;
}
}
}
}
}
</style>

+ 552
- 0
pages_order/order/orderDetail.vue View File

@ -0,0 +1,552 @@
<template>
<view>
<navbar
title="订单详情"
leftClick
@leftClick="$utils.navigateBack"
/>
<!-- <view class="">
<view class="controls">
<view class="title">
<image src="../static/order/icon.png" mode=""></image>
服务完成
</view>
<view class="tips">
待送回
</view>
<view class="btns">
<view class="btn1">
快递寄回
</view>
<view class="btn2">
线下配送
</view>
</view>
</view>
<view class="steps">
<uv-steps
activeColor="#FD5100"
:current="stepsCurrent" dot>
<uv-steps-item :title="item"
:key="index"
v-for="(item, index) in steps"></uv-steps-item>
</uv-steps>
</view>
</view> -->
<view class="info">
<view class="flex"
style="display: flex;">
<view style="width: 8rpx;height: 30rpx;
background: #A3D250;border-radius: 6rpx;"
/>
<view class="head-title">产品</view>
</view>
<view class="flex">
<view class="server-item"
:key="index"
v-for="(good, index) in order.commonOrderSkuList"
>
<view class="img-box">
<image :src="good.image && good.image.split(',')[0]" mode="aspectFill"></image>
</view>
<view class="server-info">
<view class="server-title">
{{good.title}}
<!-- <view class="coupon">领券立减</view> -->
</view>
<view class="current-price">
<text class="unit"></text>{{good.price}}
</view>
<view class="sales-volume" style="margin-top: 5px;">
<view class="desc">规格{{good.sku}}</view>
</view>
<view class="time-coupon">
<!-- <view class="flex">
<image src="@/static/home/time-icon.png"></image>
<view class="time">{{order.useTime}}分钟</view>
</view> -->
<!-- <view class="sales-volume">
<image src="@/static/icons/icon1.png"></image>
<view class="desc">已售出{{msgShop.payNum}}+</view>
</view> -->
</view>
</view>
</view>
</view>
<!-- <view class="line min_tips">
<view class="head-div flex">
<view style="width: 118rpx;height: 118rpx;border-radius: 50%;overflow: hidden;">
<image style="width: 118rpx;" :src="msgTechnician.image" mode="widthFix"></image>
</view>
<view style="padding: 10rpx 34rpx;display: flex;flex-direction: column;justify-content: space-around;">
<view class="nickname">
{{msgTechnician.title}}
<view v-if="msgTechnician.isVip" class="tag">
<image src="@/static/order/s.png" mode="aspectFit"></image>
<view class="auth">官方认证</view>
</view>
</view>
<view class="days">
<van-rate v-model="msgTechnician.score" :size="10" readonly color="#ffb54c" void-icon="star"
void-color="#eee" />
<view class="">
好评{{msgTechnician.pinNum}}
</view>
</view>
</view>
</view>
<view @click="gototechnicianDetail(msgTechnician)" class="btn-x">
服务技师
</view>
</view> -->
<view class="line address">
<view class="address-top">
<view class="">
收货地址
</view>
<view class="copy">
<image @click="copy(order.name + ' ' + order.phone + ' ' + order.address + order.addressDetails)" src="/static/order/copy.png"></image>
</view>
</view>
<view class="addressDetail">
<view class="">{{order.name}} {{order.phone}}</view>
<view class="">{{order.address}} {{order.addressDetails}}</view>
</view>
</view>
<view class="line">
<view class="t min_tips">
<view class="">
实付款
</view>
<view class="current-price">
{{ order.price }}
</view>
</view>
</view>
<!-- 订单信息 -->
<view class="line">
<view class="t min_tips">
<view class="">
订单信息
</view>
</view>
<view class="min_tips">
<view class="">
订单编号
</view>
<view class="">
{{order.id}}
</view>
</view>
<view class="min_tips">
<view class="">
下单时间
</view>
<view class="">
{{order.createTime}}
</view>
</view>
</view>
<!-- 下单须知 -->
<view class="line">
<!-- <view class="t min_tips">
<view class="">
下单须知
</view>
</view>
<view class="min_tips" style="line-height: 40rpx;">
{{msgShop.projectExplain}}
</view> -->
<view class="btns">
<view @click="$refs.customerServicePopup.open()" class="btn">
联系客服
</view>
</view>
</view>
</view>
<customerServicePopup ref="customerServicePopup"/>
</view>
</template>
<script>
import customerServicePopup from '@/components/config/customerServicePopup.vue'
import { mapState } from 'vuex'
export default {
components : {
customerServicePopup
},
computed : {
},
data() {
return {
stepsCurrent : 0,
steps : [
'接单',
'检查',
'开始清洗',
'服务完成',
],
order : {},
id : 0,
}
},
onLoad(args) {
this.id = args.id
},
onShow() {
this.getOrderDetail()
},
onPullDownRefresh() {
this.getOrderDetail()
},
methods: {
getOrderDetail(){
this.$api('getOrderDetail', {
id : this.id
}, res => {
uni.stopPullDownRefresh()
if(res.code == 200){
this.order = res.result
}
})
},
}
}
</script>
<style scoped lang="scss">
.order {
background: linear-gradient(#4899a6, #6fc6ad, #6fc6ad);
padding-bottom: 10px;
}
.controls{
margin: 20rpx;
background-color: #fff;
height: 400rpx;
display: flex;
flex-direction: column;
width: 710rpx;
border-radius: 20rpx;
justify-content: center;
align-items: center;
.title{
display: flex;
justify-content: center;
align-items: center;
font-size: 40rpx;
image{
width: 100rpx;
height: 100rpx;
margin-right: 20rpx;
}
}
.tips{
font-size: 26rpx;
color: #FD5100;
margin-top: 10rpx;
}
.btns{
margin-top: 50rpx;
display: flex;
view{
margin: 0 20rpx;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
background-color: $uni-color;
padding: 15rpx 40rpx;
border-radius: 40rpx;
}
.btn2{
background-color: #FFFFFF;
border: 1px solid #A7A7A7;
color: #A7A7A7;
}
}
}
.steps{
margin: 20rpx;
background-color: #fff;
display: flex;
flex-direction: column;
width: 710rpx;
border-radius: 20rpx;
padding: 70rpx 0;
/deep/ .uv-text__value{
font-size: 22rpx !important;
}
}
.box {
padding: 20px;
.btns {
display: flex;
justify-content: center;
align-items: center;
margin-top: 10px;
.btn {
color: #fff;
padding: 10rpx 50rpx;
background-color: #ffb300;
border-radius: 30rpx;
font-size: 25rpx;
margin-right: 10rpx;
}
.btc{
background: #ccc;
}
}
}
.info {
margin: 10px;
padding: 20rpx;
background-color: #fff;
width: calc(100% - 40px);
border-radius: 10px;
.head-title {
font-family: PingFang SC, PingFang SC-Bold;
color: #2f2e2e;
line-height: 30rpx;
margin-left: 10rpx;
}
.server-item {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
background: white;
border-radius: 15rpx;
box-sizing: border-box;
margin: 20rpx 0rpx;
width: 100%;
.img-box {
width: 150rpx;
height: 150rpx;
border-radius: 10rpx;
overflow: hidden;
image {
width: 100%;
height: 100%;
}
}
.server-info {
display: flex;
flex-direction: column;
justify-content: space-around;
width: calc(100% - 180rpx);
box-sizing: border-box;
padding: 10rpx 15rpx;
.server-title {
display: flex;
margin-bottom: 10rpx;
}
.coupon {
display: flex;
justify-content: center;
align-items: center;
background: #F29E45;
color: white;
width: 120rpx;
height: 40rpx;
border-radius: 10rpx;
margin-left: 10rpx;
font-size: 22rpx;
}
.time-coupon,
.price {
display: flex;
flex-wrap: wrap;
align-items: center;
}
.time-coupon {
margin: 10rpx 0rpx;
font-size: 26rpx;
justify-content: space-between;
width: 100%;
.flex {
justify-content: center;
align-items: center;
}
image {
width: 25rpx;
height: 25rpx;
}
.time {
color: #B8B8B8;
margin-left: 6rpx;
}
}
.sales-volume {
display: flex;
align-items: center;
color: #B8B8B8;
font-size: 24rpx;
image {
width: 25rpx;
height: 25rpx;
}
}
}
}
.address {
.address-top{
display: flex;
justify-content: space-between;
align-items: center;
image{
width: 30rpx;
height: 30rpx;
}
}
.addressDetail {
color: #777;
font-size: 22rpx;
padding: 5px 0;
}
text {
background-color: #F29E45;
padding: 8rpx 10rpx;
color: #fff;
font-size: 20rpx;
margin-left: 10px;
border-radius: 5px;
}
}
.min_tips {
font-size: 22rpx;
color: #777;
display: flex;
justify-content: space-between;
padding: 5px 0;
align-items: center;
}
.current-price {
font-size: 30rpx;
color: #FD5100;
}
.line {
border-top: 2px dotted #00000011;
padding: 20rpx 0;
.t {
padding: 5px 0;
color: #000;
font-size: 26rpx;
}
}
.head-div {
.nickname {
font-size: 30rpx;
font-weight: 600;
text-align: left;
line-height: 42rpx;
display: flex;
align-items: center;
.tag {
position: relative;
display: flex;
align-items: center;
image {
height: 45rpx;
width: 90rpx;
vertical-align: middle;
}
.auth {
position: absolute;
white-space: nowrap;
color: #FF6200;
left: 23rpx;
font-size: 17rpx;
}
}
}
.days {
font-size: 20rpx;
font-weight: 400;
text-align: left;
line-height: 56rpx;
display: flex;
align-items: center;
view {
padding-left: 5px;
}
}
}
.btn-x {
color: #6fc6ad;
border: 1px solid #6fc6ad;
padding: 10rpx 20rpx;
border-radius: 30rpx;
}
.btns {
display: flex;
justify-content: center;
.btn {
color: #6fc6ad;
border: 1px solid #6fc6ad;
padding: 10rpx 20rpx;
border-radius: 30rpx;
}
}
}
</style>

+ 179
- 0
pages_order/product/productDetail.vue View File

@ -0,0 +1,179 @@
<template>
<view class="page">
<navbar
bgColor="transparent"
style="position: absolute;"
leftClick @leftClick="$utils.navigateBack" />
<view class="swipe">
<uv-swiper
:list="productDetail.image
&& productDetail.image.split(',')"
indicator
height="520rpx"></uv-swiper>
</view>
<view class="info">
<view style="width: 440rpx;">
<view class="title">
{{ productDetail.title }}
</view>
<view class="desc">
{{ productDetail.sku }}
</view>
</view>
<view class=""
v-if="[2].includes(productDetail.type)">
<view class="price">
会员价<text>{{ productDetail.vipPrice }}</text>
</view>
<view class="oldPrice">
零售价<text>{{ productDetail.price }}</text>
</view>
</view>
<view class=""
v-else>
<view class="price">
价格<text>{{ productDetail.price }}</text>
</view>
<view class="oldPrice">
原价<text>{{ productDetail.oldPrice }}</text>
</view>
</view>
</view>
<uv-parse :content="productDetail.details"></uv-parse>
<!-- 分享和购买按钮 -->
<submit
@addCart="addCart"
@submit="submit"
:detail="productDetail"
/>
<!-- <submit
@submit="$refs.submitUnitSelect.open()"
@share="share"/> -->
<!-- 选择规格 -->
<!-- <submitUnitSelect
:detail="productDetail"
ref="submitUnitSelect"/> -->
</view>
</template>
<script>
import submit from '../components/product/submit.vue'
import submitUnitSelect from '../components/product/submitUnitSelect.vue'
export default {
components : {
submit,
submitUnitSelect
},
data() {
return {
productDetail : {
image : '',
details : '',
},
id : 0,
}
},
onLoad(args) {
this.id = args.id
},
onShow() {
this.getRiceProductDetail()
},
methods: {
//
share(){
},
//
submit(){
this.$store.commit('setPayOrderProduct', [
this.productDetail
])
this.$utils.navigateTo('/pages_order/order/createOrder')
},
//
getRiceProductDetail(){
this.$api('getRiceProductDetail', {
id : this.id
}, res => {
if(res.code == 200){
res.result.num = 1
this.productDetail = res.result
}
})
},
//
addCart(){
this.$api('addCart', {
shopId : this.id,
num : 1,
}, res => {
if(res.code == 200){
uni.showToast({
title: '加入购物车成功',
icon: 'none'
})
}
})
},
}
}
</script>
<style scoped lang="scss">
.page{
.swipe{
}
.info{
padding: 30rpx;
background-color: #fff;
display: flex;
justify-content: space-between;
.title{
font-size: 34rpx;
font-weight: 900;
}
.price{
font-size: 34rpx;
color: $uni-color;
font-weight: 900;
text-align: right;
}
.oldPrice{
font-size: 26rpx;
color: #999;
text-align: right;
// text-decoration: line-through;
margin-top: 14rpx;
}
.desc{
font-size: 26rpx;
color: #777;
margin-top: 20rpx;
}
}
.info-unit{
margin-top: 20rpx;
padding: 30rpx;
background-color: #fff;
/deep/ text{
font-size: 26rpx;
}
/deep/ .text{
color: #7C7C7C;
margin-right: 20rpx;
font-size: 26rpx;
}
}
}
</style>

BIN
pages_order/static/address/icon.png View File

Before After
Width: 96  |  Height: 96  |  Size: 4.5 KiB

BIN
pages_order/static/address/icon1.png View File

Before After
Width: 101  |  Height: 111  |  Size: 7.1 KiB

BIN
pages_order/static/address/selectIcon.png View File

Before After
Width: 28  |  Height: 36  |  Size: 1.3 KiB

BIN
pages_order/static/auth/headImage.png View File

Before After
Width: 80  |  Height: 80  |  Size: 1.4 KiB

BIN
pages_order/static/auth/wx.png View File

Before After
Width: 22  |  Height: 18  |  Size: 453 B

BIN
pages_order/static/help/uploading.png View File

Before After
Width: 216  |  Height: 216  |  Size: 7.2 KiB

BIN
pages_order/static/home/1.png View File

Before After
Width: 1420  |  Height: 530  |  Size: 539 KiB

BIN
pages_order/static/home/2.png View File

Before After
Width: 1500  |  Height: 1066  |  Size: 38 KiB

BIN
pages_order/static/order/icon.png View File

Before After
Width: 82  |  Height: 82  |  Size: 3.0 KiB

BIN
pages_order/static/product/like.png View File

Before After
Width: 25  |  Height: 22  |  Size: 1.1 KiB

BIN
static/image/PrivacyAgreementPoup/icon.png View File

Before After
Width: 39  |  Height: 39  |  Size: 1007 B

BIN
static/image/cart/1.png View File

Before After
Width: 36  |  Height: 36  |  Size: 1.9 KiB

BIN
static/image/cart/2.png View File

Before After
Width: 72  |  Height: 72  |  Size: 5.4 KiB

+ 1
- 0
static/image/center/11.svg View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1726157567630" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6220" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M513.536 628.6336c101.6832 0 280.8832 38.7072 310.8864 193.7408 77.5168-77.5168 124.928-185.9584 124.928-305.0496 0-241.152-194.6624-435.8144-435.8144-435.8144S77.7216 277.0944 77.7216 517.2224c0 119.0912 47.4112 227.6352 124.928 306.0736 30.0032-154.9312 209.2032-194.6624 310.8864-194.6624z m0-439.7056c112.3328 0 204.3904 91.0336 204.3904 204.3904 0 112.3328-91.0336 204.3904-204.3904 204.3904a203.776 203.776 0 0 1-204.3904-204.3904c0.1024-112.4352 92.0576-204.3904 204.3904-204.3904z m0 0" fill="#cdcdcd" p-id="6221"></path><path d="M515.4816 1006.8992c-65.8432 0-129.8432-12.9024-189.952-38.4-58.1632-24.576-110.2848-59.8016-155.136-104.5504A485.56032 485.56032 0 0 1 65.8432 708.8128c-25.6-60.2112-38.5024-124.1088-38.5024-189.952 0-65.8432 12.9024-129.8432 38.4-189.952 24.576-58.1632 59.8016-110.2848 104.5504-155.136 44.8512-44.8512 96.9728-79.9744 155.136-104.5504C385.6384 43.6224 449.536 30.72 515.4816 30.72c65.8432 0 129.8432 12.9024 189.952 38.4 58.1632 24.576 110.2848 59.8016 155.136 104.5504 44.8512 44.8512 79.9744 96.9728 104.5504 155.136C990.6176 389.0176 1003.52 452.9152 1003.52 518.8608c0 65.8432-12.9024 129.8432-38.4 189.952-24.576 58.1632-59.8016 110.2848-104.5504 155.136a485.56032 485.56032 0 0 1-155.136 104.5504 484.39296 484.39296 0 0 1-189.952 38.4z m0-936.8576c-60.6208 0-119.3984 11.8784-174.6944 35.2256a447.76448 447.76448 0 0 0-142.6432 96.1536A444.42624 444.42624 0 0 0 101.9904 344.064a446.70976 446.70976 0 0 0-35.2256 174.6944c0 60.6208 11.8784 119.3984 35.2256 174.6944 22.6304 53.4528 54.9888 101.4784 96.1536 142.6432 41.1648 41.2672 89.1904 73.6256 142.6432 96.1536 55.296 23.3472 114.0736 35.2256 174.6944 35.2256 60.6208 0 119.3984-11.8784 174.6944-35.2256 53.4528-22.6304 101.4784-54.9888 142.6432-96.1536 41.2672-41.1648 73.6256-89.1904 96.1536-142.6432 23.3472-55.296 35.2256-114.0736 35.2256-174.6944 0-60.6208-11.8784-119.3984-35.2256-174.6944a447.76448 447.76448 0 0 0-96.1536-142.6432 444.42624 444.42624 0 0 0-142.6432-96.1536 447.44704 447.44704 0 0 0-174.6944-35.2256z m0 0" fill="#cdcdcd" p-id="6222"></path></svg>

BIN
static/image/center/13.png View File

Before After
Width: 200  |  Height: 200  |  Size: 8.6 KiB

BIN
static/image/center/14.png View File

Before After
Width: 200  |  Height: 200  |  Size: 6.7 KiB

BIN
static/image/center/15.png View File

Before After
Width: 200  |  Height: 200  |  Size: 5.3 KiB

BIN
static/image/center/16.png View File

Before After
Width: 200  |  Height: 200  |  Size: 5.4 KiB

BIN
static/image/center/17.png View File

Before After
Width: 200  |  Height: 200  |  Size: 6.0 KiB

BIN
static/image/center/3.png View File

Before After
Width: 120  |  Height: 120  |  Size: 5.9 KiB

BIN
static/image/center/c1.png View File

Before After
Width: 88  |  Height: 88  |  Size: 1.5 KiB

BIN
static/image/center/c2.png View File

Before After
Width: 88  |  Height: 88  |  Size: 1.3 KiB

BIN
static/image/center/c3.png View File

Before After
Width: 88  |  Height: 88  |  Size: 1.6 KiB

BIN
static/image/center/icon1.png View File

Before After
Width: 101  |  Height: 111  |  Size: 7.1 KiB

BIN
static/image/home/0.png View File

Before After
Width: 200  |  Height: 200  |  Size: 21 KiB

BIN
static/image/home/1.png View File

Before After
Width: 200  |  Height: 200  |  Size: 25 KiB

BIN
static/image/home/10.png View File

Before After
Width: 720  |  Height: 720  |  Size: 32 KiB

BIN
static/image/home/2.png View File

Before After
Width: 200  |  Height: 200  |  Size: 13 KiB

BIN
static/image/home/3.png View File

Before After
Width: 200  |  Height: 200  |  Size: 18 KiB

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save