提交 da6f0ef8 authored 作者: Ras's avatar Ras

首次提交

上级
.DS_Store
node_modules/
unpackage/
dist/
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.project
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
"version": "0.0",
"configurations": [{
"default" :
{
"launchtype" : "local"
},
"h5" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}
{
"printWidth": 120,
"tabWidth": 4,
"semi": true,
"singleQuote": true
}
# uni-merchant
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
const plugins = []
if (process.env.UNI_OPT_TREESHAKINGNG) {
plugins.push(require('@dcloudio/vue-cli-plugin-uni-optimize/packages/babel-plugin-uni-api/index.js'))
}
if (
(
process.env.UNI_PLATFORM === 'app-plus' &&
process.env.UNI_USING_V8
) ||
(
process.env.UNI_PLATFORM === 'h5' &&
process.env.UNI_H5_BROWSER === 'builtin'
)
) {
const path = require('path')
const isWin = /^win/.test(process.platform)
const normalizePath = path => (isWin ? path.replace(/\\/g, '/') : path)
const input = normalizePath(process.env.UNI_INPUT_DIR)
try {
plugins.push([
require('@dcloudio/vue-cli-plugin-hbuilderx/packages/babel-plugin-console'),
{
file (file) {
file = normalizePath(file)
if (file.indexOf(input) === 0) {
return path.relative(input, file)
}
return false
}
}
])
} catch (e) {}
}
process.UNI_LIBRARIES = process.UNI_LIBRARIES || ['@dcloudio/uni-ui']
process.UNI_LIBRARIES.forEach(libraryName => {
plugins.push([
'import',
{
'libraryName': libraryName,
'customName': (name) => {
return `${libraryName}/lib/${name}/${name}`
}
}
])
})
module.exports = {
presets: [
[
'@vue/app',
{
modules: 'commonjs',
useBuiltIns: process.env.UNI_PLATFORM === 'h5' ? 'usage' : 'entry'
}
]
],
plugins
}
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "uni-merchant",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "npm run dev:h5",
"build": "npm run build:h5",
"build:app-plus": "cross-env NODE_ENV=production UNI_PLATFORM=app-plus vue-cli-service uni-build",
"build:custom": "cross-env NODE_ENV=production uniapp-cli custom",
"build:h5": "cross-env NODE_ENV=production UNI_PLATFORM=h5 vue-cli-service uni-build",
"build:mp-360": "cross-env NODE_ENV=production UNI_PLATFORM=mp-360 vue-cli-service uni-build",
"build:mp-alipay": "cross-env NODE_ENV=production UNI_PLATFORM=mp-alipay vue-cli-service uni-build",
"build:mp-baidu": "cross-env NODE_ENV=production UNI_PLATFORM=mp-baidu vue-cli-service uni-build",
"build:mp-qq": "cross-env NODE_ENV=production UNI_PLATFORM=mp-qq vue-cli-service uni-build",
"build:mp-toutiao": "cross-env NODE_ENV=production UNI_PLATFORM=mp-toutiao vue-cli-service uni-build",
"build:mp-weixin": "cross-env NODE_ENV=production UNI_PLATFORM=mp-weixin vue-cli-service uni-build",
"build:quickapp-native": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-native vue-cli-service uni-build",
"build:quickapp-webview": "cross-env NODE_ENV=production UNI_PLATFORM=quickapp-webview vue-cli-service uni-build",
"dev:app-plus": "cross-env NODE_ENV=development UNI_PLATFORM=app-plus vue-cli-service uni-build --watch",
"dev:custom": "cross-env NODE_ENV=development uniapp-cli custom",
"dev:h5": "cross-env NODE_ENV=development UNI_PLATFORM=h5 vue-cli-service uni-serve",
"dev:mp-360": "cross-env NODE_ENV=development UNI_PLATFORM=mp-360 vue-cli-service uni-build --watch",
"dev:mp-alipay": "cross-env NODE_ENV=development UNI_PLATFORM=mp-alipay vue-cli-service uni-build --watch",
"dev:mp-baidu": "cross-env NODE_ENV=development UNI_PLATFORM=mp-baidu vue-cli-service uni-build --watch",
"dev:mp-qq": "cross-env NODE_ENV=development UNI_PLATFORM=mp-qq vue-cli-service uni-build --watch",
"dev:mp-toutiao": "cross-env NODE_ENV=development UNI_PLATFORM=mp-toutiao vue-cli-service uni-build --watch",
"dev:mp-weixin": "cross-env NODE_ENV=development UNI_PLATFORM=mp-weixin vue-cli-service uni-build --watch",
"dev:quickapp-native": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-native vue-cli-service uni-build --watch",
"dev:quickapp-webview": "cross-env NODE_ENV=development UNI_PLATFORM=quickapp-webview vue-cli-service uni-build --watch",
"info": "node node_modules/@dcloudio/vue-cli-plugin-uni/commands/info.js",
"serve:quickapp-native": "node node_modules/@dcloudio/uni-quickapp-native/bin/serve.js",
"test:android": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=android jest -i",
"test:h5": "cross-env UNI_PLATFORM=h5 jest -i",
"test:ios": "cross-env UNI_PLATFORM=app-plus UNI_OS_NAME=ios jest -i",
"test:mp-baidu": "cross-env UNI_PLATFORM=mp-baidu jest -i",
"test:mp-weixin": "cross-env UNI_PLATFORM=mp-weixin jest -i"
},
"dependencies": {
"@dcloudio/uni-app-plus": "^2.0.0-27920200527001",
"@dcloudio/uni-h5": "^2.0.0-27920200527001",
"@dcloudio/uni-helper-json": "*",
"@dcloudio/uni-mp-360": "^2.0.0-27920200527001",
"@dcloudio/uni-mp-alipay": "^2.0.0-27920200527001",
"@dcloudio/uni-mp-baidu": "^2.0.0-27920200527001",
"@dcloudio/uni-mp-qq": "^2.0.0-27920200527001",
"@dcloudio/uni-mp-toutiao": "^2.0.0-27920200527001",
"@dcloudio/uni-mp-weixin": "^2.0.0-27920200527001",
"@dcloudio/uni-quickapp-native": "^2.0.0-27920200527001",
"@dcloudio/uni-quickapp-webview": "^2.0.0-27920200527001",
"@dcloudio/uni-stat": "^2.0.0-27920200527001",
"core-js": "^3.6.5",
"flyio": "^0.6.2",
"luch-request": "^3.0.2",
"regenerator-runtime": "^0.12.1",
"uview-ui": "^1.6.3",
"vue": "^2.6.11",
"vuex": "^3.2.0",
"vuex-persistedstate": "^3.0.1"
},
"devDependencies": {
"@dcloudio/types": "*",
"@dcloudio/uni-automator": "^2.0.0-27920200527001",
"@dcloudio/uni-cli-shared": "^2.0.0-27920200527001",
"@dcloudio/uni-migration": "^2.0.0-27920200527001",
"@dcloudio/uni-template-compiler": "^2.0.0-27920200527001",
"@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.0-27920200527001",
"@dcloudio/vue-cli-plugin-uni": "^2.0.0-27920200527001",
"@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.0-27920200527001",
"@dcloudio/webpack-uni-mp-loader": "^2.0.0-27920200527001",
"@dcloudio/webpack-uni-pages-loader": "^2.0.0-27920200527001",
"@vue/cli-plugin-babel": "~4.4.0",
"@vue/cli-service": "~4.4.0",
"babel-plugin-import": "^1.11.0",
"cross-env": "^7.0.2",
"jest": "^25.4.0",
"mini-types": "*",
"miniprogram-api-typings": "*",
"node-sass": "^4.14.1",
"postcss-comment": "^2.0.0",
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11"
},
"browserslist": [
"Android >= 4",
"ios >= 8"
],
"uni-app": {
"scripts": {}
}
}
const path = require('path')
module.exports = {
parser: require('postcss-comment'),
plugins: [
require('postcss-import')({
resolve (id, basedir, importOptions) {
if (id.startsWith('~@/')) {
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(3))
} else if (id.startsWith('@/')) {
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(2))
} else if (id.startsWith('/') && !id.startsWith('//')) {
return path.resolve(process.env.UNI_INPUT_DIR, id.substr(1))
}
return id
}
}),
require('autoprefixer')({
remove: process.env.UNI_PLATFORM !== 'h5'
}),
require('@dcloudio/vue-cli-plugin-uni/packages/postcss')
]
}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>
<%= htmlWebpackPlugin.options.title %>
</title>
<script>
document.addEventListener('DOMContentLoaded', function() {
document.documentElement.style.fontSize = document.documentElement.clientWidth / 20 + 'px'
})
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>
<link rel="stylesheet" href="<%= BASE_URL %>static/index.<%= VUE_APP_INDEX_CSS_HASH %>.css" />
</head>
<body>
<noscript>
<strong>Please enable JavaScript to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
\ No newline at end of file
<script>
export default {
onLaunch: function () {
console.log('App Launch');
},
onShow: function () {
console.log('App Show');
},
onHide: function () {
console.log('App Hide');
},
};
</script>
<style lang="scss">
/*引入uView基础样式*/
@import 'uview-ui/index.scss';
/*每个页面公共css */
page {
background-color: #f4f4f5;
.mc-btn {
/deep/.u-hairline-border {
&::after {
border: none;
}
}
}
.position-sticky {
position: -webkit-sticky !important;
position: sticky !important;
}
.fixed-bottom {
position: fixed;
right: 0;
bottom: 0;
left: 0;
z-index: 1030;
}
}
</style>
import store from '@/store';
const commonUrl = 'http://116.62.129.2/CSWX'; //公共路径
// const commonUrl = "http://sf.jtfw8.com/WXXCX";
//http://116.62.129.2/CSWX 测试环境
function postRequest(url, data) {
var promise = new Promise((resolve, reject) => {
let header = {
appid: 'wx08df2ca62f3e1766'
};
const token = uni.getStorageSync('token');
console.log("POST请求: ", url, data)
if (token) {
header.token = token;
}
uni.request({
url: commonUrl + url,
data: data,
method: 'POST',
header: header,
success: function(res) {
console.log("POST请求响应:", res)
if (res.data.code === 201) {
store.dispatch('user/logout').then(() => {
uni.switchTab({
url: '/pages/index/index'
});
});
}
resolve(res.data);
},
error: function(e) {
reject('网络出错');
}
});
});
return promise;
}
// get请求封装
function getRequest(url, data) {
var promise = new Promise((resolve, reject) => {
console.log("GET请求: ", url, data)
uni.request({
url: commonUrl + url,
data: data,
method: 'GET',
dataType: 'json',
header: {
appid: 'wx08df2ca62f3e1766',
token: uni.getStorageSync('token')
},
success: function(res) {
console.log("GET请求响应:", res)
if (res.data.code === 201) {
store.dispatch('user/logout').then(() => {
uni.switchTab({
url: '/pages/index/index'
});
});
return;
}
resolve(res.data);
},
error: function(e) {
reject('网络出错');
}
});
});
return promise;
}
module.exports = {
post: postRequest,
get: getRequest
};
<template>
<view>
<u-card :show-foot="false">
<view slot="head">
<u-upload
:file-list="displayThumbs"
:action="action"
:header="uploadHeaders"
@on-uploaded="onUploaded"
@on-remove="onRemove"
width="160"
></u-upload>
<u-icon
class="deleteBtn"
name="close-circle-fill"
size="48"
color="#595959"
v-if="canbeDelete"
@click="deleteGood"
></u-icon>
</view>
<view slot="body" class="goodBd">
<u-cell-group :border="false">
<u-cell-item
required
title="商品类别"
arrow
:value="goodType | formatGoodType"
@click="chooseGoodType"
></u-cell-item>
<u-cell-item
required
title="商品规格"
arrow
:value="category | formatCategory"
@click="chooseCategory"
></u-cell-item>
<u-cell-item required title="商品数量" :arrow="false">
<u-number-box v-model="count" :min="1"></u-number-box>
</u-cell-item>
<!-- <u-cell-item title="商品规格" :arrow="false">
<u-input
type="text"
v-model="sku"
:border="false"
placeholder="墙体结构、尺寸或家具的长宽高等"
input-align="right"
:custom-style="{
marginRight: 0
}"
:clearable="false"
/>
</u-cell-item> -->
<u-cell-item title="备注说明" :arrow="false">
<u-input v-model="mark" type="textarea" input-align="right" :clearable="false" />
</u-cell-item>
<u-cell-item
title="预估价"
:value="totalAmount | formatPrice"
:arrow="false"
:border-bottom="false"
></u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-picker
mode="selector"
v-model="showGoodTypes"
:range="goodTypesSource"
range-key="label"
@confirm="changeGoodType"
confirm-color="#ffcb57"
></u-picker>
<u-picker
mode="selector"
v-model="showCategories"
:range="categories"
range-key="label"
@confirm="changeCategory"
confirm-color="#ffcb57"
></u-picker>
</view>
</template>
<script>
import request from '../../common/service';
export default {
props: {
guid: {
type: String,
default: function () {
return '';
},
},
canbeDelete: {
type: Boolean,
default: function () {
return false;
},
},
source: {
type: Object,
default: function () {
return function () {};
},
},
goodTypesSource: {
type: Array,
default: function () {
return [];
},
},
},
data() {
return {
action: 'https://116.62.129.2/CSWX/api/UploadAttachments',
uploadHeaders: {
'content-type': 'form-data',
appid: 'wx08df2ca62f3e1766',
token: uni.getStorageSync('token'),
},
goodType: undefined,
// sku: '',
mark: '',
thumbs: [],
category: undefined,
count: 1,
showGoodTypes: false,
goodType: null,
showCategories: false,
categories: [],
category: null,
fileList: [],
displayThumbs: [],
};
},
computed: {
computedAll() {
const { goodType, mark, category, count, fileList, guid, thumbs, totalAmount } = this;
return {
guid,
goodType,
// sku,
mark,
thumbs,
category,
count,
totalAmount,
};
},
totalAmount() {
if (this.category) {
return this.category.price * this.count;
}
return 0;
},
},
watch: {
computedAll() {
this.$emit('change', {
guid: this.guid,
data: this.computedAll,
});
},
goodType() {
this.category = null;
}
},
filters: {
formatGoodType(value) {
if (!value) {
return '请选择商品类别';
}
return `${value.label}`;
},
formatCategory(value) {
if (!value) {
return '请选择商品规格';
}
return `${value.label}`;
},
formatPrice(value) {
return `${parseFloat(value).toLocaleString()}元`;
},
},
mounted() {
this.goodType = this.source.goodType;
// this.sku = this.source.sku;
this.mark = this.source.mark ? this.source.mark[0].Value : '';
this.thumbs = this.source.thumbs || [];
this.category = this.source.category || null;
this.displayThumbs = Array.isArray(this.source.thumbs) ? [...this.source.thumbs] : [];
if (this.goodType) {
this.getCategories(this.goodType.label);
}
},
methods: {
onUploaded(lists) {
const _t = this;
this.fileList = lists.map((item) => {
if (!item.response) {
return { fileurl: item.url };
}
var { code, result } = item.response;
if (code === 0) {
return result;
}
return;
});
this.thumbs = this.fileList.map((x) => {
return {
url: x.fileurl,
};
});
},
onRemove(index, lists, name) {
this.fileList.splice(index, 1);
this.thumbs.splice(index, 1);
},
deleteGood() {
this.$emit('delete', this.guid);
},
changeGoodType(e) {
const { currentCardIndex } = this;
this.goodType = this.goodTypesSource[e[0]];
this.getCategories(this.goodType.label);
},
chooseGoodType() {
this.showGoodTypes = true;
},
getCategories(goodtype) {
request.get('/api/BaseData/ServiceType', { GoodType: goodtype }).then((res) => {
const { code, result } = res;
if (code === 0) {
this.categories = result.map((x) => {
return {
value: x.id,
label: x.name,
number: x.number,
price: x.price,
};
});
}
});
},
changeCategory(e) {
const { currentCardIndex } = this;
this.category = this.categories[e[0]];
},
chooseCategory() {
this.showCategories = true;
},
},
};
</script>
<style>
.deleteBtn {
position: absolute;
top: 24rpx;
right: 24rpx;
}
</style>
\ No newline at end of file
import Vue from 'vue'
import App from './App'
import uView from 'uview-ui'
import store from '@/store'
Vue.use(uView)
Vue.prototype.$store = store
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()
{
"name": "",
"appid": "",
"description": "",
"versionName": "1.0.0",
"versionCode": "100",
"transformPx": false,
"app-plus": { /* 5+App特有相关 */
"usingComponents": true,
"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.READ_CONTACTS\"/>",
"<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.WRITE_CONTACTS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<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.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
"ios": { /* ios打包配置 */
},
"sdkConfigs": { /* SDK配置 */
}
}
},
"quickapp": { /* 快应用特有相关 */
},
"mp-weixin": { /* 微信小程序特有相关 */
"appid": "wx08df2ca62f3e1766",
"setting": {
"urlCheck": false
},
"usingComponents": true,
"permission": {
"scope.userLocation": {
"desc": "小程序将使用定位功能"
}
}
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"mp-qq" : {
"usingComponents" : true
}
}
{
"easycom": {
"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
},
"pages": [
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/account/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/recharge/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/place/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/orders/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/hire/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/pay/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/my/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/wallet/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/withdraw/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/transaction-detail/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/password/login/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/password/pay/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/customer/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/orders/detail/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/good-template/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/good-template/add/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/good-template/edit/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/good-template/choose/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/aftersale/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/feedback/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/orders/search/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/register/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/change-worker/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/join/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/applyjoin/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/apply-refund/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/change-phone/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/acceptance/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/applyjoin/refuse/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/company-members/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
},
{
"path": "pages/qa/index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#f4f4f5"
},
"tabBar": {
"color": "#7A7E83",
"selectedColor": "#FFCB57",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/index/index",
"iconPath": "static/images/tabbar/home.png",
"selectedIconPath": "static/images/tabbar/home-selected.png",
"text": "首页"
}, {
"pagePath": "pages/orders/index",
"iconPath": "static/images/tabbar/order.png",
"selectedIconPath": "static/images/tabbar/order-selected.png",
"text": "订单"
}, {
"pagePath": "pages/my/index",
"iconPath": "static/images/tabbar/my.png",
"selectedIconPath": "static/images/tabbar/my-selected.png",
"text": "我的"
}]
},
"sitemapLocation": "sitemap.json"
}
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="验收"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<web-view
:webview-styles="webviewStyles"
:src="url"
></web-view>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import request from '../../common/service';
export default {
data() {
return {
url: '',
webviewStyles: {
progress: {
color: '#FF3333',
},
},
};
},
onLoad(options) {
this.url = `https://www.jtfw8.com/WXXCX/Evaluate/index/${options.orderId}`
},
computed: {},
methods: {
placeOrder() {
if (!this.content) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
request
.post('/api/Feedback/SH', {
Model: {
FContent: this.content,
},
})
.then((res) => {
const { code, message } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '提交成功!',
isTab: true,
url: '/pages/my/index',
});
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="账号信息"
title-color="#472d21"
></u-navbar>
</div>
<div class="card">
<u-card :show-head="false" padding="0" margin="30rpx 30rpx 15rpx 30rpx">
<view slot="body">
<u-cell-group>
<u-cell-item title="用户类型" :value="curUserinfo.userType" :arrow="false"></u-cell-item>
<u-cell-item title="企业名称" :arrow="false" v-if="userDetail.FUserType == 2">
<span>{{companyName}}</span>
</u-cell-item>
<u-cell-item title="真实姓名" :arrow="false">
<u-input
v-model="userRealName"
type="text"
:clearable="false"
height="48"
input-align="right"
placeholder="请输入真实姓名"
/>
</u-cell-item>
<u-cell-item title="联系地址" :arrow="false">
<u-input
v-model="address"
type="text"
:clearable="false"
height="48"
input-align="right"
placeholder="请输入联系地址"
/>
</u-cell-item>
<u-cell-item title="电子邮箱" :arrow="false">
<u-input
v-model="mail"
type="text"
:clearable="false"
height="48"
input-align="right"
placeholder="请输入电子邮箱"
/>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<view class="mc-btn">
<u-button
:custom-style="{margin: '16rpx 30rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
@click="save"
>保存</u-button>
</view>
</div>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapGetters, mapActions } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
userType: '个人',
userNickname: null,
address: null,
mail: null,
userRealName: null,
companyName: ''
};
},
computed: {
...mapGetters({
userDetail: 'user/userDetail',
curUserinfo: 'user/displayUserInfo',
}),
},
onLoad() {
this.getAccountInfo();
console.log(this.userDetail)
},
methods: {
...mapActions({
updateUserDetail: 'user/updateUserDetail'
}),
getAccountInfo() {
request.get('/api/Business/View').then((res) => {
const { code, message, result } = res;
if (code === 0) {
const detail = JSON.parse(result.result);
console.log(detail)
this.userNickname = detail.FCustBusinessMember[0].FNickName.replace(/\s+/g, '');
this.address = detail.FCustBusinessMember[0].FAdress.replace(/\s+/g, '');
this.mail = detail.FCustBusinessMember[0].FEmail.replace(/\s+/g, '');
this.userRealName = detail.FCustBusinessMember[0].FRealName.replace(/\s+/g, '');
this.companyName = detail.Name[0].Value;
this.updateUserDetail(detail);
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
save() {
const { address, mail, userRealName } = this;
if (!userRealName || !address || !mail) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
request
.post('/api/Business/edit', {
FID: this.userDetail.Id,
Adress: address,
Email: mail,
RealName: userRealName
})
.then((res) => {
const { code, message } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '修改成功!',
isTab: true,
url: '/pages/index/index',
});
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.card {
.u-body-item {
font-size: 32rpx;
color: #333;
padding: 0rpx 10rpx;
.right {
display: flex;
justify-content: flex-end;
align-items: center;
width: 400rpx;
flex: 0 0 400rpx;
height: 120rpx;
border-radius: 8rpx;
margin-left: 12rpx;
.extra-content {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
}
.defaultBtnhover {
color: '#472d21';
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="售后管理"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<view class="u-tabs-box">
<view class="pl">
<!-- <u-image src="/static/images/common/search.png" height="48rpx" width="48rpx"></u-image> -->
<u-tabs-swiper
activeColor="#ffcb57"
font-size="26"
ref="tabs"
:list="list"
:current="current"
@change="change"
></u-tabs-swiper>
</view>
</view>
<swiper
class="swiper-box"
:current="swiperCurrent"
@transition="transition"
@animationfinish="animationfinish"
>
<swiper-item class="swiper-item" v-for="itx in 4" :key="itx">
<scroll-view
scroll-y
style="height: 100%;width: 100%;"
@scrolltolower="reachBottom"
>
<view class="page-box">
<u-empty text="暂无数据" mode="list"></u-empty>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
</div>
</template>
<script>
export default {
data() {
return {
list: [
{
name: '全部'
},
{
name: '处理中'
},
{
name: '已完结'
},
{
name: '关闭'
}
],
current: 0,
swiperCurrent: 0,
tabsHeight: 0,
dx: 0,
loadStatus: ['loadmore', 'loadmore', 'loadmore', 'loadmore']
};
},
onLoad() {},
computed: {
// 价格小数
priceDecimal() {
return val => {
if (val !== parseInt(val)) return val.slice(-2);
else return '00';
};
},
// 价格整数
priceInt() {
return val => {
if (val !== parseInt(val)) return val.split('.')[0];
else return val;
};
}
},
methods: {
reachBottom() {
return;
// 此tab为空数据
if (this.current != 2) {
this.loadStatus.splice(this.current, 1, 'loading');
setTimeout(() => {
this.getOrderList(this.current);
}, 1200);
}
},
// 页面数据
getOrderList(idx) {
for (let i = 0; i < 5; i++) {
let index = this.$u.random(0, this.dataList.length - 1);
let data = JSON.parse(JSON.stringify(this.dataList[index]));
data.id = this.$u.guid();
this.orderList[idx] && this.orderList[idx].push(data);
}
this.loadStatus.splice(this.current, 1, 'loadmore');
},
// 总价
totalPrice(item) {
let price = 0;
item.map(val => {
price += parseFloat(val.price);
});
return price.toFixed(2);
},
// 总件数
totalNum(item) {
let num = 0;
item.map(val => {
num += val.number;
});
return num;
},
// tab栏切换
change(index) {
this.swiperCurrent = index;
this.getOrderList();
},
transition({ detail: { dx } }) {
this.$refs.tabs.setDx(dx);
},
animationfinish({ detail: { current } }) {
this.$refs.tabs.setFinishCurrent(current);
this.swiperCurrent = current;
this.current = current;
},
hireMan() {
this.$u.route('/pages/hire/index');
}
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
}
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.page-box {
.orderHd {
display: flex;
justify-content: space-between;
align-items: center;
.left {
display: flex;
align-items: center;
justify-content: flex-start;
/deep/.u-image {
margin-right: 12rpx;
background-color: #fff;
}
.contact {
.line {
font-size: 24rpx;
color: #262626;
}
}
}
.right {
.status {
font-size: 24rpx;
color: #434343;
}
}
}
.orderBd {
.item {
display: flex;
margin: 20rpx 0 0;
border-bottom: 1rpx dashed #d9d9d9;
&::last-child {
border-bottom: none;
}
.left {
margin-right: 20rpx;
image {
width: 200rpx;
height: 200rpx;
border-radius: 10rpx;
}
}
.content {
.title {
font-size: 28rpx;
line-height: 50rpx;
}
.type {
margin: 10rpx 0;
font-size: 24rpx;
color: $u-tips-color;
}
.delivery-time {
color: #595959;
font-size: 24rpx;
}
}
.right {
margin-left: 10rpx;
padding-top: 20rpx;
text-align: right;
.decimal {
font-size: 24rpx;
margin-top: 4rpx;
}
.number {
color: $u-tips-color;
font-size: 24rpx;
}
}
}
.workmans {
padding: 12rpx 0;
.mtitle {
font-size: 24rpx;
color: #262626;
}
.number {
font-size: 24rpx;
font-weight: 600;
color: #ffcb57;
}
}
}
.orderFt {
.actions {
display: flex;
justify-content: flex-end;
align-items: center;
/deep/.u-btn {
margin-left: 6rpx;
}
}
}
}
}
.swiper-box {
flex: 1;
}
.swiper-item {
height: 100%;
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="申请退款"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-card :show-head="false" margin="30rpx 30rpx 15rpx 30rpx" :body-style="{padding: 0}">
<view slot="body">
<u-cell-group :border="false">
<u-cell-item
required
title="选择原因"
:value="displayReason"
@click="chooseReason"
></u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-card :show-head="false" margin="0 30rpx 15rpx 30rpx" :body-style="{padding: 0}">
<view slot="body">
<u-cell-group :border="false">
<u-cell-item title="具体描述" :arrow="false">
<u-input
type="text"
v-model="desc"
height="48"
input-align="right"
placeholder="请输入具体的说明"
:clearable="false"
/>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-card title="上传凭证" margin="0 30rpx 15rpx 30rpx" :body-style="{padding: 0}">
<view slot="body">
<u-upload
:action="action"
:header="uploadHeaders"
:max-count="3"
@on-uploaded="onUploaded"
name="file"
width="190"
></u-upload>
</view>
</u-card>
<view class="mc-btn">
<u-button
:custom-style="{margin: '16rpx 32rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
@click="placeOrder"
>提交</u-button>
</view>
</view>
<u-picker
mode="selector"
v-model="showReason"
:range="reasons"
range-key="label"
@confirm="changeReason"
confirm-color="#ffcb57"
></u-picker>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
action: 'https://www.jtfw8.com/WXXCX/api/UploadAttachments',
uploadHeaders: {
'content-type': 'form-data',
appid: 'wx08df2ca62f3e1766',
token: uni.getStorageSync('token'),
},
showReason: false,
reasons: [
{
value: '001',
label: '技术不专业',
},
{
value: '002',
label: '态度不友好',
},
{
value: '003',
label: '未按时完成任务',
},
],
reason: null,
fileList: [],
desc: '',
};
},
onLoad() {
console.log(this.currentOrder);
},
computed: {
...mapGetters({
currentOrder: 'order/currentOrder',
}),
displayReason() {
if (!this.reason) {
return '请选择换师傅原因';
}
return `${this.reason.label}`;
},
},
methods: {
onUploaded(lists) {
this.fileList = lists.map((item) => item.response.result);
},
changeReason(e) {
this.reason = this.reasons[e[0]];
},
chooseReason() {
this.showReason = true;
},
placeOrder() {
const _t = this;
const { reason } = this;
if (!reason) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
const attachObj = {};
for (let index = 0; index < this.fileList.length; index++) {
const fileitem = this.fileList[index];
attachObj[`FRefundPZ${index}`] = fileitem.fileid;
}
request
.post('/api/Order/save', {
Model: {
FID: this.currentOrder.Id, //订单内码
FStatus: 'TKZ', //订单状态:待预约,传固定值:DYY
FRefundReason: this.reason.label, //退款原因
FRefundAmount: this.currentOrder.FSFAmount, //退款金额
FRefundDesc: this.desc, //退款
...attachObj,
},
})
.then((res) => {
const { code, message, result } = res;
if (code === 0) {
const { IsSuccess } = result.Result.ResponseStatus;
if (IsSuccess) {
_t.$refs.uToast.show({
title: '提交成功!',
isTab: true,
url: '/pages/orders/index',
});
}
} else {
_t.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.wmBd {
display: flex;
align-items: flex-start;
.right {
padding-left: 24rpx;
.hdline {
margin-bottom: 24rpx;
.name {
margin-right: 12rpx;
font-size: 30rpx;
color: #262626;
}
}
.line {
margin-top: 12rpx;
.smtitle {
font-size: 24rpx;
color: #8c8c8c;
}
.smContent {
font-size: 24rpx;
color: #595959;
}
}
}
}
.wmFt {
display: flex;
justify-content: space-between;
align-items: center;
.left {
.amount {
font-size: 36rpx;
color: #ffcb57;
}
}
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="申请管理"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<view class="u-tabs-box">
<view class="pl">
<u-tabs-swiper
activeColor="#ffcb57"
font-size="26"
ref="tabs"
:list="list"
:current="current"
@change="change"
></u-tabs-swiper>
</view>
</view>
<swiper
class="swiper-box"
:current="swiperCurrent"
@transition="transition"
@animationfinish="animationfinish"
>
<swiper-item class="swiper-item" v-for="(tablist, index) in tabLists" :key="index">
<scroll-view scroll-y style="height: 100%;width: 100%;">
<view class="page-box">
<view class="u-flex u-row-center u-margin-top-24" v-show="showLoading">
<u-loading mode="flower"></u-loading>
</view>
<u-empty
text="没有数据"
mode="list"
margin-top="80"
v-if="tablist.length === 0 && !showLoading"
></u-empty>
<u-card
v-for="item in tablist"
:key="item.FBillNo"
:title="item.FApplyName"
:sub-title="item.FBillNo"
:show-foot="index === 0"
thumb="http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg"
>
<view slot="body">
<view class="line">
<span class="title">手机:</span>
<span class="content">{{item.FApplyPhone}}</span>
</view>
<view class="line">
<span class="title">备注:</span>
<span class="content">{{item.FNote || '无'}}</span>
</view>
</view>
<view slot="foot">
<u-button
size="mini"
type="error"
hover-class="defaultBtnhover"
@click="handleRefuse(item)"
>拒绝</u-button>
<u-button
size="mini"
hover-class="defaultBtnhover"
:custom-style="{marginLeft: '48rpx'}"
@click="pass(item)"
>通过</u-button>
</view>
</u-card>
</view>
</scroll-view>
</swiper-item>
</swiper>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapActions, mapGetters } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
list: [{ name: '待审核' }, { name: '已通过' }, { name: '已拒绝' }],
current: 0,
swiperCurrent: 0,
tabsHeight: 0,
dx: 0,
tabLists: [[], [], []],
showLoading: false,
};
},
computed: {},
onLoad() {},
onShow() {
this.getMembers();
},
methods: {
async getMembers(id) {
this.showLoading = true;
const response = await request.get('/api/Business/GetApplyJoin');
this.showLoading = false;
const { code, message, result } = response;
if (code === 0) {
this.tabLists[0] = result.filter((x) => !['TG', 'BTG'].includes(x.FCHECKRESULT));
this.tabLists[1] = result.filter((x) => x.FCHECKRESULT === 'TG');
this.tabLists[2] = result.filter((x) => x.FCHECKRESULT === 'BTG');
} else {
this.$refs.uToast.show({
title: message,
});
}
},
handleRefuse(data) {
this.$u.route('/pages/applyjoin/refuse/index', { billNo: data.FBillNo });
},
async pass(data) {
const response = await request.post('/api/Business/ApplyJoinAudit', {
FNumber: data.FBillNo,
FCheckResult: 'TG',
});
const { code, message, result } = response;
if (code === 0) {
this.$refs.uToast.show({
title: '已审核',
});
} else {
this.$refs.uToast.show({
title: message,
});
}
this.getMembers();
},
// tab栏切换
change(index) {
this.swiperCurrent = index;
},
transition({ detail: { dx } }) {
this.$refs.tabs.setDx(dx);
},
animationfinish({ detail: { current } }) {
this.$refs.tabs.setFinishCurrent(current);
this.swiperCurrent = current;
this.current = current;
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.search {
padding: 30rpx 16rpx;
}
.swiper-box {
flex: 1;
}
.swiper-item {
height: 100%;
}
.gdtemplate {
display: flex;
align-items: flex-start;
.left {
margin-right: 20rpx;
image {
width: 200rpx;
height: 200rpx;
border-radius: 10rpx;
}
}
.right {
.title {
font-size: 28rpx;
line-height: 50rpx;
}
.type {
margin: 10rpx 0;
font-size: 24rpx;
color: $u-tips-color;
}
.extra {
.exitem {
.title {
color: #595959;
font-size: 24rpx;
}
}
}
}
}
.action {
display: flex;
justify-content: flex-end;
align-items: center;
/deep/.u-btn {
margin-left: 12rpx;
}
}
}
.fixed-bottom-button {
display: flex;
justify-content: center;
align-items: center;
background-color: #ffcb57;
font-size: 28rpx;
color: #472d21;
padding-top: 24rpx;
padding-bottom: 24rpx;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: calc(env(safe-area-inset-bottom) + 24rpx);
}
.fixBtn {
position: fixed;
display: flex;
justify-content: center;
align-items: center;
right: 32rpx;
bottom: 180rpx;
width: 100rpx;
height: 100rpx;
border-radius: 50%;
background-color: #ffcb57;
color: #472d21;
box-shadow: 0 0 6rpx #595959;
z-index: 200000;
}
.line {
margin-bottom: 12rpx;
&:last-child {
margin-bottom: 0;
}
.title {
display: inline-block;
width: 120rpx;
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="拒绝申请"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-input v-model="content" type="textarea" height="240"></u-input>
<view class="mc-btn">
<u-button
:custom-style="{margin: '0 30rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
@click="refuse"
>立即提交</u-button>
</view>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import request from '../../../common/service';
export default {
data() {
return {
content: '',
billNo: '',
};
},
onLoad(options) {
this.billNo = options.billNo;
},
computed: {},
methods: {
async refuse() {
if (!this.content) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
const response = await request.post('/api/Business/ApplyJoinAudit', {
FNumber: this.billNo,
FCheckResult: 'BTG',
FRefuseDesc: this.content
});
const { code, message, result } = response;
if (code === 0) {
this.$refs.uToast.show({
title: '已拒绝',
});
uni.navigateBack();
} else {
this.$refs.uToast.show({
title: message,
});
}
},
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
/deep/.u-input {
margin: 30rpx 32rpx;
background-color: #fff;
border-radius: 10rpx;
.u-input__textarea {
padding: 10rpx;
}
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="修改手机"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-card :show-head="false" padding="0" margin="30rpx 30rpx 15rpx 30rpx">
<view slot="body">
<u-cell-group>
<u-cell-item title="手机号码" :arrow="false">
<u-input
v-model="phone"
type="number"
height="48"
input-align="right"
maxlength="11"
placeholder="请输入手机号码"
:clearable="false"
/>
</u-cell-item>
<u-cell-item title="验证码" :arrow="false">
<view class="slMsg">
<u-input
v-model="code"
type="number"
height="48"
input-align="right"
maxlength="6"
placeholder="请输入验证码"
:clearable="false"
:custom-style="{marginRight: '12rpx'}"
/>
<u-button
size="mini"
slot="right"
type="success"
@click="getCode"
>{{codeText}}</u-button>
<u-verification-code ref="uCode" @change="codeChange"></u-verification-code>
</view>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-toast ref="uToast" />
<view class="mc-btn">
<u-button
:custom-style="{margin: '16rpx 30rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
:loading="loading"
@click="handleCommit"
>确定修改</u-button>
</view>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapActions, mapGetters } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
phone: '',
code: '',
codeText: '',
loading: false,
};
},
onLoad() {},
computed: {
...mapGetters({
wxDetail: 'user/wxDetail',
userDetail: 'user/userDetail',
}),
},
methods: {
...mapActions({
handleLogin: 'user/login',
updateOtherInfo: 'user/updateOtherInfo',
updateRegisterStatus: 'user/updateRegisterStatus',
}),
codeChange(text) {
this.codeText = text;
},
getCode() {
request.get('/api/VerificationCode', { phone: this.phone }).then((res) => {
const { code } = res;
if (code === 0) {
// 通知验证码组件内部开始倒计时
this.$refs.uCode.start();
}
});
},
verifyCode() {
return request.post('/api/VerificationCode', {
Phone: this.phone,
VerificationCode: this.code,
});
},
async handleCommit() {
const _t = this;
if (!this.phone || !this.code) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
const verifyRes = await this.verifyCode();
if (verifyRes.code === 0) {
const { Id, FCustBusinessMember } = this.userDetail;
const commitData = {
IsDeleteEntry: false,
Model: {
FID: Id, //商户内码
FCustBusinessMember: [
{
FEntryID: FCustBusinessMember[0].Id, //单据体内码
FPHONE: this.phone, //手机号码
},
],
},
};
const res = await request.post('/api/Business/Modify', commitData);
if (res.code === 0) {
this.$refs.uToast.show({
title: '修改成功',
isTab: true,
url: '/pages/index/index',
});
} else {
this.$refs.uToast.show({
title: res.message,
});
}
} else {
this.$refs.uToast.show({
title: verifyRes.message,
});
}
// const { encryptedData, iv } = this.wxDetail;
// let registerData = {
// Phone: this.phone,
// UserType: this.selectedTypeNumber,
// VerificationCode: this.code,
// encryptedData,
// iv,
// };
// if (this.selectedTypeNumber === '1') {
// registerData.RealName = this.nickName;
// } else {
// registerData.ComPanyName = this.companyName;
// }
// this.loading = true;
// const res = await request.post('/api/Business/save', registerData);
// this.loading = false;
// const { code, result } = res;
// if (code === 0) {
// const { Id, Number } = result.Result;
// this.updateOtherInfo({
// Id,
// Number,
// });
// this.getUserInfo();
// return;
// }
// if (code === 100) {
// this.showJoin = true;
// }
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.slMsg {
display: flex;
justify-content: flex-end;
align-items: center;
}
.tips {
margin-top: 12rpx;
padding-left: 32rpx;
font-size: 24rpx;
color: #ff7a45;
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="更换师傅"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-card :show-head="false" margin="30rpx 30rpx 15rpx 30rpx" :body-style="{padding: 0}">
<view slot="body">
<u-cell-group :border="false">
<u-cell-item
required
title="选择原因"
:value="displayReason"
@click="chooseReason"
></u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-card :show-head="false" margin="0 30rpx 15rpx 30rpx" :body-style="{padding: 0}">
<view slot="body">
<u-cell-group :border="false">
<u-cell-item title="具体描述" :arrow="false">
<u-input
type="text"
v-model="desc"
height="48"
input-align="right"
placeholder="请输入具体的说明"
:clearable="false"
/>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-card title="上传凭证" margin="0 30rpx 15rpx 30rpx" :body-style="{padding: 0}">
<view slot="body">
<u-upload
:action="action"
:header="uploadHeaders"
:max-count="3"
@on-uploaded="onUploaded"
name="file"
width="190"
></u-upload>
</view>
</u-card>
<view class="mc-btn">
<u-button
:custom-style="{margin: '16rpx 32rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
@click="placeOrder"
>提交</u-button>
</view>
</view>
<u-picker
mode="selector"
v-model="showReason"
:range="reasons"
range-key="label"
@confirm="changeReason"
confirm-color="#ffcb57"
></u-picker>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
action: 'https://www.jtfw8.com/WXXCX/api/UploadAttachments',
uploadHeaders: {
'content-type': 'form-data',
appid: 'wx08df2ca62f3e1766',
token: uni.getStorageSync('token'),
},
showReason: false,
reasons: [
{
value: '001',
label: '技术不专业',
},
{
value: '002',
label: '态度不友好',
},
{
value: '003',
label: '未按时完成任务',
},
],
reason: null,
fileList: [],
desc: '',
};
},
onLoad() {
console.log(this.currentOrder);
},
computed: {
...mapGetters({
currentOrder: 'order/currentOrder',
}),
displayReason() {
if (!this.reason) {
return '请选择换师傅原因';
}
return `${this.reason.label}`;
},
},
methods: {
onUploaded(lists) {
this.fileList = lists.map((item) => item.response.result);
},
changeReason(e) {
this.reason = this.reasons[e[0]];
},
chooseReason() {
this.showReason = true;
},
placeOrder() {
const _t = this;
const { reason } = this;
if (!reason) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
const attachObj = {};
for (let index = 0; index < this.fileList.length; index++) {
const fileitem = this.fileList[index];
attachObj[`FChangeWorkerImage${index}`] = fileitem.fileid;
}
request
.post('/api/Order/save', {
IsDeleteEntry: false,
Model: {
FID: this.currentOrder.Id, //订单内码
FStatus: 'DGY', //订单状态:待预约,传固定值:DYY
FWorkerID: {
FNUMBER: this.currentOrder.FWorkerID.Number,
},
FReceiveOrdertime: this.$u.timeFormat(+new Date(), 'yyyy-mm-dd hh:MM'),
FSFAmount: '',
FChangeWorkerEntity: [
{
FChangeWorkerID: {
FNUMBER: this.currentOrder.FWorkerID.Number, //更换师傅编码
},
FChangeWorkerReason: {
FNumber: this.reason.value, // 更换原因
},
FChangeWorkerDesc: this.desc, //具体描述
...attachObj,
},
],
},
})
.then((res) => {
const { code, message, result } = res;
if (code === 0) {
const { IsSuccess } = result.Result.ResponseStatus;
if (IsSuccess) {
_t.$refs.uToast.show({
title: '提交成功!',
isTab: true,
url: '/pages/orders/index',
});
}
} else {
_t.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.wmBd {
display: flex;
align-items: flex-start;
.right {
padding-left: 24rpx;
.hdline {
margin-bottom: 24rpx;
.name {
margin-right: 12rpx;
font-size: 30rpx;
color: #262626;
}
}
.line {
margin-top: 12rpx;
.smtitle {
font-size: 24rpx;
color: #8c8c8c;
}
.smContent {
font-size: 24rpx;
color: #595959;
}
}
}
}
.wmFt {
display: flex;
justify-content: space-between;
align-items: center;
.left {
.amount {
font-size: 36rpx;
color: #ffcb57;
}
}
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="企业成员"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<view class="page-box">
<view class="u-flex u-row-center u-margin-top-24" v-show="showLoading">
<u-loading mode="flower"></u-loading>
</view>
<u-empty
text="没有数据"
mode="list"
margin-top="80"
v-if="list.length === 0 && !showLoading"
></u-empty>
<u-card
v-for="item in list"
:key="item.Id"
:title="item.FRealName"
:thumb="item.FUserImage"
>
<view slot="body">
<view class="line">
<span class="title">手机:</span>
<span class="content">{{item.FPHONE}}</span>
</view>
<view class="line">
<span class="title">备注:</span>
<span class="content">{{item.FNote || '无'}}</span>
</view>
</view>
<view slot="foot">
<u-button
size="mini"
type="error"
hover-class="defaultBtnhover"
@click="deleteMember(item)"
>删除</u-button>
</view>
</u-card>
</view>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapActions } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
list: [],
showLoading: false,
};
},
computed: {},
onLoad() {},
onShow() {
this.getAccountInfo();
},
methods: {
...mapActions({
updateUserDetail: 'user/updateUserDetail',
}),
getAccountInfo() {
this.showLoading = true;
request
.get('/api/Business/View')
.then((res) => {
const { code, message, result } = res;
this.showLoading = false;
if (code === 0) {
let detail = JSON.parse(result.result);
this.updateUserDetail(detail);
this.list = detail.FCustBusinessMember.filter(x => !x.FIsManager);
} else {
this.$refs.uToast.show({
title: message,
});
}
})
.catch(() => {
this.showLoading = false;
});
},
deleteMember(data) {
request
.post('/api/Business/BusinessMemberDelete', {
FEntryID: data.Id,
})
.then((res) => {
const { code, message, result } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '已删除',
});
this.getAccountInfo();
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.search {
padding: 30rpx 16rpx;
}
.swiper-box {
flex: 1;
}
.swiper-item {
height: 100%;
}
.gdtemplate {
display: flex;
align-items: flex-start;
.left {
margin-right: 20rpx;
image {
width: 200rpx;
height: 200rpx;
border-radius: 10rpx;
}
}
.right {
.title {
font-size: 28rpx;
line-height: 50rpx;
}
.type {
margin: 10rpx 0;
font-size: 24rpx;
color: $u-tips-color;
}
.extra {
.exitem {
.title {
color: #595959;
font-size: 24rpx;
}
}
}
}
}
.action {
display: flex;
justify-content: flex-end;
align-items: center;
/deep/.u-btn {
margin-left: 12rpx;
}
}
}
.fixed-bottom-button {
display: flex;
justify-content: center;
align-items: center;
background-color: #ffcb57;
font-size: 28rpx;
color: #472d21;
padding-top: 24rpx;
padding-bottom: 24rpx;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: calc(env(safe-area-inset-bottom) + 24rpx);
}
.fixBtn {
position: fixed;
display: flex;
justify-content: center;
align-items: center;
right: 32rpx;
bottom: 180rpx;
width: 100rpx;
height: 100rpx;
border-radius: 50%;
background-color: #ffcb57;
color: #472d21;
box-shadow: 0 0 6rpx #595959;
z-index: 200000;
}
.line {
margin-bottom: 12rpx;
&:last-child {
margin-bottom: 0;
}
.title {
display: inline-block;
width: 120rpx;
}
}
}
</style>
差异被折叠。
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="意见反馈"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-input v-model="content" type="textarea" height="240"></u-input>
<view class="mc-btn">
<u-button
:custom-style="{margin: '0 30rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
@click="placeOrder"
>立即提交</u-button>
</view>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import request from '../../common/service';
export default {
data() {
return {
content: '',
};
},
onLoad() {},
computed: {},
methods: {
placeOrder() {
if (!this.content) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
request
.post('/api/Feedback/SH', {
Model: {
FContent: this.content,
},
})
.then((res) => {
const { code, message } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '提交成功!',
isTab: true,
url: '/pages/my/index',
});
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
/deep/.u-input {
margin: 30rpx 32rpx;
background-color: #fff;
border-radius: 10rpx;
.u-input__textarea {
padding: 10rpx;
}
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{ backgroundColor: '#ffcb57' }"
:border-bottom="false"
title="新增模板"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-card :foot-border-top="false" :body-style="{ padding: 0 }">
<view slot="head">
<u-upload
:action="action"
:header="uploadHeaders"
@on-uploaded="onUploaded"
@on-remove="onRemove"
name="file"
width="190"
></u-upload>
</view>
<view slot="body" class="goodBd">
<u-cell-group>
<u-cell-item required title="模板名称" :arrow="false">
<u-input
v-model="name"
type="text"
:clearable="false"
height="48"
input-align="right"
placeholder="请输入模板名称"
/>
</u-cell-item>
<u-cell-item
required
title="服务类目"
arrow
:value="displayServiceType"
@click="chooseServiceType"
></u-cell-item>
<u-cell-item
required
title="商品类别"
arrow
:value="displayGoodType"
@click="chooseGoodType"
></u-cell-item>
<!-- <u-cell-item title="商品规格" :arrow="false">
<u-input
v-model="sku"
type="text"
:border="false"
:clearable="false"
placeholder="墙体结构、尺寸或家具的长宽高等"
input-align="right"
:custom-style="{
marginRight: 0
}"
/>
</u-cell-item> -->
<u-cell-item title="备注说明" :arrow="false">
<u-input
v-model="mark"
type="textarea"
input-align="right"
:custom-style="{ paddingLeft: '8rpx' }"
:clearable="false"
/>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<view class="mc-btn">
<u-button
:custom-style="{ margin: '16rpx 30rpx', backgroundColor: '#ffcb57', color: '#472d21' }"
hover-class="defaultBtnhover"
:loading="loading"
@click="placeOrder"
>完成</u-button
>
</view>
<u-picker
mode="selector"
v-model="showGoodTypes"
:range="goodTypes"
range-key="label"
@confirm="changeGoodType"
confirm-color="#ffcb57"
></u-picker>
<u-picker
mode="selector"
v-model="showServiceTypes"
:range="serviceTypes"
range-key="label"
@confirm="changeServiceType"
confirm-color="#ffcb57"
></u-picker>
<u-toast ref="uToast" />
</view>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import request from '../../../common/service';
export default {
data() {
return {
action: 'https://www.jtfw8.com/WXXCX/api/UploadAttachments',
uploadHeaders: {
'content-type': 'form-data',
appid: 'wx08df2ca62f3e1766',
token: uni.getStorageSync('token'),
},
fileList: [],
showGoodTypes: false,
goodTypes: [],
goodType: null,
showServiceTypes: false,
serviceTypes: [],
serviceType: null,
// sku: '',
mark: '',
name: '',
loading: false,
};
},
onLoad() {
this.getServiceTypes();
},
computed: {
...mapGetters({
userDetail: 'user/userDetail',
}),
displayGoodType() {
if (!this.goodType) {
return '请选择商品类别';
}
return `${this.goodType.label}`;
},
displayServiceType() {
if (!this.serviceType) {
return '请选择服务类型';
}
return `${this.serviceType.label}`;
},
},
methods: {
onUploaded(lists) {
this.fileList = lists.map((item) => {
var { code, result } = item.response;
if (code === 0) {
return result;
}
return;
});
},
onRemove(index, lists, name) {
this.fileList.splice(index, 1);
},
getGoodTypes(servicename) {
request.get('/api/BaseData/GoodsType', { serviceitem: servicename }).then((res) => {
const { code, result } = res;
if (code === 0) {
this.goodTypes = result.map((x) => {
return {
value: x.id,
label: x.name,
number: x.number,
};
});
}
});
},
getServiceTypes() {
request.get('/api/BaseData/ServiceItem').then((res) => {
const { code, result } = res;
if (code === 0) {
this.serviceTypes = result.map((x) => {
return {
value: x.id,
label: x.name,
number: x.number,
};
});
}
});
},
changeGoodType(e) {
this.goodType = this.goodTypes[e[0]];
},
chooseGoodType() {
this.showGoodTypes = true;
},
changeServiceType(e) {
this.serviceType = this.serviceTypes[e[0]];
this.getGoodTypes(this.serviceType.label);
},
chooseServiceType() {
this.showServiceTypes = true;
},
placeOrder() {
const { name, goodType, serviceType, sku, mark, fileList } = this;
if (!name || !goodType || !serviceType || fileList.length === 0) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
const commitData = {
Model: {
FName: name,
FBusinessID: {
FNumber: this.userDetail.Number,
},
FServiceItemID: {
FNumber: serviceType.number,
},
FGoodsTypeID: {
FNumber: goodType.number,
},
// FModel: sku,
F_PAEZ_ImagesEntity: fileList.map((x) => {
return {
FAttachmentImage: x.fileid,
};
}),
FDescription: mark,
},
};
this.loading = true;
request.post('/api/GoodsMould/save', commitData).then((res) => {
const { code, message } = res;
this.loading = false;
if (code === 0) {
this.$refs.uToast.show({
title: '添加成功!',
});
uni.navigateBack();
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.goodFt {
.price {
display: flex;
justify-content: flex-end;
align-content: center;
.unit,
.amount {
font-size: 36rpx;
color: red;
}
.amount {
margin-right: 32rpx;
}
}
.delete {
margin-top: 12rpx;
padding-top: 24rpx;
border-top: 2rpx dashed #bfbfbf;
}
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{ backgroundColor: '#ffcb57' }"
:border-bottom="false"
title="选择模板"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<view class="search">
<u-search
placeholder="模板名称/商品类目"
bg-color="#ffffff"
@search="handleSearch"
@custom="handleSearch"
></u-search>
</view>
<u-button size="mini" :custom-style="{ margin: '30rpx 32rpx 32rpx 32rpx' }" @click="addTemplate">
<u-icon name="plus"></u-icon>添加模板
</u-button>
<view class="u-flex u-row-center u-margin-top-24" v-show="showLoading">
<u-loading mode="flower"></u-loading>
</view>
<template v-if="orders.length === 0 && !showLoading">
<u-empty text="暂无模板信息,前往添加" mode="list"></u-empty>
</template>
<template v-else>
<u-card :show-foot="false" margin="0 30rpx 15rpx 30rpx" v-for="item in orders" :key="item.Id">
<view slot="head">
<u-checkbox
v-model="item.checked"
shape="circle"
active-color="#ffcb57"
:size="48"
></u-checkbox>
</view>
<view slot="body">
<view class="gdtemplate">
<view class="left">
<image :src="item.thumbImg" mode="aspectFill" />
</view>
<view class="right">
<view class="title">{{ item.Name[0].Value }}</view>
<view class="type">{{ item.FServiceItemID.Name[0].Value }}</view>
<!-- <view class="extra">
<view class="exitem">
<span class="title">商品规格:</span>
{{item.FModel || '无'}}
</view>
</view> -->
</view>
</view>
</view>
</u-card>
</template>
</view>
<view class="fixBtn" v-if="selected" @click="confirmSelected">
<u-icon name="checkbox-mark"></u-icon>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapActions } from 'vuex';
import request from '../../../common/service';
export default {
data() {
return {
categoryId: '',
orders: [],
showLoading: false,
};
},
onLoad(options) {
this.categoryId = options.id;
this.getTemplates(options.id);
},
onShow() {
if (this.categoryId) {
this.getTemplates(this.categoryId);
}
},
computed: {
selected() {
return this.orders.some((x) => x.checked);
},
},
methods: {
...mapActions({
updateTemplateList: 'templateModule/updateTemplateList',
importTemplates: 'publish/importTemplates',
}),
addTemplate() {
this.$u.route('/pages/good-template/add/index');
},
async getTemplates(id) {
this.showLoading = true;
const response = await request.get('/api/GoodsMould/View', { id: id });
const { code, message, result } = response;
if (code === 0) {
for (let index = 0; index < result.length; index++) {
const item = result[index];
let imgArr = [];
for (let j = 0; j < item.CustGoodsMouldImages.length; j++) {
// const temp = await this.getImageUrl(item.CustGoodsMouldImages[j].FAttachmentImage);
imgArr.push({
fileid: item.CustGoodsMouldImages[j].FAttachmentImage,
filename: `${item.CustGoodsMouldImages[j].FAttachmentImage}.jpg`,
fileurl: `https://www.jtfw8.com/WXXCX/FileService/${item.CustGoodsMouldImages[j].FAttachmentImage}.jpg`,
});
}
item.CustGoodsMouldImagesURL = [...imgArr];
item.thumbImg = imgArr[0].fileurl;
item.checked = false;
}
this.orders = result;
console.log(result);
this.updateTemplateList(result);
} else {
this.$refs.uToast.show({
title: message,
});
}
this.showLoading = false;
},
async getImageUrl(fileId) {
const res = await request.get('/api/UploadAttachments/GetUrl', { fileid: fileId });
return res.result;
},
confirmSelected() {
if (this.selected) {
this.importTemplates(this.orders.filter((x) => x.checked)).then(() => {
let pages = getCurrentPages();
let prevPage = pages[pages.length - 2]; //上一页页面实例
prevPage.$vm.isAdding = true;
uni.navigateBack();
});
}
},
handleSearch(value) {
const { categoryId } = this;
request
.get('/api/GoodsMould/Search', {
name: value,
})
.then(async (res) => {
const { code, message, result } = res;
if (code === 0) {
for (let index = 0; index < result.length; index++) {
const item = result[index];
let imgArr = [];
console.log('item', item);
for (let j = 0; j < item.CustGoodsMouldImages.length; j++) {
const temp = await this.getImageUrl(item.CustGoodsMouldImages[j].FAttachmentImage);
imgArr.push(temp[0]);
}
item.CustGoodsMouldImagesURL = [...imgArr];
item.thumbImg = imgArr[0].fileurl;
item.checked = false;
}
this.orders = result.filter((x) => x.FServiceItemID_Id == categoryId);
this.updateTemplateList(result);
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.search {
padding: 30rpx 16rpx;
}
.gdtemplate {
display: flex;
align-items: flex-start;
.left {
margin-right: 20rpx;
image {
width: 200rpx;
height: 200rpx;
border-radius: 10rpx;
}
}
.right {
.title {
font-size: 28rpx;
line-height: 50rpx;
}
.type {
margin: 10rpx 0;
font-size: 24rpx;
color: $u-tips-color;
}
.extra {
.exitem {
.title {
color: #595959;
font-size: 24rpx;
}
}
}
}
}
.action {
display: flex;
justify-content: flex-end;
align-items: center;
/deep/.u-btn {
margin-left: 12rpx;
}
}
}
.fixed-bottom-button {
display: flex;
justify-content: center;
align-items: center;
background-color: #ffcb57;
font-size: 28rpx;
color: #472d21;
padding-top: 24rpx;
padding-bottom: 24rpx;
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: calc(env(safe-area-inset-bottom) + 24rpx);
}
.fixBtn {
position: fixed;
display: flex;
justify-content: center;
align-items: center;
right: 32rpx;
bottom: 180rpx;
width: 100rpx;
height: 100rpx;
border-radius: 50%;
background-color: #ffcb57;
color: #472d21;
box-shadow: 0 0 6rpx #595959;
z-index: 200000;
}
}
</style>
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="申请加入企业"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-card :show-head="false" padding="0" margin="30rpx 30rpx 15rpx 30rpx">
<view slot="body">
<u-cell-group>
<u-cell-item required title="企业名称" :arrow="false">
<u-input
v-model="company"
type="text"
height="48"
input-align="right"
placeholder="请输入企业名称"
:clearable="false"
/>
</u-cell-item>
<u-cell-item required title="姓名" :arrow="false">
<u-input
v-model="name"
type="text"
height="48"
input-align="right"
placeholder="请输入姓名"
:clearable="false"
/>
</u-cell-item>
<u-cell-item required title="手机号码" :arrow="false">
<u-input
v-model="phone"
type="number"
height="48"
input-align="right"
maxlength="11"
placeholder="请输入手机号码"
:clearable="false"
/>
</u-cell-item>
<u-cell-item title="验证码" :arrow="false">
<view class="slMsg">
<u-input
v-model="code"
type="number"
height="48"
input-align="right"
maxlength="6"
placeholder="请输入验证码"
:clearable="false"
:custom-style="{marginRight: '12rpx'}"
/>
<u-button
size="mini"
slot="right"
type="success"
@click="getCode"
>{{codeText}}</u-button>
<u-verification-code ref="uCode" @change="codeChange"></u-verification-code>
</view>
</u-cell-item>
<u-cell-item title="备注" :arrow="false">
<u-input
v-model="mark"
type="text"
height="48"
input-align="right"
placeholder="备注:)"
:clearable="false"
/>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<u-modal
v-model="showTips"
content="请耐心等待企业管理员处理你的申请,如有任何问题可以联系在线客服寻求帮助"
confirm-text="在线客服"
@confirm="getHelp"
></u-modal>
<u-toast ref="uToast" />
<view class="mc-btn">
<u-button
:custom-style="{margin: '16rpx 30rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
:loading="loading"
@click="handleCommit"
>申请加入</u-button>
</view>
</view>
</div>
</template>
<script>
import { mapActions, mapGetters } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
company: '',
name: '',
phone: '',
code: '',
codeText: '',
mark: '',
loading: false,
showTips: false,
};
},
onLoad(options) {
this.company = options.name || '';
this.phone = options.phone || '';
this.name = options.realname || '';
},
computed: {
...mapGetters({
wxDetail: 'user/wxDetail',
}),
},
methods: {
...mapActions({
updateOtherInfo: 'user/updateOtherInfo',
updateRegisterStatus: 'user/updateRegisterStatus',
}),
codeChange(text) {
this.codeText = text;
},
getCode() {
request.get('/api/VerificationCode', { phone: this.phone }).then((res) => {
const { code } = res;
if (code === 0) {
// 通知验证码组件内部开始倒计时
this.$refs.uCode.start();
}
});
},
handleCommit() {
const _t = this;
if (!this.company || !this.name || !this.phone || !this.code) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
const { encryptedData, iv, userInfo } = this.wxDetail;
let registerData = {
Model: {
ComPanyName: this.company,
FApplyPhone: this.phone,
VerificationCode: this.code,
FApplyName: this.name,
FNote: this.mark,
FUserImage: userInfo.avatarUrl,
encryptedData,
iv,
},
};
this.loading = true;
request.post('/api/Business/ApplyJoin', registerData).then((res) => {
this.loading = false;
const { code, message, result } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '您的申请正在审核中,请稍后查询!',
isTab: true,
url: '/pages/index/index',
});
return;
}
this.$refs.uToast.show({
title: message,
});
});
},
getHelp() {
this.$u.route('/pages/index/index');
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.slMsg {
display: flex;
justify-content: flex-end;
align-items: center;
}
.tips {
margin-top: 12rpx;
padding-left: 32rpx;
font-size: 24rpx;
color: #ff7a45;
}
}
}
</style>
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="设置登录密码"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-card :show-head="false" padding="0" margin="30rpx 30rpx 15rpx 30rpx">
<view slot="body">
<u-cell-group>
<u-cell-item title="手机号码" :value="phone" :arrow="false"></u-cell-item>
<u-cell-item title="验证码" :arrow="false">
<view class="slMsg">
<u-input
v-model="code"
type="number"
height="48"
input-align="right"
maxlength="6"
:clearable="false"
placeholder="请输入验证码"
:custom-style="{marginRight: '12rpx'}"
/>
<u-button
size="mini"
slot="right"
type="success"
@click="getCode"
>{{codeText}}</u-button>
<u-verification-code ref="uCode" @change="codeChange"></u-verification-code>
</view>
</u-cell-item>
<u-cell-item title="新密码" :arrow="false">
<u-input
v-model="psw"
type="password"
:clearable="false"
height="48"
input-align="right"
placeholder="请设置新密码"
/>
</u-cell-item>
<u-cell-item title="确认密码" :arrow="false">
<u-input
v-model="pswconfirm"
type="password"
:clearable="false"
height="48"
input-align="right"
placeholder="再次输入新密码"
/>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<view class="mc-btn">
<u-button
:custom-style="{margin: '16rpx 30rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
@click="changePsw"
>确认修改</u-button>
</view>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import request from '../../../common/service';
export default {
data() {
return {
code: '',
codeText: '',
phone: '',
psw: '',
pswconfirm: '',
};
},
onLoad() {
this.phone = this.curUserinfo.phone;
},
computed: {
...mapGetters({
curUserinfo: 'user/displayUserInfo',
}),
},
methods: {
codeChange(text) {
this.codeText = text;
},
getCode() {
request.get('/api/VerificationCode', { phone: this.phone }).then((res) => {
const { code } = res;
if (code === 0) {
// 通知验证码组件内部开始倒计时
this.$refs.uCode.start();
}
});
},
changePsw() {
const { phone, code, psw, pswconfirm } = this;
if (!code || !psw || !pswconfirm) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
if (psw !== pswconfirm) {
this.$refs.uToast.show({
title: '密码不一致,请重新输入!',
});
return;
}
request
.post('/api/Business/SetLoginPsd', {
phone: phone,
verificationcode: code,
psd: psw,
})
.then((res) => {
const { code, message } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '修改成功!',
isTab: true,
url: '/pages/my/index',
});
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.slMsg {
display: flex;
justify-content: flex-end;
align-items: center;
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="设置支付密码"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-card :show-head="false" padding="0" margin="30rpx 30rpx 15rpx 30rpx">
<view slot="body">
<u-cell-group>
<u-cell-item title="手机号码" :value="phone" :arrow="false"></u-cell-item>
<u-cell-item title="验证码" :arrow="false">
<view class="slMsg">
<u-input
v-model="code"
type="number"
height="48"
input-align="right"
maxlength="6"
:clearable="false"
placeholder="请输入验证码"
:custom-style="{marginRight: '12rpx'}"
/>
<u-button
size="mini"
slot="right"
type="success"
@click="getCode"
>{{codeText}}</u-button>
<u-verification-code ref="uCode" @change="codeChange"></u-verification-code>
</view>
</u-cell-item>
<u-cell-item title="新密码" :arrow="false">
<u-input
v-model="psw"
type="password"
:clearable="false"
height="48"
input-align="right"
placeholder="请设置新密码(6位数字)"
/>
</u-cell-item>
<u-cell-item title="确认密码" :arrow="false">
<u-input
v-model="pswconfirm"
type="password"
:clearable="false"
height="48"
input-align="right"
placeholder="再次输入新密码(6位数字)"
/>
</u-cell-item>
</u-cell-group>
</view>
</u-card>
<view class="mc-btn">
<u-button
:custom-style="{margin: '16rpx 30rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
@click="changePsw"
>完成</u-button>
</view>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapGetters, mapActions } from 'vuex';
import request from '../../../common/service';
export default {
data() {
return {
code: '',
codeText: '',
phone: '',
psw: '',
pswconfirm: '',
};
},
onLoad() {
this.phone = this.curUserinfo.phone;
},
computed: {
...mapGetters({
curUserinfo: 'user/displayUserInfo',
}),
},
methods: {
...mapActions({
updateUserDetail: 'user/updateUserDetail',
}),
codeChange(text) {
this.codeText = text;
},
getCode() {
request.get('/api/VerificationCode', { phone: this.phone }).then((res) => {
const { code } = res;
if (code === 0) {
// 通知验证码组件内部开始倒计时
this.$refs.uCode.start();
}
});
},
changePsw() {
const { phone, code, psw, pswconfirm } = this;
if (!code || !psw || !pswconfirm) {
this.$refs.uToast.show({
title: '请完善信息后再提交!',
});
return;
}
if (psw !== pswconfirm) {
this.$refs.uToast.show({
title: '密码不一致,请重新输入!',
});
return;
}
request
.post('/api/Business/SetPayPsd', {
phone: phone,
verificationcode: code,
psd: psw,
})
.then((res) => {
const { code, message } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '修改成功!'
});
this.getAccountInfo();
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
getAccountInfo() {
request.get('/api/Business/View').then((res) => {
const { code, message, result } = res;
if (code === 0) {
const detail = JSON.parse(result.result);
this.updateUserDetail(detail).then(() => {
uni.navigateBack();
});
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.slMsg {
display: flex;
justify-content: flex-end;
align-items: center;
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="支付订单"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<u-card title="支付信息">
<view slot="body" class="payBd">
<view
class="price"
>¥ {{currentOrder.FSHAmount}}</view>
</view>
<view slot="foot" class="payFt">
<view class="line">
<view class="linetitle">应付金额:</view>
<view
class="linecontent"
>¥ {{currentOrder.FSHAmount}}</view>
</view>
<view class="line">
<view class="linetitle">实付金额:</view>
<view
class="linecontent"
>¥ {{currentOrder.FSHAmount}}</view>
</view>
</view>
</u-card>
<view class="mc-btn">
<u-button
:custom-style="{margin: '16rpx 32rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
@click="placeOrder"
>立即支付</u-button>
</view>
</view>
<u-modal
v-model="showModal"
content="您的余额不足,请充值"
confirm-text="去充值"
confirm-color="#ffcb57"
@confirm="goRecharge"
></u-modal>
<u-modal
v-model="showPswModal"
content="请先设置支付密码"
confirm-color="#ffcb57"
@confirm="goChangePsw"
></u-modal>
<u-modal
v-model="showPswTips"
content="请联系企业管理员设置支付密码"
confirm-color="#ffcb57"
></u-modal>
<u-keyboard
default
ref="uKeyboard"
mode="number"
:mask="true"
:mask-close-able="false"
:dot-enabled="false"
v-model="showPay"
:safe-area-inset-bottom="true"
:tooltip="false"
@change="onChange"
@backspace="onBackspace"
>
<view>
<view class="u-flex u-row-center u-m-t-48">
<u-message-input
mode="box"
:maxlength="6"
:dot-fill="true"
v-model="password"
:disabled-keyboard="true"
@finish="finish"
></u-message-input>
</view>
<view class="u-text-center u-padding-top-10 u-padding-bottom-20 tips">支付键盘</view>
</view>
</u-keyboard>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapGetters } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
showModal: false,
showPswModal: false,
password: '',
showPay: false,
showPswTips: false
};
},
onLoad() {
console.log(this.currentOrder)
},
computed: {
...mapGetters({
currentOrder: 'order/currentOrder',
curUserinfo: 'user/displayUserInfo',
userDetail: 'user/userDetail',
}),
},
methods: {
goChangePsw() {
this.$u.route('/pages/password/pay/index');
},
placeOrder() {
// 未设置支付密码
if (this.userDetail.FPayPassword === ' ') {
if (this.userDetail.FUserType === '1') {
this.showPswTips = true;
return;
}
this.showPswModal = true;
return;
}
// 余额不足付款
if (this.curUserinfo.balance < this.currentOrder.FSFQuotedPriceEntity[0].FSFQuotedPriceAmount) {
this.showModal = true;
return;
}
// 输入支付密码
this.showPay = true;
},
goRecharge() {
this.$u.route('/pages/recharge/index');
},
onChange(val) {
if (this.password.length < 6) {
this.password += val;
}
if (this.password.length >= 6) {
if (this.password === this.userDetail.FPayPassword) {
this.pay();
} else {
this.$refs.uToast.show({
title: '密码错误!',
});
}
}
},
pay() {
this.showPay = false;
uni.showLoading({
title: '支付中',
});
request
.post('/api/Order/Pay', {
FID: this.currentOrder.Id,
FSHSAmount: this.currentOrder.FSHAmount,
FStatus: 'YZF'
})
.then((res) => {
uni.hideLoading();
const { code, message } = res;
if (code === 0) {
this.$refs.uToast.show({
title: '订单已支付',
isTab: true,
url: '/pages/orders/index',
});
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
onBackspace(e) {
if (this.password.length > 0) {
this.password = this.password.substring(0, this.password.length - 1);
}
},
finish() {
console.log(11111);
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.payBd {
padding: 48rpx 0;
.price {
display: flex;
justify-content: center;
align-items: center;
font-size: 48rpx;
color: #f5222d;
}
}
.payFt {
.title {
margin-bottom: 24rpx;
font-size: 32rpx;
color: #262626;
}
.line {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 10rpx;
.linecontent {
font-size: 24rpx;
color: #262626;
}
}
}
}
}
</style>
差异被折叠。
<template>
<div class="content">
<web-view :webview-styles="webviewStyles" :src="webviewURL"></web-view>
</div>
</template>
<script>
import request from '../../common/service';
export default {
data() {
return {
webviewStyles: {
progress: {
color: '#FF3333',
},
},
webviewURL: ''
};
},
onLoad(options) {
this.webviewURL = options.url;
},
computed: {},
methods: {},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
/deep/.u-input {
margin: 30rpx 32rpx;
background-color: #fff;
border-radius: 10rpx;
.u-input__textarea {
padding: 10rpx;
}
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{ backgroundColor: '#ffcb57' }"
:border-bottom="false"
title="账户充值"
title-color="#472d21"
></u-navbar>
</div>
<div class="card">
<u-card>
<view slot="head" class="ahHead">
<u-input
v-model="total"
type="number"
:clearable="false"
:custom-style="{ marginRight: 0 }"
placeholder="请输入充值金额"
/>
<span class="unit"></span>
</view>
<view slot="body">
<u-radio-group v-model="amount" active-color="#ffcb57" width="50%">
<u-radio
v-for="(item, index) in amounts"
:key="index"
:name="item.name"
:disabled="item.disabled"
shape="circle"
>{{ item.name }}</u-radio
>
</u-radio-group>
</view>
</u-card>
<u-card title="选择支付方式">
<view class="payBd" slot="body">
<view class="left">
<u-icon name="weixin-fill" size="50" color="#1AAD19" />
<span class="payname">微信支付</span>
</view>
<u-icon name="checkmark-circle-fill" size="50" color="#ffcb57" />
</view>
</u-card>
<view class="mc-btn">
<u-button
:custom-style="{ margin: '6rpx 30rpx', backgroundColor: '#ffcb57', color: '472d21' }"
hover-class="defaultBtnhover"
:loading="loading"
@click="placeOrder"
>充值</u-button
>
</view>
</div>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapGetters, mapActions } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
amounts: [
{
name: '100',
checked: false,
disabled: false,
},
{
name: '200',
checked: false,
disabled: false,
},
{
name: '500',
checked: false,
disabled: false,
},
{
name: '1000',
checked: false,
disabled: false,
},
],
amount: 100,
total: 100,
loading: false,
};
},
watch: {
amount() {
this.total = this.amount;
},
},
onLoad() {},
methods: {
...mapActions({
updateUserDetail: 'user/updateUserDetail',
}),
changeAmount(e) {
this.amount = e;
},
placeOrder() {
const _t = this;
this.loading = true;
request
.post('/api/payment', {
amount: this.total,
})
.then((res) => {
const { code, message, result } = res;
this.loading = false;
if (code === 0) {
const { timeStamp, nonceStr, paySign, signType } = result;
uni.requestPayment({
provider: 'wxpay',
timeStamp: timeStamp,
nonceStr: nonceStr,
package: result.package,
signType: signType,
paySign: paySign,
success: function (res) {
_t.getAccountInfo();
},
fail: function (err) {
_t.$refs.uToast.show({
title: '充值失败!',
});
},
});
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
getAccountInfo() {
const _t = this;
request.get('/api/Business/View').then((res) => {
const { code, message, result } = res;
if (code === 0) {
const detail = JSON.parse(result.result);
_t.updateUserDetail(detail).then(() => {
uni.showLoading({
title: '充值中',
});
setTimeout(() => {
uni.hideLoading();
_t.$refs.uToast.show({
title: '充值成功!',
});
uni.navigateBack();
}, 2500);
});
} else {
_t.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.card {
.ahHead {
display: flex;
justify-content: space-between;
align-items: center;
}
.payBd {
display: flex;
justify-content: space-between;
align-items: center;
.left {
display: flex;
justify-content: flex-start;
align-items: center;
.payname {
margin-left: 8px;
}
}
}
.u-body-item {
font-size: 32rpx;
color: #333;
padding: 0rpx 10rpx;
.right {
display: flex;
justify-content: flex-end;
align-items: center;
width: 400rpx;
flex: 0 0 400rpx;
height: 120rpx;
border-radius: 8rpx;
margin-left: 12rpx;
.extra-content {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
}
.defaultBtnhover {
color: '#472d21';
}
}
</style>
差异被折叠。
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{ backgroundColor: '#ffcb57' }"
:border-bottom="false"
title="账户明细"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<view class="fl-tool" @click="handleShowFilter">
<span class="month">{{ selectKey }}</span>
<u-icon :name="`arrow-${showFilter ? 'up' : 'down'}`"></u-icon>
</view>
<view class="list">
<view class="list-item" v-for="item in list" :key="item.Id">
<view class="line mark">{{ item.FOrderBillNo }}</view>
<view class="line">
<view class="line-name">{{ item.FPayType }}</view>
<view class="line-name">{{ item.FAmount }}</view>
</view>
<view class="line">
<view class="line-desc">{{ item.FWxPayTime }}</view>
<view class="line-status">{{ item.FPayUserName }}</view>
</view>
</view>
</view>
</view>
<u-picker
mode="selector"
v-model="showFilter"
:range="filterKeys"
range-key="label"
@confirm="changeFilter"
confirm-color="#ffcb57"
></u-picker>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
export default {
data() {
return {
group: {},
showFilter: false,
list: [],
selectKey: '全部',
filterKeys: [],
};
},
onLoad() {
const arr = this.userDetail.FWxPayEntity.reverse();
this.group['全部'] = arr;
arr.forEach((payitem) => {
let groupitem = this.group[payitem.FWxPayTime.substring(0, 7)];
if (!groupitem) {
this.group[payitem.FWxPayTime.substring(0, 7)] = [];
}
this.group[payitem.FWxPayTime.substring(0, 7)].push(payitem);
});
this.list = arr;
this.filterKeys = Object.keys(this.group).map((x) => {
return {
value: x,
label: x,
};
});
},
computed: {
...mapGetters({
userDetail: 'user/userDetail',
}),
},
methods: {
changeFilter(e) {
this.selectKey = this.filterKeys[e[0]].value;
this.list = this.group[this.selectKey];
},
handleShowFilter() {
this.showFilter = true;
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.fl-tool {
padding: 24rpx 32rpx;
background-color: #ffe58f;
.month {
margin-right: 12rpx;
color: #434343;
}
}
.list {
padding: 0 32rpx;
.list-item {
padding: 32rpx 0;
border-bottom: 1rpx solid #d9d9d9;
.line {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12rpx;
&.mark {
font-weight: 500;
font-size: 24rpx;
color: #595959;
}
&:last-child {
margin-bottom: 0;
}
.line-name {
font-size: 28rpx;
color: #434343;
}
.line-desc {
font-size: 24rpx;
color: #8c8c8c;
}
.line-status {
font-size: 24rpx;
color: #faad14;
}
}
}
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="钱包"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<view class="overview">
<view class="wallet">
<img class="icon-wallet" src="../../static/images/common/wallet.png" />
<view class="title">账户余额</view>
<view class="amount">¥ {{curUserinfo.balance}}</view>
</view>
</view>
<u-card :show-head="false" padding="0" margin="0 30rpx 15rpx 30rpx">
<view slot="body">
<u-cell-group>
<u-cell-item title="账户充值" icon="coupon-fill" @click="goRecharge"></u-cell-item>
<u-cell-item title="余额提现" icon="rmb-circle-fill" @click="goWithdraw"></u-cell-item>
<u-cell-item title="账户明细" icon="list-dot" @click="goDetail"></u-cell-item>
</u-cell-group>
</view>
</u-card>
</view>
</div>
</template>
<script>
import { mapGetters } from 'vuex';
export default {
data() {
return {};
},
onLoad() {},
computed: {
...mapGetters({
curUserinfo: 'user/displayUserInfo',
}),
},
methods: {
goRecharge() {
this.$u.route('/pages/recharge/index');
},
goWithdraw() {
this.$u.route('/pages/withdraw/index');
},
goDetail() {
this.$u.route('/pages/transaction-detail/index');
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.overview {
padding: 80rpx 0 60rpx 0;
.wallet {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.icon-wallet {
width: 120rpx;
height: 120rpx;
}
.title {
margin-top: 6rpx;
font-size: 24rpx;
}
.amount {
margin-top: 12rpx;
font-size: 36rpx;
}
}
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<u-navbar
:background="{backgroundColor: '#ffcb57'}"
:border-bottom="false"
title="提现"
title-color="#472d21"
></u-navbar>
</div>
<view class="wrap">
<view class="overview">
<view class="wallet">
<view class="title">可提现金额</view>
<view class="amount">¥ {{curUserinfo.balance}}</view>
</view>
</view>
<view class="wd-form">
<view class="wd-title">提现金额</view>
<view class="wd-input">
<view class="left">
<u-icon name="rmb" size="40"></u-icon>
<u-input v-model="amount" type="number" placeholder="请输入提现金额" />
</view>
<view>
<span class="wd-btn-font" @click="wdAll">全部提现</span>
</view>
</view>
<view class="description">本月还可免费提现5次,每日限额5000,最低10元起</view>
</view>
<view class="paytype">
<view class="pt-title">
提现方式:
<u-icon name="weixin-fill" color="#52c41a" size="36"></u-icon>
<span class="brand">微信钱包</span>
</view>
</view>
<view class="tips">
<view>温馨提示</view>
<view>用户每日最高提现金额为5000元,每月可免费提现5次,超过部分按1%收取手续费;最低提现金额为10元。</view>
</view>
<view class="mc-btn">
<u-button
:custom-style="{margin: '16rpx 24rpx',backgroundColor: '#ffcb57',color: '#472d21'}"
hover-class="defaultBtnhover"
@click="placeOrder"
>提现</u-button>
</view>
</view>
<u-toast ref="uToast" />
</div>
</template>
<script>
import { mapGetters, mapActions } from 'vuex';
import request from '../../common/service';
export default {
data() {
return {
amount: '',
};
},
onLoad() {},
computed: {
...mapGetters({
curUserinfo: 'user/displayUserInfo',
}),
},
methods: {
...mapActions({
updateUserDetail: 'user/updateUserDetail',
}),
placeOrder() {
const { amount, curUserinfo } = this;
if (amount === '' || amount > curUserinfo.balance) {
return;
}
request
.post('/api/CashOut/SH', {
amount: amount,
})
.then((res) => {
const { code, message, result } = res;
this.$refs.uToast.show({
title: code === 0 ? '提交成功!' : message,
});
if (code === 0) {
this.getAccountInfo();
}
});
},
wdAll() {
this.amount = this.curUserinfo.balance;
},
getAccountInfo() {
request.get('/api/Business/View').then((res) => {
const { code, message, result } = res;
if (code === 0) {
const detail = JSON.parse(result.result);
this.updateUserDetail(detail);
} else {
this.$refs.uToast.show({
title: message,
});
}
});
},
},
onShareAppMessage(res) {
if (res.from === 'button') {
// 来自页面内分享按钮
console.log(res.target);
}
return {
title: '京台分享更多精彩',
path: '/pages/index/index',
imageUrl: '/static/images/share/WechatIMG96.png'
};
},
};
</script>
<style lang="scss" scoped>
.content {
.header {
background-color: #ffcb57;
}
.wrap {
display: flex;
flex-direction: column;
height: calc(100vh - var(--window-top));
width: 100%;
.overview {
padding: 80rpx 0 60rpx 0;
background-color: #ffe58f;
.wallet {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.title {
margin-top: 6rpx;
font-size: 32rpx;
}
.amount {
margin-top: 12rpx;
font-size: 36rpx;
font-weight: bold;
}
}
}
.wd-form {
background-color: #fff;
.wd-title {
position: relative;
padding: 24rpx 0 24rpx 48rpx;
font-size: 32rpx;
&::before {
content: '';
position: absolute;
display: block;
top: 28rpx;
left: 24rpx;
width: 8rpx;
height: 36rpx;
background-color: #ffcb57;
border-radius: 5rpx;
}
}
.wd-input {
display: flex;
justify-content: space-between;
align-items: center;
margin: 0 24rpx;
padding: 12rpx 0;
border-bottom: 1rpx solid #d9d9d9;
.left {
display: flex;
justify-content: flex-start;
align-items: center;
/deep/.u-icon {
margin-top: -3rpx;
margin-right: 6rpx;
}
}
.wd-btn-font {
font-weight: bold;
}
}
.description {
padding: 14rpx 24rpx 28rpx 24rpx;
font-size: 26rpx;
color: #8c8c8c;
}
}
.paytype {
margin-top: 30rpx;
background-color: #fff;
.pt-title {
position: relative;
padding: 24rpx 0 24rpx 48rpx;
font-size: 32rpx;
&::before {
content: '';
position: absolute;
display: block;
top: 28rpx;
left: 24rpx;
width: 8rpx;
height: 36rpx;
background-color: #ffcb57;
border-radius: 5rpx;
}
.brand {
margin-left: 18rpx;
}
}
}
.tips {
padding: 32rpx 24rpx;
font-size: 24rpx;
color: #595959;
}
}
}
</style>
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论